@fluentui/react-popover 0.0.0-nightly-20220527-0422.1 → 0.0.0-nightly-20220607-0421.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +96 -3
 - package/CHANGELOG.md +26 -4
 - package/lib/components/Popover/Popover.js.map +1 -1
 - package/lib/components/Popover/renderPopover.js.map +1 -1
 - package/lib/components/Popover/usePopover.js +1 -1
 - package/lib/components/Popover/usePopover.js.map +1 -1
 - package/lib/components/PopoverSurface/PopoverSurface.js.map +1 -1
 - package/lib/components/PopoverSurface/renderPopoverSurface.js.map +1 -1
 - package/lib/components/PopoverSurface/usePopoverSurface.js.map +1 -1
 - package/lib/components/PopoverSurface/usePopoverSurfaceStyles.js.map +1 -1
 - package/lib/components/PopoverTrigger/PopoverTrigger.js.map +1 -1
 - package/lib/components/PopoverTrigger/renderPopoverTrigger.js.map +1 -1
 - package/lib/components/PopoverTrigger/usePopoverTrigger.js.map +1 -1
 - package/lib/popoverContext.js.map +1 -1
 - package/lib-commonjs/components/Popover/Popover.js.map +1 -1
 - package/lib-commonjs/components/Popover/renderPopover.js.map +1 -1
 - package/lib-commonjs/components/Popover/usePopover.js +1 -1
 - package/lib-commonjs/components/Popover/usePopover.js.map +1 -1
 - package/lib-commonjs/components/PopoverSurface/PopoverSurface.js.map +1 -1
 - package/lib-commonjs/components/PopoverSurface/renderPopoverSurface.js.map +1 -1
 - package/lib-commonjs/components/PopoverSurface/usePopoverSurface.js.map +1 -1
 - package/lib-commonjs/components/PopoverSurface/usePopoverSurfaceStyles.js.map +1 -1
 - package/lib-commonjs/components/PopoverTrigger/PopoverTrigger.js.map +1 -1
 - package/lib-commonjs/components/PopoverTrigger/renderPopoverTrigger.js.map +1 -1
 - package/lib-commonjs/components/PopoverTrigger/usePopoverTrigger.js.map +1 -1
 - package/lib-commonjs/index.js.map +1 -1
 - package/lib-commonjs/popoverContext.js.map +1 -1
 - package/package.json +10 -10
 
    
        package/CHANGELOG.json
    CHANGED
    
    | 
         @@ -2,16 +2,109 @@ 
     | 
|
| 
       2 
2 
     | 
    
         
             
              "name": "@fluentui/react-popover",
         
     | 
| 
       3 
