@khanacademy/wonder-blocks-popover 3.2.16 → 3.3.1

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,27 @@
1
1
  # @khanacademy/wonder-blocks-popover
2
2
 
3
+ ## 3.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [3463bde3]
8
+ - @khanacademy/wonder-blocks-icon-button@5.5.0
9
+ - @khanacademy/wonder-blocks-modal@5.1.13
10
+ - @khanacademy/wonder-blocks-tooltip@2.5.1
11
+
12
+ ## 3.3.0
13
+
14
+ ### Minor Changes
15
+
16
+ - 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.
17
+
18
+ ### Patch Changes
19
+
20
+ - 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).
21
+ - Updated dependencies [badad6ee]
22
+ - Updated dependencies [fcab789b]
23
+ - @khanacademy/wonder-blocks-tooltip@2.5.0
24
+
3
25
  ## 3.2.16
4
26
 
5
27
  ### 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.2.16",
3
+ "version": "3.3.1",
4
4
  "design": "v1",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -17,10 +17,10 @@
17
17
  "dependencies": {
18
18
  "@babel/runtime": "^7.18.6",
19
19
  "@khanacademy/wonder-blocks-core": "^7.0.1",
20
- "@khanacademy/wonder-blocks-icon-button": "^5.4.1",
21
- "@khanacademy/wonder-blocks-modal": "^5.1.12",
20
+ "@khanacademy/wonder-blocks-icon-button": "^5.5.0",
21
+ "@khanacademy/wonder-blocks-modal": "^5.1.13",
22
22
  "@khanacademy/wonder-blocks-tokens": "^2.0.1",
23
- "@khanacademy/wonder-blocks-tooltip": "^2.4.3",
23
+ "@khanacademy/wonder-blocks-tooltip": "^2.5.1",
24
24
  "@khanacademy/wonder-blocks-typography": "^2.1.16"
25
25
  },
26
26
  "peerDependencies": {