1.5.8 • Published 2 months ago

@uaveiro/ui v1.5.8

Weekly downloads
4
License
-
Repository
github
Last release
2 months ago

uaveiro/ui

uaveiro/ui

Table of Contents

Get started

@uaveiro/ui is a reusable component library that helps the University of Aveiro contributors, developers and colleges build UIs faster. The goal is to make building durable UIs more productive and satisfying for University Aveiro products, like the portal, internal systems, and other promotional sites.

Try this CodeSandBox to see a real live demo.

Install

@uaveiro/ui components are written in React, with support with themes and utilities.

Add @uaveiro/ui components to your project.

npm install --save @uaveiro/ui

Or with yarn

yarn add @uaveiro/ui

The library uses peer dependencies, to work properly you need to install the following dependencies to your projects.

npm install --save styled-components react-sizeme react-accessible-accordion@^2.4.5 react-slick@^0.25.2 global@^4.4.0 moment polished rc-pagination@^1.20.12 react-select react-player react-palette react-calendar@^2.19.2 react-intl@^2.8.0

Or with yarn

yarn add styled-components react-sizeme react-accessible-accordion@^2.4.5 react-slick@^0.25.2 global@^4.4.0 moment polished rc-pagination@^1.20.12 react-select react-player react-palette react-calendar@^2.19.2 react-intl@^2.8.0

Use

Import components you want into your UI, read the documentation to learn more about other components or use the design system to learn more about how to apply them to your project.

import { Button } from "@uaveiro/ui";

and use them like so

const example = () => (
  <div>
    <Button>Hello world</Button>
    <Button variant="primary" onClick={() => 0}>
      Do something
    </Button>
  </div>
);

Configuration and Providers for the project

Implement the configuration, static files, and providers to the project. For the components to work properly some configuration needs to be implemented like CSS files, theme providers and other configuration files.

CSS Files

The following CSS files need to be implemented in the public folder of the project. This file contains the fonts styles, font icons, the grid, calendar styles, and slider styles.

<link
  href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900"
  rel="stylesheet"
/>
<link
  href="https://fonts.googleapis.com/css?family=Playfair+Display"
  rel="stylesheet"
/>
<link rel="stylesheet" href="https://static.ua.pt/css/ua/static-lib/grid.css" />
<link
  rel="stylesheet"
  href="https://static.ua.pt/css/font-awesome-pro/5.8.1/css/all.min.css"
/>
<link
  rel="stylesheet"
  href="https://static.ua.pt/css/ua/static-lib/entypo.css"
/>
<link
  rel="stylesheet"
  href="https://static.ua.pt/css/ua/static-lib/slider.css"
/>
<link
  rel="stylesheet"
  href="https://static.ua.pt/css/ua/static-lib/slider-theme.css"
/>
<link
  rel="stylesheet"
  href="http://static.ua.pt/css/ua/static-lib/calendar.min.css"
/>

Providers

The following providers set the default theme for the project, there's a ThemeContrast in the library.

import React from "react";
import ReactDOM from "react-dom";
import YourApp from "./YourApp";
import { IntlProvider } from "react-intl";
import {
  ThemeProvider,
  Theme,
  ConfigProvider,
  InjectIntlContext,
  useFormatMessage
} from "@uaveiro/ui";

function App() {
  return (
    <>
      <IntlProvider>
        <InjectIntlContext>
          <ThemeProvider theme={Theme}>
            <ConfigProvider
              config={{
                imageAPI: "https://api-assets.dev.ua.pt/v1",
                portalWWW: "https://www.dev.ua.pt",
                portalAPI: "https://api-portal.dev.ua.pt/api/v1",
                baseUrl: "https://www.ua.pt"
              }}
              components={{
                link: YourLinkComponent,
                formattedMessage: FormattedMessage,
                isIE: () => false
              }}
              hooks={{
                useIntl: useFormatMessage
              }}
            >
              <YourApp />
            </ConfigProvider>
          </ThemeProvider>
        </InjectIntlContext>
      </IntlProvider>
    </>
  );
}

ReactDOM.render(<App />, document.getElementById("root"));

StoryBook

Update StoryBook

@uaveiro/ui uses the Storybook tool for UI development. It makes development faster and easier by isolating components. This allows you to work on one component at a time. Storybook can be published online to review and collaborate on works in progress. That allows developers, designers, and PMs to check if UI looks right without touching code or needing a local dev environment. To update for the new version you just have to run:

yarn build-storybook -o ./docs

and then commit the folder to master branch. Content will be automatically updated.