3 
     | 
    
         
             
              "entries": [
         
     | 
| 
       4 
4 
     | 
    
         
             
                {
         
     | 
| 
       5 
     | 
    
         
            -
                  "date": " 
     | 
| 
       6 
     | 
    
         
            -
                  "tag": "@fluentui/react-popover_v0.0.0-nightly- 
     | 
| 
       7 
     | 
    
         
            -
                  "version": "0.0.0-nightly- 
     | 
| 
      
 5 
     | 
    
         
            +
                  "date": "Tue, 07 Jun 2022 04:34:28 GMT",
         
     | 
| 
      
 6 
     | 
    
         
            +
                  "tag": "@fluentui/react-popover_v0.0.0-nightly-20220607-0421.1",
         
     | 
| 
      
 7 
     | 
    
         
            +
                  "version": "0.0.0-nightly-20220607-0421.1",
         
     | 
| 
       8 
8 
     | 
    
         
             
                  "comments": {
         
     | 
| 
       9 
9 
     | 
    
         
             
                    "prerelease": [
         
     | 
| 
      
 10 
     | 
    
         
            +
                      {
         
     | 
| 
      
 11 
     | 
    
         
            +
                        "author": "beachball",
         
     | 
| 
      
 12 
     | 
    
         
            +
                        "package": "@fluentui/react-popover",
         
     | 
| 
      
 13 
     | 
    
         
            +
                        "comment": "Bump @fluentui/react-context-selector to v0.0.0-nightly-20220607-0421.1",
         
     | 
| 
      
 14 
     | 
    
         
            +
                        "commit": "b264fd655a010e09847726c4b0481262f8f4a949"
         
     | 
| 
      
 15 
     | 
    
         
            +
                      },
         
     | 
| 
      
 16 
     | 
    
         
            +
                      {
         
     | 
| 
      
 17 
     | 
    
         
            +
                        "author": "beachball",
         
     | 
| 
      
 18 
     | 
    
         
            +
                        "package": "@fluentui/react-popover",
         
     | 
| 
      
 19 
     | 
    
         
            +
                        "comment": "Bump @fluentui/react-portal to v0.0.0-nightly-20220607-0421.1",
         
     | 
| 
      
 20 
     | 
    
         
            +
                        "commit": "b264fd655a010e09847726c4b0481262f8f4a949"
         
     | 
| 
      
 21 
     | 
    
         
            +
                      },
         
     | 
| 
      
 22 
     | 
    
         
            +
                      {
         
     | 
| 
      
 23 
     | 
    
         
            +
                        "author": "beachball",
         
     | 
| 
      
 24 
     | 
    
         
            +
                        "package": "@fluentui/react-popover",
         
     | 
| 
      
 25 
     | 
    
         
            +
                        "comment": "Bump @fluentui/react-positioning to v0.0.0-nightly-20220607-0421.1",
         
     | 
| 
      
 26 
     | 
    
         
            +
                        "commit": "b264fd655a010e09847726c4b0481262f8f4a949"
         
     | 
| 
      
 27 
     | 
    
         
            +
                      },
         
     | 
| 
      
 28 
     | 
    
         
            +
                      {
         
     | 
| 
      
 29 
     | 
    
         
            +
                        "author": "beachball",
         
     | 
| 
      
 30 
     | 
    
         
            +
                        "package": "@fluentui/react-popover",
         
     | 
| 
      
 31 
     | 
    
         
            +
                        "comment": "Bump @fluentui/react-tabster to v0.0.0-nightly-20220607-0421.1",
         
     | 
| 
      
 32 
     | 
    
         
            +
                        "commit": "b264fd655a010e09847726c4b0481262f8f4a949"
         
     | 
| 
      
 33 
     | 
    
         
            +
                      },
         
     | 
| 
      
 34 
     | 
    
         
            +
                      {
         
     | 
| 
      
 35 
     | 
    
         
            +
                        "author": "beachball",
         
     | 
| 
      
 36 
     | 
    
         
            +
                        "package": "@fluentui/react-popover",
         
     | 
| 
      
 37 
     | 
    
         
            +
                        "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20220607-0421.1",
         
     | 
| 
      
 38 
     | 
    
         
            +
                        "commit": "b264fd655a010e09847726c4b0481262f8f4a949"
         
     | 
| 
      
 39 
     | 
    
         
            +
                      }
         
     | 
| 
      
 40 
     | 
    
         
            +
                    ]
         
     | 
| 
      
 41 
     | 
    
         
            +
                  }
         
     | 
| 
      
 42 
     | 
    
         
            +
                },
         
     | 
| 
      
 43 
     | 
    
         
            +
                {
         
     | 
| 
      
 44 
     | 
    
         
            +
                  "date": "Tue, 31 May 2022 21:28:41 GMT",
         
     | 
| 
      
 45 
     | 
    
         
            +
                  "tag": "@fluentui/react-popover_v9.0.0-rc.13",
         
     | 
| 
      
 46 
     | 
    
         
            +
                  "version": "9.0.0-rc.13",
         
     | 
| 
      
 47 
     | 
    
         
            +
                  "comments": {
         
     | 
| 
      
 48 
     | 
    
         
            +
                    "prerelease": [
         
     | 
| 
      
 49 
     | 
    
         
            +
                      {
         
     | 
| 
      
 50 
     | 
    
         
            +
                        "author": "olfedias@microsoft.com",
         
     | 
| 
      
 51 
     | 
    
         
            +
                        "package": "@fluentui/react-popover",
         
     | 
| 
      
 52 
     | 
    
         
            +
                        "commit": "0a5e9fa77a72eecafdd07034ccdc0b95fd49877c",
         
     | 
| 
      
 53 
     | 
    
         
            +
                        "comment": "chore: Update Griffel to latest version"
         
     | 
| 
      
 54 
     | 
    
         
            +
                      },
         
     | 
| 
       10 
55 
     | 
    
         
             
                      {
         
     | 
| 
       11 
56 
     | 
    
         
             
                        "author": "sarah.higley@microsoft.com",
         
     | 
| 
       12 
57 
     | 
    
         
             
                        "package": "@fluentui/react-popover",
         
     | 
| 
       13 
58 
     | 
    
         
             
                        "commit": "c55c7d9d1141ae09542a78970416a8bbb344f623",
         
     | 
| 
       14 
59 
     | 
    
         
             
                        "comment": "update popover trigger to use aria-expanded instead of aria-haspopup"
         
     | 
| 
      
 60 
     | 
    
         
            +
                      },
         
     | 
| 
      
 61 
     | 
    
         
            +
                      {
         
     | 
| 
      
 62 
     | 
    
         
            +
                        "author": "bernardo.sunderhus@gmail.com",
         
     | 
| 
      
 63 
     | 
    
         
            +
                        "package": "@fluentui/react-popover",
         
     | 
| 
      
 64 
     | 
    
         
            +
                        "commit": "335ebfcfd47005003901b5e319782bfe9ccd89fd",
         
     | 
| 
      
 65 
     | 
    
         
            +
                        "comment": "updates import to react-shared-components"
         
     | 
| 
      
 66 
     | 
    
         
            +
                      },
         
     | 
| 
      
 67 
     | 
    
         
            +
                      {
         
     | 
| 
      
 68 
     | 
    
         
            +
                        "author": "beachball",
         
     | 
| 
      
 69 
     | 
    
         
            +
                        "package": "@fluentui/react-popover",
         
     | 
| 
      
 70 
     | 
    
         
            +
                        "comment": "Bump @fluentui/react-context-selector to v9.0.0-rc.10",
         
     | 
| 
      
 71 
     | 
    
         
            +
                        "commit": "335ebfcfd47005003901b5e319782bfe9ccd89fd"
         
     | 
| 
      
 72 
     | 
    
         
            +
                      },
         
     | 
| 
      
 73 
     | 
    
         
            +
                      {
         
     | 
| 
      
 74 
     | 
    
         
            +
                        "author": "beachball",
         
     | 
| 
      
 75 
     | 
    
         
            +
                        "package": "@fluentui/react-popover",
         
     | 
| 
      
 76 
     | 
    
         
            +
                        "comment": "Bump @fluentui/react-portal to v9.0.0-rc.13",
         
     | 
| 
      
 77 
     | 
    
         
            +
                        "commit": "335ebfcfd47005003901b5e319782bfe9ccd89fd"
         
     | 
| 
      
 78 
     | 
    
         
            +
                      },
         
     | 
| 
      
 79 
     | 
    
         
            +
                      {
         
     | 
| 
      
 80 
     | 
    
         
            +
                        "author": "beachball",
         
     | 
| 
      
 81 
     | 
    
         
            +
                        "package": "@fluentui/react-popover",
         
     | 
| 
      
 82 
     | 
    
         
            +
                        "comment": "Bump @fluentui/react-positioning to v9.0.0-rc.11",
         
     | 
| 
      
 83 
     | 
    
         
            +
                        "commit": "335ebfcfd47005003901b5e319782bfe9ccd89fd"
         
     | 
| 
      
 84 
     | 
    
         
            +
                      },
         
     | 
| 
      
 85 
     | 
    
         
            +
                      {
         
     | 
| 
      
 86 
     | 
    
         
            +
                        "author": "beachball",
         
     | 
| 
      
 87 
     | 
    
         
            +
                        "package": "@fluentui/react-popover",
         
     | 
| 
      
 88 
     | 
    
         
            +
                        "comment": "Bump @fluentui/react-shared-contexts to v9.0.0-rc.10",
         
     | 
| 
      
 89 
     | 
    
         
            +
                        "commit": "335ebfcfd47005003901b5e319782bfe9ccd89fd"
         
     | 
| 
      
 90 
     | 
    
         
            +
                      },
         
     | 
| 
      
 91 
     | 
    
         
            +
                      {
         
     | 
| 
      
 92 
     | 
    
         
            +
                        "author": "beachball",
         
     | 
| 
      
 93 
     | 
    
         
            +
                        "package": "@fluentui/react-popover",
         
     | 
| 
      
 94 
     | 
    
         
            +
                        "comment": "Bump @fluentui/react-tabster to v9.0.0-rc.13",
         
     | 
| 
      
 95 
     | 
    
         
            +
                        "commit": "335ebfcfd47005003901b5e319782bfe9ccd89fd"
         
     | 
| 
      
 96 
     | 
    
         
            +
                      },
         
     | 
| 
      
 97 
     | 
    
         
            +
                      {
         
     | 
| 
      
 98 
     | 
    
         
            +
                        "author": "beachball",
         
     | 
| 
      
 99 
     | 
    
         
            +
                        "package": "@fluentui/react-popover",
         
     | 
| 
      
 100 
     | 
    
         
            +
                        "comment": "Bump @fluentui/react-utilities to v9.0.0-rc.10",
         
     | 
| 
      
 101 
     | 
    
         
            +
                        "commit": "335ebfcfd47005003901b5e319782bfe9ccd89fd"
         
     | 
| 
      
 102 
     | 
    
         
            +
                      },
         
     | 
| 
      
 103 
     | 
    
         
            +
                      {
         
     | 
| 
      
 104 
     | 
    
         
            +
                        "author": "beachball",
         
     | 
| 
      
 105 
     | 
    
         
            +
                        "package": "@fluentui/react-popover",
         
     | 
| 
      
 106 
     | 
    
         
            +
                        "comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.8",
         
     | 
| 
      
 107 
     | 
    
         
            +
                        "commit": "335ebfcfd47005003901b5e319782bfe9ccd89fd"
         
     | 
| 
       15 
108 
     | 
    
         
             
                      }
         
     | 
| 
       16 
109 
     | 
    
         
             
                    ]
         
     | 
| 
       17 
110 
     | 
    
         
             
                  }
         
     | 
    
        package/CHANGELOG.md
    CHANGED
    
    | 
         @@ -1,17 +1,39 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # Change Log - @fluentui/react-popover
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
     | 
    
         
            -
            This log was last generated on  
     | 
| 
      
 3 
     | 
    
         
            +
            This log was last generated on Tue, 07 Jun 2022 04:34:28 GMT and should not be manually modified.
         
     | 
| 
       4 
4 
     | 
    
         | 
| 
       5 
5 
     | 
    
         
             
            <!-- Start content -->
         
     | 
| 
       6 
6 
     | 
    
         | 
| 
       7 
     | 
    
         
            -
            ## [0.0.0-nightly- 
     | 
| 
      
 7 
     | 
    
         
            +
            ## [0.0.0-nightly-20220607-0421.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-popover_v0.0.0-nightly-20220607-0421.1)
         
     | 
| 
       8 
8 
     | 
    
         | 
| 
       9 
     | 
    
         
            -
             
     | 
| 
       10 
     | 
    
         
            -
            [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-popover_v9.0.0-rc. 
     | 
| 
      
 9 
     | 
    
         
            +
            Tue, 07 Jun 2022 04:34:28 GMT 
         
     | 
| 
      
 10 
     | 
    
         
            +
            [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-popover_v9.0.0-rc.13..@fluentui/react-popover_v0.0.0-nightly-20220607-0421.1)
         
     | 
| 
       11 
11 
     | 
    
         | 
| 
       12 
12 
     | 
    
         
             
            ### Changes
         
     | 
| 
       13 
13 
     | 
    
         | 
| 
      
 14 
     | 
    
         
            +
            - Bump @fluentui/react-context-selector to v0.0.0-nightly-20220607-0421.1 ([commit](https://github.com/microsoft/fluentui/commit/b264fd655a010e09847726c4b0481262f8f4a949) by beachball)
         
     | 
| 
      
 15 
     | 
    
         
            +
            - Bump @fluentui/react-portal to v0.0.0-nightly-20220607-0421.1 ([commit](https://github.com/microsoft/fluentui/commit/b264fd655a010e09847726c4b0481262f8f4a949) by beachball)
         
     | 
| 
      
 16 
     | 
    
         
            +
            - Bump @fluentui/react-positioning to v0.0.0-nightly-20220607-0421.1 ([commit](https://github.com/microsoft/fluentui/commit/b264fd655a010e09847726c4b0481262f8f4a949) by beachball)
         
     | 
| 
      
 17 
     | 
    
         
            +
            - Bump @fluentui/react-tabster to v0.0.0-nightly-20220607-0421.1 ([commit](https://github.com/microsoft/fluentui/commit/b264fd655a010e09847726c4b0481262f8f4a949) by beachball)
         
     | 
| 
      
 18 
     | 
    
         
            +
            - Bump @fluentui/react-utilities to v0.0.0-nightly-20220607-0421.1 ([commit](https://github.com/microsoft/fluentui/commit/b264fd655a010e09847726c4b0481262f8f4a949) by beachball)
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
            ## [9.0.0-rc.13](https://github.com/microsoft/fluentui/tree/@fluentui/react-popover_v9.0.0-rc.13)
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
            Tue, 31 May 2022 21:28:41 GMT 
         
     | 
| 
      
 23 
     | 
    
         
            +
            [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-popover_v9.0.0-rc.12..@fluentui/react-popover_v9.0.0-rc.13)
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
            ### Changes
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
      
 27 
     | 
    
         
            +
            - chore: Update Griffel to latest version ([PR #23275](https://github.com/microsoft/fluentui/pull/23275) by olfedias@microsoft.com)
         
     | 
| 
       14 
28 
     | 
    
         
             
            - update popover trigger to use aria-expanded instead of aria-haspopup ([PR #23127](https://github.com/microsoft/fluentui/pull/23127) by sarah.higley@microsoft.com)
         
     | 
| 
      
 29 
     | 
    
         
            +
            - updates import to react-shared-components ([PR #23325](https://github.com/microsoft/fluentui/pull/23325) by bernardo.sunderhus@gmail.com)
         
     | 
| 
      
 30 
     | 
    
         
            +
            - Bump @fluentui/react-context-selector to v9.0.0-rc.10 ([PR #23325](https://github.com/microsoft/fluentui/pull/23325) by beachball)
         
     | 
| 
      
 31 
     | 
    
         
            +
            - Bump @fluentui/react-portal to v9.0.0-rc.13 ([PR #23325](https://github.com/microsoft/fluentui/pull/23325) by beachball)
         
     | 
| 
      
 32 
     | 
    
         
            +
            - Bump @fluentui/react-positioning to v9.0.0-rc.11 ([PR #23325](https://github.com/microsoft/fluentui/pull/23325) by beachball)
         
     | 
| 
      
 33 
     | 
    
         
            +
            - Bump @fluentui/react-shared-contexts to v9.0.0-rc.10 ([PR #23325](https://github.com/microsoft/fluentui/pull/23325) by beachball)
         
     | 
| 
      
 34 
     | 
    
         
            +
            - Bump @fluentui/react-tabster to v9.0.0-rc.13 ([PR #23325](https://github.com/microsoft/fluentui/pull/23325) by beachball)
         
     | 
| 
      
 35 
     | 
    
         
            +
            - Bump @fluentui/react-utilities to v9.0.0-rc.10 ([PR #23325](https://github.com/microsoft/fluentui/pull/23325) by beachball)
         
     | 
| 
      
 36 
     | 
    
         
            +
            - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.8 ([PR #23325](https://github.com/microsoft/fluentui/pull/23325) by beachball)
         
     | 
| 
       15 
37 
     | 
    
         | 
| 
       16 
38 
     | 
    
         
             
            ## [9.0.0-rc.12](https://github.com/microsoft/fluentui/tree/@fluentui/react-popover_v9.0.0-rc.12)
         
     | 
| 
       17 
39 
     | 
    
         | 
| 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            {"version":3,"sources":["components/Popover/Popover.tsx"],"names":[],"mappings":"AACA,SAAS,mBAAT,QAAoC,cAApC;AACA,SAAS,sBAAT,QAAuC,iBAAvC;AAGA;;AAEG;;AACH,OAAO,MAAM,OAAO,GAA2B,KAAK,IAAG; 
     | 
| 
      
 1 
     | 
    
         
            +
            {"version":3,"sources":["components/Popover/Popover.tsx"],"names":[],"mappings":"AACA,SAAS,mBAAT,QAAoC,cAApC;AACA,SAAS,sBAAT,QAAuC,iBAAvC;AAGA;;AAEG;;AACH,OAAO,MAAM,OAAO,GAA2B,KAAK,IAAG;EACrD,MAAM,KAAK,GAAG,mBAAmB,CAAC,KAAD,CAAjC;EAEA,OAAO,sBAAsB,CAAC,KAAD,CAA7B;AACD,CAJM;AAMP,OAAO,CAAC,WAAR,GAAsB,SAAtB","sourcesContent":["import * as React from 'react';\nimport { usePopover_unstable } from './usePopover';\nimport { renderPopover_unstable } from './renderPopover';\nimport type { PopoverProps } from './Popover.types';\n\n/**\n * Wrapper component that manages state for a PopoverTrigger and a PopoverSurface components.\n */\nexport const Popover: React.FC<PopoverProps> = props => {\n  const state = usePopover_unstable(props);\n\n  return renderPopover_unstable(state);\n};\n\nPopover.displayName = 'Popover';\n"],"sourceRoot":"../src/"}
         
     | 
| 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            {"version":3,"sources":["components/Popover/renderPopover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,cAAT,QAA+B,sBAA/B;AAGA;;AAEG;;AACH,OAAO,MAAM,sBAAsB,GAAI,KAAD,IAAwB; 
     | 
| 
      
 1 
     | 
    
         
            +
            {"version":3,"sources":["components/Popover/renderPopover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,cAAT,QAA+B,sBAA/B;AAGA;;AAEG;;AACH,OAAO,MAAM,sBAAsB,GAAI,KAAD,IAAwB;EAC5D,MAAM;IACJ,UADI;IAEJ,QAFI;IAGJ,UAHI;IAIJ,MAJI;IAKJ,SALI;IAMJ,IANI;IAOJ,aAPI;IAQJ,WARI;IASJ,OATI;IAUJ,IAVI;IAWJ,UAXI;IAYJ,SAZI;IAaJ,UAbI;IAcJ;EAdI,IAeF,KAfJ;EAiBA,oBACE,KAAA,CAAA,aAAA,CAAC,cAAc,CAAC,QAAhB,EAAwB;IACtB,KAAK,EAAE;MACL,UADK;MAEL,QAFK;MAGL,UAHK;MAIL,MAJK;MAKL,SALK;MAML,IANK;MAOL,aAPK;MAQL,WARK;MASL,OATK;MAUL,UAVK;MAWL,UAXK;MAYL,IAZK;MAaL,SAbK;MAcL;IAdK;EADe,CAAxB,EAkBG,KAAK,CAAC,cAlBT,EAmBG,KAAK,CAAC,IAAN,IAAc,KAAK,CAAC,cAnBvB,CADF;AAuBD,CAzCM","sourcesContent":["import * as React from 'react';\nimport { PopoverContext } from '../../popoverContext';\nimport type { PopoverState } from './Popover.types';\n\n/**\n * Render the final JSX of Popover\n */\nexport const renderPopover_unstable = (state: PopoverState) => {\n  const {\n    appearance,\n    arrowRef,\n    contentRef,\n    inline,\n    mountNode,\n    open,\n    openOnContext,\n    openOnHover,\n    setOpen,\n    size,\n    toggleOpen,\n    trapFocus,\n    triggerRef,\n    withArrow,\n  } = state;\n\n  return (\n    <PopoverContext.Provider\n      value={{\n        appearance,\n        arrowRef,\n        contentRef,\n        inline,\n        mountNode,\n        open,\n        openOnContext,\n        openOnHover,\n        setOpen,\n        toggleOpen,\n        triggerRef,\n        size,\n        trapFocus,\n        withArrow,\n      }}\n    >\n      {state.popoverTrigger}\n      {state.open && state.popoverSurface}\n    </PopoverContext.Provider>\n  );\n};\n"],"sourceRoot":"../src/"}
         
     | 
| 
         @@ -1,6 +1,6 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            import * as React from 'react';
         
     | 
| 
       2 
2 
     | 
    
         
             
            import { useControllableState, useEventCallback, useOnClickOutside, useOnScrollOutside } from '@fluentui/react-utilities';
         
     | 
| 
       3 
     | 
    
         
            -
            import { useFluent } from '@fluentui/react-shared-contexts';
         
     | 
| 
      
 3 
     | 
    
         
            +
            import { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';
         
     | 
| 
       4 
4 
     | 
    
         
             
            import { usePositioning, resolvePositioningShorthand, mergeArrowOffset, usePositioningMouseTarget } from '@fluentui/react-positioning';
         
     | 
| 
       5 
5 
     | 
    
         
             
            import { elementContains } from '@fluentui/react-portal';
         
     | 
| 
       6 
6 
     | 
    
         
             
            import { useFocusFinders } from '@fluentui/react-tabster';
         
     | 
| 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            {"version":3,"sources":["components/Popover/usePopover.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SACE,oBADF,EAEE,gBAFF,EAGE,iBAHF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AAA,CAAZ,GAAA,YAAY,CAAG,CAAH,EAAM;AAAE,UAAA,IAAI,EAAE;AAAR,SAAN,CAAZ;AACD;;AAED,aAAO,UAAP;AACD,KARW,CAAZ;AASD,GAnBa,EAoBd,CAAC,YAAD,EAAe,YAAf,EAA6B,gBAA7B,CApBc,CAAhB;AAuBA,SAAO,CAAC,IAAD,EAAO,OAAP,CAAP;AACD;AAED;;AAEG;;;AACH,SAAS,cAAT,CACE,KADF,EAEqE;AAEnE,QAAM,kBAAkB,GAAG;AACzB,IAAA,QAAQ,EAAE,OADe;AAEzB,IAAA,KAAK,EAAE,QAFkB;AAGzB,IAAA,MAAM,EAAE,KAAK,CAAC,aAAN,GAAsB,KAAK,CAAC,aAA5B,GAA4C,SAH3B;AAIzB,OAAG,2BAA2B,CAAC,KAAK,CAAC,WAAP;AAJL,GAA3B,CAFmE,CASnE;;AACA,MAAI,kBAAkB,CAAC,WAAvB,EAAoC;AAClC,IAAA,KAAK,CAAC,SAAN,GAAkB,KAAlB;AACD;;AAED,MAAI,KAAK,CAAC,SAAV,EAAqB;AACnB,IAAA,kBAAkB,CAAC,MAAnB,GAA4B,gBAAgB,CAAC,kBAAkB,CAAC,MAApB,EAA4B,YAAY,CAAC,KAAK,CAAC,IAAP,CAAxC,CAA5C;AACD;;AAED,QAAM;AAAE,IAAA,SAAS,EAAE,UAAb;AAAyB,IAAA,YAAY,EAAE,UAAvC;AAAmD,IAAA;AAAnD,MAAgE,cAAc,CAAC,kBAAD,CAApF;AAEA,SAAO;AACL,IAAA,UADK;AAEL,IAAA,UAFK;AAGL,IAAA;AAHK,GAAP;AAKD","sourcesContent":["import * as React from 'react';\nimport {\n  useControllableState,\n  useEventCallback,\n  useOnClickOutside,\n  useOnScrollOutside,\n} from '@fluentui/react-utilities';\nimport { useFluent } from '@fluentui/react-shared-contexts';\nimport {\n  usePositioning,\n  resolvePositioningShorthand,\n  mergeArrowOffset,\n  usePositioningMouseTarget,\n} from '@fluentui/react-positioning';\nimport { elementContains } from '@fluentui/react-portal';\nimport { useFocusFinders } from '@fluentui/react-tabster';\nimport { arrowHeights } from '../PopoverSurface/index';\nimport type { OpenPopoverEvents, PopoverProps, PopoverState } from './Popover.types';\n\n/**\n * Create the state required to render Popover.\n *\n * The returned state can be modified with hooks such as usePopoverStyles,\n * before being passed to renderPopover_unstable.\n *\n * @param props - props from this instance of Popover\n */\nexport const usePopover_unstable = (props: PopoverProps): PopoverState => {\n  const [contextTarget, setContextTarget] = usePositioningMouseTarget();\n  const initialState = {\n    size: 'medium',\n    contextTarget,\n    setContextTarget,\n    ...props,\n  } as const;\n\n  const children = React.Children.toArray(props.children) as React.ReactElement[];\n\n  if (process.env.NODE_ENV !== 'production') {\n    if (children.length === 0) {\n      // eslint-disable-next-line no-console\n      console.warn('Popover must contain at least one child');\n    }\n\n    if (children.length > 2) {\n      // eslint-disable-next-line no-console\n      console.warn('Popover must contain at most two children');\n    }\n  }\n\n  let popoverTrigger: React.ReactElement | undefined = undefined;\n  let popoverSurface: React.ReactElement | undefined = undefined;\n  if (children.length === 2) {\n    popoverTrigger = children[0];\n    popoverSurface = children[1];\n  } else if (children.length === 1) {\n    popoverSurface = children[0];\n  }\n\n  const [open, setOpenState] = useOpenState(initialState);\n\n  const setOpenTimeoutRef = React.useRef(0);\n\n  const setOpen = useEventCallback((e: OpenPopoverEvents, shouldOpen: boolean) => {\n    clearTimeout(setOpenTimeoutRef.current);\n    if (!(e instanceof Event) && e.persist) {\n      // < React 17 still uses pooled synthetic events\n      e.persist();\n    }\n\n    if (e.type === 'mouseleave') {\n      // FIXME leaking Node timeout type\n      // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n      // @ts-ignore\n      setOpenTimeoutRef.current = setTimeout(() => {\n        setOpenState(e, shouldOpen);\n      }, props.mouseLeaveDelay ?? 500);\n    } else {\n      setOpenState(e, shouldOpen);\n    }\n  });\n\n  // Clear timeout on unmount\n  // Setting state after a component unmounts can cause memory leaks\n  React.useEffect(() => {\n    return () => {\n      clearTimeout(setOpenTimeoutRef.current);\n    };\n  }, []);\n\n  const toggleOpen = React.useCallback<PopoverState['toggleOpen']>(\n    e => {\n      setOpen(e, !open);\n    },\n    [setOpen, open],\n  );\n\n  const positioningRefs = usePopoverRefs(initialState);\n\n  const { targetDocument } = useFluent();\n  useOnClickOutside({\n    contains: elementContains,\n    element: targetDocument,\n    callback: ev => setOpen(ev, false),\n    refs: [positioningRefs.triggerRef, positioningRefs.contentRef],\n    disabled: !open,\n  });\n\n  // only close on scroll for context, or when closeOnScroll is specified\n  const closeOnScroll = initialState.openOnContext || initialState.closeOnScroll;\n  useOnScrollOutside({\n    contains: elementContains,\n    element: targetDocument,\n    callback: ev => setOpen(ev, false),\n    refs: [positioningRefs.triggerRef, positioningRefs.contentRef],\n    disabled: !open || !closeOnScroll,\n  });\n\n  const { findFirstFocusable } = useFocusFinders();\n\n  React.useEffect(() => {\n    if (open && positioningRefs.contentRef.current) {\n      const firstFocusable = findFirstFocusable(positioningRefs.contentRef.current);\n      firstFocusable?.focus();\n    }\n  }, [findFirstFocusable, open, positioningRefs.contentRef]);\n\n  return {\n    ...initialState,\n    ...positioningRefs,\n    popoverTrigger,\n    popoverSurface,\n    open,\n    setOpen,\n    toggleOpen,\n    setContextTarget,\n    contextTarget,\n    inline: props.inline ?? false,\n  };\n};\n\n/**\n * Creates and manages the Popover open state\n */\nfunction useOpenState(\n  state: Pick<PopoverState, 'setContextTarget' | 'onOpenChange'> & Pick<PopoverProps, 'open' | 'defaultOpen'>,\n) {\n  const onOpenChange: PopoverState['onOpenChange'] = useEventCallback((e, data) => state.onOpenChange?.(e, data));\n\n  const [open, setOpenState] = useControllableState({\n    state: state.open,\n    defaultState: state.defaultOpen,\n    initialState: false,\n  });\n  state.open = open !== undefined ? open : state.open;\n  const setContextTarget = state.setContextTarget;\n\n  const setOpen = React.useCallback(\n    (e: OpenPopoverEvents, shouldOpen: boolean) => {\n      if (shouldOpen && e.type === 'contextmenu') {\n        setContextTarget(e as React.MouseEvent);\n      }\n\n      if (!shouldOpen) {\n        setContextTarget(undefined);\n      }\n\n      setOpenState(prevOpen => {\n        // More than one event (mouse, focus, keyboard) can request the Popover to close\n        // We assume the first event is the correct one\n        if (prevOpen !== shouldOpen) {\n          onOpenChange?.(e, { open: shouldOpen });\n        }\n\n        return shouldOpen;\n      });\n    },\n    [setOpenState, onOpenChange, setContextTarget],\n  );\n\n  return [open, setOpen] as const;\n}\n\n/**\n * Creates and sets the necessary trigger, target and content refs used by Popover\n */\nfunction usePopoverRefs(\n  state: Pick<PopoverState, 'size' | 'contextTarget'> &\n    Pick<PopoverProps, 'positioning' | 'openOnContext' | 'withArrow'>,\n) {\n  const positioningOptions = {\n    position: 'above' as const,\n    align: 'center' as const,\n    target: state.openOnContext ? state.contextTarget : undefined,\n    ...resolvePositioningShorthand(state.positioning),\n  };\n\n  // no reason to render arrow when covering the target\n  if (positioningOptions.coverTarget) {\n    state.withArrow = false;\n  }\n\n  if (state.withArrow) {\n    positioningOptions.offset = mergeArrowOffset(positioningOptions.offset, arrowHeights[state.size]);\n  }\n\n  const { targetRef: triggerRef, containerRef: contentRef, arrowRef } = usePositioning(positioningOptions);\n\n  return {\n    triggerRef,\n    contentRef,\n    arrowRef,\n  } as const;\n}\n"],"sourceRoot":"../src/"}
         
     | 
| 
      
 1 
     | 
    
         
            +
            {"version":3,"sources":["components/Popover/usePopover.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SACE,oBADF,EAEE,gBAFF,EAGE,iBAHF,EAIE,kBAJF,QAKO,2BALP;AAMA,SAAS,kBAAkB,IAAI,SAA/B,QAAgD,iCAAhD;AACA,SACE,cADF,EAEE,2BAFF,EAGE,gBAHF,EAIE,yBAJF,QAKO,6BALP;AAMA,SAAS,eAAT,QAAgC,wBAAhC;AACA,SAAS,eAAT,QAAgC,yBAAhC;AACA,SAAS,YAAT,QAA6B,yBAA7B;AAGA;;;;;;;AAOG;;AACH,OAAO,MAAM,mB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oC;IAClC,KAAK,CAAC,SAAN,GAAkB,KAAlB;EACD;;EAED,IAAI,KAAK,CAAC,SAAV,EAAqB;IACnB,kBAAkB,CAAC,MAAnB,GAA4B,gBAAgB,CAAC,kBAAkB,CAAC,MAApB,EAA4B,YAAY,CAAC,KAAK,CAAC,IAAP,CAAxC,CAA5C;EACD;;EAED,MAAM;IAAE,SAAS,EAAE,UAAb;IAAyB,YAAY,EAAE,UAAvC;IAAmD;EAAnD,IAAgE,cAAc,CAAC,kBAAD,CAApF;EAEA,OAAO;IACL,UADK;IAEL,UAFK;IAGL;EAHK,CAAP;AAKD","sourcesContent":["import * as React from 'react';\nimport {\n  useControllableState,\n  useEventCallback,\n  useOnClickOutside,\n  useOnScrollOutside,\n} from '@fluentui/react-utilities';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport {\n  usePositioning,\n  resolvePositioningShorthand,\n  mergeArrowOffset,\n  usePositioningMouseTarget,\n} from '@fluentui/react-positioning';\nimport { elementContains } from '@fluentui/react-portal';\nimport { useFocusFinders } from '@fluentui/react-tabster';\nimport { arrowHeights } from '../PopoverSurface/index';\nimport type { OpenPopoverEvents, PopoverProps, PopoverState } from './Popover.types';\n\n/**\n * Create the state required to render Popover.\n *\n * The returned state can be modified with hooks such as usePopoverStyles,\n * before being passed to renderPopover_unstable.\n *\n * @param props - props from this instance of Popover\n */\nexport const usePopover_unstable = (props: PopoverProps): PopoverState => {\n  const [contextTarget, setContextTarget] = usePositioningMouseTarget();\n  const initialState = {\n    size: 'medium',\n    contextTarget,\n    setContextTarget,\n    ...props,\n  } as const;\n\n  const children = React.Children.toArray(props.children) as React.ReactElement[];\n\n  if (process.env.NODE_ENV !== 'production') {\n    if (children.length === 0) {\n      // eslint-disable-next-line no-console\n      console.warn('Popover must contain at least one child');\n    }\n\n    if (children.length > 2) {\n      // eslint-disable-next-line no-console\n      console.warn('Popover must contain at most two children');\n    }\n  }\n\n  let popoverTrigger: React.ReactElement | undefined = undefined;\n  let popoverSurface: React.ReactElement | undefined = undefined;\n  if (children.length === 2) {\n    popoverTrigger = children[0];\n    popoverSurface = children[1];\n  } else if (children.length === 1) {\n    popoverSurface = children[0];\n  }\n\n  const [open, setOpenState] = useOpenState(initialState);\n\n  const setOpenTimeoutRef = React.useRef(0);\n\n  const setOpen = useEventCallback((e: OpenPopoverEvents, shouldOpen: boolean) => {\n    clearTimeout(setOpenTimeoutRef.current);\n    if (!(e instanceof Event) && e.persist) {\n      // < React 17 still uses pooled synthetic events\n      e.persist();\n    }\n\n    if (e.type === 'mouseleave') {\n      // FIXME leaking Node timeout type\n      // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n      // @ts-ignore\n      setOpenTimeoutRef.current = setTimeout(() => {\n        setOpenState(e, shouldOpen);\n      }, props.mouseLeaveDelay ?? 500);\n    } else {\n      setOpenState(e, shouldOpen);\n    }\n  });\n\n  // Clear timeout on unmount\n  // Setting state after a component unmounts can cause memory leaks\n  React.useEffect(() => {\n    return () => {\n      clearTimeout(setOpenTimeoutRef.current);\n    };\n  }, []);\n\n  const toggleOpen = React.useCallback<PopoverState['toggleOpen']>(\n    e => {\n      setOpen(e, !open);\n    },\n    [setOpen, open],\n  );\n\n  const positioningRefs = usePopoverRefs(initialState);\n\n  const { targetDocument } = useFluent();\n  useOnClickOutside({\n    contains: elementContains,\n    element: targetDocument,\n    callback: ev => setOpen(ev, false),\n    refs: [positioningRefs.triggerRef, positioningRefs.contentRef],\n    disabled: !open,\n  });\n\n  // only close on scroll for context, or when closeOnScroll is specified\n  const closeOnScroll = initialState.openOnContext || initialState.closeOnScroll;\n  useOnScrollOutside({\n    contains: elementContains,\n    element: targetDocument,\n    callback: ev => setOpen(ev, false),\n    refs: [positioningRefs.triggerRef, positioningRefs.contentRef],\n    disabled: !open || !closeOnScroll,\n  });\n\n  const { findFirstFocusable } = useFocusFinders();\n\n  React.useEffect(() => {\n    if (open && positioningRefs.contentRef.current) {\n      const firstFocusable = findFirstFocusable(positioningRefs.contentRef.current);\n      firstFocusable?.focus();\n    }\n  }, [findFirstFocusable, open, positioningRefs.contentRef]);\n\n  return {\n    ...initialState,\n    ...positioningRefs,\n    popoverTrigger,\n    popoverSurface,\n    open,\n    setOpen,\n    toggleOpen,\n    setContextTarget,\n    contextTarget,\n    inline: props.inline ?? false,\n  };\n};\n\n/**\n * Creates and manages the Popover open state\n */\nfunction useOpenState(\n  state: Pick<PopoverState, 'setContextTarget' | 'onOpenChange'> & Pick<PopoverProps, 'open' | 'defaultOpen'>,\n) {\n  const onOpenChange: PopoverState['onOpenChange'] = useEventCallback((e, data) => state.onOpenChange?.(e, data));\n\n  const [open, setOpenState] = useControllableState({\n    state: state.open,\n    defaultState: state.defaultOpen,\n    initialState: false,\n  });\n  state.open = open !== undefined ? open : state.open;\n  const setContextTarget = state.setContextTarget;\n\n  const setOpen = React.useCallback(\n    (e: OpenPopoverEvents, shouldOpen: boolean) => {\n      if (shouldOpen && e.type === 'contextmenu') {\n        setContextTarget(e as React.MouseEvent);\n      }\n\n      if (!shouldOpen) {\n        setContextTarget(undefined);\n      }\n\n      setOpenState(prevOpen => {\n        // More than one event (mouse, focus, keyboard) can request the Popover to close\n        // We assume the first event is the correct one\n        if (prevOpen !== shouldOpen) {\n          onOpenChange?.(e, { open: shouldOpen });\n        }\n\n        return shouldOpen;\n      });\n    },\n    [setOpenState, onOpenChange, setContextTarget],\n  );\n\n  return [open, setOpen] as const;\n}\n\n/**\n * Creates and sets the necessary trigger, target and content refs used by Popover\n */\nfunction usePopoverRefs(\n  state: Pick<PopoverState, 'size' | 'contextTarget'> &\n    Pick<PopoverProps, 'positioning' | 'openOnContext' | 'withArrow'>,\n) {\n  const positioningOptions = {\n    position: 'above' as const,\n    align: 'center' as const,\n    target: state.openOnContext ? state.contextTarget : undefined,\n    ...resolvePositioningShorthand(state.positioning),\n  };\n\n  // no reason to render arrow when covering the target\n  if (positioningOptions.coverTarget) {\n    state.withArrow = false;\n  }\n\n  if (state.withArrow) {\n    positioningOptions.offset = mergeArrowOffset(positioningOptions.offset, arrowHeights[state.size]);\n  }\n\n  const { targetRef: triggerRef, containerRef: contentRef, arrowRef } = usePositioning(positioningOptions);\n\n  return {\n    triggerRef,\n    contentRef,\n    arrowRef,\n  } as const;\n}\n"],"sourceRoot":"../src/"}
         
     | 
| 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            {"version":3,"sources":["components/PopoverSurface/PopoverSurface.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,0BAAT,QAA2C,qBAA3C;AACA,SAAS,6BAAT,QAA8C,wBAA9C;AACA,SAAS,gCAAT,QAAiD,2BAAjD;AAIA;;AAEG;;AACH,OAAO,MAAM,cAAc,gBAA6C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe; 
     | 
| 
      
 1 
     | 
    
         
            +
            {"version":3,"sources":["components/PopoverSurface/PopoverSurface.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,0BAAT,QAA2C,qBAA3C;AACA,SAAS,6BAAT,QAA8C,wBAA9C;AACA,SAAS,gCAAT,QAAiD,2BAAjD;AAIA;;AAEG;;AACH,OAAO,MAAM,cAAc,gBAA6C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EACtG,MAAM,KAAK,GAAG,0BAA0B,CAAC,KAAD,EAAQ,GAAR,CAAxC;EAEA,gCAAgC,CAAC,KAAD,CAAhC;EACA,OAAO,6BAA6B,CAAC,KAAD,CAApC;AACD,CALuE,CAAjE;AAOP,cAAc,CAAC,WAAf,GAA6B,gBAA7B","sourcesContent":["import * as React from 'react';\nimport { usePopoverSurface_unstable } from './usePopoverSurface';\nimport { renderPopoverSurface_unstable } from './renderPopoverSurface';\nimport { usePopoverSurfaceStyles_unstable } from './usePopoverSurfaceStyles';\nimport type { PopoverSurfaceProps } from './PopoverSurface.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * PopoverSurface component renders react children in a positioned box\n */\nexport const PopoverSurface: ForwardRefComponent<PopoverSurfaceProps> = React.forwardRef((props, ref) => {\n  const state = usePopoverSurface_unstable(props, ref);\n\n  usePopoverSurfaceStyles_unstable(state);\n  return renderPopoverSurface_unstable(state);\n});\n\nPopoverSurface.displayName = 'PopoverSurface';\n"],"sourceRoot":"../src/"}
         
     | 
| 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            {"version":3,"sources":["components/PopoverSurface/renderPopoverSurface.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,MAAT,QAAuB,wBAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,6BAA6B,GAAI,KAAD,IAA+B; 
     | 
| 
      
 1 
     | 
    
         
            +
            {"version":3,"sources":["components/PopoverSurface/renderPopoverSurface.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,MAAT,QAAuB,wBAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,6BAA6B,GAAI,KAAD,IAA+B;EAC1E,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAsB,KAAtB,CAArC;EAEA,MAAM,OAAO,gBACX,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,EACG,KAAK,CAAC,SAAN,iBAAmB,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;IAAK,GAAG,EAAE,KAAK,CAAC,QAAhB;IAA0B,SAAS,EAAE,KAAK,CAAC;EAA3C,CAAA,CADtB,EAEG,SAAS,CAAC,IAAV,CAAe,QAFlB,CADF;;EAOA,IAAI,KAAK,CAAC,MAAV,EAAkB;IAChB,OAAO,OAAP;EACD;;EAED,oBAAO,KAAA,CAAA,aAAA,CAAC,MAAD,EAAO;IAAC,SAAS,EAAE,KAAK,CAAC;EAAlB,CAAP,EAAqC,OAArC,CAAP;AACD,CAfM","sourcesContent":["import * as React from 'react';\nimport { Portal } from '@fluentui/react-portal';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { PopoverSurfaceSlots, PopoverSurfaceState } from './PopoverSurface.types';\n\n/**\n * Render the final JSX of PopoverSurface\n */\nexport const renderPopoverSurface_unstable = (state: PopoverSurfaceState) => {\n  const { slots, slotProps } = getSlots<PopoverSurfaceSlots>(state);\n\n  const surface = (\n    <slots.root {...slotProps.root}>\n      {state.withArrow && <div ref={state.arrowRef} className={state.arrowClassName} />}\n      {slotProps.root.children}\n    </slots.root>\n  );\n\n  if (state.inline) {\n    return surface;\n  }\n\n  return <Portal mountNode={state.mountNode}>{surface}</Portal>;\n};\n"],"sourceRoot":"../src/"}
         
     | 
| 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            {"version":3,"sources":["components/PopoverSurface/usePopoverSurface.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,EAAgC,aAAhC,QAAqD,2BAArD;AACA,SAAS,kBAAT,QAAmC,yBAAnC;AACA,SAAS,0BAAT,QAA2C,sBAA3C;AAGA;;;;;;;;AAQG;;AACH,OAAO,MAAM,0BAA0B,GAAG,CACxC,KADwC,EAExC,GAFwC,KAGjB; 
     | 
| 
      
 1 
     | 
    
         
            +
            {"version":3,"sources":["components/PopoverSurface/usePopoverSurface.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,EAAgC,aAAhC,QAAqD,2BAArD;AACA,SAAS,kBAAT,QAAmC,yBAAnC;AACA,SAAS,0BAAT,QAA2C,sBAA3C;AAGA;;;;;;;;AAQG;;AACH,OAAO,MAAM,0BAA0B,GAAG,CACxC,KADwC,EAExC,GAFwC,KAGjB;EACvB,MAAM,UAAU,GAAG,0BAA0B,CAAC,OAAO,IA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AAE,oBAFV;IAGJ,SAAS,EAAE;EAHP,IAIF,KAAK,CAAC,IAJV;;EAKA,KAAK,CAAC,IAAN,CAAW,YAAX,GAA2B,CAAD,IAAwC;IAChE,IAAI,WAAJ,EAAiB;MACf,OAAO,CAAC,CAAD,EAAI,IAAJ,CAAP;IACD;;IAED,oBAAoB,KAAA,IAApB,IAAA,oBAAoB,KAAA,KAAA,CAApB,GAAoB,KAAA,CAApB,GAAA,oBAAoB,CAAG,CAAH,CAApB;EACD,CAND;;EAQA,KAAK,CAAC,IAAN,CAAW,YAAX,GAA2B,CAAD,IAAwC;IAChE,IAAI,WAAJ,EAAiB;MACf,OAAO,CAAC,CAAD,EAAI,KAAJ,CAAP;IACD;;IAED,oBAAoB,KAAA,IAApB,IAAA,oBAAoB,KAAA,KAAA,CAApB,GAAoB,KAAA,CAApB,GAAA,oBAAoB,CAAG,CAAH,CAApB;EACD,CAND;;EAQA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAwB,CAAD,IAA2C;WAAA,CAChE;IACA;;;IACA,IAAI,CAAC,CAAC,GAAF,KAAU,QAAV,KAAsB,CAAA,EAAA,GAAA,UAAU,CAAC,OAAX,MAAkB,IAAlB,IAAkB,EAAA,KAAA,KAAA,CAAlB,GAAkB,KAAA,CAAlB,GAAkB,EAAA,CAAE,QAAF,CAAW,CAAC,CAAC,MAAb,CAAxC,CAAJ,EAAoF;MAClF,OAAO,CAAC,CAAD,EAAI,KAAJ,CAAP;IACD;;IAED,iBAAiB,KAAA,IAAjB,IAAA,iBAAiB,KAAA,KAAA,CAAjB,GAAiB,KAAA,CAAjB,GAAA,iBAAiB,CAAG,CAAH,CAAjB;EACD,CARD;;EAUA,OAAO,KAAP;AACD,CAnEM","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 inline = usePopoverContext_unstable(context => context.inline);\n  const { modalAttributes } = useModalAttributes({ trapFocus });\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' : 'complementary',\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      setOpen(e, false);\n    }\n\n    onKeyDownOriginal?.(e);\n  };\n\n  return state;\n};\n"],"sourceRoot":"../src/"}
         
     | 
| 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            {"version":3,"sources":["components/PopoverSurface/usePopoverSurfaceStyles.ts"],"names":[],"mappings":"AAAA,SAAS,UAAT,YAAiC,YAAjC,QAAqD,gBAArD;AACA,SAAS,uBAAT,EAAkC,iBAAlC,QAA2D,6BAA3D;AACA,SAAS,MAAT,QAAuB,uBAAvB;AAKA,OAAO,MAAM,wBAAwB,GAAwC; 
     | 
| 
      
 1 
     | 
    
         
            +
            {"version":3,"sources":["components/PopoverSurface/usePopoverSurfaceStyles.ts"],"names":[],"mappings":"AAAA,SAAS,UAAT,YAAiC,YAAjC,QAAqD,gBAArD;AACA,SAAS,uBAAT,EAAkC,iBAAlC,QAA2D,6BAA3D;AACA,SAAS,MAAT,QAAuB,uBAAvB;AAKA,OAAO,MAAM,wBAAwB,GAAwC;EAC3E,IAAI,EAAE;AADqE,CAAtE;AAIP,OAAO,MAAM,YAAY,GAAgC;EACvD,KAAK,EAAE,CADgD;EAEvD,MAAM,EAAE,CAF+C;EAGvD,KAAK,EAAE;AAHgD,CAAlD;AAMP;;AAEG;;AACH,MAAM,SAAS,gBAAG;EAAA;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,EAAlB;AAqCA;;AAEG;;;AACH,OAAO,MAAM,gCAAgC,GAAI,KAAD,IAAoD;EAClG,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CACjC,wBAAwB,CAAC,IADQ,EAEjC,MAAM,CAAC,IAF0B,EAGjC,KAAK,CAAC,IAAN,KAAe,OAAf,IAA0B,MAAM,CAAC,YAHA,EAIjC,KAAK,CAAC,IAAN,KAAe,QAAf,IAA2B,MAAM,CAAC,aAJD,EAKjC,KAAK,CAAC,IAAN,KAAe,OAAf,IAA0B,MAAM,CAAC,YALA,EAMjC,KAAK,CAAC,UAAN,KAAqB,UAArB,IAAmC,MAAM,CAAC,QANT,EAOjC,KAAK,CAAC,UAAN,KAAqB,OAArB,IAAgC,MAAM,CAAC,KAPN,EAQjC,KAAK,CAAC,IAAN,CAAW,SARsB,CAAnC;EAWA,KAAK,CAAC,cAAN,GAAuB,YAAY,CACjC,MAAM,CAAC,KAD0B,EAEjC,KAAK,CAAC,IAAN,KAAe,OAAf,GAAyB,MAAM,CAAC,UAAhC,GAA6C,MAAM,CAAC,gBAFnB,CAAnC;EAKA,OAAO,KAAP;AACD,CAnBM","sourcesContent":["import { shorthands, makeStyles, mergeClasses } from '@griffel/react';\nimport { createArrowHeightStyles, createArrowStyles } from '@fluentui/react-positioning';\nimport { tokens } 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    backgroundColor: tokens.colorNeutralBackground1,\n    boxShadow: tokens.shadow16,\n    ...shorthands.borderRadius('4px'),\n    ...shorthands.border('1px', 'solid', tokens.colorTransparentStroke),\n  },\n\n  inverted: {\n    // TODO: neutral background inverted missing from superset and theme\n    backgroundColor: tokens.colorNeutralForeground1,\n    color: tokens.colorNeutralForegroundInverted,\n  },\n\n  brand: {\n    backgroundColor: tokens.colorBrandBackground,\n    // TODO: clarify with designers what foreground color should be with brand background,\n    color: tokens.colorNeutralForegroundInverted,\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 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            {"version":3,"sources":["components/PopoverTrigger/PopoverTrigger.tsx"],"names":[],"mappings":"AACA,SAAS,0BAAT,QAA2C,qBAA3C;AACA,SAAS,6BAAT,QAA8C,wBAA9C;AAIA;;AAEG;;AACH,OAAO,MAAM,cAAc,GAA2D,KAAK,IAAG; 
     | 
| 
      
 1 
     | 
    
         
            +
            {"version":3,"sources":["components/PopoverTrigger/PopoverTrigger.tsx"],"names":[],"mappings":"AACA,SAAS,0BAAT,QAA2C,qBAA3C;AACA,SAAS,6BAAT,QAA8C,wBAA9C;AAIA;;AAEG;;AACH,OAAO,MAAM,cAAc,GAA2D,KAAK,IAAG;EAC5F,MAAM,KAAK,GAAG,0BAA0B,CAAC,KAAD,CAAxC;EAEA,OAAO,6BAA6B,CAAC,KAAD,CAApC;AACD,CAJM;AAMP,cAAc,CAAC,WAAf,GAA6B,gBAA7B;AACA,cAAc,CAAC,wBAAf,GAA0C,IAA1C","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> & FluentTriggerComponent = props => {\n  const state = usePopoverTrigger_unstable(props);\n\n  return renderPopoverTrigger_unstable(state);\n};\n\nPopoverTrigger.displayName = 'PopoverTrigger';\nPopoverTrigger.isFluentTriggerComponent = true;\n"],"sourceRoot":"../src/"}
         
     | 
| 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            {"version":3,"sources":["components/PopoverTrigger/renderPopoverTrigger.tsx"],"names":[],"mappings":"AAEA;;AAEG;AACH,OAAO,MAAM,6BAA6B,GAAI,KAAD,IAA+B; 
     | 
| 
      
 1 
     | 
    
         
            +
            {"version":3,"sources":["components/PopoverTrigger/renderPopoverTrigger.tsx"],"names":[],"mappings":"AAEA;;AAEG;AACH,OAAO,MAAM,6BAA6B,GAAI,KAAD,IAA+B;EAC1E,OAAO,KAAK,CAAC,QAAb;AACD,CAFM","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 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            {"version":3,"sources":["components/PopoverTrigger/usePopoverTrigger.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SACE,2BADF,EAEE,eAFF,EAGE,6BAHF,EAIE,aAJF,EAKE,uBALF,EAME,gBANF,QAOO,2BAPP;AAQA,SAAS,kBAAT,QAAmC,yBAAnC;AACA,SAAS,0BAAT,QAA2C,sBAA3C;AAGA;;;;;;;AAOG;;AACH,OAAO,MAAM,0BAA0B,GAAI,KAAD,IAAoD;;; 
     | 
| 
      
 1 
     | 
    
         
            +
            {"version":3,"sources":["components/PopoverTrigger/usePopoverTrigger.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SACE,2BADF,EAEE,eAFF,EAGE,6BAHF,EAIE,aAJF,EAKE,uBALF,EAME,gBANF,QAOO,2BAPP;AAQA,SAAS,kBAAT,QAAmC,yBAAnC;AACA,SAAS,0BAAT,QAA2C,sBAA3C;AAGA;;;;;;;AAOG;;AACH,OAAO,MAAM,0BAA0B,GAAI,KAAD,IAAoD;;;EAC5F,MAAM;IAAE;EAAF,IAAe,KAArB;EACA,MAAM,KAAK,GAAG,aAAA,KAAK,CAAC,cAAN,CAAqB,QAArB,IAAiC,eAAe,CAAC,QAAD,CAAhD,GAA6D,SAA3E;EAEA,MAAM,IAAI,GAAG,0BAA0B,CAAC,OAAO,IAAI,OAAO,C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K,KAAA,IAAL,IAAA,KAAK,KAAA,KAAA,CAAL,GAAK,KAAA,CAAL,GAAA,KAAK,CAAE,KAAP,MAAY,IAAZ,IAAY,EAAA,KAAA,KAAA,CAAZ,GAAY,KAAA,CAAZ,GAAY,EAAA,CAAE,YAAf,EAA6B,YAA7B,CAPyC;MAQ9E,aAAa,EAAE,uBAAuB,CAAC,CAAA,EAAA,GAAA,KAAK,KAAA,IAAL,IAAA,KAAK,KAAA,KAAA,CAAL,GAAK,KAAA,CAAL,GAAA,KAAK,CAAE,KAAP,MAAY,IAAZ,IAAY,EAAA,KAAA,KAAA,CAAZ,GAAY,KAAA,CAAZ,GAAY,EAAA,CAAE,aAAf,EAA8B,aAA9B,CARwC;MAS9E,GAAG,EAAE,aAAa,CAAC,UAAD,EAAa,KAAK,KAAA,IAAL,IAAA,KAAK,KAAA,KAAA,CAAL,GAAK,KAAA,CAAL,GAAA,KAAK,CAAE,GAApB;IAT4D,CAA3C;EADhC,CAAP;AAaD,CA7DM","sourcesContent":["import * as React from 'react';\nimport {\n  applyTriggerPropsToChildren,\n  getTriggerChild,\n  shouldPreventDefaultOnKeyDown,\n  useMergedRefs,\n  useMergedEventCallbacks,\n  useEventCallback,\n} from '@fluentui/react-utilities';\nimport { useModalAttributes } from '@fluentui/react-tabster';\nimport { usePopoverContext_unstable } from '../../popoverContext';\nimport type { PopoverTriggerChildProps, PopoverTriggerProps, PopoverTriggerState } from './PopoverTrigger.types';\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 } = props;\n  const child = React.isValidElement(children) ? getTriggerChild(children) : undefined;\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 (shouldPreventDefaultOnKeyDown(e) && (e.key === ' ' || e.key === 'Enter')) {\n      e.preventDefault();\n      (e.target as HTMLElement)?.click();\n    }\n\n    if (e.key === 'Escape') {\n      setOpen(e, false);\n    }\n  };\n\n  const onMouseEnter = useEventCallback((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  return {\n    children: applyTriggerPropsToChildren<PopoverTriggerChildProps>(props.children, {\n      ...triggerAttributes,\n      'aria-expanded': `${open}`,\n      ...child?.props,\n      onClick: useMergedEventCallbacks(child?.props?.onClick, onClick),\n      onMouseEnter: useMergedEventCallbacks(child?.props?.onMouseEnter, onMouseEnter),\n      onKeyDown: useMergedEventCallbacks(child?.props?.onKeyDown, onKeyDown),\n      onMouseLeave: useMergedEventCallbacks(child?.props?.onMouseLeave, onMouseLeave),\n      onContextMenu: useMergedEventCallbacks(child?.props?.onContextMenu, onContextMenu),\n      ref: useMergedRefs(triggerRef, child?.ref),\n    }),\n  };\n};\n"],"sourceRoot":"../src/"}
         
     | 
| 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            {"version":3,"sources":["popoverContext.ts"],"names":[],"mappings":"AAAA,SAAS,aAAT,EAAwB,kBAAxB,QAAkD,kCAAlD;AAIA,OAAO,MAAM,cAAc,gBAAiC,aAAa,CAAsB; 
     | 
| 
      
 1 
     | 
    
         
            +
            {"version":3,"sources":["popoverContext.ts"],"names":[],"mappings":"AAAA,SAAS,aAAT,EAAwB,kBAAxB,QAAkD,kCAAlD;AAIA,OAAO,MAAM,cAAc,gBAAiC,aAAa,CAAsB;EAC7F,IAAI,EAAE,KADuF;EAE7F,OAAO,EAAE,MAAM,IAF8E;EAG7F,UAAU,EAAE,MAAM,IAH2E;EAI7F,UAAU,EAAE;IAAE,OAAO,EAAE;EAAX,CAJiF;EAK7F,UAAU,EAAE;IAAE,OAAO,EAAE;EAAX,CALiF;EAM7F,QAAQ,EAAE;IAAE,OAAO,EAAE;EAAX,CANmF;EAO7F,aAAa,EAAE,KAP8E;EAQ7F,WAAW,EAAE,KARgF;EAS7F,IAAI,EAAE,QATuF;EAU7F,SAAS,EAAE,KAVkF;EAW7F,MAAM,EAAE;AAXqF,CAAtB,CAAlE;AAcP,OAAO,MAAM,eAAe,GAAG,cAAc,CAAC,QAAvC;AAuBP,OAAO,MAAM,0BAA0B,GAAO,QAAJ,IACxC,kBAAkB,CAAC,cAAD,EAAiB,QAAjB,CADb","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>({\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',\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  | 'inline'\n>;\n\nexport const usePopoverContext_unstable = <T>(selector: ContextSelector<PopoverContextValue, T>): T =>\n  useContextSelector(PopoverContext, selector);\n"],"sourceRoot":"../src/"}
         
     | 
| 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            {"version":3,"sources":["components/Popover/Popover.tsx"],"names":[],"mappings":";;;;;;;AACA,MAAA,YAAA,gBAAA,OAAA,CAAA,cAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,iBAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,OAAO,GAA2B,KAAK,IAAG; 
     | 
| 
      
 1 
     | 
    
         
            +
            {"version":3,"sources":["components/Popover/Popover.tsx"],"names":[],"mappings":";;;;;;;AACA,MAAA,YAAA,gBAAA,OAAA,CAAA,cAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,iBAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,OAAO,GAA2B,KAAK,IAAG;EACrD,MAAM,KAAK,GAAG,YAAA,CAAA,mBAAA,CAAoB,KAApB,CAAd;EAEA,OAAO,eAAA,CAAA,sBAAA,CAAuB,KAAvB,CAAP;AACD,CAJM;;AAAM,OAAA,CAAA,OAAA,GAAO,OAAP;AAMb,OAAA,CAAA,OAAA,CAAQ,WAAR,GAAsB,SAAtB","sourcesContent":["import * as React from 'react';\nimport { usePopover_unstable } from './usePopover';\nimport { renderPopover_unstable } from './renderPopover';\nimport type { PopoverProps } from './Popover.types';\n\n/**\n * Wrapper component that manages state for a PopoverTrigger and a PopoverSurface components.\n */\nexport const Popover: React.FC<PopoverProps> = props => {\n  const state = usePopover_unstable(props);\n\n  return renderPopover_unstable(state);\n};\n\nPopover.displayName = 'Popover';\n"],"sourceRoot":"../src/"}
         
     | 
| 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            {"version":3,"sources":["components/Popover/renderPopover.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,sBAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,sBAAsB,GAAI,KAAD,IAAwB; 
     | 
| 
      
 1 
     | 
    
         
            +
            {"version":3,"sources":["components/Popover/renderPopover.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,sBAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,sBAAsB,GAAI,KAAD,IAAwB;EAC5D,MAAM;IACJ,UADI;IAEJ,QAFI;IAGJ,UAHI;IAIJ,MAJI;IAKJ,SALI;IAMJ,IANI;IAOJ,aAPI;IAQJ,WARI;IASJ,OATI;IAUJ,IAVI;IAWJ,UAXI;IAYJ,SAZI;IAaJ,UAbI;IAcJ;EAdI,IAeF,KAfJ;EAiBA,OACE,KAAA,CAAA,aAAA,CAAC,gBAAA,CAAA,cAAA,CAAe,QAAhB,EAAwB;IACtB,KAAK,EAAE;MACL,UADK;MAEL,QAFK;MAGL,UAHK;MAIL,MAJK;MAKL,SALK;MAML,IANK;MAOL,aAPK;MAQL,WARK;MASL,OATK;MAUL,UAVK;MAWL,UAXK;MAYL,IAZK;MAaL,SAbK;MAcL;IAdK;EADe,CAAxB,EAkBG,KAAK,CAAC,cAlBT,EAmBG,KAAK,CAAC,IAAN,IAAc,KAAK,CAAC,cAnBvB,CADF;AAuBD,CAzCM;;AAAM,OAAA,CAAA,sBAAA,GAAsB,sBAAtB","sourcesContent":["import * as React from 'react';\nimport { PopoverContext } from '../../popoverContext';\nimport type { PopoverState } from './Popover.types';\n\n/**\n * Render the final JSX of Popover\n */\nexport const renderPopover_unstable = (state: PopoverState) => {\n  const {\n    appearance,\n    arrowRef,\n    contentRef,\n    inline,\n    mountNode,\n    open,\n    openOnContext,\n    openOnHover,\n    setOpen,\n    size,\n    toggleOpen,\n    trapFocus,\n    triggerRef,\n    withArrow,\n  } = state;\n\n  return (\n    <PopoverContext.Provider\n      value={{\n        appearance,\n        arrowRef,\n        contentRef,\n        inline,\n        mountNode,\n        open,\n        openOnContext,\n        openOnHover,\n        setOpen,\n        toggleOpen,\n        triggerRef,\n        size,\n        trapFocus,\n        withArrow,\n      }}\n    >\n      {state.popoverTrigger}\n      {state.open && state.popoverSurface}\n    </PopoverContext.Provider>\n  );\n};\n"],"sourceRoot":"../src/"}
         
     | 
| 
         @@ -98,7 +98,7 @@ const usePopover_unstable = props => { 
     | 
|
| 
       98 
98 
     | 
    
         
             
              const positioningRefs = usePopoverRefs(initialState);
         
     | 
| 
       99 
99 
     | 
    
         
             
              const {
         
     | 
| 
       100 
100 
     | 
    
         
             
                targetDocument
         
     | 
| 
       101 
     | 
    
         
            -
              } = react_shared_contexts_1. 
     | 
| 
      
 101 
     | 
    
         
            +
              } = react_shared_contexts_1.useFluent_unstable();
         
     | 
| 
       102 
102 
     | 
    
         
             
              react_utilities_1.useOnClickOutside({
         
     | 
| 
       103 
103 
     | 
    
         
             
                contains: react_portal_1.elementContains,
         
     | 
| 
       104 
104 
     | 
    
         
             
                element: targetDocument,
         
     | 
| 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            {"version":3,"sources":["components/Popover/usePopover.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAMA,MAAA,uBAAA,gBAAA,OAAA,CAAA,iCAAA,CAAA;;AACA,MAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AAMA,MAAA,cAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA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AZ,GAAA,YAAY,CAAG,CAAH,EAAM;AAAE,UAAA,IAAI,EAAE;AAAR,SAAN,CAAZ;AACD;;AAED,aAAO,UAAP;AACD,KARW,CAAZ;AASD,GAnBa,EAoBd,CAAC,YAAD,EAAe,YAAf,EAA6B,gBAA7B,CApBc,CAAhB;AAuBA,SAAO,CAAC,IAAD,EAAO,OAAP,CAAP;AACD;AAED;;AAEG;;;AACH,SAAS,cAAT,CACE,KADF,EAEqE;AAEnE,QAAM,kBAAkB,GAAG;AACzB,IAAA,QAAQ,EAAE,OADe;AAEzB,IAAA,KAAK,EAAE,QAFkB;AAGzB,IAAA,MAAM,EAAE,KAAK,CAAC,aAAN,GAAsB,KAAK,CAAC,aAA5B,GAA4C,SAH3B;AAIzB,OAAG,mBAAA,CAAA,2BAAA,CAA4B,KAAK,CAAC,WAAlC;AAJsB,GAA3B,CAFmE,CASnE;;AACA,MAAI,kBAAkB,CAAC,WAAvB,EAAoC;AAClC,IAAA,KAAK,CAAC,SAAN,GAAkB,KAAlB;AACD;;AAED,MAAI,KAAK,CAAC,SAAV,EAAqB;AACnB,IAAA,kBAAkB,CAAC,MAAnB,GAA4B,mBAAA,CAAA,gBAAA,CAAiB,kBAAkB,CAAC,MAApC,EAA4C,OAAA,CAAA,YAAA,CAAa,KAAK,CAAC,IAAnB,CAA5C,CAA5B;AACD;;AAED,QAAM;AAAE,IAAA,SAAS,EAAE,UAAb;AAAyB,IAAA,YAAY,EAAE,UAAvC;AAAmD,IAAA;AAAnD,MAAgE,mBAAA,CAAA,cAAA,CAAe,kBAAf,CAAtE;AAEA,SAAO;AACL,IAAA,UADK;AAEL,IAAA,UAFK;AAGL,IAAA;AAHK,GAAP;AAKD","sourcesContent":["import * as React from 'react';\nimport {\n  useControllableState,\n  useEventCallback,\n  useOnClickOutside,\n  useOnScrollOutside,\n} from '@fluentui/react-utilities';\nimport { useFluent } from '@fluentui/react-shared-contexts';\nimport {\n  usePositioning,\n  resolvePositioningShorthand,\n  mergeArrowOffset,\n  usePositioningMouseTarget,\n} from '@fluentui/react-positioning';\nimport { elementContains } from '@fluentui/react-portal';\nimport { useFocusFinders } from '@fluentui/react-tabster';\nimport { arrowHeights } from '../PopoverSurface/index';\nimport type { OpenPopoverEvents, PopoverProps, PopoverState } from './Popover.types';\n\n/**\n * Create the state required to render Popover.\n *\n * The returned state can be modified with hooks such as usePopoverStyles,\n * before being passed to renderPopover_unstable.\n *\n * @param props - props from this instance of Popover\n */\nexport const usePopover_unstable = (props: PopoverProps): PopoverState => {\n  const [contextTarget, setContextTarget] = usePositioningMouseTarget();\n  const initialState = {\n    size: 'medium',\n    contextTarget,\n    setContextTarget,\n    ...props,\n  } as const;\n\n  const children = React.Children.toArray(props.children) as React.ReactElement[];\n\n  if (process.env.NODE_ENV !== 'production') {\n    if (children.length === 0) {\n      // eslint-disable-next-line no-console\n      console.warn('Popover must contain at least one child');\n    }\n\n    if (children.length > 2) {\n      // eslint-disable-next-line no-console\n      console.warn('Popover must contain at most two children');\n    }\n  }\n\n  let popoverTrigger: React.ReactElement | undefined = undefined;\n  let popoverSurface: React.ReactElement | undefined = undefined;\n  if (children.length === 2) {\n    popoverTrigger = children[0];\n    popoverSurface = children[1];\n  } else if (children.length === 1) {\n    popoverSurface = children[0];\n  }\n\n  const [open, setOpenState] = useOpenState(initialState);\n\n  const setOpenTimeoutRef = React.useRef(0);\n\n  const setOpen = useEventCallback((e: OpenPopoverEvents, shouldOpen: boolean) => {\n    clearTimeout(setOpenTimeoutRef.current);\n    if (!(e instanceof Event) && e.persist) {\n      // < React 17 still uses pooled synthetic events\n      e.persist();\n    }\n\n    if (e.type === 'mouseleave') {\n      // FIXME leaking Node timeout type\n      // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n      // @ts-ignore\n      setOpenTimeoutRef.current = setTimeout(() => {\n        setOpenState(e, shouldOpen);\n      }, props.mouseLeaveDelay ?? 500);\n    } else {\n      setOpenState(e, shouldOpen);\n    }\n  });\n\n  // Clear timeout on unmount\n  // Setting state after a component unmounts can cause memory leaks\n  React.useEffect(() => {\n    return () => {\n      clearTimeout(setOpenTimeoutRef.current);\n    };\n  }, []);\n\n  const toggleOpen = React.useCallback<PopoverState['toggleOpen']>(\n    e => {\n      setOpen(e, !open);\n    },\n    [setOpen, open],\n  );\n\n  const positioningRefs = usePopoverRefs(initialState);\n\n  const { targetDocument } = useFluent();\n  useOnClickOutside({\n    contains: elementContains,\n    element: targetDocument,\n    callback: ev => setOpen(ev, false),\n    refs: [positioningRefs.triggerRef, positioningRefs.contentRef],\n    disabled: !open,\n  });\n\n  // only close on scroll for context, or when closeOnScroll is specified\n  const closeOnScroll = initialState.openOnContext || initialState.closeOnScroll;\n  useOnScrollOutside({\n    contains: elementContains,\n    element: targetDocument,\n    callback: ev => setOpen(ev, false),\n    refs: [positioningRefs.triggerRef, positioningRefs.contentRef],\n    disabled: !open || !closeOnScroll,\n  });\n\n  const { findFirstFocusable } = useFocusFinders();\n\n  React.useEffect(() => {\n    if (open && positioningRefs.contentRef.current) {\n      const firstFocusable = findFirstFocusable(positioningRefs.contentRef.current);\n      firstFocusable?.focus();\n    }\n  }, [findFirstFocusable, open, positioningRefs.contentRef]);\n\n  return {\n    ...initialState,\n    ...positioningRefs,\n    popoverTrigger,\n    popoverSurface,\n    open,\n    setOpen,\n    toggleOpen,\n    setContextTarget,\n    contextTarget,\n    inline: props.inline ?? false,\n  };\n};\n\n/**\n * Creates and manages the Popover open state\n */\nfunction useOpenState(\n  state: Pick<PopoverState, 'setContextTarget' | 'onOpenChange'> & Pick<PopoverProps, 'open' | 'defaultOpen'>,\n) {\n  const onOpenChange: PopoverState['onOpenChange'] = useEventCallback((e, data) => state.onOpenChange?.(e, data));\n\n  const [open, setOpenState] = useControllableState({\n    state: state.open,\n    defaultState: state.defaultOpen,\n    initialState: false,\n  });\n  state.open = open !== undefined ? open : state.open;\n  const setContextTarget = state.setContextTarget;\n\n  const setOpen = React.useCallback(\n    (e: OpenPopoverEvents, shouldOpen: boolean) => {\n      if (shouldOpen && e.type === 'contextmenu') {\n        setContextTarget(e as React.MouseEvent);\n      }\n\n      if (!shouldOpen) {\n        setContextTarget(undefined);\n      }\n\n      setOpenState(prevOpen => {\n        // More than one event (mouse, focus, keyboard) can request the Popover to close\n        // We assume the first event is the correct one\n        if (prevOpen !== shouldOpen) {\n          onOpenChange?.(e, { open: shouldOpen });\n        }\n\n        return shouldOpen;\n      });\n    },\n    [setOpenState, onOpenChange, setContextTarget],\n  );\n\n  return [open, setOpen] as const;\n}\n\n/**\n * Creates and sets the necessary trigger, target and content refs used by Popover\n */\nfunction usePopoverRefs(\n  state: Pick<PopoverState, 'size' | 'contextTarget'> &\n    Pick<PopoverProps, 'positioning' | 'openOnContext' | 'withArrow'>,\n) {\n  const positioningOptions = {\n    position: 'above' as const,\n    align: 'center' as const,\n    target: state.openOnContext ? state.contextTarget : undefined,\n    ...resolvePositioningShorthand(state.positioning),\n  };\n\n  // no reason to render arrow when covering the target\n  if (positioningOptions.coverTarget) {\n    state.withArrow = false;\n  }\n\n  if (state.withArrow) {\n    positioningOptions.offset = mergeArrowOffset(positioningOptions.offset, arrowHeights[state.size]);\n  }\n\n  const { targetRef: triggerRef, containerRef: contentRef, arrowRef } = usePositioning(positioningOptions);\n\n  return {\n    triggerRef,\n    contentRef,\n    arrowRef,\n  } as const;\n}\n"],"sourceRoot":"../src/"}
         
     | 
| 
      
 1 
     | 
    
         
            +
            {"version":3,"sources":["components/Popover/usePopover.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAMA,MAAA,uBAAA,gBAAA,OAAA,CAAA,iCAAA,CAAA;;AACA,MAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AAMA,MAAA,cAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CA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kB,GAAG;IACzB,QAAQ,EAAE,OADe;IAEzB,KAAK,EAAE,QAFkB;IAGzB,MAAM,EAAE,KAAK,CAAC,aAAN,GAAsB,KAAK,CAAC,aAA5B,GAA4C,SAH3B;IAIzB,GAAG,mBAAA,CAAA,2BAAA,CAA4B,KAAK,CAAC,WAAlC;EAJsB,CAA3B,CAFmE,CASnE;;EACA,IAAI,kBAAkB,CAAC,WAAvB,EAAoC;IAClC,KAAK,CAAC,SAAN,GAAkB,KAAlB;EACD;;EAED,IAAI,KAAK,CAAC,SAAV,EAAqB;IACnB,kBAAkB,CAAC,MAAnB,GAA4B,mBAAA,CAAA,gBAAA,CAAiB,kBAAkB,CAAC,MAApC,EAA4C,OAAA,CAAA,YAAA,CAAa,KAAK,CAAC,IAAnB,CAA5C,CAA5B;EACD;;EAED,MAAM;IAAE,SAAS,EAAE,UAAb;IAAyB,YAAY,EAAE,UAAvC;IAAmD;EAAnD,IAAgE,mBAAA,CAAA,cAAA,CAAe,kBAAf,CAAtE;EAEA,OAAO;IACL,UADK;IAEL,UAFK;IAGL;EAHK,CAAP;AAKD","sourcesContent":["import * as React from 'react';\nimport {\n  useControllableState,\n  useEventCallback,\n  useOnClickOutside,\n  useOnScrollOutside,\n} from '@fluentui/react-utilities';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport {\n  usePositioning,\n  resolvePositioningShorthand,\n  mergeArrowOffset,\n  usePositioningMouseTarget,\n} from '@fluentui/react-positioning';\nimport { elementContains } from '@fluentui/react-portal';\nimport { useFocusFinders } from '@fluentui/react-tabster';\nimport { arrowHeights } from '../PopoverSurface/index';\nimport type { OpenPopoverEvents, PopoverProps, PopoverState } from './Popover.types';\n\n/**\n * Create the state required to render Popover.\n *\n * The returned state can be modified with hooks such as usePopoverStyles,\n * before being passed to renderPopover_unstable.\n *\n * @param props - props from this instance of Popover\n */\nexport const usePopover_unstable = (props: PopoverProps): PopoverState => {\n  const [contextTarget, setContextTarget] = usePositioningMouseTarget();\n  const initialState = {\n    size: 'medium',\n    contextTarget,\n    setContextTarget,\n    ...props,\n  } as const;\n\n  const children = React.Children.toArray(props.children) as React.ReactElement[];\n\n  if (process.env.NODE_ENV !== 'production') {\n    if (children.length === 0) {\n      // eslint-disable-next-line no-console\n      console.warn('Popover must contain at least one child');\n    }\n\n    if (children.length > 2) {\n      // eslint-disable-next-line no-console\n      console.warn('Popover must contain at most two children');\n    }\n  }\n\n  let popoverTrigger: React.ReactElement | undefined = undefined;\n  let popoverSurface: React.ReactElement | undefined = undefined;\n  if (children.length === 2) {\n    popoverTrigger = children[0];\n    popoverSurface = children[1];\n  } else if (children.length === 1) {\n    popoverSurface = children[0];\n  }\n\n  const [open, setOpenState] = useOpenState(initialState);\n\n  const setOpenTimeoutRef = React.useRef(0);\n\n  const setOpen = useEventCallback((e: OpenPopoverEvents, shouldOpen: boolean) => {\n    clearTimeout(setOpenTimeoutRef.current);\n    if (!(e instanceof Event) && e.persist) {\n      // < React 17 still uses pooled synthetic events\n      e.persist();\n    }\n\n    if (e.type === 'mouseleave') {\n      // FIXME leaking Node timeout type\n      // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n      // @ts-ignore\n      setOpenTimeoutRef.current = setTimeout(() => {\n        setOpenState(e, shouldOpen);\n      }, props.mouseLeaveDelay ?? 500);\n    } else {\n      setOpenState(e, shouldOpen);\n    }\n  });\n\n  // Clear timeout on unmount\n  // Setting state after a component unmounts can cause memory leaks\n  React.useEffect(() => {\n    return () => {\n      clearTimeout(setOpenTimeoutRef.current);\n    };\n  }, []);\n\n  const toggleOpen = React.useCallback<PopoverState['toggleOpen']>(\n    e => {\n      setOpen(e, !open);\n    },\n    [setOpen, open],\n  );\n\n  const positioningRefs = usePopoverRefs(initialState);\n\n  const { targetDocument } = useFluent();\n  useOnClickOutside({\n    contains: elementContains,\n    element: targetDocument,\n    callback: ev => setOpen(ev, false),\n    refs: [positioningRefs.triggerRef, positioningRefs.contentRef],\n    disabled: !open,\n  });\n\n  // only close on scroll for context, or when closeOnScroll is specified\n  const closeOnScroll = initialState.openOnContext || initialState.closeOnScroll;\n  useOnScrollOutside({\n    contains: elementContains,\n    element: targetDocument,\n    callback: ev => setOpen(ev, false),\n    refs: [positioningRefs.triggerRef, positioningRefs.contentRef],\n    disabled: !open || !closeOnScroll,\n  });\n\n  const { findFirstFocusable } = useFocusFinders();\n\n  React.useEffect(() => {\n    if (open && positioningRefs.contentRef.current) {\n      const firstFocusable = findFirstFocusable(positioningRefs.contentRef.current);\n      firstFocusable?.focus();\n    }\n  }, [findFirstFocusable, open, positioningRefs.contentRef]);\n\n  return {\n    ...initialState,\n    ...positioningRefs,\n    popoverTrigger,\n    popoverSurface,\n    open,\n    setOpen,\n    toggleOpen,\n    setContextTarget,\n    contextTarget,\n    inline: props.inline ?? false,\n  };\n};\n\n/**\n * Creates and manages the Popover open state\n */\nfunction useOpenState(\n  state: Pick<PopoverState, 'setContextTarget' | 'onOpenChange'> & Pick<PopoverProps, 'open' | 'defaultOpen'>,\n) {\n  const onOpenChange: PopoverState['onOpenChange'] = useEventCallback((e, data) => state.onOpenChange?.(e, data));\n\n  const [open, setOpenState] = useControllableState({\n    state: state.open,\n    defaultState: state.defaultOpen,\n    initialState: false,\n  });\n  state.open = open !== undefined ? open : state.open;\n  const setContextTarget = state.setContextTarget;\n\n  const setOpen = React.useCallback(\n    (e: OpenPopoverEvents, shouldOpen: boolean) => {\n      if (shouldOpen && e.type === 'contextmenu') {\n        setContextTarget(e as React.MouseEvent);\n      }\n\n      if (!shouldOpen) {\n        setContextTarget(undefined);\n      }\n\n      setOpenState(prevOpen => {\n        // More than one event (mouse, focus, keyboard) can request the Popover to close\n        // We assume the first event is the correct one\n        if (prevOpen !== shouldOpen) {\n          onOpenChange?.(e, { open: shouldOpen });\n        }\n\n        return shouldOpen;\n      });\n    },\n    [setOpenState, onOpenChange, setContextTarget],\n  );\n\n  return [open, setOpen] as const;\n}\n\n/**\n * Creates and sets the necessary trigger, target and content refs used by Popover\n */\nfunction usePopoverRefs(\n  state: Pick<PopoverState, 'size' | 'contextTarget'> &\n    Pick<PopoverProps, 'positioning' | 'openOnContext' | 'withArrow'>,\n) {\n  const positioningOptions = {\n    position: 'above' as const,\n    align: 'center' as const,\n    target: state.openOnContext ? state.contextTarget : undefined,\n    ...resolvePositioningShorthand(state.positioning),\n  };\n\n  // no reason to render arrow when covering the target\n  if (positioningOptions.coverTarget) {\n    state.withArrow = false;\n  }\n\n  if (state.withArrow) {\n    positioningOptions.offset = mergeArrowOffset(positioningOptions.offset, arrowHeights[state.size]);\n  }\n\n  const { targetRef: triggerRef, containerRef: contentRef, arrowRef } = usePositioning(positioningOptions);\n\n  return {\n    triggerRef,\n    contentRef,\n    arrowRef,\n  } as const;\n}\n"],"sourceRoot":"../src/"}
         
     | 
| 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            {"version":3,"sources":["components/PopoverSurface/PopoverSurface.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,mBAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;;AACA,MAAA,sBAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;;AACA,MAAA,yBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,cAAA,gBAA2D,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe; 
     | 
| 
      
 1 
     | 
    
         
            +
            {"version":3,"sources":["components/PopoverSurface/PopoverSurface.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,mBAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;;AACA,MAAA,sBAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;;AACA,MAAA,yBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,cAAA,gBAA2D,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EACtG,MAAM,KAAK,GAAG,mBAAA,CAAA,0BAAA,CAA2B,KAA3B,EAAkC,GAAlC,CAAd;EAEA,yBAAA,CAAA,gCAAA,CAAiC,KAAjC;EACA,OAAO,sBAAA,CAAA,6BAAA,CAA8B,KAA9B,CAAP;AACD,CALuE,CAA3D;AAOb,OAAA,CAAA,cAAA,CAAe,WAAf,GAA6B,gBAA7B","sourcesContent":["import * as React from 'react';\nimport { usePopoverSurface_unstable } from './usePopoverSurface';\nimport { renderPopoverSurface_unstable } from './renderPopoverSurface';\nimport { usePopoverSurfaceStyles_unstable } from './usePopoverSurfaceStyles';\nimport type { PopoverSurfaceProps } from './PopoverSurface.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * PopoverSurface component renders react children in a positioned box\n */\nexport const PopoverSurface: ForwardRefComponent<PopoverSurfaceProps> = React.forwardRef((props, ref) => {\n  const state = usePopoverSurface_unstable(props, ref);\n\n  usePopoverSurfaceStyles_unstable(state);\n  return renderPopoverSurface_unstable(state);\n});\n\nPopoverSurface.displayName = 'PopoverSurface';\n"],"sourceRoot":"../src/"}
         
     | 
| 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            {"version":3,"sources":["components/PopoverSurface/renderPopoverSurface.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,cAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,6BAA6B,GAAI,KAAD,IAA+B; 
     | 
| 
      
 1 
     | 
    
         
            +
            {"version":3,"sources":["components/PopoverSurface/renderPopoverSurface.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,cAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,6BAA6B,GAAI,KAAD,IAA+B;EAC1E,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,iBAAA,CAAA,QAAA,CAA8B,KAA9B,CAA7B;EAEA,MAAM,OAAO,GACX,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,EACG,KAAK,CAAC,SAAN,IAAmB,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;IAAK,GAAG,EAAE,KAAK,CAAC,QAAhB;IAA0B,SAAS,EAAE,KAAK,CAAC;EAA3C,CAAA,CADtB,EAEG,SAAS,CAAC,IAAV,CAAe,QAFlB,CADF;;EAOA,IAAI,KAAK,CAAC,MAAV,EAAkB;IAChB,OAAO,OAAP;EACD;;EAED,OAAO,KAAA,CAAA,aAAA,CAAC,cAAA,CAAA,MAAD,EAAO;IAAC,SAAS,EAAE,KAAK,CAAC;EAAlB,CAAP,EAAqC,OAArC,CAAP;AACD,CAfM;;AAAM,OAAA,CAAA,6BAAA,GAA6B,6BAA7B","sourcesContent":["import * as React from 'react';\nimport { Portal } from '@fluentui/react-portal';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { PopoverSurfaceSlots, PopoverSurfaceState } from './PopoverSurface.types';\n\n/**\n * Render the final JSX of PopoverSurface\n */\nexport const renderPopoverSurface_unstable = (state: PopoverSurfaceState) => {\n  const { slots, slotProps } = getSlots<PopoverSurfaceSlots>(state);\n\n  const surface = (\n    <slots.root {...slotProps.root}>\n      {state.withArrow && <div ref={state.arrowRef} className={state.arrowClassName} />}\n      {slotProps.root.children}\n    </slots.root>\n  );\n\n  if (state.inline) {\n    return surface;\n  }\n\n  return <Portal mountNode={state.mountNode}>{surface}</Portal>;\n};\n"],"sourceRoot":"../src/"}
         
     | 
| 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            {"version":3,"sources":["components/PopoverSurface/usePopoverSurface.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,sBAAA,CAAA;AAGA;;;;;;;;AAQG;;;AACI,MAAM,0BAA0B,GAAG,CACxC,KADwC,EAExC,GAFwC,KAGjB; 
     | 
| 
      
 1 
     | 
    
         
            +
            {"version":3,"sources":["components/PopoverSurface/usePopoverSurface.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,sBAAA,CAAA;AAGA;;;;;;;;AAQG;;;AACI,MAAM,0BAA0B,GAAG,CACxC,KADwC,EAExC,GAFwC,KAGjB;EACvB,MAAM,UAAU,GAAG,gBAAA,CAAA,0BAAA,CAA2B,OAAO,IAAI,OAAO,CAAC,UAA9C,CAAnB;EACA,MAAM,WAAW,GAAG,gBAAA,CAAA,0BAAA,CAA2B,OAAO,IAAI,OAAO,CAAC,WAA9C,CAApB;EACA,MAAM,OAAO,GAAG,gBAAA,CAAA,0BAAA,CAA2B,OAAO,IAAI,OAAO,CAAC,OAA9C,CAAhB;EACA,MAAM,SAAS,GAAG,gBAAA,CAAA,0BAAA,CAA2B,OAAO,IAAI,OAAO,CAAC,SAA9C,CAAlB;EACA,MAAM,QAAQ,GAAG,gBAAA,CAAA,0BAAA,CAA2B,OAAO,IAAI,OAAO,CAAC,QAA9C,CAAjB;EACA,MAAM,IAAI,GAAG,gBAAA,CAAA,0BAAA,CAA2B,OAAO,IAAI,OAAO,CAAC,IAA9C,CAAb;EACA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;EACD,CAND;;EAQA,KAAK,CAAC,IAAN,CAAW,YAAX,GAA2B,CAAD,IAAwC;IAChE,IAAI,WAAJ,EAAiB;MACf,OAAO,CAAC,CAAD,EAAI,KAAJ,CAAP;IACD;;IAED,oBAAoB,KAAA,IAApB,IAAA,oBAAoB,KAAA,KAAA,CAApB,GAAoB,KAAA,CAApB,GAAA,oBAAoB,CAAG,CAAH,CAApB;EACD,CAND;;EAQA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAwB,CAAD,IAA2C;WAAA,CAChE;IACA;;;IACA,IAAI,CAAC,CAAC,GAAF,KAAU,QAAV,KAAsB,CAAA,EAAA,GAAA,UAAU,CAAC,OAAX,MAAkB,IAAlB,IAAkB,EAAA,KAAA,KAAA,CAAlB,GAAkB,KAAA,CAAlB,GAAkB,EAAA,CAAE,QAAF,CAAW,CAAC,CAAC,MAAb,CAAxC,CAAJ,EAAoF;MAClF,OAAO,CAAC,CAAD,EAAI,KAAJ,CAAP;IACD;;IAED,iBAAiB,KAAA,IAAjB,IAAA,iBAAiB,KAAA,KAAA,CAAjB,GAAiB,KAAA,CAAjB,GAAA,iBAAiB,CAAG,CAAH,CAAjB;EACD,CARD;;EAUA,OAAO,KAAP;AACD,CAnEM;;AAAM,OAAA,CAAA,0BAAA,GAA0B,0BAA1B","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 inline = usePopoverContext_unstable(context => context.inline);\n  const { modalAttributes } = useModalAttributes({ trapFocus });\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' : 'complementary',\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      setOpen(e, false);\n    }\n\n    onKeyDownOriginal?.(e);\n  };\n\n  return state;\n};\n"],"sourceRoot":"../src/"}
         
     | 
| 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            {"version":3,"sources":["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; 
     | 
| 
      
 1 
     | 
    
         
            +
            {"version":3,"sources":["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;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,EAAlB;AAqCA;;AAEG;;;AACI,MAAM,gCAAgC,GAAI,KAAD,IAAoD;EAClG,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CACrB,OAAA,CAAA,wBAAA,CAAyB,IADJ,EAErB,MAAM,CAAC,IAFc,EAGrB,KAAK,CAAC,IAAN,KAAe,OAAf,IAA0B,MAAM,CAAC,YAHZ,EAIrB,KAAK,CAAC,IAAN,KAAe,QAAf,IAA2B,MAAM,CAAC,aAJb,EAKrB,KAAK,CAAC,IAAN,KAAe,OAAf,IAA0B,MAAM,CAAC,YALZ,EAMrB,KAAK,CAAC,UAAN,KAAqB,UAArB,IAAmC,MAAM,CAAC,QANrB,EAOrB,KAAK,CAAC,UAAN,KAAqB,OAArB,IAAgC,MAAM,CAAC,KAPlB,EAQrB,KAAK,CAAC,IAAN,CAAW,SARU,CAAvB;EAWA,KAAK,CAAC,cAAN,GAAuB,OAAA,CAAA,YAAA,CACrB,MAAM,CAAC,KADc,EAErB,KAAK,CAAC,IAAN,KAAe,OAAf,GAAyB,MAAM,CAAC,UAAhC,GAA6C,MAAM,CAAC,gBAF/B,CAAvB;EAKA,OAAO,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 } 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    backgroundColor: tokens.colorNeutralBackground1,\n    boxShadow: tokens.shadow16,\n    ...shorthands.borderRadius('4px'),\n    ...shorthands.border('1px', 'solid', tokens.colorTransparentStroke),\n  },\n\n  inverted: {\n    // TODO: neutral background inverted missing from superset and theme\n    backgroundColor: tokens.colorNeutralForeground1,\n    color: tokens.colorNeutralForegroundInverted,\n  },\n\n  brand: {\n    backgroundColor: tokens.colorBrandBackground,\n    // TODO: clarify with designers what foreground color should be with brand background,\n    color: tokens.colorNeutralForegroundInverted,\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 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            {"version":3,"sources":["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,GAA2D,KAAK,IAAG; 
     | 
| 
      
 1 
     | 
    
         
            +
            {"version":3,"sources":["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,GAA2D,KAAK,IAAG;EAC5F,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;AACA,OAAA,CAAA,cAAA,CAAe,wBAAf,GAA0C,IAA1C","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> & FluentTriggerComponent = props => {\n  const state = usePopoverTrigger_unstable(props);\n\n  return renderPopoverTrigger_unstable(state);\n};\n\nPopoverTrigger.displayName = 'PopoverTrigger';\nPopoverTrigger.isFluentTriggerComponent = true;\n"],"sourceRoot":"../src/"}
         
     | 
| 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            {"version":3,"sources":["components/PopoverTrigger/renderPopoverTrigger.tsx"],"names":[],"mappings":";;;;;;AAEA;;AAEG;;AACI,MAAM,6BAA6B,GAAI,KAAD,IAA+B; 
     | 
| 
      
 1 
     | 
    
         
            +
            {"version":3,"sources":["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 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            {"version":3,"sources":["components/PopoverTrigger/usePopoverTrigger.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAQA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,sBAAA,CAAA;AAGA;;;;;;;AAOG;;;AACI,MAAM,0BAA0B,GAAI,KAAD,IAAoD;;; 
     | 
| 
      
 1 
     | 
    
         
            +
            {"version":3,"sources":["components/PopoverTrigger/usePopoverTrigger.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAQA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,sBAAA,CAAA;AAGA;;;;;;;AAOG;;;AACI,MAAM,0BAA0B,GAAI,KAAD,IAAoD;;;EAC5F,MAAM;IAAE;EAAF,IAAe,KAArB;EACA,MAAM,KAAK,GAAG,KAAK,CAAC,cAAN,CAAqB,QAArB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,uBAAA,CAAwB,CAAA,EAAA,GAAA,KAAK,KAAA,IAAL,IAAA,KAAK,KAAA,KAAA,CAAL,GAAK,KAAA,CAAL,GAAA,KAAK,CAAE,KAAP,MAAY,IAAZ,IAAY,EAAA,KAAA,KAAA,CAAZ,GAAY,KAAA,CAAZ,GAAY,EAAA,CAAE,SAAtC,EAAiD,SAAjD,CANmE;MAO9E,YAAY,EAAE,iBAAA,CAAA,uBAAA,CAAwB,CAAA,EAAA,GAAA,KAAK,KAAA,IAAL,IAAA,KAAK,KAAA,KAAA,CAAL,GAAK,KAAA,CAAL,GAAA,KAAK,CAAE,KAAP,MAAY,IAAZ,IAAY,EAAA,KAAA,KAAA,CAAZ,GAAY,KAAA,CAAZ,GAAY,EAAA,CAAE,YAAtC,EAAoD,YAApD,CAPgE;MAQ9E,aAAa,EAAE,iBAAA,CAAA,uBAAA,CAAwB,CAAA,EAAA,GAAA,KAAK,KAAA,IAAL,IAAA,KAAK,KAAA,KAAA,CAAL,GAAK,KAAA,CAAL,GAAA,KAAK,CAAE,KAAP,MAAY,IAAZ,IAAY,EAAA,KAAA,KAAA,CAAZ,GAAY,KAAA,CAAZ,GAAY,EAAA,CAAE,aAAtC,EAAqD,aAArD,CAR+D;MAS9E,GAAG,EAAE,iBAAA,CAAA,aAAA,CAAc,UAAd,EAA0B,KAAK,KAAA,IAAL,IAAA,KAAK,KAAA,KAAA,CAAL,GAAK,KAAA,CAAL,GAAA,KAAK,CAAE,GAAjC;IATyE,CAAtE;EADL,CAAP;AAaD,CA7DM;;AAAM,OAAA,CAAA,0BAAA,GAA0B,0BAA1B","sourcesContent":["import * as React from 'react';\nimport {\n  applyTriggerPropsToChildren,\n  getTriggerChild,\n  shouldPreventDefaultOnKeyDown,\n  useMergedRefs,\n  useMergedEventCallbacks,\n  useEventCallback,\n} from '@fluentui/react-utilities';\nimport { useModalAttributes } from '@fluentui/react-tabster';\nimport { usePopoverContext_unstable } from '../../popoverContext';\nimport type { PopoverTriggerChildProps, PopoverTriggerProps, PopoverTriggerState } from './PopoverTrigger.types';\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 } = props;\n  const child = React.isValidElement(children) ? getTriggerChild(children) : undefined;\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 (shouldPreventDefaultOnKeyDown(e) && (e.key === ' ' || e.key === 'Enter')) {\n      e.preventDefault();\n      (e.target as HTMLElement)?.click();\n    }\n\n    if (e.key === 'Escape') {\n      setOpen(e, false);\n    }\n  };\n\n  const onMouseEnter = useEventCallback((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  return {\n    children: applyTriggerPropsToChildren<PopoverTriggerChildProps>(props.children, {\n      ...triggerAttributes,\n      'aria-expanded': `${open}`,\n      ...child?.props,\n      onClick: useMergedEventCallbacks(child?.props?.onClick, onClick),\n      onMouseEnter: useMergedEventCallbacks(child?.props?.onMouseEnter, onMouseEnter),\n      onKeyDown: useMergedEventCallbacks(child?.props?.onKeyDown, onKeyDown),\n      onMouseLeave: useMergedEventCallbacks(child?.props?.onMouseLeave, onMouseLeave),\n      onContextMenu: useMergedEventCallbacks(child?.props?.onContextMenu, onContextMenu),\n      ref: useMergedRefs(triggerRef, child?.ref),\n    }),\n  };\n};\n"],"sourceRoot":"../src/"}
         
     | 
| 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,SAAA,gBAAA,OAAA,CAAA,WAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,SAAA,EAAA; 
     | 
| 
      
 1 
     | 
    
         
            +
            {"version":3,"sources":["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;AAA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AAA,EAAA,gBAAA,EAAA;EAAA,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 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            {"version":3,"sources":["popoverContext.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,wBAAA,gBAAA,OAAA,CAAA,kCAAA,CAAA;;AAIa,OAAA,CAAA,cAAA,gBAA+C,wBAAA,CAAA,aAAA,CAAmC; 
     | 
| 
      
 1 
     | 
    
         
            +
            {"version":3,"sources":["popoverContext.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,wBAAA,gBAAA,OAAA,CAAA,kCAAA,CAAA;;AAIa,OAAA,CAAA,cAAA,gBAA+C,wBAAA,CAAA,aAAA,CAAmC;EAC7F,IAAI,EAAE,KADuF;EAE7F,OAAO,EAAE,MAAM,IAF8E;EAG7F,UAAU,EAAE,MAAM,IAH2E;EAI7F,UAAU,EAAE;IAAE,OAAO,EAAE;EAAX,CAJiF;EAK7F,UAAU,EAAE;IAAE,OAAO,EAAE;EAAX,CALiF;EAM7F,QAAQ,EAAE;IAAE,OAAO,EAAE;EAAX,CANmF;EAO7F,aAAa,EAAE,KAP8E;EAQ7F,WAAW,EAAE,KARgF;EAS7F,IAAI,EAAE,QATuF;EAU7F,SAAS,EAAE,KAVkF;EAW7F,MAAM,EAAE;AAXqF,CAAnC,CAA/C;AAcA,OAAA,CAAA,eAAA,GAAkB,OAAA,CAAA,cAAA,CAAe,QAAjC;;AAuBN,MAAM,0BAA0B,GAAO,QAAJ,IACxC,wBAAA,CAAA,kBAAA,CAAmB,OAAA,CAAA,cAAnB,EAAmC,QAAnC,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>({\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',\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  | 'inline'\n>;\n\nexport const usePopoverContext_unstable = <T>(selector: ContextSelector<PopoverContextValue, T>): T =>\n  useContextSelector(PopoverContext, selector);\n"],"sourceRoot":"../src/"}
         
     | 
    
        package/package.json
    CHANGED
    
    | 
         @@ -1,6 +1,6 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            {
         
     | 
| 
       2 
2 
     | 
    
         
             
              "name": "@fluentui/react-popover",
         
     | 
| 
       3 
     | 
    
         
            -
              "version": "0.0.0-nightly- 
     | 
| 
      
 3 
     | 
    
         
            +
              "version": "0.0.0-nightly-20220607-0421.1",
         
     | 
| 
       4 
4 
     | 
    
         
             
              "description": "Popover component for Fluent UI",
         
     | 
| 
       5 
5 
     | 
    
         
             
              "main": "lib-commonjs/index.js",
         
     | 
| 
       6 
6 
     | 
    
         
             
              "module": "lib/index.js",
         
     | 
| 
         @@ -29,18 +29,18 @@ 
     | 
|
| 
       29 
29 
     | 
    
         
             
              "devDependencies": {
         
     | 
| 
       30 
30 
     | 
    
         
             
                "@fluentui/eslint-plugin": "*",
         
     | 
| 
       31 
31 
     | 
    
         
             
                "@fluentui/react-conformance": "*",
         
     | 
| 
       32 
     | 
    
         
            -
                "@fluentui/react-conformance-griffel": "0.0.0-nightly- 
     | 
| 
      
 32 
     | 
    
         
            +
                "@fluentui/react-conformance-griffel": "0.0.0-nightly-20220607-0421.0",
         
     | 
| 
       33 
33 
     | 
    
         
             
                "@fluentui/scripts": "^1.0.0"
         
     | 
| 
       34 
34 
     | 
    
         
             
              },
         
     | 
| 
       35 
35 
     | 
    
         
             
              "dependencies": {
         
     | 
| 
       36 
     | 
    
         
            -
                "@fluentui/react-context-selector": "0.0.0-nightly- 
     | 
| 
       37 
     | 
    
         
            -
                "@griffel/react": "1.0 
     | 
| 
       38 
     | 
    
         
            -
                "@fluentui/react-portal": "0.0.0-nightly- 
     | 
| 
       39 
     | 
    
         
            -
                "@fluentui/react-positioning": "0.0.0-nightly- 
     | 
| 
       40 
     | 
    
         
            -
                "@fluentui/react-shared-contexts": "0.0.0-nightly- 
     | 
| 
       41 
     | 
    
         
            -
                "@fluentui/react-tabster": "0.0.0-nightly- 
     | 
| 
       42 
     | 
    
         
            -
                "@fluentui/react-theme": "0.0.0-nightly- 
     | 
| 
       43 
     | 
    
         
            -
                "@fluentui/react-utilities": "0.0.0-nightly- 
     | 
| 
      
 36 
     | 
    
         
            +
                "@fluentui/react-context-selector": "0.0.0-nightly-20220607-0421.1",
         
     | 
| 
      
 37 
     | 
    
         
            +
                "@griffel/react": "1.1.0",
         
     | 
| 
      
 38 
     | 
    
         
            +
                "@fluentui/react-portal": "0.0.0-nightly-20220607-0421.1",
         
     | 
| 
      
 39 
     | 
    
         
            +
                "@fluentui/react-positioning": "0.0.0-nightly-20220607-0421.1",
         
     | 
| 
      
 40 
     | 
    
         
            +
                "@fluentui/react-shared-contexts": "0.0.0-nightly-20220607-0421.0",
         
     | 
| 
      
 41 
     | 
    
         
            +
                "@fluentui/react-tabster": "0.0.0-nightly-20220607-0421.1",
         
     | 
| 
      
 42 
     | 
    
         
            +
                "@fluentui/react-theme": "0.0.0-nightly-20220607-0421.0",
         
     | 
| 
      
 43 
     | 
    
         
            +
                "@fluentui/react-utilities": "0.0.0-nightly-20220607-0421.1",
         
     | 
| 
       44 
44 
     | 
    
         
             
                "tslib": "^2.1.0"
         
     | 
| 
       45 
45 
     | 
    
         
             
              },
         
     | 
| 
       46 
46 
     | 
    
         
             
              "peerDependencies": {
         
     |