@fluentui/react-popover 9.3.5 → 9.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. package/CHANGELOG.json +131 -1
  2. package/CHANGELOG.md +33 -2
  3. package/dist/index.d.ts +7 -0
  4. package/lib/components/Popover/Popover.js +0 -1
  5. package/lib/components/Popover/Popover.js.map +1 -1
  6. package/lib/components/Popover/Popover.types.js.map +1 -1
  7. package/lib/components/Popover/renderPopover.js +0 -1
  8. package/lib/components/Popover/renderPopover.js.map +1 -1
  9. package/lib/components/Popover/usePopover.js +12 -27
  10. package/lib/components/Popover/usePopover.js.map +1 -1
  11. package/lib/components/PopoverSurface/PopoverSurface.js +0 -1
  12. package/lib/components/PopoverSurface/PopoverSurface.js.map +1 -1
  13. package/lib/components/PopoverSurface/renderPopoverSurface.js +2 -4
  14. package/lib/components/PopoverSurface/renderPopoverSurface.js.map +1 -1
  15. package/lib/components/PopoverSurface/usePopoverSurface.js +2 -11
  16. package/lib/components/PopoverSurface/usePopoverSurface.js.map +1 -1
  17. package/lib/components/PopoverSurface/usePopoverSurfaceStyles.js +80 -83
  18. package/lib/components/PopoverSurface/usePopoverSurfaceStyles.js.map +1 -1
  19. package/lib/components/PopoverTrigger/PopoverTrigger.js +2 -3
  20. package/lib/components/PopoverTrigger/PopoverTrigger.js.map +1 -1
  21. package/lib/components/PopoverTrigger/renderPopoverTrigger.js.map +1 -1
  22. package/lib/components/PopoverTrigger/usePopoverTrigger.js +6 -11
  23. package/lib/components/PopoverTrigger/usePopoverTrigger.js.map +1 -1
  24. package/lib/index.js.map +1 -1
  25. package/lib/popoverContext.js.map +1 -1
  26. package/lib-amd/components/Popover/Popover.types.js.map +1 -1
  27. package/lib-amd/components/Popover/usePopover.js +4 -1
  28. package/lib-amd/components/Popover/usePopover.js.map +1 -1
  29. package/lib-commonjs/Popover.js +0 -2
  30. package/lib-commonjs/Popover.js.map +1 -1
  31. package/lib-commonjs/PopoverSurface.js +0 -2
  32. package/lib-commonjs/PopoverSurface.js.map +1 -1
  33. package/lib-commonjs/PopoverTrigger.js +0 -2
  34. package/lib-commonjs/PopoverTrigger.js.map +1 -1
  35. package/lib-commonjs/components/Popover/Popover.js +0 -5
  36. package/lib-commonjs/components/Popover/Popover.js.map +1 -1
  37. package/lib-commonjs/components/Popover/Popover.types.js.map +1 -1
  38. package/lib-commonjs/components/Popover/constants.js +0 -1
  39. package/lib-commonjs/components/Popover/constants.js.map +1 -1
  40. package/lib-commonjs/components/Popover/index.js +0 -5
  41. package/lib-commonjs/components/Popover/index.js.map +1 -1
  42. package/lib-commonjs/components/Popover/renderPopover.js +0 -5
  43. package/lib-commonjs/components/Popover/renderPopover.js.map +1 -1
  44. package/lib-commonjs/components/Popover/usePopover.js +12 -37
  45. package/lib-commonjs/components/Popover/usePopover.js.map +1 -1
  46. package/lib-commonjs/components/PopoverSurface/PopoverSurface.js +0 -6
  47. package/lib-commonjs/components/PopoverSurface/PopoverSurface.js.map +1 -1
  48. package/lib-commonjs/components/PopoverSurface/PopoverSurface.types.js.map +1 -1
  49. package/lib-commonjs/components/PopoverSurface/index.js +0 -6
  50. package/lib-commonjs/components/PopoverSurface/index.js.map +1 -1
  51. package/lib-commonjs/components/PopoverSurface/renderPopoverSurface.js +2 -9
  52. package/lib-commonjs/components/PopoverSurface/renderPopoverSurface.js.map +1 -1
  53. package/lib-commonjs/components/PopoverSurface/usePopoverSurface.js +2 -16
  54. package/lib-commonjs/components/PopoverSurface/usePopoverSurface.js.map +1 -1
  55. package/lib-commonjs/components/PopoverSurface/usePopoverSurfaceStyles.js +80 -88
  56. package/lib-commonjs/components/PopoverSurface/usePopoverSurfaceStyles.js.map +1 -1
  57. package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.js +2 -7
  58. package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.js.map +1 -1
  59. package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.types.js.map +1 -1
  60. package/lib-commonjs/components/PopoverTrigger/index.js +0 -5
  61. package/lib-commonjs/components/PopoverTrigger/index.js.map +1 -1
  62. package/lib-commonjs/components/PopoverTrigger/renderPopoverTrigger.js +0 -2
  63. package/lib-commonjs/components/PopoverTrigger/renderPopoverTrigger.js.map +1 -1
  64. package/lib-commonjs/components/PopoverTrigger/usePopoverTrigger.js +6 -18
  65. package/lib-commonjs/components/PopoverTrigger/usePopoverTrigger.js.map +1 -1
  66. package/lib-commonjs/index.js +0 -8
  67. package/lib-commonjs/index.js.map +1 -1
  68. package/lib-commonjs/popoverContext.js +0 -4
  69. package/lib-commonjs/popoverContext.js.map +1 -1
  70. package/package.json +10 -10
@@ -4,13 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.usePopoverSurfaceStyles_unstable = exports.arrowHeights = exports.popoverSurfaceClassNames = void 0;
7
-
8
7
  const react_1 = /*#__PURE__*/require("@griffel/react");
9
-
10
8
  const react_positioning_1 = /*#__PURE__*/require("@fluentui/react-positioning");
11
-
12
9
  const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
13
-
14
10
  exports.popoverSurfaceClassNames = {
15
11
  root: 'fui-PopoverSurface'
16
12
  };
