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

@prestashopcorp/puik-web-components

v2.2.0

Published

PUIK Web-Components library.

Downloads

93

Readme

About The Project

Puik Web Components is a library that aims to provide a complete set of reusable web components based on the PrestaShop Design System for all the PrestaShop ecosystem.

ℹ️ see list of available Web components

Prerequisites

  • Node.js LTS is required.

Installation

# NPM
$ npm install @prestashopcorp/puik-web-components --save

# Yarn
$ yarn add @prestashopcorp/puik-web-components

# pnpm
$ pnpm install @prestashopcorp/puik-web-components

Using Puik Web Components

Global registration

To use all Puik web components in your application, you first need to import and initialize them. Here’s how you can do it:

import {
  initAllWeb,
  PuikExampleCe,
  PuikAnotherExampleCe,
  // other components...
 } from @prestashopcorp/puik-web-components

Then, run the following function in your application:
initAllWeb();

For each component, it replaces 'ce' in the component's name with the provided suffix to form the tagname. If no suffix is provided, 'ce' is used as the default suffix

Here’s how you can do it:

// Initialize all web components without argument
initAllWeb(); // The tagname for PuikExampleCe will default to 'puik-example-ce'

// Initialize all web components with 'mySuffix' as the suffix
initAllWeb('mySuffix'); // The tagname for PuikExampleCe will be 'puik-example-mySuffix'

On-demand Registration (recommended)

If you only want to use a specific component in your application, you can import and initialize it individually. In this case you can name your web-component whatever you want.

1 - Import the Web component in JS file and apply one of the following two ways to registering your custom element :

import { PuikExampleCe } from @prestashopcorp/puik-web-components

customElements.define('your-tagname-here', PuikExampleCe);
  • Or by using the initCe method that you can importing from the package :
import { initCe, PuikExampleCe } from @prestashopcorp/puik-web-components

initCe('your-tagname-here', PuikExampleCe)

2 - Then, use your web-component:

<your-tagname-here>
  ...
</your-tagname-here>

ℹ️ Web components can use the same props as Vue components