orcs-design-system 3.2.37 → 3.2.39
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/assets/Colour/index.js +1 -1
- package/es/components/ActionsMenu/index.js +12 -17
- package/es/components/ActionsMenu/useActionMenu.js +2 -2
- package/es/components/Avatar/index.js +5 -5
- package/es/components/Badge/index.js +1 -1
- package/es/components/Button/index.js +5 -5
- package/es/components/ButtonGroup/index.js +1 -1
- package/es/components/Checkbox/index.js +3 -3
- package/es/components/DatePicker/index.js +2 -2
- package/es/components/Divider/index.js +1 -1
- package/es/components/Header/Header.stories.js +6 -6
- package/es/components/Header/index.js +2 -2
- package/es/components/HeaderSimple/HeaderSimple.stories.js +2 -2
- package/es/components/Icon/index.js +1 -1
- package/es/components/Modal/Modal.stories.js +226 -4
- package/es/components/Modal/index.js +1 -1
- package/es/components/Popover/index.js +7 -5
- package/es/components/ProgressBar/index.js +2 -2
- package/es/components/RadioButton/index.js +2 -2
- package/es/components/Range/index.js +17 -2
- package/es/components/Select/index.js +11 -12
- package/es/components/SideNav/SideNav.stories.js +22 -33
- package/es/components/SideNav/index.js +9 -30
- package/es/components/Sidebar/index.js +1 -1
- package/es/components/StyledLink/StyledLink.stories.js +3 -4
- package/es/components/Table/Table.stories.js +2 -2
- package/es/components/Table/getExpandColumnConfig.js +5 -5
- package/es/components/Table/muiStyleOverrides.js +1 -2
- package/es/components/Tabs/index.js +3 -3
- package/es/components/Tag/index.js +4 -4
- package/es/components/TextArea/index.js +2 -2
- package/es/components/TextInput/index.js +11 -11
- package/es/components.test.js +72 -1
- package/es/systemThemeCollapsed.js +9 -9
- package/es/systemtheme.js +9 -9
- package/es/utils/floatingUiHelpers.js +3 -8
- package/package.json +18 -13
|
@@ -28,9 +28,8 @@ const TooltipControl = styled.div.withConfig({
|
|
|
28
28
|
const StyledPopover = styled.div.withConfig({
|
|
29
29
|
displayName: "Popover__StyledPopover",
|
|
30
30
|
componentId: "sc-1bwoak-2"
|
|
31
|
-
})(["font-size:", ";line-height:", ";font-weight:", ";text-align:", ";word-break:break-word;color:", ";outline:0;padding:", ";border-radius:", ";width:", ";background:", ";border:1px solid ", ";box-shadow:", ";user-select:", ";&.hack-for-legacy-tests{position:absolute;pointer-events:none;opacity:0;visibility:hidden;height:0;width:0;padding:0;}&.visible{opacity:1;pointer-events:auto;visibility:visible;}& a{font-size:", ";}&:before{content:\"\";z-index:2;height:0;width:0;border-style:solid;border-width:6px 6px 6px 0;border-color:transparent;border-right-color:", ";left:-6px;top:50%;margin-top:-6px;position:absolute;}&:after{content:\"\";z-index:1;position:absolute;border-color:transparent;border-right-color:", ";height:0;width:0;border-style:solid;border-width:6px 6px 6px 0;left:-7px;top:50%;margin-top:-6px;}&.top{&:before{left:50%;top:auto;margin-top:0;bottom:-9px;margin-left:-3px;transform:rotate(-90deg);}&:after{left:50%;top:auto;margin-top:0;bottom:-10px;margin-left:-3px;transform:rotate(-90deg);}}&.topRight,&.top-end{&:before{left:1px;top:auto;margin-top:0;bottom:-5px;margin-left:-6px;transform:rotate(-45deg);border-width:5px 10px 5px 0;}&:after{left:1px;top:auto;margin-top:0;bottom:-6px;margin-left:-7px;transform:rotate(-45deg);border-width:5px 10px 5px 0;}}&.bottomRight,&.bottom-end{&:before{left:1px;bottom:auto;margin-top:0;top:-5px;margin-left:-6px;transform:rotate(45deg);border-width:5px 10px 5px 0;}&:after{left:1px;bottom:auto;margin-top:0;top:-6px;margin-left:-7px;transform:rotate(45deg);border-width:5px 10px 5px 0;}}&.bottom{&:before{left:50%;top:-9px;margin-top:0;margin-left:-3px;transform:rotate(90deg);}&:after{left:50%;top:-10px;margin-top:0;margin-left:-3px;transform:rotate(90deg);}}&.bottomLeft,&.bottom-start{&:before{right:1px;left:auto;bottom:auto;margin-top:0;top:-5px;margin-right:-6px;transform:rotate(135deg);border-width:5px 10px 5px 0;}&:after{right:1px;left:auto;bottom:auto;margin-top:0;top:-6px;margin-right:-7px;transform:rotate(135deg);border-width:5px 10px 5px 0;}}&.left{&:before{left:auto;right:-6px;transform:rotate(180deg);}&:after{left:auto;right:-7px;transform:rotate(180deg);top:50%;margin-top:-6px;}}&.topLeft,&.top-start{&:before{right:1px;left:auto;top:auto;margin-top:0;bottom:-5px;margin-right:-6px;transform:rotate(225deg);border-width:5px 10px 5px 0;}&:after{right:1px;left:auto;top:auto;margin-top:0;bottom:-6px;margin-right:-7px;transform:rotate(225deg);border-width:5px 10px 5px 0;}}"], themeGet("fontSizes.0"), themeGet("fontSizes.1"), themeGet("fontWeights.1"), props => props.textAlign ? props.textAlign : "left", themeGet("colors.greyDarkest"), themeGet("space.3"), themeGet("radii.1"), props => props.width ? props.width : "200px", themeGet("colors.white"), themeGet("colors.greyLight"), themeGet("shadows.boxDefault"), props => props.enableSelectAll ? "all" : "auto", themeGet("fontSizes.0"), themeGet("colors.white"), themeGet("colors.greyMid"));
|
|
31
|
+
})(["font-size:", ";line-height:", ";font-weight:", ";text-align:", ";word-break:break-word;color:", ";outline:0;padding:", ";border-radius:", ";width:", ";background:", ";border:1px solid ", ";box-shadow:", ";user-select:", ";&.hack-for-legacy-tests{position:absolute;pointer-events:none;opacity:0;visibility:hidden;height:0;width:0;padding:0;overflow:hidden;}&.visible{opacity:1;pointer-events:auto;visibility:visible;}& a{font-size:", ";}&:before{content:\"\";z-index:2;height:0;width:0;border-style:solid;border-width:6px 6px 6px 0;border-color:transparent;border-right-color:", ";left:-6px;top:50%;margin-top:-6px;position:absolute;}&:after{content:\"\";z-index:1;position:absolute;border-color:transparent;border-right-color:", ";height:0;width:0;border-style:solid;border-width:6px 6px 6px 0;left:-7px;top:50%;margin-top:-6px;}&.top{&:before{left:50%;top:auto;margin-top:0;bottom:-9px;margin-left:-3px;transform:rotate(-90deg);}&:after{left:50%;top:auto;margin-top:0;bottom:-10px;margin-left:-3px;transform:rotate(-90deg);}}&.topRight,&.top-end{&:before{left:1px;top:auto;margin-top:0;bottom:-5px;margin-left:-6px;transform:rotate(-45deg);border-width:5px 10px 5px 0;}&:after{left:1px;top:auto;margin-top:0;bottom:-6px;margin-left:-7px;transform:rotate(-45deg);border-width:5px 10px 5px 0;}}&.bottomRight,&.bottom-end{&:before{left:1px;bottom:auto;margin-top:0;top:-5px;margin-left:-6px;transform:rotate(45deg);border-width:5px 10px 5px 0;}&:after{left:1px;bottom:auto;margin-top:0;top:-6px;margin-left:-7px;transform:rotate(45deg);border-width:5px 10px 5px 0;}}&.bottom{&:before{left:50%;top:-9px;margin-top:0;margin-left:-3px;transform:rotate(90deg);}&:after{left:50%;top:-10px;margin-top:0;margin-left:-3px;transform:rotate(90deg);}}&.bottomLeft,&.bottom-start{&:before{right:1px;left:auto;bottom:auto;margin-top:0;top:-5px;margin-right:-6px;transform:rotate(135deg);border-width:5px 10px 5px 0;}&:after{right:1px;left:auto;bottom:auto;margin-top:0;top:-6px;margin-right:-7px;transform:rotate(135deg);border-width:5px 10px 5px 0;}}&.left{&:before{left:auto;right:-6px;transform:rotate(180deg);}&:after{left:auto;right:-7px;transform:rotate(180deg);top:50%;margin-top:-6px;}}&.topLeft,&.top-start{&:before{right:1px;left:auto;top:auto;margin-top:0;bottom:-5px;margin-right:-6px;transform:rotate(225deg);border-width:5px 10px 5px 0;}&:after{right:1px;left:auto;top:auto;margin-top:0;bottom:-6px;margin-right:-7px;transform:rotate(225deg);border-width:5px 10px 5px 0;}}"], themeGet("fontSizes.0"), themeGet("fontSizes.1"), themeGet("fontWeights.1"), props => props.textAlign ? props.textAlign : "left", themeGet("colors.greyDarkest"), themeGet("space.3"), themeGet("radii.1"), props => props.width ? props.width : "200px", themeGet("colors.white"), themeGet("colors.greyLight"), themeGet("shadows.boxDefault"), props => props.enableSelectAll ? "all" : "auto", themeGet("fontSizes.0"), themeGet("colors.white"), themeGet("colors.greyMid"));
|
|
32
32
|
export default function Popover(_ref) {
|
|
33
|
-
var _refs$floating;
|
|
34
33
|
let {
|
|
35
34
|
children,
|
|
36
35
|
direction = "right",
|
|
@@ -93,9 +92,12 @@ export default function Popover(_ref) {
|
|
|
93
92
|
...floatingStyles,
|
|
94
93
|
zIndex: getFloatingUiZIndex(context.refs.reference)
|
|
95
94
|
}), [floatingStyles, context.refs.reference]);
|
|
96
|
-
const containsLinks =
|
|
97
|
-
const visiblePopoverClassName = useMemo(() =>
|
|
98
|
-
const floatingProps = useMemo(() => getFloatingProps(
|
|
95
|
+
const containsLinks = refs.floating?.current?.querySelectorAll("a").length;
|
|
96
|
+
const visiblePopoverClassName = useMemo(() => `Tooltip popover visible ${directionClass}`, [directionClass]);
|
|
97
|
+
const floatingProps = useMemo(() => getFloatingProps({
|
|
98
|
+
...props,
|
|
99
|
+
className: `${props.className} ${visiblePopoverClassName}`
|
|
100
|
+
}), [getFloatingProps, props, visiblePopoverClassName]);
|
|
99
101
|
return /*#__PURE__*/_jsxs(Container, {
|
|
100
102
|
inlineBlock: inlineBlock,
|
|
101
103
|
...props,
|
|
@@ -17,8 +17,8 @@ const Fill = styled.div.withConfig({
|
|
|
17
17
|
const sixPxInPercentage = 6 / props.containerWidthPx * 100;
|
|
18
18
|
const minPixelValue = 1; // Minimum pixel value for visibility
|
|
19
19
|
const minPercentageValue = minPixelValue / props.containerWidthPx * 100;
|
|
20
|
-
const calculatedWidth =
|
|
21
|
-
return
|
|
20
|
+
const calculatedWidth = `calc(${props.fillWidth}% - ${sixPxInPercentage}%)`;
|
|
21
|
+
return `max(${calculatedWidth}, ${minPercentageValue}%)`;
|
|
22
22
|
}
|
|
23
23
|
return "0";
|
|
24
24
|
}, expandWidth, props => themeGet("transition.transitionDefault")(props), props => props.gradient ? css(["background:linear-gradient( to right,", " 0%,", " 50%,", " 100% );"], themeGet("colors.danger")(props), themeGet("colors.warning")(props), themeGet("colors.success")(props)) : css(["background:", ";"], themeGet("colors.primary")(props)));
|
|
@@ -208,10 +208,10 @@ RadioButton.propTypes = {
|
|
|
208
208
|
// ariaLabel prop must be specified if label is not provided
|
|
209
209
|
ariaLabel: (props, propName) => {
|
|
210
210
|
if (!props.label && (props[propName] == null || props[propName] === "")) {
|
|
211
|
-
return new Error(
|
|
211
|
+
return new Error(`Missing prop \`${propName}\` not specified for Radio component. When \`label\` is not provided, \`${propName}\` is required.`);
|
|
212
212
|
}
|
|
213
213
|
if (props[propName] && typeof props[propName] !== "string") {
|
|
214
|
-
return new Error(
|
|
214
|
+
return new Error(`Invalid propType \`${propName}\` supplied to Radio component. Expected \`string\`, received \`${typeof props[propName]}\`.`);
|
|
215
215
|
}
|
|
216
216
|
return null;
|
|
217
217
|
},
|
|
@@ -8,8 +8,23 @@ const vars = {
|
|
|
8
8
|
trackHeight: "4px",
|
|
9
9
|
thumbDiameter: "20px"
|
|
10
10
|
};
|
|
11
|
-
const thumb = props =>
|
|
12
|
-
|
|
11
|
+
const thumb = props => `
|
|
12
|
+
margin-top: -8px;
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
border: none;
|
|
15
|
+
width: ${vars.thumbDiameter};
|
|
16
|
+
height: ${vars.thumbDiameter};
|
|
17
|
+
border-radius: ${vars.thumbDiameter};
|
|
18
|
+
background: ${themeGet("colors.primary")(props)};
|
|
19
|
+
`;
|
|
20
|
+
const track = props => `
|
|
21
|
+
box-sizing: border-box;
|
|
22
|
+
border: none;
|
|
23
|
+
width: 100%;
|
|
24
|
+
height: ${vars.trackHeight};
|
|
25
|
+
background: ${themeGet("colors.greyLight")(props)};
|
|
26
|
+
border-radius: 4px;
|
|
27
|
+
`;
|
|
13
28
|
const Wrapper = styled.div.withConfig({
|
|
14
29
|
displayName: "Range__Wrapper",
|
|
15
30
|
componentId: "sc-zb0zps-0"
|
|
@@ -44,7 +44,7 @@ const MultiValueRemove = props => {
|
|
|
44
44
|
...props,
|
|
45
45
|
innerProps: {
|
|
46
46
|
...innerProps,
|
|
47
|
-
"aria-label":
|
|
47
|
+
"aria-label": `Remove ${data.label}`
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
};
|
|
@@ -75,7 +75,6 @@ const SELECT_TYPES = {
|
|
|
75
75
|
*
|
|
76
76
|
*/
|
|
77
77
|
const Select = /*#__PURE__*/forwardRef((props, ref) => {
|
|
78
|
-
var _SELECT_TYPES$props$s;
|
|
79
78
|
const theme = useTheme();
|
|
80
79
|
const inputRef = useInputFocus(ref, props.focus);
|
|
81
80
|
const {
|
|
@@ -180,11 +179,11 @@ const Select = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
180
179
|
theme
|
|
181
180
|
}),
|
|
182
181
|
overflow: "hidden",
|
|
183
|
-
border:
|
|
182
|
+
border: `1px solid ${props.invalid ? themeGet("colors.danger")({
|
|
184
183
|
theme
|
|
185
184
|
}) : themeGet("colors.black30")({
|
|
186
185
|
theme
|
|
187
|
-
})
|
|
186
|
+
})}`
|
|
188
187
|
}),
|
|
189
188
|
container: (provided, state) => ({
|
|
190
189
|
...provided,
|
|
@@ -301,9 +300,9 @@ const Select = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
301
300
|
color: themeGet("colors.white")({
|
|
302
301
|
theme
|
|
303
302
|
}),
|
|
304
|
-
borderLeft:
|
|
303
|
+
borderLeft: `solid 1px ${themeGet("colors.primaryDark")({
|
|
305
304
|
theme
|
|
306
|
-
})
|
|
305
|
+
})}`,
|
|
307
306
|
padding: "6.5px 6px 6.5px 5px",
|
|
308
307
|
display: state.data.isFixed ? "none" : provided.display,
|
|
309
308
|
cursor: "pointer",
|
|
@@ -353,9 +352,9 @@ const Select = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
353
352
|
});
|
|
354
353
|
const components = {
|
|
355
354
|
MultiValueRemove,
|
|
356
|
-
...(
|
|
355
|
+
...(props?.components || {})
|
|
357
356
|
};
|
|
358
|
-
const SelectComponent =
|
|
357
|
+
const SelectComponent = SELECT_TYPES[props?.selectType] ?? SELECT_TYPES.default;
|
|
359
358
|
const component = /*#__PURE__*/_jsxs(Wrapper, {
|
|
360
359
|
inverted: props.inverted,
|
|
361
360
|
"data-testid": props["data-testid"],
|
|
@@ -397,10 +396,10 @@ Select.propTypes = {
|
|
|
397
396
|
// ariaLabel prop must be specified if label is not provided
|
|
398
397
|
ariaLabel: (props, propName) => {
|
|
399
398
|
if (!props.label && (props[propName] == null || props[propName] === "")) {
|
|
400
|
-
return new Error(
|
|
399
|
+
return new Error(`Missing prop \`${propName}\` not specified for Select component. When \`label\` is not provided, \`${propName}\` is required.`);
|
|
401
400
|
}
|
|
402
401
|
if (props[propName] && typeof props[propName] !== "string") {
|
|
403
|
-
return new Error(
|
|
402
|
+
return new Error(`Invalid propType \`${propName}\` supplied to Select component. Expected \`string\`, received \`${typeof props[propName]}\`.`);
|
|
404
403
|
}
|
|
405
404
|
return null;
|
|
406
405
|
},
|
|
@@ -411,10 +410,10 @@ Select.propTypes = {
|
|
|
411
410
|
/** Specifies the ID for the rendered Select box. If you use the label prop label will automatically point to this ID, so this is required. */
|
|
412
411
|
inputId: (props, propName) => {
|
|
413
412
|
if (props.label && (props[propName] == null || props[propName] === "")) {
|
|
414
|
-
return new Error(
|
|
413
|
+
return new Error(`Missing prop \`${propName}\` not specified for Select component. When \`label\` is provided, \`${propName}\` is required.`);
|
|
415
414
|
}
|
|
416
415
|
if (props[propName] && typeof props[propName] !== "string") {
|
|
417
|
-
return new Error(
|
|
416
|
+
return new Error(`Invalid propType \`${propName}\` supplied to Select component. Expected \`string\`, received \`${typeof props[propName]}\`.`);
|
|
418
417
|
}
|
|
419
418
|
return null;
|
|
420
419
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable react/prop-types */
|
|
2
2
|
import React from "react";
|
|
3
3
|
import SideNav from "./index";
|
|
4
|
-
import { BrowserRouter as Router, Route, Link,
|
|
4
|
+
import { BrowserRouter as Router, Route, Link, Routes, useParams, useMatch, Navigate } from "react-router-dom";
|
|
5
5
|
import { H5, P } from "../Typography";
|
|
6
6
|
import Box from "../Box";
|
|
7
7
|
import { far } from "@fortawesome/free-regular-svg-icons";
|
|
@@ -59,59 +59,46 @@ const PageCard = _ref2 => {
|
|
|
59
59
|
});
|
|
60
60
|
};
|
|
61
61
|
const SideBarWithConfig = () => {
|
|
62
|
-
const
|
|
62
|
+
const isHome = useMatch("/");
|
|
63
|
+
const isProfile = useMatch("/profile");
|
|
64
|
+
const isSearch = useMatch("/search");
|
|
63
65
|
const items = [{
|
|
64
66
|
iconName: "building",
|
|
65
67
|
name: "Home",
|
|
66
68
|
component: makeLinkComponent("/"),
|
|
67
69
|
actionType: "link",
|
|
68
|
-
isActive:
|
|
69
|
-
path: "/",
|
|
70
|
-
exact: true
|
|
71
|
-
})
|
|
70
|
+
isActive: !!isHome
|
|
72
71
|
}, {
|
|
73
72
|
iconName: "user",
|
|
74
73
|
name: "My profile",
|
|
75
74
|
component: makeLinkComponent("/profile"),
|
|
76
75
|
actionType: "link",
|
|
77
|
-
isActive:
|
|
78
|
-
path: "/profile"
|
|
79
|
-
})
|
|
76
|
+
isActive: !!isProfile
|
|
80
77
|
}, {
|
|
81
78
|
iconName: "id-card",
|
|
82
79
|
name: "Search Page",
|
|
83
80
|
component: makeLinkComponent("/search"),
|
|
84
81
|
actionType: "link",
|
|
85
|
-
isActive:
|
|
86
|
-
path: "/search"
|
|
87
|
-
})
|
|
82
|
+
isActive: isSearch
|
|
88
83
|
}, {
|
|
89
84
|
iconName: "snowflake",
|
|
90
85
|
name: "Filter",
|
|
91
|
-
hide: !
|
|
92
|
-
path: "/search"
|
|
93
|
-
}),
|
|
86
|
+
hide: !isSearch,
|
|
94
87
|
// Specify hide if you want to hide this item
|
|
95
88
|
component: makePanelComponent("Filter"),
|
|
96
89
|
actionType: "component",
|
|
97
90
|
// Use 'component' for a component
|
|
98
|
-
pageSpecific:
|
|
99
|
-
path: "/search"
|
|
100
|
-
}),
|
|
91
|
+
pageSpecific: isSearch,
|
|
101
92
|
isExpandedByDefault: true
|
|
102
93
|
}, {
|
|
103
94
|
iconName: "sun",
|
|
104
95
|
name: "People",
|
|
105
|
-
hide: !
|
|
106
|
-
path: "/profile"
|
|
107
|
-
}),
|
|
96
|
+
hide: !isProfile,
|
|
108
97
|
// Specify hide if you want to hide this item
|
|
109
98
|
component: makePanelComponent("People"),
|
|
110
99
|
actionType: "component",
|
|
111
100
|
// Use 'component' for a component
|
|
112
|
-
pageSpecific:
|
|
113
|
-
path: "/profile"
|
|
114
|
-
}),
|
|
101
|
+
pageSpecific: isProfile,
|
|
115
102
|
isExpandedByDefault: true
|
|
116
103
|
}, {
|
|
117
104
|
iconName: "bell",
|
|
@@ -128,7 +115,7 @@ const SideBarWithConfig = () => {
|
|
|
128
115
|
component: makePanelComponent("BrowseTeams", /*#__PURE__*/_jsx(Flex, {
|
|
129
116
|
flexDirection: "column",
|
|
130
117
|
children: ["Team 1", "Team 2", "Team 3"].map(team => /*#__PURE__*/_jsx(Link, {
|
|
131
|
-
to:
|
|
118
|
+
to: `/teams/${team}`,
|
|
132
119
|
children: team
|
|
133
120
|
}, team))
|
|
134
121
|
})),
|
|
@@ -172,30 +159,32 @@ const SideBarWithConfig = () => {
|
|
|
172
159
|
children: [/*#__PURE__*/_jsx(SideNav, {
|
|
173
160
|
items: items,
|
|
174
161
|
sideNavHeight: "500px"
|
|
175
|
-
}), /*#__PURE__*/_jsxs(
|
|
162
|
+
}), /*#__PURE__*/_jsxs(Routes, {
|
|
176
163
|
children: [/*#__PURE__*/_jsx(Route, {
|
|
177
|
-
exact: true,
|
|
178
164
|
path: "/",
|
|
179
|
-
|
|
165
|
+
element: /*#__PURE__*/_jsx(PageCard, {
|
|
180
166
|
children: /*#__PURE__*/_jsx("div", {
|
|
181
167
|
children: "Home"
|
|
182
168
|
})
|
|
183
169
|
})
|
|
184
170
|
}), /*#__PURE__*/_jsx(Route, {
|
|
185
171
|
path: "/profile",
|
|
186
|
-
|
|
172
|
+
element: /*#__PURE__*/_jsx(PageCard, {
|
|
187
173
|
children: /*#__PURE__*/_jsx("div", {
|
|
188
174
|
children: "Profile route"
|
|
189
175
|
})
|
|
190
176
|
})
|
|
191
177
|
}), /*#__PURE__*/_jsx(Route, {
|
|
192
178
|
path: "/teams/:teamId",
|
|
193
|
-
|
|
179
|
+
element: /*#__PURE__*/_jsx(PageCard, {
|
|
194
180
|
children: /*#__PURE__*/_jsx(Teams, {})
|
|
195
181
|
})
|
|
196
|
-
}), /*#__PURE__*/_jsx(
|
|
197
|
-
|
|
198
|
-
|
|
182
|
+
}), /*#__PURE__*/_jsx(Route, {
|
|
183
|
+
path: "/iframe.html",
|
|
184
|
+
element: /*#__PURE__*/_jsx(Navigate, {
|
|
185
|
+
to: "/",
|
|
186
|
+
replace: true
|
|
187
|
+
})
|
|
199
188
|
})]
|
|
200
189
|
})]
|
|
201
190
|
});
|
|
@@ -20,12 +20,12 @@ const SideNavWrapper = styled("div").withConfig({
|
|
|
20
20
|
maxWidth: "max-content",
|
|
21
21
|
fontFamily: themeGet("fonts.main")(props),
|
|
22
22
|
borderRadius: themeGet("radii.2")(props),
|
|
23
|
-
border:
|
|
23
|
+
border: `solid 1px ${themeGet("colors.greyLighter")(props)}`,
|
|
24
24
|
boxShadow: themeGet("shadows.boxDefault")(props),
|
|
25
25
|
display: "flex",
|
|
26
26
|
alignItems: "stretch",
|
|
27
27
|
alignContent: "stretch",
|
|
28
|
-
[
|
|
28
|
+
[`@media screen and (max-width: ${SMALL_SCREEN_BREAKPOINT}px)`]: {
|
|
29
29
|
borderRadius: "0",
|
|
30
30
|
width: "100%",
|
|
31
31
|
height: "auto",
|
|
@@ -54,8 +54,8 @@ const SideNavItems = styled("div").withConfig({
|
|
|
54
54
|
justifyContent: "flex-start",
|
|
55
55
|
textAlign: "center",
|
|
56
56
|
position: "relative",
|
|
57
|
-
[
|
|
58
|
-
height:
|
|
57
|
+
[`@media screen and (max-width: ${SMALL_SCREEN_BREAKPOINT}px)`]: {
|
|
58
|
+
height: `calc(${themeGet("space.r")(props)} * 2 + 30px)`,
|
|
59
59
|
flexDirection: "row",
|
|
60
60
|
justifyContent: "space-around",
|
|
61
61
|
alignItems: "center"
|
|
@@ -64,27 +64,7 @@ const SideNavItems = styled("div").withConfig({
|
|
|
64
64
|
const PanelControlTooltip = styled(Popover).withConfig({
|
|
65
65
|
displayName: "SideNav__PanelControlTooltip",
|
|
66
66
|
componentId: "sc-1heo0i9-2"
|
|
67
|
-
})(
|
|
68
|
-
alignSelf: "center",
|
|
69
|
-
position: props.hideExpandedControl ? "absolute" : "relative",
|
|
70
|
-
right: props.hideExpandedControl ? "r" : "initial",
|
|
71
|
-
top: "r",
|
|
72
|
-
display: props.hideExpandedControl ? "block" : "none !important",
|
|
73
|
-
borderTop: props.hideExpandedControl ? "none" : "solid 1px",
|
|
74
|
-
borderTopColor: themeGet("colors.greyLighter")(props),
|
|
75
|
-
paddingTop: props.hideExpandedControl ? "0" : "r",
|
|
76
|
-
width: props.hideExpandedControl ? "auto" : "100%",
|
|
77
|
-
justifyContent: "center",
|
|
78
|
-
"&:focus": {
|
|
79
|
-
outline: "0"
|
|
80
|
-
},
|
|
81
|
-
["@media screen and (max-width: ".concat(SMALL_SCREEN_BREAKPOINT, "px)")]: {
|
|
82
|
-
border: "none"
|
|
83
|
-
},
|
|
84
|
-
"& .popoverText": {
|
|
85
|
-
marginTop: props.hideExpandedControl ? "0" : "s"
|
|
86
|
-
}
|
|
87
|
-
}));
|
|
67
|
+
})(["position:absolute;right:", ";top:", ";"], themeGet("space.r"), themeGet("space.r"));
|
|
88
68
|
const PanelControl = styled("button").withConfig({
|
|
89
69
|
displayName: "SideNav__PanelControl",
|
|
90
70
|
componentId: "sc-1heo0i9-3"
|
|
@@ -112,16 +92,16 @@ const SideNavExpanded = styled("div").withConfig({
|
|
|
112
92
|
height: "inherit",
|
|
113
93
|
overflowY: "auto",
|
|
114
94
|
padding: "r",
|
|
115
|
-
borderLeft:
|
|
95
|
+
borderLeft: `solid 1px ${themeGet("colors.greyLighter")(props)}`,
|
|
116
96
|
"&:focus": {
|
|
117
97
|
outline: "0"
|
|
118
98
|
},
|
|
119
|
-
[
|
|
99
|
+
[`@media screen and (max-width: ${SMALL_SCREEN_BREAKPOINT}px)`]: {
|
|
120
100
|
width: "100%",
|
|
121
101
|
minWidth: "initial",
|
|
122
102
|
maxWidth: "initial",
|
|
123
103
|
borderLeft: "none",
|
|
124
|
-
borderBottom:
|
|
104
|
+
borderBottom: `solid 1px ${themeGet("colors.greyLighter")(props)}`,
|
|
125
105
|
height: "calc(" + themeGet("appScale.sidebarMobileHeight")(props) + " - " + themeGet("appScale.navBarSize")(props) + ")"
|
|
126
106
|
}
|
|
127
107
|
}));
|
|
@@ -202,7 +182,7 @@ const SideNav = _ref => {
|
|
|
202
182
|
handleItemClick: handleItemClick,
|
|
203
183
|
navItemRefs: navItemRefs
|
|
204
184
|
}, item.index);
|
|
205
|
-
if (item.pageSpecific && !orderedItems[index - 1].pageSpecific) {
|
|
185
|
+
if (item.pageSpecific && !orderedItems[index - 1].pageSpecific && !isSmallScreen) {
|
|
206
186
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
207
187
|
children: [/*#__PURE__*/_jsx(Divider, {
|
|
208
188
|
light: true,
|
|
@@ -230,7 +210,6 @@ const SideNav = _ref => {
|
|
|
230
210
|
children: [item.component(), /*#__PURE__*/_jsx(PanelControlTooltip, {
|
|
231
211
|
width: "80px",
|
|
232
212
|
textAlign: "center",
|
|
233
|
-
hideExpandedControl: true,
|
|
234
213
|
direction: "left",
|
|
235
214
|
text: "Hide panel",
|
|
236
215
|
children: /*#__PURE__*/_jsx(PanelControl, {
|
|
@@ -3,7 +3,7 @@ import StyledLink from ".";
|
|
|
3
3
|
import Box from "../Box";
|
|
4
4
|
import Flex from "../Flex";
|
|
5
5
|
import Spacer from "../Spacer";
|
|
6
|
-
import { BrowserRouter, Route,
|
|
6
|
+
import { BrowserRouter, Route, Routes } from "react-router-dom";
|
|
7
7
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
8
|
export default {
|
|
9
9
|
title: "Components/StyledLink",
|
|
@@ -72,11 +72,10 @@ export const reactLink = () => /*#__PURE__*/_jsxs(BrowserRouter, {
|
|
|
72
72
|
children: [routes.map(route => /*#__PURE__*/_jsx(StyledLink, {
|
|
73
73
|
to: route.path,
|
|
74
74
|
children: route.label
|
|
75
|
-
}, route.path)), /*#__PURE__*/_jsx(
|
|
75
|
+
}, route.path)), /*#__PURE__*/_jsx(Routes, {
|
|
76
76
|
children: routes.map(route => /*#__PURE__*/_jsx(Route, {
|
|
77
77
|
path: route.path,
|
|
78
|
-
|
|
79
|
-
children: /*#__PURE__*/_jsxs("div", {
|
|
78
|
+
element: /*#__PURE__*/_jsxs("div", {
|
|
80
79
|
style: {
|
|
81
80
|
padding: "100px"
|
|
82
81
|
},
|
|
@@ -81,8 +81,8 @@ export const NestedTreeStructure = () => {
|
|
|
81
81
|
const type = types[cell.getValue()];
|
|
82
82
|
return /*#__PURE__*/_jsx(Box, {
|
|
83
83
|
children: /*#__PURE__*/_jsx(Badge, {
|
|
84
|
-
variant: type
|
|
85
|
-
children: type
|
|
84
|
+
variant: type?.variant,
|
|
85
|
+
children: type?.label
|
|
86
86
|
})
|
|
87
87
|
});
|
|
88
88
|
}
|
|
@@ -18,7 +18,7 @@ const getHiglightedSearchTerm = _ref => {
|
|
|
18
18
|
searchTerm,
|
|
19
19
|
matchHighlightColor
|
|
20
20
|
} = _ref;
|
|
21
|
-
const regex = new RegExp(
|
|
21
|
+
const regex = new RegExp(`(${searchTerm})`, "i");
|
|
22
22
|
return value.split(regex).map((part, i) => part.match(regex) ? /*#__PURE__*/_jsx(StyledHighlight, {
|
|
23
23
|
matchHighlightColor: matchHighlightColor,
|
|
24
24
|
children: part
|
|
@@ -35,7 +35,7 @@ const GroupedCell = props => {
|
|
|
35
35
|
matchHighlightColor
|
|
36
36
|
},
|
|
37
37
|
enableFilterMatchHighlighting
|
|
38
|
-
} =
|
|
38
|
+
} = table?.options || {};
|
|
39
39
|
const searchTerm = table.getState().globalFilter;
|
|
40
40
|
const value = get(row.original, firstCol.accessorKey);
|
|
41
41
|
let renderedCellValue = value;
|
|
@@ -68,7 +68,7 @@ const HeaderCell = props => {
|
|
|
68
68
|
tableConfig
|
|
69
69
|
} = props;
|
|
70
70
|
let headerMarkup = firstCol.header;
|
|
71
|
-
if (
|
|
71
|
+
if (/*#__PURE__*/React.isValidElement(firstCol.Header)) {
|
|
72
72
|
headerMarkup = firstCol.Header;
|
|
73
73
|
}
|
|
74
74
|
if (typeof firstCol.Header === "function") {
|
|
@@ -85,7 +85,7 @@ const HeaderCell = props => {
|
|
|
85
85
|
});
|
|
86
86
|
};
|
|
87
87
|
HeaderCell.propTypes = PropTypes.Obj;
|
|
88
|
-
export default (
|
|
88
|
+
export default (firstCol, tableConfig) => ({
|
|
89
89
|
"mrt-row-expand": {
|
|
90
90
|
Header: props => /*#__PURE__*/_jsx(HeaderCell, {
|
|
91
91
|
...props,
|
|
@@ -107,4 +107,4 @@ export default ((firstCol, tableConfig) => ({
|
|
|
107
107
|
grow: firstCol.grow
|
|
108
108
|
} : {})
|
|
109
109
|
}
|
|
110
|
-
})
|
|
110
|
+
});
|
|
@@ -37,8 +37,7 @@ const muiStyleOverrides = {
|
|
|
37
37
|
borderBottomStyle = "dashed";
|
|
38
38
|
}
|
|
39
39
|
if (!row.originalSubRows && table.options.enableExpanding) {
|
|
40
|
-
|
|
41
|
-
const subRows = (_row$getParentRow = row.getParentRow()) === null || _row$getParentRow === void 0 ? void 0 : _row$getParentRow.subRows;
|
|
40
|
+
const subRows = row.getParentRow()?.subRows;
|
|
42
41
|
if (!subRows) {
|
|
43
42
|
borderBottomStyle = "none";
|
|
44
43
|
} else {
|
|
@@ -74,7 +74,7 @@ export const TabItem = styled("div").withConfig({
|
|
|
74
74
|
borderRadius: "50%",
|
|
75
75
|
fontSize: themeGet("fontSizes.0")(props),
|
|
76
76
|
fontWeight: themeGet("fontWeights.2")(props),
|
|
77
|
-
content: "
|
|
77
|
+
content: `"${props.notification}"`,
|
|
78
78
|
bg: themeGet("colors.danger")(props),
|
|
79
79
|
color: themeGet("colors.white")(props),
|
|
80
80
|
zIndex: 4
|
|
@@ -94,11 +94,11 @@ export const Tab = _ref => {
|
|
|
94
94
|
active: active,
|
|
95
95
|
notification: notification,
|
|
96
96
|
role: "presentation",
|
|
97
|
-
className:
|
|
97
|
+
className: `${active ? "active" : ""} ${notification ? "notification notification-" + notification : ""}`,
|
|
98
98
|
...props,
|
|
99
99
|
children: React.Children.map(children, child => /*#__PURE__*/React.cloneElement(child, {
|
|
100
100
|
role: "tab",
|
|
101
|
-
"aria-selected":
|
|
101
|
+
"aria-selected": `${active}`
|
|
102
102
|
}))
|
|
103
103
|
});
|
|
104
104
|
return theme ? /*#__PURE__*/_jsx(ThemeProvider, {
|
|
@@ -16,7 +16,7 @@ const TagValue = styled.button.attrs(props => ({
|
|
|
16
16
|
})).withConfig({
|
|
17
17
|
displayName: "Tag__TagValue",
|
|
18
18
|
componentId: "sc-1dh2aa8-1"
|
|
19
|
-
})(["-moz-appearance:none;-webkit-appearance:none;appearance:none;box-shadow:none;font-family:\"Open Sans\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;line-height:", ";display:flex;align-items:center;flex-wrap:nowrap;font-size:", ";font-weight:", ";white-space:nowrap;position:relative;z-index:1;transition:", ";cursor:", ";border-radius:", ";border:solid 1px ", ";padding:", ";background-color:", ";color:", ";", ""], props => themeGet("fontSizes.1")(props), props => props.small ? themeGet("fontSizes.0")(props) : themeGet("fontSizes.1")(props), props => themeGet("fontWeights.2")(props), props => themeGet("transition.transitionDefault")(props), props => props.disabled ? "default" : "pointer", props => props.showEdit || props.showInfo || props.showRemove ? "15px 0 0 15px" : "15px", props => props.disabled ? themeGet("colors.greyLight")(props) : props.selected && props.highlighted ? themeGet("colors.warningLight")(props) : themeGet("colors.primary")(props), props => props.small ? themeGet("tagScale.tagPaddingSmall") : themeGet("tagScale.tagPaddingDefault"), props => props.disabled ? themeGet("colors.greyLighter")(props) : props.selected && props.highlighted ? themeGet("colors.warningLight")(props) : props.selected ? themeGet("colors.primary")(props) : themeGet("colors.white")(props), props => props.disabled ? themeGet("colors.greyDarker")(props) : props.selected && props.highlighted ? themeGet("colors.black80")(props) : props.selected ? themeGet("colors.white")(props) : themeGet("colors.primary")(props), props => props.disabled ? css([""]) : css(["&:hover,&:focus{outline:0;border:", ";color:", ";background-color:", ";div{color:", ";}div[class*=\"TagType\"]{background-color:", ";}}"], props => props.selected && props.highlighted ?
|
|
19
|
+
})(["-moz-appearance:none;-webkit-appearance:none;appearance:none;box-shadow:none;font-family:\"Open Sans\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;line-height:", ";display:flex;align-items:center;flex-wrap:nowrap;font-size:", ";font-weight:", ";white-space:nowrap;position:relative;z-index:1;transition:", ";cursor:", ";border-radius:", ";border:solid 1px ", ";padding:", ";background-color:", ";color:", ";", ""], props => themeGet("fontSizes.1")(props), props => props.small ? themeGet("fontSizes.0")(props) : themeGet("fontSizes.1")(props), props => themeGet("fontWeights.2")(props), props => themeGet("transition.transitionDefault")(props), props => props.disabled ? "default" : "pointer", props => props.showEdit || props.showInfo || props.showRemove ? "15px 0 0 15px" : "15px", props => props.disabled ? themeGet("colors.greyLight")(props) : props.selected && props.highlighted ? themeGet("colors.warningLight")(props) : themeGet("colors.primary")(props), props => props.small ? themeGet("tagScale.tagPaddingSmall") : themeGet("tagScale.tagPaddingDefault"), props => props.disabled ? themeGet("colors.greyLighter")(props) : props.selected && props.highlighted ? themeGet("colors.warningLight")(props) : props.selected ? themeGet("colors.primary")(props) : themeGet("colors.white")(props), props => props.disabled ? themeGet("colors.greyDarker")(props) : props.selected && props.highlighted ? themeGet("colors.black80")(props) : props.selected ? themeGet("colors.white")(props) : themeGet("colors.primary")(props), props => props.disabled ? css([""]) : css(["&:hover,&:focus{outline:0;border:", ";color:", ";background-color:", ";div{color:", ";}div[class*=\"TagType\"]{background-color:", ";}}"], props => props.selected && props.highlighted ? `solid 1px ${themeGet("colors.warningLighter")(props)}` : `solid 1px ${themeGet("colors.primaryDark")(props)}`, props => props.selected && props.highlighted ? themeGet("colors.black70")(props) : props.selected ? themeGet("colors.white")(props) : themeGet("colors.primaryDark")(props), props => props.selected && props.highlighted ? themeGet("colors.warningLighter")(props) : props.selected ? themeGet("colors.primaryDark")(props) : themeGet("colors.primaryLightest")(props), props => props.selected && props.highlighted ? themeGet("colors.black70")(props) : props.selected ? themeGet("colors.white")(props) : themeGet("colors.primaryDark")(props), props => props.selected && props.highlighted ? "rgba(255,255,255,0.3)" : props.selected ? "rgba(0,0,0,0.3)" : themeGet("colors.primary20")(props)));
|
|
20
20
|
const TagValueText = styled.div.withConfig({
|
|
21
21
|
displayName: "Tag__TagValueText",
|
|
22
22
|
componentId: "sc-1dh2aa8-2"
|
|
@@ -24,11 +24,11 @@ const TagValueText = styled.div.withConfig({
|
|
|
24
24
|
const TagActionIconWrapper = styled(TagValue).withConfig({
|
|
25
25
|
displayName: "Tag__TagActionIconWrapper",
|
|
26
26
|
componentId: "sc-1dh2aa8-3"
|
|
27
|
-
})(["border-radius:", ";padding:", ";&:focus{z-index:2;}> span{line-height:0;}", ""], props => props.showRemove ? "0" : "0 15px 15px 0", props => props.showRemove && props.small ? "0 5px 0 6px" : props.showRemove ? "0 7px 0 7px" : props.showInfo && props.small ? "0 10px 0 9px" : props.showInfo ? "0 12px 0 11px" : props.small ? "0 6px 0 6px" : "0 8px 0 8px", props => props.selected ? css(["border-left:", ";&:hover{border-left:", ";}"], props => props.selected && props.highlighted ?
|
|
27
|
+
})(["border-radius:", ";padding:", ";&:focus{z-index:2;}> span{line-height:0;}", ""], props => props.showRemove ? "0" : "0 15px 15px 0", props => props.showRemove && props.small ? "0 5px 0 6px" : props.showRemove ? "0 7px 0 7px" : props.showInfo && props.small ? "0 10px 0 9px" : props.showInfo ? "0 12px 0 11px" : props.small ? "0 6px 0 6px" : "0 8px 0 8px", props => props.selected ? css(["border-left:", ";&:hover{border-left:", ";}"], props => props.selected && props.highlighted ? `solid 1px ${themeGet("colors.warningDarker")(props)}` : `solid 1px ${themeGet("colors.primaryDark")(props)}`, props => props.selected && props.highlighted ? `solid 1px ${themeGet("colors.warningDarker")(props)}` : `solid 1px ${themeGet("colors.primaryDark")(props)}`) : css(["border-left:0;&:hover,&:focus{background-color:", ";border-left:0;}"], themeGet("colors.primaryLightest")(props)));
|
|
28
28
|
const TagRemoveIconWrapper = styled(TagValue).withConfig({
|
|
29
29
|
displayName: "Tag__TagRemoveIconWrapper",
|
|
30
30
|
componentId: "sc-1dh2aa8-4"
|
|
31
|
-
})(["border-radius:0 15px 15px 0;padding:", ";&:focus{z-index:2;}", ""], props => props.small ? "0 8px 3px 7px" : "0 10px 3px 9px", props => props.selected ? css(["border-left:", ";&:hover{border-left:", ";}"], props => props.selected && props.highlighted ?
|
|
31
|
+
})(["border-radius:0 15px 15px 0;padding:", ";&:focus{z-index:2;}", ""], props => props.small ? "0 8px 3px 7px" : "0 10px 3px 9px", props => props.selected ? css(["border-left:", ";&:hover{border-left:", ";}"], props => props.selected && props.highlighted ? `solid 1px ${themeGet("colors.warningDarker")(props)}` : `solid 1px ${themeGet("colors.primaryDark")(props)}`, props => props.selected && props.highlighted ? `solid 1px ${themeGet("colors.warningDarker")(props)}` : `solid 1px ${themeGet("colors.primaryDark")(props)}`) : css(["border-left:0;&:hover,&:focus{background-color:", ";border-left:0;}"], themeGet("colors.primaryLightest")(props)));
|
|
32
32
|
const TagType = styled.div.withConfig({
|
|
33
33
|
displayName: "Tag__TagType",
|
|
34
34
|
componentId: "sc-1dh2aa8-5"
|
|
@@ -84,7 +84,7 @@ export default function Tag(_ref) {
|
|
|
84
84
|
highlighted: highlighted,
|
|
85
85
|
disabled: disabled,
|
|
86
86
|
small: small,
|
|
87
|
-
imageAlt:
|
|
87
|
+
imageAlt: `Avatar for ${children}`,
|
|
88
88
|
image: personEntity.avatarSrc,
|
|
89
89
|
initials: personEntity.initials
|
|
90
90
|
}), /*#__PURE__*/_jsxs(TagValueText, {
|
|
@@ -140,10 +140,10 @@ TextArea.propTypes = {
|
|
|
140
140
|
/** Specifies aria-label for TextArea. This is only required if not using the label prop.*/
|
|
141
141
|
ariaLabel: (props, propName) => {
|
|
142
142
|
if (!props.label && (props[propName] == null || props[propName] === "")) {
|
|
143
|
-
return new Error(
|
|
143
|
+
return new Error(`Missing prop \`${propName}\` not specified for TextArea component. When \`label\` is not provided, \`${propName}\` is required.`);
|
|
144
144
|
}
|
|
145
145
|
if (props[propName] && typeof props[propName] !== "string") {
|
|
146
|
-
return new Error(
|
|
146
|
+
return new Error(`Invalid propType \`${propName}\` supplied to TextArea component. Expected \`string\`, received \`${typeof props[propName]}\`.`);
|
|
147
147
|
}
|
|
148
148
|
return null;
|
|
149
149
|
},
|