Run StoryBook

npm run storybook

Publish Package

To publish your package to the npm registry, run:

npm publish
1.5.8

2 months ago

1.5.7

3 months ago

1.5.6

3 months ago

1.5.5

3 months ago

1.5.4

4 months ago

1.5.3

4 months ago

1.5.2

4 months ago

1.5.1

4 months ago

1.5.0

7 months ago

1.4.0-beta.101

7 months ago

1.4.0-beta.100

7 months ago

1.4.0-beta.98

7 months ago

1.4.0-beta.99

7 months ago

1.4.0-beta.97

7 months ago

1.4.0-beta.96

7 months ago

1.4.0-beta.94

10 months ago

1.4.0-beta.95

10 months ago

1.4.0-beta.93

10 months ago

1.4.0-beta.91

10 months ago

1.4.0-beta.92

10 months ago

1.4.0-beta.90

12 months ago

1.4.0-beta.87

1 year ago

1.4.0-beta.88

1 year ago

1.4.0-beta.89

1 year ago

1.4.0-beta.84

1 year ago

1.4.0-beta.85

1 year ago

1.4.0-beta.86

1 year ago

1.4.0-beta.82

2 years ago

1.4.0-beta.83

1 year ago

1.4.0-beta.80

2 years ago

1.4.0-beta.81

2 years ago

1.4.0-beta.79

2 years ago

1.4.0-beta.78

2 years ago

1.4.0-beta.77

2 years ago

1.4.0-beta.71

2 years ago

1.4.0-beta.72

2 years ago

1.4.0-beta.73

2 years ago

1.4.0-beta.74

2 years ago

1.4.0-beta.70

2 years ago

1.4.0-beta.75

2 years ago

1.4.0-beta.76

2 years ago

1.4.0-beta.68

2 years ago

1.4.0-beta.69

2 years ago

1.4.0-beta.65

2 years ago

1.4.0-beta.66

2 years ago

1.4.0-beta.67

2 years ago

1.4.0-beta.64

2 years ago

1.4.0-beta.61

2 years ago

1.4.0-beta.62

2 years ago

1.4.0-beta.63

2 years ago

1.4.0-beta.60

2 years ago

1.4.0-beta.50

2 years ago

1.4.0-beta.51

2 years ago

1.4.0-beta.52

2 years ago

1.4.0-beta.57

2 years ago

1.4.0-beta.58

2 years ago

1.4.0-beta.59

2 years ago

1.4.0-beta.53

2 years ago

1.4.0-beta.54

2 years ago

1.4.0-beta.55

2 years ago

1.4.0-beta.56

2 years ago

1.4.0-beta.46

2 years ago

1.4.0-beta.47

2 years ago

1.4.0-beta.48

2 years ago

1.4.0-beta.49

2 years ago

1.4.0-beta.43

2 years ago

1.4.0-beta.44

2 years ago

1.4.0-beta.45

2 years ago

1.4.0-beta.40

2 years ago

1.4.0-beta.41

2 years ago

1.4.0-beta.42

2 years ago

1.4.0-beta.36

2 years ago

1.4.0-beta.37

2 years ago

1.4.0-beta.38

2 years ago

1.4.0-beta.39

2 years ago

1.4.0-beta.35

2 years ago

1.4.0-beta.31

2 years ago

1.4.0-beta.32

2 years ago

1.4.0-beta.33

2 years ago

1.4.0-beta.34

2 years ago

1.4.0-beta.28

2 years ago

1.4.0-beta.29

2 years ago

1.4.0-beta.30

2 years ago

1.4.0-beta.24

2 years ago

1.4.0-beta.25

2 years ago

1.4.0-beta.26

2 years ago

1.4.0-beta.27

2 years ago

1.4.0-beta.22

2 years ago

1.4.0-beta.23

2 years ago

1.4.0-beta.20

2 years ago

1.4.0-beta.21

2 years ago

1.4.0-beta.19

2 years ago

1.4.0-beta.13

2 years ago

1.4.0-beta.14

2 years ago

1.4.0-beta.15

2 years ago

1.4.0-beta.16

2 years ago

1.4.0-beta.17

2 years ago

1.4.0-beta.18

2 years ago

1.4.0-beta.12

2 years ago

1.4.0-beta.11

2 years ago

1.4.0-beta.10

2 years ago

1.4.0-beta.9

3 years ago

1.4.0-beta.8

3 years ago

1.4.0-beta.7

3 years ago

1.4.0-beta.6

3 years ago

1.4.0-beta.5

3 years ago

