@synerise/ds-app-menu 1.2.8 → 1.2.10
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/CHANGELOG.md +8 -0
- package/README.md +11 -8
- package/dist/AppMenu.d.ts +3 -3
- package/dist/AppMenu.js +34 -39
- package/dist/AppMenu.styles.d.ts +3 -3
- package/dist/AppMenu.styles.js +11 -14
- package/dist/AppMenu.types.d.ts +1 -1
- package/dist/AppMenu.types.js +1 -1
- package/dist/Item/Icon/Icon.d.ts +1 -1
- package/dist/Item/Icon/Icon.js +15 -14
- package/dist/Item/Icon/Icon.styles.d.ts +1 -1
- package/dist/Item/Icon/Icon.styles.js +7 -6
- package/dist/Item/Item.d.ts +1 -1
- package/dist/Item/Item.js +27 -31
- package/dist/Item/Item.styles.d.ts +2 -2
- package/dist/Item/Item.styles.js +9 -7
- package/dist/MenuContext/MenuContext.d.ts +1 -1
- package/dist/MenuContext/MenuContext.js +5 -3
- package/dist/NavigableItems/NavigableItems.d.ts +1 -1
- package/dist/NavigableItems/NavigableItems.js +44 -60
- package/dist/NavigableItems/NavigableItems.styles.d.ts +1 -1
- package/dist/NavigableItems/NavigableItems.styles.js +8 -5
- package/dist/SubMenu/Item/Item.d.ts +3 -3
- package/dist/SubMenu/Item/Item.js +15 -16
- package/dist/SubMenu/Item/Item.styles.d.ts +2 -2
- package/dist/SubMenu/Item/Item.styles.js +9 -9
- package/dist/SubMenu/Item/Item.types.d.ts +1 -1
- package/dist/SubMenu/Item/Item.types.js +1 -1
- package/dist/SubMenu/SubMenu.d.ts +2 -2
- package/dist/SubMenu/SubMenu.js +16 -16
- package/dist/SubMenu/SubMenu.styles.d.ts +3 -3
- package/dist/SubMenu/SubMenu.styles.js +12 -17
- package/dist/SubMenu/SubMenu.types.d.ts +2 -2
- package/dist/SubMenu/SubMenu.types.js +1 -1
- package/dist/SubMenu/SubMenuContext/SubMenuContext.d.ts +2 -2
- package/dist/SubMenu/SubMenuContext/SubMenuContext.js +5 -3
- package/dist/SubMenu/SubMenuContext/SubMenuContext.types.js +1 -1
- package/dist/hooks/useMenu.js +9 -6
- package/dist/hooks/useSubMenu.js +9 -6
- package/dist/index.js +8 -3
- package/dist/modules.d.js +1 -1
- package/dist/modules.d.ts +0 -0
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.2.10](https://github.com/Synerise/synerise-design/compare/@synerise/ds-app-menu@1.2.9...@synerise/ds-app-menu@1.2.10) (2026-03-24)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-app-menu
|
|
9
|
+
|
|
10
|
+
## [1.2.9](https://github.com/Synerise/synerise-design/compare/@synerise/ds-app-menu@1.2.8...@synerise/ds-app-menu@1.2.9) (2026-03-20)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @synerise/ds-app-menu
|
|
13
|
+
|
|
6
14
|
## [1.2.8](https://github.com/Synerise/synerise-design/compare/@synerise/ds-app-menu@1.2.7...@synerise/ds-app-menu@1.2.8) (2026-03-09)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @synerise/ds-app-menu
|
package/README.md
CHANGED
|
@@ -61,16 +61,17 @@ import Icon, { DashboardColorM, DashboardGreyM, SettingsColorM, AnalyticsColorM
|
|
|
61
61
|
| activeItem | ID of active menu item | string | - |
|
|
62
62
|
| footer | Footer of menu | React.ReactNode | - |
|
|
63
63
|
| children | Menu items | React.ReactNodeArray | - |
|
|
64
|
-
| top | Distance from top of window in px | number |
|
|
64
|
+
| top | Distance from top of window in px | number | 0 |
|
|
65
65
|
|
|
66
66
|
### AppMenu.Item
|
|
67
67
|
|
|
68
68
|
| Property | Description | Type | Default |
|
|
69
69
|
| -------- | --------------------------- | --------------- | ------- |
|
|
70
|
-
| subMenu
|
|
71
|
-
| name
|
|
72
|
-
| id
|
|
73
|
-
| children
|
|
70
|
+
| subMenu | Submenu component | React.ReactNode | - |
|
|
71
|
+
| name | Name visible in tooltip | string | - |
|
|
72
|
+
| id | ID of menu item | string | - |
|
|
73
|
+
| children | Menu item children ie. icon | React.ReactNode | - |
|
|
74
|
+
| className | Custom CSS class | string | - |
|
|
74
75
|
|
|
75
76
|
### AppMenu.Item.Icon
|
|
76
77
|
|
|
@@ -81,9 +82,11 @@ import Icon, { DashboardColorM, DashboardGreyM, SettingsColorM, AnalyticsColorM
|
|
|
81
82
|
|
|
82
83
|
### AppMenu.SubMenu
|
|
83
84
|
|
|
84
|
-
| Property
|
|
85
|
-
|
|
|
86
|
-
| children
|
|
85
|
+
| Property | Description | Type | Default |
|
|
86
|
+
| --------- | ---------------- | --------------- | ------- |
|
|
87
|
+
| children | Submenu elements | React.ReactNode | - |
|
|
88
|
+
| className | Custom CSS class | string | - |
|
|
89
|
+
| style | Inline styles | CSSProperties | - |
|
|
87
90
|
|
|
88
91
|
### AppMenu.SubMenu.Title
|
|
89
92
|
|
package/dist/AppMenu.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { AppMenuProps } from './AppMenu.types';
|
|
3
3
|
declare const AppMenu: {
|
|
4
4
|
({ className, children, footer, activeItem: activeId, top, }: AppMenuProps): React.JSX.Element;
|
|
5
|
-
SubMenu: React.FC<import(
|
|
5
|
+
SubMenu: React.FC<import('./SubMenu/SubMenu.types').SubMenuProps> & import('./SubMenu/SubMenu.types').SubComponents;
|
|
6
6
|
Item: {
|
|
7
7
|
({ children, subMenu, id, name, className }: {
|
|
8
8
|
subMenu?: React.ReactElement;
|
package/dist/AppMenu.js
CHANGED
|
@@ -1,45 +1,40 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
setActiveItem = _React$useState2[1];
|
|
21
|
-
var ref = React.useRef(null);
|
|
22
|
-
useOnClickOutside(ref, function () {
|
|
1
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { useOnClickOutside } from "@synerise/ds-utils";
|
|
4
|
+
import { MenuWrapper, ItemsWrapper, ItemsDivider } from "./AppMenu.styles.js";
|
|
5
|
+
import Item from "./Item/Item.js";
|
|
6
|
+
import MenuContext from "./MenuContext/MenuContext.js";
|
|
7
|
+
import NavigableItems from "./NavigableItems/NavigableItems.js";
|
|
8
|
+
import SubMenu from "./SubMenu/SubMenu.js";
|
|
9
|
+
const AppMenu = ({
|
|
10
|
+
className,
|
|
11
|
+
children,
|
|
12
|
+
footer,
|
|
13
|
+
activeItem: activeId,
|
|
14
|
+
top = 0
|
|
15
|
+
}) => {
|
|
16
|
+
const [isOpened, setOpened] = React.useState(false);
|
|
17
|
+
const [activeItem, setActiveItem] = React.useState(activeId);
|
|
18
|
+
const ref = React.useRef(null);
|
|
19
|
+
useOnClickOutside(ref, () => {
|
|
23
20
|
setOpened(false);
|
|
24
21
|
setActiveItem(activeId);
|
|
25
22
|
});
|
|
26
|
-
return
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
onHideMenu: function onHideMenu() {
|
|
39
|
-
return setOpened(false);
|
|
40
|
-
}
|
|
41
|
-
}, children), footer && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(S.ItemsDivider, null), footer))));
|
|
23
|
+
return /* @__PURE__ */ jsx(MenuWrapper, { className: `${className || ""} menu ${isOpened ? "menu--opened" : ""} ds-app-menu`, ref, top, children: /* @__PURE__ */ jsx(ItemsWrapper, { children: /* @__PURE__ */ jsxs(MenuContext.Provider, { value: {
|
|
24
|
+
isOpened,
|
|
25
|
+
setOpened,
|
|
26
|
+
activeItem,
|
|
27
|
+
setActiveItem
|
|
28
|
+
}, children: [
|
|
29
|
+
/* @__PURE__ */ jsx(NavigableItems, { onHideMenu: () => setOpened(false), children }),
|
|
30
|
+
footer && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
31
|
+
/* @__PURE__ */ jsx(ItemsDivider, {}),
|
|
32
|
+
footer
|
|
33
|
+
] })
|
|
34
|
+
] }) }) });
|
|
42
35
|
};
|
|
43
36
|
AppMenu.SubMenu = SubMenu;
|
|
44
37
|
AppMenu.Item = Item;
|
|
45
|
-
export
|
|
38
|
+
export {
|
|
39
|
+
AppMenu as default
|
|
40
|
+
};
|
package/dist/AppMenu.styles.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare const MenuWrapper: import(
|
|
1
|
+
export declare const MenuWrapper: import('styled-components').StyledComponent<"div", any, {
|
|
2
2
|
top: number;
|
|
3
3
|
}, never>;
|
|
4
|
-
export declare const ItemsWrapper: import(
|
|
5
|
-
export declare const ItemsDivider: import(
|
|
4
|
+
export declare const ItemsWrapper: import('styled-components').StyledComponent<"ul", any, {}, never>;
|
|
5
|
+
export declare const ItemsDivider: import('styled-components').StyledComponent<"div", any, {}, never>;
|
package/dist/AppMenu.styles.js
CHANGED
|
@@ -1,21 +1,18 @@
|
|
|
1
|
-
import styled from
|
|
2
|
-
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
const MenuWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
3
3
|
displayName: "AppMenustyles__MenuWrapper",
|
|
4
4
|
componentId: "sc-3a0k9p-0"
|
|
5
|
-
})(["background:", ";height:calc(100% - ", "px);position:fixed;left:0;top:", "px;width:60px;box-shadow:0 4px 12px 0 rgba(35,41,54,0.04);display:flex;flex-flow:column;align-items:center;padding-top:12px;transition:all 0.25s cubic-bezier(0.95,0.17,0.27,0.79);transition-delay:0.25s;overflow:hidden;&.menu--opened{transition-delay:0s;width:322px;}"],
|
|
6
|
-
|
|
7
|
-
}, function (props) {
|
|
8
|
-
return props.top;
|
|
9
|
-
}, function (props) {
|
|
10
|
-
return props.top;
|
|
11
|
-
});
|
|
12
|
-
export var ItemsWrapper = styled.ul.withConfig({
|
|
5
|
+
})(["background:", ";height:calc(100% - ", "px);position:fixed;left:0;top:", "px;width:60px;box-shadow:0 4px 12px 0 rgba(35,41,54,0.04);display:flex;flex-flow:column;align-items:center;padding-top:12px;transition:all 0.25s cubic-bezier(0.95,0.17,0.27,0.79);transition-delay:0.25s;overflow:hidden;&.menu--opened{transition-delay:0s;width:322px;}"], (props) => props.theme.palette.white, (props) => props.top, (props) => props.top);
|
|
6
|
+
const ItemsWrapper = /* @__PURE__ */ styled.ul.withConfig({
|
|
13
7
|
displayName: "AppMenustyles__ItemsWrapper",
|
|
14
8
|
componentId: "sc-3a0k9p-1"
|
|
15
9
|
})(["padding:12px 0 0;margin:0;height:100%;position:absolute;left:0;top:0;width:60px;display:flex;flex-flow:column;align-items:center;z-index:2;list-style:none;"]);
|
|
16
|
-
|
|
10
|
+
const ItemsDivider = /* @__PURE__ */ styled.div.withConfig({
|
|
17
11
|
displayName: "AppMenustyles__ItemsDivider",
|
|
18
12
|
componentId: "sc-3a0k9p-2"
|
|
19
|
-
})(["width:40px;border-bottom:1px solid ", ";flex:1 1 auto;"],
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
})(["width:40px;border-bottom:1px solid ", ";flex:1 1 auto;"], (props) => props.theme.palette["grey-100"]);
|
|
14
|
+
export {
|
|
15
|
+
ItemsDivider,
|
|
16
|
+
ItemsWrapper,
|
|
17
|
+
MenuWrapper
|
|
18
|
+
};
|
package/dist/AppMenu.types.d.ts
CHANGED
package/dist/AppMenu.types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
package/dist/Item/Icon/Icon.d.ts
CHANGED
package/dist/Item/Icon/Icon.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import IconComponent from
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
component: active
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import IconComponent from "@synerise/ds-icon";
|
|
3
|
+
import { Wrapper } from "./Icon.styles.js";
|
|
4
|
+
const AppMenuIcon = ({
|
|
5
|
+
active,
|
|
6
|
+
inActive
|
|
7
|
+
}) => {
|
|
8
|
+
return /* @__PURE__ */ jsxs(Wrapper, { children: [
|
|
9
|
+
/* @__PURE__ */ jsx(IconComponent, { className: "item__icon item__icon--active", component: active }),
|
|
10
|
+
/* @__PURE__ */ jsx(IconComponent, { className: "item__icon item__icon--in-active", component: inActive })
|
|
11
|
+
] });
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
AppMenuIcon,
|
|
15
|
+
AppMenuIcon as default
|
|
14
16
|
};
|
|
15
|
-
export default AppMenuIcon;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const Wrapper: import(
|
|
1
|
+
export declare const Wrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
2
2
|
export default Wrapper;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import styled from
|
|
2
|
-
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
const Wrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
3
3
|
displayName: "Iconstyles__Wrapper",
|
|
4
4
|
componentId: "sc-1gdlsp-0"
|
|
5
|
-
})(["position:relative;height:24px;width:24px;color:", ";.item__icon{position:absolute;transition:opacity 0.3s ease-in-out;}"],
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
})(["position:relative;height:24px;width:24px;color:", ";.item__icon{position:absolute;transition:opacity 0.3s ease-in-out;}"], (props) => props.theme.palette["grey-600"]);
|
|
6
|
+
export {
|
|
7
|
+
Wrapper,
|
|
8
|
+
Wrapper as default
|
|
9
|
+
};
|
package/dist/Item/Item.d.ts
CHANGED
package/dist/Item/Item.js
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import Tooltip from
|
|
3
|
-
import SubMenuContext from
|
|
4
|
-
import { useMenu } from
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import Tooltip from "@synerise/ds-tooltip";
|
|
3
|
+
import SubMenuContext from "../SubMenu/SubMenuContext/SubMenuContext.js";
|
|
4
|
+
import { useMenu } from "../hooks/useMenu.js";
|
|
5
|
+
import { AppMenuIcon } from "./Icon/Icon.js";
|
|
6
|
+
import { ItemWrapper, ItemLink } from "./Item.styles.js";
|
|
7
|
+
const Item = ({
|
|
8
|
+
children,
|
|
9
|
+
subMenu,
|
|
10
|
+
id,
|
|
11
|
+
name,
|
|
12
|
+
className
|
|
13
|
+
}) => {
|
|
14
|
+
const menuContext = useMenu();
|
|
15
|
+
const isActive = menuContext.activeItem === id;
|
|
16
|
+
const isActiveSubMenu = isActive && menuContext.isOpened;
|
|
17
|
+
const handleOpen = () => {
|
|
17
18
|
if (isActive) {
|
|
18
19
|
menuContext.setOpened(!!subMenu && !menuContext.isOpened);
|
|
19
20
|
} else {
|
|
@@ -21,21 +22,16 @@ var Item = function Item(_ref) {
|
|
|
21
22
|
menuContext.setActiveItem(id);
|
|
22
23
|
}
|
|
23
24
|
};
|
|
24
|
-
return
|
|
25
|
-
className:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
title: isActive && menuContext.isOpened ? '' : name
|
|
29
|
-
}, /*#__PURE__*/React.createElement(S.ItemLink, {
|
|
30
|
-
className: "menu__item " + (isActive ? 'menu__item--active' : ''),
|
|
31
|
-
onClick: handleOpen
|
|
32
|
-
}, children)), subMenu && id && /*#__PURE__*/React.createElement(SubMenuContext.Provider, {
|
|
33
|
-
value: {
|
|
34
|
-
id: id,
|
|
25
|
+
return /* @__PURE__ */ jsxs(ItemWrapper, { className, children: [
|
|
26
|
+
/* @__PURE__ */ jsx(Tooltip, { placement: "right", title: isActive && menuContext.isOpened ? "" : name, children: /* @__PURE__ */ jsx(ItemLink, { className: `menu__item ${isActive ? "menu__item--active" : ""}`, onClick: handleOpen, children }) }),
|
|
27
|
+
subMenu && id && /* @__PURE__ */ jsx(SubMenuContext.Provider, { value: {
|
|
28
|
+
id,
|
|
35
29
|
isActive: isActiveSubMenu,
|
|
36
30
|
setOpened: menuContext.setOpened
|
|
37
|
-
}
|
|
38
|
-
}
|
|
31
|
+
}, children: subMenu })
|
|
32
|
+
] });
|
|
33
|
+
};
|
|
34
|
+
Item.Icon = AppMenuIcon;
|
|
35
|
+
export {
|
|
36
|
+
Item as default
|
|
39
37
|
};
|
|
40
|
-
Item.Icon = Icon;
|
|
41
|
-
export default Item;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const ItemLink: import(
|
|
2
|
-
export declare const ItemWrapper: import(
|
|
1
|
+
export declare const ItemLink: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export declare const ItemWrapper: import('styled-components').StyledComponent<"li", any, {}, never>;
|
|
3
3
|
export default ItemWrapper;
|
package/dist/Item/Item.styles.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import styled from
|
|
2
|
-
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
const ItemLink = /* @__PURE__ */ styled.div.withConfig({
|
|
3
3
|
displayName: "Itemstyles__ItemLink",
|
|
4
4
|
componentId: "sc-1hq0xvl-0"
|
|
5
|
-
})(["position:relative;display:flex;align-items:center;align-content:center;justify-content:center;height:40px;width:40px;padding:8px;margin:12px 0;cursor:pointer;border-radius:50%;transition:all 0.3s ease-in-out;.item__icon--active{opacity:0;}.item__icon--in-active{opacity:1;}&:hover,&.menu__item--active{.item__icon--active{opacity:1;}.item__icon--in-active{opacity:0;}}&:hover{background:", ";}> a{position:absolute;display:flex;align-items:center;justify-content:center;width:100%;height:100%;}"],
|
|
6
|
-
|
|
7
|
-
});
|
|
8
|
-
export var ItemWrapper = styled.li.withConfig({
|
|
5
|
+
})(["position:relative;display:flex;align-items:center;align-content:center;justify-content:center;height:40px;width:40px;padding:8px;margin:12px 0;cursor:pointer;border-radius:50%;transition:all 0.3s ease-in-out;.item__icon--active{opacity:0;}.item__icon--in-active{opacity:1;}&:hover,&.menu__item--active{.item__icon--active{opacity:1;}.item__icon--in-active{opacity:0;}}&:hover{background:", ";}> a{position:absolute;display:flex;align-items:center;justify-content:center;width:100%;height:100%;}"], (props) => props.theme.palette["grey-050"]);
|
|
6
|
+
const ItemWrapper = /* @__PURE__ */ styled.li.withConfig({
|
|
9
7
|
displayName: "Itemstyles__ItemWrapper",
|
|
10
8
|
componentId: "sc-1hq0xvl-1"
|
|
11
9
|
})(["display:flex;align-items:center;padding:0;margin:0;height:64px;&:first-child{", "{margin-top:8px;}}"], ItemLink);
|
|
12
|
-
export
|
|
10
|
+
export {
|
|
11
|
+
ItemLink,
|
|
12
|
+
ItemWrapper,
|
|
13
|
+
ItemWrapper as default
|
|
14
|
+
};
|
|
@@ -4,5 +4,5 @@ type MenuContextType = {
|
|
|
4
4
|
setOpened: (opened: boolean) => void;
|
|
5
5
|
setActiveItem: (subMenu: string) => void;
|
|
6
6
|
} | undefined;
|
|
7
|
-
declare const MenuContext: import(
|
|
7
|
+
declare const MenuContext: import('react').Context<MenuContextType>;
|
|
8
8
|
export default MenuContext;
|
|
@@ -1,35 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
animationInProgress = _React$useState3[0],
|
|
21
|
-
setAnimationInProgress = _React$useState3[1];
|
|
22
|
-
var _React$useState4 = React.useState(0),
|
|
23
|
-
lastHeight = _React$useState4[0],
|
|
24
|
-
setLastHeight = _React$useState4[1];
|
|
25
|
-
var countCapacity = React.useCallback(function () {
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import IconComponent, { AngleUpS, AngleDownS } from "@synerise/ds-icon";
|
|
4
|
+
import { ItemWrapper, ItemLink } from "../Item/Item.styles.js";
|
|
5
|
+
import { Wrapper } from "./NavigableItems.styles.js";
|
|
6
|
+
const itemHeight = 64;
|
|
7
|
+
const animationTime = 100;
|
|
8
|
+
const NavigableItems = ({
|
|
9
|
+
children,
|
|
10
|
+
onHideMenu
|
|
11
|
+
}) => {
|
|
12
|
+
const ref = React.useRef(null);
|
|
13
|
+
const [itemsCapacity, setItemsCapacity] = React.useState(Infinity);
|
|
14
|
+
const [currentIndex, setIndex] = React.useState(0);
|
|
15
|
+
const isNavigateTopVisible = currentIndex > 0;
|
|
16
|
+
const isNavigateBottomVisible = currentIndex + itemsCapacity <= children.length;
|
|
17
|
+
const [animationInProgress, setAnimationInProgress] = React.useState("");
|
|
18
|
+
const [lastHeight, setLastHeight] = React.useState(0);
|
|
19
|
+
const countCapacity = React.useCallback(() => {
|
|
26
20
|
if (ref.current) {
|
|
27
|
-
|
|
28
|
-
height
|
|
21
|
+
const {
|
|
22
|
+
height
|
|
23
|
+
} = ref.current.getBoundingClientRect();
|
|
29
24
|
if (height > 0) {
|
|
30
25
|
setLastHeight(height);
|
|
31
26
|
}
|
|
32
|
-
|
|
27
|
+
const itemsHeight = children.length * itemHeight;
|
|
33
28
|
setIndex(0);
|
|
34
29
|
if (itemsHeight > height) {
|
|
35
30
|
setItemsCapacity(Math.floor((height || lastHeight) / itemHeight));
|
|
@@ -38,49 +33,38 @@ var NavigableItems = function NavigableItems(_ref) {
|
|
|
38
33
|
}
|
|
39
34
|
}
|
|
40
35
|
}, [children.length, ref, lastHeight, setLastHeight]);
|
|
41
|
-
React.useEffect(
|
|
42
|
-
window.addEventListener(
|
|
43
|
-
return
|
|
44
|
-
return window.removeEventListener('resize', countCapacity);
|
|
45
|
-
};
|
|
36
|
+
React.useEffect(() => {
|
|
37
|
+
window.addEventListener("resize", countCapacity);
|
|
38
|
+
return () => window.removeEventListener("resize", countCapacity);
|
|
46
39
|
}, [countCapacity]);
|
|
47
|
-
React.useEffect(
|
|
40
|
+
React.useEffect(() => {
|
|
48
41
|
countCapacity();
|
|
49
42
|
}, [countCapacity]);
|
|
50
|
-
|
|
51
|
-
setAnimationInProgress(
|
|
52
|
-
setTimeout(
|
|
53
|
-
setAnimationInProgress(
|
|
43
|
+
const handelNavigateBottom = () => {
|
|
44
|
+
setAnimationInProgress("bottom");
|
|
45
|
+
setTimeout(() => {
|
|
46
|
+
setAnimationInProgress("");
|
|
54
47
|
setIndex(currentIndex ? currentIndex + 1 : currentIndex + 2);
|
|
55
48
|
onHideMenu();
|
|
56
49
|
}, animationTime);
|
|
57
50
|
};
|
|
58
|
-
|
|
59
|
-
setAnimationInProgress(
|
|
60
|
-
setTimeout(
|
|
61
|
-
setAnimationInProgress(
|
|
51
|
+
const handleNavigateTop = () => {
|
|
52
|
+
setAnimationInProgress("top");
|
|
53
|
+
setTimeout(() => {
|
|
54
|
+
setAnimationInProgress("");
|
|
62
55
|
setIndex(currentIndex === 2 ? 0 : currentIndex - 1);
|
|
63
56
|
onHideMenu();
|
|
64
57
|
}, animationTime);
|
|
65
58
|
};
|
|
66
59
|
if (itemsCapacity < children.length) {
|
|
67
|
-
return
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
className: "nav-button nav-button--top"
|
|
73
|
-
}, /*#__PURE__*/React.createElement(ItemStyles.ItemLink, null, /*#__PURE__*/React.createElement(Icon, {
|
|
74
|
-
component: /*#__PURE__*/React.createElement(AngleUpS, null)
|
|
75
|
-
}))), React.Children.toArray(children).splice(currentIndex, itemsCapacity - (isNavigateBottomVisible && isNavigateTopVisible ? 2 : 1)), isNavigateBottomVisible && /*#__PURE__*/React.createElement(ItemStyles.ItemWrapper, {
|
|
76
|
-
onClick: handelNavigateBottom,
|
|
77
|
-
className: "nav-button nav-button--bottom"
|
|
78
|
-
}, /*#__PURE__*/React.createElement(ItemStyles.ItemLink, null, /*#__PURE__*/React.createElement(Icon, {
|
|
79
|
-
component: /*#__PURE__*/React.createElement(AngleDownS, null)
|
|
80
|
-
}))));
|
|
60
|
+
return /* @__PURE__ */ jsxs(Wrapper, { ref, className: `animation--${animationInProgress}`, children: [
|
|
61
|
+
isNavigateTopVisible && /* @__PURE__ */ jsx(ItemWrapper, { onClick: handleNavigateTop, className: "nav-button nav-button--top", children: /* @__PURE__ */ jsx(ItemLink, { children: /* @__PURE__ */ jsx(IconComponent, { component: /* @__PURE__ */ jsx(AngleUpS, {}) }) }) }),
|
|
62
|
+
React.Children.toArray(children).splice(currentIndex, itemsCapacity - (isNavigateBottomVisible && isNavigateTopVisible ? 2 : 1)),
|
|
63
|
+
isNavigateBottomVisible && /* @__PURE__ */ jsx(ItemWrapper, { onClick: handelNavigateBottom, className: "nav-button nav-button--bottom", children: /* @__PURE__ */ jsx(ItemLink, { children: /* @__PURE__ */ jsx(IconComponent, { component: /* @__PURE__ */ jsx(AngleDownS, {}) }) }) })
|
|
64
|
+
] });
|
|
81
65
|
}
|
|
82
|
-
return
|
|
83
|
-
|
|
84
|
-
|
|
66
|
+
return /* @__PURE__ */ jsx(Wrapper, { ref, children });
|
|
67
|
+
};
|
|
68
|
+
export {
|
|
69
|
+
NavigableItems as default
|
|
85
70
|
};
|
|
86
|
-
export default NavigableItems;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const Wrapper: import(
|
|
1
|
+
export declare const Wrapper: import('styled-components').StyledComponent<"ul", any, {}, never>;
|
|
2
2
|
export default Wrapper;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import styled, { keyframes } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import styled, { keyframes } from "styled-components";
|
|
2
|
+
const bottom = /* @__PURE__ */ keyframes(["from{top:0px;}to{top:-48px;}"]);
|
|
3
|
+
const top = /* @__PURE__ */ keyframes(["from{top:0px;}to{top:48px;}"]);
|
|
4
|
+
const Wrapper = /* @__PURE__ */ styled.ul.withConfig({
|
|
5
5
|
displayName: "NavigableItemsstyles__Wrapper",
|
|
6
6
|
componentId: "sc-1gjk7hm-0"
|
|
7
7
|
})(["margin:0;padding:0;flex:1 1 auto;overflow:hidden;&.animation--bottom{> *:not(.nav-button){position:relative;animation:", " 0.1s ease-in-out forwards;}}&.animation--top{> *:not(.nav-button){position:relative;animation:", " 0.1s ease-in-out forwards;}}"], bottom, top);
|
|
8
|
-
export
|
|
8
|
+
export {
|
|
9
|
+
Wrapper,
|
|
10
|
+
Wrapper as default
|
|
11
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ItemProps } from './Item.types';
|
|
3
3
|
declare const Item: {
|
|
4
4
|
({ children, active }: ItemProps): React.JSX.Element;
|
|
5
|
-
Action: import(
|
|
5
|
+
Action: import('styled-components').StyledComponent<"span", any, {}, never>;
|
|
6
6
|
};
|
|
7
7
|
export default Item;
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import SubMenuContext from "../SubMenuContext/SubMenuContext.js";
|
|
4
|
+
import { Wrapper, ItemAction } from "./Item.styles.js";
|
|
5
|
+
const Item = ({
|
|
6
|
+
children,
|
|
7
|
+
active
|
|
8
|
+
}) => {
|
|
9
|
+
const subMenuContext = React.useContext(SubMenuContext);
|
|
8
10
|
if (!subMenuContext) {
|
|
9
|
-
throw new Error(
|
|
11
|
+
throw new Error("Cannot use SubMenu.Item outside SubMenuContext");
|
|
10
12
|
}
|
|
11
|
-
return
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}, children);
|
|
13
|
+
return /* @__PURE__ */ jsx(Wrapper, { className: `sub-menu__item ${active ? "sub-menu__item--active" : ""}`, onClick: () => subMenuContext.setOpened(false), children });
|
|
14
|
+
};
|
|
15
|
+
Item.Action = ItemAction;
|
|
16
|
+
export {
|
|
17
|
+
Item as default
|
|
17
18
|
};
|
|
18
|
-
Item.Action = S.ItemAction;
|
|
19
|
-
export default Item;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const ItemAction: import(
|
|
2
|
-
export declare const Wrapper: import(
|
|
1
|
+
export declare const ItemAction: import('styled-components').StyledComponent<"span", any, {}, never>;
|
|
2
|
+
export declare const Wrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import styled from
|
|
2
|
-
import { macro } from
|
|
3
|
-
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { macro } from "@synerise/ds-typography";
|
|
3
|
+
const ItemAction = /* @__PURE__ */ styled.span.withConfig({
|
|
4
4
|
displayName: "Itemstyles__ItemAction",
|
|
5
5
|
componentId: "sc-15s98w8-0"
|
|
6
6
|
})(["margin-top:-4px;margin-right:-4px;float:right;opacity:0;transition:opacity 0.3s ease-in-out;"]);
|
|
7
|
-
|
|
7
|
+
const Wrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
8
8
|
displayName: "Itemstyles__Wrapper",
|
|
9
9
|
componentId: "sc-15s98w8-1"
|
|
10
|
-
})(["", ";width:100%;padding:8px 12px;margin:0 0 1px;border-radius:3px;transition:all 0.3s ease-in-out;cursor:pointer;&:hover,&.sub-menu__item--active{background:", ";color:", ";opacity:1;", "{opacity:1;}}"], macro.h200,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
10
|
+
})(["", ";width:100%;padding:8px 12px;margin:0 0 1px;border-radius:3px;transition:all 0.3s ease-in-out;cursor:pointer;&:hover,&.sub-menu__item--active{background:", ";color:", ";opacity:1;", "{opacity:1;}}"], macro.h200, (props) => props.theme.palette["grey-050"], (props) => props.theme.palette["blue-600"], ItemAction);
|
|
11
|
+
export {
|
|
12
|
+
ItemAction,
|
|
13
|
+
Wrapper
|
|
14
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SubComponents, SubMenuProps } from './SubMenu.types';
|
|
3
3
|
declare const SubMenu: React.FC<SubMenuProps> & SubComponents;
|
|
4
4
|
export default SubMenu;
|
package/dist/SubMenu/SubMenu.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useSubMenu } from
|
|
3
|
-
import Item from
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
style: style
|
|
13
|
-
}, children);
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useSubMenu } from "../hooks/useSubMenu.js";
|
|
3
|
+
import Item from "./Item/Item.js";
|
|
4
|
+
import { MenuGroupWrapper, MenuGroupTitle, MenuGroupSubTitle } from "./SubMenu.styles.js";
|
|
5
|
+
const SubMenu = ({
|
|
6
|
+
children,
|
|
7
|
+
className,
|
|
8
|
+
style
|
|
9
|
+
}) => {
|
|
10
|
+
const subMenuContext = useSubMenu();
|
|
11
|
+
return /* @__PURE__ */ jsx(MenuGroupWrapper, { className: `menu__sub-menu ${className || ""} ${subMenuContext.isActive ? "menu__sub-menu--active" : ""}`, style, children });
|
|
14
12
|
};
|
|
15
|
-
SubMenu.Title =
|
|
16
|
-
SubMenu.SubTitle =
|
|
13
|
+
SubMenu.Title = MenuGroupTitle;
|
|
14
|
+
SubMenu.SubTitle = MenuGroupSubTitle;
|
|
17
15
|
SubMenu.Item = Item;
|
|
18
|
-
export
|
|
16
|
+
export {
|
|
17
|
+
SubMenu as default
|
|
18
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const MenuGroupWrapper: import(
|
|
2
|
-
export declare const MenuGroupTitle: import(
|
|
3
|
-
export declare const MenuGroupSubTitle: import(
|
|
1
|
+
export declare const MenuGroupWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export declare const MenuGroupTitle: import('styled-components').StyledComponent<"h3", any, {}, never>;
|
|
3
|
+
export declare const MenuGroupSubTitle: import('styled-components').StyledComponent<"h4", any, {}, never>;
|
|
@@ -1,24 +1,19 @@
|
|
|
1
|
-
import styled, { css } from
|
|
2
|
-
import { macro } from
|
|
3
|
-
|
|
1
|
+
import styled, { css } from "styled-components";
|
|
2
|
+
import { macro } from "@synerise/ds-typography";
|
|
3
|
+
const MenuGroupWrapper = /* @__PURE__ */ styled.div.withConfig({
|
|
4
4
|
displayName: "SubMenustyles__MenuGroupWrapper",
|
|
5
5
|
componentId: "sc-dperxu-0"
|
|
6
|
-
})(["background:", ";width:262px;position:absolute;left:61px;top:0px;height:100%;border-left:1px solid ", ";padding:12px;opacity:0;visibility:hidden;transition:opacity 0.2s ease-in-out;transition-delay:0.1s;overflow-y:auto;display:flex;flex-flow:column;&.menu__sub-menu--active{visibility:visible;opacity:1;> *{opacity:1;top:0px !important;}}a:hover{text-decoration:none;}> *{opacity:0;transition:all 0.3s ease-in-out;position:relative;top:-10px;}", " &:hover{> *{transition-delay:0s;}}"],
|
|
7
|
-
|
|
8
|
-
}, function (props) {
|
|
9
|
-
return props.theme.palette['grey-100'];
|
|
10
|
-
}, [].concat(Array(100).keys()).map(function (k) {
|
|
11
|
-
return css(["> *:nth-child(", "){transition-delay:", "s;}"], k, 0.1 + k * 10 / 500);
|
|
12
|
-
}));
|
|
13
|
-
export var MenuGroupTitle = styled.h3.withConfig({
|
|
6
|
+
})(["background:", ";width:262px;position:absolute;left:61px;top:0px;height:100%;border-left:1px solid ", ";padding:12px;opacity:0;visibility:hidden;transition:opacity 0.2s ease-in-out;transition-delay:0.1s;overflow-y:auto;display:flex;flex-flow:column;&.menu__sub-menu--active{visibility:visible;opacity:1;> *{opacity:1;top:0px !important;}}a:hover{text-decoration:none;}> *{opacity:0;transition:all 0.3s ease-in-out;position:relative;top:-10px;}", " &:hover{> *{transition-delay:0s;}}"], (props) => props.theme.palette.white, (props) => props.theme.palette["grey-100"], [...Array(100).keys()].map((k) => css(["> *:nth-child(", "){transition-delay:", "s;}"], k, 0.1 + k * 10 / 500)));
|
|
7
|
+
const MenuGroupTitle = /* @__PURE__ */ styled.h3.withConfig({
|
|
14
8
|
displayName: "SubMenustyles__MenuGroupTitle",
|
|
15
9
|
componentId: "sc-dperxu-1"
|
|
16
10
|
})(["", ";letter-spacing:-0.1px;padding:14px 12px 8px;"], macro.h600);
|
|
17
|
-
|
|
11
|
+
const MenuGroupSubTitle = /* @__PURE__ */ styled.h4.withConfig({
|
|
18
12
|
displayName: "SubMenustyles__MenuGroupSubTitle",
|
|
19
13
|
componentId: "sc-dperxu-2"
|
|
20
|
-
})(["", ";letter-spacing:0.1px;color:", ";border-top:1px dashed ", ";margin:12px 12px 12px;padding-top:12px;text-transform:uppercase;"], macro.h100,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
14
|
+
})(["", ";letter-spacing:0.1px;color:", ";border-top:1px dashed ", ";margin:12px 12px 12px;padding-top:12px;text-transform:uppercase;"], macro.h100, (props) => props.theme.palette["grey-500"], (props) => props.theme.palette["grey-200"]);
|
|
15
|
+
export {
|
|
16
|
+
MenuGroupSubTitle,
|
|
17
|
+
MenuGroupTitle,
|
|
18
|
+
MenuGroupWrapper
|
|
19
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { default as Item } from './Item/Item';
|
|
3
3
|
import type * as S from './SubMenu.styles';
|
|
4
4
|
export type SubMenuProps = {
|
|
5
5
|
className?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const SubMenuContext: import(
|
|
1
|
+
import { SubMenuContextType } from './SubMenuContext.types';
|
|
2
|
+
declare const SubMenuContext: import('react').Context<SubMenuContextType>;
|
|
3
3
|
export default SubMenuContext;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
import { createContext } from
|
|
2
|
-
|
|
3
|
-
export
|
|
1
|
+
import { createContext } from "react";
|
|
2
|
+
const SubMenuContext = createContext(void 0);
|
|
3
|
+
export {
|
|
4
|
+
SubMenuContext as default
|
|
5
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|
package/dist/hooks/useMenu.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { useContext } from
|
|
2
|
-
import MenuContext from
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { useContext } from "react";
|
|
2
|
+
import MenuContext from "../MenuContext/MenuContext.js";
|
|
3
|
+
const useMenu = () => {
|
|
4
|
+
const menuContext = useContext(MenuContext);
|
|
5
5
|
if (!menuContext) {
|
|
6
|
-
throw new Error(
|
|
6
|
+
throw new Error("Cannot use useMenu hook outside MenuContext");
|
|
7
7
|
}
|
|
8
8
|
return menuContext;
|
|
9
|
-
};
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
useMenu
|
|
12
|
+
};
|
package/dist/hooks/useSubMenu.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { useContext } from
|
|
2
|
-
import SubMenuContext from
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { useContext } from "react";
|
|
2
|
+
import SubMenuContext from "../SubMenu/SubMenuContext/SubMenuContext.js";
|
|
3
|
+
const useSubMenu = () => {
|
|
4
|
+
const subMenuContext = useContext(SubMenuContext);
|
|
5
5
|
if (!subMenuContext) {
|
|
6
|
-
throw new Error(
|
|
6
|
+
throw new Error("Cannot use useMenu hook outside MenuContext");
|
|
7
7
|
}
|
|
8
8
|
return subMenuContext;
|
|
9
|
-
};
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
useSubMenu
|
|
12
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { default as default2 } from "./AppMenu.js";
|
|
2
|
+
import { useMenu } from "./hooks/useMenu.js";
|
|
3
|
+
import { useSubMenu } from "./hooks/useSubMenu.js";
|
|
4
|
+
export {
|
|
5
|
+
default2 as default,
|
|
6
|
+
useMenu,
|
|
7
|
+
useSubMenu
|
|
8
|
+
};
|
package/dist/modules.d.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "@testing-library/jest-dom";
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-app-menu",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.10",
|
|
4
4
|
"description": "AppMenu UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -16,15 +16,15 @@
|
|
|
16
16
|
"access": "public"
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
|
-
"build": "
|
|
19
|
+
"build": "vite build",
|
|
20
20
|
"build:css": "node ../../../scripts/style/less.js",
|
|
21
21
|
"build:js": "babel --delete-dir-on-start --root-mode upward src --out-dir dist --extensions '.js,.ts,.tsx'",
|
|
22
|
-
"build:watch": "
|
|
22
|
+
"build:watch": "vite build --watch",
|
|
23
23
|
"defs": "tsc --declaration --outDir dist/ --emitDeclarationOnly",
|
|
24
24
|
"pack:ci": "pnpm pack --pack-destination ../../storybook/storybook-static/static",
|
|
25
25
|
"prepublish": "pnpm run build",
|
|
26
|
-
"test": "vitest",
|
|
27
|
-
"test:watch": "
|
|
26
|
+
"test": "vitest run",
|
|
27
|
+
"test:watch": "vitest",
|
|
28
28
|
"types": "tsc --noEmit",
|
|
29
29
|
"check:circular-dependencies": "madge --circular --extensions ts,tsx,js,jsx --ts-config tsconfig.json src/ --exclude '/dist/'",
|
|
30
30
|
"upgrade:ds": "ncu -f \"@synerise/ds-*\" -u"
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
],
|
|
36
36
|
"types": "dist/index.d.ts",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@synerise/ds-icon": "^1.
|
|
39
|
-
"@synerise/ds-tooltip": "^1.4.
|
|
40
|
-
"@synerise/ds-typography": "^1.1.
|
|
41
|
-
"@synerise/ds-utils": "^1.
|
|
38
|
+
"@synerise/ds-icon": "^1.15.1",
|
|
39
|
+
"@synerise/ds-tooltip": "^1.4.10",
|
|
40
|
+
"@synerise/ds-typography": "^1.1.13",
|
|
41
|
+
"@synerise/ds-utils": "^1.7.1"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"@synerise/ds-core": "*",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"styled-components": "^5.3.3",
|
|
47
47
|
"vitest": "4"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "e4ecca8944fc9b41c1b9d59c8bcad5e5e2013225"
|
|
50
50
|
}
|