@aveonline/ui-react 1.10.1 → 1.11.0

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 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
+ ```
@@ -28,8 +28,9 @@ export * from './molecules/Summary';
28
28
  export * from './molecules/Field';
29
29
  export * from './molecules/Flag';
30
30
  export * from './molecules/DropdownUser';
31
- export * from './molecules/Card/Select';
32
31
  export * from './molecules/Table/Table';
32
+ export * from './molecules/Card/Select';
33
+ export * from './molecules/Filter/FilterSearchMultiple';
33
34
  export * from './organisms/Navigation';
34
35
  export * from './templates/Main';
35
36
  export * from './templates/Shipment';
@@ -0,0 +1,2 @@
1
+ import { IFilterSearchMultiple } from './IFilterSearchMultiple';
2
+ export default function FilterSearchMultiple({ options, title, titleNotFound, onSelected }: IFilterSearchMultiple): JSX.Element;
@@ -0,0 +1,10 @@
1
+ export declare type IOptionSelect = {
2
+ label: string;
3
+ value: string;
4
+ };
5
+ export interface IFilterSearchMultiple {
6
+ title: string;
7
+ titleNotFound?: string;
8
+ options: IOptionSelect[];
9
+ onSelected: (state: IOptionSelect[]) => void;
10
+ }
@@ -0,0 +1,2 @@
1
+ export { default as FilterSearchMultiple } from './FilterSearchMultiple';
2
+ export * from './IFilterSearchMultiple';
@@ -3,5 +3,5 @@ import type { IAsyncCreatableSelect } from './IAsyncCreatableSelect';
3
3
  * Molecule: AsyncCreatableSelect
4
4
  * Async select lets merchants choose one option from an options menu. Consider select when you have 4 or more options, to avoid cluttering the interface. Data from network. To allow new values
5
5
  */
6
- declare function AsyncCreatableSelect({ placeholder, id, name, error, helpText, hasLabelPlaceholder, isDisabled, isClearable, defaultValue, onChange, isLoading, loadOptions, isError, showErrorText, onBlur, value, menuIsOpen, allowCreateWhileLoading, createOptionPosition, logo, instanceId, loadingMessage, noOptionsMessage, iconTooltip }: IAsyncCreatableSelect): JSX.Element;
6
+ declare function AsyncCreatableSelect({ placeholder, id, name, error, helpText, hasLabelPlaceholder, isDisabled, isClearable, defaultValue, onChange, isLoading, loadOptions, isError, showErrorText, onBlur, value, menuIsOpen, allowCreateWhileLoading, createOptionPosition, logo, instanceId, loadingMessage, noOptionsMessage, iconTooltip, isActiveDropdownIndicator }: IAsyncCreatableSelect): JSX.Element;
7
7
  export default AsyncCreatableSelect;
@@ -3,5 +3,5 @@ import type { IAsyncSelect } from './IAsyncSelect';
3
3
  * Molecule: AsyncSelect
4
4
  * Async select lets merchants choose one option from an options menu. Consider select when you have 4 or more options, to avoid cluttering the interface. Data from network
5
5
  */
6
- declare function AsyncSelect({ placeholder, id, name, error, helpText, hasLabelPlaceholder, isDisabled, isClearable, defaultValue, onChange, isLoading, loadOptions, isError, showErrorText, onBlur, value, menuIsOpen, instanceId, loadingMessage, noOptionsMessage, logo, iconTooltip }: IAsyncSelect): JSX.Element;
6
+ declare function AsyncSelect({ placeholder, id, name, error, helpText, hasLabelPlaceholder, isDisabled, isClearable, defaultValue, onChange, isLoading, loadOptions, isError, showErrorText, onBlur, value, menuIsOpen, instanceId, loadingMessage, noOptionsMessage, logo, iconTooltip, isActiveDropdownIndicator }: IAsyncSelect): JSX.Element;
7
7
  export default AsyncSelect;
@@ -79,7 +79,11 @@ export interface ISelect {
79
79
  noOptionsMessage?: string;
80
80
  logo?: IKindLogo;
81
81
  /**
82
- * Active tooltip for icon right
82
+ * Active tooltip for icon right verify dropdown indicator - default true
83
83
  */
84
84
  iconTooltip?: ITooltipSelect;
85
+ /**
86
+ * Verify dropdown indicator - default true
87
+ */
88
+ isActiveDropdownIndicator?: boolean;
85
89
  }
@@ -1,7 +1,7 @@
1
1
  import type { ISelect } from './ISelect';
2
2
  /**
3
- * Atom: Select
3
+ * Molecule: Select
4
4
  * Select lets merchants choose one option from an options menu. Consider select when you have 4 or more options, to avoid cluttering the interface.
5
5
  */
6
- declare function Select({ options, placeholder, defaultValue, isDisabled, id, name, helpText, hasLabelPlaceholder, onChange, isSearchable, isClearable, error, isError, showErrorText, onBlur, value, instanceId, menuIsOpen, loadingMessage, noOptionsMessage, logo, iconTooltip }: ISelect): JSX.Element;
6
+ declare function Select({ options, placeholder, defaultValue, isDisabled, id, name, helpText, hasLabelPlaceholder, onChange, isSearchable, isClearable, error, isError, showErrorText, onBlur, value, instanceId, menuIsOpen, loadingMessage, noOptionsMessage, logo, iconTooltip, isActiveDropdownIndicator }: ISelect): JSX.Element;
7
7
  export default Select;
@@ -3,5 +3,5 @@ import type { ISelectButton } from './ISelectButton';
3
3
  * Molecule: SelectButton
4
4
  * Select with button for first item lets merchants choose one option from an options menu. Consider select when you have 4 or more options, to avoid cluttering the interface.
5
5
  */
6
- declare function SelectButton({ options, placeholder, defaultValue, isDisabled, id, error, name, helpText, hasLabelPlaceholder, onChange, isSearchable, isClearable, alignButton, onClickFirstItem, isError, showErrorText, onBlur, menuIsOpen, instanceId, value, loadingMessage, noOptionsMessage, logo, iconTooltip }: ISelectButton): JSX.Element;
6
+ declare function SelectButton({ options, placeholder, defaultValue, isDisabled, id, error, name, helpText, hasLabelPlaceholder, onChange, isSearchable, isClearable, alignButton, onClickFirstItem, isError, showErrorText, onBlur, menuIsOpen, instanceId, value, loadingMessage, noOptionsMessage, logo, iconTooltip, isActiveDropdownIndicator }: ISelectButton): JSX.Element;
7
7
  export default SelectButton;
@@ -1,4 +1,2 @@
1
- import { ITooltipSelect } from '../../..';
2
- export declare const Control: ({ iconTooltip, ...allProps }: {
3
- iconTooltip?: ITooltipSelect | undefined;
4
- }) => JSX.Element;
1
+ import type { ControlProps } from 'react-select';
2
+ export declare const Control: ({ children, ...props }: ControlProps) => JSX.Element;
@@ -1,3 +1,2 @@
1
- export declare const DropdownIndicator: ({ isActive, ...allProps }: {
2
- isActive: boolean;
3
- }) => JSX.Element;
1
+ import type { DropdownIndicatorProps } from 'react-select';
2
+ export declare const DropdownIndicator: (props: DropdownIndicatorProps) => JSX.Element;
@@ -1,3 +1,2 @@
1
- export declare const SingleValue: ({ hasLabelPlaceholder, ...allProps }: {
2
- hasLabelPlaceholder?: boolean | undefined;
3
- }) => JSX.Element;
1
+ import { SingleValueProps } from 'react-select';
2
+ export declare const SingleValue: (props: SingleValueProps) => JSX.Element;
package/dist/index.d.ts CHANGED
@@ -30,6 +30,7 @@ export * from './components/molecules/Flag';
30
30
  export * from './components/molecules/DropdownUser';
31
31
  export * from './components/molecules/Table/Table';
32
32
  export * from './components/molecules/Card/Select';
33
+ export * from './components/molecules/Filter/FilterSearchMultiple';
33
34
  export * from './components/organisms/Navigation';
34
35
  export * from './components/templates/Main';
35
36
  export * from './components/templates/Shipment';