@infomaximum/ui-kit 0.17.0 → 0.17.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/BaseTooltip/BaseTooltip.js +7 -3
- package/dist/components/BaseTooltip/BaseTooltip.types.d.ts +1 -0
- package/dist/components/BaseTooltip/BaseTooltip.utils.d.ts +1 -0
- package/dist/components/BaseTooltip/BaseTooltip.utils.js +17 -0
- package/dist/components/BaseTooltip/hooks/useCustomFloating.js +5 -4
- package/dist/components/BaseTooltip/hooks/useShowTooltipController.d.ts +2 -1
- package/dist/components/BaseTooltip/hooks/useShowTooltipController.js +56 -42
- package/dist/components/Dropdown/Dropdown.js +12 -7
- package/dist/components/Dropdown/Dropdown.types.d.ts +56 -19
- package/dist/components/Dropdown/Dropdown.utils.js +6 -2
- package/dist/components/Dropdown/components/Divider/Divider.d.ts +2 -1
- package/dist/components/Dropdown/components/Divider/Divider.js +5 -2
- package/dist/components/Dropdown/components/Divider/Divider.types.d.ts +3 -0
- package/dist/components/Dropdown/components/Group/Group.js +9 -6
- package/dist/components/Dropdown/components/Group/Group.types.d.ts +7 -3
- package/dist/components/Dropdown/components/Item/Item.js +17 -11
- package/dist/components/Dropdown/components/Item/Item.types.d.ts +1 -1
- package/dist/components/Dropdown/components/Menu/Menu.js +33 -12
- package/dist/components/Dropdown/components/Menu/Menu.styles.d.ts +1 -0
- package/dist/components/Dropdown/components/Menu/Menu.styles.js +2 -1
- package/dist/components/Dropdown/components/Menu/Menu.types.d.ts +0 -1
- package/dist/components/Dropdown/components/SubMenu/SubMenu.js +13 -6
- package/dist/components/Dropdown/components/SubMenu/SubMenu.types.d.ts +2 -2
- package/dist/components/Dropdown/components/SubMenu/SubMenu.utils.d.ts +2 -2
- package/dist/components/Dropdown/contexts/dropdownContext.d.ts +13 -9
- package/dist/components/Dropdown/hooks/useSelectedKeysController.d.ts +20 -16
- package/dist/components/Dropdown/hooks/useSelectedKeysController.js +7 -2
- package/dist/components/Dropdown/hooks/useSubMenusController.d.ts +5 -4
- package/dist/components/Dropdown/index.d.ts +2 -1
- package/dist/components/Tabs/Tabs.js +1 -1
- package/dist/components/Tabs/Tabs.types.d.ts +5 -4
- package/dist/components/Tabs/Tabs.utils.d.ts +3 -2
- package/dist/components/Tabs/components/TabBar/TabBar.types.d.ts +3 -2
- package/dist/components/Tabs/components/TabItem/TabItem.types.d.ts +8 -7
- package/dist/components/Tabs/hooks/useMoreTabsController.d.ts +5 -5
- package/dist/components/Tabs/hooks/useTabsDndController.d.ts +2 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -0
- package/package.json +1 -1
|
@@ -1,31 +1,35 @@
|
|
|
1
1
|
import { MouseEvent } from 'react';
|
|
2
|
-
import { ItemType } from '../Dropdown.types';
|
|
2
|
+
import { DropdownItemKeyType, ItemType } from '../Dropdown.types';
|
|
3
3
|
interface UseSelectedKeysControllerProps {
|
|
4
|
-
defaultSelectedKeys:
|
|
5
|
-
selectedKeys:
|
|
4
|
+
defaultSelectedKeys: DropdownItemKeyType[] | undefined;
|
|
5
|
+
selectedKeys: DropdownItemKeyType[] | undefined;
|
|
6
6
|
multiple: boolean;
|
|
7
7
|
selectable: boolean;
|
|
8
|
-
onClick
|
|
8
|
+
onClick?: (props: {
|
|
9
9
|
item: ItemType;
|
|
10
|
-
key:
|
|
10
|
+
key: DropdownItemKeyType;
|
|
11
11
|
e: MouseEvent;
|
|
12
|
-
}) => void
|
|
13
|
-
onSelect
|
|
12
|
+
}) => void;
|
|
13
|
+
onSelect?: (props: {
|
|
14
14
|
item: ItemType;
|
|
15
|
-
key:
|
|
15
|
+
key: DropdownItemKeyType;
|
|
16
16
|
e: MouseEvent;
|
|
17
|
-
}) => void
|
|
18
|
-
onDeselect
|
|
17
|
+
}) => void;
|
|
18
|
+
onDeselect?: (props: {
|
|
19
19
|
item: ItemType;
|
|
20
|
-
key:
|
|
20
|
+
key: DropdownItemKeyType;
|
|
21
21
|
e: MouseEvent;
|
|
22
|
-
}) => void
|
|
22
|
+
}) => void;
|
|
23
23
|
}
|
|
24
24
|
export declare const useSelectedKeysController: ({ defaultSelectedKeys, selectedKeys, multiple, selectable, onClick, onSelect, onDeselect, }: UseSelectedKeysControllerProps) => {
|
|
25
|
-
currentSelectedKey:
|
|
26
|
-
onMenuItemClick: (
|
|
25
|
+
currentSelectedKey: DropdownItemKeyType[];
|
|
26
|
+
onMenuItemClick: (props: {
|
|
27
|
+
item: ItemType;
|
|
28
|
+
itemKey: DropdownItemKeyType;
|
|
29
|
+
e: MouseEvent;
|
|
30
|
+
}) => void;
|
|
27
31
|
onMouseUp: (e: MouseEvent) => void;
|
|
28
|
-
select: (itemKey:
|
|
29
|
-
deselect: (itemKey:
|
|
32
|
+
select: (itemKey: DropdownItemKeyType) => void;
|
|
33
|
+
deselect: (itemKey: DropdownItemKeyType) => void;
|
|
30
34
|
};
|
|
31
35
|
export {};
|
|
@@ -17,7 +17,12 @@ const useSelectedKeysController = ({
|
|
|
17
17
|
const deselect = useCallback((itemKey) => {
|
|
18
18
|
setLocalSelectedKeys((prev) => prev.filter((key) => key !== itemKey));
|
|
19
19
|
}, []);
|
|
20
|
-
const handleMenuItemClick = useCallback((
|
|
20
|
+
const handleMenuItemClick = useCallback((props) => {
|
|
21
|
+
const {
|
|
22
|
+
item,
|
|
23
|
+
itemKey,
|
|
24
|
+
e
|
|
25
|
+
} = props;
|
|
21
26
|
e.stopPropagation();
|
|
22
27
|
onClick == null ? void 0 : onClick({
|
|
23
28
|
item,
|
|
@@ -42,7 +47,7 @@ const useSelectedKeysController = ({
|
|
|
42
47
|
key: itemKey,
|
|
43
48
|
e
|
|
44
49
|
});
|
|
45
|
-
}, [deselect, localSelectedKeys, multiple, onClick, onDeselect, onSelect, select, selectedKeys]);
|
|
50
|
+
}, [deselect, localSelectedKeys, multiple, onClick, onDeselect, onSelect, select, selectable, selectedKeys]);
|
|
46
51
|
const handleMouseUp = useCallback((e) => {
|
|
47
52
|
e.stopPropagation();
|
|
48
53
|
}, []);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { DropdownItemKeyType } from '../Dropdown.types';
|
|
1
2
|
export declare const useSubMenusController: () => {
|
|
2
|
-
openedSubMenuKeys:
|
|
3
|
-
openSubMenu: (subMenuKey:
|
|
4
|
-
closeSubMenu: (subMenuKey:
|
|
5
|
-
switchSubMenu: (subMenuKey:
|
|
3
|
+
openedSubMenuKeys: DropdownItemKeyType[];
|
|
4
|
+
openSubMenu: (subMenuKey: DropdownItemKeyType) => void;
|
|
5
|
+
closeSubMenu: (subMenuKey: DropdownItemKeyType) => void;
|
|
6
|
+
switchSubMenu: (subMenuKey: DropdownItemKeyType) => void;
|
|
6
7
|
closeAllSubMenus: () => void;
|
|
7
8
|
};
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export { Dropdown } from './Dropdown';
|
|
2
|
-
export
|
|
2
|
+
export { isSubMenu, isMenuItem, isGroupType, isDivider } from './Dropdown.types';
|
|
3
|
+
export type { DropdownProps, DropdownMenu, ItemType, MenuItem, GroupType, DividerType, SubMenuType, } from './Dropdown.types';
|
|
@@ -51,7 +51,7 @@ const Tabs = memo(({
|
|
|
51
51
|
onTabClick,
|
|
52
52
|
onTabScroll
|
|
53
53
|
};
|
|
54
|
-
return /* @__PURE__ */ jsxs("div", { css: [tabsStyle.wrapper, (_b = styles == null ? void 0 : styles.wrapper) == null ? void 0 : _b.call(styles, theme), process.env.NODE_ENV === "production" ? "" : ";label:Tabs;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
54
|
+
return /* @__PURE__ */ jsxs("div", { css: [tabsStyle.wrapper, (_b = styles == null ? void 0 : styles.wrapper) == null ? void 0 : _b.call(styles, theme), process.env.NODE_ENV === "production" ? "" : ";label:Tabs;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbI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hZ2dhYmxlLFxuICAgICAgc2l6ZSxcbiAgICAgIGJvcmRlcixcbiAgICAgIG1vcmUsXG4gICAgICBwb3B1cENsYXNzTmFtZSxcbiAgICAgIGN1cnJlbnRBY3RpdmVLZXksXG4gICAgICBjb250ZW50V3JhcHBlcixcbiAgICAgIHN0eWxlczogc3R5bGVzPy50YWJCYXIsXG4gICAgICBjaGFuZ2VBY3RpdmVLZXksXG4gICAgICBvbkNoYW5nZSxcbiAgICAgIG9uVGFiQ2xpY2ssXG4gICAgICBvblRhYlNjcm9sbCxcbiAgICB9O1xuXG4gICAgcmV0dXJuIChcbiAgICAgIDxkaXYgY3NzPXtbdGFic1N0eWxlLndyYXBwZXIsIHN0eWxlcz8ud3JhcHBlcj8uKHRoZW1lKV19IHRlc3QtaWQ9e3Rlc3RJZH0+XG4gICAgICAgIHtpc0Z1bmN0aW9uKHJlbmRlclRhYkJhcikgPyByZW5kZXJUYWJCYXIodGFiQmFyUHJvcHMsIFRhYkJhcikgOiA8VGFiQmFyIHsuLi50YWJCYXJQcm9wc30gLz59XG5cbiAgICAgICAgPGRpdiBjc3M9e3N0eWxlcz8uY29udGVudD8uKHRoZW1lKX0gcmVmPXtjb250ZW50V3JhcHBlclJlZn0gLz5cbiAgICAgIDwvZGl2PlxuICAgICk7XG4gIH1cbik7XG4iXX0= */"], "test-id": testId, children: [
|
|
55
55
|
isFunction(renderTabBar) ? renderTabBar(tabBarProps, TabBar) : /* @__PURE__ */ jsx(TabBar, { ...tabBarProps }),
|
|
56
56
|
/* @__PURE__ */ jsx("div", { css: (_c = styles == null ? void 0 : styles.content) == null ? void 0 : _c.call(styles, theme), ref: contentWrapperRef })
|
|
57
57
|
] });
|
|
@@ -4,10 +4,11 @@ import { Theme } from 'themes';
|
|
|
4
4
|
import { TabItem } from './components/TabItem/TabItem.types';
|
|
5
5
|
import { TabBarProps } from './components/TabBar/TabBar.types';
|
|
6
6
|
import { Interpolation } from '@emotion/react';
|
|
7
|
+
import { DropdownItemKeyType } from 'components/Dropdown/Dropdown.types';
|
|
7
8
|
export type TabsSizeType = "middle" | "small";
|
|
8
9
|
export interface TabsProps {
|
|
9
|
-
activeKey?:
|
|
10
|
-
defaultActiveKey?:
|
|
10
|
+
activeKey?: DropdownItemKeyType;
|
|
11
|
+
defaultActiveKey?: DropdownItemKeyType;
|
|
11
12
|
items?: TabItem[];
|
|
12
13
|
more?: DropdownProps;
|
|
13
14
|
popupClassName?: string;
|
|
@@ -23,7 +24,7 @@ export interface TabsProps {
|
|
|
23
24
|
tabBar?: TabBarProps["styles"];
|
|
24
25
|
};
|
|
25
26
|
renderTabBar?: (props: TabBarProps, DefaultTabBar: FC<TabBarProps>) => React.ReactElement;
|
|
26
|
-
onChange?: (activeKey:
|
|
27
|
-
onTabClick?: (activeKey:
|
|
27
|
+
onChange?: (activeKey: DropdownItemKeyType) => void;
|
|
28
|
+
onTabClick?: (activeKey: DropdownItemKeyType, event: MouseEvent) => void;
|
|
28
29
|
onTabScroll?: (direction: "left" | "right") => void;
|
|
29
30
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DropdownItemKeyType } from 'components/Dropdown/Dropdown.types';
|
|
1
2
|
import { TabItem } from './components/TabItem/TabItem.types';
|
|
2
|
-
export declare const getTabKeysWithoutOrdering: (items: TabItem[]) =>
|
|
3
|
-
export declare const getOrderedTabKeys: (currentOrderedTabKeys:
|
|
3
|
+
export declare const getTabKeysWithoutOrdering: (items: TabItem[]) => DropdownItemKeyType[];
|
|
4
|
+
export declare const getOrderedTabKeys: (currentOrderedTabKeys: DropdownItemKeyType[], newTabKeys: DropdownItemKeyType[]) => DropdownItemKeyType[];
|
|
@@ -2,8 +2,9 @@ import { Interpolation } from '@emotion/react';
|
|
|
2
2
|
import { TabsProps } from 'components/Tabs/Tabs.types';
|
|
3
3
|
import { Theme } from 'themes';
|
|
4
4
|
import { TabItemProps } from '../TabItem/TabItem.types';
|
|
5
|
+
import { DropdownItemKeyType } from 'components/Dropdown/Dropdown.types';
|
|
5
6
|
export interface TabBarProps extends Omit<TabsProps, "activeKey" | "defaultActiveKey" | "styles" | "renderTabBar"> {
|
|
6
|
-
currentActiveKey:
|
|
7
|
+
currentActiveKey: DropdownItemKeyType | undefined;
|
|
7
8
|
contentWrapper: HTMLDivElement | null;
|
|
8
9
|
styles?: {
|
|
9
10
|
wrapper?: (theme: Theme) => Interpolation;
|
|
@@ -12,5 +13,5 @@ export interface TabBarProps extends Omit<TabsProps, "activeKey" | "defaultActiv
|
|
|
12
13
|
more?: (theme: Theme) => Interpolation;
|
|
13
14
|
tabItem?: TabItemProps["styles"];
|
|
14
15
|
};
|
|
15
|
-
changeActiveKey: (key:
|
|
16
|
+
changeActiveKey: (key: DropdownItemKeyType) => void;
|
|
16
17
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Interpolation } from '@emotion/react';
|
|
2
|
+
import { DropdownItemKeyType } from 'components/Dropdown/Dropdown.types';
|
|
2
3
|
import { TabsSizeType } from 'components/Tabs/Tabs.types';
|
|
3
4
|
import { MouseEvent, ReactNode } from 'react';
|
|
4
5
|
import { Theme } from 'themes';
|
|
5
6
|
export interface TabItem {
|
|
6
|
-
key:
|
|
7
|
+
key: DropdownItemKeyType;
|
|
7
8
|
disabled?: boolean;
|
|
8
9
|
forceRender?: boolean;
|
|
9
10
|
label?: ReactNode;
|
|
@@ -11,12 +12,12 @@ export interface TabItem {
|
|
|
11
12
|
children?: ReactNode;
|
|
12
13
|
}
|
|
13
14
|
export interface TabItemProps extends Omit<TabItem, "key"> {
|
|
14
|
-
itemKey:
|
|
15
|
+
itemKey: DropdownItemKeyType;
|
|
15
16
|
selected: boolean;
|
|
16
17
|
contentWrapper: HTMLDivElement | null;
|
|
17
|
-
changeActiveKey: (key:
|
|
18
|
-
addHiddenTab: (itemKey:
|
|
19
|
-
deleteHiddenTab: (itemKey:
|
|
18
|
+
changeActiveKey: (key: DropdownItemKeyType) => void;
|
|
19
|
+
addHiddenTab: (itemKey: DropdownItemKeyType) => void;
|
|
20
|
+
deleteHiddenTab: (itemKey: DropdownItemKeyType) => void;
|
|
20
21
|
setCurrentTabElement: (tab: HTMLElement | null) => void;
|
|
21
22
|
scrollToTab: (element: HTMLElement | null) => void;
|
|
22
23
|
size?: TabsSizeType;
|
|
@@ -27,6 +28,6 @@ export interface TabItemProps extends Omit<TabItem, "key"> {
|
|
|
27
28
|
labelWrapper?: (theme: Theme, selected: boolean) => Interpolation;
|
|
28
29
|
childrenWrapper?: (theme: Theme, selected: boolean) => Interpolation;
|
|
29
30
|
};
|
|
30
|
-
onChange?: (activeKey:
|
|
31
|
-
onTabClick?: (activeKey:
|
|
31
|
+
onChange?: (activeKey: DropdownItemKeyType) => void;
|
|
32
|
+
onTabClick?: (activeKey: DropdownItemKeyType, event: MouseEvent) => void;
|
|
32
33
|
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { MouseEvent } from 'react';
|
|
2
2
|
import { TabItem } from '../components/TabItem/TabItem.types';
|
|
3
|
-
import { ItemType, MenuItem } from 'components/Dropdown/Dropdown.types';
|
|
4
|
-
export declare const useMoreTabsController: (items: TabItem[], currentActiveKey:
|
|
3
|
+
import { DropdownItemKeyType, ItemType, MenuItem } from 'components/Dropdown/Dropdown.types';
|
|
4
|
+
export declare const useMoreTabsController: (items: TabItem[], currentActiveKey: DropdownItemKeyType | undefined, currentTabElement: HTMLElement | null, onTabClick: ((activeKey: DropdownItemKeyType, event: MouseEvent) => void) | undefined, onChange: ((activeKey: DropdownItemKeyType) => void) | undefined, changeActiveKey: (key: DropdownItemKeyType) => void) => {
|
|
5
5
|
tabsRef: import('react').MutableRefObject<HTMLDivElement | null>;
|
|
6
6
|
dropdownMenu: {
|
|
7
7
|
items: MenuItem[];
|
|
8
8
|
onClick: (props: {
|
|
9
9
|
item: ItemType;
|
|
10
|
-
key:
|
|
10
|
+
key: DropdownItemKeyType;
|
|
11
11
|
e: MouseEvent;
|
|
12
12
|
}) => void;
|
|
13
13
|
};
|
|
14
|
-
addHiddenTab: (itemKey:
|
|
15
|
-
deleteHiddenTab: (itemKey:
|
|
14
|
+
addHiddenTab: (itemKey: DropdownItemKeyType) => void;
|
|
15
|
+
deleteHiddenTab: (itemKey: DropdownItemKeyType) => void;
|
|
16
16
|
scrollToTab: (element: HTMLElement | null) => void;
|
|
17
17
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { TabItem } from '../components/TabItem/TabItem.types';
|
|
2
2
|
import { DragEndEvent } from '@dnd-kit/core';
|
|
3
|
+
import { DropdownItemKeyType } from 'components/Dropdown/Dropdown.types';
|
|
3
4
|
export declare const useTabsDndController: (items: TabItem[], draggable: boolean) => {
|
|
4
|
-
tabsOrder:
|
|
5
|
+
tabsOrder: DropdownItemKeyType[];
|
|
5
6
|
isDragging: boolean;
|
|
6
7
|
dndEvents: {
|
|
7
8
|
onDragStart: () => void;
|
package/dist/index.d.ts
CHANGED
|
@@ -28,8 +28,8 @@ export type { MessageObjectType } from './components/Message';
|
|
|
28
28
|
export { type TimePickerProps, TimePicker } from './components/TimePicker';
|
|
29
29
|
export { type DatePickerProps, DatePicker } from './components/DatePicker';
|
|
30
30
|
export { type UploadProps, Upload } from './components/Upload';
|
|
31
|
-
export { Dropdown } from './components/Dropdown';
|
|
32
|
-
export type { DropdownProps, DropdownMenu } from './components/Dropdown';
|
|
31
|
+
export { Dropdown, isSubMenu, isMenuItem, isGroupType, isDivider } from './components/Dropdown';
|
|
32
|
+
export type { DropdownProps, DropdownMenu, ItemType, MenuItem, GroupType, DividerType, SubMenuType, } from './components/Dropdown';
|
|
33
33
|
export { type ProgressProps, Progress } from './components/Progress';
|
|
34
34
|
export { Avatar, avatarColors } from './components/Avatar';
|
|
35
35
|
export type { AvatarProps, AvatarColorType } from './components/Avatar';
|
package/dist/index.js
CHANGED
|
@@ -22,6 +22,7 @@ import { TimePicker } from "./components/TimePicker/TimePicker.js";
|
|
|
22
22
|
import { DatePicker } from "./components/DatePicker/DatePicker.js";
|
|
23
23
|
import { Upload } from "./components/Upload/Upload.js";
|
|
24
24
|
import { Dropdown } from "./components/Dropdown/Dropdown.js";
|
|
25
|
+
import { isDivider, isGroupType, isMenuItem, isSubMenu } from "./components/Dropdown/Dropdown.types.js";
|
|
25
26
|
import { Progress } from "./components/Progress/Progress.js";
|
|
26
27
|
import { Avatar } from "./components/Avatar/Avatar.js";
|
|
27
28
|
import { avatarColors } from "./components/Avatar/Avatar.utils.js";
|
|
@@ -72,6 +73,10 @@ export {
|
|
|
72
73
|
avatarColors,
|
|
73
74
|
inputNumberWrapperClassName,
|
|
74
75
|
isCheckboxChangeEvent,
|
|
76
|
+
isDivider,
|
|
77
|
+
isGroupType,
|
|
78
|
+
isMenuItem,
|
|
79
|
+
isSubMenu,
|
|
75
80
|
message,
|
|
76
81
|
messagesHolder,
|
|
77
82
|
themeMap,
|