1.2.28 • Published 27 days ago

@zebra-fed/zds-react v1.2.28

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

Zebra Design System - React Components

Install

  npm i @zebra-fed/zds-react

Peer Dependencies

-React

Usage

This library is build with theme in mind. To use the library, the entire react application must be wrapped in <StripesTheme>

import { StripesTheme } from '@zebra-fed/zds-react';

<StripesTheme>
  <App />
</StripesTheme>;

Importing components:

import { Button, Avatar, Pagination, Table } from '@zebra-fed/zds-react';

Importing and using Interfaces with Components

import { Button, ButtonType, SizeType } from '@zebra-fed/zds-react';

return (
  <Button type={ButtonType.Basic} size={SizeType.Large}>
    Button
  </Button>
);

Documentation

Due to the way this library has been developed, the documentation is currently minimal and needs improving. The Zebra Front-end Development team have started work on creating a new repository ("Zeta") of Web Components that will only contain fully Zebra Design System compliant, fully documented, fully automatically tested front-end components written in TypeScript. This new repository will be able to work alongside zds-react, and we will be moving, upgrading, & making compliant components from zds-react into the new repository one by one. zds-react will continue to be backwards compatible, the components with Zeta counterparts will not be removed from zds-react, but will be marked as deprecated. We feel concentrating our efforts on creating this new curated & high-quality repository will lead to a better development experience much more quickly than by upgrading the documentation in zds-react. But for now, the minimal documentation is available on this Storybook instance: https://develop--61dee07b2d6ab6003cbb3d8d.chromatic.com/

Building a SVG Library for your Application

NOTE: By default the icons property below is being set to our default icon library. However, if you wish to override said library with your own icon library then please follow the following steps. However, it would be highly recommended to reach out to marc.adlington1@zebra.com before moving on to the next step.

The <SVGIcon /> component requires the configuration of a iconLibrary passed through to the Stripes theme for it to pick up the symbols. This is configured like such:

import { icons } from '../resources/iconLibrary';
const themeObj = {
  icons: icons,
};

<StripesTheme mode={'dark'} theme={themeObj}>
  // body of your app
</StripesTheme>;

The Stripes project exposes a script that will take a folder of SVG icons, iconography that is specific to your application, and compiles it into a single iconLibrary string that will be ingested into the Stripes theming engine.

The filename of the svg files will be used as the iconid property when referencing the icon in the <SVGIcon /> tag within your app.

The script can be access via:

npm run buildIcons --folder ./resources/default

the argument that follows the --folder string will be the source folder for your svg files. It will recursively search through the folder and compile all svg objects into a single string.

Dev instructions

To publish to NPM: package.json Increment version number

yarn build
cd build
npm publish

Publish update to NPM

Development

You can easily develop and interact with your components by using Storybook. To run the local server, simply run:

$ yarn start

If an organisation mandated man-in-the-middle malware is installed onto your system and you are getting a certificate error when starting storybook you can prepend an Environment Variable to change to a different ssl provider. Change the storybook script line in package.json to:

    "storybook": "SET NODE_OPTIONS=--openssl-legacy-provider && start-storybook -p 6006",
1.2.27

27 days ago

1.2.28

27 days ago

1.2.26

1 month ago

1.2.25

2 months ago

1.2.24

2 months ago

1.2.23

2 months ago

1.2.22

2 months ago

1.2.19

2 months ago

1.2.20

2 months ago

1.2.21

2 months ago

1.2.18

2 months ago

1.2.16

3 months ago

1.2.17

3 months ago

1.2.14

3 months ago

1.2.15

3 months ago

1.2.12

3 months ago

1.2.13

3 months ago

1.2.10

3 months ago

1.2.11

3 months ago

1.2.9

3 months ago

1.2.8

3 months ago

1.2.7

3 months ago

1.2.6

3 months ago

1.2.5

3 months ago

1.2.4

5 months ago

1.2.0

8 months ago

1.2.3

6 months ago

