orcs-design-system 3.3.3 → 3.3.4
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.stories.js +1 -0
- package/es/components/Header/Header.styles.js +10 -8
- package/es/components/Header/UserMenu.js +1 -3
- package/es/components/Header/index.js +14 -11
- package/es/components/SideNav/index.js +0 -1
- package/es/components/TextInput/index.js +19 -34
- package/es/systemThemeCollapsed.js +2 -0
- package/es/systemtheme.js +2 -0
- package/package.json +1 -1
|
@@ -63,8 +63,8 @@ const Image = styled("img").withConfig({
|
|
|
63
63
|
displayName: "Avatar__Image",
|
|
64
64
|
componentId: "sc-1wtet2j-2"
|
|
65
65
|
})(props => css({
|
|
66
|
-
width: props.customSize
|
|
67
|
-
height: props.customSize
|
|
66
|
+
width: themeGet(`appScale.${props.customSize || "avatarDefault"}`)(props) || props.customSize,
|
|
67
|
+
height: themeGet(`appScale.${props.customSize || "avatarDefault"}`)(props) || props.customSize,
|
|
68
68
|
flex: "0 0 auto",
|
|
69
69
|
backgroundColor: themeGet("colors.greyLighter")(props),
|
|
70
70
|
border: "0",
|
|
@@ -31,19 +31,20 @@ export const AppName = styled("div").withConfig({
|
|
|
31
31
|
alignItems: "center",
|
|
32
32
|
gap: ["0", "0", "0", "s"],
|
|
33
33
|
px: "s",
|
|
34
|
-
height: "
|
|
34
|
+
height: themeGet("appScale.sideNavSize")(props),
|
|
35
35
|
borderRadius: themeGet("radii.2")(props),
|
|
36
36
|
border: `1px solid ${themeGet("colors.greyLight")(props)}`,
|
|
37
|
-
boxShadow: themeGet("shadows.boxDefault")(props),
|
|
38
37
|
fontSize: themeGet("fontSizes.1")(props),
|
|
39
38
|
fontWeight: themeGet("fontWeights.2")(props),
|
|
40
39
|
color: themeGet("colors.greyDarkest")(props),
|
|
41
40
|
img: {
|
|
42
|
-
height: "
|
|
41
|
+
height: "100%",
|
|
42
|
+
maxHeight: themeGet("appScale.navBarLogoSize")(props),
|
|
43
43
|
width: "auto"
|
|
44
44
|
},
|
|
45
45
|
svg: {
|
|
46
|
-
height: "
|
|
46
|
+
height: "100%",
|
|
47
|
+
maxHeight: themeGet("appScale.navBarLogoSize")(props),
|
|
47
48
|
width: "auto"
|
|
48
49
|
},
|
|
49
50
|
a: {
|
|
@@ -57,9 +58,9 @@ export const SearchContainer = styled("div").withConfig({
|
|
|
57
58
|
componentId: "sc-xs8ba0-2"
|
|
58
59
|
})(props => css({
|
|
59
60
|
maxWidth: "550px",
|
|
61
|
+
height: themeGet("appScale.sideNavSize")(props),
|
|
60
62
|
flex: "1 1 auto",
|
|
61
|
-
borderRadius: themeGet("radii.2")(props)
|
|
62
|
-
boxShadow: themeGet("shadows.boxDefault")(props)
|
|
63
|
+
borderRadius: themeGet("radii.2")(props)
|
|
63
64
|
}), space, layout);
|
|
64
65
|
export const UserMenuToggle = styled("button").withConfig({
|
|
65
66
|
displayName: "Headerstyles__UserMenuToggle",
|
|
@@ -97,8 +98,9 @@ export const UserMenuContainer = styled(Box).withConfig({
|
|
|
97
98
|
displayName: "Headerstyles__UserMenuContainer",
|
|
98
99
|
componentId: "sc-xs8ba0-5"
|
|
99
100
|
})(props => css({
|
|
100
|
-
borderRadius: `
|
|
101
|
-
position: "relative"
|
|
101
|
+
borderRadius: `calc(${themeGet("appScale.sideNavSize")(props)} / 2) ${themeGet("radii.2")(props)} ${themeGet("radii.2")(props)} calc(${themeGet("appScale.sideNavSize")(props)} / 2)`,
|
|
102
|
+
position: "relative",
|
|
103
|
+
height: themeGet("appScale.sideNavSize")(props)
|
|
102
104
|
}));
|
|
103
105
|
export const UserMenuContent = styled(Box).withConfig({
|
|
104
106
|
displayName: "Headerstyles__UserMenuContent",
|
|
@@ -37,10 +37,8 @@ const UserMenu = _ref => {
|
|
|
37
37
|
ml: "auto",
|
|
38
38
|
bg: "white",
|
|
39
39
|
width: "auto",
|
|
40
|
-
height: "38px",
|
|
41
40
|
border: "solid 1px",
|
|
42
41
|
borderColor: "greyLight",
|
|
43
|
-
shadow: "default",
|
|
44
42
|
display: "flex",
|
|
45
43
|
children: [/*#__PURE__*/_jsxs(UserMenuToggle, {
|
|
46
44
|
onClick: toggleMenu,
|
|
@@ -48,7 +46,7 @@ const UserMenu = _ref => {
|
|
|
48
46
|
borderRadius: "50%",
|
|
49
47
|
p: "2px",
|
|
50
48
|
children: /*#__PURE__*/_jsx(Avatar, {
|
|
51
|
-
customSize: "
|
|
49
|
+
customSize: "navBarAvatarSize",
|
|
52
50
|
image: avatarSource,
|
|
53
51
|
imageAlt: avatarAlt,
|
|
54
52
|
initials: avatarInitials
|
|
@@ -28,18 +28,21 @@ const Header = _ref => {
|
|
|
28
28
|
alignItems: "center",
|
|
29
29
|
justifyContent: "center",
|
|
30
30
|
children: logo
|
|
31
|
-
}), /*#__PURE__*/
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}), currentWorkspace && /*#__PURE__*/_jsx(FlexItem, {
|
|
36
|
-
flex: "0 0 auto",
|
|
37
|
-
children: /*#__PURE__*/_jsx(Small, {
|
|
38
|
-
color: "greyDark",
|
|
39
|
-
fontSize: "0",
|
|
31
|
+
}), /*#__PURE__*/_jsxs(Flex, {
|
|
32
|
+
flexDirection: "column",
|
|
33
|
+
children: [/*#__PURE__*/_jsx(FlexItem, {
|
|
34
|
+
flex: "0 0 auto",
|
|
40
35
|
display: ["none", "none", "none", "block"],
|
|
41
|
-
children:
|
|
42
|
-
})
|
|
36
|
+
children: appName
|
|
37
|
+
}), currentWorkspace && /*#__PURE__*/_jsx(FlexItem, {
|
|
38
|
+
flex: "0 0 auto",
|
|
39
|
+
children: /*#__PURE__*/_jsx(Small, {
|
|
40
|
+
color: "greyDark",
|
|
41
|
+
fontSize: "0",
|
|
42
|
+
display: ["none", "none", "none", "block"],
|
|
43
|
+
children: currentWorkspace
|
|
44
|
+
})
|
|
45
|
+
})]
|
|
43
46
|
})]
|
|
44
47
|
}), searchComponent && /*#__PURE__*/_jsx(SearchContainer, {
|
|
45
48
|
children: searchComponent
|
|
@@ -21,7 +21,6 @@ const SideNavWrapper = styled("div").withConfig({
|
|
|
21
21
|
fontFamily: themeGet("fonts.main")(props),
|
|
22
22
|
borderRadius: themeGet("radii.2")(props),
|
|
23
23
|
border: `solid 1px ${themeGet("colors.greyLighter")(props)}`,
|
|
24
|
-
boxShadow: themeGet("shadows.boxDefault")(props),
|
|
25
24
|
display: "flex",
|
|
26
25
|
alignItems: "stretch",
|
|
27
26
|
alignContent: "stretch",
|
|
@@ -3,7 +3,6 @@ import { NumericFormat } from "react-number-format";
|
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import styled, { css } from "styled-components";
|
|
5
5
|
import { space, layout, compose } from "styled-system";
|
|
6
|
-
import { css as sscss } from "@styled-system/css";
|
|
7
6
|
import { createShouldForwardProp, props } from "@styled-system/should-forward-prop";
|
|
8
7
|
import Icon from "../Icon";
|
|
9
8
|
import { themeGet } from "@styled-system/theme-get";
|
|
@@ -15,26 +14,15 @@ const Group = styled("div").withConfig({
|
|
|
15
14
|
shouldForwardProp,
|
|
16
15
|
displayName: "TextInput__Group",
|
|
17
16
|
componentId: "sc-shde0o-0"
|
|
18
|
-
})(props =>
|
|
17
|
+
})(props => css({
|
|
19
18
|
position: "relative",
|
|
20
|
-
width: props.fullWidth ? "100%" : "auto"
|
|
19
|
+
width: props.fullWidth ? "100%" : "auto",
|
|
20
|
+
minHeight: props => props.height ?? themeGet(props.floating ? "appScale.inputHeightLarge" : "appScale.inputHeightDefault")(props)
|
|
21
21
|
}), InputStyles);
|
|
22
22
|
const IconWrapper = styled.label.withConfig({
|
|
23
23
|
displayName: "TextInput__IconWrapper",
|
|
24
24
|
componentId: "sc-shde0o-1"
|
|
25
|
-
})(["display:flex;align-items:center;position:
|
|
26
|
-
let inputHeight = themeGet("appScale.inputHeightDefault")(props);
|
|
27
|
-
return `calc(${inputHeight} / 3 - 1px)`;
|
|
28
|
-
}) : props.iconLeft && props.floating ? css(["svg{bottom:", ";left:12px;}"], props => {
|
|
29
|
-
let inputHeight = themeGet("appScale.inputHeightDefault")(props);
|
|
30
|
-
return `calc(${inputHeight} / 2 + 3px)`;
|
|
31
|
-
}) : props.iconRight && !props.floating ? css(["svg{bottom:", ";right:12px;}"], props => {
|
|
32
|
-
let inputHeight = themeGet("appScale.inputHeightDefault")(props);
|
|
33
|
-
return `calc(${inputHeight} / 3 - 1px)`;
|
|
34
|
-
}) : props.iconRight && props.floating ? css(["svg{bottom:", ";right:12px;}"], props => {
|
|
35
|
-
let inputHeight = themeGet("appScale.inputHeightDefault")(props);
|
|
36
|
-
return `calc(${inputHeight} / 2 + 3px)`;
|
|
37
|
-
}) : css([""]));
|
|
25
|
+
})(["display:flex;align-items:center;min-height:inherit;position:absolute;width:fit-content;bottom:0;padding:0 10px;svg{opacity:0.4;}", ";"], props => props.iconLeft && !props.floating ? css(["left:0;"]) : props.iconLeft && props.floating ? css(["left:0;bottom:11px;"]) : props.iconRight && !props.floating ? css(["right:0;"]) : props.iconRight && props.floating ? css(["right:0;bottom:11px;"]) : css([""]));
|
|
38
26
|
const InputStyle = css(["display:block;cursor:text;-moz-appearance:none;-webkit-appearance:none;appearance:none;font-family:\"Open Sans\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;box-shadow:none;font-size:", ";z-index:1;border-radius:", ";transition:", ";background:", ";color:", ";width:", ";height:", ";padding:", ";border:1px solid ", ";", " &:hover{border:1px solid ", ";}&:focus{outline:0;box-shadow:", ";border:1px solid ", ";", ";}"], props => themeGet("fontSizes.2")(props), props => themeGet("radii.2")(props), props => themeGet("transition.transitionDefault")(props), props => props.disabled ? themeGet("colors.greyLightest")(props) : themeGet("colors.white")(props), props => props.disabled ? themeGet("colors.grey")(props) : themeGet("colors.greyDarkest")(props), props => props.fullWidth ? `100%` : `auto`, props => props.height ? props.height : props.floating ? themeGet("appScale.inputHeightLarge")(props) : themeGet("appScale.inputHeightDefault")(props), props => {
|
|
39
27
|
let left = props.iconLeft ? 36 : 10;
|
|
40
28
|
let right = props.iconRight ? 36 : 10;
|
|
@@ -97,6 +85,7 @@ const TextInput = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
97
85
|
}, [props.label, numberProps]);
|
|
98
86
|
return /*#__PURE__*/_jsxs(Group, {
|
|
99
87
|
fullWidth: fullWidth,
|
|
88
|
+
height: height,
|
|
100
89
|
...InputStyles,
|
|
101
90
|
children: [label && !floating ? /*#__PURE__*/_jsx(Label, {
|
|
102
91
|
inverted: inverted,
|
|
@@ -131,27 +120,23 @@ const TextInput = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
131
120
|
iconRight: iconRight,
|
|
132
121
|
iconLeft: iconLeft,
|
|
133
122
|
children: label
|
|
134
|
-
}) : null, iconLeft ? /*#__PURE__*/_jsx(
|
|
135
|
-
|
|
123
|
+
}) : null, iconLeft ? /*#__PURE__*/_jsx(IconWrapper, {
|
|
124
|
+
htmlFor: id,
|
|
125
|
+
iconLeft: iconLeft,
|
|
126
|
+
floating: floating,
|
|
127
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
128
|
+
icon: iconLeft,
|
|
136
129
|
htmlFor: id,
|
|
137
|
-
|
|
138
|
-
floating: floating,
|
|
139
|
-
children: /*#__PURE__*/_jsx(Icon, {
|
|
140
|
-
icon: iconLeft,
|
|
141
|
-
htmlFor: id,
|
|
142
|
-
color: "black"
|
|
143
|
-
})
|
|
130
|
+
color: "black"
|
|
144
131
|
})
|
|
145
|
-
}) : null, iconRight ? /*#__PURE__*/_jsx(
|
|
146
|
-
|
|
132
|
+
}) : null, iconRight ? /*#__PURE__*/_jsx(IconWrapper, {
|
|
133
|
+
htmlFor: id,
|
|
134
|
+
iconRight: iconRight,
|
|
135
|
+
floating: floating,
|
|
136
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
137
|
+
icon: iconRight,
|
|
147
138
|
htmlFor: id,
|
|
148
|
-
|
|
149
|
-
floating: floating,
|
|
150
|
-
children: /*#__PURE__*/_jsx(Icon, {
|
|
151
|
-
icon: iconRight,
|
|
152
|
-
htmlFor: id,
|
|
153
|
-
color: "#black"
|
|
154
|
-
})
|
|
139
|
+
color: "#black"
|
|
155
140
|
})
|
|
156
141
|
}) : null]
|
|
157
142
|
});
|
|
@@ -216,6 +216,8 @@ export const mediaQueries = {
|
|
|
216
216
|
export const appScale = {
|
|
217
217
|
navBarSize: "50px",
|
|
218
218
|
newNavBarSize: "70px",
|
|
219
|
+
navBarLogoSize: "30px",
|
|
220
|
+
navBarAvatarSize: "32px",
|
|
219
221
|
sideNavSize: "42px",
|
|
220
222
|
sidebarMaxWidth: "360px",
|
|
221
223
|
sidebarMaxWidthLarge: "450px",
|
package/es/systemtheme.js
CHANGED
|
@@ -215,6 +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
220
|
sideNavSize: "50px",
|
|
219
221
|
sidebarMaxWidth: "360px",
|
|
220
222
|
sidebarMaxWidthLarge: "550px",
|