2.3.2 • Published 23 days ago

@xola/ui-kit v2.3.2

Weekly downloads
-
License
MIT
Repository
github
Last release
23 days ago

Xola UI Kit

Xola's React component library with Tailwind CSS for the next generation of Xola apps.

This repository is published as two pieces:

  1. @xola/ui-kit
  2. @xola/icons

It's storybook is publicly published at ui.xola.io. The icons can be previewed there as well.

Requirements

  • Node.js v16
  • NPM v7 or higher

Usage

Install the UI kit:

npm install @xola/ui-kit

Install peer dependencies:

npm install autoprefixer postcss tailwindcss lodash

Create PostCSS and Tailwind config files:

echo 'module.exports = require("@xola/ui-kit/tailwind.config");' > tailwind.config.js
echo 'module.exports = require("@xola/ui-kit/postcss.config");' > postcss.config.js

Import main CSS files in your project:

import "@xola/ui-kit/index.css";
import "@xola/ui-kit/build/style.css";

UI kit expects you already have a working React dev environment with PostCSS support.

Import and use the components:

import { Button } from "@xola/ui-kit";

Development

Installation

Install all required dependencies:

$ nvm use # Project needs Node.js v16 with NPM v7
$ npm install

Start the Storybook development server:

$ npm start

Advanced

Integrate your app with a locally installed UI Kit

In order for this to work you will have to set up an NPM workspace. That means, ui-kit and your-project has to be in the same directory.

Start by creating a package.json file in your "workspace" directory with the following content:

{
    "workspaces": ["ui-kit", "your-project"]
}

Your workspace directory should also contain .npmrc and .nvmrc files. Copy them from this project:

$ cd workspace
$ cp ui-kit/.npmrc .
$ cp ui-kit/.nvmrc .

Now we're ready to install the dependencies for both projects:

$ cd workspace
$ npm install

If all went well, NPM will use locally installed ui-kit in your-project.

Next, start the build command from ui-kit:

$ cd ui-kit
$ npm run build -- --watch

This will build and watch for changes the ui-kit project. Any change made in the ui-kit should be visible in your-project.

If you don't see any changes in your project, that probably means that NPM installed a separate package in your your-project/node_modules directory. To fix this, just remove the whole package with the following command:

$ cd your-project
$ rm -rf node_modules/@xola

Troubleshooting

If you encounter some package related issues, try removing the following directories and running the install command again:

$ cd workspace
$ rm -rf package-lock.json node_modules ui-kit/node_modules your-project/node_modules
$ npm install

Lint & Auto-fix

To automatically fix lint issues in this project you have the following commands:

npm run lint # Run lint on `src` and output issues
npm run lint:fix # Run lint and automatically fix any issues. Any that are not fixed are output to screen.

Notes

To avoid issues with how npm v7 resolves peer dependencies, we enabled legacy-peer-deps rule in .npmrc.

In order to avoid issues in your projects that are using this UI Kit, use the same .npmrc file or always run installs with --legacy-peer-deps flag.

For example:

$ npm install --legacy-peer-deps

Or:

$ npm install some-package --legacy-peer-deps

Publishing the Package

Install np which will help you publish the package

npm -g install np

Once you're ready, run this command to publish your package

npm run build
np <your-new-version> --tag=latest --yolo

Then make sure to push all the tags upstream to xola/ui-kit repo:

git push <upstream-remote> master --tags
2.3.2

23 days ago

2.3.1

29 days ago

2.2.9

29 days ago

2.3.0

30 days ago

2.2.7

1 month ago

2.2.8

1 month ago

2.2.6

1 month ago

2.2.5

2 months ago

2.2.4

2 months ago

2.2.3

2 months ago

2.2.2

2 months ago

2.2.1

2 months ago

2.2.0

2 months ago

2.1.42

2 months ago

2.1.41

3 months ago

2.1.40

4 months ago

2.1.39

4 months ago

2.1.38

4 months ago

2.1.36

4 months ago

2.1.37

4 months ago

2.1.35

4 months ago

2.1.34

5 months ago

2.1.18-rc2

7 months ago

2.1.9

9 months ago

2.1.16

8 months ago

2.1.17

8 months ago

2.1.14

8 months ago

2.1.15

8 months ago

2.1.12

8 months ago

2.1.13

8 months ago

2.1.10

9 months ago

2.1.11

9 months ago

2.1.18

7 months ago

2.1.19

7 months ago

2.1.27

6 months ago

2.1.28

5 months ago

2.1.25

6 months ago

2.1.26

6 months ago

2.1.23

6 months ago

