@fluentui/react-popover 9.0.0-nightly.d730088d7f.0 → 9.0.0-rc.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (132) hide show
  1. package/CHANGELOG.json +868 -27
  2. package/CHANGELOG.md +280 -81
  3. package/Spec.md +20 -0
  4. package/dist/{react-popover.d.ts → index.d.ts} +116 -67
  5. package/{lib → dist}/tsdoc-metadata.json +0 -0
  6. package/lib/Popover.js.map +1 -1
  7. package/lib/PopoverSurface.js.map +1 -1
  8. package/lib/PopoverTrigger.js.map +1 -1
  9. package/lib/components/Popover/Popover.js +5 -5
  10. package/lib/components/Popover/Popover.js.map +1 -1
  11. package/lib/components/Popover/Popover.types.js.map +1 -1
  12. package/lib/components/Popover/index.js.map +1 -1
  13. package/lib/components/Popover/renderPopover.js +30 -26
  14. package/lib/components/Popover/renderPopover.js.map +1 -1
  15. package/lib/components/Popover/usePopover.js +116 -54
  16. package/lib/components/Popover/usePopover.js.map +1 -1
  17. package/lib/components/PopoverSurface/PopoverSurface.js +7 -7
  18. package/lib/components/PopoverSurface/PopoverSurface.js.map +1 -1
  19. package/lib/components/PopoverSurface/PopoverSurface.types.js.map +1 -1
  20. package/lib/components/PopoverSurface/index.js.map +1 -1
  21. package/lib/components/PopoverSurface/renderPopoverSurface.js +13 -13
  22. package/lib/components/PopoverSurface/renderPopoverSurface.js.map +1 -1
  23. package/lib/components/PopoverSurface/usePopoverSurface.js +40 -64
  24. package/lib/components/PopoverSurface/usePopoverSurface.js.map +1 -1
  25. package/lib/components/PopoverSurface/usePopoverSurfaceStyles.js +41 -22
  26. package/lib/components/PopoverSurface/usePopoverSurfaceStyles.js.map +1 -1
  27. package/lib/components/PopoverTrigger/PopoverTrigger.js +6 -5
  28. package/lib/components/PopoverTrigger/PopoverTrigger.js.map +1 -1
  29. package/lib/components/PopoverTrigger/PopoverTrigger.types.js.map +1 -1
  30. package/lib/components/PopoverTrigger/index.js.map +1 -1
  31. package/lib/components/PopoverTrigger/renderPopoverTrigger.js +1 -1
  32. package/lib/components/PopoverTrigger/renderPopoverTrigger.js.map +1 -1
  33. package/lib/components/PopoverTrigger/usePopoverTrigger.js +40 -55
  34. package/lib/components/PopoverTrigger/usePopoverTrigger.js.map +1 -1
  35. package/lib/index.js +5 -4
  36. package/lib/index.js.map +1 -1
  37. package/lib/popoverContext.js +6 -9
  38. package/lib/popoverContext.js.map +1 -1
  39. package/lib-commonjs/Popover.js +1 -1
  40. package/lib-commonjs/Popover.js.map +1 -1
  41. package/lib-commonjs/PopoverSurface.js +1 -1
  42. package/lib-commonjs/PopoverSurface.js.map +1 -1
  43. package/lib-commonjs/PopoverTrigger.js +1 -1
  44. package/lib-commonjs/PopoverTrigger.js.map +1 -1
  45. package/lib-commonjs/components/Popover/Popover.js +5 -5
  46. package/lib-commonjs/components/Popover/Popover.js.map +1 -1
  47. package/lib-commonjs/components/Popover/Popover.types.js.map +1 -1
  48. package/lib-commonjs/components/Popover/index.js +1 -1
  49. package/lib-commonjs/components/Popover/index.js.map +1 -1
  50. package/lib-commonjs/components/Popover/renderPopover.js +34 -30
  51. package/lib-commonjs/components/Popover/renderPopover.js.map +1 -1
  52. package/lib-commonjs/components/Popover/usePopover.js +121 -59
  53. package/lib-commonjs/components/Popover/usePopover.js.map +1 -1
  54. package/lib-commonjs/components/PopoverSurface/PopoverSurface.js +8 -8
  55. package/lib-commonjs/components/PopoverSurface/PopoverSurface.js.map +1 -1
  56. package/lib-commonjs/components/PopoverSurface/PopoverSurface.types.js.map +1 -1
  57. package/lib-commonjs/components/PopoverSurface/index.js +1 -1
  58. package/lib-commonjs/components/PopoverSurface/index.js.map +1 -1
  59. package/lib-commonjs/components/PopoverSurface/renderPopoverSurface.js +18 -20
  60. package/lib-commonjs/components/PopoverSurface/renderPopoverSurface.js.map +1 -1
  61. package/lib-commonjs/components/PopoverSurface/usePopoverSurface.js +44 -70
  62. package/lib-commonjs/components/PopoverSurface/usePopoverSurface.js.map +1 -1
  63. package/lib-commonjs/components/PopoverSurface/usePopoverSurfaceStyles.js +45 -24
  64. package/lib-commonjs/components/PopoverSurface/usePopoverSurfaceStyles.js.map +1 -1
  65. package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.js +6 -5
  66. package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.js.map +1 -1
  67. package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.types.js.map +1 -1
  68. package/lib-commonjs/components/PopoverTrigger/index.js +1 -1
  69. package/lib-commonjs/components/PopoverTrigger/index.js.map +1 -1
  70. package/lib-commonjs/components/PopoverTrigger/renderPopoverTrigger.js +3 -3
  71. package/lib-commonjs/components/PopoverTrigger/renderPopoverTrigger.js.map +1 -1
  72. package/lib-commonjs/components/PopoverTrigger/usePopoverTrigger.js +45 -61
  73. package/lib-commonjs/components/PopoverTrigger/usePopoverTrigger.js.map +1 -1
  74. package/lib-commonjs/index.js +99 -5
  75. package/lib-commonjs/index.js.map +1 -1
  76. package/lib-commonjs/popoverContext.js +8 -11
  77. package/lib-commonjs/popoverContext.js.map +1 -1
  78. package/package.json +23 -27
  79. package/lib/Popover.d.ts +0 -1
  80. package/lib/PopoverSurface.d.ts +0 -1
  81. package/lib/PopoverTrigger.d.ts +0 -1
  82. package/lib/common/isConformant.d.ts +0 -4
  83. package/lib/common/isConformant.js +0 -13
  84. package/lib/common/isConformant.js.map +0 -1
  85. package/lib/common/mockUsePopoverContext.d.ts +0 -7
  86. package/lib/common/mockUsePopoverContext.js +0 -38
  87. package/lib/common/mockUsePopoverContext.js.map +0 -1
  88. package/lib/components/Popover/Popover.d.ts +0 -6
  89. package/lib/components/Popover/Popover.types.d.ts +0 -100
  90. package/lib/components/Popover/index.d.ts +0 -4
  91. package/lib/components/Popover/renderPopover.d.ts +0 -5
  92. package/lib/components/Popover/usePopover.d.ts +0 -10
  93. package/lib/components/PopoverSurface/PopoverSurface.d.ts +0 -6
  94. package/lib/components/PopoverSurface/PopoverSurface.types.d.ts +0 -21
  95. package/lib/components/PopoverSurface/index.d.ts +0 -5
  96. package/lib/components/PopoverSurface/renderPopoverSurface.d.ts +0 -5
  97. package/lib/components/PopoverSurface/usePopoverSurface.d.ts +0 -13
  98. package/lib/components/PopoverSurface/usePopoverSurfaceStyles.d.ts +0 -7
  99. package/lib/components/PopoverTrigger/PopoverTrigger.d.ts +0 -6
  100. package/lib/components/PopoverTrigger/PopoverTrigger.types.d.ts +0 -11
  101. package/lib/components/PopoverTrigger/index.d.ts +0 -4
  102. package/lib/components/PopoverTrigger/renderPopoverTrigger.d.ts +0 -5
  103. package/lib/components/PopoverTrigger/usePopoverTrigger.d.ts +0 -10
  104. package/lib/index.d.ts +0 -4
  105. package/lib/popoverContext.d.ts +0 -8
  106. package/lib-commonjs/Popover.d.ts +0 -1
  107. package/lib-commonjs/PopoverSurface.d.ts +0 -1
  108. package/lib-commonjs/PopoverTrigger.d.ts +0 -1
  109. package/lib-commonjs/common/isConformant.d.ts +0 -4
  110. package/lib-commonjs/common/isConformant.js +0 -24
  111. package/lib-commonjs/common/isConformant.js.map +0 -1
  112. package/lib-commonjs/common/mockUsePopoverContext.d.ts +0 -7
  113. package/lib-commonjs/common/mockUsePopoverContext.js +0 -49
  114. package/lib-commonjs/common/mockUsePopoverContext.js.map +0 -1
  115. package/lib-commonjs/components/Popover/Popover.d.ts +0 -6
  116. package/lib-commonjs/components/Popover/Popover.types.d.ts +0 -100
  117. package/lib-commonjs/components/Popover/index.d.ts +0 -4
  118. package/lib-commonjs/components/Popover/renderPopover.d.ts +0 -5
  119. package/lib-commonjs/components/Popover/usePopover.d.ts +0 -10
  120. package/lib-commonjs/components/PopoverSurface/PopoverSurface.d.ts +0 -6
  121. package/lib-commonjs/components/PopoverSurface/PopoverSurface.types.d.ts +0 -21
  122. package/lib-commonjs/components/PopoverSurface/index.d.ts +0 -5
  123. package/lib-commonjs/components/PopoverSurface/renderPopoverSurface.d.ts +0 -5
  124. package/lib-commonjs/components/PopoverSurface/usePopoverSurface.d.ts +0 -13
  125. package/lib-commonjs/components/PopoverSurface/usePopoverSurfaceStyles.d.ts +0 -7
  126. package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.d.ts +0 -6
  127. package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.types.d.ts +0 -11
  128. package/lib-commonjs/components/PopoverTrigger/index.d.ts +0 -4
  129. package/lib-commonjs/components/PopoverTrigger/renderPopoverTrigger.d.ts +0 -5
  130. package/lib-commonjs/components/PopoverTrigger/usePopoverTrigger.d.ts +0 -10
  131. package/lib-commonjs/index.d.ts +0 -4
  132. package/lib-commonjs/popoverContext.d.ts +0 -8
