orcs-design-system 3.2.22 → 3.2.24

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.
@@ -63,7 +63,7 @@ export const ActionsMenuHeading = styled(props => {
63
63
  componentId: "sc-yvbni2-5"
64
64
  })(["color:", ";padding:8px;width:100%;font-size:", ";font-weight:", ";border-bottom:solid 1px ", ";white-space:nowrap;cursor:", ";"], props => themeGet("colors.white")(props), props => themeGet("fontSizes.1")(props), props => themeGet("fontWeights.1")(props), props => themeGet("colors.greyDarkest")(props), props => props.canClick ? "pointer" : "default");
65
65
  export const ActionsMenuItem = styled(props => {
66
- var _actionMenu$context$o, _actionMenu$context, _actionMenu$getItemPr;
66
+ var _actionMenu$getItemPr, _actionMenu$context, _actionMenu$context2;
67
67
  const {
68
68
  id,
69
69
  onItemClick,
@@ -74,11 +74,10 @@ export const ActionsMenuItem = styled(props => {
74
74
  ...others
75
75
  } = props;
76
76
  const Component = as ? as : others.href ? "a" : "button";
77
- const disabled = (_actionMenu$context$o = !(actionMenu !== null && actionMenu !== void 0 && (_actionMenu$context = actionMenu.context) !== null && _actionMenu$context !== void 0 && _actionMenu$context.open)) !== null && _actionMenu$context$o !== void 0 ? _actionMenu$context$o : false;
77
+ const disabled = props.disabled;
78
78
  let newProps = {
79
79
  ...others,
80
- ...((actionMenu === null || actionMenu === void 0 || (_actionMenu$getItemPr = actionMenu.getItemProps) === null || _actionMenu$getItemPr === void 0 ? void 0 : _actionMenu$getItemPr.call(actionMenu)) || {}),
81
- disabled
80
+ ...((actionMenu === null || actionMenu === void 0 || (_actionMenu$getItemPr = actionMenu.getItemProps) === null || _actionMenu$getItemPr === void 0 ? void 0 : _actionMenu$getItemPr.call(actionMenu)) || {})
82
81
  };
83
82
  const {
84
83
  onClick: originalOnClick
@@ -91,13 +90,17 @@ export const ActionsMenuItem = styled(props => {
91
90
  newProps = {
92
91
  ...others,
93
92
  type: "button",
94
- ["data-action-menu-id"]: id,
95
- disabled
93
+ ["data-action-menu-id"]: id
96
94
  };
97
95
  }
98
96
  return /*#__PURE__*/_jsx(Component, {
99
97
  ...newProps,
100
- onClick: onClick
98
+ onClick: onClick,
99
+ disabled: disabled
100
+ // Hide from document when closed - related to HACK
101
+ ,
102
+ "aria-hidden": !(actionMenu !== null && actionMenu !== void 0 && (_actionMenu$context = actionMenu.context) !== null && _actionMenu$context !== void 0 && _actionMenu$context.open),
103
+ tabIndex: !(actionMenu !== null && actionMenu !== void 0 && (_actionMenu$context2 = actionMenu.context) !== null && _actionMenu$context2 !== void 0 && _actionMenu$context2.open) && "-1"
101
104
  });
102
105
  }).attrs({
103
106
  role: "menuitem"
@@ -119,7 +122,7 @@ export const ActionsMenuBody = _ref => {
119
122
  onTriggerFocus,
120
123
  closeMenu,
121
124
  closeOnClick = false,
122
- "data-testid": dataTestId,
125
+ "data-testid": dataTestId = "ActionsMenu",
123
126
  ...props
124
127
  } = _ref;
125
128
  const id = useId();
@@ -180,6 +183,7 @@ export const ActionsMenuBody = _ref => {
180
183
  ...actionMenu.getFloatingProps(props),
181
184
  className: "actionMenu-content ".concat(visible ? "visible" : ""),
182
185
  "aria-hidden": visible ? "false" : "true",
186
+ "data-testid": "".concat(dataTestId, "__menu"),
183
187
  children: /*#__PURE__*/_jsx(Menu, {
184
188
  menuWidth: menuWidth,
185
189
  isOpen: toggleState,
@@ -401,6 +405,13 @@ ActionsMenuBody.__docgenInfo = {
401
405
  },
402
406
  "required": false
403
407
  },
408
+ "data-testid": {
409
+ "defaultValue": {
410
+ "value": "\"ActionsMenu\"",
411
+ "computed": false
412
+ },
413
+ "required": false
414
+ },
404
415
  "onTriggerFocus": {
405
416
  "description": "",
406
417
  "type": {
@@ -1,7 +1,7 @@
1
1
  import React, { useRef } from "react";
2
2
  import PropTypes from "prop-types";
3
3
  import styled, { keyframes, ThemeProvider } from "styled-components";
4
- import { space, layout } from "styled-system";
4
+ import { space, layout, typography } from "styled-system";
5
5
  import { themeGet } from "@styled-system/theme-get";
6
6
 
7
7
  /* Animations */
@@ -35,7 +35,7 @@ const Check = styled.div.withConfig({
35
35
  const Text = styled.div.withConfig({
36
36
  displayName: "Checkbox__Text",
37
37
  componentId: "sc-p4d19b-5"
38
- })(["font-size:", ";padding-left:8px;"], props => themeGet("fontSizes.2")(props));
38
+ })(["font-size:", ";padding-left:8px;", ""], props => themeGet("fontSizes.2")(props), typography);
39
39
  /**
40
40
  * The default checkbox (or inverted if on dark background) should be used for the majority of the UI; however, the coloured ones can be used in situations where the colour corresponds with some indication of status, e.g. in a task list, green could denote task completed, red could denote task overdue.
41
41
  */
@@ -85,6 +85,7 @@ export default function Checkbox(_ref) {
85
85
  onClick: onClick,
86
86
  children: /*#__PURE__*/_jsx(Check, {})
87
87
  }), /*#__PURE__*/_jsx(Text, {
88
+ ...props,
88
89
  children: label
89
90
  })]
90
91
  })
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import PropTypes from "prop-types";
3
3
  import styled, { ThemeProvider } from "styled-components";
4
- import { space, layout, compose, variant } from "styled-system";
4
+ import { space, layout, compose, variant, typography } from "styled-system";
5
5
  import { css } from "@styled-system/css";
6
6
  import { themeGet } from "@styled-system/theme-get";
7
7
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -154,7 +154,7 @@ const RadioButtonText = styled("div").withConfig({
154
154
  paddingLeft: "s",
155
155
  fontSize: themeGet("fontSizes.2")(props),
156
156
  fontWeight: themeGet("fontWeights.1")(props)
157
- }));
157
+ }), typography);
158
158
  export default function RadioButton(_ref) {
159
159
  let {
160
160
  name,
@@ -187,6 +187,7 @@ export default function RadioButton(_ref) {
187
187
  variant: variant
188
188
  })
189
189
  }), /*#__PURE__*/_jsx(RadioButtonText, {
190
+ ...props,
190
191
  children: label
191
192
  })]
192
193
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orcs-design-system",
3
- "version": "3.2.22",
3
+ "version": "3.2.24",
4
4
  "engines": {
5
5
  "node": "20.12.2"
6
6
  },