2.1.24

6 months ago

2.1.21

7 months ago

2.1.22

7 months ago

2.1.20

7 months ago

2.1.29

5 months ago

2.1.32

5 months ago

2.1.33

5 months ago

2.1.30

5 months ago

2.1.31

5 months ago

3.0.4

5 months ago

3.0.2

6 months ago

3.0.0

6 months ago

2.1.8

10 months ago

2.1.2

12 months ago

2.1.4

11 months ago

2.1.3

11 months ago

2.1.6

11 months ago

2.1.5

11 months ago

2.1.7

10 months ago

2.0.3

1 year ago

2.0.2

1 year ago

2.1.1

12 months ago

2.1.0

1 year ago

2.2.0-0

12 months ago

2.2.0-3

12 months ago

2.2.0-2

12 months ago

2.2.0-1

12 months ago

2.0.0-99

1 year ago

2.0.0-98

1 year ago

2.0.0-97

1 year ago

2.0.0-96

1 year ago

2.0.0-95

1 year ago

2.0.0-94

1 year ago

2.0.0-93

1 year ago

2.0.0-92

1 year ago

2.0.0-91

2 years ago

2.0.0-90

2 years ago

2.0.0-100

1 year ago

2.0.0-101

1 year ago

2.0.0-102

1 year ago

2.0.0-103

1 year ago

2.0.0-104

1 year ago

2.0.0-105

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

2.0.0-106

1 year ago

2.0.0-49

2 years ago

2.0.0-48

2 years ago

2.0.0-59

2 years ago

2.0.0-58

2 years ago

2.0.0-57

2 years ago

2.0.0-56

2 years ago

2.0.0-55

2 years ago

2.0.0-54

2 years ago

2.0.0-53

2 years ago

2.0.0-52

2 years ago

2.0.0-51

2 years ago

2.0.0-50

2 years ago

2.0.0-69

2 years ago

2.0.0-68

2 years ago

2.0.0-67

2 years ago

2.0.0-66

2 years ago

2.0.0-64

2 years ago

2.0.0-63

2 years ago

2.0.0-62

2 years ago

2.0.0-61

2 years ago

2.0.0-60

2 years ago

2.0.0-79

2 years ago

2.0.0-78

2 years ago

2.0.0-77

2 years ago

2.0.0-76

2 years ago

2.0.0-75

2 years ago

2.0.0-74

2 years ago

2.0.0-73

2 years ago

2.0.0-72

2 years ago

2.0.0-71

2 years ago

2.0.0-70

2 years ago

2.0.0-89

2 years ago

2.0.0-88

2 years ago

2.0.0-87

2 years ago

2.0.0-86

2 years ago

2.0.0-85

2 years ago

2.0.0-84

2 years ago

2.0.0-83

2 years ago

2.0.0-82

2 years ago

2.0.0-81

2 years ago

2.0.0-80

2 years ago

2.0.0-19

2 years ago

2.0.0-18

3 years ago

2.0.0-17

3 years ago

2.0.0-16

3 years ago

2.0.0-15

3 years ago

2.0.0-29

2 years ago

2.0.0-28

2 years ago

2.0.0-27

2 years ago

2.0.0-26

2 years ago

2.0.0-25

2 years ago

2.0.0-24

2 years ago

2.0.0-23

2 years ago

2.0.0-22

2 years ago

2.0.0-21

2 years ago

2.0.0-20

2 years ago

2.0.0-39

2 years ago

2.0.0-38

2 years ago

2.0.0-37

2 years ago

2.0.0-36

2 years ago

2.0.0-35

2 years ago

2.0.0-34

2 years ago

2.0.0-33

2 years ago

2.0.0-32

2 years ago

2.0.0-31

2 years ago

2.0.0-30

2 years ago

2.0.0-47

2 years ago

2.0.0-46

2 years ago

2.0.0-45

2 years ago

2.0.0-44

2 years ago

2.0.0-43

2 years ago

2.0.0-42

2 years ago

2.0.0-41

2 years ago

2.0.0-40

2 years ago

2.0.0-14

3 years ago

2.0.0-13

3 years ago

2.0.0-12

3 years ago

2.0.0-11

3 years ago

2.0.0-10

3 years ago

2.0.0-9

3 years ago

2.0.0-8

3 years ago

2.0.0-7

3 years ago

2.0.0-6

3 years ago

2.0.0-5

3 years ago

2.0.0-4

3 years ago

2.0.0-3

3 years ago

2.0.0-2

3 years ago

2.0.0-1

3 years ago

2.0.0-0

3 years ago