@aveonline/ui-react 1.15.1 → 1.15.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +126 -126
- package/dist/components/atoms/Avatar/Avatar.d.ts +2 -2
- package/dist/components/atoms/Avatar/IAvatar.d.ts +5 -2
- package/dist/components/molecules/DropdownUser/DropdownUser.d.ts +1 -1
- package/dist/components/molecules/DropdownUser/IDropdownUser.d.ts +6 -1
- package/dist/components/molecules/Selectable/select.d.ts +27 -0
- package/dist/reset.css +273 -273
- package/dist/tailwind.config.js +242 -242
- package/dist/tailwind.css +1 -1
- package/dist/tokens.css +160 -160
- package/dist/ui-react.mjs +1639 -1630
- package/dist/ui-react.umd.js +24 -24
- package/dist/vite-env.d.ts +2 -2
- package/package.json +108 -108
package/README.md
CHANGED
|
@@ -1,126 +1,126 @@
|
|
|
1
|
-
<div align="center">
|
|
2
|
-
<img height="100" src="https://user-images.githubusercontent.com/38017835/197309416-fd4390a0-cfb6-41f3-ac26-10d067d92a25.png">
|
|
3
|
-
<h1 align="center">ui ecosystem react</h1>
|
|
4
|
-
<p>The home base for Aveonline design system, ui-react provides essential design resources for our developers to use in the Aveonline-branded interfaces that they create.</p>
|
|
5
|
-
<a href="https://ui-aveonline.netlify.app/">Go Storybook</a>
|
|
6
|
-
</div>
|
|
7
|
-
|
|
8
|
-
## Before started
|
|
9
|
-
|
|
10
|
-
For usage with tailwind config, install:
|
|
11
|
-
|
|
12
|
-
```shell
|
|
13
|
-
npm i @tailwindcss/forms -D
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
## Getting started
|
|
17
|
-
|
|
18
|
-
Working with all config from this library or only components availables
|
|
19
|
-
|
|
20
|
-
```shell
|
|
21
|
-
npm i @aveonline/ui-react
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## Usage with tailwind
|
|
25
|
-
|
|
26
|
-
Import things into your JS app from the `@aveonline/ui-react` package.
|
|
27
|
-
|
|
28
|
-
```ts
|
|
29
|
-
import { Button } from '@aveonline/ui-react'
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
`tailwind.config.js`
|
|
33
|
-
|
|
34
|
-
```ts
|
|
35
|
-
/** @type {import('tailwindcss').Config} */
|
|
36
|
-
|
|
37
|
-
const tailwindConfig = require('@aveonline/ui-react/tailwind.config.js')
|
|
38
|
-
const { content, ...all } = tailwindConfig
|
|
39
|
-
|
|
40
|
-
const config = {
|
|
41
|
-
content: [
|
|
42
|
-
...content,
|
|
43
|
-
'./pages/**/*.{ts,tsx}',
|
|
44
|
-
'./components/**/*.{ts,tsx}',
|
|
45
|
-
'./node_modules/@aveonline/ui-react/dist/*.{mjs,js}'
|
|
46
|
-
],
|
|
47
|
-
...all
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
module.exports = config
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
## Usage css
|
|
54
|
-
|
|
55
|
-
Import things into your JS app from the `@aveonline/ui-react` package.
|
|
56
|
-
|
|
57
|
-
```css
|
|
58
|
-
/* global.css or tailwind.css local */
|
|
59
|
-
@tailwind base;
|
|
60
|
-
@tailwind components;
|
|
61
|
-
@tailwind utilities;
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
```ts
|
|
65
|
-
// import this lines at main.ts or root
|
|
66
|
-
import './global.css' // Reference tailwind local
|
|
67
|
-
import '@aveonline/ui-react/reset.css' // Only not usage tailwind
|
|
68
|
-
import '@aveonline/ui-react/tokens.css' // Required
|
|
69
|
-
import '@aveonline/ui-react/tailwind.css' // Required
|
|
70
|
-
import '@aveonline/ui-react/index.css' // Required
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
## Example usage
|
|
74
|
-
|
|
75
|
-
```html
|
|
76
|
-
<!-- Class from library -->
|
|
77
|
-
<div class="bg-letter-default">
|
|
78
|
-
<p class="text-letter-subdued">Hello human</p>
|
|
79
|
-
</div>
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
## Developing @aveonline/ui-react
|
|
83
|
-
|
|
84
|
-
Developing locally against Storybook is easy; run `npm run storybook`.
|
|
85
|
-
|
|
86
|
-
```shell
|
|
87
|
-
npm i
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
Tests
|
|
91
|
-
|
|
92
|
-
Run `npm run test` to execute all unit test components.
|
|
93
|
-
|
|
94
|
-
We use `vitest` and `testing-library/react` for unit/integration tests and [Chromatic](https://www.chromaticqa.com/) for visual regression testing.
|
|
95
|
-
|
|
96
|
-
Open Storybook
|
|
97
|
-
|
|
98
|
-
```shell
|
|
99
|
-
npm run dev
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
ui-react production
|
|
103
|
-
|
|
104
|
-
```shell
|
|
105
|
-
npm run build
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
Storybook production
|
|
109
|
-
|
|
110
|
-
```shell
|
|
111
|
-
npm run build:storybook
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
Run test
|
|
115
|
-
|
|
116
|
-
```shell
|
|
117
|
-
npm run test
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
Run regression testing
|
|
121
|
-
|
|
122
|
-
- [Join](https://www.chromatic.com/library?appId=6362f0c0f36774d17ed0c3a0&inviteToken=4adce6358a9b439f8b636d0599e6db4b)
|
|
123
|
-
|
|
124
|
-
```shell
|
|
125
|
-
npm run chromatic
|
|
126
|
-
```
|
|
1
|
+
<div align="center">
|
|
2
|
+
<img height="100" src="https://user-images.githubusercontent.com/38017835/197309416-fd4390a0-cfb6-41f3-ac26-10d067d92a25.png">
|
|
3
|
+
<h1 align="center">ui ecosystem react</h1>
|
|
4
|
+
<p>The home base for Aveonline design system, ui-react provides essential design resources for our developers to use in the Aveonline-branded interfaces that they create.</p>
|
|
5
|
+
<a href="https://ui-aveonline.netlify.app/">Go Storybook</a>
|
|
6
|
+
</div>
|
|
7
|
+
|
|
8
|
+
## Before started
|
|
9
|
+
|
|
10
|
+
For usage with tailwind config, install:
|
|
11
|
+
|
|
12
|
+
```shell
|
|
13
|
+
npm i @tailwindcss/forms -D
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Getting started
|
|
17
|
+
|
|
18
|
+
Working with all config from this library or only components availables
|
|
19
|
+
|
|
20
|
+
```shell
|
|
21
|
+
npm i @aveonline/ui-react
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Usage with tailwind
|
|
25
|
+
|
|
26
|
+
Import things into your JS app from the `@aveonline/ui-react` package.
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
import { Button } from '@aveonline/ui-react'
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
`tailwind.config.js`
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
/** @type {import('tailwindcss').Config} */
|
|
36
|
+
|
|
37
|
+
const tailwindConfig = require('@aveonline/ui-react/tailwind.config.js')
|
|
38
|
+
const { content, ...all } = tailwindConfig
|
|
39
|
+
|
|
40
|
+
const config = {
|
|
41
|
+
content: [
|
|
42
|
+
...content,
|
|
43
|
+
'./pages/**/*.{ts,tsx}',
|
|
44
|
+
'./components/**/*.{ts,tsx}',
|
|
45
|
+
'./node_modules/@aveonline/ui-react/dist/*.{mjs,js}'
|
|
46
|
+
],
|
|
47
|
+
...all
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
module.exports = config
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Usage css
|
|
54
|
+
|
|
55
|
+
Import things into your JS app from the `@aveonline/ui-react` package.
|
|
56
|
+
|
|
57
|
+
```css
|
|
58
|
+
/* global.css or tailwind.css local */
|
|
59
|
+
@tailwind base;
|
|
60
|
+
@tailwind components;
|
|
61
|
+
@tailwind utilities;
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
```ts
|
|
65
|
+
// import this lines at main.ts or root
|
|
66
|
+
import './global.css' // Reference tailwind local
|
|
67
|
+
import '@aveonline/ui-react/reset.css' // Only not usage tailwind
|
|
68
|
+
import '@aveonline/ui-react/tokens.css' // Required
|
|
69
|
+
import '@aveonline/ui-react/tailwind.css' // Required
|
|
70
|
+
import '@aveonline/ui-react/index.css' // Required
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Example usage
|
|
74
|
+
|
|
75
|
+
```html
|
|
76
|
+
<!-- Class from library -->
|
|
77
|
+
<div class="bg-letter-default">
|
|
78
|
+
<p class="text-letter-subdued">Hello human</p>
|
|
79
|
+
</div>
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Developing @aveonline/ui-react
|
|
83
|
+
|
|
84
|
+
Developing locally against Storybook is easy; run `npm run storybook`.
|
|
85
|
+
|
|
86
|
+
```shell
|
|
87
|
+
npm i
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Tests
|
|
91
|
+
|
|
92
|
+
Run `npm run test` to execute all unit test components.
|
|
93
|
+
|
|
94
|
+
We use `vitest` and `testing-library/react` for unit/integration tests and [Chromatic](https://www.chromaticqa.com/) for visual regression testing.
|
|
95
|
+
|
|
96
|
+
Open Storybook
|
|
97
|
+
|
|
98
|
+
```shell
|
|
99
|
+
npm run dev
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
ui-react production
|
|
103
|
+
|
|
104
|
+
```shell
|
|
105
|
+
npm run build
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Storybook production
|
|
109
|
+
|
|
110
|
+
```shell
|
|
111
|
+
npm run build:storybook
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Run test
|
|
115
|
+
|
|
116
|
+
```shell
|
|
117
|
+
npm run test
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Run regression testing
|
|
121
|
+
|
|
122
|
+
- [Join](https://www.chromatic.com/library?appId=6362f0c0f36774d17ed0c3a0&inviteToken=4adce6358a9b439f8b636d0599e6db4b)
|
|
123
|
+
|
|
124
|
+
```shell
|
|
125
|
+
npm run chromatic
|
|
126
|
+
```
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IAvatar } from './IAvatar';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Atom: Avatar
|
|
4
4
|
* Are used to show a thumbnail representation of an individual or business in the interface
|
|
5
5
|
*/
|
|
6
|
-
declare function Avatar({ size, isActive,
|
|
6
|
+
declare function Avatar({ size, isActive, imageUrl, className }: IAvatar): JSX.Element;
|
|
7
7
|
export default Avatar;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
export declare type ISizeAvatar = 'sm' | 'xs' | 'md' | 'lg' | 'custom';
|
|
1
2
|
export interface IAvatar {
|
|
2
3
|
/**
|
|
3
4
|
* Adjust size
|
|
4
5
|
*/
|
|
5
|
-
size:
|
|
6
|
-
|
|
6
|
+
size: ISizeAvatar;
|
|
7
|
+
imageUrl?: string;
|
|
7
8
|
isActive?: boolean;
|
|
9
|
+
/** className only working with size = custom and imageUrl */
|
|
10
|
+
className?: string;
|
|
8
11
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { IDropdownUser } from './IDropdownUser';
|
|
2
|
-
declare function DropdownUser({ name, email, items, footer,
|
|
2
|
+
declare function DropdownUser({ name, email, items, footer, avatar }: IDropdownUser): JSX.Element;
|
|
3
3
|
export default DropdownUser;
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
+
import { ISizeAvatar } from '../../atoms/Avatar';
|
|
1
2
|
declare type ItemDropdownUser = {
|
|
2
3
|
title: string;
|
|
3
4
|
onClick: () => void;
|
|
4
5
|
};
|
|
5
6
|
interface IDropdownUser {
|
|
6
7
|
name: string;
|
|
7
|
-
|
|
8
|
+
avatar?: {
|
|
9
|
+
imageUrl?: string;
|
|
10
|
+
sizeMain?: ISizeAvatar;
|
|
11
|
+
sizeSecondary?: ISizeAvatar;
|
|
12
|
+
};
|
|
8
13
|
email: string;
|
|
9
14
|
items?: ItemDropdownUser[];
|
|
10
15
|
footer?: {
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { GroupBase } from 'react-select'
|
|
2
|
+
import { IOptionSelectButton, ITooltipSelect } from '../..'
|
|
3
|
+
|
|
4
|
+
declare module 'react-select/dist/declarations/src/Select' {
|
|
5
|
+
export interface Props<
|
|
6
|
+
Option,
|
|
7
|
+
IsMulti extends boolean,
|
|
8
|
+
Group extends GroupBase<Option>
|
|
9
|
+
> {
|
|
10
|
+
/**
|
|
11
|
+
* Our prop for control icon tooltip inside component atom Control
|
|
12
|
+
*/
|
|
13
|
+
iconTooltip?: ITooltipSelect
|
|
14
|
+
/**
|
|
15
|
+
* Our prop for control click first element - SelectButton
|
|
16
|
+
*/
|
|
17
|
+
addButton?: ((value: IOptionSelectButton) => void) | undefined
|
|
18
|
+
/**
|
|
19
|
+
* Our prop for verify inside atom SingleValue show ui
|
|
20
|
+
*/
|
|
21
|
+
hasLabelPlaceholder?: boolean
|
|
22
|
+
/**
|
|
23
|
+
* Our prop for verify dropdown indicator - default true
|
|
24
|
+
*/
|
|
25
|
+
isActiveDropdownIndicator?: boolean
|
|
26
|
+
}
|
|
27
|
+
}
|