{"_id":"@altafonte/tooltip","_rev":"2-d38014518ede0af00b3af949af5999d4","name":"@altafonte/tooltip","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@altafonte/tooltip","scope":"@altafonte","version":"1.0.0","description":"Tooltip webcomponent based on tippy.js","author":{"name":"tony.martin"},"main":"dist/index.cjs.js","module":"dist/custom-elements/index.js","es2015":"dist/esm/index.mjs","es2017":"dist/esm/index.mjs","types":"dist/custom-elements/index.d.ts","collection":"dist/collection/collection-manifest.json","collection:main":"dist/collection/index.js","unpkg":"dist/stencil-starter-project-name/stencil-starter-project-name.js","scripts":{"build":"stencil build --docs","start":"stencil build --dev --watch --serve","test":"stencil test --spec --e2e","test.watch":"stencil test --spec --e2e --watchAll","generate":"stencil generate"},"dependencies":{"@stencil/core":"^2.0.1","tippy.js":"^6.2.7"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/Altafonte/af-tooltip.git"},"bugs":{"url":"https://github.com/Altafonte/af-tooltip/issues"},"homepage":"https://github.com/Altafonte/af-tooltip#readme","_resolved":"","_integrity":"","_from":"file:altafonte-tooltip-1.0.0.tgz","_id":"@altafonte/tooltip@1.0.0","_nodeVersion":"12.16.3","_npmVersion":"6.14.5","dist":{"integrity":"sha512-8Kii84l2CiltnWPgZtE52oVscbbGAkyA8dmVYlFg+BrbJbpcCwh0a+/A76BlDc90RANmHxJ7kTSZd1SLwJDE+w==","shasum":"ab372222a11369e1cb370ab76456edcaaebfaacf","tarball":"https://registry.npmjs.org/@altafonte/tooltip/-/tooltip-1.0.0.tgz","fileCount":65,"unpackedSize":706783,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJoZkCRA9TVsSAnZWagAAqAIP+wb/xt0uREKFKQnL1hXW\nxpPEwoahyOpCAdoprWf6tLyTmb1WCRbDdK/WrywoG0gU0CtgsmiGHUtk+6RL\noTQ5k626R4VlRtJ/zhqxUZcZYG7AF7nm9YsMVZugW5YgoDfo/tb4WtmaG5eA\nA6ztusrZRGi+f1pbNsxcA0xJfcut6u/XbwRG/Y/N8dYiuFMukWcKdESU1z3U\nOea94/+wXlpNb0NVsm4W1rGK6zjtfQMeTq93uqleAUAJvmwYrqxXEcoDvSUR\n6DfVK+WktissXxOUPU+DIl8aqqafRRQjMlsAzgd/6rgbnySSxPmzHcpEHy+u\nPJlea/M09VxJMHcn2Lldi9akNjRlyZUZG1doy+ykepi7/6BVOdUizBaOCCYu\ntKSHPzw0lL/uuB+NeUVAD7YPUDdG9XZwVa+g9nDnWyj/Ms4vtHzooNXGpLzE\nizqnL6p4OaND9TldXaw9EMLvKHM01tR8vcMbLSyJ4ZTBvu2gcqFDUWSHYVZ+\nsPSP2bwH/zR0nJZjkCrV5mx8jVVQyxzTTGzADuFdHseCsIUg1spGmjVEknCn\nfAC/9nPH3pdHWAIGmkh/e1oQKSWBORdAJQrK2EwppADp0p3voO8TfCFWJoFb\nUQh6crzTf6TTGWWzObGC9CD81D0nbUM3gHj4mwru7W31ed70riTF42n39e1n\nnk2D\r\n=RPFR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDMqiPOAzftRFW/7L/4BI34kL+TtkR82y0nW5mEjEak5AIhAO+k+k/3KuZ1SC14wPLlmmDAfx446SbeAnjiMU//JtCP"}]},"_npmUser":{"name":"tony.martin","email":"tony.martin@altafonte.com"},"directories":{},"maintainers":[{"name":"tony.martin","email":"tony.martin@altafonte.com"},{"name":"adrm","email":"adrian@adrm.es"},{"name":"agm-dev","email":"adrian.registros@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tooltip_1.0.0_1613137508140_0.5091817430251717"},"_hasShrinkwrap":false}},"time":{"created":"2021-02-12T13:45:07.884Z","1.0.0":"2021-02-12T13:45:08.337Z","modified":"2022-05-11T11:50:18.306Z"},"maintainers":[{"email":"joseluis.garcia@altafonte.com","name":"joseluis.garcia.altafonte"},{"email":"adrian@adrm.es","name":"adrm"},{"email":"adrian.registros@gmail.com","name":"agm-dev"},{"email":"tony.martin@altafonte.com","name":"tony.martin"}],"description":"Tooltip webcomponent based on tippy.js","homepage":"https://github.com/Altafonte/af-tooltip#readme","repository":{"type":"git","url":"git+https://github.com/Altafonte/af-tooltip.git"},"author":{"name":"tony.martin"},"bugs":{"url":"https://github.com/Altafonte/af-tooltip/issues"},"license":"MIT","readme":"# ![img.png](img.png)  af-tooltip ([Altafonte](https://altafonte.com/) WebComponents)\n\n`af-tooltip` is a toolbox for implementing tooltips in yout app.\n\n## Installing the library\nThere are two strategies we recommend for using `af-tooltip` web components\n\n\n### Node Modules\n- Run `npm install @altafonte/af-tooltip --save`\n- Put a script tag similar to this `<script src='node_modules/@altafonte/af-tooltip/dist/index.js'></script>` in the head of your index.html\n- Then you can use the element anywhere in your template, JSX, html etc\n\n### In a stencil-starter app\n- Run `npm install @altafonte/af-tooltip --save`\n- Add an import to the npm packages `import '@altafonte/af-tooltip;'` You can choose between two approaches:\n  - In your root component for WebComponents to be available across all your app\n  - In each component.\n- Then you can use the element anywhere in your template, JSX, html etc\n\n### Importing styles\n\nAfter installing the library, you need to import its styles\n\nFrom your index.html\n```html\n<link rel=\"stylesheet\" href=\"node_modules/@altafonte/af-tooltip/dist/af-tooltip/af-tooltip.css\">\n```\n\nFor stencil apps, import it in your `/global/app.css`\n\n```css\n@import \"~@altafonte/af-tooltip/dist/af-tooltip/af-tooltip.css\";\n```\n\n\n\n## Tools\n### af-tooltip-wrapper\nThis web-component allows you to show a tooltip when hovering a piece of your template.\n\nTo use it you only have to wrap the code you want to show the tooltip on hover with the component and pass the text you want to show in your tooltip using `text` prop\n\n#### Properties\n\n| Property      | Description                        | Type                  | Default     |\n| ------------- | ---------------------------------- | --------------------- | ----------- |\n| text          | Text showed in the tooltip         | `string \\| undefined`  | `undefined` |\n\n#### Usage\nPlain html:\n```html\n<af-tooltip-wrapper text=\"download all files\">\n  <button>Download</button>\n</af-tooltip-wrapper>\n```\n\nIn your stencil component:\n```tsx\nimport { Component, h } from '@stencil/core';\nimport '@altafonte/af-tooltip'\n\n@Component({\n  tag: 'my-component',\n  styleUrl: 'my-component.css',\n  shadow: true,\n})\nexport class MyComponent {\n\n  render() {\n    return (\n      <div>\n        ...\n\n        <af-tooltip-wrapper text=\"download all files\">\n          <button>Download</button>\n        </af-tooltip-wrapper>\n      </div>\n    )\n  }\n}\n\n```\n\n### tooltip\n\n> **Note:**   Only for stencil apps \n\nThis function allows to add a tooltip without using wrapper\n\n#### Params\n\n| Param         | Description                        | Type                  | Default     |\n| ------------- | ---------------------------------- | --------------------- | ----------- |\n| text          | Text showed in the tooltip         | `string \\| undefined`  | `undefined` |\n\n#### Usage\n```tsx\nimport { Component, h } from '@stencil/core';\nimport {tooltip} from \"@altafonte/af-tooltip\";\n\n@Component({\n  tag: 'my-component',\n  styleUrl: 'my-component.css',\n  shadow: true,\n})\nexport class MyComponent {\n\n  render() {\n    return (\n      <div>\n        ...\n\n          <button {...tooltip('download all files')}>\n            Download\n          </button>\n      </div>\n    )\n  }\n}\n\n```\n\n---- \n![Built With Stencil](https://img.shields.io/badge/-Built%20With%20Stencil-16161d.svg?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE5LjIuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MTIgNTEyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI%2BCjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI%2BCgkuc3Qwe2ZpbGw6I0ZGRkZGRjt9Cjwvc3R5bGU%2BCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik00MjQuNywzNzMuOWMwLDM3LjYtNTUuMSw2OC42LTkyLjcsNjguNkgxODAuNGMtMzcuOSwwLTkyLjctMzAuNy05Mi43LTY4LjZ2LTMuNmgzMzYuOVYzNzMuOXoiLz4KPHBhdGggY2xhc3M9InN0MCIgZD0iTTQyNC43LDI5Mi4xSDE4MC40Yy0zNy42LDAtOTIuNy0zMS05Mi43LTY4LjZ2LTMuNkgzMzJjMzcuNiwwLDkyLjcsMzEsOTIuNyw2OC42VjI5Mi4xeiIvPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNNDI0LjcsMTQxLjdIODcuN3YtMy42YzAtMzcuNiw1NC44LTY4LjYsOTIuNy02OC42SDMzMmMzNy45LDAsOTIuNywzMC43LDkyLjcsNjguNlYxNDEuN3oiLz4KPC9zdmc%2BCg%3D%3D&colorA=16161d&style=flat-square)\n\n# Stencil Component Starter\n\nThis is a starter project for building a standalone Web Component using Stencil.\n\nStencil is also great for building entire apps. For that, use the [stencil-app-starter](https://github.com/ionic-team/stencil-app-starter) instead.\n\n# Stencil\n\nStencil is a compiler for building fast web apps using Web Components.\n\nStencil combines the best concepts of the most popular frontend frameworks into a compile-time rather than run-time tool.  Stencil takes TypeScript, JSX, a tiny virtual DOM layer, efficient one-way data binding, an asynchronous rendering pipeline (similar to React Fiber), and lazy-loading out of the box, and generates 100% standards-based Web Components that run in any browser supporting the Custom Elements v1 spec.\n\nStencil components are just Web Components, so they work in any major framework or with no framework at all.\n\n## Getting Started\n\nTo start building a new web component using Stencil, clone this repo to a new directory:\n\n```bash\ngit clone https://github.com/ionic-team/stencil-component-starter.git my-component\ncd my-component\ngit remote rm origin\n```\n\nand run:\n\n```bash\nnpm install\nnpm start\n```\n\nTo build the component for production, run:\n\n```bash\nnpm run build\n```\n\nTo run the unit tests for the components, run:\n\n```bash\nnpm test\n```\n\nNeed help? Check out our docs [here](https://stenciljs.com/docs/my-first-component).\n\n\n## Naming Components\n\nWhen creating new component tags, we recommend _not_ using `stencil` in the component name (ex: `<stencil-datepicker>`). This is because the generated component has little to nothing to do with Stencil; it's just a web component!\n\nInstead, use a prefix that fits your company or any name for a group of related components. For example, all of the Ionic generated web components use the prefix `ion`.\n\n\n## Using this component\n\nThere are three strategies we recommend for using web components built with Stencil.\n\nThe first step for all three of these strategies is to [publish to NPM](https://docs.npmjs.com/getting-started/publishing-npm-packages).\n\n### Script tag\n\n- Put a script tag similar to this `<script src='https://unpkg.com/my-component@0.0.1/dist/mycomponent.js'></script>` in the head of your index.html\n- Then you can use the element anywhere in your template, JSX, html etc\n\n### Node Modules\n- Run `npm install my-component --save`\n- Put a script tag similar to this `<script src='node_modules/my-component/dist/mycomponent.js'></script>` in the head of your index.html\n- Then you can use the element anywhere in your template, JSX, html etc\n\n### In a stencil-starter app\n- Run `npm install my-component --save`\n- Add an import to the npm packages `import my-component;`\n- Then you can use the element anywhere in your template, JSX, html etc\n","readmeFilename":"readme.md"}