1.4.0-beta.4

3 years ago

1.4.0-alpha.88

3 years ago

1.4.0-alpha.89

3 years ago

1.4.0-alpha.87

3 years ago

1.4.0-beta.3

3 years ago

1.4.0-alpha.86

3 years ago

1.4.0-alpha.85

3 years ago

1.4.0-alpha.79

3 years ago

1.4.0-alpha.78

3 years ago

1.4.0-alpha.82

3 years ago

1.4.0-alpha.83

3 years ago

1.4.0-alpha.80

3 years ago

1.4.0-alpha.81

3 years ago

1.4.0-alpha.84

3 years ago

1.4.0-alpha.77

3 years ago

1.4.0-alpha.76

3 years ago

1.4.0-beta.2

3 years ago

1.4.0-beta.1

3 years ago

1.4.0-alpha.75

3 years ago

1.4.0-alpha.74

3 years ago

1.4.0-alpha.73

3 years ago

1.4.0-alpha.68

3 years ago

1.4.0-alpha.69

3 years ago

1.4.0-alpha.66

3 years ago

1.4.0-alpha.67

3 years ago

1.4.0-alpha.64

3 years ago

1.4.0-alpha.65

3 years ago

1.4.0-alpha.71

3 years ago

1.4.0-alpha.72

3 years ago

1.4.0-alpha.70

3 years ago

1.4.0-alpha.59

4 years ago

1.4.0-alpha.60

4 years ago

1.4.0-alpha.61

4 years ago

1.4.0-alpha.62

4 years ago

1.4.0-alpha.63

3 years ago

1.4.0-alpha.39

4 years ago

1.4.0-alpha.37

4 years ago

1.4.0-alpha.38

4 years ago

1.4.0-alpha.35

4 years ago

1.4.0-alpha.36

4 years ago

1.4.0-alpha.33

4 years ago

1.4.0-alpha.34

4 years ago

1.4.0-alpha.31

4 years ago

1.4.0-alpha.32

4 years ago

1.4.0-alpha.30

4 years ago

1.4.0-alpha.48

4 years ago

1.4.0-alpha.49

4 years ago

1.4.0-alpha.46

4 years ago

1.4.0-alpha.47

4 years ago

1.4.0-alpha.44

4 years ago

1.4.0-alpha.45

4 years ago

1.4.0-alpha.42

4 years ago

1.4.0-alpha.43

4 years ago

1.4.0-alpha.40

4 years ago

1.4.0-alpha.41

4 years ago

1.4.0-alpha.50

4 years ago

1.4.0-alpha.57

4 years ago

1.4.0-alpha.58

4 years ago

1.4.0-alpha.55

4 years ago

1.4.0-alpha.56

4 years ago

1.4.0-alpha.53

4 years ago

1.4.0-alpha.54

4 years ago

1.4.0-alpha.51

4 years ago

1.4.0-alpha.52

4 years ago

1.4.0

4 years ago

1.4.0-alpha.19

4 years ago

1.4.0-alpha.17

4 years ago

1.4.0-alpha.18

4 years ago

1.3.6

4 years ago

1.3.5

4 years ago

1.4.0-alpha.28

4 years ago

1.4.0-alpha.29

4 years ago

1.4.0-alpha.26

4 years ago

1.4.0-alpha.27

4 years ago

1.4.0-alpha.24

4 years ago

1.4.0-alpha.25

4 years ago

1.4.0-alpha.22

4 years ago

1.4.0-alpha.23

4 years ago

1.4.0-alpha.20

4 years ago

1.4.0-alpha.21

4 years ago

1.4.0-alpha.15

4 years ago

1.4.0-alpha.16

4 years ago

1.4.0-alpha.13

4 years ago

1.4.0-alpha.14

4 years ago

1.4.0-alpha.12

4 years ago

1.4.0-alpha.11

4 years ago

1.4.0-alpha.8

4 years ago

1.4.0-alpha.9

4 years ago

1.4.0-alpha.10

4 years ago

1.4.0-alpha.3

4 years ago

1.4.0-alpha.4

4 years ago

1.4.0-alpha.5

4 years ago

1.4.0-alpha.6

4 years ago

1.4.0-alpha.7

4 years ago

1.4.0-alpha.1

4 years ago

1.4.0-alpha.2

4 years ago

1.3.4

4 years ago

1.3.3

4 years ago

1.3.2

4 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.1

4 years ago

1.0.0-beta.79

4 years ago

1.0.0-beta.77

4 years ago

1.0.0-beta.78

4 years ago

