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

@magnit-ce/task-board

v0.0.2

Published

A custom html element that provides layout and management for custom task-list elements.

Downloads

7

Readme

magnitce-task-board

A custom HTMLElement that provides layout and managemnt for custom <task-list> elements.

Package size: ~1kb minified, ~1kb verbose.

Quick Reference

<script type="module" src="/path/to/task-board[.min].js"></script>

Demos

https://catapart.github.io/magnitce-task-board/demo/

Support

  • Firefox
  • Chrome
  • Edge
  • Safari (Has not been tested; should be supported, based on custom element support)

Getting Started

  1. Install/Reference the library

Reference/Install

HTML Import (not required for vanilla js/ts; alternative to import statement)

<script type="module" src="/path/to/task-board[.min].js"></script>

npm

npm install @magnit-ce/task-board

Import

Vanilla js/ts

import "/path/to/task-board[.min].js"; // if you didn't reference from a <script>, reference with an import like this

import { TaskBoardElement } from "/path/to/task-board[.min].js";

npm

import "@magnit-ce/task-board"; // if you didn't reference from a <script>, reference with an import like this

import { TaskBoardElement } from "@magnit-ce/task-board";



Overview

The <task-board> element is a container element for <task-list> elements.

Parts

The <task-board> element only has one part in its shadowRoot and its name is lists. The lists part contains the default <slot>, so all of the <task-list> elements will be rendered inside of the lists part.

Drag and Drop

Drag and drop functionality can be activated by using each of the <task-list> elements' drag-drop attribute.

To scope the tasks in a <task-board> element's lists to the board, use the <task-list> element's dragAndDropQueryParent or parentScopeSelector properties.

Events

The <task-board> element does not dispatch any events, itself. It can, however, be targeted for listening for any of the <task-list> or <task-card> elements' events. Because each of those elements dispatch events that bubble, any of their events can be listened for on the <task-board> element.

Slots

The <task-board> element allows customization by using slots to inject custom html content into its shadowRoot.

The <task-board> element exposes the following slots: |Slot Name|Description|Default |-|-|-| |header|A heading for the board's collection of lists. May include a title, action buttons, etc.|[HTMLHeaderElement]| |[Default]|Slot that holds all of the <task-list>s.(note: this slot has no name; all children of the <task-board> element that do not specificy a slot attribute value will be placed in this default slot.)|[empty]| |footer|An area to include additional content or data about the board.|[empty]|

Styling

The <task-board> element itself, and its <task-list> children, can all be styled with CSS, normally. The <task-board> element does not utilize the shadowDOM, so all styling can be done with standard CSS selectors. For its header and footer slots, there are no default part elements, so any elements added to the header or footer slots can be styled with standard CSS selectors, as well.

<task-list> element

The <task-board> element is designed as a parent to the <task-list> element. It's designed as a thin wrapper element that is used more for clarity in the document, rather than unique features.

<task-list> elements are the expected children for this library but as it is largely an abstracted layout, it will work with other child element types.

License

This library is in the public domain. You do not need permission, nor do you need to provide attribution, in order to use, modify, reproduce, publish, or sell it or any works using it or derived from it.