5.7.2 β€’ Published 2 days ago

@ost-cas-fee-adv-23-24/design-system-pixelpioneers v5.7.2

Weekly downloads
-
License
MIT
Repository
-
Last release
2 days ago

Design System Component Library: PixelPioneers

npm.io npm.io npm.io npm.io npm.io npm.io npm.io

Storybook πŸ“š

Getting Started

Design System PixelPioneers is a Storybook with Tailwind integrated based on React Component Library. This is the first part of the CAS Frontend Engineering Advanced course which expect the result that this library can be installed in the Next.js application. In the Next.js application we can re-use components from this library.

Folder Overview

Pre-requisites

We need the npm package manager to install this library.

npm install npm@latest -g

Built with

React Google Chrome Storybook NPM TailwindCSS CSS3 HTML5 JavaScript TypeScript

Bootstrapped with

This project was bootstrapped with Create React App.

Usage

How to install Library package and setup Tailwind configuration in your Next.js application

Make your Next.js app active for using the Tailwind presets of this Design System Library. Make sure that the following code snippet is added in the tailwind.config.js.

The easiest way, install Design System Component Library in your Next.js app:

In System Design Component Library, create a package of it:

npm pack

In Next.js:

This can be used instead via NPM for checking or whatever too.

npm i -D @ost-cas-fee-adv-23-24/design-system-pixelpioneers@0.0.0-development

In Next.js, this loads design tokens as presets.

presets: [
    require('@ost-cas-fee-adv-23-24/design-system-component-library-pixelpioneers/preset')
],

Check that this Component Library is also added in using the Tailwind CSS of the Next.js app. Please add the following code snippet in your tailwind.config.js.

content: [
    ...
    './node_modules/@ost-cas-fee-adv-23-24/design-system-component-library-pixelpioneers/lib/esm/components/**/*.js'
],

For having more information related this configuration, it can be found here: Install Tailwind CSS with Next.js.

Technology Stack

πŸ“Ž Link Create React App with the TypeScript Template. npx create-react-app my-app --template typescript

πŸ“Ž Link Install and integrate Storybook. npx storybook@latest init

πŸ“Ž Link Get started with Tailwind. npm install -D tailwindcss postcss autoprefixer npx tailwindcss init

Important! πŸ“£ If you are using Vite, @storybook/nextjs, @storybook/angular, or @storybook/preset-create-react-app with react-scripts@2.0.0, then leave the options object empty, see Reference

Tailwind CSS as a PostCSS installation and configuration, see here and How to setup Tailwind and StoryBook.

πŸ“Ž Link TypeScript configuration, see also Configure Storybook with TypeScript. Then re-write stories in TypeScript only.

πŸ“Ž Link Prettier npm install --save-dev --save-exact prettier

πŸ“Ž Link postcss PostCSS is a tool for transforming styles with JS plugins. These plugins can lint your CSS, support variables and mixins, transpile future CSS syntax, inline images, and more. Installing Tailwind CSS as a PostCSS plugin is the most seamless way to integrate it with build tools like webpack. It also supports Autoprefixer. See the part of Tailwind above.

πŸ“Ž Link husky / Git hooks You can use it to lint your commit messages, run tests, lint code and many more when you commit or push. See here husky - github.

πŸ“Ž Link lint-staged Run linters against staged git files and don't let πŸ’© slip into your code base! Linting makes more sense when run before committing your code. By doing so you can ensure no errors go into the repository and enforce code style. Check there lint-staged - github.

πŸ“Ž Link ESLint ESLint is a tool for identifying and reporting on patterns found in ECMAScript/JavaScript code, see also ESLint - npm.

πŸ“Ž Link commitlint commitlint checks if your commit messages meet the conventional commit format(commitlint checks if your commit messages meet the conventional commit format). See also commitlint - github.

πŸ“Ž Link clsx A tiny (234B) utility for constructing className strings conditionally. Also serves as a faster & smaller drop-in replacement for the classnames module.

πŸ“Ž Link framer-motion A simple and powerful JavaScript animation library.

