@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
@@ -10,71 +10,63 @@ import { usePopoverContext_unstable } from '../../popoverContext';
10
10
  *
11
11
  * @param props - props from this instance of PopoverSurface
12
12
  * @param ref - reference to root HTMLDivElement of PopoverSurface
13
- */
14
- export const usePopoverSurface_unstable = (props, ref) => {
15
- const contentRef = usePopoverContext_unstable(context => context.contentRef);
16
- const openOnHover = usePopoverContext_unstable(context => context.openOnHover);
17
- const setOpen = usePopoverContext_unstable(context => context.setOpen);
18
- const mountNode = usePopoverContext_unstable(context => context.mountNode);
19
- const arrowRef = usePopoverContext_unstable(context => context.arrowRef);
20
- const size = usePopoverContext_unstable(context => context.size);
21
- const withArrow = usePopoverContext_unstable(context => context.withArrow);
22
- const appearance = usePopoverContext_unstable(context => context.appearance);
23
- const trapFocus = usePopoverContext_unstable(context => context.trapFocus);
24
- const inertTrapFocus = usePopoverContext_unstable(context => context.inertTrapFocus);
25
- const inline = usePopoverContext_unstable(context => context.inline);
26
- const {
27
- modalAttributes
28
- } = useModalAttributes({
29
- trapFocus,
30
- legacyTrapFocus: !inertTrapFocus,
31
- alwaysFocusable: !trapFocus
32
- });
33
- const state = {
34
- inline,
35
- appearance,
36
- withArrow,
37
- size,
38
- arrowRef,
39
- mountNode,
40
- components: {
41
- root: 'div'
42
- },
43
- root: getNativeElementProps('div', {
44
- ref: useMergedRefs(ref, contentRef),
45
- role: trapFocus ? 'dialog' : 'group',
46
- 'aria-modal': trapFocus ? true : undefined,
47
- ...modalAttributes,
48
- ...props
49
- })
50
- };
51
- const {
52
- onMouseEnter: onMouseEnterOriginal,
53
- onMouseLeave: onMouseLeaveOriginal,
54
- onKeyDown: onKeyDownOriginal
55
- } = state.root;
56
- state.root.onMouseEnter = e => {
57
- if (openOnHover) {
58
- setOpen(e, true);
59
- }
60
- onMouseEnterOriginal === null || onMouseEnterOriginal === void 0 ? void 0 : onMouseEnterOriginal(e);
61
- };
62
- state.root.onMouseLeave = e => {
63
- if (openOnHover) {
64
- setOpen(e, false);
65
- }
66
- onMouseLeaveOriginal === null || onMouseLeaveOriginal === void 0 ? void 0 : onMouseLeaveOriginal(e);
67
- };
68
- state.root.onKeyDown = e => {
69
- var _contentRef_current;
70
- // only close if the event happened inside the current popover
71
- // If using a stack of inline popovers, the user should call `stopPropagation` to avoid dismissing the entire stack
72
- if (e.key === 'Escape' && ((_contentRef_current = contentRef.current) === null || _contentRef_current === void 0 ? void 0 : _contentRef_current.contains(e.target))) {
73
- e.preventDefault();
74
- setOpen(e, false);
75
- }
76
- onKeyDownOriginal === null || onKeyDownOriginal === void 0 ? void 0 : onKeyDownOriginal(e);
77
- };
78
- return state;
13
+ */ export const usePopoverSurface_unstable = (props, ref)=>{
14
+ const contentRef = usePopoverContext_unstable((context)=>context.contentRef);
15
+ const openOnHover = usePopoverContext_unstable((context)=>context.openOnHover);
16
+ const setOpen = usePopoverContext_unstable((context)=>context.setOpen);
17
+ const mountNode = usePopoverContext_unstable((context)=>context.mountNode);
18
+ const arrowRef = usePopoverContext_unstable((context)=>context.arrowRef);
19
+ const size = usePopoverContext_unstable((context)=>context.size);
20
+ const withArrow = usePopoverContext_unstable((context)=>context.withArrow);
21
+ const appearance = usePopoverContext_unstable((context)=>context.appearance);
22
+ const trapFocus = usePopoverContext_unstable((context)=>context.trapFocus);
23
+ const inertTrapFocus = usePopoverContext_unstable((context)=>context.inertTrapFocus);
24
+ const inline = usePopoverContext_unstable((context)=>context.inline);
25
+ const { modalAttributes } = useModalAttributes({
26
+ trapFocus,
27
+ legacyTrapFocus: !inertTrapFocus,
28
+ alwaysFocusable: !trapFocus
29
+ });
30
+ const state = {
31
+ inline,
32
+ appearance,
33
+ withArrow,
34
+ size,
35
+ arrowRef,
36
+ mountNode,
37
+ components: {
38
+ root: 'div'
39
+ },
40
+ root: getNativeElementProps('div', {
41
+ ref: useMergedRefs(ref, contentRef),
42
+ role: trapFocus ? 'dialog' : 'group',
43
+ 'aria-modal': trapFocus ? true : undefined,
44
+ ...modalAttributes,
45
+ ...props
46
+ })
47
+ };
48
+ const { onMouseEnter: onMouseEnterOriginal , onMouseLeave: onMouseLeaveOriginal , onKeyDown: onKeyDownOriginal } = state.root;
49
+ state.root.onMouseEnter = (e)=>{
50
+ if (openOnHover) {
51
+ setOpen(e, true);
52
+ }
53
+ onMouseEnterOriginal === null || onMouseEnterOriginal === void 0 ? void 0 : onMouseEnterOriginal(e);
54
+ };
55
+ state.root.onMouseLeave = (e)=>{
56
+ if (openOnHover) {
57
+ setOpen(e, false);
58
+ }
59
+ onMouseLeaveOriginal === null || onMouseLeaveOriginal === void 0 ? void 0 : onMouseLeaveOriginal(e);
60
+ };
61
+ state.root.onKeyDown = (e)=>{
62
+ var _contentRef_current;
63
+ // only close if the event happened inside the current popover
64
+ // If using a stack of inline popovers, the user should call `stopPropagation` to avoid dismissing the entire stack
65
+ if (e.key === 'Escape' && ((_contentRef_current = contentRef.current) === null || _contentRef_current === void 0 ? void 0 : _contentRef_current.contains(e.target))) {
66
+ e.preventDefault();
67
+ setOpen(e, false);
68
+ }
69
+ onKeyDownOriginal === null || onKeyDownOriginal === void 0 ? void 0 : onKeyDownOriginal(e);
70
+ };
71
+ return state;
79
72
  };
80
- //# sourceMappingURL=usePopoverSurface.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","getNativeElementProps","useMergedRefs","useModalAttributes","usePopoverContext_unstable","usePopoverSurface_unstable","props","ref","contentRef","context","openOnHover","setOpen","mountNode","arrowRef","size","withArrow","appearance","trapFocus","inertTrapFocus","inline","modalAttributes","legacyTrapFocus","alwaysFocusable","state","components","root","role","undefined","onMouseEnter","onMouseEnterOriginal","onMouseLeave","onMouseLeaveOriginal","onKeyDown","onKeyDownOriginal","e","_contentRef_current","key","current","contains","target","preventDefault"],"sources":["../../../src/components/PopoverSurface/usePopoverSurface.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, useMergedRefs } from '@fluentui/react-utilities';\nimport { useModalAttributes } from '@fluentui/react-tabster';\nimport { usePopoverContext_unstable } from '../../popoverContext';\nimport type { PopoverSurfaceProps, PopoverSurfaceState } from './PopoverSurface.types';\n\n/**\n * Create the state required to render PopoverSurface.\n *\n * The returned state can be modified with hooks such as usePopoverSurfaceStyles_unstable,\n * before being passed to renderPopoverSurface_unstable.\n *\n * @param props - props from this instance of PopoverSurface\n * @param ref - reference to root HTMLDivElement of PopoverSurface\n */\nexport const usePopoverSurface_unstable = (\n props: PopoverSurfaceProps,\n ref: React.Ref<HTMLDivElement>,\n): PopoverSurfaceState => {\n const contentRef = usePopoverContext_unstable(context => context.contentRef);\n const openOnHover = usePopoverContext_unstable(context => context.openOnHover);\n const setOpen = usePopoverContext_unstable(context => context.setOpen);\n const mountNode = usePopoverContext_unstable(context => context.mountNode);\n const arrowRef = usePopoverContext_unstable(context => context.arrowRef);\n const size = usePopoverContext_unstable(context => context.size);\n const withArrow = usePopoverContext_unstable(context => context.withArrow);\n const appearance = usePopoverContext_unstable(context => context.appearance);\n const trapFocus = usePopoverContext_unstable(context => context.trapFocus);\n const inertTrapFocus = usePopoverContext_unstable(context => context.inertTrapFocus);\n const inline = usePopoverContext_unstable(context => context.inline);\n const { modalAttributes } = useModalAttributes({\n trapFocus,\n legacyTrapFocus: !inertTrapFocus,\n alwaysFocusable: !trapFocus,\n });\n\n const state: PopoverSurfaceState = {\n inline,\n appearance,\n withArrow,\n size,\n arrowRef,\n mountNode,\n components: {\n root: 'div',\n },\n root: getNativeElementProps('div', {\n ref: useMergedRefs(ref, contentRef),\n role: trapFocus ? 'dialog' : 'group',\n 'aria-modal': trapFocus ? true : undefined,\n ...modalAttributes,\n ...props,\n }),\n };\n\n const {\n onMouseEnter: onMouseEnterOriginal,\n onMouseLeave: onMouseLeaveOriginal,\n onKeyDown: onKeyDownOriginal,\n } = state.root;\n state.root.onMouseEnter = (e: React.MouseEvent<HTMLDivElement>) => {\n if (openOnHover) {\n setOpen(e, true);\n }\n\n onMouseEnterOriginal?.(e);\n };\n\n state.root.onMouseLeave = (e: React.MouseEvent<HTMLDivElement>) => {\n if (openOnHover) {\n setOpen(e, false);\n }\n\n onMouseLeaveOriginal?.(e);\n };\n\n state.root.onKeyDown = (e: React.KeyboardEvent<HTMLDivElement>) => {\n // only close if the event happened inside the current popover\n // If using a stack of inline popovers, the user should call `stopPropagation` to avoid dismissing the entire stack\n if (e.key === 'Escape'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AAG,KAAK;IAClB;IAEAD,iBAAA,aAAAA,iBAAA,uBAAAA,iBAAA,CAAoBC,CAAA;EACtB;EAEA,OAAOX,KAAA;AACT"}
1
+ {"version":3,"sources":["usePopoverSurface.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, useMergedRefs } from '@fluentui/react-utilities';\nimport { useModalAttributes } from '@fluentui/react-tabster';\nimport { usePopoverContext_unstable } from '../../popoverContext';\nimport type { PopoverSurfaceProps, PopoverSurfaceState } from './PopoverSurface.types';\n\n/**\n * Create the state required to render PopoverSurface.\n *\n * The returned state can be modified with hooks such as usePopoverSurfaceStyles_unstable,\n * before being passed to renderPopoverSurface_unstable.\n *\n * @param props - props from this instance of PopoverSurface\n * @param ref - reference to root HTMLDivElement of PopoverSurface\n */\nexport const usePopoverSurface_unstable = (\n props: PopoverSurfaceProps,\n ref: React.Ref<HTMLDivElement>,\n): PopoverSurfaceState => {\n const contentRef = usePopoverContext_unstable(context => context.contentRef);\n const openOnHover = usePopoverContext_unstable(context => context.openOnHover);\n const setOpen = usePopoverContext_unstable(context => context.setOpen);\n const mountNode = usePopoverContext_unstable(context => context.mountNode);\n const arrowRef = usePopoverContext_unstable(context => context.arrowRef);\n const size = usePopoverContext_unstable(context => context.size);\n const withArrow = usePopoverContext_unstable(context => context.withArrow);\n const appearance = usePopoverContext_unstable(context => context.appearance);\n const trapFocus = usePopoverContext_unstable(context => context.trapFocus);\n const inertTrapFocus = usePopoverContext_unstable(context => context.inertTrapFocus);\n const inline = usePopoverContext_unstable(context => context.inline);\n const { modalAttributes } = useModalAttributes({\n trapFocus,\n legacyTrapFocus: !inertTrapFocus,\n alwaysFocusable: !trapFocus,\n });\n\n const state: PopoverSurfaceState = {\n inline,\n appearance,\n withArrow,\n size,\n arrowRef,\n mountNode,\n components: {\n root: 'div',\n },\n root: getNativeElementProps('div', {\n ref: useMergedRefs(ref, contentRef),\n role: trapFocus ? 'dialog' : 'group',\n 'aria-modal': trapFocus ? true : undefined,\n ...modalAttributes,\n ...props,\n }),\n };\n\n const {\n onMouseEnter: onMouseEnterOriginal,\n onMouseLeave: onMouseLeaveOriginal,\n onKeyDown: onKeyDownOriginal,\n } = state.root;\n state.root.onMouseEnter = (e: React.MouseEvent<HTMLDivElement>) => {\n if (openOnHover) {\n setOpen(e, true);\n }\n\n onMouseEnterOriginal?.(e);\n };\n\n state.root.onMouseLeave = (e: React.MouseEvent<HTMLDivElement>) => {\n if (openOnHover) {\n setOpen(e, false);\n }\n\n onMouseLeaveOriginal?.(e);\n };\n\n state.root.onKeyDown = (e: React.KeyboardEvent<HTMLDivElement>) => {\n // only close if the event happened inside the current popover\n // If using a stack of inline popovers, the user should call `stopPropagation` to avoid dismissing the entire stack\n if (e.key === 'Escape' && contentRef.current?.contains(e.target as HTMLDivElement)) {\n e.preventDefault();\n setOpen(e, false);\n }\n\n onKeyDownOriginal?.(e);\n };\n\n return state;\n};\n"],"names":["React","getNativeElementProps","useMergedRefs","useModalAttributes","usePopoverContext_unstable","usePopoverSurface_unstable","props","ref","contentRef","context","openOnHover","setOpen","mountNode","arrowRef","size","withArrow","appearance","trapFocus","inertTrapFocus","inline","modalAttributes","legacyTrapFocus","alwaysFocusable","state","components","root","role","undefined","onMouseEnter","onMouseEnterOriginal","onMouseLeave","onMouseLeaveOriginal","onKeyDown","onKeyDownOriginal","e","key","current","contains","target","preventDefault"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,EAAEC,aAAa,QAAQ,4BAA4B;AACjF,SAASC,kBAAkB,QAAQ,0BAA0B;AAC7D,SAASC,0BAA0B,QAAQ,uBAAuB;AAGlE;;;;;;;;CAQC,GACD,OAAO,MAAMC,6BAA6B,CACxCC,OACAC,MACwB;IACxB,MAAMC,aAAaJ,2BAA2BK,CAAAA,UAAWA,QAAQD,UAAU;IAC3E,MAAME,cAAcN,2BAA2BK,CAAAA,UAAWA,QAAQC,WAAW;IAC7E,MAAMC,UAAUP,2BAA2BK,CAAAA,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AClB,CAAC;QAEDH,iCAAAA,kCAAAA,KAAAA,IAAAA,qBAAuBG;IACzB;IAEAX,MAAME,IAAI,CAACO,SAAS,GAAG,CAACE,IAA2C;YAGvC1B;QAF1B,8DAA8D;QAC9D,mHAAmH;QACnH,IAAI0B,EAAEC,GAAG,KAAK,aAAY3B,CAAAA,sBAAAA,WAAW4B,OAAO,cAAlB5B,iCAAAA,KAAAA,IAAAA,oBAAoB6B,SAASH,EAAEI,MAAM,IAAqB;YAClFJ,EAAEK,cAAc;YAChB5B,QAAQuB,GAAG,KAAK;QAClB,CAAC;QAEDD,8BAAAA,+BAAAA,KAAAA,IAAAA,kBAAoBC;IACtB;IAEA,OAAOX;AACT,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"names":["shorthands","__styles","mergeClasses","createArrowHeightStyles","createArrowStyles","tokens","typographyStyles","popoverSurfaceClassNames","root","arrowHeights","small","medium","large","useStyles","sj55zd","De3pzq","E5pizo","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","B4j52fo","Bekrc4i","Bn0qgzm","ibv6hh","icvyot","vrafjx","oivjwe","wvpqe5","g2u3we","h3c5rm","B9xav0g","zhjwy3","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","inverted","brand","smallPadding","z8tnut","z189sj","Byoj8tv","uwmqm3","mediumPadding","largePadding","smallArrow","a9b677","Bqenvij","mediumLargeArrow","arrow","qhf8xq","Bcdw1i0","Bj3rh1h","Ftih45","B1puzpu","Brfgrao","Bcvre1j","Ccq8qp","Baz25je","cmx5o7","B4f6apu","m598lv","Bk5zm6e","y0oebl","qa3bma","Bqjgrrk","Budzafs","Hv9wc6","hl6cv3","Bh2vraf","yayu3t","wedwtw","rhl9o9","Bu8t5uz","B6q6orb","Bwwlvwl","d","usePopoverSurfaceStyles_unstable","state","styles","className","size","appearance","arrowClassName"],"sources":["../../../src/components/PopoverSurface/usePopoverSurfaceStyles.styles.ts"],"sourcesContent":["import { shorthands, makeStyles, mergeClasses } from '@griffel/react';\nimport { createArrowHeightStyles, createArrowStyles } from '@fluentui/react-positioning';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport type { PopoverSize } from '../Popover/Popover.types';\nimport type { PopoverSurfaceSlots, PopoverSurfaceState } from './PopoverSurface.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const popoverSurfaceClassNames: SlotClassNames<PopoverSurfaceSlots> = {\n root: 'fui-PopoverSurface',\n};\n\nexport const arrowHeights: Record<PopoverSize, number> = {\n small: 6,\n medium: 8,\n large: 8,\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n color: tokens.colorNeutralForeground1,\n backgroundColor: tokens.colorNeutralBackground1,\n boxShadow: tokens.shadow16,\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n ...shorthands.border('1px', 'solid', tokens.colorTransparentStroke),\n ...typographyStyles.body1,\n },\n\n inverted: {\n backgroundColor: tokens.colorNeutralBackgroundStatic,\n color: tokens.colorNeutralForegroundStaticInverted,\n },\n\n brand: {\n backgroundColor: tokens.colorBrandBackground,\n color: tokens.colorNeutralForegroundOnBrand,\n },\n\n smallPadding: {\n ...shorthands.padding('12px'),\n },\n\n mediumPadding: {\n ...shorthands.padding('16px'),\n },\n\n largePadding: {\n ...shorthands.padding('20px'),\n },\n\n smallArrow: createArrowHeightStyles(arrowHeights.small),\n mediumLargeArrow: createArrowHeightStyles(arrowHeights.medium),\n arrow: createArrowStyles({ arrowHeight: undefined }),\n});\n\n/**\n * Apply styling to the PopoverSurface slots based on the state\n */\nexport const usePopoverSurfaceStyles_unstable = (state: PopoverSurfaceState): PopoverSurfaceState => {\n const styles = useStyles();\n state.root.className = mergeClasses(\n popoverSurfaceClassNames.root,\n styles.root,\n state.size === 'small' && styles.smallPadding,\n state.size === 'medium' && styles.mediumPadding,\n state.size === 'large' && styles.largePadding,\n state.appearance === 'inverted' && styles.inverted,\n state.appearance === 'brand' && styles.brand,\n state.root.className,\n );\n\n state.arrowClassName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A;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,EAmClB;AAEA;;;AAGA,OAAO,MAAMC,gCAAA,GAAoCC,KAAA,IAAoD;EACnG,MAAMC,MAAA,GAASnE,SAAA;EACfkE,KAAA,CAAMvE,IAAI,CAACyE,SAAS,GAAG/E,YAAA,CACrBK,wBAAA,CAAyBC,IAAI,EAC7BwE,MAAA,CAAOxE,IAAI,EACXuE,KAAA,CAAMG,IAAI,KAAK,WAAWF,MAAA,CAAOzC,YAAY,EAC7CwC,KAAA,CAAMG,IAAI,KAAK,YAAYF,MAAA,CAAOpC,aAAa,EAC/CmC,KAAA,CAAMG,IAAI,KAAK,WAAWF,MAAA,CAAOnC,YAAY,EAC7CkC,KAAA,CAAMI,UAAU,KAAK,cAAcH,MAAA,CAAO3C,QAAQ,EAClD0C,KAAA,CAAMI,UAAU,KAAK,WAAWH,MAAA,CAAO1C,KAAK,EAC5CyC,KAAA,CAAMvE,IAAI,CAACyE,SAAS;EAGtBF,KAAA,CAAMK,cAAc,GAAGlF,YAAA,CACrB8E,MAAA,CAAO9B,KAAK,EACZ6B,KAAA,CAAMG,IAAI,KAAK,UAAUF,MAAA,CAAOlC,UAAU,GAAGkC,MAAA,CAAO/B,gBAAgB;EAGtE,OAAO8B,KAAA;AACT"}
1
+ {"version":3,"names":["shorthands","__styles","mergeClasses","createArrowHeightStyles","createArrowStyles","tokens","typographyStyles","popoverSurfaceClassNames","root","arrowHeights","small","medium","large","useStyles","sj55zd","De3pzq","E5pizo","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","B4j52fo","Bekrc4i","Bn0qgzm","ibv6hh","icvyot","vrafjx","oivjwe","wvpqe5","g2u3we","h3c5rm","B9xav0g","zhjwy3","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","inverted","brand","smallPadding","z8tnut","z189sj","Byoj8tv","uwmqm3","mediumPadding","largePadding","smallArrow","a9b677","Bqenvij","mediumLargeArrow","arrow","qhf8xq","Bcdw1i0","Bj3rh1h","Ftih45","B1puzpu","Brfgrao","Bcvre1j","Ccq8qp","Baz25je","cmx5o7","B4f6apu","m598lv","Bk5zm6e","y0oebl","qa3bma","Bqjgrrk","Budzafs","Hv9wc6","hl6cv3","Bh2vraf","yayu3t","wedwtw","rhl9o9","Bu8t5uz","B6q6orb","Bwwlvwl","d","usePopoverSurfaceStyles_unstable","state","styles","className","size","appearance","arrowClassName"],"sources":["usePopoverSurfaceStyles.styles.js"],"sourcesContent":["import { shorthands, makeStyles, mergeClasses } from '@griffel/react';\nimport { createArrowHeightStyles, createArrowStyles } from '@fluentui/react-positioning';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nexport const popoverSurfaceClassNames = {\n root: 'fui-PopoverSurface'\n};\nexport const arrowHeights = {\n small: 6,\n medium: 8,\n large: 8\n};\n/**\n * Styles for the root slot\n */ const useStyles = makeStyles({\n root: {\n color: tokens.colorNeutralForeground1,\n backgroundColor: tokens.colorNeutralBackground1,\n boxShadow: tokens.shadow16,\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n ...shorthands.border('1px', 'solid', tokens.colorTransparentStroke),\n ...typographyStyles.body1\n },\n inverted: {\n backgroundColor: tokens.colorNeutralBackgroundStatic,\n color: tokens.colorNeutralForegroundStaticInverted\n },\n brand: {\n backgroundColor: tokens.colorBrandBackground,\n color: tokens.colorNeutralForegroundOnBrand\n },\n smallPadding: {\n ...shorthands.padding('12px')\n },\n mediumPadding: {\n ...shorthands.padding('16px')\n },\n largePadding: {\n ...shorthands.padding('20px')\n },\n smallArrow: createArrowHeightStyles(arrowHeights.small),\n mediumLargeArrow: createArrowHeightStyles(arrowHeights.medium),\n arrow: createArrowStyles({\n arrowHeight: undefined\n })\n});\n/**\n * Apply styling to the PopoverSurface slots based on the state\n */ export const usePopoverSurfaceStyles_unstable = (state)=>{\n const styles = useStyles();\n state.root.className = mergeClasses(popoverSurfaceClassNames.root, styles.root, state.size === 'small' && styles.smallPadding, state.size === 'medium' && styles.mediumPadding, state.size === 'large' && styles.largePadding, state.appearance === 'inverted' && styles.inverted, state.appearance === 'brand' && styles.brand, state.root.className);\n state.arrowClassName = mergeClasses(styles.arrow, state.size === 'small' ? styles.smallArrow : styles.mediumLargeArrow);\n return state;\n};\n"],"mappings":"AAAA,SAASA,UAAU,EAAAC,QAAA,EAAcC,YAAY,QAAQ,gBAAgB;AACrE,SAASC,uBAAuB,EAAEC,iBAAiB,QAAQ,6BAA6B;AACxF,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,uBAAuB;AAChE,OAAO,MAAMC,wBAAwB,GAAG;EACpCC,IAAI,EAAE;AACV,CAAC;AACD,OAAO,MAAMC,YAAY,GAAG;EACxBC,KAAK,EAAE,CAAC;EACRC,MAAM,EAAE,CAAC;EACTC,KAAK,EAAE;AACX,CAAC;AACD;AACA;AACA;AAAI,MAAMC,SAAS,gBAAGZ,QAAA;EAAAO,IAAA;IAAAM,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;EAAAC,QAAA;IAAAtB,MAAA;IAAAD,MAAA;EAAA;EAAAwB,KAAA;IAAAvB,MAAA;IAAAD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KAAK,CAACI,UAAU,KAAK,OAAO,IAAIH,MAAM,CAAC1C,KAAK,EAAEyC,KAAK,CAACvE,IAAI,CAACyE,SAAS,CAAC;EACtVF,KAAK,CAACK,cAAc,GAAGlF,YAAY,CAAC8E,MAAM,CAAC9B,KAAK,EAAE6B,KAAK,CAACG,IAAI,KAAK,OAAO,GAAGF,MAAM,CAAClC,UAAU,GAAGkC,MAAM,CAAC/B,gBAAgB,CAAC;EACvH,OAAO8B,KAAK;AAChB,CAAC"}
@@ -3,12 +3,10 @@ import { usePopoverTrigger_unstable } from './usePopoverTrigger';
3
3
  import { renderPopoverTrigger_unstable } from './renderPopoverTrigger';
4
4
  /**
5
5
  * Wraps a trigger element as an only child and adds the necessary event handling to open a popover.
6
- */
7
- export const PopoverTrigger = props => {
8
- const state = usePopoverTrigger_unstable(props);
9
- return renderPopoverTrigger_unstable(state);
6
+ */ export const PopoverTrigger = (props)=>{
7
+ const state = usePopoverTrigger_unstable(props);
8
+ return renderPopoverTrigger_unstable(state);
10
9
  };
11
10
  PopoverTrigger.displayName = 'PopoverTrigger';
12
11
  // type casting here is required to ensure internal type FluentTriggerComponent is not leaked
13
12
  PopoverTrigger.isFluentTriggerComponent = true;
14
- //# sourceMappingURL=PopoverTrigger.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","usePopoverTrigger_unstable","renderPopoverTrigger_unstable","PopoverTrigger","props","state","displayName","isFluentTriggerComponent"],"sources":["../../../src/components/PopoverTrigger/PopoverTrigger.tsx"],"sourcesContent":["import * as React from 'react';\nimport { usePopoverTrigger_unstable } from './usePopoverTrigger';\nimport { renderPopoverTrigger_unstable } from './renderPopoverTrigger';\nimport type { FluentTriggerComponent } from '@fluentui/react-utilities';\nimport type { PopoverTriggerProps } from './PopoverTrigger.types';\n\n/**\n * Wraps a trigger element as an only child and adds the necessary event handling to open a popover.\n */\nexport const PopoverTrigger: React.FC<PopoverTriggerProps> = props => {\n const state = usePopoverTrigger_unstable(props);\n\n return renderPopoverTrigger_unstable(state);\n};\n\nPopoverTrigger.displayName = 'PopoverTrigger';\n// type casting here is required to ensure internal type FluentTriggerComponent is not leaked\n(PopoverTrigger as FluentTriggerComponent).isFluentTriggerComponent = true;\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,0BAA0B,QAAQ;AAC3C,SAASC,6BAA6B,QAAQ;AAI9C;;;AAGA,OAAO,MAAMC,cAAA,GAAgDC,KAAA,IAAS;EACpE,MAAMC,KAAA,GAAQJ,0BAAA,CAA2BG,KAAA;EAEzC,OAAOF,6BAAA,CAA8BG,KAAA;AACvC;AAEAF,cAAA,CAAeG,WAAW,GAAG;AAC7B;AACCH,cAAA,CAA0CI,wBAAwB,GAAG,IAAI"}
1
+ {"version":3,"sources":["PopoverTrigger.tsx"],"sourcesContent":["import * as React from 'react';\nimport { usePopoverTrigger_unstable } from './usePopoverTrigger';\nimport { renderPopoverTrigger_unstable } from './renderPopoverTrigger';\nimport type { FluentTriggerComponent } from '@fluentui/react-utilities';\nimport type { PopoverTriggerProps } from './PopoverTrigger.types';\n\n/**\n * Wraps a trigger element as an only child and adds the necessary event handling to open a popover.\n */\nexport const PopoverTrigger: React.FC<PopoverTriggerProps> = props => {\n const state = usePopoverTrigger_unstable(props);\n\n return renderPopoverTrigger_unstable(state);\n};\n\nPopoverTrigger.displayName = 'PopoverTrigger';\n// type casting here is required to ensure internal type FluentTriggerComponent is not leaked\n(PopoverTrigger as FluentTriggerComponent).isFluentTriggerComponent = true;\n"],"names":["React","usePopoverTrigger_unstable","renderPopoverTrigger_unstable","PopoverTrigger","props","state","displayName","isFluentTriggerComponent"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,0BAA0B,QAAQ,sBAAsB;AACjE,SAASC,6BAA6B,QAAQ,yBAAyB;AAIvE;;CAEC,GACD,OAAO,MAAMC,iBAAgDC,CAAAA,QAAS;IACpE,MAAMC,QAAQJ,2BAA2BG;IAEzC,OAAOF,8BAA8BG;AACvC,EAAE;AAEFF,eAAeG,WAAW,GAAG;AAC7B,6FAA6F;AAC5FH,eAA0CI,wBAAwB,GAAG,IAAI"}
@@ -1,2 +1 @@
1
1
  import * as React from 'react';
2
- //# sourceMappingURL=PopoverTrigger.types.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React"],"sources":["../../../src/components/PopoverTrigger/PopoverTrigger.types.ts"],"sourcesContent":["import { ARIAButtonResultProps, ARIAButtonType } from '@fluentui/react-aria';\nimport type { TriggerProps } from '@fluentui/react-utilities';\nimport * as React from 'react';\n\n/**\n * PopoverTrigger Props\n */\nexport type PopoverTriggerProps = TriggerProps<PopoverTriggerChildProps> & {\n /**\n * Disables internal trigger mechanism that ensures a child provided will be a compliant ARIA button.\n * @default false\n */\n disableButtonEnhancement?: boolean;\n};\n\n/**\n * PopoverTrigger State\n */\nexport type PopoverTriggerState = {\n children: React.ReactElement | null;\n};\n\n/**\n * Props that are passed to the child of the DialogTrigger when cloned to ensure correct behaviour for the Dialog\n */\nexport type PopoverTriggerChildProps<Type extends ARIAButtonType = ARIAButtonType, Props = {}> = ARIAButtonResultProps<\n Type,\n Props & {\n 'aria-expanded'?: 'true' | 'false';\n ref: React.Ref<unknown>;\n onMouseEnter: React.MouseEventHandler<HTMLButtonElement & HTMLAnchorElement & HTMLDivElement>;\n onMouseLeave: React.MouseEventHandler<HTMLButtonElement & HTMLAnchorElement & HTMLDivElement>;\n onContextMenu: React.MouseEventHandler<HTMLButtonElement & HTMLAnchorElement & HTMLDivElement>;\n }\n>;\n"],"mappings":"AAEA,YAAYA,KAAA,MAAW"}
1
+ {"version":3,"sources":["PopoverTrigger.types.ts"],"sourcesContent":["import { ARIAButtonResultProps, ARIAButtonType } from '@fluentui/react-aria';\nimport type { TriggerProps } from '@fluentui/react-utilities';\nimport * as React from 'react';\n\n/**\n * PopoverTrigger Props\n */\nexport type PopoverTriggerProps = TriggerProps<PopoverTriggerChildProps> & {\n /**\n * Disables internal trigger mechanism that ensures a child provided will be a compliant ARIA button.\n * @default false\n */\n disableButtonEnhancement?: boolean;\n};\n\n/**\n * PopoverTrigger State\n */\nexport type PopoverTriggerState = {\n children: React.ReactElement | null;\n};\n\n/**\n * Props that are passed to the child of the DialogTrigger when cloned to ensure correct behaviour for the Dialog\n */\nexport type PopoverTriggerChildProps<Type extends ARIAButtonType = ARIAButtonType, Props = {}> = ARIAButtonResultProps<\n Type,\n Props & {\n 'aria-expanded'?: 'true' | 'false';\n ref: React.Ref<unknown>;\n onMouseEnter: React.MouseEventHandler<HTMLButtonElement & HTMLAnchorElement & HTMLDivElement>;\n onMouseLeave: React.MouseEventHandler<HTMLButtonElement & HTMLAnchorElement & HTMLDivElement>;\n onContextMenu: React.MouseEventHandler<HTMLButtonElement & HTMLAnchorElement & HTMLDivElement>;\n }\n>;\n"],"names":["React"],"mappings":"AAEA,YAAYA,WAAW,QAAQ"}
@@ -2,4 +2,3 @@ export * from './PopoverTrigger';
2
2
  export * from './PopoverTrigger.types';
3
3
  export * from './renderPopoverTrigger';
4
4
  export * from './usePopoverTrigger';
5
- //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../../src/components/PopoverTrigger/index.ts"],"sourcesContent":["export * from './PopoverTrigger';\nexport * from './PopoverTrigger.types';\nexport * from './renderPopoverTrigger';\nexport * from './usePopoverTrigger';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './PopoverTrigger';\nexport * from './PopoverTrigger.types';\nexport * from './renderPopoverTrigger';\nexport * from './usePopoverTrigger';\n"],"names":[],"mappings":"AAAA,cAAc,mBAAmB;AACjC,cAAc,yBAAyB;AACvC,cAAc,yBAAyB;AACvC,cAAc,sBAAsB"}
@@ -1,6 +1,5 @@
1
1
  /**
2
2
  * Render the final JSX of PopoverTrigger
3
- */export const renderPopoverTrigger_unstable = state => {
4
- return state.children;
3
+ */ export const renderPopoverTrigger_unstable = (state)=>{
4
+ return state.children;
5
5
  };
6
- //# sourceMappingURL=renderPopoverTrigger.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["renderPopoverTrigger_unstable","state","children"],"sources":["../../../src/components/PopoverTrigger/renderPopoverTrigger.tsx"],"sourcesContent":["import type { PopoverTriggerState } from './PopoverTrigger.types';\n\n/**\n * Render the final JSX of PopoverTrigger\n */\nexport const renderPopoverTrigger_unstable = (state: PopoverTriggerState) => {\n return state.children;\n};\n"],"mappings":"AAEA;;GAGA,OAAO,MAAMA,6BAAA,GAAiCC,KAAA,IAA+B;EAC3E,OAAOA,KAAA,CAAMC,QAAQ;AACvB"}
1
+ {"version":3,"sources":["renderPopoverTrigger.tsx"],"sourcesContent":["import type { PopoverTriggerState } from './PopoverTrigger.types';\n\n/**\n * Render the final JSX of PopoverTrigger\n */\nexport const renderPopoverTrigger_unstable = (state: PopoverTriggerState) => {\n return state.children;\n};\n"],"names":["renderPopoverTrigger_unstable","state","children"],"mappings":"AAEA;;CAEC,GACD,OAAO,MAAMA,gCAAgC,CAACC,QAA+B;IAC3E,OAAOA,MAAMC,QAAQ;AACvB,EAAE"}
@@ -11,68 +11,61 @@ import { Escape } from '@fluentui/keyboard-keys';
11
11
  * before being passed to renderPopoverTrigger_unstable.
12
12
  *
13
13
  * @param props - props from this instance of PopoverTrigger
14
- */
15
- export const usePopoverTrigger_unstable = props => {
16
- const {
17
- children,
18
- disableButtonEnhancement = false
19
- } = props;
20
- const child = getTriggerChild(children);
21
- const open = usePopoverContext_unstable(context => context.open);
22
- const setOpen = usePopoverContext_unstable(context => context.setOpen);
23
- const toggleOpen = usePopoverContext_unstable(context => context.toggleOpen);
24
- const triggerRef = usePopoverContext_unstable(context => context.triggerRef);
25
- const openOnHover = usePopoverContext_unstable(context => context.openOnHover);
26
- const openOnContext = usePopoverContext_unstable(context => context.openOnContext);
27
- const {
28
- triggerAttributes
29
- } = useModalAttributes();
30
- const onContextMenu = e => {
31
- if (openOnContext) {
32
- e.preventDefault();
33
- setOpen(e, true);
34
- }
35
- };
36
- const onClick = e => {
37
- if (!openOnContext) {
38
- toggleOpen(e);
39
- }
40
- };
41
- const onKeyDown = e => {
42
- if (e.key === Escape && open) {
43
- setOpen(e, false);
44
- // stop propagation to avoid conflicting with other elements that listen for `Escape`
45
- // e,g: Dialog, Menu
46
- e.stopPropagation();
47
- }
48
- };
49
- const onMouseEnter = e => {
50
- if (openOnHover) {
51
- setOpen(e, true);
52
- }
53
- };
54
- const onMouseLeave = e => {
55
- if (openOnHover) {
56
- setOpen(e, false);
57
- }
58
- };
59
- const contextMenuProps = {
60
- ...triggerAttributes,
61
- 'aria-expanded': `${open}`,
62
- ...(child === null || child === void 0 ? void 0 : child.props),
63
- onMouseEnter: useEventCallback(mergeCallbacks(child === null || child === void 0 ? void 0 : child.props.onMouseEnter, onMouseEnter)),
64
- onMouseLeave: useEventCallback(mergeCallbacks(child === null || child === void 0 ? void 0 : child.props.onMouseLeave, onMouseLeave)),
65
- onContextMenu: useEventCallback(mergeCallbacks(child === null || child === void 0 ? void 0 : child.props.onContextMenu, onContextMenu)),
66
- ref: useMergedRefs(triggerRef, child === null || child === void 0 ? void 0 : child.ref)
67
- };
68
- const triggerChildProps = {
69
- ...contextMenuProps,
70
- onClick: useEventCallback(mergeCallbacks(child === null || child === void 0 ? void 0 : child.props.onClick, onClick)),
71
- onKeyDown: useEventCallback(mergeCallbacks(child === null || child === void 0 ? void 0 : child.props.onKeyDown, onKeyDown))
72
- };
73
- const ariaButtonTriggerChildProps = useARIAButtonProps((child === null || child === void 0 ? void 0 : child.type) === 'button' || (child === null || child === void 0 ? void 0 : child.type) === 'a' ? child.type : 'div', triggerChildProps);
74
- return {
75
- children: applyTriggerPropsToChildren(props.children, useARIAButtonProps((child === null || child === void 0 ? void 0 : child.type) === 'button' || (child === null || child === void 0 ? void 0 : child.type) === 'a' ? child.type : 'div', openOnContext ? contextMenuProps : disableButtonEnhancement ? triggerChildProps : ariaButtonTriggerChildProps))
76
- };
14
+ */ export const usePopoverTrigger_unstable = (props)=>{
15
+ const { children , disableButtonEnhancement =false } = props;
16
+ const child = getTriggerChild(children);
17
+ const open = usePopoverContext_unstable((context)=>context.open);
18
+ const setOpen = usePopoverContext_unstable((context)=>context.setOpen);
19
+ const toggleOpen = usePopoverContext_unstable((context)=>context.toggleOpen);
20
+ const triggerRef = usePopoverContext_unstable((context)=>context.triggerRef);
21
+ const openOnHover = usePopoverContext_unstable((context)=>context.openOnHover);
22
+ const openOnContext = usePopoverContext_unstable((context)=>context.openOnContext);
23
+ const { triggerAttributes } = useModalAttributes();
24
+ const onContextMenu = (e)=>{
25
+ if (openOnContext) {
26
+ e.preventDefault();
27
+ setOpen(e, true);
28
+ }
29
+ };
30
+ const onClick = (e)=>{
31
+ if (!openOnContext) {
32
+ toggleOpen(e);
33
+ }
34
+ };
35
+ const onKeyDown = (e)=>{
36
+ if (e.key === Escape && open) {
37
+ setOpen(e, false);
38
+ // stop propagation to avoid conflicting with other elements that listen for `Escape`
39
+ // e,g: Dialog, Menu
40
+ e.stopPropagation();
41
+ }
42
+ };
43
+ const onMouseEnter = (e)=>{
44
+ if (openOnHover) {
45
+ setOpen(e, true);
46
+ }
47
+ };
48
+ const onMouseLeave = (e)=>{
49
+ if (openOnHover) {
50
+ setOpen(e, false);
51
+ }
52
+ };
53
+ const contextMenuProps = {
54
+ ...triggerAttributes,
55
+ 'aria-expanded': `${open}`,
56
+ ...child === null || child === void 0 ? void 0 : child.props,
57
+ onMouseEnter: useEventCallback(mergeCallbacks(child === null || child === void 0 ? void 0 : child.props.onMouseEnter, onMouseEnter)),
58
+ onMouseLeave: useEventCallback(mergeCallbacks(child === null || child === void 0 ? void 0 : child.props.onMouseLeave, onMouseLeave)),
59
+ onContextMenu: useEventCallback(mergeCallbacks(child === null || child === void 0 ? void 0 : child.props.onContextMenu, onContextMenu)),
60
+ ref: useMergedRefs(triggerRef, child === null || child === void 0 ? void 0 : child.ref)
61
+ };
62
+ const triggerChildProps = {
63
+ ...contextMenuProps,
64
+ onClick: useEventCallback(mergeCallbacks(child === null || child === void 0 ? void 0 : child.props.onClick, onClick)),
65
+ onKeyDown: useEventCallback(mergeCallbacks(child === null || child === void 0 ? void 0 : child.props.onKeyDown, onKeyDown))
66
+ };
67
+ const ariaButtonTriggerChildProps = useARIAButtonProps((child === null || child === void 0 ? void 0 : child.type) === 'button' || (child === null || child === void 0 ? void 0 : child.type) === 'a' ? child.type : 'div', triggerChildProps);
68
+ return {
69
+ children: applyTriggerPropsToChildren(props.children, useARIAButtonProps((child === null || child === void 0 ? void 0 : child.type) === 'button' || (child === null || child === void 0 ? void 0 : child.type) === 'a' ? child.type : 'div', openOnContext ? contextMenuProps : disableButtonEnhancement ? triggerChildProps : ariaButtonTriggerChildProps))
70
+ };
77
71
  };
78
- //# sourceMappingURL=usePopoverTrigger.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","applyTriggerPropsToChildren","getTriggerChild","mergeCallbacks","useMergedRefs","useEventCallback","useModalAttributes","usePopoverContext_unstable","useARIAButtonProps","Escape","usePopoverTrigger_unstable","props","children","disableButtonEnhancement","child","open","context","setOpen","toggleOpen","triggerRef","openOnHover","openOnContext","triggerAttributes","onContextMenu","e","preventDefault","onClick","onKeyDown","key","stopPropagation","onMouseEnter","onMouseLeave","contextMenuProps","ref","triggerChildProps","ariaButtonTriggerChildProps","type"],"sources":["../../../src/components/PopoverTrigger/usePopoverTrigger.ts"],"sourcesContent":["import * as React from 'react';\nimport {\n applyTriggerPropsToChildren,\n getTriggerChild,\n mergeCallbacks,\n useMergedRefs,\n useEventCallback,\n} from '@fluentui/react-utilities';\nimport { useModalAttributes } from '@fluentui/react-tabster';\nimport { usePopoverContext_unstable } from '../../popoverContext';\nimport type { PopoverTriggerProps, PopoverTriggerState } from './PopoverTrigger.types';\nimport { useARIAButtonProps } from '@fluentui/react-aria';\nimport { Escape } from '@fluentui/keyboard-keys';\n\n/**\n * Create the state required to render PopoverTrigger.\n *\n * The returned state can be modified with hooks such as usePopoverTriggerStyles,\n * before being passed to renderPopoverTrigger_unstable.\n *\n * @param props - props from this instance of PopoverTrigger\n */\nexport const usePopoverTrigger_unstable = (props: PopoverTriggerProps): PopoverTriggerState => {\n const { children, disableButtonEnhancement = false } = props;\n const child = getTriggerChild(children);\n\n const open = usePopoverContext_unstable(context => context.open);\n const setOpen = usePopoverContext_unstable(context => context.setOpen);\n const toggleOpen = usePopoverContext_unstable(context => context.toggleOpen);\n const triggerRef = usePopoverContext_unstable(context => context.triggerRef);\n const openOnHover = usePopoverContext_unstable(context => context.openOnHover);\n const openOnContext = usePopoverContext_unstable(context => context.openOnContext);\n const { triggerAttributes } = useModalAttributes();\n\n const onContextMenu = (e: React.MouseEvent<HTMLElement>) => {\n if (openOnContext) {\n e.preventDefault();\n setOpen(e, true);\n }\n };\n\n const onClick = (e: React.MouseEvent<HTMLElement>) => {\n if (!openOnContext) {\n toggleOpen(e);\n }\n };\n\n const onKeyDown = (e: React.KeyboardEvent<HTMLElement>) => {\n if (e.key === Escape && open) {\n setOpen(e, false);\n // stop propagation to avoid conflicting with other elements that listen for `Escape`\n // e,g: Dialog, Menu\n e.stopPropagation();\n }\n };\n\n const onMouseEnter = (e: React.MouseEvent<HTMLElement>) => {\n if (openOnHover) {\n setOpen(e, true);\n }\n };\n\n const onMouseLeave = (e: React.MouseEvent<HTMLElement>) => {\n if (openOnHover) {\n setOpen(e, false);\n }\n };\n\n const contextMenuProps = {\n ...triggerAttributes,\n 'aria-expanded': `${open}`,\n ...child?.props,\n onMouseEnter: useEventCallback(mergeCallbacks(child?.props.onMouseEnter, onMouseEnter)),\n onMouseLeave: useEventCallback(mergeCallbacks(child?.props.onMouseLeave, onMouseLeave)),\n onContextMenu: useEventCallback(mergeCallbacks(child?.props.onContextMenu, onContextMenu)),\n ref: useMergedRefs(triggerRef, child?.ref),\n } as const;\n\n const triggerChildProps = {\n ...contextMenuProps,\n onClick: useEventCallback(mergeCallbacks(child?.props.onClick, onClick)),\n onKeyDown: useEventCallback(mergeCallbacks(child?.props.onKeyDown, onKeyDown)),\n };\n\n const ariaButtonTriggerChildProps = useARIAButtonProps(\n child?.type === 'button' || child?.type === 'a' ? child.type : 'div',\n triggerChildProps,\n );\n\n return {\n children: applyTriggerPropsToChildren(\n props.children,\n useARIAButtonProps(\n child?.type === 'button' || child?.type === 'a' ? child.type : 'div',\n openOnContext ? contextMenuProps : disableButtonEnhancement ? triggerChildProps : ariaButtonTriggerChildProps,\n ),\n ),\n };\n};\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SACEC,2BAA2B,EAC3BC,eAAe,EACfC,cAAc,EACdC,aAAa,EACbC,gBAAgB,QACX;AACP,SAASC,kBAAkB,QAAQ;AACnC,SAASC,0BAA0B,QAAQ;AAE3C,SAASC,kBAAkB,QAAQ;AACnC,SAASC,MAAM,QAAQ;AAEvB;;;;;;;;AAQA,OAAO,MAAMC,0BAAA,GAA8BC,KAAA,IAAoD;EAC7F,MAAM;IAAEC,QAAA;IAAUC,wBAAA,GAA2B;EAAK,CAAE,GAAGF,KAAA;EACvD,MAAMG,KAAA,GAAQZ,eAAA,CAAgBU,QAAA;EAE9B,MAAMG,IAAA,GAAOR,0BAAA,CAA2BS,OAAA,IAAWA,OAAA,CAAQD,IAAI;EAC/D,MAAME,OAAA,GAAUV,0BAAA,CAA2BS,OAAA,IAAWA,OAAA,CAAQC,OAAO;EACrE,MAAMC,UAAA,GAAaX,0BAAA,CAA2BS,OAAA,IAAWA,OAAA,CAAQE,UAAU;EAC3E,MAAMC,UAAA,GAAaZ,0BAAA,CAA2BS,OAAA,IAAWA,OAAA,CAAQG,UAAU;EAC3E,MAAMC,WAAA,GAAcb,0BAAA,CAA2BS,OAAA,IAAWA,OAAA,CAAQI,WAAW;EAC7E,MAAMC,aAAA,GAAgBd,0BAAA,CAA2BS,OAAA,IAAWA,OAAA,CAAQK,aAAa;EACjF,MAAM;IAAEC;EAAiB,CAAE,GAAGhB,kBAAA;EAE9B,MAAMiB,aAAA,G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BAAAA,KAAA,CAAOmB,GAAG;EAC3C;EAEA,MAAMC,iBAAA,GAAoB;IACxB,GAAGF,gBAAgB;IACnBN,OAAA,EAASrB,gBAAA,CAAiBF,cAAA,CAAeW,KAAA,aAAAA,KAAA,uBAAAA,KAAA,CAAOH,KAAK,CAACe,OAAO,EAAEA,OAAA;IAC/DC,SAAA,EAAWtB,gBAAA,CAAiBF,cAAA,CAAeW,KAAA,aAAAA,KAAA,uBAAAA,KAAA,CAAOH,KAAK,CAACgB,SAAS,EAAEA,SAAA;EACrE;EAEA,MAAMQ,2BAAA,GAA8B3B,kBAAA,CAClC,CAAAM,KAAA,aAAAA,KAAA,uBAAAA,KAAA,CAAOsB,IAAI,MAAK,YAAY,CAAAtB,KAAA,aAAAA,KAAA,uBAAAA,KAAA,CAAOsB,IAAI,MAAK,MAAMtB,KAAA,CAAMsB,IAAI,GAAG,KAAK,EACpEF,iBAAA;EAGF,OAAO;IACLtB,QAAA,EAAUX,2BAAA,CACRU,KAAA,CAAMC,QAAQ,EACdJ,kBAAA,CACE,CAAAM,KAAA,aAAAA,KAAA,uBAAAA,KAAA,CAAOsB,IAAI,MAAK,YAAY,CAAAtB,KAAA,aAAAA,KAAA,uBAAAA,KAAA,CAAOsB,IAAI,MAAK,MAAMtB,KAAA,CAAMsB,IAAI,GAAG,KAAK,EACpEf,aAAA,GAAgBW,gBAAA,GAAmBnB,wBAAA,GAA2BqB,iBAAA,GAAoBC,2BAA2B;EAGnH;AACF"}
1
+ {"version":3,"sources":["usePopoverTrigger.ts"],"sourcesContent":["import * as React from 'react';\nimport {\n applyTriggerPropsToChildren,\n getTriggerChild,\n mergeCallbacks,\n useMergedRefs,\n useEventCallback,\n} from '@fluentui/react-utilities';\nimport { useModalAttributes } from '@fluentui/react-tabster';\nimport { usePopoverContext_unstable } from '../../popoverContext';\nimport type { PopoverTriggerProps, PopoverTriggerState } from './PopoverTrigger.types';\nimport { useARIAButtonProps } from '@fluentui/react-aria';\nimport { Escape } from '@fluentui/keyboard-keys';\n\n/**\n * Create the state required to render PopoverTrigger.\n *\n * The returned state can be modified with hooks such as usePopoverTriggerStyles,\n * before being passed to renderPopoverTrigger_unstable.\n *\n * @param props - props from this instance of PopoverTrigger\n */\nexport const usePopoverTrigger_unstable = (props: PopoverTriggerProps): PopoverTriggerState => {\n const { children, disableButtonEnhancement = false } = props;\n const child = getTriggerChild(children);\n\n const open = usePopoverContext_unstable(context => context.open);\n const setOpen = usePopoverContext_unstable(context => context.setOpen);\n const toggleOpen = usePopoverContext_unstable(context => context.toggleOpen);\n const triggerRef = usePopoverContext_unstable(context => context.triggerRef);\n const openOnHover = usePopoverContext_unstable(context => context.openOnHover);\n const openOnContext = usePopoverContext_unstable(context => context.openOnContext);\n const { triggerAttributes } = useModalAttributes();\n\n const onContextMenu = (e: React.MouseEvent<HTMLElement>) => {\n if (openOnContext) {\n e.preventDefault();\n setOpen(e, true);\n }\n };\n\n const onClick = (e: React.MouseEvent<HTMLElement>) => {\n if (!openOnContext) {\n toggleOpen(e);\n }\n };\n\n const onKeyDown = (e: React.KeyboardEvent<HTMLElement>) => {\n if (e.key === Escape && open) {\n setOpen(e, false);\n // stop propagation to avoid conflicting with other elements that listen for `Escape`\n // e,g: Dialog, Menu\n e.stopPropagation();\n }\n };\n\n const onMouseEnter = (e: React.MouseEvent<HTMLElement>) => {\n if (openOnHover) {\n setOpen(e, true);\n }\n };\n\n const onMouseLeave = (e: React.MouseEvent<HTMLElement>) => {\n if (openOnHover) {\n setOpen(e, false);\n }\n };\n\n const contextMenuProps = {\n ...triggerAttributes,\n 'aria-expanded': `${open}`,\n ...child?.props,\n onMouseEnter: useEventCallback(mergeCallbacks(child?.props.onMouseEnter, onMouseEnter)),\n onMouseLeave: useEventCallback(mergeCallbacks(child?.props.onMouseLeave, onMouseLeave)),\n onContextMenu: useEventCallback(mergeCallbacks(child?.props.onContextMenu, onContextMenu)),\n ref: useMergedRefs(triggerRef, child?.ref),\n } as const;\n\n const triggerChildProps = {\n ...contextMenuProps,\n onClick: useEventCallback(mergeCallbacks(child?.props.onClick, onClick)),\n onKeyDown: useEventCallback(mergeCallbacks(child?.props.onKeyDown, onKeyDown)),\n };\n\n const ariaButtonTriggerChildProps = useARIAButtonProps(\n child?.type === 'button' || child?.type === 'a' ? child.type : 'div',\n triggerChildProps,\n );\n\n return {\n children: applyTriggerPropsToChildren(\n props.children,\n useARIAButtonProps(\n child?.type === 'button' || child?.type === 'a' ? child.type : 'div',\n openOnContext ? contextMenuProps : disableButtonEnhancement ? triggerChildProps : ariaButtonTriggerChildProps,\n ),\n ),\n };\n};\n"],"names":["React","applyTriggerPropsToChildren","getTriggerChild","mergeCallbacks","useMergedRefs","useEventCallback","useModalAttributes","usePopoverContext_unstable","useARIAButtonProps","Escape","usePopoverTrigger_unstable","props","children","disableButtonEnhancement","child","open","context","setOpen","toggleOpen","triggerRef","openOnHover","openOnContext","triggerAttributes","onContextMenu","e","preventDefault","onClick","onKeyDown","key","stopPropagation","onMouseEnter","onMouseLeave","contextMenuProps","ref","triggerChildProps","ariaButtonTriggerChildProps","type"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SACEC,2BAA2B,EAC3BC,eAAe,EACfC,cAAc,EACdC,aAAa,EACbC,gBAAgB,QACX,4BAA4B;AACnC,SAASC,kBAAkB,QAAQ,0BAA0B;AAC7D,SAASC,0BAA0B,QAAQ,uBAAuB;AAElE,SAASC,kBAAkB,QAAQ,uBAAuB;AAC1D,SAASC,MAAM,QAAQ,0BAA0B;AAEjD;;;;;;;CAOC,GACD,OAAO,MAAMC,6BAA6B,CAACC,QAAoD;IAC7F,MAAM,EAAEC,SAAQ,EAAEC,0BAA2B,KAAK,CAAA,EAAE,GAAGF;IACvD,MAAMG,QAAQZ,gBAAgBU;IAE9B,MAAMG,OAAOR,2BAA2BS,CAAAA,UAAWA,QAAQD,IAAI;IAC/D,MAAME,UAAUV,2BAA2BS,CAAAA,UAAWA,QAAQC,OAAO;IACrE,MAAMC,aAAaX,2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OH,KAAK,CAACY,aAAa,EAAEA;QAC3EU,KAAK7B,cAAce,YAAYL,kBAAAA,mBAAAA,KAAAA,IAAAA,MAAOmB,GAAG;IAC3C;IAEA,MAAMC,oBAAoB;QACxB,GAAGF,gBAAgB;QACnBN,SAASrB,iBAAiBF,eAAeW,kBAAAA,mBAAAA,KAAAA,IAAAA,MAAOH,KAAK,CAACe,OAAO,EAAEA;QAC/DC,WAAWtB,iBAAiBF,eAAeW,kBAAAA,mBAAAA,KAAAA,IAAAA,MAAOH,KAAK,CAACgB,SAAS,EAAEA;IACrE;IAEA,MAAMQ,8BAA8B3B,mBAClCM,CAAAA,kBAAAA,mBAAAA,KAAAA,IAAAA,MAAOsB,IAAI,AAAD,MAAM,YAAYtB,CAAAA,kBAAAA,mBAAAA,KAAAA,IAAAA,MAAOsB,IAAI,AAAD,MAAM,MAAMtB,MAAMsB,IAAI,GAAG,KAAK,EACpEF;IAGF,OAAO;QACLtB,UAAUX,4BACRU,MAAMC,QAAQ,EACdJ,mBACEM,CAAAA,kBAAAA,mBAAAA,KAAAA,IAAAA,MAAOsB,IAAI,AAAD,MAAM,YAAYtB,CAAAA,kBAAAA,mBAAAA,KAAAA,IAAAA,MAAOsB,IAAI,AAAD,MAAM,MAAMtB,MAAMsB,IAAI,GAAG,KAAK,EACpEf,gBAAgBW,mBAAmBnB,2BAA2BqB,oBAAoBC,2BAA2B;IAGnH;AACF,EAAE"}
package/lib/index.js CHANGED
@@ -2,4 +2,3 @@ export { Popover, renderPopover_unstable, usePopover_unstable } from './Popover'
2
2
  export { PopoverSurface, arrowHeights, popoverSurfaceClassNames, renderPopoverSurface_unstable, usePopoverSurfaceStyles_unstable, usePopoverSurface_unstable } from './PopoverSurface';
3
3
  export { PopoverProvider, usePopoverContext_unstable } from './popoverContext';
4
4
  export { PopoverTrigger, renderPopoverTrigger_unstable, usePopoverTrigger_unstable } from './PopoverTrigger';
5
- //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["Popover","renderPopover_unstable","usePopover_unstable","PopoverSurface","arrowHeights","popoverSurfaceClassNames","renderPopoverSurface_unstable","usePopoverSurfaceStyles_unstable","usePopoverSurface_unstable","PopoverProvider","usePopoverContext_unstable","PopoverTrigger","renderPopoverTrigger_unstable","usePopoverTrigger_unstable"],"sources":["../src/index.ts"],"sourcesContent":["export { Popover, renderPopover_unstable, usePopover_unstable } from './Popover';\nexport type { OnOpenChangeData, OpenPopoverEvents, PopoverProps, PopoverSize, PopoverState } from './Popover';\nexport {\n PopoverSurface,\n arrowHeights,\n popoverSurfaceClassNames,\n renderPopoverSurface_unstable,\n usePopoverSurfaceStyles_unstable,\n usePopoverSurface_unstable,\n} from './PopoverSurface';\nexport type { PopoverSurfaceProps, PopoverSurfaceSlots, PopoverSurfaceState } from './PopoverSurface';\nexport { PopoverProvider, usePopoverContext_unstable } from './popoverContext';\nexport type { PopoverContextValue } from './popoverContext';\nexport { PopoverTrigger, renderPopoverTrigger_unstable, usePopoverTrigger_unstable } from './PopoverTrigger';\nexport type { PopoverTriggerChildProps, PopoverTriggerProps, PopoverTriggerState } from './PopoverTrigger';\n"],"mappings":"AAAA,SAASA,OAAO,EAAEC,sBAAsB,EAAEC,mBAAmB,QAAQ;AAErE,SACEC,cAAc,EACdC,YAAY,EACZC,wBAAwB,EACxBC,6BAA6B,EAC7BC,gCAAgC,EAChCC,0BAA0B,QACrB;AAEP,SAASC,eAAe,EAAEC,0BAA0B,QAAQ;AAE5D,SAASC,cAAc,EAAEC,6BAA6B,EAAEC,0BAA0B,QAAQ"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export { Popover, renderPopover_unstable, usePopover_unstable } from './Popover';\nexport type { OnOpenChangeData, OpenPopoverEvents, PopoverProps, PopoverSize, PopoverState } from './Popover';\nexport {\n PopoverSurface,\n arrowHeights,\n popoverSurfaceClassNames,\n renderPopoverSurface_unstable,\n usePopoverSurfaceStyles_unstable,\n usePopoverSurface_unstable,\n} from './PopoverSurface';\nexport type { PopoverSurfaceProps, PopoverSurfaceSlots, PopoverSurfaceState } from './PopoverSurface';\nexport { PopoverProvider, usePopoverContext_unstable } from './popoverContext';\nexport type { PopoverContextValue } from './popoverContext';\nexport { PopoverTrigger, renderPopoverTrigger_unstable, usePopoverTrigger_unstable } from './PopoverTrigger';\nexport type { PopoverTriggerChildProps, PopoverTriggerProps, PopoverTriggerState } from './PopoverTrigger';\n"],"names":["Popover","renderPopover_unstable","usePopover_unstable","PopoverSurface","arrowHeights","popoverSurfaceClassNames","renderPopoverSurface_unstable","usePopoverSurfaceStyles_unstable","usePopoverSurface_unstable","PopoverProvider","usePopoverContext_unstable","PopoverTrigger","renderPopoverTrigger_unstable","usePopoverTrigger_unstable"],"mappings":"AAAA,SAASA,OAAO,EAAEC,sBAAsB,EAAEC,mBAAmB,QAAQ,YAAY;AAEjF,SACEC,cAAc,EACdC,YAAY,EACZC,wBAAwB,EACxBC,6BAA6B,EAC7BC,gCAAgC,EAChCC,0BAA0B,QACrB,mBAAmB;AAE1B,SAASC,eAAe,EAAEC,0BAA0B,QAAQ,mBAAmB;AAE/E,SAASC,cAAc,EAAEC,6BAA6B,EAAEC,0BAA0B,QAAQ,mBAAmB"}
@@ -1,24 +1,23 @@
1
1
  import { createContext, useContextSelector } from '@fluentui/react-context-selector';
2
- export const PopoverContext = /*#__PURE__*/createContext(undefined);
2
+ export const PopoverContext = createContext(undefined);
3
3
  const popoverContextDefaultValue = {
4
- open: false,
5
- setOpen: () => null,
6
- toggleOpen: () => null,
7
- triggerRef: {
8
- current: null
9
- },
10
- contentRef: {
11
- current: null
12
- },
13
- arrowRef: {
14
- current: null
15
- },
16
- openOnContext: false,
17
- openOnHover: false,
18
- size: 'medium',
19
- trapFocus: false,
20
- inline: false
4
+ open: false,
5
+ setOpen: ()=>null,
6
+ toggleOpen: ()=>null,
7
+ triggerRef: {
8
+ current: null
9
+ },
10
+ contentRef: {
11
+ current: null
12
+ },
13
+ arrowRef: {
14
+ current: null
15
+ },
16
+ openOnContext: false,
17
+ openOnHover: false,
18
+ size: 'medium',
19
+ trapFocus: false,
20
+ inline: false
21
21
  };
22
22
  export const PopoverProvider = PopoverContext.Provider;
23
- export const usePopoverContext_unstable = selector => useContextSelector(PopoverContext, (ctx = popoverContextDefaultValue) => selector(ctx));
24
- //# sourceMappingURL=popoverContext.js.map
23
+ export const usePopoverContext_unstable = (selector)=>useContextSelector(PopoverContext, (ctx = popoverContextDefaultValue)=>selector(ctx));
@@ -1 +1 @@
1
- {"version":3,"names":["createContext","useContextSelector","PopoverContext","undefined","popoverContextDefaultValue","open","setOpen","toggleOpen","triggerRef","current","contentRef","arrowRef","openOnContext","openOnHover","size","trapFocus","inline","PopoverProvider","Provider","usePopoverContext_unstable","selector","ctx"],"sources":["../src/popoverContext.ts"],"sourcesContent":["import { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { ContextSelector, Context } from '@fluentui/react-context-selector';\nimport type { PopoverState } from './components/Popover/index';\n\nexport const PopoverContext: Context<PopoverContextValue> = createContext<PopoverContextValue | undefined>(\n undefined,\n) as Context<PopoverContextValue>;\nconst popoverContextDefaultValue: PopoverContextValue = {\n open: false,\n setOpen: () => null,\n toggleOpen: () => null,\n triggerRef: { current: null },\n contentRef: { current: null },\n arrowRef: { current: null },\n openOnContext: false,\n openOnHover: false,\n size: 'medium' as const,\n trapFocus: false,\n inline: false,\n};\n\nexport const PopoverProvider = PopoverContext.Provider;\n\n/**\n * Context shared between Popover and its children components\n */\nexport type PopoverContextValue = Pick<\n PopoverState,\n | 'open'\n | 'toggleOpen'\n | 'setOpen'\n | 'triggerRef'\n | 'contentRef'\n | 'openOnHover'\n | 'openOnContext'\n | 'mountNode'\n | 'withArrow'\n | 'arrowRef'\n | 'size'\n | 'appearance'\n | 'trapFocus'\n | 'inertTrapFocus'\n | 'inline'\n>;\n\nexport const usePopoverContext_unstable = <T>(selector: ContextSelector<PopoverContextValue, T>): T =>\n useContextSelector(PopoverContext, (ctx = popoverContextDefaultValue) => selector(ctx));\n"],"mappings":"AAAA,SAASA,aAAa,EAAEC,kBAAkB,QAAQ;AAIlD,OAAO,MAAMC,cAAA,gBAA+CF,aAAA,CAC1DG,SAAA;AAEF,MAAMC,0BAAA,GAAkD;EACtDC,IAAA,EAAM,KAAK;EACXC,OAAA,EAASA,CAAA,KAAM,IAAI;EACnBC,UAAA,EAAYA,CAAA,KAAM,IAAI;EACtBC,UAAA,EAAY;IAAEC,OAAA,EAAS;EAAK;EAC5BC,UAAA,EAAY;IAAED,OAAA,EAAS;EAAK;EAC5BE,QAAA,EAAU;IAAEF,OAAA,EAAS;EAAK;EAC1BG,aAAA,EAAe,KAAK;EACpBC,WAAA,EAAa,KAAK;EAClBC,IAAA,EAAM;EACNC,SAAA,EAAW,KAAK;EAChBC,MAAA,EAAQ;AACV;AAEA,OAAO,MAAMC,eAAA,GAAkBf,cAAA,CAAegB,QAAQ;AAwBtD,OAAO,MAAMC,0BAAA,GAAiCC,QAAA,IAC5CnB,kBAAA,CAAmBC,cAAA,EAAgB,CAACmB,GAAA,GAAMjB,0BAA0B,KAAKgB,QAAA,CAASC,GAAA"}
1
+ {"version":3,"sources":["popoverContext.ts"],"sourcesContent":["import { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { ContextSelector, Context } from '@fluentui/react-context-selector';\nimport type { PopoverState } from './components/Popover/index';\n\nexport const PopoverContext: Context<PopoverContextValue> = createContext<PopoverContextValue | undefined>(\n undefined,\n) as Context<PopoverContextValue>;\nconst popoverContextDefaultValue: PopoverContextValue = {\n open: false,\n setOpen: () => null,\n toggleOpen: () => null,\n triggerRef: { current: null },\n contentRef: { current: null },\n arrowRef: { current: null },\n openOnContext: false,\n openOnHover: false,\n size: 'medium' as const,\n trapFocus: false,\n inline: false,\n};\n\nexport const PopoverProvider = PopoverContext.Provider;\n\n/**\n * Context shared between Popover and its children components\n */\nexport type PopoverContextValue = Pick<\n PopoverState,\n | 'open'\n | 'toggleOpen'\n | 'setOpen'\n | 'triggerRef'\n | 'contentRef'\n | 'openOnHover'\n | 'openOnContext'\n | 'mountNode'\n | 'withArrow'\n | 'arrowRef'\n | 'size'\n | 'appearance'\n | 'trapFocus'\n | 'inertTrapFocus'\n | 'inline'\n>;\n\nexport const usePopoverContext_unstable = <T>(selector: ContextSelector<PopoverContextValue, T>): T =>\n useContextSelector(PopoverContext, (ctx = popoverContextDefaultValue) => selector(ctx));\n"],"names":["createContext","useContextSelector","PopoverContext","undefined","popoverContextDefaultValue","open","setOpen","toggleOpen","triggerRef","current","contentRef","arrowRef","openOnContext","openOnHover","size","trapFocus","inline","PopoverProvider","Provider","usePopoverContext_unstable","selector","ctx"],"mappings":"AAAA,SAASA,aAAa,EAAEC,kBAAkB,QAAQ,mCAAmC;AAIrF,OAAO,MAAMC,iBAA+CF,cAC1DG,WACgC;AAClC,MAAMC,6BAAkD;IACtDC,MAAM,KAAK;IACXC,SAAS,IAAM,IAAI;IACnBC,YAAY,IAAM,IAAI;IACtBC,YAAY;QAAEC,SAAS,IAAI;IAAC;IAC5BC,YAAY;QAAED,SAAS,IAAI;IAAC;IAC5BE,UAAU;QAAEF,SAAS,IAAI;IAAC;IAC1BG,eAAe,KAAK;IACpBC,aAAa,KAAK;IAClBC,MAAM;IACNC,WAAW,KAAK;IAChBC,QAAQ,KAAK;AACf;AAEA,OAAO,MAAMC,kBAAkBf,eAAegB,QAAQ,CAAC;AAwBvD,OAAO,MAAMC,6BAA6B,CAAIC,WAC5CnB,mBAAmBC,gBAAgB,CAACmB,MAAMjB,0BAA0B,GAAKgB,SAASC,MAAM"}
@@ -4,6 +4,3 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
6
  _exportStar(require("./components/Popover/index"), exports);
7
- //# sourceMappingURL=Popover.js.map
8
-
9
- //# sourceMappingURL=Popover.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../lib/Popover.js"],"sourcesContent":["export * from './components/Popover/index';\n//# sourceMappingURL=Popover.js.map"],"names":[],"mappings":";;;;;oBAAc;CACd,mCAAmC"}
1
+ {"version":3,"sources":["Popover.js"],"sourcesContent":["export * from './components/Popover/index';\n"],"names":[],"mappings":";;;;;oBAAc"}
@@ -4,6 +4,3 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
6
  _exportStar(require("./components/PopoverSurface/index"), exports);
7
- //# sourceMappingURL=PopoverSurface.js.map
8
-
9
- //# sourceMappingURL=PopoverSurface.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../lib/PopoverSurface.js"],"sourcesContent":["export * from './components/PopoverSurface/index';\n//# sourceMappingURL=PopoverSurface.js.map"],"names":[],"mappings":";;;;;oBAAc;CACd,0CAA0C"}
1
+ {"version":3,"sources":["PopoverSurface.js"],"sourcesContent":["export * from './components/PopoverSurface/index';\n"],"names":[],"mappings":";;;;;oBAAc"}
@@ -4,6 +4,3 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
6
  _exportStar(require("./components/PopoverTrigger/index"), exports);
7
- //# sourceMappingURL=PopoverTrigger.js.map
8
-
9
- //# sourceMappingURL=PopoverTrigger.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../lib/PopoverTrigger.js"],"sourcesContent":["export * from './components/PopoverTrigger/index';\n//# sourceMappingURL=PopoverTrigger.js.map"],"names":[],"mappings":";;;;;oBAAc;CACd,0CAA0C"}
1
+ {"version":3,"sources":["PopoverTrigger.js"],"sourcesContent":["export * from './components/PopoverTrigger/index';\n"],"names":[],"mappings":";;;;;oBAAc"}
@@ -14,6 +14,4 @@ const Popover = (props)=>{
14
14
  const state = (0, _usePopover.usePopover_unstable)(props);
15
15
  return (0, _renderPopover.renderPopover_unstable)(state);
16
16
  };
17
- Popover.displayName = 'Popover'; //# sourceMappingURL=Popover.js.map
18
-
19
- //# sourceMappingURL=Popover.js.map
17
+ Popover.displayName = 'Popover';