orcs-design-system 3.3.5 → 3.3.7
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/Avatar/index.js +2 -2
- package/es/components/Header/Header.styles.js +34 -25
- package/es/components/Header/UserMenu.js +13 -14
- package/es/components/Header/index.js +11 -7
- package/es/components/TabsAlt/index.js +1 -1
- package/es/systemThemeCollapsed.js +3 -3
- package/es/systemtheme.js +2 -2
- package/package.json +1 -1
|
@@ -102,8 +102,8 @@ const Shape = styled("div").withConfig({
|
|
|
102
102
|
displayName: "Avatar__Shape",
|
|
103
103
|
componentId: "sc-1wtet2j-3"
|
|
104
104
|
})(props => css({
|
|
105
|
-
width: props.customSize
|
|
106
|
-
height: props.customSize
|
|
105
|
+
width: themeGet(`appScale.${props.customSize || "avatarDefault"}`)(props) || props.customSize,
|
|
106
|
+
height: themeGet(`appScale.${props.customSize || "avatarDefault"}`)(props) || props.customSize,
|
|
107
107
|
fontWeight: themeGet("fontWeights.2")(props),
|
|
108
108
|
flex: "0 0 auto",
|
|
109
109
|
background: `linear-gradient(135deg, ${themeGet("colors.primaryLightest")(props)}, ${themeGet("colors.primaryLight")(props)})`,
|
|
@@ -3,6 +3,7 @@ import { space, layout } from "styled-system";
|
|
|
3
3
|
import css from "@styled-system/css";
|
|
4
4
|
import { themeGet } from "@styled-system/theme-get";
|
|
5
5
|
import Box from "../Box";
|
|
6
|
+
import Flex from "../Flex";
|
|
6
7
|
export const Bar = styled("header").attrs(props => ({
|
|
7
8
|
"data-testid": props.dataTestId
|
|
8
9
|
})).withConfig({
|
|
@@ -17,23 +18,20 @@ export const Bar = styled("header").attrs(props => ({
|
|
|
17
18
|
top: "0",
|
|
18
19
|
display: "flex",
|
|
19
20
|
alignItems: "center",
|
|
20
|
-
bg: "
|
|
21
|
+
bg: "white",
|
|
21
22
|
gap: "r",
|
|
22
|
-
|
|
23
|
+
px: "r"
|
|
23
24
|
}), space);
|
|
24
25
|
export const AppName = styled("div").withConfig({
|
|
25
26
|
displayName: "Headerstyles__AppName",
|
|
26
27
|
componentId: "sc-xs8ba0-1"
|
|
27
28
|
})(props => css({
|
|
28
|
-
background:
|
|
29
|
+
background: "transparent",
|
|
29
30
|
width: "fit-content",
|
|
30
31
|
display: "flex",
|
|
31
32
|
alignItems: "center",
|
|
32
|
-
gap: ["0", "0", "0", "
|
|
33
|
-
px: "s",
|
|
33
|
+
gap: ["0", "0", "0", "r"],
|
|
34
34
|
height: themeGet("appScale.sideNavSize")(props),
|
|
35
|
-
borderRadius: themeGet("radii.2")(props),
|
|
36
|
-
border: `1px solid ${themeGet("colors.greyLight")(props)}`,
|
|
37
35
|
fontSize: themeGet("fontSizes.1")(props),
|
|
38
36
|
fontWeight: themeGet("fontWeights.2")(props),
|
|
39
37
|
color: themeGet("colors.greyDarkest")(props),
|
|
@@ -53,23 +51,31 @@ export const AppName = styled("div").withConfig({
|
|
|
53
51
|
color: themeGet("colors.greyDarkest")(props)
|
|
54
52
|
}
|
|
55
53
|
}), space);
|
|
54
|
+
export const Separator = styled(Box).withConfig({
|
|
55
|
+
displayName: "Headerstyles__Separator",
|
|
56
|
+
componentId: "sc-xs8ba0-2"
|
|
57
|
+
})(props => css({
|
|
58
|
+
width: "1px",
|
|
59
|
+
height: "75%",
|
|
60
|
+
bg: themeGet("colors.greyLight")(props)
|
|
61
|
+
}), space);
|
|
56
62
|
export const SearchContainer = styled("div").withConfig({
|
|
57
63
|
displayName: "Headerstyles__SearchContainer",
|
|
58
|
-
componentId: "sc-xs8ba0-
|
|
64
|
+
componentId: "sc-xs8ba0-3"
|
|
59
65
|
})(props => css({
|
|
60
66
|
maxWidth: "550px",
|
|
67
|
+
marginLeft: "auto",
|
|
61
68
|
height: themeGet("appScale.sideNavSize")(props),
|
|
62
69
|
flex: "1 1 auto",
|
|
63
70
|
borderRadius: themeGet("radii.2")(props)
|
|
64
71
|
}), space, layout);
|
|
65
72
|
export const UserMenuToggle = styled("button").withConfig({
|
|
66
73
|
displayName: "Headerstyles__UserMenuToggle",
|
|
67
|
-
componentId: "sc-xs8ba0-
|
|
74
|
+
componentId: "sc-xs8ba0-4"
|
|
68
75
|
})(props => css({
|
|
69
76
|
display: "flex",
|
|
70
77
|
alignItems: "center",
|
|
71
78
|
justifyContent: "center",
|
|
72
|
-
gap: "xs",
|
|
73
79
|
padding: "0",
|
|
74
80
|
cursor: "pointer",
|
|
75
81
|
border: "none",
|
|
@@ -78,33 +84,36 @@ export const UserMenuToggle = styled("button").withConfig({
|
|
|
78
84
|
color: themeGet("colors.greyDark")(props),
|
|
79
85
|
fontSize: themeGet("fontSizes.1")(props),
|
|
80
86
|
fontWeight: themeGet("fontWeights.2")(props),
|
|
81
|
-
"svg path": {
|
|
82
|
-
transition: "fill 300ms ease-in-out"
|
|
83
|
-
},
|
|
84
87
|
"&:focus, &:hover": {
|
|
85
|
-
outline: "none"
|
|
86
|
-
"svg path": {
|
|
87
|
-
fill: themeGet("colors.primary")(props)
|
|
88
|
-
}
|
|
88
|
+
outline: "none"
|
|
89
89
|
}
|
|
90
90
|
}));
|
|
91
91
|
export const AvatarBorder = styled(Box).withConfig({
|
|
92
92
|
displayName: "Headerstyles__AvatarBorder",
|
|
93
|
-
componentId: "sc-xs8ba0-
|
|
93
|
+
componentId: "sc-xs8ba0-5"
|
|
94
94
|
})(css({
|
|
95
|
-
background: "linear-gradient(
|
|
95
|
+
background: "linear-gradient(135deg, rgba(0,145,234,1) 0%, rgba(155,81,224,1) 100%)"
|
|
96
96
|
}));
|
|
97
97
|
export const UserMenuContainer = styled(Box).withConfig({
|
|
98
98
|
displayName: "Headerstyles__UserMenuContainer",
|
|
99
|
-
componentId: "sc-xs8ba0-
|
|
100
|
-
})(
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
99
|
+
componentId: "sc-xs8ba0-6"
|
|
100
|
+
})(css({
|
|
101
|
+
position: "relative"
|
|
102
|
+
}));
|
|
103
|
+
export const IconContainer = styled(Flex).withConfig({
|
|
104
|
+
displayName: "Headerstyles__IconContainer",
|
|
105
|
+
componentId: "sc-xs8ba0-7"
|
|
106
|
+
})(css({
|
|
107
|
+
position: "absolute",
|
|
108
|
+
bottom: "0",
|
|
109
|
+
right: "0",
|
|
110
|
+
height: "15px",
|
|
111
|
+
width: "15px",
|
|
112
|
+
background: "linear-gradient(135deg, rgba(0,145,234,1) 0%, rgba(155,81,224,1) 100%)"
|
|
104
113
|
}));
|
|
105
114
|
export const UserMenuContent = styled(Box).withConfig({
|
|
106
115
|
displayName: "Headerstyles__UserMenuContent",
|
|
107
|
-
componentId: "sc-xs8ba0-
|
|
116
|
+
componentId: "sc-xs8ba0-8"
|
|
108
117
|
})(props => css({
|
|
109
118
|
position: "absolute",
|
|
110
119
|
gap: "s",
|
|
@@ -4,7 +4,7 @@ import Avatar from "../Avatar";
|
|
|
4
4
|
import Icon from "../Icon";
|
|
5
5
|
import Divider from "../Divider";
|
|
6
6
|
import { Small } from "../Typography";
|
|
7
|
-
import { UserMenuToggle, AvatarBorder, UserMenuContainer, UserMenuContent } from "./Header.styles";
|
|
7
|
+
import { UserMenuToggle, AvatarBorder, UserMenuContainer, UserMenuContent, IconContainer } from "./Header.styles";
|
|
8
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
9
|
const UserMenu = _ref => {
|
|
10
10
|
let {
|
|
@@ -32,14 +32,6 @@ const UserMenu = _ref => {
|
|
|
32
32
|
};
|
|
33
33
|
return /*#__PURE__*/_jsxs(UserMenuContainer, {
|
|
34
34
|
ref: menuRef,
|
|
35
|
-
p: "2px",
|
|
36
|
-
pr: "s",
|
|
37
|
-
ml: "auto",
|
|
38
|
-
bg: "white",
|
|
39
|
-
width: "auto",
|
|
40
|
-
border: "solid 1px",
|
|
41
|
-
borderColor: "greyLight",
|
|
42
|
-
display: "flex",
|
|
43
35
|
children: [/*#__PURE__*/_jsxs(UserMenuToggle, {
|
|
44
36
|
onClick: toggleMenu,
|
|
45
37
|
children: [/*#__PURE__*/_jsx(AvatarBorder, {
|
|
@@ -51,11 +43,18 @@ const UserMenu = _ref => {
|
|
|
51
43
|
imageAlt: avatarAlt,
|
|
52
44
|
initials: avatarInitials
|
|
53
45
|
})
|
|
54
|
-
}), /*#__PURE__*/_jsx(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
46
|
+
}), /*#__PURE__*/_jsx(IconContainer, {
|
|
47
|
+
alignItems: "center",
|
|
48
|
+
justifyContent: "center",
|
|
49
|
+
borderRadius: "50%",
|
|
50
|
+
p: "2px",
|
|
51
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
52
|
+
icon: ["fas", "chevron-down"],
|
|
53
|
+
rotation: isOpen ? 180 : 0,
|
|
54
|
+
color: "white",
|
|
55
|
+
size: "xs",
|
|
56
|
+
mt: isOpen ? "0" : "1px"
|
|
57
|
+
})
|
|
59
58
|
})]
|
|
60
59
|
}), /*#__PURE__*/_jsxs(UserMenuContent, {
|
|
61
60
|
p: "s",
|
|
@@ -2,12 +2,12 @@ import React from "react";
|
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
3
|
import Flex, { FlexItem } from "../Flex";
|
|
4
4
|
import { Small } from "../Typography";
|
|
5
|
-
import { Bar, AppName, SearchContainer } from "./Header.styles";
|
|
5
|
+
import { Bar, AppName, SearchContainer, Separator } from "./Header.styles";
|
|
6
6
|
import UserMenu from "./UserMenu";
|
|
7
7
|
/**
|
|
8
8
|
* Header component for top of app.
|
|
9
9
|
**/
|
|
10
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
11
|
const Header = _ref => {
|
|
12
12
|
let {
|
|
13
13
|
appName,
|
|
@@ -24,13 +24,17 @@ const Header = _ref => {
|
|
|
24
24
|
return /*#__PURE__*/_jsxs(Bar, {
|
|
25
25
|
dataTestId: dataTestId,
|
|
26
26
|
children: [/*#__PURE__*/_jsxs(AppName, {
|
|
27
|
-
children: [logo && /*#__PURE__*/
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
children: [logo && /*#__PURE__*/_jsxs(_Fragment, {
|
|
28
|
+
children: [/*#__PURE__*/_jsx(Flex, {
|
|
29
|
+
alignItems: "center",
|
|
30
|
+
justifyContent: "center",
|
|
31
|
+
children: logo
|
|
32
|
+
}), /*#__PURE__*/_jsx(Separator, {
|
|
33
|
+
display: ["none", "none", "none", "block"]
|
|
34
|
+
})]
|
|
31
35
|
}), /*#__PURE__*/_jsxs(Flex, {
|
|
32
36
|
flexDirection: "column",
|
|
33
|
-
children: [/*#__PURE__*/_jsx(FlexItem, {
|
|
37
|
+
children: [appName && /*#__PURE__*/_jsx(FlexItem, {
|
|
34
38
|
flex: "0 0 auto",
|
|
35
39
|
display: ["none", "none", "none", "block"],
|
|
36
40
|
children: appName
|
|
@@ -11,7 +11,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
11
11
|
const TabsContainer = styled.div.withConfig({
|
|
12
12
|
displayName: "TabsAlt__TabsContainer",
|
|
13
13
|
componentId: "sc-hkpvfu-0"
|
|
14
|
-
})(["position:relative;width:100%;&:after{content:\"\";position:absolute;bottom:0;width:100%;height:
|
|
14
|
+
})(["position:relative;width:100%;&:after{content:\"\";position:absolute;bottom:0;width:100%;height:100%;background-color:", ";border-bottom:2px solid ", ";z-index:0;}"], themeGet("colors.white"), themeGet("colors.greyLighter"));
|
|
15
15
|
const TabWrapper = styled.div.withConfig({
|
|
16
16
|
displayName: "TabsAlt__TabWrapper",
|
|
17
17
|
componentId: "sc-hkpvfu-1"
|
|
@@ -215,9 +215,9 @@ export const mediaQueries = {
|
|
|
215
215
|
|
|
216
216
|
export const appScale = {
|
|
217
217
|
navBarSize: "50px",
|
|
218
|
-
newNavBarSize: "
|
|
219
|
-
navBarLogoSize: "
|
|
220
|
-
navBarAvatarSize: "
|
|
218
|
+
newNavBarSize: "64px",
|
|
219
|
+
navBarLogoSize: "42px",
|
|
220
|
+
navBarAvatarSize: "38px",
|
|
221
221
|
sideNavSize: "42px",
|
|
222
222
|
sidebarMaxWidth: "360px",
|
|
223
223
|
sidebarMaxWidthLarge: "450px",
|
package/es/systemtheme.js
CHANGED
|
@@ -215,8 +215,8 @@ export const mediaQueries = {
|
|
|
215
215
|
export const appScale = {
|
|
216
216
|
navBarSize: "54px",
|
|
217
217
|
newNavBarSize: "70px",
|
|
218
|
-
navBarLogoSize: "
|
|
219
|
-
navBarAvatarSize: "
|
|
218
|
+
navBarLogoSize: "50px",
|
|
219
|
+
navBarAvatarSize: "46px",
|
|
220
220
|
sideNavSize: "50px",
|
|
221
221
|
sidebarMaxWidth: "360px",
|
|
222
222
|
sidebarMaxWidthLarge: "550px",
|