1.2.2

6 months ago

1.2.1

6 months ago

1.1.92

9 months ago

1.1.96

9 months ago

1.1.95

9 months ago

1.1.94

9 months ago

1.1.93

9 months ago

1.1.99

8 months ago

1.1.98

8 months ago

1.1.97

8 months ago

1.1.85

10 months ago

1.1.84

10 months ago

1.1.83

11 months ago

1.1.82

11 months ago

1.1.89

9 months ago

1.1.88

9 months ago

1.1.87

9 months ago

1.1.86

10 months ago

1.1.81

11 months ago

1.1.80

11 months ago

1.1.70

12 months ago

1.1.74

12 months ago

1.1.73

12 months ago

1.1.72

12 months ago

1.1.71

12 months ago

1.1.78

12 months ago

1.1.77

12 months ago

1.1.76

12 months ago

1.1.75

12 months ago

1.1.67

1 year ago

1.1.69

12 months ago

1.1.66

1 year ago

1.1.65

1 year ago

1.1.56

1 year ago

1.1.55

1 year ago

1.1.54

1 year ago

1.1.53

1 year ago

1.1.59

1 year ago

1.1.58

1 year ago

1.1.57

1 year ago

1.1.63

1 year ago

1.1.62

1 year ago

1.1.61

1 year ago

1.1.60

1 year ago

1.1.64

1 year ago

1.1.52

1 year ago

1.1.51

1 year ago

1.1.50

1 year ago

1.1.49

1 year ago

1.1.48

1 year ago

1.1.47

1 year ago

1.1.46

1 year ago

1.1.45

1 year ago

1.1.44

1 year ago

1.1.43

1 year ago

1.1.42

1 year ago

1.1.41

1 year ago

1.1.40

1 year ago

1.1.39

1 year ago

1.1.38

1 year ago

1.1.37

1 year ago

1.1.36

1 year ago

1.1.35

1 year ago

1.1.34

1 year ago

1.1.33

1 year ago

1.1.32

1 year ago

1.1.31

1 year ago

1.1.30

1 year ago

1.1.29

1 year ago

1.1.28

1 year ago

1.1.27

1 year ago

1.1.26

1 year ago

1.1.25

1 year ago

1.1.24

1 year ago

1.1.23

1 year ago

1.1.22

1 year ago

1.1.21

1 year ago

1.1.20

1 year ago

1.1.19

2 years ago

1.1.17

2 years ago

1.1.16

2 years ago

1.1.15

2 years ago

1.1.14

2 years ago

1.1.13

2 years ago

1.1.12

2 years ago

1.1.11

2 years ago

1.1.9

2 years ago

1.1.8

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.57

2 years ago

1.0.56

2 years ago

1.0.55

2 years ago

1.0.54

2 years ago

1.0.53

2 years ago

1.0.52

2 years ago

1.0.51

2 years ago

1.0.50

2 years ago

1.0.49

2 years ago

1.0.48

2 years ago

1.0.47

2 years ago

1.0.46

2 years ago

1.0.45

2 years ago

1.0.44

2 years ago

1.0.43

2 years ago

1.0.42

2 years ago

1.0.41

2 years ago

1.0.40

2 years ago

1.0.39

2 years ago

1.0.38

2 years ago

1.0.37

2 years ago

1.0.36

2 years ago

1.0.35

2 years ago

1.0.34

2 years ago

1.0.33

2 years ago

1.0.32

2 years ago

1.0.31

2 years ago

1.0.30

2 years ago

1.0.29

2 years ago

1.0.28

2 years ago

1.0.27

2 years ago

1.0.26

2 years ago

1.0.25

2 years ago

1.0.24

2 years ago

1.0.23

2 years ago

1.0.22

2 years ago

1.0.21

2 years ago

1.0.20

2 years ago

1.0.19

2 years ago

1.0.18

2 years ago

1.0.17

2 years ago

1.0.16

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.0

2 years ago

0.0.11

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago