@fluentui/react-popover 9.5.15 → 9.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. package/CHANGELOG.json +72 -1
  2. package/CHANGELOG.md +23 -2
  3. package/lib/Popover.js +0 -1
  4. package/lib/Popover.js.map +1 -1
  5. package/lib/PopoverSurface.js +0 -1
  6. package/lib/PopoverSurface.js.map +1 -1
  7. package/lib/PopoverTrigger.js +0 -1
  8. package/lib/PopoverTrigger.js.map +1 -1
  9. package/lib/components/Popover/Popover.js +3 -5
  10. package/lib/components/Popover/Popover.js.map +1 -1
  11. package/lib/components/Popover/Popover.types.js +0 -1
  12. package/lib/components/Popover/Popover.types.js.map +1 -1
  13. package/lib/components/Popover/constants.js +1 -2
  14. package/lib/components/Popover/constants.js.map +1 -1
  15. package/lib/components/Popover/index.js +0 -1
  16. package/lib/components/Popover/index.js.map +1 -1
  17. package/lib/components/Popover/renderPopover.js +21 -39
  18. package/lib/components/Popover/renderPopover.js.map +1 -1
  19. package/lib/components/Popover/usePopover.js +165 -156
  20. package/lib/components/Popover/usePopover.js.map +1 -1
  21. package/lib/components/PopoverSurface/PopoverSurface.js +5 -7
  22. package/lib/components/PopoverSurface/PopoverSurface.js.map +1 -1
  23. package/lib/components/PopoverSurface/PopoverSurface.types.js +1 -2
  24. package/lib/components/PopoverSurface/PopoverSurface.types.js.map +1 -1
  25. package/lib/components/PopoverSurface/index.js +0 -1
  26. package/lib/components/PopoverSurface/index.js.map +1 -1
  27. package/lib/components/PopoverSurface/renderPopoverSurface.js +13 -18
  28. package/lib/components/PopoverSurface/renderPopoverSurface.js.map +1 -1
  29. package/lib/components/PopoverSurface/usePopoverSurface.js +59 -67
  30. package/lib/components/PopoverSurface/usePopoverSurface.js.map +1 -1
  31. package/lib/components/PopoverSurface/usePopoverSurfaceStyles.styles.js.map +1 -1
  32. package/lib/components/PopoverTrigger/PopoverTrigger.js +3 -5
  33. package/lib/components/PopoverTrigger/PopoverTrigger.js.map +1 -1
  34. package/lib/components/PopoverTrigger/PopoverTrigger.types.js +0 -1
  35. package/lib/components/PopoverTrigger/PopoverTrigger.types.js.map +1 -1
  36. package/lib/components/PopoverTrigger/index.js +0 -1
  37. package/lib/components/PopoverTrigger/index.js.map +1 -1
  38. package/lib/components/PopoverTrigger/renderPopoverTrigger.js +2 -3
  39. package/lib/components/PopoverTrigger/renderPopoverTrigger.js.map +1 -1
  40. package/lib/components/PopoverTrigger/usePopoverTrigger.js +57 -64
  41. package/lib/components/PopoverTrigger/usePopoverTrigger.js.map +1 -1
  42. package/lib/index.js +0 -1
  43. package/lib/index.js.map +1 -1
  44. package/lib/popoverContext.js +19 -20
  45. package/lib/popoverContext.js.map +1 -1
  46. package/lib-commonjs/Popover.js +0 -3
  47. package/lib-commonjs/Popover.js.map +1 -1
  48. package/lib-commonjs/PopoverSurface.js +0 -3
  49. package/lib-commonjs/PopoverSurface.js.map +1 -1
  50. package/lib-commonjs/PopoverTrigger.js +0 -3
  51. package/lib-commonjs/PopoverTrigger.js.map +1 -1
  52. package/lib-commonjs/components/Popover/Popover.js +1 -3
  53. package/lib-commonjs/components/Popover/Popover.js.map +1 -1
  54. package/lib-commonjs/components/Popover/Popover.types.js +0 -3
  55. package/lib-commonjs/components/Popover/Popover.types.js.map +1 -1
  56. package/lib-commonjs/components/Popover/constants.js +1 -3
  57. package/lib-commonjs/components/Popover/constants.js.map +1 -1
  58. package/lib-commonjs/components/Popover/index.js +0 -3
  59. package/lib-commonjs/components/Popover/index.js.map +1 -1
  60. package/lib-commonjs/components/Popover/renderPopover.js +1 -3
  61. package/lib-commonjs/components/Popover/renderPopover.js.map +1 -1
  62. package/lib-commonjs/components/Popover/usePopover.js +1 -3
  63. package/lib-commonjs/components/Popover/usePopover.js.map +1 -1
  64. package/lib-commonjs/components/PopoverSurface/PopoverSurface.js +1 -3
  65. package/lib-commonjs/components/PopoverSurface/PopoverSurface.js.map +1 -1
  66. package/lib-commonjs/components/PopoverSurface/PopoverSurface.types.js +0 -3
  67. package/lib-commonjs/components/PopoverSurface/PopoverSurface.types.js.map +1 -1
  68. package/lib-commonjs/components/PopoverSurface/index.js +0 -3
  69. package/lib-commonjs/components/PopoverSurface/index.js.map +1 -1
  70. package/lib-commonjs/components/PopoverSurface/renderPopoverSurface.js +1 -3
  71. package/lib-commonjs/components/PopoverSurface/renderPopoverSurface.js.map +1 -1
  72. package/lib-commonjs/components/PopoverSurface/usePopoverSurface.js +1 -3
  73. package/lib-commonjs/components/PopoverSurface/usePopoverSurface.js.map +1 -1
  74. package/lib-commonjs/components/PopoverSurface/usePopoverSurfaceStyles.styles.js +0 -2
  75. package/lib-commonjs/components/PopoverSurface/usePopoverSurfaceStyles.styles.js.map +1 -1
  76. package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.js +1 -3
  77. package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.js.map +1 -1
  78. package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.types.js +0 -3
  79. package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.types.js.map +1 -1
  80. package/lib-commonjs/components/PopoverTrigger/index.js +0 -3
  81. package/lib-commonjs/components/PopoverTrigger/index.js.map +1 -1
  82. package/lib-commonjs/components/PopoverTrigger/renderPopoverTrigger.js +1 -3
  83. package/lib-commonjs/components/PopoverTrigger/renderPopoverTrigger.js.map +1 -1
  84. package/lib-commonjs/components/PopoverTrigger/usePopoverTrigger.js +1 -3
  85. package/lib-commonjs/components/PopoverTrigger/usePopoverTrigger.js.map +1 -1
  86. package/lib-commonjs/index.js +0 -3
  87. package/lib-commonjs/index.js.map +1 -1
  88. package/lib-commonjs/popoverContext.js +2 -4
  89. package/lib-commonjs/popoverContext.js.map +1 -1
  90. package/package.json +10 -10
