Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
@prestashopcorp/puik
Advanced tools
Puik is a component library that aims to provide a complete set of reusable components based on the PrestaShop Design System for all the PrestaShop ecosystem.
# chose your favorite package manager
# NPM
$ npm install @prestashopcorp/puik --save
# Yarn
$ yarn add @prestashopcorp/puik
# pnpm
$ pnpm install @prestashopcorp/puik
First you need to install unplugin-vue-components
& unplugin-auto-import
$ npm install -D unplugin-vue-components unplugin-auto-import
# Yarn
$ yarn add unplugin-vue-components unplugin-auto-import -D
# pnpm
$ pnpm install unplugin-vue-components unplugin-auto-import -D
Then add the code below in your vite.config file
import { defineConfig } from 'vite'
import Components from 'unplugin-vue-components/vite'
import AutoImport from 'unplugin-auto-import/vite'
import { PuikResolver } from '@prestashopcorp/puik'
export default defineConfig({
plugins: [
// ...
Components({
resolvers: [PuikResolver()],
}),
AutoImport({
resolvers: [PuikResolver()],
}),
],
})
Import the vue component and the component css directly into your vue file
<script setup>
import '@prestashopcorp/puik/es/components/button/style/css'
import { PuikButton } from '@prestashopcorp/puik'
</script>
<template>
<puik-button>Example button</puik-button>
</template>
If you don't care about bundle size you can full import the library by following these instructions
Import the vue library and the css directly into your main.js / main.ts
import { createApp } from 'vue'
import Puik from '@prestashopcorp/puik'
import '@prestashopcorp/puik/dist/index.css'
import App from './App.vue'
const app = createApp(App)
app.use(Puik)
app.mount('#app')
We are using the Tailwind Dark Mode.
To use it you just have to write the css dark rules with dark:<oneRule>
in your css. (I recommand to put your light and dark styles on two lines for greater readability)
Here we are saying the button background will be blue in light mode and green in dark mode
.my-button {
@apply bg-blue;
@apply dark:bg-green;
}
If you don't use VueJS for your application, you can use the CSS only version of our components. It includes all the styles used in the VueJs component library.
<link
rel="stylesheet"
href="https://unpkg.com/@prestashopcorp/puik/dist/index.css"
/>
<button class="puik-button">Example button</button>
Please make sure to read the Contributing Guide before making a pull request
FAQs
PUIK - This includes all public packages of PrestaShop UI kit.
The npm package @prestashopcorp/puik receives a total of 514 weekly downloads. As such, @prestashopcorp/puik popularity was classified as not popular.
We found that @prestashopcorp/puik demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.