@rocket.chat/fuselage 0.62.0 → 0.62.2

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.
@@ -5436,7 +5436,7 @@ var __1 = __webpack_require__(/*! .. */ "./src/components/index.ts");
5436
5436
  */
5437
5437
  var Contextualbar = (0, react_1.forwardRef)(function Contextualbar(_a, ref) {
5438
5438
  var children = _a.children, width = _a.width, position = _a.position, _b = _a.bg, bg = _b === void 0 ? 'room' : _b, props = __rest(_a, ["children", "width", "position", "bg"]);
5439
- return ((0, jsx_runtime_1.jsx)(__1.Box, __assign({ ref: ref, "rcx-vertical-bar": true, bg: bg, color: 'default', display: 'flex', flexDirection: 'column', flexShrink: 0, width: width, borderInlineStartWidth: 'default', borderInlineStartColor: 'extra-light', borderInlineStartStyle: 'solid', height: 'full', position: position, insetInlineEnd: 'none', insetBlockStart: 'none', zIndex: 5 }, props, { children: children })));
5439
+ return ((0, jsx_runtime_1.jsx)(__1.Box, __assign({ ref: ref, "rcx-vertical-bar": true, bg: bg, color: 'default', display: 'flex', flexDirection: 'column', flexShrink: 0, width: width, borderInlineStartWidth: 'default', borderInlineStartColor: 'extra-light', borderInlineStartStyle: 'solid', height: 'full', position: position, insetInlineEnd: 'none', insetBlockStart: 'none', zIndex: 10 }, props, { children: children })));
5440
5440
  });
5441
5441
  exports["default"] = (0, react_1.memo)(Contextualbar);
5442
5442
 
@@ -6001,7 +6001,7 @@ var react_1 = __webpack_require__(/*! react */ "react");
6001
6001
  var __1 = __webpack_require__(/*! .. */ "./src/components/index.ts");
6002
6002
  exports.DropdownDesktop = (0, react_1.forwardRef)(function DropdownDesktop(_a, ref) {
6003
6003
  var children = _a.children, style = _a.style, props = __rest(_a, ["children", "style"]);
6004
- return ((0, jsx_runtime_1.jsx)(__1.Tile, __assign({ style: style, ref: ref, elevation: '2', pi: '0', pb: '0', display: 'flex', flexDirection: 'column', overflow: 'auto', "data-testid": 'dropdown' }, props, { children: (0, jsx_runtime_1.jsx)(__1.Box, { flexShrink: 1, pb: 12, children: style.visibility === 'hidden' ? null : children }) })));
6004
+ return ((0, jsx_runtime_1.jsx)(__1.Tile, __assign({ style: style, ref: ref, elevation: '2', pi: '0', pb: '0', display: 'flex', flexDirection: 'column', overflow: 'auto', "data-testid": 'dropdown' }, props, { children: (0, jsx_runtime_1.jsx)(__1.Box, { flexShrink: 1, pb: 12, children: (style === null || style === void 0 ? void 0 : style.visibility) === 'hidden' ? null : children }) })));
6005
6005
  });
6006
6006
 
6007
6007
 
@@ -7764,7 +7764,7 @@ var Menu = function (_a) {
7764
7764
  var state = (0, react_stately_1.useMenuTriggerState)(props);
7765
7765
  var ref = (0, react_1.useRef)(null);
7766
7766
  var _f = (0, react_aria_1.useMenuTrigger)({}, state, ref), menuTriggerProps = _f.menuTriggerProps, menuProps = _f.menuProps;
7767
- var buttonProps = (0, react_aria_1.useButton)(__assign(__assign({}, menuTriggerProps), { preventFocusOnPress: true }), ref).buttonProps;
7767
+ var buttonProps = (0, react_aria_1.useButton)(__assign(__assign(__assign({}, menuTriggerProps), { 'aria-label': props['aria-label'] || title }), { preventFocusOnPress: true }), ref).buttonProps;
7768
7768
  var large = props.large, medium = props.medium, tiny = props.tiny, mini = props.mini;
7769
7769
  var sizes = { large: large, medium: medium, tiny: tiny, mini: mini };
7770
7770
  var defaultSmall = !large && !medium && !tiny && !mini;
@@ -7984,21 +7984,16 @@ var __rest = (this && this.__rest) || function (s, e) {
7984
7984
  Object.defineProperty(exports, "__esModule", ({ value: true }));
7985
7985
  var jsx_runtime_1 = __webpack_require__(/*! react/jsx-runtime */ "../../node_modules/react/jsx-runtime.js");
7986
7986
  var fuselage_hooks_1 = __webpack_require__(/*! @rocket.chat/fuselage-hooks */ "@rocket.chat/fuselage-hooks");
7987
- var react_1 = __webpack_require__(/*! react */ "react");
7988
- var react_aria_1 = __webpack_require__(/*! react-aria */ "react-aria");
7989
7987
  var DropdownDesktop_1 = __webpack_require__(/*! ../../Dropdown/DropdownDesktop */ "./src/components/Dropdown/DropdownDesktop.tsx");
7990
7988
  var DropdownMobile_1 = __webpack_require__(/*! ../../Dropdown/DropdownMobile */ "./src/components/Dropdown/DropdownMobile.tsx");
7989
+ var Popover_1 = __webpack_require__(/*! ../../Popover */ "./src/components/Popover/index.ts");
7991
7990
  function MenuPopover(_a) {
7992
7991
  var children = _a.children, state = _a.state, _b = _a.offset, offset = _b === void 0 ? 4 : _b, maxWidth = _a.maxWidth, props = __rest(_a, ["children", "state", "offset", "maxWidth"]);
7993
- var popoverRef = (0, react_1.useRef)(null);
7994
- var popoverProps = (0, react_aria_1.usePopover)(__assign(__assign({}, props), { offset: offset, popoverRef: popoverRef }), state).popoverProps;
7995
- var breakpoints = (0, fuselage_hooks_1.useBreakpoints)();
7996
- var isMobile = !breakpoints.includes('sm');
7992
+ var isMobile = !(0, fuselage_hooks_1.useBreakpoints)().includes('sm');
7997
7993
  if (isMobile) {
7998
- var mobileProps = __assign(__assign({}, popoverProps), { style: { bottom: 0, left: 0 } });
7999
- return (0, jsx_runtime_1.jsx)(DropdownMobile_1.DropdownMobile, __assign({ children: children }, mobileProps));
7994
+ return ((0, jsx_runtime_1.jsx)(Popover_1.Popover, __assign({ state: state, offset: offset }, props, { children: (0, jsx_runtime_1.jsx)(DropdownMobile_1.DropdownMobile, { children: children }) })));
8000
7995
  }
8001
- return ((0, jsx_runtime_1.jsx)(DropdownDesktop_1.DropdownDesktop, __assign({ children: children, ref: popoverRef, maxWidth: maxWidth }, popoverProps)));
7996
+ return ((0, jsx_runtime_1.jsx)(Popover_1.Popover, __assign({ state: state, offset: offset }, props, { children: (0, jsx_runtime_1.jsx)(DropdownDesktop_1.DropdownDesktop, { maxWidth: maxWidth, children: children }) })));
8002
7997
  }
8003
7998
  exports["default"] = MenuPopover;
8004
7999