package/CHANGELOG.json CHANGED
@@ -2,7 +2,78 @@
2
2
  "name": "@fluentui/react-popover",
3
3
  "entries": [
4
4
  {
5
- "date": "Thu, 25 May 2023 09:57:45 GMT",
5
+ "date": "Wed, 31 May 2023 06:42:59 GMT",
6
+ "tag": "@fluentui/react-popover_v9.6.0",
7
+ "version": "9.6.0",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "seanmonahan@microsoft.com",
12
+ "package": "@fluentui/react-popover",
13
+ "commit": "d640b972d7ac86bfb76ae6c6329f12cdd33b3b7c",
14
+ "comment": "chore: Update Griffel to v1.5.7."
15
+ }
16
+ ],
17
+ "minor": [
18
+ {
19
+ "author": "yiliu9@microsoft.com",
20
+ "package": "@fluentui/react-popover",
21
+ "commit": "e1ca88c0a92d07dced9c668dd11585c0c4866919",
22
+ "comment": "Add new optional useTransform parameter to allow disabling transform for positioning "
23
+ },
24
+ {
25
+ "author": "beachball",
26
+ "package": "@fluentui/react-popover",
27
+ "comment": "Bump @fluentui/react-aria to v9.3.22",
28
+ "commit": "17ca96c6b7f684f36a5c63e40e78b4986a86c713"
29
+ },
30
+ {
31
+ "author": "beachball",
32
+ "package": "@fluentui/react-popover",
33
+ "comment": "Bump @fluentui/react-context-selector to v9.1.22",
34
+ "commit": "17ca96c6b7f684f36a5c63e40e78b4986a86c713"
35
+ },
36
+ {
37
+ "author": "beachball",
38
+ "package": "@fluentui/react-popover",
39
+ "comment": "Bump @fluentui/react-portal to v9.2.12",
40
+ "commit": "17ca96c6b7f684f36a5c63e40e78b4986a86c713"
41
+ },
42
+ {
43
+ "author": "beachball",
44
+ "package": "@fluentui/react-popover",
45
+ "comment": "Bump @fluentui/react-positioning to v9.6.0",
46
+ "commit": "17ca96c6b7f684f36a5c63e40e78b4986a86c713"
47
+ },
48
+ {
49
+ "author": "beachball",
50
+ "package": "@fluentui/react-popover",
51
+ "comment": "Bump @fluentui/react-tabster to v9.7.5",
52
+ "commit": "17ca96c6b7f684f36a5c63e40e78b4986a86c713"
53
+ },
54
+ {
55
+ "author": "beachball",
56
+ "package": "@fluentui/react-popover",
57
+ "comment": "Bump @fluentui/react-utilities to v9.9.2",
58
+ "commit": "17ca96c6b7f684f36a5c63e40e78b4986a86c713"
59
+ },
60
+ {
61
+ "author": "beachball",
62
+ "package": "@fluentui/react-popover",
63
+ "comment": "Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.6",
64
+ "commit": "17ca96c6b7f684f36a5c63e40e78b4986a86c713"
65
+ },
66
+ {
67
+ "author": "beachball",
68
+ "package": "@fluentui/react-popover",
69
+ "comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.22",
70
+ "commit": "17ca96c6b7f684f36a5c63e40e78b4986a86c713"
71
+ }
72
+ ]
73
+ }
74
+ },
75
+ {
76
+ "date": "Thu, 25 May 2023 10:00:48 GMT",
6
77
  "tag": "@fluentui/react-popover_v9.5.15",
7
78
  "version": "9.5.15",
8
79
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,33 @@
1
1
  # Change Log - @fluentui/react-popover
2
2
 
3
- This log was last generated on Thu, 25 May 2023 09:57:45 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 31 May 2023 06:42:59 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.6.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-popover_v9.6.0)
8
+
9
+ Wed, 31 May 2023 06:42:59 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-popover_v9.5.15..@fluentui/react-popover_v9.6.0)
11
+
12
+ ### Minor changes
13
+
14
+ - Add new optional useTransform parameter to allow disabling transform for positioning ([PR #27929](https://github.com/microsoft/fluentui/pull/27929) by yiliu9@microsoft.com)
15
+ - Bump @fluentui/react-aria to v9.3.22 ([PR #28054](https://github.com/microsoft/fluentui/pull/28054) by beachball)
16
+ - Bump @fluentui/react-context-selector to v9.1.22 ([PR #28054](https://github.com/microsoft/fluentui/pull/28054) by beachball)
17
+ - Bump @fluentui/react-portal to v9.2.12 ([PR #28054](https://github.com/microsoft/fluentui/pull/28054) by beachball)
18
+ - Bump @fluentui/react-positioning to v9.6.0 ([PR #28054](https://github.com/microsoft/fluentui/pull/28054) by beachball)
19
+ - Bump @fluentui/react-tabster to v9.7.5 ([PR #28054](https://github.com/microsoft/fluentui/pull/28054) by beachball)
20
+ - Bump @fluentui/react-utilities to v9.9.2 ([PR #28054](https://github.com/microsoft/fluentui/pull/28054) by beachball)
21
+ - Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.6 ([PR #28054](https://github.com/microsoft/fluentui/pull/28054) by beachball)
22
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.22 ([PR #28054](https://github.com/microsoft/fluentui/pull/28054) by beachball)
23
+
24
+ ### Patches
25
+
26
+ - chore: Update Griffel to v1.5.7. ([PR #27925](https://github.com/microsoft/fluentui/pull/27925) by seanmonahan@microsoft.com)
27
+
7
28
  ## [9.5.15](https://github.com/microsoft/fluentui/tree/@fluentui/react-popover_v9.5.15)
8
29
 
9
- Thu, 25 May 2023 09:57:45 GMT
30
+ Thu, 25 May 2023 10:00:48 GMT
10
31
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-popover_v9.5.14..@fluentui/react-popover_v9.5.15)
11
32
 
12
33
  ### Patches
package/lib/Popover.js CHANGED
@@ -1,2 +1 @@
1
1
  export * from './components/Popover/index';
2
- //# sourceMappingURL=Popover.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../src/Popover.ts"],"sourcesContent":["export * from './components/Popover/index';\n"],"mappings":"AAAA,cAAc"}
1
+ {"version":3,"sources":["Popover.ts"],"sourcesContent":["export * from './components/Popover/index';\n"],"names":[],"mappings":"AAAA,cAAc,6BAA6B"}
@@ -1,2 +1 @@
1
1
  export * from './components/PopoverSurface/index';
2
- //# sourceMappingURL=PopoverSurface.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../src/PopoverSurface.ts"],"sourcesContent":["export * from './components/PopoverSurface/index';\n"],"mappings":"AAAA,cAAc"}
1
+ {"version":3,"sources":["PopoverSurface.ts"],"sourcesContent":["export * from './components/PopoverSurface/index';\n"],"names":[],"mappings":"AAAA,cAAc,oCAAoC"}
@@ -1,2 +1 @@
1
1
  export * from './components/PopoverTrigger/index';
2
- //# sourceMappingURL=PopoverTrigger.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../src/PopoverTrigger.ts"],"sourcesContent":["export * from './components/PopoverTrigger/index';\n"],"mappings":"AAAA,cAAc"}
1
+ {"version":3,"sources":["PopoverTrigger.ts"],"sourcesContent":["export * from './components/PopoverTrigger/index';\n"],"names":[],"mappings":"AAAA,cAAc,oCAAoC"}
@@ -3,10 +3,8 @@ import { usePopover_unstable } from './usePopover';
3
3
  import { renderPopover_unstable } from './renderPopover';
4
4
  /**
5
5
  * Wrapper component that manages state for a PopoverTrigger and a PopoverSurface components.
6
- */
7
- export const Popover = props => {
8
- const state = usePopover_unstable(props);
9
- return renderPopover_unstable(state);
6
+ */ export const Popover = (props)=>{
7
+ const state = usePopover_unstable(props);
8
+ return renderPopover_unstable(state);
10
9
  };
11
10
  Popover.displayName = 'Popover';
12
- //# sourceMappingURL=Popover.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","usePopover_unstable","renderPopover_unstable","Popover","props","state","displayName"],"sources":["../../../src/components/Popover/Popover.tsx"],"sourcesContent":["import * as React from 'react';\nimport { usePopover_unstable } from './usePopover';\nimport { renderPopover_unstable } from './renderPopover';\nimport type { PopoverProps } from './Popover.types';\n\n/**\n * Wrapper component that manages state for a PopoverTrigger and a PopoverSurface components.\n */\nexport const Popover: React.FC<PopoverProps> = props => {\n const state = usePopover_unstable(props);\n\n return renderPopover_unstable(state);\n};\n\nPopover.displayName = 'Popover';\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,mBAAmB,QAAQ;AACpC,SAASC,sBAAsB,QAAQ;AAGvC;;;AAGA,OAAO,MAAMC,OAAA,GAAkCC,KAAA,IAAS;EACtD,MAAMC,KAAA,GAAQJ,mBAAA,CAAoBG,KAAA;EAElC,OAAOF,sBAAA,CAAuBG,KAAA;AAChC;AAEAF,OAAA,CAAQG,WAAW,GAAG"}
1
+ {"version":3,"sources":["Popover.tsx"],"sourcesContent":["import * as React from 'react';\nimport { usePopover_unstable } from './usePopover';\nimport { renderPopover_unstable } from './renderPopover';\nimport type { PopoverProps } from './Popover.types';\n\n/**\n * Wrapper component that manages state for a PopoverTrigger and a PopoverSurface components.\n */\nexport const Popover: React.FC<PopoverProps> = props => {\n const state = usePopover_unstable(props);\n\n return renderPopover_unstable(state);\n};\n\nPopover.displayName = 'Popover';\n"],"names":["React","usePopover_unstable","renderPopover_unstable","Popover","props","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,mBAAmB,QAAQ,eAAe;AACnD,SAASC,sBAAsB,QAAQ,kBAAkB;AAGzD;;CAEC,GACD,OAAO,MAAMC,UAAkCC,CAAAA,QAAS;IACtD,MAAMC,QAAQJ,oBAAoBG;IAElC,OAAOF,uBAAuBG;AAChC,EAAE;AAEFF,QAAQG,WAAW,GAAG"}
@@ -1,2 +1 @@
1
1
  import * as React from 'react';
2
- //# sourceMappingURL=Popover.types.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React"],"sources":["../../../src/components/Popover/Popover.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type {\n PositioningVirtualElement,\n PositioningShorthand,\n SetVirtualMouseTarget,\n} from '@fluentui/react-positioning';\nimport type { PortalProps } from '@fluentui/react-portal';\n\n/**\n * Determines popover padding and arrow size\n */\nexport type PopoverSize = 'small' | 'medium' | 'large';\n\n/**\n * Popover Props\n */\nexport type PopoverProps = Pick<PortalProps, 'mountNode'> & {\n /**\n * A popover can appear styled with brand or inverted.\n * When not specified, the default style is used.\n */\n appearance?: 'brand' | 'inverted';\n\n /**\n * Can contain two children including {@link PopoverTrigger} and {@link PopoverSurface}.\n * Alternatively can only contain {@link PopoverSurface} if using a custom `target`.\n */\n children: [JSX.Element, JSX.Element] | JSX.Element;\n\n /**\n * Close when scroll outside of it\n *\n * @default false\n */\n closeOnScroll?: boolean;\n\n /**\n * Used to set the initial open state of the Popover in uncontrolled mode\n *\n * @default false\n */\n defaultOpen?: boolean;\n\n /**\n * Popovers are rendered out of DOM order on `document.body` by default, use this to render the popover in DOM order\n *\n * @default false\n */\n inline?: boolean;\n\n /**\n * Sets the delay for closing popover on mouse leave\n */\n mouseLeaveDelay?: number;\n\n /**\n * Display an arrow pointing to the target.\n *\n * @default false\n */\n withArrow?: boolean;\n\n /**\n * Call back when the component requests to change value\n * The `open` value is used as a hint when directly controlling the component\n */\n onOpenChange?: (e: OpenPopoverEvents, data: OnOpenChangeData) => void;\n\n /**\n * Controls the opening of the Popover\n *\n * @default false\n */\n open?: boolean;\n\n /**\n * Flag to open the Popover as a context menu. Disables all other interactions\n *\n * @default false\n */\n openOnContext?: boolean;\n\n /**\n * Flag to open the Popover by hovering the trigger\n *\n * @default false\n */\n openOnHover?: boolean;\n\n /**\n * Configures the position of the Popover\n */\n positioning?: PositioningShorthand;\n\n /**\n * Determines popover padding and arrow size\n *\n * @default medium\n */\n size?: PopoverSize;\n\n /**\n * Should trap focus\n *\n * @default false\n */\n trapFocus?: boolean;\n\n /**\n * Must be used with the `trapFocus` prop\n * Enables older Fluent UI focus trap behavior where the user\n * cannot tab into the window outside of the document. This is now\n * non-standard behavior according to the [HTML dialog spec](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/showModal)\n * where the focus trap involves setting outside elements inert.\n *\n * @deprecated this behavior is default provided now, to opt-out of it in favor of standard behavior use the `inertTrapFocus` property\n */\n legacyTrapFocus?: boolean;\n /**\n * Enables standard behavior according to the [HTML dialog spec](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/showModal)\n * where the focus trap involves setting outside elements inert,\n * making navigation leak from the trapped area back to the browser toolbar and vice-versa.\n *\n * @default false\n */\n inertTrapFocus?: boolean;\n\n /**\n * By default Popover focuses the first focusable element in PopoverSurface on open.\n * Specify `disableAutoFocus` to prevent this behavior.\n *\n * @default false\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n unstable_disableAutoFocus?: boolean;\n};\n\n/**\n * Popover State\n */\nexport type PopoverState = Pick<\n PopoverProps,\n | 'appearance'\n | 'mountNode'\n | 'onOpenChange'\n | 'openOnContext'\n | 'openOnHover'\n | 'trapFocus'\n | 'withArrow'\n | 'inertTrapFocus'\n> &\n Required<Pick<PopoverProps, 'inline' | 'open'>> &\n Pick<PopoverProps, 'children'> & {\n /**\n * Ref of the pointing arrow\n */\n arrowRef: React.MutableRefObject<HTMLDivElement | null>;\n\n /**\n * Ref of the PopoverSurface\n */\n contentRef: React.MutableRefObject<HTMLElement | null>;\n\n /**\n * Anchors the popper to the mouse click for context events\n */\n contextTarget: PositioningVirtualElement | undefined;\n\n popoverSurface: React.ReactElement | undefined;\n\n popoverTrigger: React.ReactElement | undefined;\n\n /**\n * A callback to set the target of the popper to the mouse click for context events\n */\n setContextTarget: SetVirtualMouseTarget;\n\n /**\n * Callback to open/close the Popover\n */\n setOpen: (e: OpenPopoverEvents, open: boolean) => void;\n\n size: NonNullable<PopoverProps['size']>;\n\n /**\n * Callback to toggle the open state of the Popover\n */\n toggleOpen: (e: OpenPopoverEvents) => void;\n\n /**\n * Ref of the PopoverTrigger\n */\n triggerRef: React.MutableRefObject<HTMLElement | null>;\n };\n\n/**\n * Data attached to open/close events\n */\nexport type OnOpenChangeData = { open: boolean };\n\n/**\n * The supported events that will trigger open/close of the menu\n */\nexport type OpenPopoverEvents =\n | MouseEvent\n | TouchEvent\n | React.FocusEvent<HTMLElement>\n | React.KeyboardEvent<HTMLElement>\n | React.MouseEvent<HTMLElement>;\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW"}
1
+ {"version":3,"sources":["Popover.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type {\n PositioningVirtualElement,\n PositioningShorthand,\n SetVirtualMouseTarget,\n} from '@fluentui/react-positioning';\nimport type { PortalProps } from '@fluentui/react-portal';\n\n/**\n * Determines popover padding and arrow size\n */\nexport type PopoverSize = 'small' | 'medium' | 'large';\n\n/**\n * Popover Props\n */\nexport type PopoverProps = Pick<PortalProps, 'mountNode'> & {\n /**\n * A popover can appear styled with brand or inverted.\n * When not specified, the default style is used.\n */\n appearance?: 'brand' | 'inverted';\n\n /**\n * Can contain two children including {@link PopoverTrigger} and {@link PopoverSurface}.\n * Alternatively can only contain {@link PopoverSurface} if using a custom `target`.\n */\n children: [JSX.Element, JSX.Element] | JSX.Element;\n\n /**\n * Close when scroll outside of it\n *\n * @default false\n */\n closeOnScroll?: boolean;\n\n /**\n * Used to set the initial open state of the Popover in uncontrolled mode\n *\n * @default false\n */\n defaultOpen?: boolean;\n\n /**\n * Popovers are rendered out of DOM order on `document.body` by default, use this to render the popover in DOM order\n *\n * @default false\n */\n inline?: boolean;\n\n /**\n * Sets the delay for closing popover on mouse leave\n */\n mouseLeaveDelay?: number;\n\n /**\n * Display an arrow pointing to the target.\n *\n * @default false\n */\n withArrow?: boolean;\n\n /**\n * Call back when the component requests to change value\n * The `open` value is used as a hint when directly controlling the component\n */\n onOpenChange?: (e: OpenPopoverEvents, data: OnOpenChangeData) => void;\n\n /**\n * Controls the opening of the Popover\n *\n * @default false\n */\n open?: boolean;\n\n /**\n * Flag to open the Popover as a context menu. Disables all other interactions\n *\n * @default false\n */\n openOnContext?: boolean;\n\n /**\n * Flag to open the Popover by hovering the trigger\n *\n * @default false\n */\n openOnHover?: boolean;\n\n /**\n * Configures the position of the Popover\n */\n positioning?: PositioningShorthand;\n\n /**\n * Determines popover padding and arrow size\n *\n * @default medium\n */\n size?: PopoverSize;\n\n /**\n * Should trap focus\n *\n * @default false\n */\n trapFocus?: boolean;\n\n /**\n * Must be used with the `trapFocus` prop\n * Enables older Fluent UI focus trap behavior where the user\n * cannot tab into the window outside of the document. This is now\n * non-standard behavior according to the [HTML dialog spec](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/showModal)\n * where the focus trap involves setting outside elements inert.\n *\n * @deprecated this behavior is default provided now, to opt-out of it in favor of standard behavior use the `inertTrapFocus` property\n */\n legacyTrapFocus?: boolean;\n /**\n * Enables standard behavior according to the [HTML dialog spec](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/showModal)\n * where the focus trap involves setting outside elements inert,\n * making navigation leak from the trapped area back to the browser toolbar and vice-versa.\n *\n * @default false\n */\n inertTrapFocus?: boolean;\n\n /**\n * By default Popover focuses the first focusable element in PopoverSurface on open.\n * Specify `disableAutoFocus` to prevent this behavior.\n *\n * @default false\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n unstable_disableAutoFocus?: boolean;\n};\n\n/**\n * Popover State\n */\nexport type PopoverState = Pick<\n PopoverProps,\n | 'appearance'\n | 'mountNode'\n | 'onOpenChange'\n | 'openOnContext'\n | 'openOnHover'\n | 'trapFocus'\n | 'withArrow'\n | 'inertTrapFocus'\n> &\n Required<Pick<PopoverProps, 'inline' | 'open'>> &\n Pick<PopoverProps, 'children'> & {\n /**\n * Ref of the pointing arrow\n */\n arrowRef: React.MutableRefObject<HTMLDivElement | null>;\n\n /**\n * Ref of the PopoverSurface\n */\n contentRef: React.MutableRefObject<HTMLElement | null>;\n\n /**\n * Anchors the popper to the mouse click for context events\n */\n contextTarget: PositioningVirtualElement | undefined;\n\n popoverSurface: React.ReactElement | undefined;\n\n popoverTrigger: React.ReactElement | undefined;\n\n /**\n * A callback to set the target of the popper to the mouse click for context events\n */\n setContextTarget: SetVirtualMouseTarget;\n\n /**\n * Callback to open/close the Popover\n */\n setOpen: (e: OpenPopoverEvents, open: boolean) => void;\n\n size: NonNullable<PopoverProps['size']>;\n\n /**\n * Callback to toggle the open state of the Popover\n */\n toggleOpen: (e: OpenPopoverEvents) => void;\n\n /**\n * Ref of the PopoverTrigger\n */\n triggerRef: React.MutableRefObject<HTMLElement | null>;\n };\n\n/**\n * Data attached to open/close events\n */\nexport type OnOpenChangeData = { open: boolean };\n\n/**\n * The supported events that will trigger open/close of the menu\n */\nexport type OpenPopoverEvents =\n | MouseEvent\n | TouchEvent\n | React.FocusEvent<HTMLElement>\n | React.KeyboardEvent<HTMLElement>\n | React.MouseEvent<HTMLElement>;\n"],"names":["React"],"mappings":"AAAA,YAAYA,WAAW,QAAQ"}
@@ -5,5 +5,4 @@
5
5
  * Unfortunately, Popper requires it to be specified as a variable instead of using CSS.
6
6
  * While we could use getComputedStyle, that adds a performance penalty for something that
7
7
  * will likely never change.
8
- */export const popoverSurfaceBorderRadius = 4;
9
- //# sourceMappingURL=constants.js.map
8
+ */ export const popoverSurfaceBorderRadius = 4;
@@ -1 +1 @@
1
- {"version":3,"names":["popoverSurfaceBorderRadius"],"sources":["../../../src/components/Popover/constants.ts"],"sourcesContent":["/**\n * @internal\n * The default value of the tooltip's border radius (borderRadiusMedium).\n *\n * Unfortunately, Popper requires it to be specified as a variable instead of using CSS.\n * While we could use getComputedStyle, that adds a performance penalty for something that\n * will likely never change.\n */\nexport const popoverSurfaceBorderRadius = 4;\n"],"mappings":"AAAA;;;;;;;GAQA,OAAO,MAAMA,0BAAA,GAA6B"}
1
+ {"version":3,"sources":["constants.ts"],"sourcesContent":["/**\n * @internal\n * The default value of the tooltip's border radius (borderRadiusMedium).\n *\n * Unfortunately, Popper requires it to be specified as a variable instead of using CSS.\n * While we could use getComputedStyle, that adds a performance penalty for something that\n * will likely never change.\n */\nexport const popoverSurfaceBorderRadius = 4;\n"],"names":["popoverSurfaceBorderRadius"],"mappings":"AAAA;;;;;;;CAOC,GACD,OAAO,MAAMA,6BAA6B,EAAE"}
@@ -2,4 +2,3 @@ export * from './Popover';
2
2
  export * from './Popover.types';
3
3
  export * from './renderPopover';
4
4
  export * from './usePopover';
5
- //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../../src/components/Popover/index.ts"],"sourcesContent":["export * from './Popover';\nexport * from './Popover.types';\nexport * from './renderPopover';\nexport * from './usePopover';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './Popover';\nexport * from './Popover.types';\nexport * from './renderPopover';\nexport * from './usePopover';\n"],"names":[],"mappings":"AAAA,cAAc,YAAY;AAC1B,cAAc,kBAAkB;AAChC,cAAc,kBAAkB;AAChC,cAAc,eAAe"}
@@ -2,43 +2,25 @@ import * as React from 'react';
2
2
  import { PopoverContext } from '../../popoverContext';
3
3
  /**
4
4
  * Render the final JSX of Popover
5
- */
6
- export const renderPopover_unstable = state => {
7
- const {
8
- appearance,
9
- arrowRef,
10
- contentRef,
11
- inline,
12
- mountNode,
13
- open,
14
- openOnContext,
15
- openOnHover,
16
- setOpen,
17
- size,
18
- toggleOpen,
19
- trapFocus,
20
- triggerRef,
21
- withArrow,
22
- inertTrapFocus
23
- } = state;
24
- return /*#__PURE__*/React.createElement(PopoverContext.Provider, {
25
- value: {
26
- appearance,
27
- arrowRef,
28
- contentRef,
29
- inline,
30
- mountNode,
31
- open,
32
- openOnContext,
33
- openOnHover,
34
- setOpen,
35
- toggleOpen,
36
- triggerRef,
37
- size,
38
- trapFocus,
39
- inertTrapFocus,
40
- withArrow
41
- }
42
- }, state.popoverTrigger, state.open && state.popoverSurface);
5
+ */ export const renderPopover_unstable = (state)=>{
6
+ const { appearance , arrowRef , contentRef , inline , mountNode , open , openOnContext , openOnHover , setOpen , size , toggleOpen , trapFocus , triggerRef , withArrow , inertTrapFocus } = state;
7
+ return /*#__PURE__*/ React.createElement(PopoverContext.Provider, {
8
+ value: {
9
+ appearance,
10
+ arrowRef,
11
+ contentRef,
12
+ inline,
13
+ mountNode,
14
+ open,
15
+ openOnContext,
16
+ openOnHover,
17
+ setOpen,
18
+ toggleOpen,
19
+ triggerRef,
20
+ size,
21
+ trapFocus,
22
+ inertTrapFocus,
23
+ withArrow
24
+ }
25
+ }, state.popoverTrigger, state.open && state.popoverSurface);
43
26
  };
44
- //# sourceMappingURL=renderPopover.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","PopoverContext","renderPopover_unstable","state","appearance","arrowRef","contentRef","inline","mountNode","open","openOnContext","openOnHover","setOpen","size","toggleOpen","trapFocus","triggerRef","withArrow","inertTrapFocus","createElement","Provider","value","popoverTrigger","popoverSurface"],"sources":["../../../src/components/Popover/renderPopover.tsx"],"sourcesContent":["import * as React from 'react';\nimport { PopoverContext } from '../../popoverContext';\nimport type { PopoverState } from './Popover.types';\n\n/**\n * Render the final JSX of Popover\n */\nexport const renderPopover_unstable = (state: PopoverState) => {\n const {\n appearance,\n arrowRef,\n contentRef,\n inline,\n mountNode,\n open,\n openOnContext,\n openOnHover,\n setOpen,\n size,\n toggleOpen,\n trapFocus,\n triggerRef,\n withArrow,\n inertTrapFocus,\n } = state;\n\n return (\n <PopoverContext.Provider\n value={{\n appearance,\n arrowRef,\n contentRef,\n inline,\n mountNode,\n open,\n openOnContext,\n openOnHover,\n setOpen,\n toggleOpen,\n triggerRef,\n size,\n trapFocus,\n inertTrapFocus,\n withArrow,\n }}\n >\n {state.popoverTrigger}\n {state.open && state.popoverSurface}\n </PopoverContext.Provider>\n );\n};\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,cAAc,QAAQ;AAG/B;;;AAGA,OAAO,MAAMC,sBAAA,GAA0BC,KAAA,IAAwB;EAC7D,MAAM;IACJC,UAAA;IACAC,QAAA;IACAC,UAAA;IACAC,MAAA;IACAC,SAAA;IACAC,IAAA;IACAC,aAAA;IACAC,WAAA;IACAC,OAAA;IACAC,IAAA;IACAC,UAAA;IACAC,SAAA;IACAC,UAAA;IACAC,SAAA;IACAC;EAAc,CACf,GAAGf,KAAA;EAEJ,oBACEH,KAAA,CAAAmB,aAAA,CAAClB,cAAA,CAAemB,QAAQ;IACtBC,KAAA,EAAO;MACLjB,UAAA;MACAC,QAAA;MACAC,UAAA;MACAC,MAAA;MACAC,SAAA;MACAC,IAAA;MACAC,aAAA;MACAC,WAAA;MACAC,OAAA;MACAE,UAAA;MACAE,UAAA;MACAH,IAAA;MACAE,SAAA;MACAG,cAAA;MACAD;IACF;KAECd,KAAA,CAAMmB,cAAc,EACpBnB,KAAA,CAAMM,IAAI,IAAIN,KAAA,CAAMoB,cAAc;AAGzC"}
1
+ {"version":3,"sources":["renderPopover.tsx"],"sourcesContent":["import * as React from 'react';\nimport { PopoverContext } from '../../popoverContext';\nimport type { PopoverState } from './Popover.types';\n\n/**\n * Render the final JSX of Popover\n */\nexport const renderPopover_unstable = (state: PopoverState) => {\n const {\n appearance,\n arrowRef,\n contentRef,\n inline,\n mountNode,\n open,\n openOnContext,\n openOnHover,\n setOpen,\n size,\n toggleOpen,\n trapFocus,\n triggerRef,\n withArrow,\n inertTrapFocus,\n } = state;\n\n return (\n <PopoverContext.Provider\n value={{\n appearance,\n arrowRef,\n contentRef,\n inline,\n mountNode,\n open,\n openOnContext,\n openOnHover,\n setOpen,\n toggleOpen,\n triggerRef,\n size,\n trapFocus,\n inertTrapFocus,\n withArrow,\n }}\n >\n {state.popoverTrigger}\n {state.open && state.popoverSurface}\n </PopoverContext.Provider>\n );\n};\n"],"names":["React","PopoverContext","renderPopover_unstable","state","appearance","arrowRef","contentRef","inline","mountNode","open","openOnContext","openOnHover","setOpen","size","toggleOpen","trapFocus","triggerRef","withArrow","inertTrapFocus","Provider","value","popoverTrigger","popoverSurface"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,cAAc,QAAQ,uBAAuB;AAGtD;;CAEC,GACD,OAAO,MAAMC,yBAAyB,CAACC,QAAwB;IAC7D,MAAM,EACJC,WAAU,EACVC,SAAQ,EACRC,WAAU,EACVC,OAAM,EACNC,UAAS,EACTC,KAAI,EACJC,cAAa,EACbC,YAAW,EACXC,QAAO,EACPC,KAAI,EACJC,WAAU,EACVC,UAAS,EACTC,WAAU,EACVC,UAAS,EACTC,eAAc,EACf,GAAGf;IAEJ,qBACE,oBAACF,eAAekB,QAAQ;QACtBC,OAAO;YACLhB;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAC;YACAE;YACAE;YACAH;YACAE;YACAG;YACAD;QACF;OAECd,MAAMkB,cAAc,EACpBlB,MAAMM,IAAI,IAAIN,MAAMmB,cAAc;AAGzC,EAAE"}