@xh/hoist 63.0.1 → 63.0.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.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 63.0.2 - 2024-04-16
|
|
4
|
+
|
|
5
|
+
### 🐞 Bug Fixes
|
|
6
|
+
|
|
7
|
+
* Fixed issue with GroupingChooser: dragged items were not correctly positioned.
|
|
8
|
+
* Removed extraneous internal padding override to Blueprint menu styles. Fixes overhang of menu
|
|
9
|
+
divider borders and avoids possible triggering of horizontal scrollbars.
|
|
10
|
+
|
|
3
11
|
## 63.0.1 - 2024-04-05
|
|
4
12
|
|
|
5
13
|
### 🐞 Bug Fixes
|
|
@@ -195,7 +195,11 @@ const dimensionRow = hoistCmp.factory<GroupingChooserModel>({
|
|
|
195
195
|
let transform = dndProps.draggableProps.style.transform;
|
|
196
196
|
if (dndState.isDragging || dndState.isDropAnimating) {
|
|
197
197
|
let rowValues = parseTransform(transform),
|
|
198
|
-
|
|
198
|
+
pPos = model.popoverRef.current.getBoundingClientRect(),
|
|
199
|
+
popoverValues = {
|
|
200
|
+
x: pPos.left,
|
|
201
|
+
y: pPos.top
|
|
202
|
+
};
|
|
199
203
|
|
|
200
204
|
// Account for drop animation
|
|
201
205
|
if (dndState.isDropAnimating) {
|
|
@@ -204,9 +208,9 @@ const dimensionRow = hoistCmp.factory<GroupingChooserModel>({
|
|
|
204
208
|
}
|
|
205
209
|
|
|
206
210
|
// Subtract the popover's X / Y translation from the row's
|
|
207
|
-
if (!isEmpty(rowValues)
|
|
208
|
-
const x = rowValues[0] - popoverValues
|
|
209
|
-
y = rowValues[1] - popoverValues
|
|
211
|
+
if (!isEmpty(rowValues)) {
|
|
212
|
+
const x = rowValues[0] - popoverValues.x,
|
|
213
|
+
y = rowValues[1] - popoverValues.y;
|
|
210
214
|
transform = `translate(${x}px, ${y}px)`;
|
|
211
215
|
}
|
|
212
216
|
}
|
|
@@ -288,7 +292,7 @@ const addDimensionControl = hoistCmp.factory<GroupingChooserModel>({
|
|
|
288
292
|
* Works for both `translate` and `translate3d`
|
|
289
293
|
* e.g. `translate3d(250px, 150px, 0px)` is equivalent to [250, 150, 0]
|
|
290
294
|
*/
|
|
291
|
-
function parseTransform(transformStr) {
|
|
295
|
+
function parseTransform(transformStr: string): number[] {
|
|
292
296
|
return transformStr
|
|
293
297
|
?.replace('3d', '')
|
|
294
298
|
.match(/[-]{0,1}[\d]*[.]{0,1}[\d]+/g)
|
|
@@ -64,9 +64,9 @@ $pt-transition-ease: cubic-bezier(0.4, 1, 0.75, 0.9) !default;
|
|
|
64
64
|
$pt-transition-ease-bounce: cubic-bezier(0.54, 1.12, 0.38, 1.11) !default;
|
|
65
65
|
$pt-transition-duration: 100ms !default;
|
|
66
66
|
|
|
67
|
-
// This override is taken from the popover source SCSS - there it is scoped under the minimal class.
|
|
68
|
-
// https://github.com/palantir/blueprint/blob/1bfd1e42303d2626bfc3923eec2195ab4dc696d2/packages/core/src/components/popover/_popover.scss#L54
|
|
69
67
|
.bp5-popover {
|
|
68
|
+
// This override is taken from the popover source SCSS - there it is scoped under the minimal class.
|
|
69
|
+
// https://github.com/palantir/blueprint/blob/1bfd1e42303d2626bfc3923eec2195ab4dc696d2/packages/core/src/components/popover/_popover.scss#L54
|
|
70
70
|
@include react-transition(
|
|
71
71
|
'bp5-popover',
|
|
72
72
|
(
|
|
@@ -85,7 +85,13 @@ $pt-transition-duration: 100ms !default;
|
|
|
85
85
|
background-color: var(--xh-menu-bg);
|
|
86
86
|
border: var(--xh-menu-border);
|
|
87
87
|
color: var(--xh-menu-item-text-color);
|
|
88
|
-
|
|
88
|
+
|
|
89
|
+
// Constrain menu height to the viewport, for menus with more items than will fit vertically.
|
|
90
|
+
// Note that this is not perfect - menus are shown relative to their target, and if a menu is
|
|
91
|
+
// in the middle of the page and forced to render above/below the target, it can still clip.
|
|
92
|
+
// The 100px offset is designed to account for menus shown from app/tab-level top/bottom toolbars.
|
|
93
|
+
max-height: calc(100vh - 100px);
|
|
94
|
+
overflow-y: auto;
|
|
89
95
|
|
|
90
96
|
.bp5-menu-item {
|
|
91
97
|
// Default alignment of flex-start leaves Hoist icons shifted up - could target
|