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

hp-calendar-sdk

v0.0.8

Published

A modern Svelte calendar component library supporting both Gregorian and Bikram Sambat (Nepali) calendars.

Readme

HP Calendar SDK

A modern Svelte calendar component library supporting both Gregorian and Bikram Sambat (Nepali) calendars.

Features

  • 📅 Dual calendar support (Gregorian & Bikram Sambat)
  • 🎨 Modern, customizable UI with Tailwind CSS
  • 🚫 Flexible date restrictions (past dates, specific days, weekdays)
  • 📱 Responsive design
  • 🔧 TypeScript support
  • ⚡ Built with SvelteKit

Installation

npm install hp-calendar

Prerequisites

This package requires Tailwind CSS for styling. Make sure you have Tailwind CSS configured in your project:

npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p

Usage

1. Import CSS in your main layout (Recommended)

Import the CSS in your main layout file (e.g., +layout.svelte or app.html):

<script>
  // Import the CSS
  import 'hp-calendar/styles.css';
  
  // Import the component
  import { SelectionCalendar } from 'hp-calendar';
  
  let selectedDate = new Date();
  
  function handleDateSelect(event) {
    selectedDate = event.detail.date;
    console.log('Selected date:', selectedDate);
  }
</script>

<SelectionCalendar 
  bind:selectedDate
  on:dateSelect={handleDateSelect}
  disablePastDates={true}
  disabledDays={{
    past: true,
    days: [],
    weekDays: [],
    yearSwitch: true
  }}
/>

2. Alternative: Import CSS in your main CSS file

You can also import the CSS in your main stylesheet:

/* In your main CSS file (e.g., app.css) */
@import 'hp-calendar/styles.css';

Props

  • selectedDate - Currently selected date (Date object)
  • disablePastDates - Boolean to disable past dates
  • disabledDays - Object with disabled date configurations
  • compact - Boolean for compact view
  • styles - Custom styling object

Development

To develop this library:

# Install dependencies
npm install

# Start development server
npm run dev

# Build the library
npm run build

# Package for publishing
npm run package

Local Development with npm link (HMR Support)

For local development with Hot Module Reload when testing in store-web-front project:

  1. In this package directory (hp-calendar-sdk):
# Link this package globally
npm link

# Start the development watcher (auto-rebuilds on changes)
npm run dev:package
  1. In your store-web-front project directory (../):
# Link to this package
npm link hp-calendar-sdk

# Update your vite.config.js to:
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';
import { resolve } from 'path';

export default defineConfig({
	plugins: [sveltekit()],
	server: {
		fs: {
			allow: ['..', '../..']
		}
	},
	resolve: {
		alias: {
			'hp-calendar-sdk': resolve(__dirname, '../hp-calendar-sdk/src/lib')
		}
	},
	optimizeDeps: {
		exclude: ['hp-calendar-sdk']
	}
});
  1. Start your store-web-front dev server:
npm run dev

Now when you make changes to the HP Calendar SDK, it will automatically rebuild and your store-web-front project will hot reload with the changes!

Styling Requirements

Important: This package does not bundle CSS to avoid path resolution issues. You need to have Tailwind CSS configured in your consuming project.

Add this to your tailwind.config.js:

module.exports = {
  content: [
    './src/**/*.{html,js,svelte,ts}',
    './node_modules/hp-calendar/**/*.{html,js,svelte,ts}'
  ],
  // ... rest of your config
}

License

MIT