orcs-design-system 3.2.22 → 3.2.23

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": {
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.23",
4
4
  "engines": {
5
5
  "node": "20.12.2"
6
6
  },