@react-stately/menu 3.3.2-nightly.3373 → 3.3.2-nightly.3375
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/dist/main.js.map +1 -1
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +6 -6
- package/src/index.ts +4 -1
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;SCgCgB,yCAAmB,CAAC,KAAuB,EAAqB,CAAC;IAC/E,GAAG,CAAC,mBAAmB,GAAG,kDAAsB,CAAC,KAAK;IACtD,GAAG,EAAE,cAAa,EAAE,gBAAgB,IAAI,qBAAQ,CAAgB,IAAI;IAEpE,MAAM,CAAC,CAAC;uBACN,cAAa;WACV,mBAAmB;QACtB,IAAI,EAAC,aAA4B,GAAG,IAAI,EAAE,CAAC;YACzC,gBAAgB,CAAC,aAAa;YAC9B,mBAAmB,CAAC,IAAI;QAC1B,CAAC;QACD,MAAM,EAAC,aAA4B,GAAG,IAAI,EAAE,CAAC;YAC3C,gBAAgB,CAAC,aAAa;YAC9B,mBAAmB,CAAC,MAAM;QAC5B,CAAC;IACH,CAAC;AACH,CAAC","sources":["packages/@react-stately/menu/src/index.ts","packages/@react-stately/menu/src/useMenuTriggerState.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nexport
|
|
1
|
+
{"mappings":";;;;;;;;;;SCgCgB,yCAAmB,CAAC,KAAuB,EAAqB,CAAC;IAC/E,GAAG,CAAC,mBAAmB,GAAG,kDAAsB,CAAC,KAAK;IACtD,GAAG,EAAE,cAAa,EAAE,gBAAgB,IAAI,qBAAQ,CAAgB,IAAI;IAEpE,MAAM,CAAC,CAAC;uBACN,cAAa;WACV,mBAAmB;QACtB,IAAI,EAAC,aAA4B,GAAG,IAAI,EAAE,CAAC;YACzC,gBAAgB,CAAC,aAAa;YAC9B,mBAAmB,CAAC,IAAI;QAC1B,CAAC;QACD,MAAM,EAAC,aAA4B,GAAG,IAAI,EAAE,CAAC;YAC3C,gBAAgB,CAAC,aAAa;YAC9B,mBAAmB,CAAC,MAAM;QAC5B,CAAC;IACH,CAAC;AACH,CAAC","sources":["packages/@react-stately/menu/src/index.ts","packages/@react-stately/menu/src/useMenuTriggerState.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {useMenuTriggerState} from './useMenuTriggerState';\n\nexport type {MenuTriggerProps} from '@react-types/menu';\nexport type {MenuTriggerState} from './useMenuTriggerState';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {FocusStrategy} from '@react-types/shared';\nimport {MenuTriggerProps} from '@react-types/menu';\nimport {OverlayTriggerState, useOverlayTriggerState} from '@react-stately/overlays';\nimport {useState} from 'react';\n\nexport interface MenuTriggerState extends OverlayTriggerState {\n /** Controls which item will be auto focused when the menu opens. */\n readonly focusStrategy: FocusStrategy,\n\n /** Opens the menu. */\n open(focusStrategy?: FocusStrategy | null): void,\n\n /** Toggles the menu. */\n toggle(focusStrategy?: FocusStrategy | null): void\n}\n\n/**\n * Manages state for a menu trigger. Tracks whether the menu is currently open,\n * and controls which item will receive focus when it opens.\n */\nexport function useMenuTriggerState(props: MenuTriggerProps): MenuTriggerState {\n let overlayTriggerState = useOverlayTriggerState(props);\n let [focusStrategy, setFocusStrategy] = useState<FocusStrategy>(null);\n\n return {\n focusStrategy,\n ...overlayTriggerState,\n open(focusStrategy: FocusStrategy = null) {\n setFocusStrategy(focusStrategy);\n overlayTriggerState.open();\n },\n toggle(focusStrategy: FocusStrategy = null) {\n setFocusStrategy(focusStrategy);\n overlayTriggerState.toggle();\n }\n };\n}\n"],"names":[],"version":3,"file":"main.js.map"}
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;SCgCgB,yCAAmB,CAAC,KAAuB,EAAqB,CAAC;IAC/E,GAAG,CAAC,mBAAmB,GAAG,6BAAsB,CAAC,KAAK;IACtD,GAAG,EAAE,cAAa,EAAE,gBAAgB,IAAI,eAAQ,CAAgB,IAAI;IAEpE,MAAM,CAAC,CAAC;uBACN,cAAa;WACV,mBAAmB;QACtB,IAAI,EAAC,aAA4B,GAAG,IAAI,EAAE,CAAC;YACzC,gBAAgB,CAAC,aAAa;YAC9B,mBAAmB,CAAC,IAAI;QAC1B,CAAC;QACD,MAAM,EAAC,aAA4B,GAAG,IAAI,EAAE,CAAC;YAC3C,gBAAgB,CAAC,aAAa;YAC9B,mBAAmB,CAAC,MAAM;QAC5B,CAAC;IACH,CAAC;AACH,CAAC","sources":["packages/@react-stately/menu/src/index.ts","packages/@react-stately/menu/src/useMenuTriggerState.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nexport
|
|
1
|
+
{"mappings":";;;;;SCgCgB,yCAAmB,CAAC,KAAuB,EAAqB,CAAC;IAC/E,GAAG,CAAC,mBAAmB,GAAG,6BAAsB,CAAC,KAAK;IACtD,GAAG,EAAE,cAAa,EAAE,gBAAgB,IAAI,eAAQ,CAAgB,IAAI;IAEpE,MAAM,CAAC,CAAC;uBACN,cAAa;WACV,mBAAmB;QACtB,IAAI,EAAC,aAA4B,GAAG,IAAI,EAAE,CAAC;YACzC,gBAAgB,CAAC,aAAa;YAC9B,mBAAmB,CAAC,IAAI;QAC1B,CAAC;QACD,MAAM,EAAC,aAA4B,GAAG,IAAI,EAAE,CAAC;YAC3C,gBAAgB,CAAC,aAAa;YAC9B,mBAAmB,CAAC,MAAM;QAC5B,CAAC;IACH,CAAC;AACH,CAAC","sources":["packages/@react-stately/menu/src/index.ts","packages/@react-stately/menu/src/useMenuTriggerState.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {useMenuTriggerState} from './useMenuTriggerState';\n\nexport type {MenuTriggerProps} from '@react-types/menu';\nexport type {MenuTriggerState} from './useMenuTriggerState';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {FocusStrategy} from '@react-types/shared';\nimport {MenuTriggerProps} from '@react-types/menu';\nimport {OverlayTriggerState, useOverlayTriggerState} from '@react-stately/overlays';\nimport {useState} from 'react';\n\nexport interface MenuTriggerState extends OverlayTriggerState {\n /** Controls which item will be auto focused when the menu opens. */\n readonly focusStrategy: FocusStrategy,\n\n /** Opens the menu. */\n open(focusStrategy?: FocusStrategy | null): void,\n\n /** Toggles the menu. */\n toggle(focusStrategy?: FocusStrategy | null): void\n}\n\n/**\n * Manages state for a menu trigger. Tracks whether the menu is currently open,\n * and controls which item will receive focus when it opens.\n */\nexport function useMenuTriggerState(props: MenuTriggerProps): MenuTriggerState {\n let overlayTriggerState = useOverlayTriggerState(props);\n let [focusStrategy, setFocusStrategy] = useState<FocusStrategy>(null);\n\n return {\n focusStrategy,\n ...overlayTriggerState,\n open(focusStrategy: FocusStrategy = null) {\n setFocusStrategy(focusStrategy);\n overlayTriggerState.open();\n },\n toggle(focusStrategy: FocusStrategy = null) {\n setFocusStrategy(focusStrategy);\n overlayTriggerState.toggle();\n }\n };\n}\n"],"names":[],"version":3,"file":"module.js.map"}
|
package/dist/types.d.ts
CHANGED
|
@@ -14,5 +14,6 @@ export interface MenuTriggerState extends OverlayTriggerState {
|
|
|
14
14
|
* and controls which item will receive focus when it opens.
|
|
15
15
|
*/
|
|
16
16
|
export function useMenuTriggerState(props: MenuTriggerProps): MenuTriggerState;
|
|
17
|
+
export type { MenuTriggerProps } from '@react-types/menu';
|
|
17
18
|
|
|
18
19
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;AAiBA,iCAAkC,SAAQ,mBAAmB;IAC3D,oEAAoE;IACpE,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IAEtC,sBAAsB;IACtB,IAAI,CAAC,aAAa,CAAC,EAAE,aAAa,GAAG,IAAI,GAAG,IAAI,CAAC;IAEjD,wBAAwB;IACxB,MAAM,CAAC,aAAa,CAAC,EAAE,aAAa,GAAG,IAAI,GAAG,IAAI,CAAA;CACnD;AAED;;;GAGG;AACH,oCAAoC,KAAK,EAAE,gBAAgB,GAAG,gBAAgB,CAgB7E","sources":["packages/@react-stately/menu/src/packages/@react-stately/menu/src/useMenuTriggerState.ts","packages/@react-stately/menu/src/packages/@react-stately/menu/src/index.ts","packages/@react-stately/menu/src/index.ts"],"sourcesContent":[null,null,"/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nexport
|
|
1
|
+
{"mappings":";;;AAiBA,iCAAkC,SAAQ,mBAAmB;IAC3D,oEAAoE;IACpE,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IAEtC,sBAAsB;IACtB,IAAI,CAAC,aAAa,CAAC,EAAE,aAAa,GAAG,IAAI,GAAG,IAAI,CAAC;IAEjD,wBAAwB;IACxB,MAAM,CAAC,aAAa,CAAC,EAAE,aAAa,GAAG,IAAI,GAAG,IAAI,CAAA;CACnD;AAED;;;GAGG;AACH,oCAAoC,KAAK,EAAE,gBAAgB,GAAG,gBAAgB,CAgB7E;AClCD,YAAY,EAAC,gBAAgB,EAAC,MAAM,mBAAmB,CAAC","sources":["packages/@react-stately/menu/src/packages/@react-stately/menu/src/useMenuTriggerState.ts","packages/@react-stately/menu/src/packages/@react-stately/menu/src/index.ts","packages/@react-stately/menu/src/index.ts"],"sourcesContent":[null,null,"/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {useMenuTriggerState} from './useMenuTriggerState';\n\nexport type {MenuTriggerProps} from '@react-types/menu';\nexport type {MenuTriggerState} from './useMenuTriggerState';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-stately/menu",
|
|
3
|
-
"version": "3.3.2-nightly.
|
|
3
|
+
"version": "3.3.2-nightly.3375+7cebb4eea",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@babel/runtime": "^7.6.2",
|
|
21
|
-
"@react-stately/overlays": "3.3.2-nightly.
|
|
22
|
-
"@react-stately/utils": "3.0.0-nightly.
|
|
23
|
-
"@react-types/menu": "3.6.2-nightly.
|
|
24
|
-
"@react-types/shared": "3.0.0-nightly.
|
|
21
|
+
"@react-stately/overlays": "3.3.2-nightly.3375+7cebb4eea",
|
|
22
|
+
"@react-stately/utils": "3.0.0-nightly.1675+7cebb4eea",
|
|
23
|
+
"@react-types/menu": "3.6.2-nightly.3375+7cebb4eea",
|
|
24
|
+
"@react-types/shared": "3.0.0-nightly.1675+7cebb4eea"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0"
|
|
@@ -29,5 +29,5 @@
|
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "7cebb4eea31f383f1eec06cc53a7909f8736f66a"
|
|
33
33
|
}
|
package/src/index.ts
CHANGED
|
@@ -9,5 +9,8 @@
|
|
|
9
9
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
|
|
12
|
+
|
|
13
13
|
export {useMenuTriggerState} from './useMenuTriggerState';
|
|
14
|
+
|
|
15
|
+
export type {MenuTriggerProps} from '@react-types/menu';
|
|
16
|
+
export type {MenuTriggerState} from './useMenuTriggerState';
|