@plasmicapp/react-web 0.2.385 → 0.2.388

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.
@@ -1,6 +1,7 @@
1
+ import { PressResult } from "@react-aria/interactions";
2
+ import { MenuTriggerState } from "@react-stately/menu";
1
3
  import { Placement } from "@react-types/overlays";
2
4
  import * as React from "react";
3
- import { MenuTriggerState } from "@react-stately/menu";
4
5
  import { BaseMenuProps } from "../menu/menu";
5
6
  import { TriggeredOverlayContextValue } from "../triggered-overlay/context";
6
7
  /**
@@ -15,7 +16,7 @@ export declare function useMenuTrigger(opts: {
15
16
  menuWidth?: number;
16
17
  menu: React.ReactElement<BaseMenuProps> | (() => React.ReactElement<BaseMenuProps>);
17
18
  }, state: MenuTriggerState): {
18
- triggerProps: import("@react-types/shared").DOMAttributes<import("@react-types/shared").FocusableElement>;
19
- makeMenu: () => React.ReactElement<BaseMenuProps, string | React.JSXElementConstructor<any>> | null;
19
+ triggerProps: PressResult["pressProps"];
20
+ makeMenu: () => React.ReactElement;
20
21
  triggerContext: TriggeredOverlayContextValue;
21
22
  };
@@ -12,6 +12,7 @@ import * as ReactDOM from 'react-dom';
12
12
  import ReactDOM__default from 'react-dom';
13
13
  import { SSRProvider, useIsSSR as useIsSSR$1 } from '@react-aria/ssr';
14
14
  import { useFocusRing, useFocusable, FocusScope } from '@react-aria/focus';
15
+ import { useHover as useHover$1, usePress } from '@react-aria/interactions';
15
16
  import { proxy, useSnapshot, ref, getVersion, subscribe } from 'valtio';
16
17
  import clone from 'clone';
17
18
  import { useCheckbox as useCheckbox$1 } from '@react-aria/checkbox';
@@ -22,7 +23,6 @@ import { useTreeState } from '@react-stately/tree';
22
23
  import { Item, Section } from '@react-stately/collections';
23
24
  import { useSeparator } from '@react-aria/separator';
24
25
  import { useMenuTriggerState } from '@react-stately/menu';
25
- import { usePress } from '@react-aria/interactions';
26
26
  import { useListBox, useOption, useListBoxSection } from '@react-aria/listbox';
27
27
  import { useSelect as useSelect$1, HiddenSelect } from '@react-aria/select';
28
28
  import { useSelectState } from '@react-stately/select';
@@ -1794,24 +1794,12 @@ function useFocusVisibleWithin(opts) {
1794
1794
  return [isFocusVisible, focusProps];
1795
1795
  }
1796
1796
  function useHover() {
1797
- var _a = __read(React.useState(false), 2), isHover = _a[0], setHover = _a[1];
1798
- return [
1799
- isHover,
1800
- {
1801
- onMouseEnter: function () { return setHover(true); },
1802
- onMouseLeave: function () { return setHover(false); },
1803
- },
1804
- ];
1797
+ var _a = useHover$1({}), isHovered = _a.isHovered, hoverProps = _a.hoverProps;
1798
+ return [isHovered, hoverProps];
1805
1799
  }
1806
1800
  function usePressed() {
1807
- var _a = __read(React.useState(false), 2), isPressed = _a[0], setPressed = _a[1];
1808
- return [
1809
- isPressed,
1810
- {
1811
- onMouseDown: function () { return setPressed(true); },
1812
- onMouseUp: function () { return setPressed(false); },
1813
- },
1814
- ];
1801
+ var _a = usePress({}), isPressed = _a.isPressed, pressProps = _a.pressProps;
1802
+ return [isPressed, pressProps];
1815
1803
  }
1816
1804
  var TRIGGER_TO_HOOK = {
1817
1805
  useHover: useHover,