@useblu/ocean-react 1.139.2 → 1.139.4
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 +12 -0
- package/Drawer/Drawer.d.ts.map +1 -1
- package/index.es.js +18 -4
- package/index.es.js.map +1 -1
- package/index.js +18 -4
- package/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
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.139.4](https://github.com/ocean-ds/ocean-web/compare/v1.139.3...v1.139.4) (2026-09-18)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **drawer:** overlay transparente não intercepta o ponteiro (MR-795) ([#1261](https://github.com/ocean-ds/ocean-web/issues/1261)) ([a8fe950](https://github.com/ocean-ds/ocean-web/commit/a8fe950ae37848acf5d1897c5b412e024c8db97d))
|
|
11
|
+
|
|
12
|
+
## [1.139.3](https://github.com/ocean-ds/ocean-web/compare/v1.139.2...v1.139.3) (2026-09-18)
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
- **drawer:** entrada da direita e empurrão coordenados com motion Gentle (MR-795) ([#1260](https://github.com/ocean-ds/ocean-web/issues/1260)) ([be61858](https://github.com/ocean-ds/ocean-web/commit/be61858efc2ac22e6085d600fa6259eb672147a8))
|
|
17
|
+
|
|
6
18
|
## [1.139.2](https://github.com/ocean-ds/ocean-web/compare/v1.139.1...v1.139.2) (2026-09-18)
|
|
7
19
|
|
|
8
20
|
### Bug Fixes
|
package/Drawer/Drawer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../src/Drawer/Drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,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CHANGED
|
@@ -47127,6 +47127,17 @@ Breadcrumb.displayName = 'Breadcrumb';
|
|
|
47127
47127
|
var Drawer = function (_a) {
|
|
47128
47128
|
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(yo, null) : _c, _d = _a.iconAlignment, iconAlignment = _d === void 0 ? 'right' : _d, anchorEl = _a.anchorEl, onMouseOutDrawer = _a.onMouseOutDrawer, _e = _a.size, size = _e === void 0 ? 'small' : _e, _f = _a.floating, floating = _f === void 0 ? false : _f, offsetX = _a.offsetX, depth = _a.depth, width = _a.width, _g = _a.hideOverlay, hideOverlay = _g === void 0 ? false : _g, onBack = _a.onBack;
|
|
47129
47129
|
var drawerRef = useRef(null);
|
|
47130
|
+
var panelRef = useRef(null);
|
|
47131
|
+
var _h = useState(!floating), entered = _h[0], setEntered = _h[1];
|
|
47132
|
+
useLayoutEffect(function () {
|
|
47133
|
+
var _a;
|
|
47134
|
+
if (!floating || entered === open)
|
|
47135
|
+
return;
|
|
47136
|
+
if (open)
|
|
47137
|
+
(_a = panelRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
47138
|
+
setEntered(open);
|
|
47139
|
+
}, [floating, open, entered]);
|
|
47140
|
+
var visuallyOpen = floating ? entered : open;
|
|
47130
47141
|
var handleOverlayClose = function (event) {
|
|
47131
47142
|
if (event.target === event.currentTarget) {
|
|
47132
47143
|
event.preventDefault();
|
|
@@ -47163,11 +47174,14 @@ var Drawer = function (_a) {
|
|
|
47163
47174
|
attachDrawer();
|
|
47164
47175
|
}, [anchorEl, drawerRef, attachDrawer]);
|
|
47165
47176
|
var overlayStyle = depth !== undefined ? { zIndex: 200 + depth } : undefined;
|
|
47166
|
-
var drawerStyle = depth !== undefined || width !== undefined ||
|
|
47167
|
-
? __assign$1(__assign$1(__assign$1({}, (depth !== undefined && { zIndex: 400 + depth })), (width !== undefined && { width: "".concat(width, "px") })), (
|
|
47177
|
+
var drawerStyle = depth !== undefined || width !== undefined || offsetX !== undefined
|
|
47178
|
+
? __assign$1(__assign$1(__assign$1({}, (depth !== undefined && { zIndex: 400 + depth })), (width !== undefined && { width: "".concat(width, "px") })), (offsetX !== undefined && {
|
|
47179
|
+
'--ods-drawer-offset-x': "".concat(offsetX, "px"),
|
|
47180
|
+
}))
|
|
47181
|
+
: undefined;
|
|
47168
47182
|
var headerAlignment = onBack ? 'left' : iconAlignment;
|
|
47169
|
-
return (e.createElement("div", { className: classNames('ods-overlay',
|
|
47170
|
-
e.createElement("div", { className: classNames('ods-drawer',
|
|
47183
|
+
return (e.createElement("div", { className: classNames('ods-overlay', visuallyOpen && 'ods-overlay--open', hideOverlay && 'ods-overlay--transparent'), "aria-hidden": "true", onClick: handleOverlayClose, ref: drawerRef, style: overlayStyle, "data-testid": "drawer-overlay" },
|
|
47184
|
+
e.createElement("div", { className: classNames('ods-drawer', visuallyOpen && 'ods-drawer--open', "ods-drawer--".concat(align), "ods-drawer--".concat(size), floating && 'ods-drawer--floating'), style: drawerStyle, ref: panelRef, onMouseLeave: onMouseOutDrawer },
|
|
47171
47185
|
e.createElement("div", { className: classNames('ods-drawer__content--header', "ods-drawer__content--header--".concat(headerAlignment)) },
|
|
47172
47186
|
e.createElement(Button$1, { type: "button", onClick: onBack !== null && onBack !== void 0 ? onBack : onDrawerClose, "aria-label": onBack ? 'Voltar' : undefined }, onBack ? e.createElement(qa, null) : headerIcon)),
|
|
47173
47187
|
children)));
|