npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ui-bs-popover

v0.0.3

Published

The default blueprint for ember-cli addons.

Downloads

5

Readme

ui-bs-popover

Leverages the Twitter Bootstrap 3.x popover functionality and provides a simple interface for Ember.

Usage

Basic usage is follows:

{{#ui-bs-popover message='hello world'}}
	The HTML content that will be targetted for the popover
{{/ui-bs-popover}}

Of course message would typically can be a bound variable versus the static text (as shown above) and in addition the following variables are available to this control:

Core Content Properties

| Variable | Type | Default | Description | | -------- | ---- | :-----: | ----------- | | content | string | | the content which is the target of the popover; typically this not used because this control is used as a block component but if it is preferred to supply the target content as a variable this component can be used in a non-block fashion too | | message | string | | the content to be put in the popover | | title | string / function() | '' | the content to put in the title bar of the popover |

Other Bootstrap Properties

| Variable | Type | Default | Description | | -------- | ---- | :-----: | ----------- | | animation | boolean | true | apply a CSS fade transition to the popover | | delay | number / object | 0 | The delay to wait before displaying the popover. If a number is supplied, delay is applied to both hide/show. If object, you are given discrete control. See BS documentation. | | html | boolean | true | Insert HTML into the popover. If false, jQuery's text method will be used to insert content into the DOM. Use text if you're worried about XSS attacks. | | placement | string / function() | auto top | How to position the popover. Static values are top, bottom, left, right, auto. auto can also be used as a modifier such as auto left where it will prefer left but will adjust if there is no space to the left. When a function is used to determine the placement, it is called with the popover DOM node as its first argument and the triggering element DOM node as its second. The this context is set to the popover instance.| | triggerEvent | string | click | How popover is triggered - [click, hover, focus, manual]. You may pass multiple triggers; separate them with a space. | viewport | string / object | {selector: 'body', padding: 0} | Keeps the popover within the bounds of this element. Example: viewport: '#viewport' or { "selector": "#viewport", "padding": 0 }|

Dependencies

This UI control depends on Twitter Bootstrap 3.x CSS and the popover.js and tooltip.js javascript is available. Installing this control does not install bootstrap for you ... we leave that in your very capable hands. If your hands aren't that capable then the basic idea is to:

  1. Install Bootstrap with Bower (you'll need to choose the traditional repo or the SASS repo), in any case let's assume traditional for demonstration purposes:

    bower install bootstrap --save
  2. Add assets in your Brocfile:

    app.import('bower_components/bootstrap/dist/css/bootstrap.css');
    app.import('bower_components/bootstrap/dist/js/bootstrap.js');

Of course you might just decide to install a add-on that does all this nonsense reducing the documentation in this section to needless lip flapping.

Installation

  • change directories to your project folder
  • type: npm install ui-bs-popover --save-dev

Assuming you have met the dependencies stated above you are now ready to start using the control in your project. Happy trails.

Repo Contribution

We're open to your creative suggestions but please move past the "idea" stage and send us a PR so we can incorporate your ideas without killing ourselves. :)

Licensing

This component is free to use under the MIT license:

Copyright (c) 2014 LifeGadget Ltd

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.