@useblu/ocean-react 1.45.0 → 1.46.0

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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [1.46.0](https://github.com/ocean-ds/ocean-web/compare/v1.45.0...v1.46.0) (2023-06-08)
7
+
8
+ ### Features
9
+
10
+ - add mouse events on drawer ([#1069](https://github.com/ocean-ds/ocean-web/issues/1069)) ([f5bbd98](https://github.com/ocean-ds/ocean-web/commit/f5bbd98848df4f8e6a768240d7df2d6e70c3ae31))
11
+
6
12
  # [1.45.0](https://github.com/ocean-ds/ocean-web/compare/v1.44.0...v1.45.0) (2023-06-02)
7
13
 
8
14
  ### Features
@@ -1,4 +1,4 @@
1
- import React, { RefObject } from 'react';
1
+ import React, { MouseEvent, RefObject } from 'react';
2
2
  interface DrawerProps {
3
3
  children: React.ReactNode;
4
4
  open: boolean;
@@ -8,7 +8,8 @@ interface DrawerProps {
8
8
  align?: 'right' | 'left';
9
9
  iconAlignment?: 'right' | 'left';
10
10
  anchorEl?: RefObject<HTMLDivElement> | null;
11
+ onMouseOutDrawer?: (event?: MouseEvent<HTMLDivElement>) => void;
11
12
  }
12
- declare const Drawer: ({ children, open, onDrawerClose, overlayClose, align, headerIcon, iconAlignment, anchorEl, }: DrawerProps) => React.ReactElement;
13
+ declare const Drawer: ({ children, open, onDrawerClose, overlayClose, align, headerIcon, iconAlignment, anchorEl, onMouseOutDrawer, }: DrawerProps) => React.ReactElement;
13
14
  export default Drawer;
14
15
  //# sourceMappingURL=Drawer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../src/Drawer/Drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAkC,MAAM,OAAO,CAAC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,MAAM,MAAM,mHAUT,WAAW,KAAG,MAAM,YAoEtB,CAAC;AAEF,eAAe,MAAM,CAAC"}
package/index.es.js CHANGED
@@ -46239,7 +46239,7 @@ var Breadcrumb = forwardRef(function (_a, ref) {
46239
46239
  Breadcrumb.displayName = 'Breadcrumb';
46240
46240
 
46241
46241
  var Drawer = function (_a) {
46242
- var children = _a.children, open = _a.open, onDrawerClose = _a.onDrawerClose, overlayClose = _a.overlayClose, _b = _a.align, align = _b === void 0 ? 'right' : _b, _c = _a.headerIcon, headerIcon = _c === void 0 ? e.createElement(ts, null) : _c, _d = _a.iconAlignment, iconAlignment = _d === void 0 ? 'right' : _d, anchorEl = _a.anchorEl;
46242
+ var children = _a.children, open = _a.open, onDrawerClose = _a.onDrawerClose, overlayClose = _a.overlayClose, _b = _a.align, align = _b === void 0 ? 'right' : _b, _c = _a.headerIcon, headerIcon = _c === void 0 ? e.createElement(ts, null) : _c, _d = _a.iconAlignment, iconAlignment = _d === void 0 ? 'right' : _d, anchorEl = _a.anchorEl, onMouseOutDrawer = _a.onMouseOutDrawer;
46243
46243
  var drawerRef = useRef(null);
46244
46244
  var getAnchorPosition = useCallback(function () {
46245
46245
  if (!(anchorEl === null || anchorEl === void 0 ? void 0 : anchorEl.current))
@@ -46271,7 +46271,7 @@ var Drawer = function (_a) {
46271
46271
  attachDrawer();
46272
46272
  }, [anchorEl, drawerRef, attachDrawer]);
46273
46273
  return (e.createElement("div", { className: classNames('ods-overlay', open && 'ods-overlay--open'), "aria-hidden": "true", onClick: overlayClose, ref: drawerRef },
46274
- e.createElement("div", { className: classNames('ods-drawer', open && 'ods-drawer--open', "ods-drawer--".concat(align)) },
46274
+ e.createElement("div", { className: classNames('ods-drawer', open && 'ods-drawer--open', "ods-drawer--".concat(align)), onMouseLeave: onMouseOutDrawer },
46275
46275
  e.createElement("div", { className: classNames('ods-drawer__content--header', "ods-drawer__content--header--".concat(iconAlignment)) },
46276
46276
  e.createElement(Button$1, { type: "button", onClick: onDrawerClose }, headerIcon)),
46277
46277
  children)));