@@ -1,4 +0,0 @@
1
- export * from './Popover';
2
- export * from './Popover.types';
3
- export * from './renderPopover';
4
- export * from './usePopover';
@@ -1,5 +0,0 @@
1
- import type { PopoverState } from './Popover.types';
2
- /**
3
- * Render the final JSX of Popover
4
- */
5
- export declare const renderPopover: (state: PopoverState) => JSX.Element;
@@ -1,10 +0,0 @@
1
- import type { PopoverProps, PopoverState } from './Popover.types';
2
- /**
3
- * Create the state required to render Popover.
4
- *
5
- * The returned state can be modified with hooks such as usePopoverStyles,
6
- * before being passed to renderPopover.
7
- *
8
- * @param props - props from this instance of Popover
9
- */
10
- export declare const usePopover: (props: PopoverProps) => PopoverState;
@@ -1,6 +0,0 @@
1
- import type { PopoverSurfaceProps } from './PopoverSurface.types';
2
- import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
- /**
4
- * PopoverSurface component renders react children in a positioned box
5
- */
6
- export declare const PopoverSurface: ForwardRefComponent<PopoverSurfaceProps>;
@@ -1,21 +0,0 @@
1
- import type { ComponentProps, ComponentState, IntrinsicShorthandProps } from '@fluentui/react-utilities';
2
- import type { PopoverContextValue } from '../../popoverContext';
3
- /**
4
- * PopoverSurface Props
5
- */
6
- export declare type PopoverSurfaceProps = ComponentProps<PopoverSurfaceSlots>;
7
- /**
8
- * Names of the slots in PopoverSurfaceProps
9
- */
10
- export declare type PopoverSurfaceSlots = {
11
- root: IntrinsicShorthandProps<'div'>;
12
- };
13
- /**
14
- * PopoverSurface State
15
- */
16
- export declare type PopoverSurfaceState = ComponentState<PopoverSurfaceSlots> & Pick<PopoverContextValue, 'open' | 'mountNode' | 'noArrow' | 'size' | 'appearance' | 'arrowRef'> & {
17
- /**
18
- * CSS class for the arrow element
19
- */
20
- arrowClassName?: string;
21
- };
@@ -1,5 +0,0 @@
1
- export * from './PopoverSurface';
2
- export * from './PopoverSurface.types';
3
- export * from './renderPopoverSurface';
4
- export * from './usePopoverSurface';
5
- export * from './usePopoverSurfaceStyles';
@@ -1,5 +0,0 @@
1
- import type { PopoverSurfaceState } from './PopoverSurface.types';
2
- /**
3
- * Render the final JSX of PopoverSurface
4
- */
5
- export declare const renderPopoverSurface: (state: PopoverSurfaceState) => JSX.Element | null;
@@ -1,13 +0,0 @@
1
- import * as React from 'react';
2
- import type { PopoverSurfaceProps, PopoverSurfaceSlots, PopoverSurfaceState } from './PopoverSurface.types';
3
- export declare const popoverSurfaceSlots: Array<keyof PopoverSurfaceSlots>;
4
- /**
5
- * Create the state required to render PopoverSurface.
6
- *
7
- * The returned state can be modified with hooks such as usePopoverSurfaceStyles,
8
- * before being passed to renderPopoverSurface.
9
- *
10
- * @param props - props from this instance of PopoverSurface
11
- * @param ref - reference to root HTMLDivElement of PopoverSurface
12
- */
13
- export declare const usePopoverSurface: (props: PopoverSurfaceProps, ref: React.Ref<HTMLDivElement>) => PopoverSurfaceState;
@@ -1,7 +0,0 @@
1
- import type { PopoverSize } from '../Popover/Popover.types';
2
- import type { PopoverSurfaceState } from './PopoverSurface.types';
3
- export declare const arrowHeights: Record<PopoverSize, number>;
4
- /**
5
- * Apply styling to the PopoverSurface slots based on the state
6
- */
7
- export declare const usePopoverSurfaceStyles: (state: PopoverSurfaceState) => PopoverSurfaceState;
@@ -1,6 +0,0 @@
1
- import * as React from 'react';
2
- import type { PopoverTriggerProps } from './PopoverTrigger.types';
3
- /**
4
- * Wraps a trigger element as an only child and adds the necessary event handling to open a popover.
5
- */
6
- export declare const PopoverTrigger: React.FC<PopoverTriggerProps>;
@@ -1,11 +0,0 @@
1
- import * as React from 'react';
2
- /**
3
- * PopoverTrigger Props
4
- */
5
- export declare type PopoverTriggerProps = {
6
- children: React.ReactElement;
7
- };
8
- /**
9
- * PopoverTrigger State
10
- */
11
- export declare type PopoverTriggerState = PopoverTriggerProps;
@@ -1,4 +0,0 @@
1
- export * from './PopoverTrigger';
2
- export * from './PopoverTrigger.types';
3
- export * from './renderPopoverTrigger';
4
- export * from './usePopoverTrigger';
@@ -1,5 +0,0 @@
1
- import type { PopoverTriggerState } from './PopoverTrigger.types';
2
- /**
3
- * Render the final JSX of PopoverTrigger
4
- */
5
- export declare const renderPopoverTrigger: (state: PopoverTriggerState) => JSX.Element;
@@ -1,10 +0,0 @@
1
- import type { PopoverTriggerProps, PopoverTriggerState } from './PopoverTrigger.types';
2
- /**
3
- * Create the state required to render PopoverTrigger.
4
- *
5
- * The returned state can be modified with hooks such as usePopoverTriggerStyles,
6
- * before being passed to renderPopoverTrigger.
7
- *
8
- * @param props - props from this instance of PopoverTrigger
9
- */
10
- export declare const usePopoverTrigger: (props: PopoverTriggerProps) => PopoverTriggerState;
@@ -1,4 +0,0 @@
1
- export * from './Popover';
2
- export * from './PopoverSurface';
3
- export * from './popoverContext';
4
- export * from './PopoverTrigger';
@@ -1,8 +0,0 @@
1
- import type { ContextSelector, Context } from '@fluentui/react-context-selector';
2
- import type { PopoverState } from './components/Popover/index';
3
- export declare const PopoverContext: Context<PopoverContextValue>;
4
- /**
5
- * Context shared between Popover and its children components
6
- */
7
- export declare type PopoverContextValue = Pick<PopoverState, 'open' | 'setOpen' | 'triggerRef' | 'contentRef' | 'openOnHover' | 'openOnContext' | 'mountNode' | 'noArrow' | 'arrowRef' | 'size' | 'appearance' | 'trapFocus'>;
8
- export declare const usePopoverContext: <T>(selector: ContextSelector<Pick<PopoverState, "mountNode" | "open" | "setOpen" | "triggerRef" | "contentRef" | "openOnHover" | "openOnContext" | "noArrow" | "arrowRef" | "size" | "appearance" | "trapFocus">, T>) => T;