2.3.28 • Published 4 months ago

@xola/ui-kit v2.3.28

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months 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.28

4 months ago

2.3.27

4 months ago

2.3.26

5 months ago

2.3.25

5 months ago

2.3.24

5 months ago

2.3.23

5 months ago

2.3.22

5 months ago

2.3.21

5 months ago

3.0.8

6 months ago

2.3.20

7 months ago

2.3.19

8 months ago

2.3.18

8 months ago

2.3.17

8 months ago

2.3.16

9 months ago

2.3.15

9 months ago

3.0.6

9 months ago

2.3.13

10 months ago

2.3.12

10 months ago

2.3.14

9 months ago

2.3.11

10 months ago

2.3.9

11 months ago

2.3.10

11 months ago

2.3.6

12 months ago

2.3.8

12 months ago

2.3.7

12 months ago

2.3.5

1 year ago

2.3.4

1 year ago

2.3.3

1 year ago

2.3.2

1 year ago

2.3.1

1 year ago

2.2.9

1 year ago

2.3.0

1 year ago

2.2.7

1 year ago

2.2.8

1 year ago

2.2.6

1 year ago

2.2.5

1 year ago

2.2.4

1 year ago

2.2.3

1 year ago

2.2.2

1 year ago

2.2.1

1 year ago

2.2.0

1 year ago

2.1.42

1 year ago

2.1.41

1 year ago

2.1.40

1 year ago

2.1.39

2 years ago

2.1.38

2 years ago

2.1.36

2 years ago

2.1.37

2 years ago

2.1.35

2 years ago

2.1.34

2 years ago

2.1.18-rc2

2 years ago

2.1.9

2 years ago

2.1.16

2 years ago

2.1.17

2 years ago

2.1.14

2 years ago

2.1.15

2 years ago

2.1.12

2 years ago

2.1.13

2 years ago

2.1.10

2 years ago

2.1.11

2 years ago

2.1.18

2 years ago

2.1.19

2 years ago

2.1.27

2 years ago

2.1.28

2 years ago

2.1.25

2 years ago

2.1.26

2 years ago

2.1.23

2 years ago

2.1.24

2 years ago

2.1.21

2 years ago

2.1.22

2 years ago

2.1.20

2 years ago

2.1.29

2 years ago

2.1.32

2 years ago

2.1.33

2 years ago

2.1.30

2 years ago

2.1.31

2 years ago

3.0.4

2 years ago

3.0.2

2 years ago

3.0.0

2 years ago

2.1.8

2 years ago

2.1.2

2 years ago

2.1.4

2 years ago

2.1.3

2 years ago

2.1.6

2 years ago

2.1.5

2 years ago

2.1.7

2 years ago

2.0.3

2 years ago

2.0.2

2 years ago

2.1.1

2 years ago

2.1.0

2 years ago

2.2.0-0

2 years ago

2.2.0-3

2 years ago

2.2.0-2

2 years ago

2.2.0-1

2 years ago

2.0.0-99

3 years ago

2.0.0-98

3 years ago

2.0.0-97

3 years ago

2.0.0-96

3 years ago

2.0.0-95

3 years ago

2.0.0-94

3 years ago

2.0.0-93

3 years ago

2.0.0-92

3 years ago

2.0.0-91

3 years ago

2.0.0-90

3 years ago

2.0.0-100

3 years ago

2.0.0-101

3 years ago

2.0.0-102

2 years ago

2.0.0-103

2 years ago

2.0.0-104

2 years ago

2.0.0-105

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

2.0.0-106

2 years ago

2.0.0-49

3 years ago

2.0.0-48

3 years ago

2.0.0-59

3 years ago

2.0.0-58

3 years ago

2.0.0-57

3 years ago

2.0.0-56

3 years ago

2.0.0-55

3 years ago

2.0.0-54

3 years ago

2.0.0-53

3 years ago

2.0.0-52

3 years ago

2.0.0-51

3 years ago

2.0.0-50

3 years ago

2.0.0-69

3 years ago

2.0.0-68

3 years ago

2.0.0-67

3 years ago

2.0.0-66

3 years ago

2.0.0-64

3 years ago

2.0.0-63

3 years ago

2.0.0-62

3 years ago

2.0.0-61

3 years ago

2.0.0-60

3 years ago

2.0.0-79

3 years ago

2.0.0-78

3 years ago

2.0.0-77

3 years ago

2.0.0-76

3 years ago

2.0.0-75

3 years ago

2.0.0-74

3 years ago

2.0.0-73

3 years ago

2.0.0-72

3 years ago

2.0.0-71

3 years ago

2.0.0-70

3 years ago

2.0.0-89

3 years ago

2.0.0-88

3 years ago

2.0.0-87

3 years ago

2.0.0-86

3 years ago

2.0.0-85

3 years ago

2.0.0-84

3 years ago

2.0.0-83

3 years ago

2.0.0-82

3 years ago

2.0.0-81

3 years ago

2.0.0-80

3 years ago

2.0.0-19

4 years ago

2.0.0-18

4 years ago

2.0.0-17

4 years ago

2.0.0-16

4 years ago

2.0.0-15

4 years ago

2.0.0-29

4 years ago

2.0.0-28

4 years ago

2.0.0-27

4 years ago

2.0.0-26

4 years ago

2.0.0-25

4 years ago

2.0.0-24

4 years ago

2.0.0-23

4 years ago

2.0.0-22

4 years ago

2.0.0-21

4 years ago

2.0.0-20

4 years ago

2.0.0-39

3 years ago

2.0.0-38

3 years ago

2.0.0-37

3 years ago

2.0.0-36

3 years ago

2.0.0-35

4 years ago

2.0.0-34

4 years ago

2.0.0-33

4 years ago

2.0.0-32

4 years ago

2.0.0-31

4 years ago

2.0.0-30

4 years ago

2.0.0-47

3 years ago

2.0.0-46

3 years ago

2.0.0-45

3 years ago

2.0.0-44

3 years ago

2.0.0-43

3 years ago

2.0.0-42

3 years ago

2.0.0-41

3 years ago

2.0.0-40

3 years ago

2.0.0-14

4 years ago

2.0.0-13

4 years ago

2.0.0-12

4 years ago

2.0.0-11

4 years ago

2.0.0-10

4 years ago

2.0.0-9

4 years ago

2.0.0-8

4 years ago

2.0.0-7

4 years ago

2.0.0-6

4 years ago

2.0.0-5

4 years ago

2.0.0-4

4 years ago

2.0.0-3

4 years ago

2.0.0-2

4 years ago

2.0.0-1

4 years ago

2.0.0-0

4 years ago