orcs-design-system 3.1.22 → 3.1.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.
@@ -3,8 +3,8 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
5
5
  var _excluded = ["as"],
6
- _excluded2 = ["theme", "onToggle", "toggleState", "direction", "menuTopPosition", "menuLeftPosition", "menuRightPosition", "menuWidth", "customTriggerComponent", "children", "ariaLabel"],
7
- _excluded3 = ["children", "customTriggerComponent", "direction", "isOpen", "theme", "closeOnClick", "ariaLabel"];
6
+ _excluded2 = ["theme", "onToggle", "toggleState", "direction", "menuTopPosition", "menuLeftPosition", "menuRightPosition", "menuWidth", "customTriggerComponent", "children", "triggerRef", "ariaLabel"],
7
+ _excluded3 = ["children", "customTriggerComponent", "direction", "isOpen", "theme", "closeOnClick", "ariaLabel", "triggerRef"];
8
8
  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; }
9
9
  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; }
10
10
  import React, { useState, useEffect, useImperativeHandle, useCallback } from "react";
@@ -135,6 +135,7 @@ export var ActionsMenuBody = function ActionsMenuBody(_ref) {
135
135
  menuWidth = _ref.menuWidth,
136
136
  customTriggerComponent = _ref.customTriggerComponent,
137
137
  children = _ref.children,
138
+ triggerRef = _ref.triggerRef,
138
139
  _ref$ariaLabel = _ref.ariaLabel,
139
140
  ariaLabel = _ref$ariaLabel === void 0 ? "Options Menu" : _ref$ariaLabel,
140
141
  props = _objectWithoutProperties(_ref, _excluded2);
@@ -183,6 +184,7 @@ export var ActionsMenuBody = function ActionsMenuBody(_ref) {
183
184
  triggerBtn = /*#__PURE__*/React.createElement(Control, {
184
185
  "aria-label": ariaLabel,
185
186
  "aria-expanded": "".concat(toggleState),
187
+ ref: triggerRef,
186
188
  onClick: onToggleInView
187
189
  }, /*#__PURE__*/React.createElement(Icon, {
188
190
  isOpen: toggleState
@@ -213,7 +215,10 @@ ActionsMenuBody.propTypes = {
213
215
  customTriggerComponent: PropTypes.node,
214
216
  children: PropTypes.oneOfType([PropTypes.node, PropTypes.arrayOf(PropTypes.node)]),
215
217
  theme: PropTypes.object,
216
- ariaLabel: PropTypes.string
218
+ ariaLabel: PropTypes.string,
219
+ triggerRef: PropTypes.shape({
220
+ current: PropTypes.any
221
+ })
217
222
  };
218
223
  var ActionsMenu = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
219
224
  var children = _ref2.children,
@@ -226,6 +231,7 @@ var ActionsMenu = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
226
231
  closeOnClick = _ref2$closeOnClick === void 0 ? true : _ref2$closeOnClick,
227
232
  _ref2$ariaLabel = _ref2.ariaLabel,
228
233
  ariaLabel = _ref2$ariaLabel === void 0 ? "Options Menu" : _ref2$ariaLabel,
234
+ triggerRef = _ref2.triggerRef,
229
235
  props = _objectWithoutProperties(_ref2, _excluded3);
230
236
  var _useState5 = useState(isOpen),
231
237
  _useState6 = _slicedToArray(_useState5, 2),
@@ -268,7 +274,8 @@ var ActionsMenu = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
268
274
  customTriggerComponent: customTriggerComponent,
269
275
  direction: direction,
270
276
  theme: theme,
271
- ariaLabel: ariaLabel
277
+ ariaLabel: ariaLabel,
278
+ triggerRef: triggerRef
272
279
  }, props), children);
273
280
  });
274
281
  ActionsMenu.propTypes = {
@@ -280,7 +287,10 @@ ActionsMenu.propTypes = {
280
287
  /** Specifies the colour theme */
281
288
  theme: PropTypes.object,
282
289
  /** Specifies the aria-label for the button */
283
- ariaLabel: PropTypes.object
290
+ ariaLabel: PropTypes.object,
291
+ triggerRef: PropTypes.shape({
292
+ current: PropTypes.any
293
+ })
284
294
  };
285
295
  ActionsMenu.__docgenInfo = {
286
296
  "description": "",
@@ -355,6 +365,19 @@ ActionsMenu.__docgenInfo = {
355
365
  "name": "object"
356
366
  },
357
367
  "required": false
368
+ },
369
+ "triggerRef": {
370
+ "description": "",
371
+ "type": {
372
+ "name": "shape",
373
+ "value": {
374
+ "current": {
375
+ "name": "any",
376
+ "required": false
377
+ }
378
+ }
379
+ },
380
+ "required": false
358
381
  }
359
382
  }
360
383
  };
@@ -452,6 +475,19 @@ ActionsMenuBody.__docgenInfo = {
452
475
  "name": "object"
453
476
  },
454
477
  "required": false
478
+ },
479
+ "triggerRef": {
480
+ "description": "",
481
+ "type": {
482
+ "name": "shape",
483
+ "value": {
484
+ "current": {
485
+ "name": "any",
486
+ "required": false
487
+ }
488
+ }
489
+ },
490
+ "required": false
455
491
  }
456
492
  }
457
493
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orcs-design-system",
3
- "version": "3.1.22",
3
+ "version": "3.1.23",
4
4
  "engines": {
5
5
  "node": "18.17.1"
6
6
  },