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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@kwc-elements/calendar

v1.0.2

Published

Calendar Web Component

Readme

kwc-calendar

kwc-calendar is a lightweight web component for date selection. It relies on the native Intl.DateTimeFormat API for localization, including correct week start days for different locales. The component supports navigation across months, years, and decades, and exposes many shadow DOM parts for full styling flexibility.

Properties

| Property | Attribute | Description | Type | Default | | -------- | --------- | ----------------------------------------------------------------------------------------------------------------------------- | ---------------- | ------- | | locale | locale | Defines the locale used for text and the first day of the week. Falls back to the browser’s current locale if not provided. | string | null | | value | value | Currently selected date. Accepts either a Date object or a string. | Date \| string | null |

Events

| Event | Description | Type | | -------------- | ------------------------------------------- | ----------------------------------------------------------------------------------- | | valueChanged | Fired whenever the selected date changes. | CustomEvent<{ localization: KwcDateLocalization; kwcDate: KwcDate; date: Date; }> |


Styling Example

@mixin calendar() {
  min-width: 280px;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.4);
  border: none;
  border-radius: 8px;

  background-color: #ffffff;

  &::part(calendar-header) {
    padding: 0 24px;
    margin-bottom: 12px;
  }

  &::part(calendar-nav) {
    color: $primary-color;
  }

  &::part(calendar-nav-arrow) {
    border-radius: 50%;
    aspect-ratio: 1/1;
    border: none;
    color: $primary-color;
    background-color: transparent;
    width: 24px;
    height: 24px;

    &:hover {
      background-color: rgba(3, 169, 244, 0.24);
    }
  }

  & [slot^='arrow'] {
    color: $primary-color;
  }

  &::part(calendar-nav-ym-wrapper) {
    color: $text-primary-color;
    gap: 8px;
  }

  &::part(calendar-nav-month),
  &::part(calendar-nav-year) {
    @include font-body-sm();
    cursor: pointer;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;

    &:hover {
      background-color: rgba(3, 169, 244, 0.24);
    }
  }

  .arrowIcon {
    color: $primary-color;
  }

  @include calendar-view('day');
  @include calendar-view('month');
  @include calendar-view('year');
}

@mixin calendar-view($view) {
  &::part(calendar-#{$view}s-view) {
    gap: 2px;
  }

  &::part(calendar-#{$view}) {
    @include font-body-sm();
    width: 100%;
    color: $text-primary-color;
    border: none;
    border-radius: 4px;
    background-color: transparent;
    cursor: pointer;

    &:hover {
      background-color: rgba(3, 169, 244, 0.24);
    }
  }

  &::part(calendar-#{$view}--current) {
    border: 2px solid $primary-color;
  }

  &::part(calendar-#{$view}--selected) {
    background-color: $primary-color;
    color: $button-text-primary-color;

    &:hover {
      background-color: $primary-color;
      color: $button-text-primary-color;
    }
  }

  @if $view == 'day' {
    &::part(calendar-weekday) {
      color: $text-primary-color;
    }

    &::part(calendar-#{$view}) {
      width: 32px;
    }

    &::part(calendar-#{$view}--out-of-month) {
      opacity: 0.5;
    }
    &::part(calendar-#{$view}--selected) {
      opacity: 1;
    }
  }
}

Built with StencilJS