@box/blueprint-web 6.6.3 → 6.7.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.
@@ -5,6 +5,7 @@ export declare const Popover: {
5
5
  displayName: string;
6
6
  };
7
7
  Trigger: import("react").ForwardRefExoticComponent<import("@radix-ui/react-popover").PopoverTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
8
+ Anchor: import("react").ForwardRefExoticComponent<import("@radix-ui/react-popover").PopoverAnchorProps & import("react").RefAttributes<HTMLDivElement>>;
8
9
  ContentContainer: import("react").ForwardRefExoticComponent<import("./popover-content-container").PopoverContentContainerProps & import("react").RefAttributes<HTMLDivElement>>;
9
10
  MainContent: import("react").ForwardRefExoticComponent<import("@radix-ui/react-popover").PopoverContentProps & import("react").RefAttributes<HTMLDivElement>>;
10
11
  Footer: import("react").ForwardRefExoticComponent<import("@radix-ui/react-popover").PopoverContentProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -16,3 +17,4 @@ export { type PopoverFooterProps } from './popover-footer';
16
17
  export { type PopoverMainContentProps } from './popover-main-content';
17
18
  export { type PopoverRootProps } from './popover-root';
18
19
  export { type PopoverTriggerProps } from './popover-trigger';
20
+ export { type PopoverAnchorProps } from './popover-anchor';
@@ -4,10 +4,12 @@ import { PopoverFooter } from './popover-footer.js';
4
4
  import { PopoverMainContent } from './popover-main-content.js';
5
5
  import { PopoverRoot } from './popover-root.js';
6
6
  import { PopoverTrigger } from './popover-trigger.js';
7
+ import { PopoverAnchor } from './popover-anchor.js';
7
8
 
8
9
  const Popover = {
9
10
  Root: PopoverRoot,
10
11
  Trigger: PopoverTrigger,
12
+ Anchor: PopoverAnchor,
11
13
  ContentContainer: PopoverContentContainer,
12
14
  MainContent: PopoverMainContent,
13
15
  Footer: PopoverFooter,
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import * as PopoverPrimitive from '@radix-ui/react-popover';
3
+ export type PopoverAnchorProps = PopoverPrimitive.PopoverAnchorProps;
4
+ /**
5
+ * An optional element to position the `Popover.Content` against.
6
+ * @see https://www.radix-ui.com/docs/primitives/components/popover#anchor
7
+ */
8
+ export declare const PopoverAnchor: import("react").ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,23 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import * as RadixPopover from '@radix-ui/react-popover';
3
+ import { forwardRef } from 'react';
4
+
5
+ /**
6
+ * An optional element to position the `Popover.Content` against.
7
+ * @see https://www.radix-ui.com/docs/primitives/components/popover#anchor
8
+ */
9
+ const PopoverAnchor = /*#__PURE__*/forwardRef((props, forwardedRef) => {
10
+ const {
11
+ children,
12
+ ...rest
13
+ } = props;
14
+ return jsx(RadixPopover.Anchor, {
15
+ ...rest,
16
+ ref: forwardedRef,
17
+ asChild: true,
18
+ children: children
19
+ });
20
+ });
21
+ PopoverAnchor.displayName = 'PopoverAnchor';
22
+
23
+ export { PopoverAnchor };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/blueprint-web",
3
- "version": "6.6.3",
3
+ "version": "6.7.0",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -56,7 +56,7 @@
56
56
  "devDependencies": {
57
57
  "@box/storybook-utils": "^0.0.3"
58
58
  },
59
- "gitHead": "fbe22f91b8ab3b2d24eac63921d216ad6e6b9d22",
59
+ "gitHead": "0ea8e47adeb6bd6eac16828ed06540ffda462f80",
60
60
  "module": "lib-esm/index.js",
61
61
  "main": "lib-esm/index.js",
62
62
  "exports": {