orcs-design-system 3.3.39 → 3.3.41
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/es/components/Divider/index.js +1 -1
- package/es/components/Icon/index.js +45 -27
- package/es/components/Popover/index.js +9 -1
- package/es/components/SideNavV2/NavItem.js +231 -0
- package/es/components/SideNavV2/SideNav.js +295 -0
- package/es/components/SideNavV2/SideNavV2.stories.js +382 -0
- package/es/components/SideNavV2/__tests__/resize.test.js +129 -0
- package/es/components/SideNavV2/__tests__/sections.test.js +333 -0
- package/es/components/SideNavV2/components/BaseSection.js +178 -0
- package/es/components/SideNavV2/components/CurrentViewSectionPortalTarget.js +35 -0
- package/es/components/SideNavV2/components/ExpandedPanel.js +161 -0
- package/es/components/SideNavV2/components/ItemSection.js +156 -0
- package/es/components/SideNavV2/components/PanelControl.js +128 -0
- package/es/components/SideNavV2/components/RenderCurrentViewSection.js +39 -0
- package/es/components/SideNavV2/components/index.js +4 -0
- package/es/components/SideNavV2/constants/sideNav.js +21 -0
- package/es/components/SideNavV2/context/SideNavStateProvider.js +57 -0
- package/es/components/SideNavV2/hooks/index.js +3 -0
- package/es/components/SideNavV2/hooks/useResize.js +70 -0
- package/es/components/SideNavV2/hooks/useResponsive.js +32 -0
- package/es/components/SideNavV2/hooks/useSideNavState.js +88 -0
- package/es/components/SideNavV2/index.js +3 -0
- package/es/components/SideNavV2/sections/SideNavCurrentViewSection.js +124 -0
- package/es/components/SideNavV2/sections/SideNavPinnedSection.js +125 -0
- package/es/components/SideNavV2/sections/SideNavTeamsSection.js +91 -0
- package/es/components/SideNavV2/styles/SideNavV2.styles.js +156 -0
- package/es/components/SideNavV2/types/sideNav.js +53 -0
- package/es/components/SideNavV2/utils/index.js +2 -0
- package/es/components/SideNavV2/utils/itemUtils.js +51 -0
- package/es/components/SideNavV2/utils/resizeUtils.js +57 -0
- package/es/components/StatusDot/StatusDot.stories.js +59 -72
- package/es/components/StatusDot/index.js +14 -5
- package/es/components.test.js +4 -0
- package/es/index.js +1 -0
- package/package.json +6 -2
|
@@ -19,7 +19,7 @@ export const defaultStatusDot = () => /*#__PURE__*/_jsx(Box, {
|
|
|
19
19
|
direction: "top",
|
|
20
20
|
text: "New approvals received",
|
|
21
21
|
textAlign: "center",
|
|
22
|
-
width: "
|
|
22
|
+
width: "fit-content",
|
|
23
23
|
children: /*#__PURE__*/_jsx(StatusDot, {})
|
|
24
24
|
})
|
|
25
25
|
})
|
|
@@ -34,9 +34,9 @@ export const colour = () => /*#__PURE__*/_jsx(Box, {
|
|
|
34
34
|
m: "xxs",
|
|
35
35
|
children: [/*#__PURE__*/_jsx(Popover, {
|
|
36
36
|
direction: "top",
|
|
37
|
-
text: "Team has a
|
|
37
|
+
text: "Team has a Product Owner. STATUS: Met",
|
|
38
38
|
textAlign: "left",
|
|
39
|
-
width: "
|
|
39
|
+
width: "fit-content",
|
|
40
40
|
children: /*#__PURE__*/_jsx(StatusDot, {
|
|
41
41
|
variant: "success"
|
|
42
42
|
})
|
|
@@ -44,92 +44,79 @@ export const colour = () => /*#__PURE__*/_jsx(Box, {
|
|
|
44
44
|
direction: "top",
|
|
45
45
|
text: "Team members are in less than 3 locations. STATUS: Not enough data",
|
|
46
46
|
textAlign: "left",
|
|
47
|
-
width: "
|
|
47
|
+
width: "fit-content",
|
|
48
48
|
children: /*#__PURE__*/_jsx(StatusDot, {
|
|
49
49
|
variant: "warning"
|
|
50
50
|
})
|
|
51
51
|
}), /*#__PURE__*/_jsx(Popover, {
|
|
52
52
|
direction: "top",
|
|
53
|
-
text: "Team has a
|
|
53
|
+
text: "Team has a Team Lead. STATUS: Not met",
|
|
54
54
|
textAlign: "left",
|
|
55
|
-
width: "
|
|
55
|
+
width: "fit-content",
|
|
56
56
|
children: /*#__PURE__*/_jsx(StatusDot, {
|
|
57
57
|
variant: "danger"
|
|
58
58
|
})
|
|
59
|
-
})]
|
|
60
|
-
})
|
|
61
|
-
})
|
|
62
|
-
});
|
|
63
|
-
export const withIcon = () => /*#__PURE__*/_jsx(Box, {
|
|
64
|
-
p: "l",
|
|
65
|
-
children: /*#__PURE__*/_jsx(Flex, {
|
|
66
|
-
justifyContent: "center",
|
|
67
|
-
alignItems: "center",
|
|
68
|
-
children: /*#__PURE__*/_jsxs(Spacer, {
|
|
69
|
-
m: "xxs",
|
|
70
|
-
children: [/*#__PURE__*/_jsx(Popover, {
|
|
71
|
-
direction: "top",
|
|
72
|
-
text: "Additional info",
|
|
73
|
-
textAlign: "center",
|
|
74
|
-
width: "110px",
|
|
75
|
-
children: /*#__PURE__*/_jsx(StatusDot, {
|
|
76
|
-
icon: true,
|
|
77
|
-
children: /*#__PURE__*/_jsx(Icon, {
|
|
78
|
-
icon: ["fas", "question"],
|
|
79
|
-
color: "white",
|
|
80
|
-
size: "xs",
|
|
81
|
-
transform: "up-2"
|
|
82
|
-
})
|
|
83
|
-
})
|
|
84
59
|
}), /*#__PURE__*/_jsx(Popover, {
|
|
85
60
|
direction: "top",
|
|
86
|
-
text: "
|
|
87
|
-
textAlign: "
|
|
88
|
-
width: "
|
|
89
|
-
children: /*#__PURE__*/_jsx(StatusDot, {
|
|
90
|
-
variant: "success",
|
|
91
|
-
icon: true,
|
|
92
|
-
children: /*#__PURE__*/_jsx(Icon, {
|
|
93
|
-
icon: ["fas", "check"],
|
|
94
|
-
color: "white",
|
|
95
|
-
size: "xs",
|
|
96
|
-
transform: "up-2"
|
|
97
|
-
})
|
|
98
|
-
})
|
|
99
|
-
}), /*#__PURE__*/_jsx(Popover, {
|
|
100
|
-
direction: "top",
|
|
101
|
-
text: "Under allocated",
|
|
102
|
-
textAlign: "center",
|
|
103
|
-
width: "110px",
|
|
104
|
-
children: /*#__PURE__*/_jsx(StatusDot, {
|
|
105
|
-
variant: "warning",
|
|
106
|
-
icon: true,
|
|
107
|
-
children: /*#__PURE__*/_jsx(Icon, {
|
|
108
|
-
icon: ["fas", "exclamation"],
|
|
109
|
-
color: "white",
|
|
110
|
-
size: "xs",
|
|
111
|
-
transform: "up-2"
|
|
112
|
-
})
|
|
113
|
-
})
|
|
114
|
-
}), /*#__PURE__*/_jsx(Popover, {
|
|
115
|
-
direction: "top",
|
|
116
|
-
text: "Over allocated",
|
|
117
|
-
textAlign: "center",
|
|
118
|
-
width: "110px",
|
|
61
|
+
text: "Team has an Engineering Lead. STATUS: Not applicable",
|
|
62
|
+
textAlign: "left",
|
|
63
|
+
width: "fit-content",
|
|
119
64
|
children: /*#__PURE__*/_jsx(StatusDot, {
|
|
120
|
-
variant: "
|
|
121
|
-
icon: true,
|
|
122
|
-
children: /*#__PURE__*/_jsx(Icon, {
|
|
123
|
-
icon: ["fas", "bell"],
|
|
124
|
-
color: "white",
|
|
125
|
-
size: "xs",
|
|
126
|
-
transform: "up-2"
|
|
127
|
-
})
|
|
65
|
+
variant: "disabled"
|
|
128
66
|
})
|
|
129
67
|
})]
|
|
130
68
|
})
|
|
131
69
|
})
|
|
132
70
|
});
|
|
71
|
+
export const withIcon = () => /*#__PURE__*/_jsxs(Flex, {
|
|
72
|
+
p: "l",
|
|
73
|
+
justifyContent: "center",
|
|
74
|
+
alignItems: "center",
|
|
75
|
+
gap: "s",
|
|
76
|
+
children: [/*#__PURE__*/_jsx(Popover, {
|
|
77
|
+
direction: "top",
|
|
78
|
+
text: "On track",
|
|
79
|
+
textAlign: "center",
|
|
80
|
+
width: "fit-content",
|
|
81
|
+
children: /*#__PURE__*/_jsx(StatusDot, {
|
|
82
|
+
variant: "success",
|
|
83
|
+
icon: true,
|
|
84
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
85
|
+
icon: ["fas", "check"],
|
|
86
|
+
color: "white",
|
|
87
|
+
size: "xs"
|
|
88
|
+
})
|
|
89
|
+
})
|
|
90
|
+
}), /*#__PURE__*/_jsx(Popover, {
|
|
91
|
+
direction: "top",
|
|
92
|
+
text: "Blocked",
|
|
93
|
+
textAlign: "center",
|
|
94
|
+
width: "fit-content",
|
|
95
|
+
children: /*#__PURE__*/_jsx(StatusDot, {
|
|
96
|
+
variant: "warning",
|
|
97
|
+
icon: true,
|
|
98
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
99
|
+
icon: ["fas", "ban"],
|
|
100
|
+
color: "white",
|
|
101
|
+
size: "xs"
|
|
102
|
+
})
|
|
103
|
+
})
|
|
104
|
+
}), /*#__PURE__*/_jsx(Popover, {
|
|
105
|
+
direction: "top",
|
|
106
|
+
text: "At risk",
|
|
107
|
+
textAlign: "center",
|
|
108
|
+
width: "fit-content",
|
|
109
|
+
children: /*#__PURE__*/_jsx(StatusDot, {
|
|
110
|
+
variant: "danger",
|
|
111
|
+
icon: true,
|
|
112
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
113
|
+
icon: ["fas", "exclamation"],
|
|
114
|
+
color: "white",
|
|
115
|
+
size: "xs"
|
|
116
|
+
})
|
|
117
|
+
})
|
|
118
|
+
})]
|
|
119
|
+
});
|
|
133
120
|
defaultStatusDot.__docgenInfo = {
|
|
134
121
|
"description": "",
|
|
135
122
|
"methods": [],
|
|
@@ -20,7 +20,7 @@ const StatusDotItem = styled("div").withConfig({
|
|
|
20
20
|
justifyContent: "center",
|
|
21
21
|
lineHeight: "0",
|
|
22
22
|
svg: {
|
|
23
|
-
filter: props.icon ? "drop-shadow(0 1px 1px rgba(0,0,0,0.
|
|
23
|
+
filter: props.icon ? "drop-shadow(0 1px 1px rgba(0,0,0,0.6))" : "none"
|
|
24
24
|
}
|
|
25
25
|
}), props => variant({
|
|
26
26
|
variants: {
|
|
@@ -28,19 +28,25 @@ const StatusDotItem = styled("div").withConfig({
|
|
|
28
28
|
success: {
|
|
29
29
|
bg: themeGet("colors.success")(props),
|
|
30
30
|
svg: {
|
|
31
|
-
filter: props.icon ? "drop-shadow(0 1px 1px rgba(0,0,0,0.
|
|
31
|
+
filter: props.icon ? "drop-shadow(0 1px 1px rgba(0,0,0,0.5))" : "none"
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
warning: {
|
|
35
35
|
bg: themeGet("colors.warning")(props),
|
|
36
36
|
svg: {
|
|
37
|
-
filter: props.icon ? "drop-shadow(0 1px 1px rgba(147,101,0,
|
|
37
|
+
filter: props.icon ? "drop-shadow(0 1px 1px rgba(147,101,0,0.9))" : "none"
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
danger: {
|
|
41
41
|
bg: themeGet("colors.danger")(props),
|
|
42
42
|
svg: {
|
|
43
|
-
filter: props.icon ? "drop-shadow(0 1px 1px rgba(0,0,0,0.
|
|
43
|
+
filter: props.icon ? "drop-shadow(0 1px 1px rgba(0,0,0,0.6))" : "none"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
disabled: {
|
|
47
|
+
bg: themeGet("colors.greyDark")(props),
|
|
48
|
+
svg: {
|
|
49
|
+
filter: props.icon ? "drop-shadow(0 1px 1px rgba(0,0,0,0.8))" : "none"
|
|
44
50
|
}
|
|
45
51
|
}
|
|
46
52
|
}
|
|
@@ -59,7 +65,7 @@ export default function StatusDot(_ref) {
|
|
|
59
65
|
}
|
|
60
66
|
StatusDot.propTypes = {
|
|
61
67
|
/** Specifies StatusDot colour. Colours are taken from the standard design system colours. */
|
|
62
|
-
variant: PropTypes.oneOf(["success", "warning", "danger"]),
|
|
68
|
+
variant: PropTypes.oneOf(["success", "warning", "danger", "disabled"]),
|
|
63
69
|
/** Specifies that this StatusDot contains an icon */
|
|
64
70
|
icon: PropTypes.bool,
|
|
65
71
|
/** Can specify an Icon componet as a child item */
|
|
@@ -85,6 +91,9 @@ StatusDot.__docgenInfo = {
|
|
|
85
91
|
}, {
|
|
86
92
|
"value": "\"danger\"",
|
|
87
93
|
"computed": false
|
|
94
|
+
}, {
|
|
95
|
+
"value": "\"disabled\"",
|
|
96
|
+
"computed": false
|
|
88
97
|
}]
|
|
89
98
|
},
|
|
90
99
|
"required": false
|
package/es/components.test.js
CHANGED
|
@@ -46,8 +46,11 @@ test("all components exported", () => {
|
|
|
46
46
|
"Quote",
|
|
47
47
|
"RadioButton",
|
|
48
48
|
"Range",
|
|
49
|
+
"RenderCurrentViewSection",
|
|
49
50
|
"Select",
|
|
50
51
|
"SideNav",
|
|
52
|
+
"SideNavStateProvider",
|
|
53
|
+
"SideNavV2",
|
|
51
54
|
"Sidebar",
|
|
52
55
|
"SidebarClose",
|
|
53
56
|
"SidebarPanel",
|
|
@@ -74,6 +77,7 @@ test("all components exported", () => {
|
|
|
74
77
|
"styleLink",
|
|
75
78
|
"systemThemeCollapsed",
|
|
76
79
|
"systemtheme",
|
|
80
|
+
"useSideNavStateContext",
|
|
77
81
|
]
|
|
78
82
|
`);
|
|
79
83
|
});
|
package/es/index.js
CHANGED
|
@@ -37,6 +37,7 @@ export { default as Range } from "./components/Range";
|
|
|
37
37
|
export { default as Select } from "./components/Select";
|
|
38
38
|
export { default as Sidebar, SidebarTabs, SidebarTab, SidebarPanels, SidebarPanel, SidebarClose } from "./components/Sidebar";
|
|
39
39
|
export { default as SideNav } from "./components/SideNav";
|
|
40
|
+
export { default as SideNavV2, SideNavStateProvider, useSideNavStateContext, RenderCurrentViewSection } from "./components/SideNavV2";
|
|
40
41
|
export { default as Spacer } from "./components/Spacer";
|
|
41
42
|
export { default as StatusDot } from "./components/StatusDot";
|
|
42
43
|
export { default as StyledLink, styleLink } from "./components/StyledLink";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "orcs-design-system",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.41",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": "20.12.2"
|
|
6
6
|
},
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"@storybook/react-webpack5": "^8.3.7",
|
|
104
104
|
"@storybook/storybook-deployer": "2.8.16",
|
|
105
105
|
"@storybook/theming": "^8.1.7",
|
|
106
|
-
"@testing-library/jest-dom": "^5.
|
|
106
|
+
"@testing-library/jest-dom": "^5.17.0",
|
|
107
107
|
"@testing-library/react": "^11.2.2",
|
|
108
108
|
"@types/jest": "^27.5.2",
|
|
109
109
|
"@types/styled-components": "^5.1.7",
|
|
@@ -184,6 +184,10 @@
|
|
|
184
184
|
"es"
|
|
185
185
|
],
|
|
186
186
|
"jest": {
|
|
187
|
+
"testEnvironment": "jsdom",
|
|
188
|
+
"setupFilesAfterEnv": [
|
|
189
|
+
"<rootDir>/config/jest/setup.js"
|
|
190
|
+
],
|
|
187
191
|
"coverageThreshold": {
|
|
188
192
|
"global": {
|
|
189
193
|
"branches": 0,
|