orcs-design-system 3.3.6 → 3.3.8

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.
@@ -13,7 +13,7 @@ export default {
13
13
  component: Header,
14
14
  decorators: [storyFn => /*#__PURE__*/_jsx(Box, {
15
15
  height: "350px",
16
- bg: "greyLightest",
16
+ bg: "white",
17
17
  p: "r",
18
18
  children: storyFn()
19
19
  })]
@@ -61,6 +61,7 @@ const UserMenuContent = () => {
61
61
  export const defaultHeader = () => /*#__PURE__*/_jsx(Header, {
62
62
  appName: "Powercorp directory",
63
63
  logo: dummyLogo,
64
+ showLogoSeparator: true,
64
65
  userName: "Michael Jenkins (michael.jenkins@powercorp.com)",
65
66
  avatarSource: "https://api.dicebear.com/7.x/personas/svg?seed=mike",
66
67
  avatarAlt: "Avatar for Michael",
@@ -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: "transparent",
21
+ bg: "white",
21
22
  gap: "r",
22
- p: "r"
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: themeGet("colors.white")(props),
29
+ background: "transparent",
29
30
  width: "fit-content",
30
31
  display: "flex",
31
32
  alignItems: "center",
32
- gap: ["0", "0", "0", "s"],
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,9 +51,17 @@ 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-2"
64
+ componentId: "sc-xs8ba0-3"
59
65
  })(props => css({
60
66
  maxWidth: "550px",
61
67
  marginLeft: "auto",
@@ -65,12 +71,11 @@ export const SearchContainer = styled("div").withConfig({
65
71
  }), space, layout);
66
72
  export const UserMenuToggle = styled("button").withConfig({
67
73
  displayName: "Headerstyles__UserMenuToggle",
68
- componentId: "sc-xs8ba0-3"
74
+ componentId: "sc-xs8ba0-4"
69
75
  })(props => css({
70
76
  display: "flex",
71
77
  alignItems: "center",
72
78
  justifyContent: "center",
73
- gap: "xs",
74
79
  padding: "0",
75
80
  cursor: "pointer",
76
81
  border: "none",
@@ -79,33 +84,36 @@ export const UserMenuToggle = styled("button").withConfig({
79
84
  color: themeGet("colors.greyDark")(props),
80
85
  fontSize: themeGet("fontSizes.1")(props),
81
86
  fontWeight: themeGet("fontWeights.2")(props),
82
- "svg path": {
83
- transition: "fill 300ms ease-in-out"
84
- },
85
87
  "&:focus, &:hover": {
86
- outline: "none",
87
- "svg path": {
88
- fill: themeGet("colors.primary")(props)
89
- }
88
+ outline: "none"
90
89
  }
91
90
  }));
92
91
  export const AvatarBorder = styled(Box).withConfig({
93
92
  displayName: "Headerstyles__AvatarBorder",
94
- componentId: "sc-xs8ba0-4"
93
+ componentId: "sc-xs8ba0-5"
95
94
  })(css({
96
- background: "linear-gradient(0deg, rgba(155,81,224,1) 0%, rgba(0,145,234,1) 100%)"
95
+ background: "linear-gradient(135deg, rgba(0,145,234,1) 0%, rgba(155,81,224,1) 100%)"
97
96
  }));
98
97
  export const UserMenuContainer = styled(Box).withConfig({
99
98
  displayName: "Headerstyles__UserMenuContainer",
100
- componentId: "sc-xs8ba0-5"
101
- })(props => css({
102
- borderRadius: `calc(${themeGet("appScale.sideNavSize")(props)} / 2) ${themeGet("radii.2")(props)} ${themeGet("radii.2")(props)} calc(${themeGet("appScale.sideNavSize")(props)} / 2)`,
103
- position: "relative",
104
- height: themeGet("appScale.sideNavSize")(props)
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%)"
105
113
  }));
106
114
  export const UserMenuContent = styled(Box).withConfig({
107
115
  displayName: "Headerstyles__UserMenuContent",
108
- componentId: "sc-xs8ba0-6"
116
+ componentId: "sc-xs8ba0-8"
109
117
  })(props => css({
110
118
  position: "absolute",
111
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,13 +32,6 @@ const UserMenu = _ref => {
32
32
  };
33
33
  return /*#__PURE__*/_jsxs(UserMenuContainer, {
34
34
  ref: menuRef,
35
- p: "2px",
36
- pr: "s",
37
- bg: "white",
38
- width: "auto",
39
- border: "solid 1px",
40
- borderColor: "greyLight",
41
- display: "flex",
42
35
  children: [/*#__PURE__*/_jsxs(UserMenuToggle, {
43
36
  onClick: toggleMenu,
44
37
  children: [/*#__PURE__*/_jsx(AvatarBorder, {
@@ -50,11 +43,18 @@ const UserMenu = _ref => {
50
43
  imageAlt: avatarAlt,
51
44
  initials: avatarInitials
52
45
  })
53
- }), /*#__PURE__*/_jsx(Icon, {
54
- icon: ["fas", "chevron-down"],
55
- rotation: isOpen ? 180 : 0,
56
- color: "greyDark",
57
- ml: "s"
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
+ })
58
58
  })]
59
59
  }), /*#__PURE__*/_jsxs(UserMenuContent, {
60
60
  p: "s",
@@ -2,7 +2,7 @@ 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.
@@ -19,15 +19,14 @@ const Header = _ref => {
19
19
  dataTestId,
20
20
  currentWorkspace,
21
21
  logo,
22
- userMenuContent
22
+ userMenuContent,
23
+ showLogoSeparator = false
23
24
  } = _ref;
24
25
  return /*#__PURE__*/_jsxs(Bar, {
25
26
  dataTestId: dataTestId,
26
27
  children: [/*#__PURE__*/_jsxs(AppName, {
27
- children: [logo && /*#__PURE__*/_jsx(Flex, {
28
- alignItems: "center",
29
- justifyContent: "center",
30
- children: logo
28
+ children: [logo, showLogoSeparator && /*#__PURE__*/_jsx(Separator, {
29
+ display: ["none", "none", "none", "block"]
31
30
  }), /*#__PURE__*/_jsxs(Flex, {
32
31
  flexDirection: "column",
33
32
  children: [appName && /*#__PURE__*/_jsx(FlexItem, {
@@ -77,7 +76,9 @@ Header.propTypes = {
77
76
  /** Allows for use of the `data-testid` attribute for testing. */
78
77
  dataTestId: PropTypes.string,
79
78
  /** Allows you to pass in child components to user dropdown menu */
80
- userMenuContent: PropTypes.node
79
+ userMenuContent: PropTypes.node,
80
+ /** use this to apply separator if logo and appName or currentWorkspace exists */
81
+ showLogoSeparator: PropTypes.bool
81
82
  };
82
83
 
83
84
  /** @component */
@@ -86,6 +87,17 @@ Header.__docgenInfo = {
86
87
  "methods": [],
87
88
  "displayName": "Header",
88
89
  "props": {
90
+ "showLogoSeparator": {
91
+ "defaultValue": {
92
+ "value": "false",
93
+ "computed": false
94
+ },
95
+ "description": "use this to apply separator if logo and appName or currentWorkspace exists",
96
+ "type": {
97
+ "name": "bool"
98
+ },
99
+ "required": false
100
+ },
89
101
  "logo": {
90
102
  "description": "Logo for app. Preferably an svg logo",
91
103
  "type": {
@@ -215,9 +215,9 @@ export const mediaQueries = {
215
215
 
216
216
  export const appScale = {
217
217
  navBarSize: "50px",
218
- newNavBarSize: "70px",
219
- navBarLogoSize: "30px",
220
- navBarAvatarSize: "32px",
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: "35px",
219
- navBarAvatarSize: "40px",
218
+ navBarLogoSize: "50px",
219
+ navBarAvatarSize: "46px",
220
220
  sideNavSize: "50px",
221
221
  sidebarMaxWidth: "360px",
222
222
  sidebarMaxWidthLarge: "550px",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orcs-design-system",
3
- "version": "3.3.6",
3
+ "version": "3.3.8",
4
4
  "engines": {
5
5
  "node": "20.12.2"
6
6
  },
@@ -99,7 +99,7 @@
99
99
  "@storybook/mdx1-csf": "^1.0.0",
100
100
  "@storybook/preset-create-react-app": "^8.3.3",
101
101
  "@storybook/react": "^8.1.7",
102
- "@storybook/react-webpack5": "^8.2.9",
102
+ "@storybook/react-webpack5": "^8.3.7",
103
103
  "@storybook/storybook-deployer": "2.8.16",
104
104
  "@storybook/theming": "^8.1.7",
105
105
  "@testing-library/jest-dom": "^5.11.6",
@@ -131,6 +131,7 @@
131
131
  "nodemon": "^3.1.0",
132
132
  "npm-run-all": "^4.1.5",
133
133
  "playroom": "^0.32.1",
134
+ "postcss": "8.5.2",
134
135
  "prettier": "^2.2.1",
135
136
  "react": "^18.3.1",
136
137
  "react-docgen": "^7.0.3",
@@ -149,7 +150,7 @@
149
150
  "jest": "$jest",
150
151
  "nth-check": "2.1.0",
151
152
  "parse-url": "8.1.0",
152
- "postcss": "^8.4.31",
153
+ "postcss": "8.5.2",
153
154
  "react-scripts": "5.0.1",
154
155
  "remark-parse": "10.0.2",
155
156
  "react": "^18.3.1",
@@ -158,7 +159,7 @@
158
159
  "webpack-dev-middleware": "6.1.2",
159
160
  "ws": "8.17.1",
160
161
  "express": {
161
- "path-to-regexp": "0.1.10"
162
+ "path-to-regexp": "0.1.12"
162
163
  },
163
164
  "send": "0.19.0",
164
165
  "redux": "4.2.1",