1.0.0-beta.75

4 years ago

1.0.0-beta.76

4 years ago

1.0.0-beta.74

4 years ago

1.0.0-beta.73

4 years ago

1.0.0-beta.72

4 years ago

1.0.0-beta.70

4 years ago

1.0.0-beta.71

4 years ago

1.0.0-beta.69

4 years ago

1.0.0-beta.68

4 years ago

1.0.0-beta.66

4 years ago

1.0.0-beta.67

4 years ago

1.0.0-beta.65

4 years ago

1.0.0-beta.64

4 years ago

1.0.0-beta.63

4 years ago

1.0.0-beta.62

4 years ago

1.0.0-beta.61

4 years ago

1.0.0-beta.60

4 years ago

1.0.0-beta.59

4 years ago

1.0.0-beta.58

4 years ago

1.0.0-beta.57

4 years ago

1.0.0-beta.56

4 years ago

1.0.0-beta.55

4 years ago

1.0.0-beta.54

4 years ago

1.0.0-beta.53

4 years ago

1.0.0-beta.52

4 years ago

1.0.0-beta.51

4 years ago

1.0.0-beta.50

4 years ago

1.0.0-beta.49

4 years ago

1.0.0-beta.48

4 years ago

1.0.0-beta.45

4 years ago

1.0.0-beta.46

4 years ago

1.0.0-beta.47

4 years ago

1.0.0-beta.44

4 years ago

1.0.0-beta.43

4 years ago

1.0.0-beta.42

4 years ago

1.0.0-beta.40

4 years ago

1.0.0-beta.41

4 years ago

1.0.0-beta.39

4 years ago

1.0.0-beta.38

4 years ago

1.0.0-beta.37

4 years ago

1.0.0-beta.36

4 years ago

1.0.0-beta.34

4 years ago

1.0.0-beta.35

4 years ago

1.0.0-beta.33

4 years ago

1.0.0-beta.32

4 years ago

1.0.0-beta.31

4 years ago

1.0.0-beta.30

5 years ago

1.0.0-beta.29

5 years ago

1.0.0-beta.28

5 years ago

1.0.0-beta.26

5 years ago

1.0.0-beta.27

5 years ago

1.0.0-beta.24

5 years ago

1.0.0-beta.25

5 years ago

1.0.0-beta.23

5 years ago

1.0.0-beta.22

5 years ago

1.0.0-beta.20

5 years ago

1.0.0-beta.21

5 years ago

1.0.0-beta.19

5 years ago

1.0.0-beta.18

5 years ago

1.0.0-beta.17

5 years ago

1.0.0-beta.16

5 years ago

1.0.0-beta.15

5 years ago

1.0.0-beta.14

5 years ago

1.0.0-beta.13

5 years ago

1.0.0-beta.12

5 years ago

1.0.0-beta.11

5 years ago

1.0.0-beta.10

5 years ago

1.0.0-beta.9

5 years ago

1.0.0-beta.8

5 years ago

1.0.0-beta.7

5 years ago

1.0.0-beta.6

5 years ago

1.0.0-beta.4

5 years ago

1.0.0-beta.5

5 years ago

1.0.0-beta.2

5 years ago

1.0.0-beta.3

5 years ago

1.0.0-beta.1

5 years ago

1.0.0-beta.0

5 years ago

1.0.0-alpha.29

5 years ago

1.0.0-alpha.27

5 years ago

1.0.0-alpha.28

5 years ago

1.0.0-alpha.26

5 years ago

1.0.0-alpha.25

5 years ago

1.0.0-alpha.24

5 years ago

1.0.0-alpha.23

5 years ago

1.0.0-alpha.22

5 years ago

1.0.0-alpha.21

5 years ago

1.0.0-alpha.20

5 years ago

1.0.0-alpha.19

5 years ago

1.0.0-alpha.18

5 years ago

1.0.0-alpha.17

5 years ago

1.0.0-alpha.16

5 years ago

1.0.0-alpha.15

5 years ago

1.0.0-alpha.14

5 years ago

1.0.0-alpha.13

5 years ago

1.0.0-alpha.12

5 years ago

1.0.0-alpha.11

5 years ago

1.0.0-alpha.10

5 years ago

1.0.0-alpha.9

5 years ago

1.0.0-alpha.7

5 years ago

1.0.0-alpha.8

5 years ago

1.0.0-alpha.6

5 years ago

1.0.0-alpha.5

5 years ago

1.0.0-alpha.4

5 years ago

1.0.0-alpha.3

5 years ago

1.0.0

5 years ago