@lunit/oui 2.4.13 → 2.4.14
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/List/index.d.ts +2 -1
- package/dist/components/List/index.js +2 -1
- package/dist/components/index.d.ts +0 -1
- package/dist/components/index.js +0 -1
- package/package.json +1 -2
- package/dist/components/Navigation/Navigation.d.ts +0 -3
- package/dist/components/Navigation/Navigation.js +0 -6
- package/dist/components/Navigation/Navigation.types.d.ts +0 -2
- package/dist/components/Navigation/Navigation.types.js +0 -1
- package/dist/components/Navigation/NavigationGroup.d.ts +0 -3
- package/dist/components/Navigation/NavigationGroup.js +0 -22
- package/dist/components/Navigation/NavigationGroup.styled.d.ts +0 -6
- package/dist/components/Navigation/NavigationGroup.styled.js +0 -25
- package/dist/components/Navigation/NavigationGroup.types.d.ts +0 -18
- package/dist/components/Navigation/NavigationGroup.types.js +0 -1
- package/dist/components/Navigation/NavigationItem.d.ts +0 -3
- package/dist/components/Navigation/NavigationItem.js +0 -8
- package/dist/components/Navigation/NavigationItem.styled.d.ts +0 -3
- package/dist/components/Navigation/NavigationItem.styled.js +0 -24
- package/dist/components/Navigation/NavigationItem.types.d.ts +0 -14
- package/dist/components/Navigation/NavigationItem.types.js +0 -1
- package/dist/components/Navigation/NavigationItemCaption.d.ts +0 -3
- package/dist/components/Navigation/NavigationItemCaption.js +0 -6
- package/dist/components/Navigation/NavigationItemCaption.types.d.ts +0 -3
- package/dist/components/Navigation/NavigationItemCaption.types.js +0 -1
- package/dist/components/Navigation/index.d.ts +0 -8
- package/dist/components/Navigation/index.js +0 -4
|
@@ -2,5 +2,6 @@ export { default as List } from './List';
|
|
|
2
2
|
export type { ListProps } from './List.types';
|
|
3
3
|
export { default as ListItem } from './ListItem';
|
|
4
4
|
export type { ListItemProps } from './ListItem.types';
|
|
5
|
-
export { default as ListItemCaption } from './ListItemCaption';
|
|
5
|
+
export { default as ListItemCaption, ListItemCaptionClassName } from './ListItemCaption';
|
|
6
6
|
export type { ListItemCaptionProps } from './ListItemCaption.types';
|
|
7
|
+
export { EmptyIcon as ListItemEmptyIcon, StyledListItem, StyledListItemButton, StyledListItemEndSlot, StyledListItemStartSlot, StyledListItemText, } from './ListItem.styled';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { default as List } from './List';
|
|
2
2
|
export { default as ListItem } from './ListItem';
|
|
3
|
-
export { default as ListItemCaption } from './ListItemCaption';
|
|
3
|
+
export { default as ListItemCaption, ListItemCaptionClassName } from './ListItemCaption';
|
|
4
|
+
export { EmptyIcon as ListItemEmptyIcon, StyledListItem, StyledListItemButton, StyledListItemEndSlot, StyledListItemStartSlot, StyledListItemText, } from './ListItem.styled';
|
package/dist/components/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lunit/oui",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.14",
|
|
4
4
|
"validate-branch-name": {
|
|
5
5
|
"pattern": "^(main|develop)|(feature|fix|release|hotfix|qe)/.+$",
|
|
6
6
|
"errorMsg": "The branch name is not correct. Please check the pattern. (ex. feature/add-something)"
|
|
@@ -25,7 +25,6 @@
|
|
|
25
25
|
"clsx": "^2.0.0",
|
|
26
26
|
"date-fns": "2.30.0",
|
|
27
27
|
"lodash": "^4.17.21",
|
|
28
|
-
"react-router-dom": "^7.9.6",
|
|
29
28
|
"tinycolor2": "^1.6.0",
|
|
30
29
|
"uuid": "^11.1.0",
|
|
31
30
|
"victory": "^37.3.6",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { Collapse } from '@mui/material';
|
|
3
|
-
import { ArrowDown } from '../../icons';
|
|
4
|
-
import { NavLink } from 'react-router-dom';
|
|
5
|
-
import { StyledNavigationGroup, StyledNavigationGroupButton, StyledNavigationGroupArrowButton, StyledNavigationGroupText, StyledNavigationGroupSlot, EmptyIcon, } from './NavigationGroup.styled';
|
|
6
|
-
const buttonSize = 'small';
|
|
7
|
-
const NavigationGroup = (({ children,
|
|
8
|
-
// Root props
|
|
9
|
-
rootProps, className, classes, style, sx,
|
|
10
|
-
// Button props
|
|
11
|
-
label, icon = _jsx(EmptyIcon, {}), selected, open = false, onOpen, onClose, onClick, openOnClick = true, hideArrow = false, ...props }) => {
|
|
12
|
-
const onGroupClick = (event) => {
|
|
13
|
-
onClick?.(event);
|
|
14
|
-
if (openOnClick && !open) {
|
|
15
|
-
onOpen?.(event);
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
return (_jsxs(_Fragment, { children: [_jsxs(StyledNavigationGroup, { ...rootProps, disablePadding: true, className: className, classes: classes, style: style, sx: sx, children: [_jsxs(StyledNavigationGroupButton, { ...props, disableRipple: true, component: props.component ?? NavLink, size: buttonSize, selected: selected, onClick: onGroupClick, children: [icon && _jsx(StyledNavigationGroupSlot, { children: icon }), _jsx(StyledNavigationGroupText, { primary: label })] }), !hideArrow && (_jsx(StyledNavigationGroupArrowButton, { disableRipple: true, size: buttonSize, selected: selected, tabIndex: -1, onClick: open ? onClose : onOpen, children: _jsx(StyledNavigationGroupSlot, { children: _jsx(ArrowDown, { style: {
|
|
19
|
-
transform: open ? 'rotate(180deg)' : 'rotate(0deg)',
|
|
20
|
-
} }) }) }))] }), _jsx(Collapse, { in: open, timeout: "auto", unmountOnExit: true, children: children })] }));
|
|
21
|
-
});
|
|
22
|
-
export default NavigationGroup;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { EmptyIcon } from '../List/ListItem.styled';
|
|
2
|
-
export declare const StyledNavigationGroup: import("@emotion/styled").StyledComponent<any, {}, {}>;
|
|
3
|
-
export declare const StyledNavigationGroupButton: import("@emotion/styled").StyledComponent<import("../List/ListItem.types").StyledListItemButtonProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
4
|
-
export declare const StyledNavigationGroupArrowButton: import("@emotion/styled").StyledComponent<import("../List/ListItem.types").StyledListItemButtonProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
5
|
-
export declare const StyledNavigationGroupText: import("@emotion/styled").StyledComponent<any, {}, {}>;
|
|
6
|
-
export declare const StyledNavigationGroupSlot: import("react").ComponentType<any>;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { styled } from '@mui/material';
|
|
2
|
-
import { StyledListItem, StyledListItemButton, StyledListItemStartSlot, StyledListItemText, } from '../List/ListItem.styled';
|
|
3
|
-
export { EmptyIcon } from '../List/ListItem.styled';
|
|
4
|
-
export const StyledNavigationGroup = styled(StyledListItem)({
|
|
5
|
-
width: '100%',
|
|
6
|
-
});
|
|
7
|
-
export const StyledNavigationGroupButton = styled(StyledListItemButton)(({ theme }) => ({
|
|
8
|
-
paddingTop: '8px',
|
|
9
|
-
paddingBottom: '8px',
|
|
10
|
-
'&.Mui-selected': {
|
|
11
|
-
color: theme.palette.lunitTeal[40],
|
|
12
|
-
},
|
|
13
|
-
}));
|
|
14
|
-
export const StyledNavigationGroupArrowButton = styled(StyledNavigationGroupButton)({
|
|
15
|
-
flex: '0 0 auto',
|
|
16
|
-
width: '36px',
|
|
17
|
-
});
|
|
18
|
-
export const StyledNavigationGroupText = styled(StyledListItemText)({
|
|
19
|
-
wordBreak: 'break-all',
|
|
20
|
-
display: '-webkit-box',
|
|
21
|
-
WebkitBoxOrient: 'vertical',
|
|
22
|
-
WebkitLineClamp: 1,
|
|
23
|
-
overflow: 'hidden',
|
|
24
|
-
});
|
|
25
|
-
export const StyledNavigationGroupSlot = StyledListItemStartSlot;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Link } from 'react-router-dom';
|
|
2
|
-
import type { OverridableComponent, OverrideProps } from '@mui/material/OverridableComponent';
|
|
3
|
-
import type { NavigationItemBaseProps } from './NavigationItem.types';
|
|
4
|
-
export interface NavigationGroupBaseProps extends Omit<NavigationItemBaseProps, 'caption'> {
|
|
5
|
-
icon?: React.ReactNode;
|
|
6
|
-
open?: boolean;
|
|
7
|
-
onOpen?: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
8
|
-
onClose?: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
9
|
-
openOnClick?: boolean;
|
|
10
|
-
hideArrow?: boolean;
|
|
11
|
-
}
|
|
12
|
-
export interface NavigationGroupTypeMap<P = object, D extends React.ElementType = typeof Link> {
|
|
13
|
-
props: P & NavigationGroupBaseProps;
|
|
14
|
-
defaultComponent: D;
|
|
15
|
-
}
|
|
16
|
-
/** @see ListItemButton {@link ListItem.types.ts} */
|
|
17
|
-
export type NavigationGroupComponent = OverridableComponent<NavigationGroupTypeMap>;
|
|
18
|
-
export type NavigationGroupProps<D extends React.ElementType = NavigationGroupTypeMap['defaultComponent'], P = object> = OverrideProps<NavigationGroupTypeMap<P, D>, D>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { NavLink } from 'react-router-dom';
|
|
3
|
-
import NavigationItemCaption from './NavigationItemCaption';
|
|
4
|
-
import { EmptyIcon, StyledNavigationItem } from './NavigationItem.styled';
|
|
5
|
-
const NavigationItem = (({ icon = _jsx(EmptyIcon, {}), caption, ...props }) => {
|
|
6
|
-
return (_jsx(StyledNavigationItem, { ...props, component: props.component ?? NavLink, startElement: icon, endElement: _jsx(NavigationItemCaption, { children: caption }) }));
|
|
7
|
-
});
|
|
8
|
-
export default NavigationItem;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { styled, listItemButtonClasses, listItemTextClasses } from '@mui/material';
|
|
2
|
-
import { ListItem } from '../List';
|
|
3
|
-
import { ListItemCaptionClassName } from '../List/ListItemCaption';
|
|
4
|
-
export { EmptyIcon } from '../List/ListItem.styled';
|
|
5
|
-
export const StyledNavigationItem = styled(ListItem)(({ theme }) => ({
|
|
6
|
-
width: '100%',
|
|
7
|
-
[`& > .${listItemButtonClasses.root}`]: {
|
|
8
|
-
paddingTop: '8px',
|
|
9
|
-
paddingBottom: '8px',
|
|
10
|
-
},
|
|
11
|
-
[`& > .${listItemButtonClasses.root} .${listItemTextClasses.root}`]: {
|
|
12
|
-
wordBreak: 'break-all',
|
|
13
|
-
display: '-webkit-box',
|
|
14
|
-
WebkitBoxOrient: 'vertical',
|
|
15
|
-
WebkitLineClamp: 1,
|
|
16
|
-
overflow: 'hidden',
|
|
17
|
-
},
|
|
18
|
-
[`& > .${listItemButtonClasses.root}.Mui-selected`]: {
|
|
19
|
-
color: theme.palette.lunitTeal[40],
|
|
20
|
-
[`.${ListItemCaptionClassName}`]: {
|
|
21
|
-
color: theme.palette.lunitTeal[10],
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
}));
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { NavLink } from 'react-router-dom';
|
|
2
|
-
import type { OverridableComponent, OverrideProps } from '@mui/material/OverridableComponent';
|
|
3
|
-
import type { ListItemProps } from '../List';
|
|
4
|
-
export interface NavigationItemBaseProps extends Omit<ListItemProps, 'startElement' | 'endElement'> {
|
|
5
|
-
icon?: React.ReactNode;
|
|
6
|
-
caption?: React.ReactNode;
|
|
7
|
-
}
|
|
8
|
-
export interface NavigationItemTypeMap<P = object, D extends React.ElementType = typeof NavLink> {
|
|
9
|
-
props: P & NavigationItemBaseProps;
|
|
10
|
-
defaultComponent: D;
|
|
11
|
-
}
|
|
12
|
-
/** @see ListItemButton {@link ListItem.types.ts} */
|
|
13
|
-
export type NavigationItemComponent = OverridableComponent<NavigationItemTypeMap>;
|
|
14
|
-
export type NavigationItemProps<D extends React.ElementType = NavigationItemTypeMap['defaultComponent'], P = object> = OverrideProps<NavigationItemTypeMap<P, D>, D>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export { default as Navigation } from './Navigation';
|
|
2
|
-
export type { NavigationProps } from './Navigation.types';
|
|
3
|
-
export { default as NavigationGroup } from './NavigationGroup';
|
|
4
|
-
export type { NavigationGroupProps } from './NavigationGroup.types';
|
|
5
|
-
export { default as NavigationItem } from './NavigationItem';
|
|
6
|
-
export type { NavigationItemProps } from './NavigationItem.types';
|
|
7
|
-
export { default as NavigationItemCaption } from './NavigationItemCaption';
|
|
8
|
-
export type { NavigationItemCaptionProps } from './NavigationItemCaption.types';
|