@@ -22,110 +18,106 @@ exports.arrowHeights = {
22
18
  /**
23
19
  * Styles for the root slot
24
20
  */
25
-
26
21
  const useStyles = /*#__PURE__*/react_1.__styles({
27
- "root": {
28
- "sj55zd": "f19n0e5",
29
- "De3pzq": "fxugw4r",
30
- "E5pizo": "f1hg901r",
31
- "Bbmb7ep": ["f1aa9q02", "f16jpd5f"],
32
- "Beyfa6y": ["f16jpd5f", "f1aa9q02"],
33
- "B7oj6ja": ["f1jar5jt", "fyu767a"],
34
- "Btl43ni": ["fyu767a", "f1jar5jt"],
35
- "B4j52fo": "f5ogflp",
36
- "Bekrc4i": ["f1hqa2wf", "finvdd3"],
37
- "Bn0qgzm": "f1f09k3d",
38
- "ibv6hh": ["finvdd3", "f1hqa2wf"],
39
- "icvyot": "fzkkow9",
40
- "vrafjx": ["fcdblym", "fjik90z"],
41
- "oivjwe": "fg706s2",
42
- "wvpqe5": ["fjik90z", "fcdblym"],
43
- "g2u3we": "fghlq4f",
44
- "h3c5rm": ["f1gn591s", "fjscplz"],
45
- "B9xav0g": "fb073pr",
46
- "zhjwy3": ["fjscplz", "f1gn591s"],
47
- "Bahqtrf": "fk6fouc",
48
- "Be2twd7": "fkhj508",
49
- "Bhrd7zp": "figsok6",
50
- "Bg96gwp": "f1i3iumi"
22
+ root: {
23
+ sj55zd: "f19n0e5",
24
+ De3pzq: "fxugw4r",
25
+ E5pizo: "f1hg901r",
26
+ Bbmb7ep: ["f1aa9q02", "f16jpd5f"],
27
+ Beyfa6y: ["f16jpd5f", "f1aa9q02"],
28
+ B7oj6ja: ["f1jar5jt", "fyu767a"],
29
+ Btl43ni: ["fyu767a", "f1jar5jt"],
30
+ B4j52fo: "f5ogflp",
31
+ Bekrc4i: ["f1hqa2wf", "finvdd3"],
32
+ Bn0qgzm: "f1f09k3d",
33
+ ibv6hh: ["finvdd3", "f1hqa2wf"],
34
+ icvyot: "fzkkow9",
35
+ vrafjx: ["fcdblym", "fjik90z"],
36
+ oivjwe: "fg706s2",
37
+ wvpqe5: ["fjik90z", "fcdblym"],
38
+ g2u3we: "fghlq4f",
39
+ h3c5rm: ["f1gn591s", "fjscplz"],
40
+ B9xav0g: "fb073pr",
41
+ zhjwy3: ["fjscplz", "f1gn591s"],
42
+ Bahqtrf: "fk6fouc",
43
+ Be2twd7: "fkhj508",
44
+ Bhrd7zp: "figsok6",
45
+ Bg96gwp: "f1i3iumi"
51
46
  },
52
- "inverted": {
53
- "De3pzq": "fg3r6xk",
54
- "sj55zd": "fonrgv7"
47
+ inverted: {
48
+ De3pzq: "fg3r6xk",
49
+ sj55zd: "fonrgv7"
55
50
  },
56
- "brand": {
57
- "De3pzq": "ffp7eso",
58
- "sj55zd": "f1phragk"
51
+ brand: {
52
+ De3pzq: "ffp7eso",
53
+ sj55zd: "f1phragk"
59
54
  },
60
- "smallPadding": {
61
- "z8tnut": "f1kcqot9",
62
- "z189sj": ["f11qrl6u", "fjlbh76"],
63
- "Byoj8tv": "fpe6lb7",
64
- "uwmqm3": ["fjlbh76", "f11qrl6u"]
55
+ smallPadding: {
56
+ z8tnut: "f1kcqot9",
57
+ z189sj: ["f11qrl6u", "fjlbh76"],
58
+ Byoj8tv: "fpe6lb7",
59
+ uwmqm3: ["fjlbh76", "f11qrl6u"]
65
60
  },
66
- "mediumPadding": {
67
- "z8tnut": "fqag9an",
68
- "z189sj": ["f1gbmcue", "f1rh9g5y"],
69
- "Byoj8tv": "fp67ikv",
70
- "uwmqm3": ["f1rh9g5y", "f1gbmcue"]
61
+ mediumPadding: {
62
+ z8tnut: "fqag9an",
63
+ z189sj: ["f1gbmcue", "f1rh9g5y"],
64
+ Byoj8tv: "fp67ikv",
65
+ uwmqm3: ["f1rh9g5y", "f1gbmcue"]
71
66
  },
72
- "largePadding": {
73
- "z8tnut": "fc7z3ec",
74
- "z189sj": ["fat0sn4", "fekwl8i"],
75
- "Byoj8tv": "fe2my4m",
76
- "uwmqm3": ["fekwl8i", "fat0sn4"]
67
+ largePadding: {
68
+ z8tnut: "fc7z3ec",
69
+ z189sj: ["fat0sn4", "fekwl8i"],
70
+ Byoj8tv: "fe2my4m",
71
+ uwmqm3: ["fekwl8i", "fat0sn4"]
77
72
  },
78
- "smallArrow": {
79
- "a9b677": "f1ekdpwm",
80
- "Bqenvij": "f83vc9z"
73
+ smallArrow: {
74
+ a9b677: "f1ekdpwm",
75
+ Bqenvij: "f83vc9z"
81
76
  },
82
- "mediumLargeArrow": {
83
- "a9b677": "f1kmc0fn",
84
- "Bqenvij": "fb6lvc5"
77
+ mediumLargeArrow: {
78
+ a9b677: "f1kmc0fn",
79
+ Bqenvij: "fb6lvc5"
85
80
  },
86
- "arrow": {
87
- "qhf8xq": "f1euv43f",
88
- "De3pzq": "f1u2r49w",
89
- "Bcdw1i0": "fd7fpy0",
90
- "Bj3rh1h": "f1bsuimh",
91
- "Ftih45": "f1wl9k8s",
92
- "B1puzpu": "f1wkw4r9",
93
- "Brfgrao": "f1j7ml58",
94
- "Bcvre1j": "fyl8oag",
95
- "Ccq8qp": "frdoeuz",
96
- "Baz25je": "fb81m9q",
97
- "cmx5o7": "f1ljr5q2",
98
- "B4f6apu": "fyfemzf",
99
- "m598lv": "focyt6c",
100
- "Bk5zm6e": "fnhxbxj",
101
- "y0oebl": "fdw6hkg",
102
- "qa3bma": "f11yjt3y",
103
- "Bqjgrrk": "f1172wan",
104
- "Budzafs": ["f9e5op9", "f112wvtl"],
105
- "Hv9wc6": ["ftj5xct", "fyavhwi"],
106
- "hl6cv3": "f1773hnp",
107
- "Bh2vraf": "f1n8855c",
108
- "yayu3t": "f1v7783n",
109
- "wedwtw": "fsw6im5",
110
- "rhl9o9": "fh2hsk5",
111
- "Bu8t5uz": "f159pzir",
112
- "B6q6orb": "f11yvu4",
113
- "Bwwlvwl": "fm1ycve"
81
+ arrow: {
82
+ qhf8xq: "f1euv43f",
83
+ De3pzq: "f1u2r49w",
84
+ Bcdw1i0: "fd7fpy0",
85
+ Bj3rh1h: "f1bsuimh",
86
+ Ftih45: "f1wl9k8s",
87
+ B1puzpu: "f1wkw4r9",
88
+ Brfgrao: "f1j7ml58",
89
+ Bcvre1j: "fyl8oag",
90
+ Ccq8qp: "frdoeuz",
91
+ Baz25je: "fb81m9q",
92
+ cmx5o7: "f1ljr5q2",
93
+ B4f6apu: "fyfemzf",
94
+ m598lv: "focyt6c",
95
+ Bk5zm6e: "fnhxbxj",
96
+ y0oebl: "fdw6hkg",
97
+ qa3bma: "f11yjt3y",
98
+ Bqjgrrk: "f1172wan",
99
+ Budzafs: ["f9e5op9", "f112wvtl"],
100
+ Hv9wc6: ["ftj5xct", "fyavhwi"],
101
+ hl6cv3: "f1773hnp",
102
+ Bh2vraf: "f1n8855c",
103
+ yayu3t: "f1v7783n",
104
+ wedwtw: "fsw6im5",
105
+ rhl9o9: "fh2hsk5",
106
+ Bu8t5uz: "f159pzir",
107
+ B6q6orb: "f11yvu4",
108
+ Bwwlvwl: "fm1ycve"
114
109
  }
115
110
  }, {
116
- "d": [".f19n0e5{color:var(--colorNeutralForeground1);}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".f1hg901r{box-shadow:var(--shadow16);}", ".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}", ".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}", ".f5ogflp{border-top-width:1px;}", ".f1hqa2wf{border-right-width:1px;}", ".finvdd3{border-left-width:1px;}", ".f1f09k3d{border-bottom-width:1px;}", ".fzkkow9{border-top-style:solid;}", ".fcdblym{border-right-style:solid;}", ".fjik90z{border-left-style:solid;}", ".fg706s2{border-bottom-style:solid;}", ".fghlq4f{border-top-color:var(--colorTransparentStroke);}", ".f1gn591s{border-right-color:var(--colorTransparentStroke);}", ".fjscplz{border-left-color:var(--colorTransparentStroke);}", ".fb073pr{border-bottom-color:var(--colorTransparentStroke);}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".fg3r6xk{background-color:var(--colorNeutralBackgroundStatic);}", ".fonrgv7{color:var(--colorNeutralForegroundStaticInverted);}", ".ffp7eso{background-color:var(--colorBrandBackground);}", ".f1phragk{color:var(--colorNeutralForegroundOnBrand);}", ".f1kcqot9{padding-top:12px;}", ".f11qrl6u{padding-right:12px;}", ".fjlbh76{padding-left:12px;}", ".fpe6lb7{padding-bottom:12px;}", ".fqag9an{padding-top:16px;}", ".f1gbmcue{padding-right:16px;}", ".f1rh9g5y{padding-left:16px;}", ".fp67ikv{padding-bottom:16px;}", ".fc7z3ec{padding-top:20px;}", ".fat0sn4{padding-right:20px;}", ".fekwl8i{padding-left:20px;}", ".fe2my4m{padding-bottom:20px;}", ".f1ekdpwm{width:8.484px;}", ".f83vc9z{height:8.484px;}", ".f1kmc0fn{width:11.312px;}", ".fb6lvc5{height:11.312px;}", ".f1euv43f{position:absolute;}", ".f1u2r49w{background-color:inherit;}", ".fd7fpy0{visibility:hidden;}", ".f1bsuimh{z-index:-1;}", ".f1wl9k8s::before{content:\"\";}", ".f1wkw4r9::before{visibility:visible;}", ".f1j7ml58::before{position:absolute;}", ".fyl8oag::before{box-sizing:border-box;}", ".frdoeuz::before{width:inherit;}", ".fb81m9q::before{height:inherit;}", ".f1ljr5q2::before{background-color:inherit;}", ".fyfemzf::before{border-right-width:1px;}", ".focyt6c::before{border-right-style:solid;}", ".fnhxbxj::before{border-right-color:var(--colorTransparentStroke);}", ".fdw6hkg::before{border-bottom-width:1px;}", ".f11yjt3y::before{border-bottom-style:solid;}", ".f1172wan::before{border-bottom-color:var(--colorTransparentStroke);}", ".f9e5op9::before{border-bottom-right-radius:var(--borderRadiusSmall);}", ".f112wvtl::before{border-bottom-left-radius:var(--borderRadiusSmall);}", ".ftj5xct::before{-webkit-transform:rotate(var(--angle)) translate(0, 50%) rotate(45deg);-moz-transform:rotate(var(--angle)) translate(0, 50%) rotate(45deg);-ms-transform:rotate(var(--angle)) translate(0, 50%) rotate(45deg);transform:rotate(var(--angle)) translate(0, 50%) rotate(45deg);}", ".fyavhwi::before{-webkit-transform:rotate(var(--angle)) translate(0, 50%) rotate(-45deg);-moz-transform:rotate(var(--angle)) translate(0, 50%) rotate(-45deg);-ms-transform:rotate(var(--angle)) translate(0, 50%) rotate(-45deg);transform:rotate(var(--angle)) translate(0, 50%) rotate(-45deg);}", "[data-popper-placement^=\"top\"] .f1773hnp{bottom:-1px;}", "[data-popper-placement^=\"top\"] .f1n8855c{--angle:0;}", "[data-popper-placement^=\"right\"] .f1v7783n{left:-1px;}", "[data-popper-placement^=\"right\"] .fsw6im5{--angle:90deg;}", "[data-popper-placement^=\"bottom\"] .fh2hsk5{top:-1px;}", "[data-popper-placement^=\"bottom\"] .f159pzir{--angle:180deg;}", "[data-popper-placement^=\"left\"] .f11yvu4{right:-1px;}", "[data-popper-placement^=\"left\"] .fm1ycve{--angle:270deg;}"]
111
+ d: [".f19n0e5{color:var(--colorNeutralForeground1);}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".f1hg901r{box-shadow:var(--shadow16);}", ".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}", ".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}", ".f5ogflp{border-top-width:1px;}", ".f1hqa2wf{border-right-width:1px;}", ".finvdd3{border-left-width:1px;}", ".f1f09k3d{border-bottom-width:1px;}", ".fzkkow9{border-top-style:solid;}", ".fcdblym{border-right-style:solid;}", ".fjik90z{border-left-style:solid;}", ".fg706s2{border-bottom-style:solid;}", ".fghlq4f{border-top-color:var(--colorTransparentStroke);}", ".f1gn591s{border-right-color:var(--colorTransparentStroke);}", ".fjscplz{border-left-color:var(--colorTransparentStroke);}", ".fb073pr{border-bottom-color:var(--colorTransparentStroke);}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".fg3r6xk{background-color:var(--colorNeutralBackgroundStatic);}", ".fonrgv7{color:var(--colorNeutralForegroundStaticInverted);}", ".ffp7eso{background-color:var(--colorBrandBackground);}", ".f1phragk{color:var(--colorNeutralForegroundOnBrand);}", ".f1kcqot9{padding-top:12px;}", ".f11qrl6u{padding-right:12px;}", ".fjlbh76{padding-left:12px;}", ".fpe6lb7{padding-bottom:12px;}", ".fqag9an{padding-top:16px;}", ".f1gbmcue{padding-right:16px;}", ".f1rh9g5y{padding-left:16px;}", ".fp67ikv{padding-bottom:16px;}", ".fc7z3ec{padding-top:20px;}", ".fat0sn4{padding-right:20px;}", ".fekwl8i{padding-left:20px;}", ".fe2my4m{padding-bottom:20px;}", ".f1ekdpwm{width:8.484px;}", ".f83vc9z{height:8.484px;}", ".f1kmc0fn{width:11.312px;}", ".fb6lvc5{height:11.312px;}", ".f1euv43f{position:absolute;}", ".f1u2r49w{background-color:inherit;}", ".fd7fpy0{visibility:hidden;}", ".f1bsuimh{z-index:-1;}", ".f1wl9k8s::before{content:\"\";}", ".f1wkw4r9::before{visibility:visible;}", ".f1j7ml58::before{position:absolute;}", ".fyl8oag::before{box-sizing:border-box;}", ".frdoeuz::before{width:inherit;}", ".fb81m9q::before{height:inherit;}", ".f1ljr5q2::before{background-color:inherit;}", ".fyfemzf::before{border-right-width:1px;}", ".focyt6c::before{border-right-style:solid;}", ".fnhxbxj::before{border-right-color:var(--colorTransparentStroke);}", ".fdw6hkg::before{border-bottom-width:1px;}", ".f11yjt3y::before{border-bottom-style:solid;}", ".f1172wan::before{border-bottom-color:var(--colorTransparentStroke);}", ".f9e5op9::before{border-bottom-right-radius:var(--borderRadiusSmall);}", ".f112wvtl::before{border-bottom-left-radius:var(--borderRadiusSmall);}", ".ftj5xct::before{-webkit-transform:rotate(var(--angle)) translate(0, 50%) rotate(45deg);-moz-transform:rotate(var(--angle)) translate(0, 50%) rotate(45deg);-ms-transform:rotate(var(--angle)) translate(0, 50%) rotate(45deg);transform:rotate(var(--angle)) translate(0, 50%) rotate(45deg);}", ".fyavhwi::before{-webkit-transform:rotate(var(--angle)) translate(0, 50%) rotate(-45deg);-moz-transform:rotate(var(--angle)) translate(0, 50%) rotate(-45deg);-ms-transform:rotate(var(--angle)) translate(0, 50%) rotate(-45deg);transform:rotate(var(--angle)) translate(0, 50%) rotate(-45deg);}", "[data-popper-placement^=\"top\"] .f1773hnp{bottom:-1px;}", "[data-popper-placement^=\"top\"] .f1n8855c{--angle:0;}", "[data-popper-placement^=\"right\"] .f1v7783n{left:-1px;}", "[data-popper-placement^=\"right\"] .fsw6im5{--angle:90deg;}", "[data-popper-placement^=\"bottom\"] .fh2hsk5{top:-1px;}", "[data-popper-placement^=\"bottom\"] .f159pzir{--angle:180deg;}", "[data-popper-placement^=\"left\"] .f11yvu4{right:-1px;}", "[data-popper-placement^=\"left\"] .fm1ycve{--angle:270deg;}"]
117
112
  });
118
113
  /**
119
114
  * Apply styling to the PopoverSurface slots based on the state
120
115
  */
121
-
122
-
123
116
  const usePopoverSurfaceStyles_unstable = state => {
124
117
  const styles = useStyles();
125
118
  state.root.className = react_1.mergeClasses(exports.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);
126
119
  state.arrowClassName = react_1.mergeClasses(styles.arrow, state.size === 'small' ? styles.smallArrow : styles.mediumLargeArrow);
127
120
  return state;
128
121
  };
129
-
130
122
  exports.usePopoverSurfaceStyles_unstable = usePopoverSurfaceStyles_unstable;
131
123
  //# sourceMappingURL=usePopoverSurfaceStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-popover/src/components/PopoverSurface/usePopoverSurfaceStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAKa,OAAA,CAAA,wBAAA,GAAgE;EAC3E,IAAI,EAAE;AADqE,CAAhE;AAIA,OAAA,CAAA,YAAA,GAA4C;EACvD,KAAK,EAAE,CADgD;EAEvD,MAAM,EAAE,CAF+C;EAGvD,KAAK,EAAE;AAHgD,CAA5C;AAMb;;AAEG;;AACH,MAAM,SAAS,gBAAG,OAAA,SAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;I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,KAAP;AACD,CAnBM;;AAAM,OAAA,CAAA,gCAAA,GAAgC,gCAAhC","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 = mergeClasses(\n styles.arrow,\n state.size === 'small' ? styles.smallArrow : styles.mediumLargeArrow,\n );\n\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAA;AACA;AACA;AAKaA,gCAAwB,GAAwC;EAC3EC,IAAI,EAAE;CACP;AAEYD,oBAAY,GAAgC;EACvDE,KAAK,EAAE,CAAC;EACRC,MAAM,EAAE,CAAC;EACTC,KAAK,EAAE;CACR;AAED;;;AAGA,MAAMC,SAAS,gBAAGC,gBAAU;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAmC1B;AAEF;;;AAGO,MAAMC,gCAAgC,GAAIC,KAA0B,IAAyB;EAClG,MAAMC,MAAM,GAAGJ,SAAS,EAAE;EAC1BG,KAAK,CAACP,IAAI,CAACS,SAAS,GAAGJ,oBAAY,CACjCN,gCAAwB,CAACC,IAAI,EAC7BQ,MAAM,CAACR,IAAI,EACXO,KAAK,CAACG,IAAI,KAAK,OAAO,IAAIF,MAAM,CAACG,YAAY,EAC7CJ,KAAK,CAACG,IAAI,KAAK,QAAQ,IAAIF,MAAM,CAACI,aAAa,EAC/CL,KAAK,CAACG,IAAI,KAAK,OAAO,IAAIF,MAAM,CAACK,YAAY,EAC7CN,KAAK,CAACO,UAAU,KAAK,UAAU,IAAIN,MAAM,CAACO,QAAQ,EAClDR,KAAK,CAACO,UAAU,KAAK,OAAO,IAAIN,MAAM,CAACQ,KAAK,EAC5CT,KAAK,CAACP,IAAI,CAACS,SAAS,CACrB;EAEDF,KAAK,CAACU,cAAc,GAAGZ,oBAAY,CACjCG,MAAM,CAACU,KAAK,EACZX,KAAK,CAACG,IAAI,KAAK,OAAO,GAAGF,MAAM,CAACW,UAAU,GAAGX,MAAM,CAACY,gBAAgB,CACrE;EAED,OAAOb,KAAK;AACd,CAAC;AAnBYR,wCAAgC","names":["exports","root","small","medium","large","useStyles","react_1","usePopoverSurfaceStyles_unstable","state","styles","className","size","smallPadding","mediumPadding","largePadding","appearance","inverted","brand","arrowClassName","arrow","smallArrow","mediumLargeArrow"],"sourceRoot":"../src/","sources":["packages/react-components/react-popover/src/components/PopoverSurface/usePopoverSurfaceStyles.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 = mergeClasses(\n styles.arrow,\n state.size === 'small' ? styles.smallArrow : styles.mediumLargeArrow,\n );\n\n return state;\n};\n"]}
@@ -4,22 +4,17 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.PopoverTrigger = void 0;
7
-
8
7
  const usePopoverTrigger_1 = /*#__PURE__*/require("./usePopoverTrigger");
9
-
10
8
  const renderPopoverTrigger_1 = /*#__PURE__*/require("./renderPopoverTrigger");
11
9
  /**
12
10
  * Wraps a trigger element as an only child and adds the necessary event handling to open a popover.
13
11
  */
14
-
15
-
16
12
  const PopoverTrigger = props => {
17
13
  const state = usePopoverTrigger_1.usePopoverTrigger_unstable(props);
18
14
  return renderPopoverTrigger_1.renderPopoverTrigger_unstable(state);
19
15
  };
20
-
21
16
  exports.PopoverTrigger = PopoverTrigger;
22
- exports.PopoverTrigger.displayName = 'PopoverTrigger'; // type casting here is required to ensure internal type FluentTriggerComponent is not leaked
23
-
17
+ exports.PopoverTrigger.displayName = 'PopoverTrigger';
18
+ // type casting here is required to ensure internal type FluentTriggerComponent is not leaked
24
19
  exports.PopoverTrigger.isFluentTriggerComponent = true;
25
20
  //# sourceMappingURL=PopoverTrigger.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-popover/src/components/PopoverTrigger/PopoverTrigger.tsx"],"names":[],"mappings":";;;;;;;AACA,MAAA,mBAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;;AACA,MAAA,sBAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;AAIA;;AAEG;;;AACI,MAAM,cAAc,GAAkC,KAAK,IAAG;EACnE,MAAM,KAAK,GAAG,mBAAA,CAAA,0BAAA,CAA2B,KAA3B,CAAd;EAEA,OAAO,sBAAA,CAAA,6BAAA,CAA8B,KAA9B,CAAP;AACD,CAJM;;AAAM,OAAA,CAAA,cAAA,GAAc,cAAd;AAMb,OAAA,CAAA,cAAA,CAAe,WAAf,GAA6B,gBAA7B,C,CACA;;AACC,OAAA,CAAA,cAAA,CAA0C,wBAA1C,GAAqE,IAArE","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"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AACA;AACA;AAIA;;;AAGO,MAAMA,cAAc,GAAkCC,KAAK,IAAG;EACnE,MAAMC,KAAK,GAAGC,8CAA0B,CAACF,KAAK,CAAC;EAE/C,OAAOG,oDAA6B,CAACF,KAAK,CAAC;AAC7C,CAAC;AAJYG,sBAAc;AAM3BA,sBAAc,CAACC,WAAW,GAAG,gBAAgB;AAC7C;AACCD,sBAAyC,CAACE,wBAAwB,GAAG,IAAI","names":["PopoverTrigger","props","state","usePopoverTrigger_1","renderPopoverTrigger_1","exports","displayName","isFluentTriggerComponent"],"sourceRoot":"../src/","sources":["packages/react-components/react-popover/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"]}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"","names":[],"sourceRoot":"../src/","sources":[],"sourcesContent":[]}
@@ -3,14 +3,9 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
-
7
6
  const tslib_1 = /*#__PURE__*/require("tslib");
8
-
9
7
  tslib_1.__exportStar(require("./PopoverTrigger"), exports);
10
-
11
8
  tslib_1.__exportStar(require("./PopoverTrigger.types"), exports);
12
-
13
9
  tslib_1.__exportStar(require("./renderPopoverTrigger"), exports);
14
-
15
10
  tslib_1.__exportStar(require("./usePopoverTrigger"), exports);
16
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-popover/src/components/PopoverTrigger/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,wBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,wBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,qBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './PopoverTrigger';\nexport * from './PopoverTrigger.types';\nexport * from './renderPopoverTrigger';\nexport * from './usePopoverTrigger';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAAA;AACAA;AACAA;AACAA","names":["tslib_1"],"sourceRoot":"../src/","sources":["packages/react-components/react-popover/src/components/PopoverTrigger/index.ts"],"sourcesContent":["export * from './PopoverTrigger';\nexport * from './PopoverTrigger.types';\nexport * from './renderPopoverTrigger';\nexport * from './usePopoverTrigger';\n"]}
@@ -7,10 +7,8 @@ exports.renderPopoverTrigger_unstable = void 0;
7
7
  /**
8
8
  * Render the final JSX of PopoverTrigger
9
9
  */
10
-
11
10
  const renderPopoverTrigger_unstable = state => {
12
11
  return state.children;
13
12
  };
14
-
15
13
  exports.renderPopoverTrigger_unstable = renderPopoverTrigger_unstable;
16
14
  //# sourceMappingURL=renderPopoverTrigger.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-popover/src/components/PopoverTrigger/renderPopoverTrigger.tsx"],"names":[],"mappings":";;;;;;AAEA;;AAEG;;AACI,MAAM,6BAA6B,GAAI,KAAD,IAA+B;EAC1E,OAAO,KAAK,CAAC,QAAb;AACD,CAFM;;AAAM,OAAA,CAAA,6BAAA,GAA6B,6BAA7B","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"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAEA;;;AAGO,MAAMA,6BAA6B,GAAIC,KAA0B,IAAI;EAC1E,OAAOA,KAAK,CAACC,QAAQ;AACvB,CAAC;AAFYC,qCAA6B","names":["renderPopoverTrigger_unstable","state","children","exports"],"sourceRoot":"../src/","sources":["packages/react-components/react-popover/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"]}
@@ -4,15 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.usePopoverTrigger_unstable = void 0;
7
-
8
7
  const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
9
-
10
8
  const react_tabster_1 = /*#__PURE__*/require("@fluentui/react-tabster");
11
-
12
9
  const popoverContext_1 = /*#__PURE__*/require("../../popoverContext");
13
-
14
10
  const react_aria_1 = /*#__PURE__*/require("@fluentui/react-aria");
15
-
16
11
  const keyboard_keys_1 = /*#__PURE__*/require("@fluentui/keyboard-keys");
17
12
  /**
18
13
  * Create the state required to render PopoverTrigger.
@@ -22,8 +17,6 @@ const keyboard_keys_1 = /*#__PURE__*/require("@fluentui/keyboard-keys");
22
17
  *
23
18
  * @param props - props from this instance of PopoverTrigger
24
19
  */
25
-
26
-
27
20
  const usePopoverTrigger_unstable = props => {
28
21
  const {
29
22
  children,
@@ -39,42 +32,37 @@ const usePopoverTrigger_unstable = props => {
39
32
  const {
40
33
  triggerAttributes
41
34
  } = react_tabster_1.useModalAttributes();
42
-
43
35
  const onContextMenu = e => {
44
36
  if (openOnContext) {
45
37
  e.preventDefault();
46
38
  setOpen(e, true);
47
39
  }
48
40
  };
49
-
50
41
  const onClick = e => {
51
42
  if (!openOnContext) {
52
43
  toggleOpen(e);
53
44
  }
54
45
  };
55
-
56
46
  const onKeyDown = e => {
57
47
  if (e.key === keyboard_keys_1.Escape && open) {
58
- setOpen(e, false); // stop propagation to avoid conflicting with other elements that listen for `Escape`
48
+ setOpen(e, false);
49
+ // stop propagation to avoid conflicting with other elements that listen for `Escape`
59
50
  // e,g: Dialog, Menu
60
-
61
51
  e.stopPropagation();
62
52
  }
63
53
  };
64
-
65
54
  const onMouseEnter = e => {
66
55
  if (openOnHover) {
67
56
  setOpen(e, true);
68
57
  }
69
58
  };
70
-
71
59
  const onMouseLeave = e => {
72
60
  if (openOnHover) {
73
61
  setOpen(e, false);
74
62
  }
75
63
  };
76
-
77
- const contextMenuProps = { ...triggerAttributes,
64
+ const contextMenuProps = {
65
+ ...triggerAttributes,
78
66
  'aria-expanded': `${open}`,
79
67
  ...(child === null || child === void 0 ? void 0 : child.props),
80
68
  onMouseEnter: react_utilities_1.useEventCallback(react_utilities_1.mergeCallbacks(child === null || child === void 0 ? void 0 : child.props.onMouseEnter, onMouseEnter)),
@@ -82,7 +70,8 @@ const usePopoverTrigger_unstable = props => {
82
70
  onContextMenu: react_utilities_1.useEventCallback(react_utilities_1.mergeCallbacks(child === null || child === void 0 ? void 0 : child.props.onContextMenu, onContextMenu)),
83
71
  ref: react_utilities_1.useMergedRefs(triggerRef, child === null || child === void 0 ? void 0 : child.ref)
84
72
  };
85
- const triggerChildProps = { ...contextMenuProps,
73
+ const triggerChildProps = {
74
+ ...contextMenuProps,
86
75
  onClick: react_utilities_1.useEventCallback(react_utilities_1.mergeCallbacks(child === null || child === void 0 ? void 0 : child.props.onClick, onClick)),
87
76
  onKeyDown: react_utilities_1.useEventCallback(react_utilities_1.mergeCallbacks(child === null || child === void 0 ? void 0 : child.props.onKeyDown, onKeyDown))
88
77
  };
@@ -91,6 +80,5 @@ const usePopoverTrigger_unstable = props => {
91
80
  children: react_utilities_1.applyTriggerPropsToChildren(props.children, react_aria_1.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))
92
81
  };
93
82
  };
94
-
95
83
  exports.usePopoverTrigger_unstable = usePopoverTrigger_unstable;
96
84
  //# sourceMappingURL=usePopoverTrigger.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-popover/src/components/PopoverTrigger/usePopoverTrigger.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAOA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,sBAAA,CAAA;;AAEA,MAAA,YAAA,gBAAA,OAAA,CAAA,sBAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;AAEA;;;;;;;AAOG;;;AACI,MAAM,0BAA0B,GAAI,KAAD,IAAoD;EAC5F,MAAM;IAAE,QAAF;IAAY,wBAAwB,GAAG;EAAvC,IAAiD,KAAvD;EACA,MAAM,KAAK,GAAG,iBAAA,CAAA,eAAA,CAAgB,QAAhB,CAAd;EAEA,MAAM,IAAI,GAAG,gBAAA,CAAA,0BAAA,CAA2B,OAAO,IAAI,OAAO,CAAC,IAA9C,CAAb;EACA,MAAM,OAAO,GAAG,gBAAA,CAAA,0BAAA,CAA2B,OAAO,IAAI,OAAO,CAAC,OAA9C,CAAhB;EACA,MAAM,UAAU,GAAG,gBAAA,CAAA,0BAAA,CAA2B,OAAO,IAAI,OAAO,CAAC,UAA9C,CAAnB;EACA,MAAM,UAAU,GAAG,gBAAA,CAAA,0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AA,kBAAA,CAClC,CAAA,KAAK,KAAA,IAAL,IAAA,KAAK,KAAA,KAAA,CAAL,GAAK,KAAA,CAAL,GAAA,KAAK,CAAE,IAAP,MAAgB,QAAhB,IAA4B,CAAA,KAAK,KAAA,IAAL,IAAA,KAAK,KAAA,KAAA,CAAL,GAAK,KAAA,CAAL,GAAA,KAAK,CAAE,IAAP,MAAgB,GAA5C,GAAkD,KAAK,CAAC,IAAxD,GAA+D,KAD7B,EAElC,iBAFkC,CAApC;EAKA,OAAO;IACL,QAAQ,EAAE,iBAAA,CAAA,2BAAA,CACR,KAAK,CAAC,QADE,EAER,YAAA,CAAA,kBAAA,CACE,CAAA,KAAK,KAAA,IAAL,IAAA,KAAK,KAAA,KAAA,CAAL,GAAK,KAAA,CAAL,GAAA,KAAK,CAAE,IAAP,MAAgB,QAAhB,IAA4B,CAAA,KAAK,KAAA,IAAL,IAAA,KAAK,KAAA,KAAA,CAAL,GAAK,KAAA,CAAL,GAAA,KAAK,CAAE,IAAP,MAAgB,GAA5C,GAAkD,KAAK,CAAC,IAAxD,GAA+D,KADjE,EAEE,aAAa,GAAG,gBAAH,GAAsB,wBAAwB,GAAG,iBAAH,GAAuB,2BAFpF,CAFQ;EADL,CAAP;AASD,CA5EM;;AAAM,OAAA,CAAA,0BAAA,GAA0B,0BAA1B","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"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AACA;AAOA;AACA;AAEA;AACA;AAEA;;;;;;;;AAQO,MAAMA,0BAA0B,GAAIC,KAA0B,IAAyB;EAC5F,MAAM;IAAEC,QAAQ;IAAEC,wBAAwB,GAAG;EAAK,CAAE,GAAGF,KAAK;EAC5D,MAAMG,KAAK,GAAGC,iCAAe,CAACH,QAAQ,CAAC;EAEvC,MAAMI,IAAI,GAAGC,2CAA0B,CAACC,OAAO,IAAIA,OAAO,CAACF,IAAI,CAAC;EAChE,MAAMG,OAAO,GAAGF,2CAA0B,CAACC,OAAO,IAAIA,OAAO,CAACC,OAAO,CAAC;EACtE,MAAMC,UAAU,GAAGH,2CAA0B,CAACC,OAAO,IAAIA,OAAO,CAACE,UAAU,CAAC;EAC5E,MAAMC,UAAU,GAAGJ,2CAA0B,CAACC,OAAO,IAAIA,OAAO,CAACG,UAAU,CAAC;EAC5E,MAAMC,WAAW,GAAGL,2CAA0B,CAACC,OAAO,IAAIA,OAAO,CAACI,WAAW,CAAC;EAC9E,MAAMC,aAAa,GAAGN,2CAA0B,CAACC,OAAO,IAAIA,OAAO,CAACK,aAAa,CAAC;EAClF,MAAM;IAAEC;EAAiB,CAAE,GAAGC,kCAAkB,EAAE;EAElD,MAAMC,aAAa,GAAIC,CAAgC,IAAI;IACzD,IAAIJ,aAAa,EAAE;MACjBI,CAAC,CAACC,cAAc,EAAE;MAClBT,OAAO,CAACQ,CAAC,EAAE,IAAI,CAAC;;EAEpB,CAAC;EAED,MAAME,OAAO,GAAIF,CAAgC,IAAI;IACnD,IAAI,CAACJ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A,gCAAc,CAACD,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEH,KAAK,CAACkB,OAAO,EAAEA,OAAO,CAAC,CAAC;IACxEC,SAAS,EAAEf,kCAAgB,CAACA,gCAAc,CAACD,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEH,KAAK,CAACmB,SAAS,EAAEA,SAAS,CAAC;GAC9E;EAED,MAAMS,2BAA2B,GAAGC,+BAAkB,CACpD,MAAK,aAAL1B,KAAK,uBAALA,KAAK,CAAE2B,IAAI,MAAK,QAAQ,IAAI,MAAK,aAAL3B,KAAK,uBAALA,KAAK,CAAE2B,IAAI,MAAK,GAAG,GAAG3B,KAAK,CAAC2B,IAAI,GAAG,KAAK,EACpEH,iBAAiB,CAClB;EAED,OAAO;IACL1B,QAAQ,EAAEG,6CAA2B,CACnCJ,KAAK,CAACC,QAAQ,EACd4B,+BAAkB,CAChB,MAAK,aAAL1B,KAAK,uBAALA,KAAK,CAAE2B,IAAI,MAAK,QAAQ,IAAI,MAAK,aAAL3B,KAAK,uBAALA,KAAK,CAAE2B,IAAI,MAAK,GAAG,GAAG3B,KAAK,CAAC2B,IAAI,GAAG,KAAK,EACpElB,aAAa,GAAGa,gBAAgB,GAAGvB,wBAAwB,GAAGyB,iBAAiB,GAAGC,2BAA2B,CAC9G;GAEJ;AACH,CAAC;AA5EYG,kCAA0B","names":["usePopoverTrigger_unstable","props","children","disableButtonEnhancement","child","react_utilities_1","open","popoverContext_1","context","setOpen","toggleOpen","triggerRef","openOnHover","openOnContext","triggerAttributes","react_tabster_1","onContextMenu","e","preventDefault","onClick","onKeyDown","key","keyboard_keys_1","stopPropagation","onMouseEnter","onMouseLeave","contextMenuProps","ref","triggerChildProps","ariaButtonTriggerChildProps","react_aria_1","type","exports"],"sourceRoot":"../src/","sources":["packages/react-components/react-popover/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"]}
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.usePopoverTrigger_unstable = exports.renderPopoverTrigger_unstable = exports.PopoverTrigger = exports.usePopoverContext_unstable = exports.PopoverProvider = exports.usePopoverSurface_unstable = exports.usePopoverSurfaceStyles_unstable = exports.renderPopoverSurface_unstable = exports.popoverSurfaceClassNames = exports.arrowHeights = exports.PopoverSurface = exports.usePopover_unstable = exports.renderPopover_unstable = exports.Popover = void 0;
7
-
8
7
  var Popover_1 = /*#__PURE__*/require("./Popover");
9
-
10
8
  Object.defineProperty(exports, "Popover", {
11
9
  enumerable: true,
12
10
  get: function () {
@@ -25,9 +23,7 @@ Object.defineProperty(exports, "usePopover_unstable", {
25
23
  return Popover_1.usePopover_unstable;
26
24
  }
27
25
  });
28
-
29
26
  var PopoverSurface_1 = /*#__PURE__*/require("./PopoverSurface");
30
-
31
27
  Object.defineProperty(exports, "PopoverSurface", {
32
28
  enumerable: true,
33
29
  get: function () {
@@ -64,9 +60,7 @@ Object.defineProperty(exports, "usePopoverSurface_unstable", {
64
60
  return PopoverSurface_1.usePopoverSurface_unstable;
65
61
  }
66
62
  });
67
-
68
63
  var popoverContext_1 = /*#__PURE__*/require("./popoverContext");
69
-
70
64
  Object.defineProperty(exports, "PopoverProvider", {
71
65
  enumerable: true,
72
66
  get: function () {
@@ -79,9 +73,7 @@ Object.defineProperty(exports, "usePopoverContext_unstable", {
79
73
  return popoverContext_1.usePopoverContext_unstable;
80
74
  }
81
75
  });
82
-
83
76
  var PopoverTrigger_1 = /*#__PURE__*/require("./PopoverTrigger");
84
-
85
77
  Object.defineProperty(exports, "PopoverTrigger", {
86
78
  enumerable: true,
87
79
  get: function () {
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-popover/src/index.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,SAAA,gBAAA,OAAA,CAAA,WAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,SAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,SAAA,CAAA,OAAA;EAAO;AAAP,CAAA;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,wBAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,SAAA,CAAA,sBAAA;EAAsB;AAAtB,CAAA;AAAwB,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,qBAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,SAAA,CAAA,mBAAA;EAAmB;AAAnB,CAAA;;AAE1C,IAAA,gBAAA,gBAAA,OAAA,CAAA,kBAAA,CAAA;;AACE,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,gBAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,gBAAA,CAAA,cAAA;EAAc;AAAd,CAAA;AACA,MAAA,CAAA,c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AA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,gBAAA,CAAA,cAAA;EAAc;AAAd,CAAA;AAAgB,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,+BAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,gBAAA,CAAA,6BAAA;EAA6B;AAA7B,CAAA;AAA+B,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,4BAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,gBAAA,CAAA,0BAAA;EAA0B;AAA1B,CAAA","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"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAA;AAASA;EAAAC;EAAAC;IAAA,wBAAO;EAAA;AAAA;AAAEF;EAAAC;EAAAC;IAAA,uCAAsB;EAAA;AAAA;AAAEF;EAAAC;EAAAC;IAAA,oCAAmB;EAAA;AAAA;AAE7D;AACEF;EAAAC;EAAAC;IAAA,sCAAc;EAAA;AAAA;AACdF;EAAAC;EAAAC;IAAA,oCAAY;EAAA;AAAA;AACZF;EAAAC;EAAAC;IAAA,gDAAwB;EAAA;AAAA;AACxBF;EAAAC;EAAAC;IAAA,qDAA6B;EAAA;AAAA;AAC7BF;EAAAC;EAAAC;IAAA,wDAAgC;EAAA;AAAA;AAChCF;EAAAC;EAAAC;IAAA,kDAA0B;EAAA;AAAA;AAG5B;AAASF;EAAAC;EAAAC;IAAA,uCAAe;EAAA;AAAA;AAAEF;EAAAC;EAAAC;IAAA,kDAA0B;EAAA;AAAA;AAEpD;AAASF;EAAAC;EAAAC;IAAA,sCAAc;EAAA;AAAA;AAAEF;EAAAC;EAAAC;IAAA,qDAA6B;EAAA;AAAA;AAAEF;EAAAC;EAAAC;IAAA,kDAA0B;EAAA;AAAA","names":["Object","enumerable","get"],"sourceRoot":"../src/","sources":["packages/react-components/react-popover/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"]}
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.usePopoverContext_unstable = exports.PopoverProvider = exports.PopoverContext = void 0;
7
-
8
7
  const react_context_selector_1 = /*#__PURE__*/require("@fluentui/react-context-selector");
9
-
10
8
  exports.PopoverContext = /*#__PURE__*/react_context_selector_1.createContext(undefined);
11
9
  const popoverContextDefaultValue = {
12
10
  open: false,
@@ -28,8 +26,6 @@ const popoverContextDefaultValue = {
28
26
  inline: false
29
27
  };
30
28
  exports.PopoverProvider = exports.PopoverContext.Provider;
31
-
32
29
  const usePopoverContext_unstable = selector => react_context_selector_1.useContextSelector(exports.PopoverContext, (ctx = popoverContextDefaultValue) => selector(ctx));
33
-
34
30
  exports.usePopoverContext_unstable = usePopoverContext_unstable;
35
31
  //# sourceMappingURL=popoverContext.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-popover/src/popoverContext.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,wBAAA,gBAAA,OAAA,CAAA,kCAAA,CAAA;;AAIa,OAAA,CAAA,cAAA,gBAA+C,wBAAA,CAAA,aAAA,CAC1D,SAD0D,CAA/C;AAGb,MAAM,0BAA0B,GAAwB;EACtD,IAAI,EAAE,KADgD;EAEtD,OAAO,EAAE,MAAM,IAFuC;EAGtD,UAAU,EAAE,MAAM,IAHoC;EAItD,UAAU,EAAE;IAAE,OAAO,EAAE;EAAX,CAJ0C;EAKtD,UAAU,EAAE;IAAE,OAAO,EAAE;EAAX,CAL0C;EAMtD,QAAQ,EAAE;IAAE,OAAO,EAAE;EAAX,CAN4C;EAOtD,aAAa,EAAE,KAPuC;EAQtD,WAAW,EAAE,KARyC;EAStD,IAAI,EAAE,QATgD;EAUtD,SAAS,EAAE,KAV2C;EAWtD,MAAM,EAAE;AAX8C,CAAxD;AAca,OAAA,CAAA,eAAA,GAAkB,OAAA,CAAA,cAAA,CAAe,QAAjC;;AAwBN,MAAM,0BAA0B,GAAO,QAAJ,IACxC,wBAAA,CAAA,kBAAA,CAAmB,OAAA,CAAA,cAAnB,EAAmC,CAAC,GAAG,GAAG,0BAAP,KAAsC,QAAQ,CAAC,GAAD,CAAjF,CADK;;AAAM,OAAA,CAAA,0BAAA,GAA0B,0BAA1B","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 | 'legacyTrapFocus'\n | 'inline'\n>;\n\nexport const usePopoverContext_unstable = <T>(selector: ContextSelector<PopoverContextValue, T>): T =>\n useContextSelector(PopoverContext, (ctx = popoverContextDefaultValue) => selector(ctx));\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAA;AAIaA,sBAAc,gBAAiCC,sCAAa,CACvEC,SAAS,CACsB;AACjC,MAAMC,0BAA0B,GAAwB;EACtDC,IAAI,EAAE,KAAK;EACXC,OAAO,EAAE,MAAM,IAAI;EACnBC,UAAU,EAAE,MAAM,IAAI;EACtBC,UAAU,EAAE;IAAEC,OAAO,EAAE;EAAI,CAAE;EAC7BC,UAAU,EAAE;IAAED,OAAO,EAAE;EAAI,CAAE;EAC7BE,QAAQ,EAAE;IAAEF,OAAO,EAAE;EAAI,CAAE;EAC3BG,aAAa,EAAE,KAAK;EACpBC,WAAW,EAAE,KAAK;EAClBC,IAAI,EAAE,QAAiB;EACvBC,SAAS,EAAE,KAAK;EAChBC,MAAM,EAAE;CACT;AAEYf,uBAAe,GAAGA,sBAAc,CAACgB,QAAQ;AAwB/C,MAAMC,0BAA0B,GAAOC,QAAiD,IAC7FjB,2CAAkB,CAACD,sBAAc,EAAE,CAACmB,GAAG,GAAGhB,0BAA0B,KAAKe,QAAQ,CAACC,GAAG,CAAC,CAAC;AAD5EnB,kCAA0B","names":["exports","react_context_selector_1","undefined","popoverContextDefaultValue","open","setOpen","toggleOpen","triggerRef","current","contentRef","arrowRef","openOnContext","openOnHover","size","trapFocus","inline","Provider","usePopoverContext_unstable","selector","ctx"],"sourceRoot":"../src/","sources":["packages/react-components/react-popover/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 | 'legacyTrapFocus'\n | 'inline'\n>;\n\nexport const usePopoverContext_unstable = <T>(selector: ContextSelector<PopoverContextValue, T>): T =>\n useContextSelector(PopoverContext, (ctx = popoverContextDefaultValue) => selector(ctx));\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-popover",
3
- "version": "9.3.5",
3
+ "version": "9.4.0",
4
4
  "description": "Popover component for Fluent UI",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -29,20 +29,20 @@
29
29
  "devDependencies": {
30
30
  "@fluentui/eslint-plugin": "*",
31
31
  "@fluentui/react-conformance": "*",
32
- "@fluentui/react-conformance-griffel": "9.0.0-beta.18",
33
- "@fluentui/scripts": "^1.0.0"
32
+ "@fluentui/react-conformance-griffel": "9.0.0-beta.19",
33
+ "@fluentui/scripts": "*"
34
34
  },
35
35
  "dependencies": {
36
36
  "@fluentui/keyboard-keys": "^9.0.1",
37
- "@fluentui/react-aria": "^9.3.3",
38
- "@fluentui/react-context-selector": "^9.1.3",
39
- "@fluentui/react-portal": "^9.0.14",
40
- "@fluentui/react-positioning": "^9.3.5",
37
+ "@fluentui/react-aria": "^9.3.5",
38
+ "@fluentui/react-context-selector": "^9.1.5",
39
+ "@fluentui/react-portal": "^9.1.0",
40
+ "@fluentui/react-positioning": "^9.3.7",
41
41
  "@fluentui/react-shared-contexts": "^9.1.4",
42
- "@fluentui/react-tabster": "^9.3.4",
42
+ "@fluentui/react-tabster": "^9.3.6",
43
43
  "@fluentui/react-theme": "^9.1.5",
44
- "@fluentui/react-utilities": "^9.3.0",
45
- "@griffel/react": "^1.4.2",
44
+ "@fluentui/react-utilities": "^9.4.0",
45
+ "@griffel/react": "^1.5.2",
46
46
  "tslib": "^2.1.0"
47
47
  },
48
48
  "peerDependencies": {