@lunit/oui 1.0.0-alpha.9 → 1.0.1-alpha.1
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/dist/components/Alert/Alert.js +1 -1
- package/dist/components/Alert/Alert.utils.js +1 -1
- package/dist/components/Chip/Chip.js +1 -1
- package/dist/components/Chip/Chip.utils.js +1 -1
- package/dist/components/DatePicker/DatePicker.js +1 -1
- package/dist/components/Dialog/Dialog.js +1 -1
- package/dist/components/Dropdown/Dropdown.js +1 -1
- package/dist/components/Dropdown/DropdownItem.js +1 -1
- package/dist/components/Dropdown/IconDropdown.js +1 -1
- package/dist/components/List/List.js +1 -1
- package/dist/components/List/ListItem.styled.js +1 -1
- package/dist/components/Pagination/Pagination.js +65 -0
- package/dist/components/Pagination/Pagination.styled.js +64 -0
- package/dist/components/Pagination/Pagination.types.js +2 -0
- package/dist/components/Pagination/index.js +2 -0
- package/dist/components/ProductLabel/ProductLabel.js +1 -1
- package/dist/components/TextField/components/Buttons.js +1 -1
- package/dist/components/UploadManager/UploadManager.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/foundations/index.js +1 -0
- package/dist/foundations/palette.js +4 -0
- package/dist/foundations/styles.js +7 -0
- package/dist/icons/BellNoti/index.js +14 -0
- package/dist/icons/CloseLarge/index.js +14 -0
- package/dist/icons/CloseSmall/index.js +14 -0
- package/dist/{components/Icons → icons}/DownloadPdf/index.js +4 -4
- package/dist/icons/Ellipse/index.js +14 -0
- package/dist/icons/FilterNoti/index.js +14 -0
- package/dist/icons/HideLarge/index.js +14 -0
- package/dist/icons/HideSmall/index.js +14 -0
- package/dist/{components/Icons → icons}/InformationLarge/index.js +4 -4
- package/dist/{components/Icons → icons}/InformationSmall/index.js +4 -4
- package/dist/{components/Icons → icons}/Manufacturer/index.js +4 -4
- package/dist/icons/Rectangle/index.js +14 -0
- package/dist/{components/Icons → icons}/RefreshLeft/index.js +4 -4
- package/dist/{components/Icons → icons}/RefreshRight/index.js +4 -4
- package/dist/icons/ShowLarge/index.js +14 -0
- package/dist/icons/ShowSmall/index.js +14 -0
- package/dist/types/components/Pagination/Pagination.d.ts +3 -0
- package/dist/types/components/Pagination/Pagination.styled.d.ts +24 -0
- package/dist/types/components/Pagination/Pagination.types.d.ts +35 -0
- package/dist/types/components/Pagination/index.d.ts +2 -0
- package/dist/types/components/index.d.ts +1 -1
- package/dist/types/foundations/index.d.ts +1 -0
- package/dist/types/foundations/palette.d.ts +8 -1
- package/dist/types/foundations/styles.d.ts +2 -0
- package/dist/types/{components/Icons → icons}/BellNoti/index.d.ts +2 -2
- package/dist/types/{components/Icons → icons}/CloseLarge/index.d.ts +2 -2
- package/dist/types/{components/Icons → icons}/CloseSmall/index.d.ts +2 -2
- package/dist/types/{components/Icons → icons}/DownloadPdf/index.d.ts +2 -2
- package/dist/types/{components/Icons → icons}/Ellipse/index.d.ts +2 -2
- package/dist/types/{components/Icons → icons}/FilterNoti/index.d.ts +2 -2
- package/dist/types/{components/Icons → icons}/HideLarge/index.d.ts +2 -2
- package/dist/types/{components/Icons → icons}/HideSmall/index.d.ts +2 -2
- package/dist/types/{components/Icons → icons}/InformationLarge/index.d.ts +2 -2
- package/dist/types/{components/Icons → icons}/InformationSmall/index.d.ts +2 -2
- package/dist/types/{components/Icons → icons}/Manufacturer/index.d.ts +2 -2
- package/dist/types/{components/Icons → icons}/Rectangle/index.d.ts +2 -2
- package/dist/types/{components/Icons → icons}/RefreshLeft/index.d.ts +2 -2
- package/dist/types/{components/Icons → icons}/RefreshRight/index.d.ts +2 -2
- package/dist/types/{components/Icons → icons}/ShowLarge/index.d.ts +2 -2
- package/dist/types/{components/Icons → icons}/ShowSmall/index.d.ts +2 -2
- package/package.json +1 -1
- package/src/components/Alert/Alert.tsx +1 -1
- package/src/components/Alert/Alert.utils.tsx +1 -1
- package/src/components/Chip/Chip.tsx +1 -1
- package/src/components/Chip/Chip.utils.tsx +1 -1
- package/src/components/DatePicker/DatePicker.tsx +1 -1
- package/src/components/Dialog/Dialog.tsx +1 -1
- package/src/components/Dropdown/Dropdown.tsx +1 -1
- package/src/components/Dropdown/DropdownItem.tsx +1 -1
- package/src/components/Dropdown/IconDropdown.tsx +1 -1
- package/src/components/List/List.tsx +1 -1
- package/src/components/List/ListItem.styled.tsx +1 -1
- package/src/components/Pagination/Pagination.styled.tsx +71 -0
- package/src/components/Pagination/Pagination.tsx +182 -0
- package/src/components/Pagination/Pagination.types.ts +39 -0
- package/src/components/Pagination/index.ts +2 -0
- package/src/components/ProductLabel/ProductLabel.tsx +1 -1
- package/src/components/TextField/components/Buttons.tsx +1 -1
- package/src/components/UploadManager/UploadManager.tsx +1 -1
- package/src/components/index.ts +1 -1
- package/src/foundations/index.ts +1 -0
- package/src/foundations/palette.ts +12 -1
- package/src/foundations/styles.ts +9 -0
- package/src/icons/BellNoti/index.tsx +28 -0
- package/src/icons/CloseLarge/index.tsx +28 -0
- package/src/icons/CloseSmall/index.tsx +28 -0
- package/src/icons/DownloadPdf/index.tsx +28 -0
- package/src/icons/Ellipse/index.tsx +28 -0
- package/src/icons/FilterNoti/index.tsx +28 -0
- package/src/icons/HideLarge/index.tsx +28 -0
- package/src/icons/HideSmall/index.tsx +28 -0
- package/src/icons/InformationLarge/index.tsx +28 -0
- package/src/icons/InformationSmall/index.tsx +28 -0
- package/src/icons/Manufacturer/index.tsx +28 -0
- package/src/icons/Rectangle/index.tsx +28 -0
- package/src/icons/RefreshLeft/index.tsx +28 -0
- package/src/icons/RefreshRight/index.tsx +28 -0
- package/src/icons/ShowLarge/index.tsx +28 -0
- package/src/icons/ShowSmall/index.tsx +28 -0
- package/dist/components/Icons/BellNoti/index.js +0 -14
- package/dist/components/Icons/CloseLarge/index.js +0 -14
- package/dist/components/Icons/CloseSmall/index.js +0 -14
- package/dist/components/Icons/Ellipse/index.js +0 -14
- package/dist/components/Icons/FilterNoti/index.js +0 -14
- package/dist/components/Icons/HideLarge/index.js +0 -14
- package/dist/components/Icons/HideSmall/index.js +0 -14
- package/dist/components/Icons/Rectangle/index.js +0 -14
- package/dist/components/Icons/ShowLarge/index.js +0 -14
- package/dist/components/Icons/ShowSmall/index.js +0 -14
- package/src/components/Icons/BellNoti/index.tsx +0 -22
- package/src/components/Icons/CloseLarge/index.tsx +0 -22
- package/src/components/Icons/CloseSmall/index.tsx +0 -22
- package/src/components/Icons/DownloadPdf/index.tsx +0 -22
- package/src/components/Icons/Ellipse/index.tsx +0 -22
- package/src/components/Icons/FilterNoti/index.tsx +0 -22
- package/src/components/Icons/HideLarge/index.tsx +0 -22
- package/src/components/Icons/HideSmall/index.tsx +0 -22
- package/src/components/Icons/InformationLarge/index.tsx +0 -22
- package/src/components/Icons/InformationSmall/index.tsx +0 -22
- package/src/components/Icons/Manufacturer/index.tsx +0 -22
- package/src/components/Icons/Rectangle/index.tsx +0 -22
- package/src/components/Icons/RefreshLeft/index.tsx +0 -22
- package/src/components/Icons/RefreshRight/index.tsx +0 -22
- package/src/components/Icons/ShowLarge/index.tsx +0 -22
- package/src/components/Icons/ShowSmall/index.tsx +0 -22
- /package/dist/{components/Icons → icons}/index.js +0 -0
- /package/dist/types/{components/Icons → icons}/index.d.ts +0 -0
- /package/src/{components/Icons → icons}/index.ts +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
|
-
import { Close } from '
|
|
3
|
+
import { Close } from '../../icons';
|
|
4
4
|
import BaseAlert from './Alert.styled';
|
|
5
5
|
import { getAccentColor, getIcons } from './Alert.utils';
|
|
6
6
|
import { Button } from '../Button';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { CloseSmall } from '
|
|
2
|
+
import { CloseSmall } from '../../icons';
|
|
3
3
|
import StyledChip from './Chip.styled';
|
|
4
4
|
import { presetMap } from './Chip.utils';
|
|
5
5
|
function Chip({ preset, label, icon, onDelete, onClick, ...otherProps }) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useState, useMemo, useEffect } from 'react';
|
|
3
|
-
import { CloseSmall, ArrowLeft, ArrowRight } from '
|
|
3
|
+
import { CloseSmall, ArrowLeft, ArrowRight } from '../../icons';
|
|
4
4
|
import { StyledDatePicker } from './DatePicker.styled';
|
|
5
5
|
import { Button } from '../Button';
|
|
6
6
|
import theme from '../../theme';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { ArrowDown } from '
|
|
2
|
+
import { ArrowDown } from '../../icons';
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
import { BaseDropdown, DropdownContainer, DropdownPlaceholder } from './Dropdown.styled';
|
|
5
5
|
import { handlePlaceholder } from './Dropdown.utils';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Check } from '
|
|
2
|
+
import { Check } from '../../icons';
|
|
3
3
|
import { BaseDropdownItem, KeyboardShortcut } from './DropdownItem.styled';
|
|
4
4
|
import { BUTTON_DROPDOWN_ITEM, shouldPadForEmptyIcon } from './DropdownItem.utils';
|
|
5
5
|
const DropdownItem = ({ checkIcon, customIcon, children, emptyIcon, asButton, value, keyboardShortcut, ...otherProps }) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from 'react';
|
|
3
|
-
import { ArrowDownXs } from '
|
|
3
|
+
import { ArrowDownXs } from '../../icons';
|
|
4
4
|
import { BaseIconDropdown } from './IconDropdown.styled';
|
|
5
5
|
import theme from '../../theme';
|
|
6
6
|
const IconDropdown = ({ open, disabled, children, ...otherProps }) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { createContext, useMemo } from 'react';
|
|
3
|
-
import { ArrowDownSm, ArrowUpSm } from '
|
|
3
|
+
import { ArrowDownSm, ArrowUpSm } from '../../icons';
|
|
4
4
|
import { Collapse } from '@mui/material';
|
|
5
5
|
import { MuiList, MuiListSubheader } from './List.styled';
|
|
6
6
|
export const ListContext = createContext({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { ListItem, ListItemButton, ListItemIcon, ListItemText, styled, typographyClasses, } from '@mui/material';
|
|
3
|
-
import { Check, Dummy } from '
|
|
3
|
+
import { Check, Dummy } from '../../icons';
|
|
4
4
|
import getPadding from './List.utils';
|
|
5
5
|
export const StyledListItem = styled(ListItem)({
|
|
6
6
|
width: '100%',
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useEffect, useMemo } from 'react';
|
|
3
|
+
import { ArrowDown } from '../../icons';
|
|
4
|
+
import { Divider } from '../Divider';
|
|
5
|
+
import { MenuItem, Menu } from '../Menu';
|
|
6
|
+
import { PaperProps, PaginationBox, SidePageBox, SelectButton, ArrowButton, PAGE_SIZE_LIST, divider, } from './Pagination.styled';
|
|
7
|
+
function Pagination({ count: itemCount, page: selectedPage = 1, perPage: selectedPerPage, totalPage, onPageChange, onPerPageChange, }) {
|
|
8
|
+
const [perPageAnchorEl, setPerPageAnchorEl] = useState(null);
|
|
9
|
+
const [pageAnchorEl, setPageAnchorEl] = useState(null);
|
|
10
|
+
const perPageOpen = Boolean(perPageAnchorEl);
|
|
11
|
+
const pageOpen = Boolean(pageAnchorEl);
|
|
12
|
+
const pages = useMemo(() => Array.from({ length: totalPage }, (_, index) => index + 1), [totalPage]);
|
|
13
|
+
const startItemNumber = selectedPerPage * (selectedPage - 1) + 1;
|
|
14
|
+
const endItemNumber = Math.min(startItemNumber + selectedPerPage - 1, itemCount);
|
|
15
|
+
const handlePerPageClick = (event) => {
|
|
16
|
+
setPerPageAnchorEl(event.currentTarget);
|
|
17
|
+
};
|
|
18
|
+
const handlePerPageClose = () => {
|
|
19
|
+
setPerPageAnchorEl(null);
|
|
20
|
+
};
|
|
21
|
+
const handlePageClick = (event) => {
|
|
22
|
+
setPageAnchorEl(event.currentTarget);
|
|
23
|
+
};
|
|
24
|
+
const handlePageClose = () => {
|
|
25
|
+
setPageAnchorEl(null);
|
|
26
|
+
};
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
if (selectedPage > totalPage) {
|
|
29
|
+
onPageChange?.(null, totalPage);
|
|
30
|
+
}
|
|
31
|
+
}, [totalPage, selectedPage, onPageChange]);
|
|
32
|
+
return (_jsxs(PaginationBox, { children: [_jsxs(SidePageBox, { children: ["Items per page", _jsx(SelectButton, { endIcon: _jsx(ArrowDown, { style: {
|
|
33
|
+
transform: perPageOpen ? 'rotate(180deg)' : 'rotate(0deg)',
|
|
34
|
+
} }), onClick: handlePerPageClick, children: selectedPerPage }), _jsx(Menu, { showCheck: true, anchorEl: perPageAnchorEl, anchorOrigin: {
|
|
35
|
+
vertical: 'top',
|
|
36
|
+
horizontal: 'right',
|
|
37
|
+
}, transformOrigin: {
|
|
38
|
+
vertical: 'bottom',
|
|
39
|
+
horizontal: 'right',
|
|
40
|
+
}, PaperProps: PaperProps, onClose: handlePerPageClose, open: perPageOpen, children: PAGE_SIZE_LIST.map((perPage) => (_jsx(MenuItem, { selected: perPage === selectedPerPage, onClick: (event) => {
|
|
41
|
+
event.preventDefault();
|
|
42
|
+
onPerPageChange?.(event, perPage);
|
|
43
|
+
handlePerPageClose();
|
|
44
|
+
}, label: perPage }, perPage))) }), _jsx(Divider, { orientation: "vertical", sx: divider }), startItemNumber, "-", endItemNumber, " of \u00A0", itemCount, " items"] }), _jsxs(SidePageBox, { children: ["This page", _jsx(SelectButton, { id: "selected-page", endIcon: _jsx(ArrowDown, { style: {
|
|
45
|
+
transform: pageOpen ? 'rotate(180deg)' : 'rotate(0deg)',
|
|
46
|
+
} }), onClick: handlePageClick, children: selectedPage }), _jsx(Menu, { showCheck: true, anchorEl: pageAnchorEl, anchorOrigin: {
|
|
47
|
+
vertical: 'top',
|
|
48
|
+
horizontal: 'right',
|
|
49
|
+
}, transformOrigin: {
|
|
50
|
+
vertical: 'bottom',
|
|
51
|
+
horizontal: 'right',
|
|
52
|
+
}, PaperProps: PaperProps, onClose: handlePageClose, open: pageOpen, children: pages.map((page) => (_jsx(MenuItem, { selected: page === selectedPage, onClick: (event) => {
|
|
53
|
+
event.preventDefault();
|
|
54
|
+
onPageChange?.(event, page);
|
|
55
|
+
handlePageClose();
|
|
56
|
+
}, label: page }, page))) }), _jsx(Divider, { orientation: "vertical", sx: divider }), _jsx(ArrowButton, { id: "prev-button", disabled: selectedPage === 1, onClick: (event) => {
|
|
57
|
+
event.preventDefault();
|
|
58
|
+
onPageChange?.(event, selectedPage - 1);
|
|
59
|
+
}, endIcon: _jsx(ArrowDown, { style: { transform: 'rotate(90deg)' } }) }), _jsx(ArrowButton, { id: "next-button", disabled: selectedPage === totalPage, onClick: (event) => {
|
|
60
|
+
event.preventDefault();
|
|
61
|
+
onPageChange?.(event, selectedPage + 1);
|
|
62
|
+
}, endIcon: _jsx(ArrowDown, { style: { transform: 'rotate(-90deg)' } }) })] })] }));
|
|
63
|
+
}
|
|
64
|
+
export default Pagination;
|
|
65
|
+
//# sourceMappingURL=Pagination.js.map
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Button, styled, Box } from '@mui/material';
|
|
2
|
+
import { subScrollbarWidth } from '../../foundations';
|
|
3
|
+
export const DEFAULT_PAGE_SIZE = 100;
|
|
4
|
+
export const PAGE_SIZE_LIST = [25, 50, 75, 100];
|
|
5
|
+
export const PaginationBox = styled(Box)(({ theme }) => ({
|
|
6
|
+
...theme.typography.body5,
|
|
7
|
+
display: 'flex',
|
|
8
|
+
justifyContent: 'space-between',
|
|
9
|
+
alignItems: 'center',
|
|
10
|
+
borderTop: `1px solid ${theme.palette.neutralGrey[90]}`,
|
|
11
|
+
height: '48px',
|
|
12
|
+
padding: '14px 0',
|
|
13
|
+
color: theme.palette.neutralGrey[40],
|
|
14
|
+
}));
|
|
15
|
+
export const PaperProps = { style: { maxHeight: 378, width: 136 } };
|
|
16
|
+
export const SidePageBox = styled('div')({
|
|
17
|
+
display: 'flex',
|
|
18
|
+
alignItems: 'center',
|
|
19
|
+
height: '20px',
|
|
20
|
+
});
|
|
21
|
+
export const SelectButton = styled(Button)(({ theme }) => ({
|
|
22
|
+
justifyContent: 'flex-end',
|
|
23
|
+
border: '1px solid transparent',
|
|
24
|
+
minWidth: 'auto',
|
|
25
|
+
width: '58px',
|
|
26
|
+
height: '28px',
|
|
27
|
+
marginLeft: theme.spacing(3),
|
|
28
|
+
padding: '4px 4px 4px 8px',
|
|
29
|
+
color: theme.palette.neutralGrey[15],
|
|
30
|
+
'.MuiButton-endIcon': { margin: 0 },
|
|
31
|
+
'&:hover': {
|
|
32
|
+
background: 'transparent',
|
|
33
|
+
borderColor: theme.palette.neutralGrey[40],
|
|
34
|
+
},
|
|
35
|
+
'&:focus-visible': {
|
|
36
|
+
background: 'transparent',
|
|
37
|
+
borderColor: theme.palette.scope1,
|
|
38
|
+
},
|
|
39
|
+
}));
|
|
40
|
+
export const ArrowButton = styled(Button)(({ theme }) => ({
|
|
41
|
+
border: '1px solid transparent',
|
|
42
|
+
minWidth: 'auto',
|
|
43
|
+
height: '28px',
|
|
44
|
+
padding: theme.spacing(0.5),
|
|
45
|
+
color: theme.palette.neutralGrey[40],
|
|
46
|
+
'&:hover': {
|
|
47
|
+
background: theme.palette.neutralGrey[70],
|
|
48
|
+
},
|
|
49
|
+
'&:disabled': {
|
|
50
|
+
color: theme.palette.neutralGrey[40],
|
|
51
|
+
opacity: 0.4,
|
|
52
|
+
},
|
|
53
|
+
'.MuiButton-endIcon': {
|
|
54
|
+
margin: 0,
|
|
55
|
+
},
|
|
56
|
+
}));
|
|
57
|
+
export const PaginationContainer = styled('div')(({ theme }) => ({
|
|
58
|
+
padding: `0 ${subScrollbarWidth(theme.spacing(5))} 0 ${theme.spacing(5)}`,
|
|
59
|
+
}));
|
|
60
|
+
export const divider = {
|
|
61
|
+
borderWidth: '0',
|
|
62
|
+
margin: '0 12px',
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=Pagination.styled.js.map
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Box, Typography } from '@mui/material';
|
|
3
3
|
import { LabelContainer, LabelContent, LabelCloseButton } from './ProductLabel.styled';
|
|
4
4
|
import { Divider } from '../Divider';
|
|
5
|
-
import { Close } from '
|
|
5
|
+
import { Close } from '../../icons';
|
|
6
6
|
import { LunitScope } from '@lunit/design-system-logo';
|
|
7
7
|
function ProductLabel({ open, onClose, children, footerStart, footerEnd }) {
|
|
8
8
|
const handleClose = () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { CloseSmall, HideSmall, ShowSmall } from '
|
|
2
|
+
import { CloseSmall, HideSmall, ShowSmall } from '../../../icons';
|
|
3
3
|
import { ButtonWrapper } from '../TextInput.styled';
|
|
4
4
|
function ClearButton({ onClick }) {
|
|
5
5
|
return (_jsx(ButtonWrapper, { onClick: onClick, children: _jsx(CloseSmall, { fontSize: "small" }) }));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Grow, Typography, Box } from '@mui/material';
|
|
3
|
-
import { ArrowUp, Close, Success, Error16, RefreshLeft } from '
|
|
3
|
+
import { ArrowUp, Close, Success, Error16, RefreshLeft } from '../../icons';
|
|
4
4
|
import { useState, Fragment, useMemo } from 'react';
|
|
5
5
|
import { Divider } from '../Divider';
|
|
6
6
|
import { Button } from '../Button';
|
package/dist/components/index.js
CHANGED
|
@@ -9,10 +9,10 @@ export * from './Dialog';
|
|
|
9
9
|
export * from './Divider';
|
|
10
10
|
export * from './Dropdown';
|
|
11
11
|
export * from './FileDnDZone';
|
|
12
|
-
export * from './Icons';
|
|
13
12
|
export * from './List';
|
|
14
13
|
export * from './LoadingIndicator';
|
|
15
14
|
export * from './Menu';
|
|
15
|
+
export * from './Pagination';
|
|
16
16
|
export * from './ProductLabel';
|
|
17
17
|
export * from './Progress';
|
|
18
18
|
export * from './Radio';
|
|
@@ -200,6 +200,10 @@ const palette = {
|
|
|
200
200
|
InvalidHover: '#A7A7A7',
|
|
201
201
|
InvalidSelected: '#6E6E74',
|
|
202
202
|
},
|
|
203
|
+
scope1: '#7292FD',
|
|
204
|
+
scope2: '#587EFC',
|
|
205
|
+
scope3: '#B0C0F4',
|
|
206
|
+
scope4: '#3A5DD9',
|
|
203
207
|
info: { main: '#748FFC' },
|
|
204
208
|
success: { main: '#00C9EA' },
|
|
205
209
|
error: { main: '#FA4D56' },
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import SvgIcon from '@mui/material/SvgIcon';
|
|
3
|
+
import { IcBellNotiOutlined20Px as outlined } from '../../assets';
|
|
4
|
+
const variants = ['outlined'];
|
|
5
|
+
const BellNoti = ({ variant = 'outlined', ...rest }) => {
|
|
6
|
+
if (variant === 'outlined') {
|
|
7
|
+
return (_jsx(SvgIcon, { ...rest, component: outlined, inheritViewBox: true }));
|
|
8
|
+
}
|
|
9
|
+
return null;
|
|
10
|
+
};
|
|
11
|
+
BellNoti.displayName = 'BellNoti';
|
|
12
|
+
BellNoti.variants = variants;
|
|
13
|
+
export default BellNoti;
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import SvgIcon from '@mui/material/SvgIcon';
|
|
3
|
+
import { IcCloseLargeOutlined20Px as outlined } from '../../assets';
|
|
4
|
+
const variants = ['outlined'];
|
|
5
|
+
const CloseLarge = ({ variant = 'outlined', ...rest }) => {
|
|
6
|
+
if (variant === 'outlined') {
|
|
7
|
+
return (_jsx(SvgIcon, { ...rest, component: outlined, inheritViewBox: true }));
|
|
8
|
+
}
|
|
9
|
+
return null;
|
|
10
|
+
};
|
|
11
|
+
CloseLarge.displayName = 'CloseLarge';
|
|
12
|
+
CloseLarge.variants = variants;
|
|
13
|
+
export default CloseLarge;
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import SvgIcon from '@mui/material/SvgIcon';
|
|
3
|
+
import { IcCloseSmallOutlined20Px as outlined } from '../../assets';
|
|
4
|
+
const variants = ['outlined'];
|
|
5
|
+
const CloseSmall = ({ variant = 'outlined', ...rest }) => {
|
|
6
|
+
if (variant === 'outlined') {
|
|
7
|
+
return (_jsx(SvgIcon, { ...rest, component: outlined, inheritViewBox: true }));
|
|
8
|
+
}
|
|
9
|
+
return null;
|
|
10
|
+
};
|
|
11
|
+
CloseSmall.displayName = 'CloseSmall';
|
|
12
|
+
CloseSmall.variants = variants;
|
|
13
|
+
export default CloseSmall;
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import SvgIcon from
|
|
3
|
-
import { IcDownloadPdfOutlined20Px as outlined } from '
|
|
4
|
-
const variants = ['outlined'
|
|
2
|
+
import SvgIcon from '@mui/material/SvgIcon';
|
|
3
|
+
import { IcDownloadPdfOutlined20Px as outlined } from '../../assets';
|
|
4
|
+
const variants = ['outlined'];
|
|
5
5
|
const DownloadPdf = ({ variant = 'outlined', ...rest }) => {
|
|
6
6
|
if (variant === 'outlined') {
|
|
7
|
-
return _jsx(SvgIcon, { ...rest, component: outlined, inheritViewBox: true });
|
|
7
|
+
return (_jsx(SvgIcon, { ...rest, component: outlined, inheritViewBox: true }));
|
|
8
8
|
}
|
|
9
9
|
return null;
|
|
10
10
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import SvgIcon from '@mui/material/SvgIcon';
|
|
3
|
+
import { IcEllipseOutlined20Px as outlined } from '../../assets';
|
|
4
|
+
const variants = ['outlined'];
|
|
5
|
+
const Ellipse = ({ variant = 'outlined', ...rest }) => {
|
|
6
|
+
if (variant === 'outlined') {
|
|
7
|
+
return (_jsx(SvgIcon, { ...rest, component: outlined, inheritViewBox: true }));
|
|
8
|
+
}
|
|
9
|
+
return null;
|
|
10
|
+
};
|
|
11
|
+
Ellipse.displayName = 'Ellipse';
|
|
12
|
+
Ellipse.variants = variants;
|
|
13
|
+
export default Ellipse;
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import SvgIcon from '@mui/material/SvgIcon';
|
|
3
|
+
import { IcFilterNotiOutlined20Px as outlined } from '../../assets';
|
|
4
|
+
const variants = ['outlined'];
|
|
5
|
+
const FilterNoti = ({ variant = 'outlined', ...rest }) => {
|
|
6
|
+
if (variant === 'outlined') {
|
|
7
|
+
return (_jsx(SvgIcon, { ...rest, component: outlined, inheritViewBox: true }));
|
|
8
|
+
}
|
|
9
|
+
return null;
|
|
10
|
+
};
|
|
11
|
+
FilterNoti.displayName = 'FilterNoti';
|
|
12
|
+
FilterNoti.variants = variants;
|
|
13
|
+
export default FilterNoti;
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import SvgIcon from '@mui/material/SvgIcon';
|
|
3
|
+
import { IcHideLargeOutlined20Px as outlined } from '../../assets';
|
|
4
|
+
const variants = ['outlined'];
|
|
5
|
+
const HideLarge = ({ variant = 'outlined', ...rest }) => {
|
|
6
|
+
if (variant === 'outlined') {
|
|
7
|
+
return (_jsx(SvgIcon, { ...rest, component: outlined, inheritViewBox: true }));
|
|
8
|
+
}
|
|
9
|
+
return null;
|
|
10
|
+
};
|
|
11
|
+
HideLarge.displayName = 'HideLarge';
|
|
12
|
+
HideLarge.variants = variants;
|
|
13
|
+
export default HideLarge;
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import SvgIcon from '@mui/material/SvgIcon';
|
|
3
|
+
import { IcHideSmallOutlined20Px as outlined } from '../../assets';
|
|
4
|
+
const variants = ['outlined'];
|
|
5
|
+
const HideSmall = ({ variant = 'outlined', ...rest }) => {
|
|
6
|
+
if (variant === 'outlined') {
|
|
7
|
+
return (_jsx(SvgIcon, { ...rest, component: outlined, inheritViewBox: true }));
|
|
8
|
+
}
|
|
9
|
+
return null;
|
|
10
|
+
};
|
|
11
|
+
HideSmall.displayName = 'HideSmall';
|
|
12
|
+
HideSmall.variants = variants;
|
|
13
|
+
export default HideSmall;
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import SvgIcon from
|
|
3
|
-
import { IcInformationLargeOutlined20Px as outlined } from '
|
|
4
|
-
const variants = ['outlined'
|
|
2
|
+
import SvgIcon from '@mui/material/SvgIcon';
|
|
3
|
+
import { IcInformationLargeOutlined20Px as outlined } from '../../assets';
|
|
4
|
+
const variants = ['outlined'];
|
|
5
5
|
const InformationLarge = ({ variant = 'outlined', ...rest }) => {
|
|
6
6
|
if (variant === 'outlined') {
|
|
7
|
-
return _jsx(SvgIcon, { ...rest, component: outlined, inheritViewBox: true });
|
|
7
|
+
return (_jsx(SvgIcon, { ...rest, component: outlined, inheritViewBox: true }));
|
|
8
8
|
}
|
|
9
9
|
return null;
|
|
10
10
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import SvgIcon from
|
|
3
|
-
import { IcInformationSmallOutlined20Px as outlined } from '
|
|
4
|
-
const variants = ['outlined'
|
|
2
|
+
import SvgIcon from '@mui/material/SvgIcon';
|
|
3
|
+
import { IcInformationSmallOutlined20Px as outlined } from '../../assets';
|
|
4
|
+
const variants = ['outlined'];
|
|
5
5
|
const InformationSmall = ({ variant = 'outlined', ...rest }) => {
|
|
6
6
|
if (variant === 'outlined') {
|
|
7
|
-
return _jsx(SvgIcon, { ...rest, component: outlined, inheritViewBox: true });
|
|
7
|
+
return (_jsx(SvgIcon, { ...rest, component: outlined, inheritViewBox: true }));
|
|
8
8
|
}
|
|
9
9
|
return null;
|
|
10
10
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import SvgIcon from
|
|
3
|
-
import { IcManufacturerOutlined20Px as outlined } from '
|
|
4
|
-
const variants = ['outlined'
|
|
2
|
+
import SvgIcon from '@mui/material/SvgIcon';
|
|
3
|
+
import { IcManufacturerOutlined20Px as outlined } from '../../assets';
|
|
4
|
+
const variants = ['outlined'];
|
|
5
5
|
const Manufacturer = ({ variant = 'outlined', ...rest }) => {
|
|
6
6
|
if (variant === 'outlined') {
|
|
7
|
-
return _jsx(SvgIcon, { ...rest, component: outlined, inheritViewBox: true });
|
|
7
|
+
return (_jsx(SvgIcon, { ...rest, component: outlined, inheritViewBox: true }));
|
|
8
8
|
}
|
|
9
9
|
return null;
|
|
10
10
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import SvgIcon from '@mui/material/SvgIcon';
|
|
3
|
+
import { IcRectangleOutlined20Px as outlined } from '../../assets';
|
|
4
|
+
const variants = ['outlined'];
|
|
5
|
+
const Rectangle = ({ variant = 'outlined', ...rest }) => {
|
|
6
|
+
if (variant === 'outlined') {
|
|
7
|
+
return (_jsx(SvgIcon, { ...rest, component: outlined, inheritViewBox: true }));
|
|
8
|
+
}
|
|
9
|
+
return null;
|
|
10
|
+
};
|
|
11
|
+
Rectangle.displayName = 'Rectangle';
|
|
12
|
+
Rectangle.variants = variants;
|
|
13
|
+
export default Rectangle;
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import SvgIcon from
|
|
3
|
-
import { IcRefreshLeftOutlined20Px as outlined } from '
|
|
4
|
-
const variants = ['outlined'
|
|
2
|
+
import SvgIcon from '@mui/material/SvgIcon';
|
|
3
|
+
import { IcRefreshLeftOutlined20Px as outlined } from '../../assets';
|
|
4
|
+
const variants = ['outlined'];
|
|
5
5
|
const RefreshLeft = ({ variant = 'outlined', ...rest }) => {
|
|
6
6
|
if (variant === 'outlined') {
|
|
7
|
-
return _jsx(SvgIcon, { ...rest, component: outlined, inheritViewBox: true });
|
|
7
|
+
return (_jsx(SvgIcon, { ...rest, component: outlined, inheritViewBox: true }));
|
|
8
8
|
}
|
|
9
9
|
return null;
|
|
10
10
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import SvgIcon from
|
|
3
|
-
import { IcRefreshRightOutlined20Px as outlined } from '
|
|
4
|
-
const variants = ['outlined'
|
|
2
|
+
import SvgIcon from '@mui/material/SvgIcon';
|
|
3
|
+
import { IcRefreshRightOutlined20Px as outlined } from '../../assets';
|
|
4
|
+
const variants = ['outlined'];
|
|
5
5
|
const RefreshRight = ({ variant = 'outlined', ...rest }) => {
|
|
6
6
|
if (variant === 'outlined') {
|
|
7
|
-
return _jsx(SvgIcon, { ...rest, component: outlined, inheritViewBox: true });
|
|
7
|
+
return (_jsx(SvgIcon, { ...rest, component: outlined, inheritViewBox: true }));
|
|
8
8
|
}
|
|
9
9
|
return null;
|
|
10
10
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import SvgIcon from '@mui/material/SvgIcon';
|
|
3
|
+
import { IcShowLargeOutlined20Px as outlined } from '../../assets';
|
|
4
|
+
const variants = ['outlined'];
|
|
5
|
+
const ShowLarge = ({ variant = 'outlined', ...rest }) => {
|
|
6
|
+
if (variant === 'outlined') {
|
|
7
|
+
return (_jsx(SvgIcon, { ...rest, component: outlined, inheritViewBox: true }));
|
|
8
|
+
}
|
|
9
|
+
return null;
|
|
10
|
+
};
|
|
11
|
+
ShowLarge.displayName = 'ShowLarge';
|
|
12
|
+
ShowLarge.variants = variants;
|
|
13
|
+
export default ShowLarge;
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import SvgIcon from '@mui/material/SvgIcon';
|
|
3
|
+
import { IcShowSmallOutlined20Px as outlined } from '../../assets';
|
|
4
|
+
const variants = ['outlined'];
|
|
5
|
+
const ShowSmall = ({ variant = 'outlined', ...rest }) => {
|
|
6
|
+
if (variant === 'outlined') {
|
|
7
|
+
return (_jsx(SvgIcon, { ...rest, component: outlined, inheritViewBox: true }));
|
|
8
|
+
}
|
|
9
|
+
return null;
|
|
10
|
+
};
|
|
11
|
+
ShowSmall.displayName = 'ShowSmall';
|
|
12
|
+
ShowSmall.variants = variants;
|
|
13
|
+
export default ShowSmall;
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { PaginationProps } from './Pagination.types';
|
|
2
|
+
declare function Pagination({ count: itemCount, page: selectedPage, perPage: selectedPerPage, totalPage, onPageChange, onPerPageChange, }: PaginationProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export default Pagination;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const DEFAULT_PAGE_SIZE = 100;
|
|
3
|
+
export declare const PAGE_SIZE_LIST: number[];
|
|
4
|
+
export declare const PaginationBox: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
5
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
6
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
7
|
+
export declare const PaperProps: {
|
|
8
|
+
style: {
|
|
9
|
+
maxHeight: number;
|
|
10
|
+
width: number;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export declare const SidePageBox: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
14
|
+
export declare const SelectButton: import("@emotion/styled").StyledComponent<import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
15
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
16
|
+
}, "color" | "disabled" | "size" | "style" | "fullWidth" | "classes" | "className" | "children" | "sx" | "variant" | "tabIndex" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple" | "endIcon" | "href" | "startIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
17
|
+
export declare const ArrowButton: import("@emotion/styled").StyledComponent<import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
18
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
19
|
+
}, "color" | "disabled" | "size" | "style" | "fullWidth" | "classes" | "className" | "children" | "sx" | "variant" | "tabIndex" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple" | "endIcon" | "href" | "startIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
20
|
+
export declare const PaginationContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
21
|
+
export declare const divider: {
|
|
22
|
+
readonly borderWidth: "0";
|
|
23
|
+
readonly margin: "0 12px";
|
|
24
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface PaginationProps {
|
|
3
|
+
count: number;
|
|
4
|
+
page?: number;
|
|
5
|
+
perPage: number;
|
|
6
|
+
totalPage: number;
|
|
7
|
+
onPageChange?: (event: React.MouseEvent<HTMLLIElement> | React.MouseEvent<HTMLButtonElement> | null, page: number) => void;
|
|
8
|
+
onPerPageChange?: (event: React.MouseEvent<HTMLLIElement> | null, perPage: number) => void;
|
|
9
|
+
}
|
|
10
|
+
interface SortObject {
|
|
11
|
+
empty: boolean;
|
|
12
|
+
unsorted: boolean;
|
|
13
|
+
sorted: boolean;
|
|
14
|
+
}
|
|
15
|
+
interface Pageable {
|
|
16
|
+
offset: number;
|
|
17
|
+
sort: SortObject;
|
|
18
|
+
paged: boolean;
|
|
19
|
+
unpaged: boolean;
|
|
20
|
+
pageNumber: number;
|
|
21
|
+
pageSize: number;
|
|
22
|
+
}
|
|
23
|
+
export interface PaginationViewInfo {
|
|
24
|
+
totalElements: number;
|
|
25
|
+
totalPages: number;
|
|
26
|
+
size: number;
|
|
27
|
+
number: number;
|
|
28
|
+
sort: SortObject;
|
|
29
|
+
pageable: Pageable;
|
|
30
|
+
numberOfElements: number;
|
|
31
|
+
first: boolean;
|
|
32
|
+
last: boolean;
|
|
33
|
+
empty: boolean;
|
|
34
|
+
}
|
|
35
|
+
export {};
|