πŸ“Ž Link headlessui Completely unstyled, fully accessible UI components, designed to integrate beautifully with Tailwind CSS.

Workround

A way of dealing with a problem or making something work despite the problem, without completely solving it.

Override TypeScript@5, see also there: Workaround (We need TS@5 to bundle CJS and ESM)

Run scripts

npm run storybook runs the storybook locally on port http://localhost:6006.

npm run build builds a cjs and esm module for production to the lib folder.

npm run build:cjs builds the cjs module to the lib/cjs folder.

npm run build:esm builds the esm module to the lib/esm folder.

npm run build:cjs:tailwind bundles the index.css in the lib/cjs folder.

npm run build:esm:tailwind bundles the index.css in the lib/esm folder.

npm run clean removes the lib folder.

npm run lint checks lint.

npm run lint:fix fixes lint.

npm run prettier runs prettier.

npm run prettier:check check code-format with prettier and print out warnings if available.

npm pack creates a tarball from a package.

npm start runs the app in the development mode.\ Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits. You will also see any lint errors in the console.

npm test launches the test runner in the interactive watch mode.\ See the section about running tests for more information.

Visual Overview of Folder Structure

Collaboration

Development Agreement

Conventional Commits

A specification for adding human and machine readable meaning to commit messages, see also Conventional Commits.

Contribution

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag name: enhancement. Don't forget to give the project a star! ⭐️ Thanks! πŸ™

  1. Fork the Project
  2. Create your Feature Branch git checkout -b feature/amazingFeature
  3. Commit your Changes git commit -m 'Add some amazingFeature'
  4. Push to the Branch git push origin feature/amazingFeature
  5. Open a Pull Request

Developers

πŸ‘‹ Nico Lutz - write an e-mail to Nico πŸ‘¨β€πŸ’» πŸ‘‹ AndrΓ© Ceres - write an e-mail to AndrΓ© πŸ‘¨β€πŸ’»

Licence

Distributed under the MIT License. See LICENSE for more information.

5.7.2

2 days ago

5.7.1

2 days ago

5.7.0

2 days ago

5.6.1

2 days ago

5.6.0

3 days ago

5.5.3

4 days ago

5.5.1

5 days ago

5.5.0

5 days ago

5.4.3

5 days ago

5.5.2

5 days ago

5.4.2

6 days ago

5.4.1

19 days ago

5.4.0

26 days ago

5.3.5

2 months ago

5.3.4

3 months ago

5.3.3

3 months ago

5.3.2

3 months ago

5.3.1

3 months ago

5.3.0

4 months ago

5.2.2

5 months ago

5.2.1

5 months ago

5.2.0

5 months ago

5.1.5

5 months ago

5.1.4

5 months ago

5.1.3

5 months ago

5.1.2

5 months ago

5.1.1

5 months ago

5.1.0

5 months ago

4.12.1

5 months ago

4.12.2

5 months ago

5.0.0

5 months ago

4.12.0

5 months ago

4.11.0

5 months ago

4.10.0

5 months ago

4.9.0

5 months ago

4.8.0

5 months ago

4.7.0

5 months ago

4.6.0

6 months ago

4.5.0

6 months ago

4.4.1

6 months ago

4.4.0

6 months ago

4.3.0

6 months ago

4.2.0

6 months ago

4.1.1

6 months ago

4.1.0

6 months ago

4.0.0

6 months ago

3.4.0

6 months ago

3.3.0

6 months ago

3.2.0

6 months ago

3.1.0

6 months ago

3.0.0

6 months ago

2.0.0

6 months ago

1.4.0

6 months ago

1.3.0

6 months ago

1.2.4

7 months ago

1.2.3

7 months ago

1.2.2

7 months ago

1.2.1

7 months ago

1.2.0

7 months ago

1.1.1

7 months ago

1.1.0

7 months ago

1.0.9

7 months ago

1.0.8

7 months ago

1.0.7

7 months ago

1.0.6

7 months ago

1.0.5

7 months ago

1.0.4

8 months ago

1.0.3

8 months ago

1.0.2

8 months ago

0.1.1

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago

0.1.0

8 months ago