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

timeslot-picker

v0.9.24

Published

A polymer element for choosing timeslots. Timeslots can be variable.

Downloads

35

Readme

<timeslot-picker>

NOT YET PRODUCTION READY

A polymer element for choosing timeslots. Timeslots can be variable.

The element can be used to display a slider with timeslots at 30 minutes interval. User can select a slot (Max 6 units). An overlay is shown as slider to select slots

As Polymer 3 demos are not working right now, Please check the demo here.

Properties

|Property|type|required|reflected *|notify *|description| |----|---|--|--|--|--| |bookings|Array|yes|false|false|Set of slots already booked | |chosenStartTime|String|no|true|true|Starting time slot value| |chosenEndTime|String|no|true|true|Ending time slot value| |chosenUnits|Number|no|true|true|Number of slots chosen| |noCloseOnOverlayTap|Boolean|no|false|disable the closing of slider on overlay tap| |maxLimit|Number|no|false|Maximum number of slots allowed to book. default value = 6|

bookings property must be an Array of meetings

    bookings: [{
            meetingName: 'Sai\'s Meeting',
            meetingId: 'bbcks',
            meetingStartTime: '3:00 PM',
            units: 4
          },
          {
            meetingName: 'Ranveer\'s Meeting',
            meetingId: 'wqqps',
            meetingStartTime: '7:00 PM',
            units: 2
          },
          {
            meetingName: 'Daman\'s Meeting',
            meetingId: 'kisoe',
            meetingStartTime: '8:00 PM',
            units: 1
          }
        ]

* Please note:

Property with notify: true fires a property-changed event when the value is changed. Example: PropertyName fires property-name-changed event on value change

Reflected attributes updates the element with property attribute when the value changes. Example: PropertyName updates the attribute as property-name="value"

Methods

|Method Name|Arguments|Description| |--|--|--| |open()|slotNumberToBeSelected: Number |Opens the slider on the mentioned slot| |close()|undefined|Closes the slider|

Events

|Event|Detail Object|Description| |--|--|--| |close| not required |Closes the Slider| |open|slot: <number>|Opens the slider at the mentioned slot|

dispatch Event to this element Example:

document.querySelector('timeslot-picker').dispatchEvent(new CustomEvent('open', {
    detail: {
          slot: 2
        }
}))

Styling

|CSS variable|description|default| |-|-|-| |--timeslot-unit-height|Timeslot unit height|50px| |--timeslot-unit-width|Timeslot unit width|50px| |--timeslot-available-bg|Timeslot Available background color| #fff| |--timeslot-disabled-bg|Timeslot Available background color| #fff| |--timeslot-unavailable-bg|Timeslot Unavailable background color| #666| |--timeslot-font-size|Timeslot indicators and slots text size| 10px| |--timeslot-picker-tooltip-background|Tooltip bubble background color| #000| |--timeslot-picker-tooltip-color|Tooltip bubble text color| #fff| |--timeslot-picker-scroll-btn-background|Left and right scroll buttons background| #fff| |--timeslot-picker-scroll-btn-color|Left and right scroll text background| #000| |--timeslot-overlay-background| Background color for overlay over the timeslot units| base64PNG| |--timeslot-overlay-container-background| Background color for the container which contains slider| #777| |--timeslot-overlay-container-border-left|Timeslot indicators left border| none | |--timeslot-overlay-container-border-right|Timeslot indicators right border| none | |--timeslot-slider-thumb-background|Slider thumb backgroud color| base64SVG | |--timeslot-unit-border|Timeslot Unit Border|1px solid #000| |--timeslot-border-radius|Timeslot Unit border radius|0| |--timeslot-picker-scroll-left-btn-border-radius|Left Scroll button border| 0 | |--timeslot-picker-scroll-right-btn-border-radius|Right Scroll button border| 0 | |--timeslot-picker-scroll-btn-font|font shorthand for Scroll Button|none| | --timeslot-overlay-indicators-color|Text color for text in overlay slider|#000| | --timeslot-unit-text-margin|Margin for Text being displayed in a timeslot|2px|

npmjs.org

github.com

webcomponents.org