orcs-design-system 3.2.36 → 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.
Files changed (37) hide show
  1. package/es/assets/Colour/index.js +1 -1
  2. package/es/components/ActionsMenu/index.js +48 -39
  3. package/es/components/ActionsMenu/useActionMenu.js +2 -2
  4. package/es/components/Avatar/index.js +5 -5
  5. package/es/components/Badge/index.js +1 -1
  6. package/es/components/Button/index.js +5 -5
  7. package/es/components/ButtonGroup/index.js +1 -1
  8. package/es/components/Checkbox/index.js +3 -3
  9. package/es/components/DatePicker/index.js +2 -2
  10. package/es/components/Divider/index.js +1 -1
  11. package/es/components/Header/Header.stories.js +6 -6
  12. package/es/components/Header/index.js +2 -2
  13. package/es/components/HeaderSimple/HeaderSimple.stories.js +2 -2
  14. package/es/components/Icon/index.js +1 -1
  15. package/es/components/Modal/Modal.stories.js +226 -4
  16. package/es/components/Modal/index.js +1 -1
  17. package/es/components/Popover/index.js +45 -25
  18. package/es/components/ProgressBar/index.js +2 -2
  19. package/es/components/RadioButton/index.js +2 -2
  20. package/es/components/Range/index.js +17 -2
  21. package/es/components/Select/index.js +11 -12
  22. package/es/components/SideNav/SideNav.stories.js +22 -33
  23. package/es/components/SideNav/index.js +9 -30
  24. package/es/components/Sidebar/index.js +1 -1
  25. package/es/components/StyledLink/StyledLink.stories.js +3 -4
  26. package/es/components/Table/Table.stories.js +2 -2
  27. package/es/components/Table/getExpandColumnConfig.js +5 -5
  28. package/es/components/Table/muiStyleOverrides.js +1 -2
  29. package/es/components/Tabs/index.js +3 -3
  30. package/es/components/Tag/index.js +4 -4
  31. package/es/components/TextArea/index.js +2 -2
  32. package/es/components/TextInput/index.js +11 -11
  33. package/es/components.test.js +72 -1
  34. package/es/systemThemeCollapsed.js +9 -9
  35. package/es/systemtheme.js +9 -9
  36. package/es/utils/floatingUiHelpers.js +3 -8
  37. package/package.json +18 -13
