@aveonline/ui-react 0.0.2-alpha.0 → 1.0.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 +18 -3
- package/dist/assets/index.91a8dfaf.css +1 -0
- package/dist/components/atoms/Avatar/IAvatar.d.ts +3 -0
- package/dist/components/atoms/Avatar/index.d.ts +1 -0
- package/dist/components/atoms/Badge/IBadge.d.ts +5 -0
- package/dist/components/atoms/Badge/index.d.ts +1 -0
- package/dist/components/atoms/Button/IButton.d.ts +20 -0
- package/dist/components/atoms/Button/index.d.ts +2 -0
- package/dist/components/atoms/Button/useCSS.d.ts +4 -0
- package/dist/components/atoms/Heading/IHeading.d.ts +5 -0
- package/dist/components/atoms/Heading/index.d.ts +2 -0
- package/dist/components/atoms/Heading/useCSS.d.ts +4 -0
- package/dist/components/atoms/Icon/IIcon.d.ts +12 -0
- package/dist/components/atoms/Icon/index.d.ts +2 -0
- package/dist/components/atoms/RadioButton/IRadioButton.d.ts +16 -0
- package/dist/components/atoms/RadioButton/index.d.ts +1 -0
- package/dist/components/atoms/Switch/ISwitch.d.ts +7 -0
- package/dist/components/atoms/Switch/index.d.ts +1 -0
- package/dist/components/atoms/Text/IText.d.ts +6 -0
- package/dist/components/atoms/Text/index.d.ts +2 -0
- package/dist/components/atoms/Text/useCSS.d.ts +4 -0
- package/dist/components/atoms/Tooltip/ITooltip.d.ts +10 -0
- package/dist/components/atoms/Tooltip/index.d.ts +2 -0
- package/dist/components/atoms/Tracker/ITracker.d.ts +8 -0
- package/dist/components/atoms/Tracker/index.d.ts +1 -0
- package/dist/components/index.d.ts +26 -2
- package/dist/components/molecules/Card/Select/ISelect.d.ts +17 -0
- package/dist/components/molecules/Card/Select/index.d.ts +1 -0
- package/dist/components/molecules/Dropdown/IDropdown.d.ts +14 -0
- package/dist/components/molecules/Dropdown/index.d.ts +1 -0
- package/dist/components/molecules/EmptyState/IEmptyState.d.ts +7 -0
- package/dist/components/molecules/EmptyState/index.d.ts +1 -0
- package/dist/components/molecules/Header/IHeader.d.ts +6 -0
- package/dist/components/molecules/Header/index.d.ts +1 -0
- package/dist/components/molecules/InlineError/IInlineError.d.ts +7 -0
- package/dist/components/molecules/InlineError/index.d.ts +1 -0
- package/dist/components/molecules/Modal/IModal.d.ts +12 -0
- package/dist/components/molecules/Modal/index.d.ts +1 -0
- package/dist/components/molecules/Selectable/AsyncSelect/IAsyncSelect.d.ts +4 -0
- package/dist/components/molecules/Selectable/AsyncSelect/index.d.ts +1 -0
- package/dist/components/molecules/Selectable/Select/ISelect.d.ts +18 -0
- package/dist/components/molecules/Selectable/Select/index.d.ts +2 -0
- package/dist/components/molecules/Selectable/SelectButton/ISelectButton.d.ts +16 -0
- package/dist/components/molecules/Selectable/SelectButton/index.d.ts +1 -0
- package/dist/components/molecules/Selectable/SelectCountry/index.d.ts +1 -0
- package/dist/components/molecules/Selectable/atoms/index.d.ts +6 -0
- package/dist/components/molecules/Selectable/hooks/index.d.ts +1 -0
- package/dist/components/molecules/Selectable/hooks/useCSS.d.ts +5 -0
- package/dist/components/molecules/Summary/index.d.ts +1 -0
- package/dist/components/molecules/Tab/ITab.d.ts +13 -0
- package/dist/components/molecules/Tab/index.d.ts +2 -0
- package/dist/components/molecules/TabNav/ITabNav.d.ts +10 -0
- package/dist/components/molecules/TabNav/index.d.ts +1 -0
- package/dist/components/organisms/Navigation/INavigation.d.ts +8 -0
- package/dist/components/organisms/Navigation/index.d.ts +1 -0
- package/dist/components/templates/Main/index.d.ts +1 -0
- package/dist/components/templates/Shipment/index.d.ts +1 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useTokens.d.ts +10 -0
- package/dist/index.d.ts +2 -3
- package/dist/postcss.config.js +4 -5
- package/dist/tailwind.config.js +206 -192
- package/dist/tailwind.css +1 -1
- package/dist/tokens.css +76 -67
- package/dist/types/Template.d.ts +5 -0
- package/dist/types/Tokens.d.ts +26 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/ui-react.mjs +9861 -407
- package/dist/ui-react.umd.js +48 -11
- package/package.json +34 -10
- package/dist/assets/index.53932362.css +0 -1
- package/dist/components/index.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
<img height="100" src="https://user-images.githubusercontent.com/38017835/197309416-fd4390a0-cfb6-41f3-ac26-10d067d92a25.png">
|
|
3
3
|
<h1 align="center">ui ecosystem react</h1>
|
|
4
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.vercel.app/">Go Storybook</a>
|
|
5
6
|
</div>
|
|
6
7
|
|
|
7
8
|
## Before started
|
|
@@ -9,7 +10,7 @@
|
|
|
9
10
|
For usage with tailwind config, install:
|
|
10
11
|
|
|
11
12
|
```shell
|
|
12
|
-
npm i
|
|
13
|
+
npm i
|
|
13
14
|
```
|
|
14
15
|
|
|
15
16
|
## Getting started
|
|
@@ -25,7 +26,7 @@ npm i @aveonline/ui-react
|
|
|
25
26
|
Import things into your JS app from the `@aveonline/ui-react` package.
|
|
26
27
|
|
|
27
28
|
```ts
|
|
28
|
-
import {
|
|
29
|
+
import { Button } from '@aveonline/ui-react'
|
|
29
30
|
```
|
|
30
31
|
|
|
31
32
|
`tailwind.config.js`
|
|
@@ -92,7 +93,7 @@ Tests
|
|
|
92
93
|
|
|
93
94
|
Run `npm run test` to execute all unit test components.
|
|
94
95
|
|
|
95
|
-
We use `vitest` and `testing-library/react` for unit/integration tests and
|
|
96
|
+
We use `vitest` and `testing-library/react` for unit/integration tests and [Chromatic](https://www.chromaticqa.com/) for visual regression testing.
|
|
96
97
|
|
|
97
98
|
Open Storybook
|
|
98
99
|
|
|
@@ -111,3 +112,17 @@ Storybook production
|
|
|
111
112
|
```shell
|
|
112
113
|
npm run build:storybook
|
|
113
114
|
```
|
|
115
|
+
|
|
116
|
+
Run test
|
|
117
|
+
|
|
118
|
+
```shell
|
|
119
|
+
npm run test
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Run regression testing
|
|
123
|
+
|
|
124
|
+
- [Join](https://www.chromatic.com/library?appId=6362f0c0f36774d17ed0c3a0&inviteToken=4adce6358a9b439f8b636d0599e6db4b)
|
|
125
|
+
|
|
126
|
+
```shell
|
|
127
|
+
npm run chromatic
|
|
128
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[type=radio]:checked{background-image:url("data:image/svg+xml;utf8,%3Csvg%20viewBox%3D'0%200%2016%2016'%20fill%3D'%232C6ECB'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%3E%3Ccircle%20cx%3D'8'%20cy%3D'8'%20r%3D'4'%2F%3E%3C%2Fsvg%3E")}[type=radio]:checked:disabled{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='8' cy='8' r='3'/%3E%3C/svg%3E")}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Avatar } from './Avatar';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Badge } from './Badge';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ReactNode, MouseEventHandler } from 'react';
|
|
2
|
+
export declare type Variant = 'primary' | 'basic' | 'destructive' | 'plain' | 'plain-monochrome' | 'plain-destructive';
|
|
3
|
+
declare type Size = 'md' | 'sm';
|
|
4
|
+
export declare type Align = 'start' | 'center' | 'end';
|
|
5
|
+
interface IButton {
|
|
6
|
+
variant?: Variant;
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
size?: Size;
|
|
9
|
+
fullWidth?: boolean;
|
|
10
|
+
isLoading?: boolean;
|
|
11
|
+
isDisabled?: boolean;
|
|
12
|
+
align?: Align;
|
|
13
|
+
onlyOneIcon?: boolean;
|
|
14
|
+
onClick?: MouseEventHandler<HTMLButtonElement | HTMLDivElement> | (() => void);
|
|
15
|
+
}
|
|
16
|
+
interface ILoading {
|
|
17
|
+
variant?: Variant;
|
|
18
|
+
size?: Size;
|
|
19
|
+
}
|
|
20
|
+
export type { IButton, ILoading };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IColorText, IWeight, ILineHeightHeading, IFontSizeHeading, IClassName, IChildren } from '../../../types';
|
|
2
|
+
export interface IHeading extends IChildren, IClassName, IWeight, ILineHeightHeading, IColorText, IFontSizeHeading {
|
|
3
|
+
variant?: 'subheading' | 'heading' | 'sm' | 'md' | 'lg' | 'xl';
|
|
4
|
+
as?: Extract<keyof JSX.IntrinsicElements, 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'>;
|
|
5
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare type ISize = 'sm' | 'md' | 'lg';
|
|
2
|
+
export declare type IColor = 'success' | 'warning' | 'disabled' | 'active' | 'hovered' | 'subdued' | 'default' | 'critical' | 'primary';
|
|
3
|
+
export declare type IKind = 'shipping' | 'home' | 'menu' | 'notifications' | 'novelty' | 'help' | 'see-more' | 'info' | 'alert' | 'eye' | 'date' | 'search' | 'delete' | 'more-less' | 'down' | 'up' | 'back' | 'front' | 'major-minor' | 'minor-major' | 'create' | 'success' | 'error' | 'more' | 'less' | undefined;
|
|
4
|
+
interface IconProps {
|
|
5
|
+
size?: ISize;
|
|
6
|
+
color?: IColor;
|
|
7
|
+
kind?: IKind;
|
|
8
|
+
cursor?: 'pointer' | 'default';
|
|
9
|
+
onClick?: () => void;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export type { IconProps };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare type Change = {
|
|
2
|
+
value: string | number;
|
|
3
|
+
checked: boolean;
|
|
4
|
+
};
|
|
5
|
+
declare type IPropsRadio = {
|
|
6
|
+
id?: string;
|
|
7
|
+
name?: string;
|
|
8
|
+
isDisabled?: boolean;
|
|
9
|
+
value?: string | number;
|
|
10
|
+
defaultChecked?: boolean;
|
|
11
|
+
label?: string;
|
|
12
|
+
helpText?: string;
|
|
13
|
+
onChange?: (value: Change) => void;
|
|
14
|
+
[rest: string]: any;
|
|
15
|
+
};
|
|
16
|
+
export type { IPropsRadio };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as RadioButton } from './RadioButton';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Switch } from './Switch';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IColorText, IWeight, ILineHeightText, IFontSizeText, IChildren, IClassName } from '../../../types';
|
|
2
|
+
export interface IText extends IColorText, IWeight, ILineHeightText, IFontSizeText, IChildren, IClassName {
|
|
3
|
+
variant?: 'button' | 'body' | 'highlight' | 'caption';
|
|
4
|
+
as?: Extract<keyof JSX.IntrinsicElements, 'span' | 'p' | 'label'>;
|
|
5
|
+
[rest: string]: any;
|
|
6
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IChildren } from '../../../types';
|
|
2
|
+
import type { Placement } from '@floating-ui/react-dom-interactions';
|
|
3
|
+
import { useTooltip } from './useTooltip';
|
|
4
|
+
export declare type TooltipState = ReturnType<typeof useTooltip>;
|
|
5
|
+
export declare type ITooltipProps = {
|
|
6
|
+
placement?: Placement;
|
|
7
|
+
title?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
initialOpen?: boolean;
|
|
10
|
+
} & IChildren;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Tracker } from './Tracker';
|
|
@@ -1,2 +1,26 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
1
|
+
export * from './atoms/Button';
|
|
2
|
+
export * from './atoms/Avatar';
|
|
3
|
+
export * from './atoms/Heading';
|
|
4
|
+
export * from './atoms/Text';
|
|
5
|
+
export * from './atoms/Badge';
|
|
6
|
+
export * from './atoms/Switch';
|
|
7
|
+
export * from './atoms/Icon';
|
|
8
|
+
export * from './atoms/Tooltip';
|
|
9
|
+
export * from './atoms/RadioButton';
|
|
10
|
+
export * from './atoms/Tracker';
|
|
11
|
+
export * from './molecules/Selectable/Select';
|
|
12
|
+
export * from './molecules/Selectable/AsyncSelect';
|
|
13
|
+
export * from './molecules/Selectable/SelectButton';
|
|
14
|
+
export * from './molecules/Selectable/SelectCountry';
|
|
15
|
+
export * from './molecules/Tab';
|
|
16
|
+
export * from './molecules/InlineError';
|
|
17
|
+
export * from './molecules/Modal';
|
|
18
|
+
export * from './molecules/Dropdown';
|
|
19
|
+
export * from './molecules/EmptyState';
|
|
20
|
+
export * from './molecules/TabNav';
|
|
21
|
+
export * from './molecules/Header';
|
|
22
|
+
export * from './molecules/Summary';
|
|
23
|
+
export * from './molecules/Card/Select';
|
|
24
|
+
export * from './organisms/Navigation';
|
|
25
|
+
export * from './templates/Main';
|
|
26
|
+
export * from './templates/Shipment';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
interface ICardSelect {
|
|
2
|
+
id: string;
|
|
3
|
+
title: string;
|
|
4
|
+
subtitle?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
state?: string;
|
|
7
|
+
img?: JSX.Element;
|
|
8
|
+
hasRadio?: boolean;
|
|
9
|
+
isDisabled?: boolean;
|
|
10
|
+
error?: string;
|
|
11
|
+
}
|
|
12
|
+
declare type IPropsCardSelect = {
|
|
13
|
+
items: ICardSelect[];
|
|
14
|
+
checkedItem: ICardSelect | undefined;
|
|
15
|
+
onChange: (value: ICardSelect) => void;
|
|
16
|
+
};
|
|
17
|
+
export type { IPropsCardSelect, ICardSelect };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CardSelect } from './Select';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IChildren } from '../../../types';
|
|
2
|
+
declare type IElement = string | JSX.Element;
|
|
3
|
+
declare type IContent = {
|
|
4
|
+
label: IElement;
|
|
5
|
+
value: IElement;
|
|
6
|
+
};
|
|
7
|
+
interface IPropsDropdown extends IChildren {
|
|
8
|
+
title?: IElement;
|
|
9
|
+
subtitle?: IElement[];
|
|
10
|
+
content?: IContent[];
|
|
11
|
+
defaultOpen?: boolean;
|
|
12
|
+
isDisabled?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export type { IPropsDropdown, IElement, IContent };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Dropdown } from './Dropdown';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as EmptyState } from './EmptyState';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Header } from './Header';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as InlineError } from './InlineError';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IChildren } from '../../../types';
|
|
2
|
+
interface IPropsModal extends IChildren {
|
|
3
|
+
isOpen?: boolean;
|
|
4
|
+
title?: string;
|
|
5
|
+
iconTitle?: JSX.Element;
|
|
6
|
+
subtitle?: string;
|
|
7
|
+
footer?: JSX.Element;
|
|
8
|
+
hasBorder?: Array<'top' | 'bottom'>;
|
|
9
|
+
showClose?: boolean;
|
|
10
|
+
onClose?: (value: boolean) => void;
|
|
11
|
+
}
|
|
12
|
+
export type { IPropsModal };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Modal } from './Modal';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as AsyncSelect } from './AsyncSelect';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare type IOption = {
|
|
2
|
+
label: string | number;
|
|
3
|
+
value: string | number;
|
|
4
|
+
};
|
|
5
|
+
export interface ISelect {
|
|
6
|
+
options?: IOption[];
|
|
7
|
+
isDisabled?: boolean;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
defaultValue?: IOption;
|
|
10
|
+
error?: string;
|
|
11
|
+
id?: string;
|
|
12
|
+
name?: string;
|
|
13
|
+
onChange?: (value: IOption) => void;
|
|
14
|
+
helpText?: string;
|
|
15
|
+
hasLabelPlaceholder?: boolean;
|
|
16
|
+
isSearchable?: boolean;
|
|
17
|
+
isClearable?: boolean;
|
|
18
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ISelect, IOption } from '../Select';
|
|
2
|
+
import type { IKind } from '../../../atoms/Icon';
|
|
3
|
+
import type { Align } from '../../../atoms/Button';
|
|
4
|
+
export interface IOptionSelectButton extends IOption {
|
|
5
|
+
notSelect?: boolean;
|
|
6
|
+
icon?: IKind;
|
|
7
|
+
}
|
|
8
|
+
export interface IOptionSelectButtonGroup {
|
|
9
|
+
label: string;
|
|
10
|
+
options: IOption[];
|
|
11
|
+
}
|
|
12
|
+
export interface ISelectButton extends Omit<ISelect, 'options'> {
|
|
13
|
+
options: IOptionSelectButton[] | IOptionSelectButtonGroup[];
|
|
14
|
+
onClickFirstItem?: (value: IOptionSelectButton) => void;
|
|
15
|
+
alignButton?: Align;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as SelectButton } from './SelectButton';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as SelectCountry } from './SelectCountry';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useCSS';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Summary } from './Summary';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface ITab {
|
|
2
|
+
children?: string | number | JSX.Element;
|
|
3
|
+
isDisabled?: boolean;
|
|
4
|
+
total?: number;
|
|
5
|
+
}
|
|
6
|
+
export declare type IState = {
|
|
7
|
+
selected: boolean;
|
|
8
|
+
isDisabled: boolean | undefined;
|
|
9
|
+
};
|
|
10
|
+
export interface ITabs {
|
|
11
|
+
tabs: Record<string, ITab>;
|
|
12
|
+
variant?: 'default' | 'fitted';
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as TabNav } from './TabNav';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Navigation } from './Navigation';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Main } from './Main';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Shipment } from './Shipment';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useTokens';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IHeading, IText } from '../components';
|
|
2
|
+
declare type Response = {
|
|
3
|
+
getWeight: () => string;
|
|
4
|
+
getFontSize: () => string;
|
|
5
|
+
getLineHeight: () => string;
|
|
6
|
+
getColorText: () => string;
|
|
7
|
+
getClassName: () => string;
|
|
8
|
+
};
|
|
9
|
+
export declare function useTokens(props: IHeading | IText): Response;
|
|
10
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { Button } from './components';
|
|
2
|
-
export { Button };
|
|
3
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
import { Button, Avatar, Heading, Text, Badge, Switch, Tab, InlineError, Icon, Select, AsyncSelect, SelectButton, SelectCountry, CardSelect, Dropdown, EmptyState, TabNav, RadioButton, Tracker, Modal, Tooltip, Navigation } from './components';
|
|
2
|
+
export { Button, Avatar, Heading, Text, Badge, Switch, Tab, InlineError, Icon, Select, AsyncSelect, SelectButton, SelectCountry, CardSelect, Dropdown, EmptyState, TabNav, RadioButton, Tracker, Modal, Tooltip, Navigation };
|
package/dist/postcss.config.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/* eslint-env es6 */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
|
|
4
1
|
const cssnano = require('cssnano')
|
|
5
2
|
const tailwindcss = require('tailwindcss')
|
|
6
3
|
|
|
@@ -9,6 +6,8 @@ module.exports = {
|
|
|
9
6
|
require('postcss-import'),
|
|
10
7
|
tailwindcss('./tailwind.config.js'),
|
|
11
8
|
process.env.NODE_ENV === 'production' ? require('autoprefixer') : null,
|
|
12
|
-
process.env.NODE_ENV === 'production'
|
|
13
|
-
|
|
9
|
+
process.env.NODE_ENV === 'production'
|
|
10
|
+
? cssnano({ preset: 'default' })
|
|
11
|
+
: null
|
|
12
|
+
]
|
|
14
13
|
}
|