orcs-design-system 3.5.11 → 3.5.13

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.
@@ -73,6 +73,7 @@ export const defaultHeader = () => /*#__PURE__*/_jsx(Header, {
73
73
  searchComponent: /*#__PURE__*/_jsx(TextInput, {
74
74
  fullWidth: true,
75
75
  id: "search",
76
+ ariaLabel: "Type to search",
76
77
  height: "100%",
77
78
  type: "text",
78
79
  placeholder: "Search for...",
@@ -93,6 +94,7 @@ export const headerWithExtras = () => /*#__PURE__*/_jsx(Header, {
93
94
  searchComponent: /*#__PURE__*/_jsx(TextInput, {
94
95
  fullWidth: true,
95
96
  id: "search",
97
+ ariaLabel: "Type to search",
96
98
  height: "100%",
97
99
  type: "text",
98
100
  placeholder: "Search for...",
@@ -123,12 +123,11 @@ export const IconContainer = /*#__PURE__*/styled(Flex).withConfig({
123
123
  background: themeGet("colors.greyDark")(props),
124
124
  transition: themeGet("transition.transitionDefault")(props)
125
125
  }));
126
- export const UserMenuContent = /*#__PURE__*/styled(Box).withConfig({
126
+ export const UserMenuContent = /*#__PURE__*/styled(Flex).withConfig({
127
127
  displayName: "UserMenuContent",
128
128
  componentId: "sc-xs8ba0-8"
129
129
  })(props => css({
130
130
  position: "absolute",
131
- gap: "s",
132
131
  top: "calc(100% + 8px)",
133
132
  right: "0",
134
133
  zIndex: themeGet("zIndices.2")(props),
@@ -1,3 +1,6 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
1
4
  import React, { useState, useRef, useEffect } from "react";
2
5
  import PropTypes from "prop-types";
3
6
  import Avatar from "../Avatar";
@@ -50,13 +53,14 @@ const UserMenu = _ref => {
50
53
  justifyContent: "center",
51
54
  borderRadius: "50%",
52
55
  p: "2px",
53
- children: /*#__PURE__*/_jsx(Icon, {
56
+ children: /*#__PURE__*/_jsx(Icon, _objectSpread({
54
57
  icon: ["fas", "chevron-down"],
55
- rotation: isOpen ? 180 : 0,
56
58
  color: "white",
57
59
  size: "xs",
58
60
  mt: isOpen ? "0" : "1px"
59
- })
61
+ }, isOpen && {
62
+ rotation: "180"
63
+ }))
60
64
  })]
61
65
  }), /*#__PURE__*/_jsxs(UserMenuContent, {
62
66
  p: "s",
@@ -67,7 +71,7 @@ const UserMenu = _ref => {
67
71
  maxHeight: "430px",
68
72
  border: "solid 1px",
69
73
  borderRadius: "2",
70
- display: "flex",
74
+ gap: "s",
71
75
  flexDirection: "column",
72
76
  alignItems: "flex-start",
73
77
  justifyContent: "flex-start",
@@ -5,7 +5,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
5
5
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
6
  /* eslint-disable */
7
7
  import React from "react";
8
- import styled from "styled-components";
8
+ import styled, { useTheme } from "styled-components";
9
9
  import { css } from "@styled-system/css";
10
10
  import PropTypes from "prop-types";
11
11
  import { themeGet } from "@styled-system/theme-get";
@@ -85,17 +85,26 @@ Node.propTypes = {
85
85
  isLeaf: PropTypes.bool,
86
86
  data: PropTypes.array
87
87
  };
88
+ const parsePx = v => {
89
+ if (v == null) return null;
90
+ const n = parseFloat(String(v));
91
+ return Number.isNaN(n) ? null : n;
92
+ };
88
93
  const TreeNav = _ref2 => {
94
+ var _theme$appScale, _theme$appScale2;
89
95
  let {
90
96
  data
91
97
  } = _ref2,
92
98
  props = _objectWithoutProperties(_ref2, _excluded);
99
+ const theme = /*#__PURE__*/useTheme();
100
+ const rowHeight = parsePx(theme === null || theme === void 0 || (_theme$appScale = theme.appScale) === null || _theme$appScale === void 0 ? void 0 : _theme$appScale.treeRowHeight);
101
+ const indent = parsePx(theme === null || theme === void 0 || (_theme$appScale2 = theme.appScale) === null || _theme$appScale2 === void 0 ? void 0 : _theme$appScale2.treeIndent);
93
102
  return /*#__PURE__*/_jsx(Tree, _objectSpread(_objectSpread({
94
103
  initialData: data
95
104
  }, props), {}, {
96
105
  overscanCount: 5,
97
- rowHeight: 32,
98
- indent: 14,
106
+ rowHeight: rowHeight,
107
+ indent: indent,
99
108
  children: Node
100
109
  }));
101
110
  };
@@ -224,7 +224,9 @@ export const appScale = {
224
224
  mobileNavMenuWidth: "250px",
225
225
  inputHeightDefault: "32px",
226
226
  inputHeightLarge: "52px",
227
- tabsHeight: "32px"
227
+ tabsHeight: "32px",
228
+ treeRowHeight: "32px",
229
+ treeIndent: "14px"
228
230
  };
229
231
  export const avatarScale = {
230
232
  avatarSmall: "34px",
package/es/systemtheme.js CHANGED
@@ -226,7 +226,9 @@ export const appScale = {
226
226
  mobileNavMenuWidth: "250px",
227
227
  inputHeightDefault: "32px",
228
228
  inputHeightLarge: "52px",
229
- tabsHeight: "32px"
229
+ tabsHeight: "32px",
230
+ treeRowHeight: "32px",
231
+ treeIndent: "14px"
230
232
  };
231
233
  export const avatarScale = {
232
234
  avatarSmall: "34px",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orcs-design-system",
3
- "version": "3.5.11",
3
+ "version": "3.5.13",
4
4
  "engines": {
5
5
  "node": ">=20.0.0"
6
6
  },