@@ -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: "solid 1px ".concat(themeGet("colors.greyLighter")(props)),
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
- ["@media screen and (max-width: ".concat(SMALL_SCREEN_BREAKPOINT, "px)")]: {
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
- ["@media screen and (max-width: ".concat(SMALL_SCREEN_BREAKPOINT, "px)")]: {
58
- height: "calc(".concat(themeGet("space.r")(props), " * 2 + 30px)"),
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
- })(props => css({
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: "solid 1px ".concat(themeGet("colors.greyLighter")(props)),
95
+ borderLeft: `solid 1px ${themeGet("colors.greyLighter")(props)}`,
116
96
  "&:focus": {
117
97
  outline: "0"
118
98
  },
119
- ["@media screen and (max-width: ".concat(SMALL_SCREEN_BREAKPOINT, "px)")]: {
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: "solid 1px ".concat(themeGet("colors.greyLighter")(props)),
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, {
@@ -93,7 +93,7 @@ export const SidebarTab = styled("button").attrs(props => ({
93
93
  },
94
94
  "&.Sidebar__Badge": {
95
95
  "&::before": {
96
- content: "\"".concat(props.badge, "\""),
96
+ content: `"${props.badge}"`,
97
97
  position: "absolute",
98
98
  top: "8px",
99
99
  right: "calc(50% - 19px)",
@@ -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, Switch } from "react-router-dom";
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(Switch, {
75
+ }, route.path)), /*#__PURE__*/_jsx(Routes, {
76
76
  children: routes.map(route => /*#__PURE__*/_jsx(Route, {
77
77
  path: route.path,
78
- exact: route.exact,
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 === null || type === void 0 ? void 0 : type.variant,
85
- children: type === null || type === void 0 ? void 0 : type.label
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("(".concat(searchTerm, ")"), "i");
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
- } = (table === null || table === void 0 ? void 0 : table.options) || {};
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 ( /*#__PURE__*/React.isValidElement(firstCol.Header)) {
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 ((firstCol, tableConfig) => ({
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
- var _row$getParentRow;
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: "\"".concat(props.notification, "\""),
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: "".concat(active ? "active" : "", " ").concat(notification ? "notification notification-" + notification : ""),
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": "".concat(active)
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 ? "solid 1px ".concat(themeGet("colors.warningLighter")(props)) : "solid 1px ".concat(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)));
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 ? "solid 1px ".concat(themeGet("colors.warningDarker")(props)) : "solid 1px ".concat(themeGet("colors.primaryDark")(props)), props => props.selected && props.highlighted ? "solid 1px ".concat(themeGet("colors.warningDarker")(props)) : "solid 1px ".concat(themeGet("colors.primaryDark")(props))) : css(["border-left:0;&:hover,&:focus{background-color:", ";border-left:0;}"], themeGet("colors.primaryLightest")(props)));
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 ? "solid 1px ".concat(themeGet("colors.warningDarker")(props)) : "solid 1px ".concat(themeGet("colors.primaryDark")(props)), props => props.selected && props.highlighted ? "solid 1px ".concat(themeGet("colors.warningDarker")(props)) : "solid 1px ".concat(themeGet("colors.primaryDark")(props))) : css(["border-left:0;&:hover,&:focus{background-color:", ";border-left:0;}"], themeGet("colors.primaryLightest")(props)));
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: "Avatar for ".concat(children),
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("Missing prop `".concat(propName, "` not specified for TextArea component. When `label` is not provided, `").concat(propName, "` is required."));
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("Invalid propType `".concat(propName, "` supplied to TextArea component. Expected `string`, received `").concat(typeof props[propName], "`."));
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
  },
@@ -24,23 +24,23 @@ const IconWrapper = styled.label.withConfig({
24
24
  componentId: "sc-shde0o-1"
25
25
  })(["display:flex;align-items:center;position:relative;svg{opacity:0.4;position:absolute;}", ";"], props => props.iconLeft && !props.floating ? css(["svg{bottom:", ";left:12px;}"], props => {
26
26
  let inputHeight = themeGet("appScale.inputHeightDefault")(props);
27
- return "calc(".concat(inputHeight, " / 3 - 1px)");
27
+ return `calc(${inputHeight} / 3 - 1px)`;
28
28
  }) : props.iconLeft && props.floating ? css(["svg{bottom:", ";left:12px;}"], props => {
29
29
  let inputHeight = themeGet("appScale.inputHeightDefault")(props);
30
- return "calc(".concat(inputHeight, " / 2 + 3px)");
30
+ return `calc(${inputHeight} / 2 + 3px)`;
31
31
  }) : props.iconRight && !props.floating ? css(["svg{bottom:", ";right:12px;}"], props => {
32
32
  let inputHeight = themeGet("appScale.inputHeightDefault")(props);
33
- return "calc(".concat(inputHeight, " / 3 - 1px)");
33
+ return `calc(${inputHeight} / 3 - 1px)`;
34
34
  }) : props.iconRight && props.floating ? css(["svg{bottom:", ";right:12px;}"], props => {
35
35
  let inputHeight = themeGet("appScale.inputHeightDefault")(props);
36
- return "calc(".concat(inputHeight, " / 2 + 3px)");
36
+ return `calc(${inputHeight} / 2 + 3px)`;
37
37
  }) : css([""]));
38
- 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 => {
38
+ 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
39
  let left = props.iconLeft ? 36 : 10;
40
40
  let right = props.iconRight ? 36 : 10;
41
41
  let top = props.floating ? 25 : 5;
42
42
  let bottom = 6;
43
- return "".concat(top, "px ").concat(right, "px ").concat(bottom, "px ").concat(left, "px");
43
+ return `${top}px ${right}px ${bottom}px ${left}px`;
44
44
  }, props => props.invalid ? themeGet("colors.danger")(props) : props.valid ? themeGet("colors.success")(props) : themeGet("colors.black30")(props), props => props.floating ? css(["&::placeholder{color:transparent;}&:not(:placeholder-shown){~ label{transform:translateY(-10px);font-size:", ";}}&:-ms-input-placeholder:not(:focus){~ label{transform:translateY(-10px);font-size:", ";}}&:not(:-ms-input-placeholder){~ label{transform:translateY(-10px);font-size:", ";}}"], themeGet("fontSizes.0")(props), themeGet("fontSizes.0")(props), themeGet("fontSizes.0")(props)) : css(["&::placeholder{color:", ";}"], themeGet("colors.grey")(props)), props => props.invalid ? themeGet("colors.dangerDark")(props) : props.valid ? themeGet("colors.successDark")(props) : themeGet("colors.primary")(props), props => props.invalid ? themeGet("shadows.thickOutline")(props) + " " + themeGet("colors.danger30")(props) : props.valid ? themeGet("shadows.thickOutline")(props) + " " + themeGet("colors.success30")(props) : themeGet("shadows.thickOutline")(props) + " " + themeGet("colors.primary30")(props), props => props.invalid ? themeGet("colors.dangerDark")(props) : props.valid ? themeGet("colors.successDark")(props) : themeGet("colors.primary")(props), props => props.floating ? css(["&::placeholder{color:", ";}~ label{transform:translateY(-10px);font-size:", ";color:", ";}"], themeGet("colors.greyLight")(props), themeGet("fontSizes.0")(props), props => props.invalid ? themeGet("colors.dangerDark")(props) : props.valid ? themeGet("colors.successDark")(props) : themeGet("colors.primary")(props)) : css([""]));
45
45
  const Input = styled("input").attrs(props => ({
46
46
  "data-testid": props["data-testid"] ? props["data-testid"] : null
@@ -57,9 +57,9 @@ const NumberInput = styled(NumericFormat).attrs(props => ({
57
57
  const Label = styled.label.withConfig({
58
58
  displayName: "TextInput__Label",
59
59
  componentId: "sc-shde0o-4"
60
- })(["display:block;z-index:2;text-align:left;font-size:", ";font-weight:", ";transition:", ";padding-right:", ";margin-bottom:", ";color:", ";", ";", ";"], props => themeGet("fontSizes.1")(props), props => props.bold ? themeGet("fontWeights.2")(props) : themeGet("fontWeights.1")(props), props => themeGet("transition.transitionDefault")(props), props => props.floating && props.iconRight ? "40px" : "12px", props => props.floating ? 0 : themeGet("space.xs")(props), props => props.inverted ? themeGet("colors.white")(props) : props.valid ? themeGet("colors.successDark")(props) : props.invalid ? themeGet("colors.dangerDark")(props) : themeGet("colors.greyDarkest")(props), props => props.floating ? css(["padding-left:", ";cursor:text;position:absolute;top:", ";color:", ";"], props => props.iconLeft ? "37px" : "11px", props => {
60
+ })(["display:block;z-index:2;text-align:left;font-size:", ";font-weight:", ";transition:", ";padding-right:", ";margin-bottom:", ";color:", ";", ";", ";"], props => themeGet("fontSizes.1")(props), props => props.bold ? themeGet("fontWeights.2")(props) : themeGet("fontWeights.1")(props), props => themeGet("transition.transitionDefault")(props), props => props.floating && props.iconRight ? `40px` : `12px`, props => props.floating ? 0 : themeGet("space.xs")(props), props => props.inverted ? themeGet("colors.white")(props) : props.valid ? themeGet("colors.successDark")(props) : props.invalid ? themeGet("colors.dangerDark")(props) : themeGet("colors.greyDarkest")(props), props => props.floating ? css(["padding-left:", ";cursor:text;position:absolute;top:", ";color:", ";"], props => props.iconLeft ? "37px" : "11px", props => {
61
61
  let inputHeight = themeGet("appScale.inputHeightLarge")(props);
62
- return "calc(".concat(inputHeight, " / 3)");
62
+ return `calc(${inputHeight} / 3)`;
63
63
  }, props => props.invalid ? themeGet("colors.dangerDark")(props) : props.valid ? themeGet("colors.successDark")(props) : themeGet("colors.greyDark")(props)) : css([""]), props => props.mandatory ? css(["&:after{content:\" *\";color:", ";}"], themeGet("colors.danger")(props)) : css([""]));
64
64
  const TextInput = /*#__PURE__*/React.forwardRef((props, ref) => {
65
65
  const {
@@ -91,7 +91,7 @@ const TextInput = /*#__PURE__*/React.forwardRef((props, ref) => {
91
91
  }
92
92
  const label = useMemo(() => {
93
93
  if (numberProps && numberProps.prefix) {
94
- return "".concat(props.label, " ").concat(numberProps.prefix);
94
+ return `${props.label} ${numberProps.prefix}`;
95
95
  }
96
96
  return props.label;
97
97
  }, [props.label, numberProps]);
@@ -166,10 +166,10 @@ TextInput.propTypes = {
166
166
  /** Specifies aria-label for TextArea. This is only required if not using the label prop.*/
167
167
  ariaLabel: (props, propName) => {
168
168
  if (!props.label && (props[propName] == null || props[propName] === "")) {
169
- return new Error("Missing prop `".concat(propName, "` not specified for TextInput component. When `label` is not provided, `").concat(propName, "` is required."));
169
+ return new Error(`Missing prop \`${propName}\` not specified for TextInput component. When \`label\` is not provided, \`${propName}\` is required.`);
170
170
  }
171
171
  if (props[propName] && typeof props[propName] !== "string") {
172
- return new Error("Invalid propType `".concat(propName, "` supplied to TextInput component. Expected `string`, received `").concat(typeof props[propName], "`."));
172
+ return new Error(`Invalid propType \`${propName}\` supplied to TextInput component. Expected \`string\`, received \`${typeof props[propName]}\`.`);
173
173
  }
174
174
  return null;
175
175
  },
@@ -1,4 +1,75 @@
1
1
  import * as components from ".";
2
2
  test("all components exported", () => {
3
- expect(Object.keys(components)).toMatchInlineSnapshot("\n Array [\n \"ActionsMenu\",\n \"ActionsMenuBody\",\n \"ActionsMenuHeading\",\n \"ActionsMenuItem\",\n \"Avatar\",\n \"Badge\",\n \"Box\",\n \"Button\",\n \"ButtonGroupContainer\",\n \"ButtonGroupItem\",\n \"ButtonLink\",\n \"Card\",\n \"Checkbox\",\n \"Code\",\n \"DatePicker\",\n \"Divider\",\n \"Expandable\",\n \"Flex\",\n \"FlexItem\",\n \"GlobalStyles\",\n \"Grid\",\n \"GridItem\",\n \"H1\",\n \"H2\",\n \"H3\",\n \"H4\",\n \"H5\",\n \"H6\",\n \"Header\",\n \"HeaderSimple\",\n \"Icon\",\n \"Loading\",\n \"Modal\",\n \"Notification\",\n \"P\",\n \"Popover\",\n \"ProgressBar\",\n \"Quote\",\n \"RadioButton\",\n \"Range\",\n \"Select\",\n \"SideNav\",\n \"Sidebar\",\n \"SidebarClose\",\n \"SidebarPanel\",\n \"SidebarPanels\",\n \"SidebarTab\",\n \"SidebarTabs\",\n \"Small\",\n \"Spacer\",\n \"StatusDot\",\n \"StyledLink\",\n \"SystemThemeProvider\",\n \"Tab\",\n \"Table\",\n \"TabsContainer\",\n \"Tag\",\n \"Text\",\n \"TextArea\",\n \"TextInput\",\n \"Toggle\",\n \"TreeNav\",\n \"Typography\",\n \"VARIANT_COLORS\",\n \"getOptionByValue\",\n \"styleLink\",\n \"systemThemeCollapsed\",\n \"systemtheme\",\n ]\n ");
3
+ expect(Object.keys(components)).toMatchInlineSnapshot(`
4
+ Array [
5
+ "ActionsMenu",
6
+ "ActionsMenuBody",
7
+ "ActionsMenuHeading",
8
+ "ActionsMenuItem",
9
+ "Avatar",
10
+ "Badge",
11
+ "Box",
12
+ "Button",
13
+ "ButtonGroupContainer",
14
+ "ButtonGroupItem",
15
+ "ButtonLink",
16
+ "Card",
17
+ "Checkbox",
18
+ "Code",
19
+ "DatePicker",
20
+ "Divider",
21
+ "Expandable",
22
+ "Flex",
23
+ "FlexItem",
24
+ "GlobalStyles",
25
+ "Grid",
26
+ "GridItem",
27
+ "H1",
28
+ "H2",
29
+ "H3",
30
+ "H4",
31
+ "H5",
32
+ "H6",
33
+ "Header",
34
+ "HeaderSimple",
35
+ "Icon",
36
+ "Loading",
37
+ "Modal",
38
+ "Notification",
39
+ "P",
40
+ "Popover",
41
+ "ProgressBar",
42
+ "Quote",
43
+ "RadioButton",
44
+ "Range",
45
+ "Select",
46
+ "SideNav",
47
+ "Sidebar",
48
+ "SidebarClose",
49
+ "SidebarPanel",
50
+ "SidebarPanels",
51
+ "SidebarTab",
52
+ "SidebarTabs",
53
+ "Small",
54
+ "Spacer",
55
+ "StatusDot",
56
+ "StyledLink",
57
+ "SystemThemeProvider",
58
+ "Tab",
59
+ "Table",
60
+ "TabsContainer",
61
+ "Tag",
62
+ "Text",
63
+ "TextArea",
64
+ "TextInput",
65
+ "Toggle",
66
+ "TreeNav",
67
+ "Typography",
68
+ "VARIANT_COLORS",
69
+ "getOptionByValue",
70
+ "styleLink",
71
+ "systemThemeCollapsed",
72
+ "systemtheme",
73
+ ]
74
+ `);
4
75
  });
@@ -190,9 +190,9 @@ export const borderWidths = [0, "1px", "2px", "3px"];
190
190
 
191
191
  // SHADOWS
192
192
  export const shadows = {
193
- boxDefault: "0 2px 5px 0 ".concat(colors.black10),
194
- thinOutline: "0 0 0 1px",
195
- thickOutline: "0 0 0 3px"
193
+ boxDefault: `0 2px 5px 0 ${colors.black10}`,
194
+ thinOutline: `0 0 0 1px`,
195
+ thickOutline: `0 0 0 3px`
196
196
  };
197
197
 
198
198
  // ANIMATION
@@ -203,12 +203,12 @@ export const transition = {
203
203
  // RESPONSIVE MEDIA BREAKPOINTS
204
204
  export const breakpoints = ["450px", "675px", "900px", "1100px", "1400px", "1900px"];
205
205
  export const mediaQueries = {
206
- screenXS: "@media screen and (min-width: ".concat(breakpoints[0], ")"),
207
- screenS: "@media screen and (min-width: ".concat(breakpoints[1], ")"),
208
- screenM: "@media screen and (min-width: ".concat(breakpoints[2], ")"),
209
- screenL: "@media screen and (min-width: ".concat(breakpoints[3], ")"),
210
- screenXL: "@media screen and (min-width: ".concat(breakpoints[4], ")"),
211
- screenXXL: "@media screen and (min-width: ".concat(breakpoints[5], ")")
206
+ screenXS: `@media screen and (min-width: ${breakpoints[0]})`,
207
+ screenS: `@media screen and (min-width: ${breakpoints[1]})`,
208
+ screenM: `@media screen and (min-width: ${breakpoints[2]})`,
209
+ screenL: `@media screen and (min-width: ${breakpoints[3]})`,
210
+ screenXL: `@media screen and (min-width: ${breakpoints[4]})`,
211
+ screenXXL: `@media screen and (min-width: ${breakpoints[5]})`
212
212
  };
213
213
 
214
214
  // APP-SPECIFIC DIMENSIONS
package/es/systemtheme.js CHANGED
@@ -189,9 +189,9 @@ export const borderWidths = [0, "1px", "2px", "3px"];
189
189
 
190
190
  // SHADOWS
191
191
  export const shadows = {
192
- boxDefault: "0 2px 5px 0 ".concat(colors.black10),
193
- thinOutline: "0 0 0 1px",
194
- thickOutline: "0 0 0 3px"
192
+ boxDefault: `0 2px 5px 0 ${colors.black10}`,
193
+ thinOutline: `0 0 0 1px`,
194
+ thickOutline: `0 0 0 3px`
195
195
  };
196
196
 
197
197
  // ANIMATION
@@ -202,12 +202,12 @@ export const transition = {
202
202
  // RESPONSIVE MEDIA BREAKPOINTS
203
203
  export const breakpoints = ["450px", "675px", "900px", "1100px", "1400px", "1900px"];
204
204
  export const mediaQueries = {
205
- screenXS: "@media screen and (min-width: ".concat(breakpoints[0], ")"),
206
- screenS: "@media screen and (min-width: ".concat(breakpoints[1], ")"),
207
- screenM: "@media screen and (min-width: ".concat(breakpoints[2], ")"),
208
- screenL: "@media screen and (min-width: ".concat(breakpoints[3], ")"),
209
- screenXL: "@media screen and (min-width: ".concat(breakpoints[4], ")"),
210
- screenXXL: "@media screen and (min-width: ".concat(breakpoints[5], ")")
205
+ screenXS: `@media screen and (min-width: ${breakpoints[0]})`,
206
+ screenS: `@media screen and (min-width: ${breakpoints[1]})`,
207
+ screenM: `@media screen and (min-width: ${breakpoints[2]})`,
208
+ screenL: `@media screen and (min-width: ${breakpoints[3]})`,
209
+ screenXL: `@media screen and (min-width: ${breakpoints[4]})`,
210
+ screenXXL: `@media screen and (min-width: ${breakpoints[5]})`
211
211
  };
212
212
 
213
213
  // APP-SPECIFIC DIMENSIONS
@@ -1,20 +1,15 @@
1
1
  const getFloatingUiZIndex = triggerRef => {
2
- var _activeModalRef$conta;
3
2
  const activeModalRef = document.getElementById("modal-overlay");
4
- if (activeModalRef && triggerRef.current && activeModalRef !== null && activeModalRef !== void 0 && (_activeModalRef$conta = activeModalRef.contains) !== null && _activeModalRef$conta !== void 0 && _activeModalRef$conta.call(activeModalRef, triggerRef.current)) {
3
+ if (activeModalRef && triggerRef.current && activeModalRef?.contains?.(triggerRef.current)) {
5
4
  return 1100;
6
5
  }
7
6
  return 900;
8
7
  };
9
8
  const REACT_SELECT_MENU = "react-select-menu";
10
- const isRenderedInReactSelectMenu = triggerRef => {
11
- var _document$getElementB, _document$getElementB2;
12
- return (_document$getElementB = document.getElementById(REACT_SELECT_MENU)) === null || _document$getElementB === void 0 || (_document$getElementB2 = _document$getElementB.contains) === null || _document$getElementB2 === void 0 ? void 0 : _document$getElementB2.call(_document$getElementB, triggerRef.current);
13
- };
9
+ const isRenderedInReactSelectMenu = triggerRef => document.getElementById(REACT_SELECT_MENU)?.contains?.(triggerRef.current);
14
10
  const getFloatingUiRootElement = triggerRef => {
15
- var _activeModalRef$conta2;
16
11
  const activeModalRef = document.getElementById("modal-overlay");
17
- const isRenderedInModal = activeModalRef === null || activeModalRef === void 0 || (_activeModalRef$conta2 = activeModalRef.contains) === null || _activeModalRef$conta2 === void 0 ? void 0 : _activeModalRef$conta2.call(activeModalRef, triggerRef.current);
12
+ const isRenderedInModal = activeModalRef?.contains?.(triggerRef.current);
18
13
  if (isRenderedInModal) {
19
14
  return document.getElementById("modal");
20
15
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orcs-design-system",
3
- "version": "3.2.36",
3
+ "version": "3.2.39",
4
4
  "engines": {
5
5
  "node": "20.12.2"
6
6
  },
@@ -47,9 +47,10 @@
47
47
  "@emotion/react": "^11.11.4",
48
48
  "@emotion/styled": "^11.11.5",
49
49
  "@floating-ui/react": "^0.26.19",
50
- "@mui/icons-material": "^5.15.18",
51
- "@mui/material": "^5.15.18",
52
- "@mui/x-date-pickers": "^7.5.0",
50
+ "@mui/icons-material": "^6.0.2",
51
+ "@mui/material": "^6.0.2",
52
+ "@mui/utils": "^6.0.2",
53
+ "@mui/x-date-pickers": "^7.16.0",
53
54
  "@styled-system/css": "^5.1.5",
54
55
  "@styled-system/prop-types": "^5.1.5",
55
56
  "@styled-system/should-forward-prop": "^5.1.5",
@@ -59,13 +60,13 @@
59
60
  "polished": "^3.7.1",
60
61
  "prop-types": "^15.6.2",
61
62
  "react-app-polyfill": "^2.0.0",
62
- "react-arborist": "^3.2.0",
63
+ "react-arborist": "^3.4.0",
63
64
  "react-cool-onclickoutside": "^1.5.9",
64
65
  "react-dates": "^21.8.0",
65
66
  "react-intersection-observer": "^9.4.3",
66
67
  "react-moment-proptypes": "^1.8.1",
67
68
  "react-number-format": "^5.3.0",
68
- "react-router-dom": "^5.2.0",
69
+ "react-router-dom": "^6.26.2",
69
70
  "react-select": "^5.7.4",
70
71
  "styled-system": "^5.1.5"
71
72
  },
@@ -78,10 +79,10 @@
78
79
  "@babel/preset-react": "^7.12.10",
79
80
  "@babel/runtime": "^7.12.5",
80
81
  "@chromatic-com/storybook": "^1.5.0",
81
- "@fortawesome/fontawesome-svg-core": "^1.2.32",
82
+ "@fortawesome/fontawesome-svg-core": "file:libs/fortawesome-fontawesome-svg-core-1.3.0.tgz",
82
83
  "@fortawesome/free-regular-svg-icons": "^5.15.1",
83
84
  "@fortawesome/free-solid-svg-icons": "^5.15.1",
84
- "@fortawesome/react-fontawesome": "^0.1.14",
85
+ "@fortawesome/react-fontawesome": "git://github.com/FortAwesome/react-fontawesome.git#0.1.13",
85
86
  "@mdx-js/loader": "^2.3.0",
86
87
  "@mdx-js/react": "^2.3.0",
87
88
  "@storybook/addon-a11y": "^8.1.7",
@@ -98,7 +99,7 @@
98
99
  "@storybook/mdx1-csf": "^1.0.0",
99
100
  "@storybook/preset-create-react-app": "^8.1.7",
100
101
  "@storybook/react": "^8.1.7",
101
- "@storybook/react-webpack5": "^8.1.7",
102
+ "@storybook/react-webpack5": "^8.2.9",
102
103
  "@storybook/storybook-deployer": "2.8.16",
103
104
  "@storybook/theming": "^8.1.7",
104
105
  "@testing-library/jest-dom": "^5.11.6",
@@ -143,7 +144,6 @@
143
144
  "webpack-cli": "^5.1.4"
144
145
  },
145
146
  "overrides": {
146
- "@mui/utils": "6.0.0-alpha.9",
147
147
  "braces": "3.0.3",
148
148
  "eslint-plugin-testing-library": "^5.11.1",
149
149
  "jest": "$jest",
@@ -152,11 +152,16 @@
152
152
  "postcss": "^8.4.31",
153
153
  "react-scripts": "5.0.1",
154
154
  "remark-parse": "10.0.2",
155
- "react": "$react",
156
- "react-dom": "$react-dom",
155
+ "react": "^18.3.1",
156
+ "react-dom": "^18.3.1",
157
157
  "typescript": "5.2.2",
158
158
  "webpack-dev-middleware": "6.1.2",
159
- "ws": "8.17.1"
159
+ "ws": "8.17.1",
160
+ "express": {
161
+ "path-to-regexp": "0.1.10"
162
+ },
163
+ "send": "0.19.0",
164
+ "redux": "4.2.1"
160
165
  },
161
166
  "browserslist": [
162
167
  ">0.2%",