@khanacademy/wonder-blocks-popover 3.2.16 → 3.3.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 +13 -0
- package/dist/components/popover.d.ts +6 -0
- package/dist/es/index.js +4 -2
- package/dist/index.js +4 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @khanacademy/wonder-blocks-popover
|
|
2
2
|
|
|
3
|
+
## 3.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- badad6ee: Adds a `viewportPadding` prop to provide spacing between the popper and the viewport edges. If this prop is not provided, default spacing is applied.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- fcab789b: Only show the `TooltipPopper` contents once the popper has positioned itself. This fixes the issue where Tooltips are initially rendered in the top left corner for a brief moment before moving to the correct position (which was causing a flickering effect).
|
|
12
|
+
- Updated dependencies [badad6ee]
|
|
13
|
+
- Updated dependencies [fcab789b]
|
|
14
|
+
- @khanacademy/wonder-blocks-tooltip@2.5.0
|
|
15
|
+
|
|
3
16
|
## 3.2.16
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -103,6 +103,12 @@ type Props = AriaProps & Readonly<{
|
|
|
103
103
|
* on where there is available room within the document body.
|
|
104
104
|
*/
|
|
105
105
|
rootBoundary?: RootBoundary;
|
|
106
|
+
/**
|
|
107
|
+
* If `rootBoundary` is `viewport`, this padding value is used to provide
|
|
108
|
+
* spacing between the popper and the viewport. If not provided, default
|
|
109
|
+
* spacing of 12px is applied.
|
|
110
|
+
*/
|
|
111
|
+
viewportPadding?: number;
|
|
106
112
|
}>;
|
|
107
113
|
type State = Readonly<{
|
|
108
114
|
/**
|
package/dist/es/index.js
CHANGED
|
@@ -449,7 +449,8 @@ class Popover extends React.Component {
|
|
|
449
449
|
portal,
|
|
450
450
|
"aria-label": ariaLabel,
|
|
451
451
|
"aria-describedby": ariaDescribedBy,
|
|
452
|
-
rootBoundary
|
|
452
|
+
rootBoundary,
|
|
453
|
+
viewportPadding
|
|
453
454
|
} = this.props;
|
|
454
455
|
const {
|
|
455
456
|
anchorElement
|
|
@@ -459,7 +460,8 @@ class Popover extends React.Component {
|
|
|
459
460
|
const popperContent = React.createElement(TooltipPopper, {
|
|
460
461
|
anchorElement: anchorElement,
|
|
461
462
|
placement: placement,
|
|
462
|
-
rootBoundary: rootBoundary
|
|
463
|
+
rootBoundary: rootBoundary,
|
|
464
|
+
viewportPadding: viewportPadding
|
|
463
465
|
}, props => React.createElement(PopoverDialog, _extends({}, props, {
|
|
464
466
|
"aria-label": ariaLabel,
|
|
465
467
|
"aria-describedby": describedBy,
|
package/dist/index.js
CHANGED
|
@@ -479,7 +479,8 @@ class Popover extends React__namespace.Component {
|
|
|
479
479
|
portal,
|
|
480
480
|
"aria-label": ariaLabel,
|
|
481
481
|
"aria-describedby": ariaDescribedBy,
|
|
482
|
-
rootBoundary
|
|
482
|
+
rootBoundary,
|
|
483
|
+
viewportPadding
|
|
483
484
|
} = this.props;
|
|
484
485
|
const {
|
|
485
486
|
anchorElement
|
|
@@ -489,7 +490,8 @@ class Popover extends React__namespace.Component {
|
|
|
489
490
|
const popperContent = React__namespace.createElement(wonderBlocksTooltip.TooltipPopper, {
|
|
490
491
|
anchorElement: anchorElement,
|
|
491
492
|
placement: placement,
|
|
492
|
-
rootBoundary: rootBoundary
|
|
493
|
+
rootBoundary: rootBoundary,
|
|
494
|
+
viewportPadding: viewportPadding
|
|
493
495
|
}, props => React__namespace.createElement(PopoverDialog, _extends__default["default"]({}, props, {
|
|
494
496
|
"aria-label": ariaLabel,
|
|
495
497
|
"aria-describedby": describedBy,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@khanacademy/wonder-blocks-popover",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"design": "v1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"@khanacademy/wonder-blocks-icon-button": "^5.4.1",
|
|
21
21
|
"@khanacademy/wonder-blocks-modal": "^5.1.12",
|
|
22
22
|
"@khanacademy/wonder-blocks-tokens": "^2.0.1",
|
|
23
|
-
"@khanacademy/wonder-blocks-tooltip": "^2.
|
|
23
|
+
"@khanacademy/wonder-blocks-tooltip": "^2.5.0",
|
|
24
24
|
"@khanacademy/wonder-blocks-typography": "^2.1.16"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|