@react-spectrum/actionbar 3.6.17 → 3.7.0

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.
Files changed (205) hide show
  1. package/dist/import.mjs +3 -5
  2. package/dist/main.js +5 -7
  3. package/dist/main.js.map +1 -1
  4. package/dist/module.js +3 -5
  5. package/dist/module.js.map +1 -1
  6. package/dist/types/src/index.d.ts +3 -0
  7. package/package.json +14 -39
  8. package/src/index.ts +4 -5
  9. package/dist/ActionBar.main.js +0 -130
  10. package/dist/ActionBar.main.js.map +0 -1
  11. package/dist/ActionBar.mjs +0 -125
  12. package/dist/ActionBar.module.js +0 -125
  13. package/dist/ActionBar.module.js.map +0 -1
  14. package/dist/ActionBarContainer.main.js +0 -48
  15. package/dist/ActionBarContainer.main.js.map +0 -1
  16. package/dist/ActionBarContainer.mjs +0 -43
  17. package/dist/ActionBarContainer.module.js +0 -43
  18. package/dist/ActionBarContainer.module.js.map +0 -1
  19. package/dist/actionbar.bdfe7eee.css +0 -83
  20. package/dist/actionbar.bdfe7eee.css.map +0 -1
  21. package/dist/actionbar_css.main.js +0 -38
  22. package/dist/actionbar_css.main.js.map +0 -1
  23. package/dist/actionbar_css.mjs +0 -40
  24. package/dist/actionbar_css.module.js +0 -40
  25. package/dist/actionbar_css.module.js.map +0 -1
  26. package/dist/ar-AE.main.js +0 -13
  27. package/dist/ar-AE.main.js.map +0 -1
  28. package/dist/ar-AE.mjs +0 -15
  29. package/dist/ar-AE.module.js +0 -15
  30. package/dist/ar-AE.module.js.map +0 -1
  31. package/dist/bg-BG.main.js +0 -14
  32. package/dist/bg-BG.main.js.map +0 -1
  33. package/dist/bg-BG.mjs +0 -16
  34. package/dist/bg-BG.module.js +0 -16
  35. package/dist/bg-BG.module.js.map +0 -1
  36. package/dist/cs-CZ.main.js +0 -10
  37. package/dist/cs-CZ.main.js.map +0 -1
  38. package/dist/cs-CZ.mjs +0 -12
  39. package/dist/cs-CZ.module.js +0 -12
  40. package/dist/cs-CZ.module.js.map +0 -1
  41. package/dist/da-DK.main.js +0 -13
  42. package/dist/da-DK.main.js.map +0 -1
  43. package/dist/da-DK.mjs +0 -15
  44. package/dist/da-DK.module.js +0 -15
  45. package/dist/da-DK.module.js.map +0 -1
  46. package/dist/de-DE.main.js +0 -14
  47. package/dist/de-DE.main.js.map +0 -1
  48. package/dist/de-DE.mjs +0 -16
  49. package/dist/de-DE.module.js +0 -16
  50. package/dist/de-DE.module.js.map +0 -1
  51. package/dist/el-GR.main.js +0 -14
  52. package/dist/el-GR.main.js.map +0 -1
  53. package/dist/el-GR.mjs +0 -16
  54. package/dist/el-GR.module.js +0 -16
  55. package/dist/el-GR.module.js.map +0 -1
  56. package/dist/en-US.main.js +0 -13
  57. package/dist/en-US.main.js.map +0 -1
  58. package/dist/en-US.mjs +0 -15
  59. package/dist/en-US.module.js +0 -15
  60. package/dist/en-US.module.js.map +0 -1
  61. package/dist/es-ES.main.js +0 -14
  62. package/dist/es-ES.main.js.map +0 -1
  63. package/dist/es-ES.mjs +0 -16
  64. package/dist/es-ES.module.js +0 -16
  65. package/dist/es-ES.module.js.map +0 -1
  66. package/dist/et-EE.main.js +0 -13
  67. package/dist/et-EE.main.js.map +0 -1
  68. package/dist/et-EE.mjs +0 -15
  69. package/dist/et-EE.module.js +0 -15
  70. package/dist/et-EE.module.js.map +0 -1
  71. package/dist/fi-FI.main.js +0 -13
  72. package/dist/fi-FI.main.js.map +0 -1
  73. package/dist/fi-FI.mjs +0 -15
  74. package/dist/fi-FI.module.js +0 -15
  75. package/dist/fi-FI.module.js.map +0 -1
  76. package/dist/fr-FR.main.js +0 -14
  77. package/dist/fr-FR.main.js.map +0 -1
  78. package/dist/fr-FR.mjs +0 -16
  79. package/dist/fr-FR.module.js +0 -16
  80. package/dist/fr-FR.module.js.map +0 -1
  81. package/dist/he-IL.main.js +0 -14
  82. package/dist/he-IL.main.js.map +0 -1
  83. package/dist/he-IL.mjs +0 -16
  84. package/dist/he-IL.module.js +0 -16
  85. package/dist/he-IL.module.js.map +0 -1
  86. package/dist/hr-HR.main.js +0 -10
  87. package/dist/hr-HR.main.js.map +0 -1
  88. package/dist/hr-HR.mjs +0 -12
  89. package/dist/hr-HR.module.js +0 -12
  90. package/dist/hr-HR.module.js.map +0 -1
  91. package/dist/hu-HU.main.js +0 -13
  92. package/dist/hu-HU.main.js.map +0 -1
  93. package/dist/hu-HU.mjs +0 -15
  94. package/dist/hu-HU.module.js +0 -15
  95. package/dist/hu-HU.module.js.map +0 -1
  96. package/dist/intlStrings.main.js +0 -108
  97. package/dist/intlStrings.main.js.map +0 -1
  98. package/dist/intlStrings.mjs +0 -110
  99. package/dist/intlStrings.module.js +0 -110
  100. package/dist/intlStrings.module.js.map +0 -1
  101. package/dist/it-IT.main.js +0 -14
  102. package/dist/it-IT.main.js.map +0 -1
  103. package/dist/it-IT.mjs +0 -16
  104. package/dist/it-IT.module.js +0 -16
  105. package/dist/it-IT.module.js.map +0 -1
  106. package/dist/ja-JP.main.js +0 -13
  107. package/dist/ja-JP.main.js.map +0 -1
  108. package/dist/ja-JP.mjs +0 -15
  109. package/dist/ja-JP.module.js +0 -15
  110. package/dist/ja-JP.module.js.map +0 -1
  111. package/dist/ko-KR.main.js +0 -13
  112. package/dist/ko-KR.main.js.map +0 -1
  113. package/dist/ko-KR.mjs +0 -15
  114. package/dist/ko-KR.module.js +0 -15
  115. package/dist/ko-KR.module.js.map +0 -1
  116. package/dist/lt-LT.main.js +0 -10
  117. package/dist/lt-LT.main.js.map +0 -1
  118. package/dist/lt-LT.mjs +0 -12
  119. package/dist/lt-LT.module.js +0 -12
  120. package/dist/lt-LT.module.js.map +0 -1
  121. package/dist/lv-LV.main.js +0 -13
  122. package/dist/lv-LV.main.js.map +0 -1
  123. package/dist/lv-LV.mjs +0 -15
  124. package/dist/lv-LV.module.js +0 -15
  125. package/dist/lv-LV.module.js.map +0 -1
  126. package/dist/nb-NO.main.js +0 -10
  127. package/dist/nb-NO.main.js.map +0 -1
  128. package/dist/nb-NO.mjs +0 -12
  129. package/dist/nb-NO.module.js +0 -12
  130. package/dist/nb-NO.module.js.map +0 -1
  131. package/dist/nl-NL.main.js +0 -13
  132. package/dist/nl-NL.main.js.map +0 -1
  133. package/dist/nl-NL.mjs +0 -15
  134. package/dist/nl-NL.module.js +0 -15
  135. package/dist/nl-NL.module.js.map +0 -1
  136. package/dist/pl-PL.main.js +0 -10
  137. package/dist/pl-PL.main.js.map +0 -1
  138. package/dist/pl-PL.mjs +0 -12
  139. package/dist/pl-PL.module.js +0 -12
  140. package/dist/pl-PL.module.js.map +0 -1
  141. package/dist/pt-BR.main.js +0 -14
  142. package/dist/pt-BR.main.js.map +0 -1
  143. package/dist/pt-BR.mjs +0 -16
  144. package/dist/pt-BR.module.js +0 -16
  145. package/dist/pt-BR.module.js.map +0 -1
  146. package/dist/pt-PT.main.js +0 -14
  147. package/dist/pt-PT.main.js.map +0 -1
  148. package/dist/pt-PT.mjs +0 -16
  149. package/dist/pt-PT.module.js +0 -16
  150. package/dist/pt-PT.module.js.map +0 -1
  151. package/dist/ro-RO.main.js +0 -14
  152. package/dist/ro-RO.main.js.map +0 -1
  153. package/dist/ro-RO.mjs +0 -16
  154. package/dist/ro-RO.module.js +0 -16
  155. package/dist/ro-RO.module.js.map +0 -1
  156. package/dist/ru-RU.main.js +0 -10
  157. package/dist/ru-RU.main.js.map +0 -1
  158. package/dist/ru-RU.mjs +0 -12
  159. package/dist/ru-RU.module.js +0 -12
  160. package/dist/ru-RU.module.js.map +0 -1
  161. package/dist/sk-SK.main.js +0 -10
  162. package/dist/sk-SK.main.js.map +0 -1
  163. package/dist/sk-SK.mjs +0 -12
  164. package/dist/sk-SK.module.js +0 -12
  165. package/dist/sk-SK.module.js.map +0 -1
  166. package/dist/sl-SI.main.js +0 -10
  167. package/dist/sl-SI.main.js.map +0 -1
  168. package/dist/sl-SI.mjs +0 -12
  169. package/dist/sl-SI.module.js +0 -12
  170. package/dist/sl-SI.module.js.map +0 -1
  171. package/dist/sr-SP.main.js +0 -10
  172. package/dist/sr-SP.main.js.map +0 -1
  173. package/dist/sr-SP.mjs +0 -12
  174. package/dist/sr-SP.module.js +0 -12
  175. package/dist/sr-SP.module.js.map +0 -1
  176. package/dist/sv-SE.main.js +0 -14
  177. package/dist/sv-SE.main.js.map +0 -1
  178. package/dist/sv-SE.mjs +0 -16
  179. package/dist/sv-SE.module.js +0 -16
  180. package/dist/sv-SE.module.js.map +0 -1
  181. package/dist/tr-TR.main.js +0 -13
  182. package/dist/tr-TR.main.js.map +0 -1
  183. package/dist/tr-TR.mjs +0 -15
  184. package/dist/tr-TR.module.js +0 -15
  185. package/dist/tr-TR.module.js.map +0 -1
  186. package/dist/types.d.ts +0 -19
  187. package/dist/types.d.ts.map +0 -1
  188. package/dist/uk-UA.main.js +0 -10
  189. package/dist/uk-UA.main.js.map +0 -1
  190. package/dist/uk-UA.mjs +0 -12
  191. package/dist/uk-UA.module.js +0 -12
  192. package/dist/uk-UA.module.js.map +0 -1
  193. package/dist/zh-CN.main.js +0 -13
  194. package/dist/zh-CN.main.js.map +0 -1
  195. package/dist/zh-CN.mjs +0 -15
  196. package/dist/zh-CN.module.js +0 -15
  197. package/dist/zh-CN.module.js.map +0 -1
  198. package/dist/zh-TW.main.js +0 -13
  199. package/dist/zh-TW.main.js.map +0 -1
  200. package/dist/zh-TW.mjs +0 -15
  201. package/dist/zh-TW.module.js +0 -15
  202. package/dist/zh-TW.module.js.map +0 -1
  203. package/src/ActionBar.tsx +0 -143
  204. package/src/ActionBarContainer.tsx +0 -42
  205. package/src/actionbar.css +0 -91
package/dist/import.mjs CHANGED
@@ -1,6 +1,5 @@
1
- import {ActionBar as $a4e665fbd087d71e$export$e213cebad6250b4a} from "./ActionBar.mjs";
2
- import {ActionBarContainer as $2f6c8b20aa071c6d$export$ac2eb07f267e434c} from "./ActionBarContainer.mjs";
3
- import {Item as $da70baa779e17e7a$re_export$Item} from "@react-stately/collections";
1
+ import {ActionBar as $21155b0976970673$re_export$ActionBar, ActionBarContainer as $21155b0976970673$re_export$ActionBarContainer} from "@adobe/react-spectrum/ActionBar";
2
+ import {Item as $21155b0976970673$re_export$Item} from "react-stately/Item";
4
3
 
5
4
  /*
6
5
  * Copyright 2020 Adobe. All rights reserved.
@@ -17,6 +16,5 @@ import {Item as $da70baa779e17e7a$re_export$Item} from "@react-stately/collectio
17
16
 
18
17
 
19
18
 
20
-
21
- export {$a4e665fbd087d71e$export$e213cebad6250b4a as ActionBar, $2f6c8b20aa071c6d$export$ac2eb07f267e434c as ActionBarContainer, $da70baa779e17e7a$re_export$Item as Item};
19
+ export {$21155b0976970673$re_export$ActionBar as ActionBar, $21155b0976970673$re_export$ActionBarContainer as ActionBarContainer, $21155b0976970673$re_export$Item as Item};
22
20
  //# sourceMappingURL=module.js.map
package/dist/main.js CHANGED
@@ -1,15 +1,14 @@
1
- var $7b5467653feb1153$exports = require("./ActionBar.main.js");
2
- var $961b22d2b8bd2da1$exports = require("./ActionBarContainer.main.js");
3
- var $grxqE$reactstatelycollections = require("@react-stately/collections");
1
+ var $flYLD$adobereactspectrumActionBar = require("@adobe/react-spectrum/ActionBar");
2
+ var $flYLD$reactstatelyItem = require("react-stately/Item");
4
3
 
5
4
 
6
5
  function $parcel$export(e, n, v, s) {
7
6
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
8
7
  }
9
8
 
10
- $parcel$export(module.exports, "ActionBar", () => $7b5467653feb1153$exports.ActionBar);
11
- $parcel$export(module.exports, "ActionBarContainer", () => $961b22d2b8bd2da1$exports.ActionBarContainer);
12
- $parcel$export(module.exports, "Item", () => $grxqE$reactstatelycollections.Item);
9
+ $parcel$export(module.exports, "ActionBar", function () { return $flYLD$adobereactspectrumActionBar.ActionBar; });
10
+ $parcel$export(module.exports, "ActionBarContainer", function () { return $flYLD$adobereactspectrumActionBar.ActionBarContainer; });
11
+ $parcel$export(module.exports, "Item", function () { return $flYLD$reactstatelyItem.Item; });
13
12
  /*
14
13
  * Copyright 2020 Adobe. All rights reserved.
15
14
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
@@ -25,5 +24,4 @@ $parcel$export(module.exports, "Item", () => $grxqE$reactstatelycollections.Item
25
24
 
26
25
 
27
26
 
28
-
29
27
  //# sourceMappingURL=main.js.map
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GACD,0CAA0C","sources":["packages/@react-spectrum/actionbar/src/index.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/// <reference types=\"css-module-types\" />\nexport {ActionBar} from './ActionBar';\nexport {ActionBarContainer} from './ActionBarContainer';\nexport {Item} from '@react-stately/collections';\nexport type {SpectrumActionBarContainerProps} from '@react-types/actionbar';\nexport type {SpectrumActionBarProps} from '@react-types/actionbar';\n"],"names":[],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GACD,0CAA0C","sources":["packages/@react-spectrum/actionbar/src/index.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/// <reference types=\"css-module-types\" />\nexport {ActionBar, ActionBarContainer} from '@adobe/react-spectrum/ActionBar';\n\nexport type {SpectrumActionBarContainerProps, SpectrumActionBarProps} from '@adobe/react-spectrum/ActionBar';\nexport {Item} from 'react-stately/Item';\n"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -1,6 +1,5 @@
1
- import {ActionBar as $a4e665fbd087d71e$export$e213cebad6250b4a} from "./ActionBar.module.js";
2
- import {ActionBarContainer as $2f6c8b20aa071c6d$export$ac2eb07f267e434c} from "./ActionBarContainer.module.js";
3
- import {Item as $da70baa779e17e7a$re_export$Item} from "@react-stately/collections";
1
+ import {ActionBar as $21155b0976970673$re_export$ActionBar, ActionBarContainer as $21155b0976970673$re_export$ActionBarContainer} from "@adobe/react-spectrum/ActionBar";
2
+ import {Item as $21155b0976970673$re_export$Item} from "react-stately/Item";
4
3
 
5
4
  /*
6
5
  * Copyright 2020 Adobe. All rights reserved.
@@ -17,6 +16,5 @@ import {Item as $da70baa779e17e7a$re_export$Item} from "@react-stately/collectio
17
16
 
18
17
 
19
18
 
20
-
21
- export {$a4e665fbd087d71e$export$e213cebad6250b4a as ActionBar, $2f6c8b20aa071c6d$export$ac2eb07f267e434c as ActionBarContainer, $da70baa779e17e7a$re_export$Item as Item};
19
+ export {$21155b0976970673$re_export$ActionBar as ActionBar, $21155b0976970673$re_export$ActionBarContainer as ActionBarContainer, $21155b0976970673$re_export$Item as Item};
22
20
  //# sourceMappingURL=module.js.map
@@ -1 +1 @@
1
- {"mappings":";;;;AAAA;;;;;;;;;;CAUC,GACD,0CAA0C","sources":["packages/@react-spectrum/actionbar/src/index.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/// <reference types=\"css-module-types\" />\nexport {ActionBar} from './ActionBar';\nexport {ActionBarContainer} from './ActionBarContainer';\nexport {Item} from '@react-stately/collections';\nexport type {SpectrumActionBarContainerProps} from '@react-types/actionbar';\nexport type {SpectrumActionBarProps} from '@react-types/actionbar';\n"],"names":[],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;;AAAA;;;;;;;;;;CAUC,GACD,0CAA0C","sources":["packages/@react-spectrum/actionbar/src/index.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/// <reference types=\"css-module-types\" />\nexport {ActionBar, ActionBarContainer} from '@adobe/react-spectrum/ActionBar';\n\nexport type {SpectrumActionBarContainerProps, SpectrumActionBarProps} from '@adobe/react-spectrum/ActionBar';\nexport {Item} from 'react-stately/Item';\n"],"names":[],"version":3,"file":"module.js.map"}
@@ -0,0 +1,3 @@
1
+ export { ActionBar, ActionBarContainer } from '@adobe/react-spectrum/ActionBar';
2
+ export type { SpectrumActionBarContainerProps, SpectrumActionBarProps } from '@adobe/react-spectrum/ActionBar';
3
+ export { Item } from 'react-stately/Item';
package/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "@react-spectrum/actionbar",
3
- "version": "3.6.17",
3
+ "version": "3.7.0",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
7
7
  "module": "dist/module.js",
8
8
  "exports": {
9
- "source": "./src/index.ts",
10
- "types": [
11
- "./dist/types.d.ts",
12
- "./src/index.ts"
13
- ],
14
- "import": "./dist/import.mjs",
15
- "require": "./dist/main.js"
9
+ ".": {
10
+ "source": "./src/index.ts",
11
+ "types": "./dist/types/src/index.d.ts",
12
+ "import": "./dist/import.mjs",
13
+ "require": "./dist/main.js"
14
+ },
15
+ "./package.json": "./package.json"
16
16
  },
17
- "types": "dist/types.d.ts",
17
+ "types": "dist/types/src/index.d.ts",
18
18
  "source": "src/index.ts",
19
19
  "files": [
20
20
  "dist",
@@ -24,48 +24,23 @@
24
24
  "*.css"
25
25
  ],
26
26
  "targets": {
27
- "main": {
28
- "includeNodeModules": [
29
- "@adobe/spectrum-css-temp"
30
- ]
31
- },
32
- "module": {
33
- "includeNodeModules": [
34
- "@adobe/spectrum-css-temp"
35
- ]
36
- }
27
+ "types": false
37
28
  },
38
29
  "repository": {
39
30
  "type": "git",
40
31
  "url": "https://github.com/adobe/react-spectrum"
41
32
  },
42
33
  "dependencies": {
43
- "@react-aria/focus": "^3.21.5",
44
- "@react-aria/i18n": "^3.12.16",
45
- "@react-aria/interactions": "^3.27.1",
46
- "@react-aria/live-announcer": "^3.4.4",
47
- "@react-aria/utils": "^3.33.1",
48
- "@react-spectrum/actiongroup": "^3.11.7",
49
- "@react-spectrum/button": "^3.17.7",
50
- "@react-spectrum/overlays": "^5.9.3",
51
- "@react-spectrum/text": "^3.5.25",
52
- "@react-spectrum/utils": "^3.12.12",
53
- "@react-stately/collections": "^3.12.10",
54
- "@react-types/actionbar": "^3.1.21",
55
- "@react-types/shared": "^3.33.1",
56
- "@spectrum-icons/ui": "^3.6.23",
57
- "@swc/helpers": "^0.5.0"
58
- },
59
- "devDependencies": {
60
- "@adobe/spectrum-css-temp": "3.0.0-alpha.1"
34
+ "@adobe/react-spectrum": "3.47.0",
35
+ "@swc/helpers": "^0.5.0",
36
+ "react-stately": "3.46.0"
61
37
  },
62
38
  "peerDependencies": {
63
- "@react-spectrum/provider": "^3.0.0",
64
39
  "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1",
65
40
  "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
66
41
  },
67
42
  "publishConfig": {
68
43
  "access": "public"
69
44
  },
70
- "gitHead": "8df187370053aa35f553cb388ad670f65e1ab371"
45
+ "gitHead": "a6999bdf494a2e9c0381a5881908328bdd22ddae"
71
46
  }
package/src/index.ts CHANGED
@@ -10,8 +10,7 @@
10
10
  * governing permissions and limitations under the License.
11
11
  */
12
12
  /// <reference types="css-module-types" />
13
- export {ActionBar} from './ActionBar';
14
- export {ActionBarContainer} from './ActionBarContainer';
15
- export {Item} from '@react-stately/collections';
16
- export type {SpectrumActionBarContainerProps} from '@react-types/actionbar';
17
- export type {SpectrumActionBarProps} from '@react-types/actionbar';
13
+ export {ActionBar, ActionBarContainer} from '@adobe/react-spectrum/ActionBar';
14
+
15
+ export type {SpectrumActionBarContainerProps, SpectrumActionBarProps} from '@adobe/react-spectrum/ActionBar';
16
+ export {Item} from 'react-stately/Item';
@@ -1,130 +0,0 @@
1
- var $b1ba52ca91e22687$exports = require("./intlStrings.main.js");
2
- require("./actionbar.bdfe7eee.css");
3
- var $ff24c7bbe0c168db$exports = require("./actionbar_css.main.js");
4
- var $643e7$reactspectrumbutton = require("@react-spectrum/button");
5
- var $643e7$reactspectrumactiongroup = require("@react-spectrum/actiongroup");
6
- var $643e7$reactarialiveannouncer = require("@react-aria/live-announcer");
7
- var $643e7$reactspectrumutils = require("@react-spectrum/utils");
8
- var $643e7$spectrumiconsuiCrossLarge = require("@spectrum-icons/ui/CrossLarge");
9
- var $643e7$reactariautils = require("@react-aria/utils");
10
- var $643e7$reactariafocus = require("@react-aria/focus");
11
- var $643e7$reactspectrumoverlays = require("@react-spectrum/overlays");
12
- var $643e7$react = require("react");
13
- var $643e7$reactspectrumtext = require("@react-spectrum/text");
14
- var $643e7$reactariainteractions = require("@react-aria/interactions");
15
- var $643e7$reactariai18n = require("@react-aria/i18n");
16
- var $643e7$reactspectrumprovider = require("@react-spectrum/provider");
17
-
18
-
19
- function $parcel$interopDefault(a) {
20
- return a && a.__esModule ? a.default : a;
21
- }
22
-
23
- function $parcel$export(e, n, v, s) {
24
- Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
25
- }
26
-
27
- $parcel$export(module.exports, "ActionBar", () => $7b5467653feb1153$export$e213cebad6250b4a);
28
- /*
29
- * Copyright 2020 Adobe. All rights reserved.
30
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
31
- * you may not use this file except in compliance with the License. You may obtain a copy
32
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
33
- *
34
- * Unless required by applicable law or agreed to in writing, software distributed under
35
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
36
- * OF ANY KIND, either express or implied. See the License for the specific language
37
- * governing permissions and limitations under the License.
38
- */
39
-
40
-
41
-
42
-
43
-
44
-
45
-
46
-
47
-
48
-
49
-
50
-
51
-
52
-
53
- const $7b5467653feb1153$export$e213cebad6250b4a = /*#__PURE__*/ (0, ($parcel$interopDefault($643e7$react))).forwardRef(function ActionBar(props, ref) {
54
- let isOpen = props.selectedItemCount !== 0;
55
- let domRef = (0, $643e7$reactspectrumutils.useDOMRef)(ref);
56
- return /*#__PURE__*/ (0, ($parcel$interopDefault($643e7$react))).createElement((0, $643e7$reactspectrumoverlays.OpenTransition), {
57
- nodeRef: domRef,
58
- in: isOpen,
59
- mountOnEnter: true,
60
- unmountOnExit: true
61
- }, /*#__PURE__*/ (0, ($parcel$interopDefault($643e7$react))).createElement($7b5467653feb1153$var$ActionBarInnerWithRef, {
62
- ...props,
63
- ref: domRef
64
- }));
65
- });
66
- function $7b5467653feb1153$var$ActionBarInner(props, ref) {
67
- props = (0, $643e7$reactspectrumprovider.useProviderProps)(props);
68
- let { children: children, isEmphasized: isEmphasized, onAction: onAction, onClearSelection: onClearSelection, selectedItemCount: selectedItemCount, isOpen: isOpen, buttonLabelBehavior: buttonLabelBehavior = 'collapse', items: items, disabledKeys: disabledKeys } = props;
69
- let { styleProps: styleProps } = (0, $643e7$reactspectrumutils.useStyleProps)(props);
70
- let stringFormatter = (0, $643e7$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($b1ba52ca91e22687$exports))), '@react-spectrum/actionbar');
71
- // Store the last count greater than zero in a ref so that we can retain it while rendering the fade-out animation.
72
- let [lastCount, setLastCount] = (0, $643e7$react.useState)(selectedItemCount);
73
- if ((selectedItemCount === 'all' || selectedItemCount > 0) && selectedItemCount !== lastCount) setLastCount(selectedItemCount);
74
- let { keyboardProps: keyboardProps } = (0, $643e7$reactariainteractions.useKeyboard)({
75
- onKeyDown (e) {
76
- if (e.key === 'Escape') {
77
- e.preventDefault();
78
- onClearSelection();
79
- }
80
- }
81
- });
82
- // Announce "actions available" on mount.
83
- let isInitial = (0, $643e7$react.useRef)(true);
84
- (0, $643e7$react.useEffect)(()=>{
85
- if (isInitial.current) {
86
- isInitial.current = false;
87
- (0, $643e7$reactarialiveannouncer.announce)(stringFormatter.format('actionsAvailable'));
88
- }
89
- }, [
90
- stringFormatter
91
- ]);
92
- return /*#__PURE__*/ (0, ($parcel$interopDefault($643e7$react))).createElement((0, $643e7$reactariafocus.FocusScope), {
93
- restoreFocus: true
94
- }, /*#__PURE__*/ (0, ($parcel$interopDefault($643e7$react))).createElement("div", {
95
- ...(0, $643e7$reactariautils.filterDOMProps)(props),
96
- ...styleProps,
97
- ...keyboardProps,
98
- ref: ref,
99
- className: (0, $643e7$reactspectrumutils.classNames)((0, ($parcel$interopDefault($ff24c7bbe0c168db$exports))), 'react-spectrum-ActionBar', {
100
- 'react-spectrum-ActionBar--emphasized': isEmphasized,
101
- 'is-open': isOpen
102
- }, styleProps.className)
103
- }, /*#__PURE__*/ (0, ($parcel$interopDefault($643e7$react))).createElement("div", {
104
- className: (0, $643e7$reactspectrumutils.classNames)((0, ($parcel$interopDefault($ff24c7bbe0c168db$exports))), 'react-spectrum-ActionBar-bar')
105
- }, /*#__PURE__*/ (0, ($parcel$interopDefault($643e7$react))).createElement((0, $643e7$reactspectrumactiongroup.ActionGroup), {
106
- items: items,
107
- "aria-label": stringFormatter.format('actions'),
108
- isQuiet: true,
109
- staticColor: isEmphasized ? 'white' : undefined,
110
- overflowMode: "collapse",
111
- buttonLabelBehavior: buttonLabelBehavior,
112
- onAction: onAction,
113
- disabledKeys: disabledKeys,
114
- UNSAFE_className: (0, $643e7$reactspectrumutils.classNames)((0, ($parcel$interopDefault($ff24c7bbe0c168db$exports))), 'react-spectrum-ActionBar-actionGroup')
115
- }, children), /*#__PURE__*/ (0, ($parcel$interopDefault($643e7$react))).createElement((0, $643e7$reactspectrumbutton.ActionButton), {
116
- gridArea: (0, ($parcel$interopDefault($ff24c7bbe0c168db$exports))).clear,
117
- "aria-label": stringFormatter.format('clearSelection'),
118
- onPress: ()=>onClearSelection(),
119
- isQuiet: true,
120
- staticColor: isEmphasized ? 'white' : undefined
121
- }, /*#__PURE__*/ (0, ($parcel$interopDefault($643e7$react))).createElement((0, ($parcel$interopDefault($643e7$spectrumiconsuiCrossLarge))), null)), /*#__PURE__*/ (0, ($parcel$interopDefault($643e7$react))).createElement((0, $643e7$reactspectrumtext.Text), {
122
- UNSAFE_className: (0, $643e7$reactspectrumutils.classNames)((0, ($parcel$interopDefault($ff24c7bbe0c168db$exports))), 'react-spectrum-ActionBar-selectedCount')
123
- }, lastCount === 'all' ? stringFormatter.format('selectedAll') : stringFormatter.format('selected', {
124
- count: lastCount
125
- })))));
126
- }
127
- const $7b5467653feb1153$var$ActionBarInnerWithRef = /*#__PURE__*/ (0, ($parcel$interopDefault($643e7$react))).forwardRef($7b5467653feb1153$var$ActionBarInner);
128
-
129
-
130
- //# sourceMappingURL=ActionBar.main.js.map
@@ -1 +0,0 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;AAwBM,MAAM,0DAAY,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC,SAAS,UAA4B,KAAgC,EAAE,GAA2B;IAC1I,IAAI,SAAS,MAAM,iBAAiB,KAAK;IACzC,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IAEvB,qBACE,0DAAC,CAAA,GAAA,2CAAa;QACZ,SAAS;QACT,IAAI;QACJ,cAAA;QACA,eAAA;qBACA,0DAAC;QAAuB,GAAG,KAAK;QAAE,KAAK;;AAG7C;AAMA,SAAS,qCAAkB,KAA6B,EAAE,GAAwB;IAChF,QAAQ,CAAA,GAAA,6CAAe,EAAE;IAEzB,IAAI,YACF,QAAQ,gBACR,YAAY,YACZ,QAAQ,oBACR,gBAAgB,qBAChB,iBAAiB,UACjB,MAAM,uBACN,sBAAsB,mBACtB,KAAK,gBACL,YAAY,EACb,GAAG;IAEJ,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IACjC,IAAI,kBAAkB,CAAA,GAAA,gDAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAEhE,mHAAmH;IACnH,IAAI,CAAC,WAAW,aAAa,GAAG,CAAA,GAAA,qBAAO,EAAE;IACzC,IAAI,AAAC,CAAA,sBAAsB,SAAS,oBAAoB,CAAA,KAAM,sBAAsB,WAClF,aAAa;IAGf,IAAI,iBAAC,aAAa,EAAC,GAAG,CAAA,GAAA,wCAAU,EAAE;QAChC,WAAU,CAAC;YACT,IAAI,EAAE,GAAG,KAAK,UAAU;gBACtB,EAAE,cAAc;gBAChB;YACF;QACF;IACF;IAEA,yCAAyC;IACzC,IAAI,YAAY,CAAA,GAAA,mBAAK,EAAE;IACvB,CAAA,GAAA,sBAAQ,EAAE;QACR,IAAI,UAAU,OAAO,EAAE;YACrB,UAAU,OAAO,GAAG;YACpB,CAAA,GAAA,sCAAO,EAAE,gBAAgB,MAAM,CAAC;QAClC;IACF,GAAG;QAAC;KAAgB;IAEpB,qBACE,0DAAC,CAAA,GAAA,gCAAS;QAAE,cAAA;qBACV,0DAAC;QACE,GAAG,CAAA,GAAA,oCAAa,EAAE,MAAM;QACxB,GAAG,UAAU;QACb,GAAG,aAAa;QACjB,KAAK;QACL,WAAW,CAAA,GAAA,oCAAS,EAClB,CAAA,GAAA,mDAAK,GACL,4BAA4B;YAC1B,wCAAwC;YACxC,WAAW;QACb,GACA,WAAW,SAAS;qBAEtB,0DAAC;QAAI,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;qBACjC,0DAAC,CAAA,GAAA,2CAAU;QACT,OAAO;QACP,cAAY,gBAAgB,MAAM,CAAC;QACnC,SAAA;QACA,aAAa,eAAe,UAAU;QACtC,cAAa;QACb,qBAAqB;QACrB,UAAU;QACV,cAAc;QACd,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;OACpC,yBAEH,0DAAC,CAAA,GAAA,uCAAW;QACV,UAAU,CAAA,GAAA,mDAAK,EAAE,KAAK;QACtB,cAAY,gBAAgB,MAAM,CAAC;QACnC,SAAS,IAAM;QACf,SAAA;QACA,aAAa,eAAe,UAAU;qBACtC,0DAAC,CAAA,GAAA,0DAAS,yBAEZ,0DAAC,CAAA,GAAA,6BAAG;QAAE,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;OACxC,cAAc,QACX,gBAAgB,MAAM,CAAC,iBACvB,gBAAgB,MAAM,CAAC,YAAY;QAAC,OAAO;IAAS;AAMpE;AAEA,MAAM,4DAAwB,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/actionbar/src/ActionBar.tsx"],"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\nimport {ActionButton} from '@react-spectrum/button';\nimport {ActionGroup} from '@react-spectrum/actiongroup';\nimport {announce} from '@react-aria/live-announcer';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport CrossLarge from '@spectrum-icons/ui/CrossLarge';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {FocusScope} from '@react-aria/focus';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {OpenTransition} from '@react-spectrum/overlays';\nimport React, {ReactElement, Ref, useEffect, useRef, useState} from 'react';\nimport {SpectrumActionBarProps} from '@react-types/actionbar';\nimport styles from './actionbar.css';\nimport {Text} from '@react-spectrum/text';\nimport {useKeyboard} from '@react-aria/interactions';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\n\n/**\n * Action bars are used for single and bulk selection patterns when a user needs to perform actions on one or more items at the same time.\n */\nexport const ActionBar = React.forwardRef(function ActionBar<T extends object>(props: SpectrumActionBarProps<T>, ref: DOMRef<HTMLDivElement>) {\n let isOpen = props.selectedItemCount !== 0;\n let domRef = useDOMRef(ref);\n\n return (\n <OpenTransition\n nodeRef={domRef}\n in={isOpen}\n mountOnEnter\n unmountOnExit>\n <ActionBarInnerWithRef {...props} ref={domRef} />\n </OpenTransition>\n );\n}) as <T>(props: SpectrumActionBarProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\n\ninterface ActionBarInnerProps<T> extends SpectrumActionBarProps<T> {\n isOpen?: boolean\n}\n\nfunction ActionBarInner<T>(props: ActionBarInnerProps<T>, ref: Ref<HTMLDivElement>) {\n props = useProviderProps(props);\n\n let {\n children,\n isEmphasized,\n onAction,\n onClearSelection,\n selectedItemCount,\n isOpen,\n buttonLabelBehavior = 'collapse',\n items,\n disabledKeys\n } = props;\n\n let {styleProps} = useStyleProps(props);\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/actionbar');\n\n // Store the last count greater than zero in a ref so that we can retain it while rendering the fade-out animation.\n let [lastCount, setLastCount] = useState(selectedItemCount);\n if ((selectedItemCount === 'all' || selectedItemCount > 0) && selectedItemCount !== lastCount) {\n setLastCount(selectedItemCount);\n }\n\n let {keyboardProps} = useKeyboard({\n onKeyDown(e) {\n if (e.key === 'Escape') {\n e.preventDefault();\n onClearSelection();\n }\n }\n });\n\n // Announce \"actions available\" on mount.\n let isInitial = useRef(true);\n useEffect(() => {\n if (isInitial.current) {\n isInitial.current = false;\n announce(stringFormatter.format('actionsAvailable'));\n }\n }, [stringFormatter]);\n\n return (\n <FocusScope restoreFocus>\n <div\n {...filterDOMProps(props)}\n {...styleProps}\n {...keyboardProps}\n ref={ref}\n className={classNames(\n styles,\n 'react-spectrum-ActionBar', {\n 'react-spectrum-ActionBar--emphasized': isEmphasized,\n 'is-open': isOpen\n },\n styleProps.className\n )}>\n <div className={classNames(styles, 'react-spectrum-ActionBar-bar')}>\n <ActionGroup\n items={items}\n aria-label={stringFormatter.format('actions')}\n isQuiet\n staticColor={isEmphasized ? 'white' : undefined}\n overflowMode=\"collapse\"\n buttonLabelBehavior={buttonLabelBehavior}\n onAction={onAction}\n disabledKeys={disabledKeys}\n UNSAFE_className={classNames(styles, 'react-spectrum-ActionBar-actionGroup')}>\n {children}\n </ActionGroup>\n <ActionButton\n gridArea={styles.clear}\n aria-label={stringFormatter.format('clearSelection')}\n onPress={() => onClearSelection()}\n isQuiet\n staticColor={isEmphasized ? 'white' : undefined}>\n <CrossLarge />\n </ActionButton>\n <Text UNSAFE_className={classNames(styles, 'react-spectrum-ActionBar-selectedCount')}>\n {lastCount === 'all'\n ? stringFormatter.format('selectedAll')\n : stringFormatter.format('selected', {count: lastCount})}\n </Text>\n </div>\n </div>\n </FocusScope>\n );\n}\n\nconst ActionBarInnerWithRef = React.forwardRef(ActionBarInner) as <T>(props: ActionBarInnerProps<T> & {ref?: Ref<HTMLDivElement>}) => ReactElement;\n"],"names":[],"version":3,"file":"ActionBar.main.js.map"}
@@ -1,125 +0,0 @@
1
- import $c4Nes$intlStringsmodulejs from "./intlStrings.mjs";
2
- import "./actionbar.bdfe7eee.css";
3
- import $c4Nes$actionbar_cssmodulejs from "./actionbar_css.mjs";
4
- import {ActionButton as $c4Nes$ActionButton} from "@react-spectrum/button";
5
- import {ActionGroup as $c4Nes$ActionGroup} from "@react-spectrum/actiongroup";
6
- import {announce as $c4Nes$announce} from "@react-aria/live-announcer";
7
- import {useDOMRef as $c4Nes$useDOMRef, useStyleProps as $c4Nes$useStyleProps, classNames as $c4Nes$classNames} from "@react-spectrum/utils";
8
- import $c4Nes$spectrumiconsuiCrossLarge from "@spectrum-icons/ui/CrossLarge";
9
- import {filterDOMProps as $c4Nes$filterDOMProps} from "@react-aria/utils";
10
- import {FocusScope as $c4Nes$FocusScope} from "@react-aria/focus";
11
- import {OpenTransition as $c4Nes$OpenTransition} from "@react-spectrum/overlays";
12
- import $c4Nes$react, {useState as $c4Nes$useState, useRef as $c4Nes$useRef, useEffect as $c4Nes$useEffect} from "react";
13
- import {Text as $c4Nes$Text} from "@react-spectrum/text";
14
- import {useKeyboard as $c4Nes$useKeyboard} from "@react-aria/interactions";
15
- import {useLocalizedStringFormatter as $c4Nes$useLocalizedStringFormatter} from "@react-aria/i18n";
16
- import {useProviderProps as $c4Nes$useProviderProps} from "@react-spectrum/provider";
17
-
18
-
19
- function $parcel$interopDefault(a) {
20
- return a && a.__esModule ? a.default : a;
21
- }
22
- /*
23
- * Copyright 2020 Adobe. All rights reserved.
24
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
25
- * you may not use this file except in compliance with the License. You may obtain a copy
26
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
27
- *
28
- * Unless required by applicable law or agreed to in writing, software distributed under
29
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
30
- * OF ANY KIND, either express or implied. See the License for the specific language
31
- * governing permissions and limitations under the License.
32
- */
33
-
34
-
35
-
36
-
37
-
38
-
39
-
40
-
41
-
42
-
43
-
44
-
45
-
46
-
47
- const $a4e665fbd087d71e$export$e213cebad6250b4a = /*#__PURE__*/ (0, $c4Nes$react).forwardRef(function ActionBar(props, ref) {
48
- let isOpen = props.selectedItemCount !== 0;
49
- let domRef = (0, $c4Nes$useDOMRef)(ref);
50
- return /*#__PURE__*/ (0, $c4Nes$react).createElement((0, $c4Nes$OpenTransition), {
51
- nodeRef: domRef,
52
- in: isOpen,
53
- mountOnEnter: true,
54
- unmountOnExit: true
55
- }, /*#__PURE__*/ (0, $c4Nes$react).createElement($a4e665fbd087d71e$var$ActionBarInnerWithRef, {
56
- ...props,
57
- ref: domRef
58
- }));
59
- });
60
- function $a4e665fbd087d71e$var$ActionBarInner(props, ref) {
61
- props = (0, $c4Nes$useProviderProps)(props);
62
- let { children: children, isEmphasized: isEmphasized, onAction: onAction, onClearSelection: onClearSelection, selectedItemCount: selectedItemCount, isOpen: isOpen, buttonLabelBehavior: buttonLabelBehavior = 'collapse', items: items, disabledKeys: disabledKeys } = props;
63
- let { styleProps: styleProps } = (0, $c4Nes$useStyleProps)(props);
64
- let stringFormatter = (0, $c4Nes$useLocalizedStringFormatter)((0, ($parcel$interopDefault($c4Nes$intlStringsmodulejs))), '@react-spectrum/actionbar');
65
- // Store the last count greater than zero in a ref so that we can retain it while rendering the fade-out animation.
66
- let [lastCount, setLastCount] = (0, $c4Nes$useState)(selectedItemCount);
67
- if ((selectedItemCount === 'all' || selectedItemCount > 0) && selectedItemCount !== lastCount) setLastCount(selectedItemCount);
68
- let { keyboardProps: keyboardProps } = (0, $c4Nes$useKeyboard)({
69
- onKeyDown (e) {
70
- if (e.key === 'Escape') {
71
- e.preventDefault();
72
- onClearSelection();
73
- }
74
- }
75
- });
76
- // Announce "actions available" on mount.
77
- let isInitial = (0, $c4Nes$useRef)(true);
78
- (0, $c4Nes$useEffect)(()=>{
79
- if (isInitial.current) {
80
- isInitial.current = false;
81
- (0, $c4Nes$announce)(stringFormatter.format('actionsAvailable'));
82
- }
83
- }, [
84
- stringFormatter
85
- ]);
86
- return /*#__PURE__*/ (0, $c4Nes$react).createElement((0, $c4Nes$FocusScope), {
87
- restoreFocus: true
88
- }, /*#__PURE__*/ (0, $c4Nes$react).createElement("div", {
89
- ...(0, $c4Nes$filterDOMProps)(props),
90
- ...styleProps,
91
- ...keyboardProps,
92
- ref: ref,
93
- className: (0, $c4Nes$classNames)((0, ($parcel$interopDefault($c4Nes$actionbar_cssmodulejs))), 'react-spectrum-ActionBar', {
94
- 'react-spectrum-ActionBar--emphasized': isEmphasized,
95
- 'is-open': isOpen
96
- }, styleProps.className)
97
- }, /*#__PURE__*/ (0, $c4Nes$react).createElement("div", {
98
- className: (0, $c4Nes$classNames)((0, ($parcel$interopDefault($c4Nes$actionbar_cssmodulejs))), 'react-spectrum-ActionBar-bar')
99
- }, /*#__PURE__*/ (0, $c4Nes$react).createElement((0, $c4Nes$ActionGroup), {
100
- items: items,
101
- "aria-label": stringFormatter.format('actions'),
102
- isQuiet: true,
103
- staticColor: isEmphasized ? 'white' : undefined,
104
- overflowMode: "collapse",
105
- buttonLabelBehavior: buttonLabelBehavior,
106
- onAction: onAction,
107
- disabledKeys: disabledKeys,
108
- UNSAFE_className: (0, $c4Nes$classNames)((0, ($parcel$interopDefault($c4Nes$actionbar_cssmodulejs))), 'react-spectrum-ActionBar-actionGroup')
109
- }, children), /*#__PURE__*/ (0, $c4Nes$react).createElement((0, $c4Nes$ActionButton), {
110
- gridArea: (0, ($parcel$interopDefault($c4Nes$actionbar_cssmodulejs))).clear,
111
- "aria-label": stringFormatter.format('clearSelection'),
112
- onPress: ()=>onClearSelection(),
113
- isQuiet: true,
114
- staticColor: isEmphasized ? 'white' : undefined
115
- }, /*#__PURE__*/ (0, $c4Nes$react).createElement((0, $c4Nes$spectrumiconsuiCrossLarge), null)), /*#__PURE__*/ (0, $c4Nes$react).createElement((0, $c4Nes$Text), {
116
- UNSAFE_className: (0, $c4Nes$classNames)((0, ($parcel$interopDefault($c4Nes$actionbar_cssmodulejs))), 'react-spectrum-ActionBar-selectedCount')
117
- }, lastCount === 'all' ? stringFormatter.format('selectedAll') : stringFormatter.format('selected', {
118
- count: lastCount
119
- })))));
120
- }
121
- const $a4e665fbd087d71e$var$ActionBarInnerWithRef = /*#__PURE__*/ (0, $c4Nes$react).forwardRef($a4e665fbd087d71e$var$ActionBarInner);
122
-
123
-
124
- export {$a4e665fbd087d71e$export$e213cebad6250b4a as ActionBar};
125
- //# sourceMappingURL=ActionBar.module.js.map
@@ -1,125 +0,0 @@
1
- import $c4Nes$intlStringsmodulejs from "./intlStrings.module.js";
2
- import "./actionbar.bdfe7eee.css";
3
- import $c4Nes$actionbar_cssmodulejs from "./actionbar_css.module.js";
4
- import {ActionButton as $c4Nes$ActionButton} from "@react-spectrum/button";
5
- import {ActionGroup as $c4Nes$ActionGroup} from "@react-spectrum/actiongroup";
6
- import {announce as $c4Nes$announce} from "@react-aria/live-announcer";
7
- import {useDOMRef as $c4Nes$useDOMRef, useStyleProps as $c4Nes$useStyleProps, classNames as $c4Nes$classNames} from "@react-spectrum/utils";
8
- import $c4Nes$spectrumiconsuiCrossLarge from "@spectrum-icons/ui/CrossLarge";
9
- import {filterDOMProps as $c4Nes$filterDOMProps} from "@react-aria/utils";
10
- import {FocusScope as $c4Nes$FocusScope} from "@react-aria/focus";
11
- import {OpenTransition as $c4Nes$OpenTransition} from "@react-spectrum/overlays";
12
- import $c4Nes$react, {useState as $c4Nes$useState, useRef as $c4Nes$useRef, useEffect as $c4Nes$useEffect} from "react";
13
- import {Text as $c4Nes$Text} from "@react-spectrum/text";
14
- import {useKeyboard as $c4Nes$useKeyboard} from "@react-aria/interactions";
15
- import {useLocalizedStringFormatter as $c4Nes$useLocalizedStringFormatter} from "@react-aria/i18n";
16
- import {useProviderProps as $c4Nes$useProviderProps} from "@react-spectrum/provider";
17
-
18
-
19
- function $parcel$interopDefault(a) {
20
- return a && a.__esModule ? a.default : a;
21
- }
22
- /*
23
- * Copyright 2020 Adobe. All rights reserved.
24
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
25
- * you may not use this file except in compliance with the License. You may obtain a copy
26
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
27
- *
28
- * Unless required by applicable law or agreed to in writing, software distributed under
29
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
30
- * OF ANY KIND, either express or implied. See the License for the specific language
31
- * governing permissions and limitations under the License.
32
- */
33
-
34
-
35
-
36
-
37
-
38
-
39
-
40
-
41
-
42
-
43
-
44
-
45
-
46
-
47
- const $a4e665fbd087d71e$export$e213cebad6250b4a = /*#__PURE__*/ (0, $c4Nes$react).forwardRef(function ActionBar(props, ref) {
48
- let isOpen = props.selectedItemCount !== 0;
49
- let domRef = (0, $c4Nes$useDOMRef)(ref);
50
- return /*#__PURE__*/ (0, $c4Nes$react).createElement((0, $c4Nes$OpenTransition), {
51
- nodeRef: domRef,
52
- in: isOpen,
53
- mountOnEnter: true,
54
- unmountOnExit: true
55
- }, /*#__PURE__*/ (0, $c4Nes$react).createElement($a4e665fbd087d71e$var$ActionBarInnerWithRef, {
56
- ...props,
57
- ref: domRef
58
- }));
59
- });
60
- function $a4e665fbd087d71e$var$ActionBarInner(props, ref) {
61
- props = (0, $c4Nes$useProviderProps)(props);
62
- let { children: children, isEmphasized: isEmphasized, onAction: onAction, onClearSelection: onClearSelection, selectedItemCount: selectedItemCount, isOpen: isOpen, buttonLabelBehavior: buttonLabelBehavior = 'collapse', items: items, disabledKeys: disabledKeys } = props;
63
- let { styleProps: styleProps } = (0, $c4Nes$useStyleProps)(props);
64
- let stringFormatter = (0, $c4Nes$useLocalizedStringFormatter)((0, ($parcel$interopDefault($c4Nes$intlStringsmodulejs))), '@react-spectrum/actionbar');
65
- // Store the last count greater than zero in a ref so that we can retain it while rendering the fade-out animation.
66
- let [lastCount, setLastCount] = (0, $c4Nes$useState)(selectedItemCount);
67
- if ((selectedItemCount === 'all' || selectedItemCount > 0) && selectedItemCount !== lastCount) setLastCount(selectedItemCount);
68
- let { keyboardProps: keyboardProps } = (0, $c4Nes$useKeyboard)({
69
- onKeyDown (e) {
70
- if (e.key === 'Escape') {
71
- e.preventDefault();
72
- onClearSelection();
73
- }
74
- }
75
- });
76
- // Announce "actions available" on mount.
77
- let isInitial = (0, $c4Nes$useRef)(true);
78
- (0, $c4Nes$useEffect)(()=>{
79
- if (isInitial.current) {
80
- isInitial.current = false;
81
- (0, $c4Nes$announce)(stringFormatter.format('actionsAvailable'));
82
- }
83
- }, [
84
- stringFormatter
85
- ]);
86
- return /*#__PURE__*/ (0, $c4Nes$react).createElement((0, $c4Nes$FocusScope), {
87
- restoreFocus: true
88
- }, /*#__PURE__*/ (0, $c4Nes$react).createElement("div", {
89
- ...(0, $c4Nes$filterDOMProps)(props),
90
- ...styleProps,
91
- ...keyboardProps,
92
- ref: ref,
93
- className: (0, $c4Nes$classNames)((0, ($parcel$interopDefault($c4Nes$actionbar_cssmodulejs))), 'react-spectrum-ActionBar', {
94
- 'react-spectrum-ActionBar--emphasized': isEmphasized,
95
- 'is-open': isOpen
96
- }, styleProps.className)
97
- }, /*#__PURE__*/ (0, $c4Nes$react).createElement("div", {
98
- className: (0, $c4Nes$classNames)((0, ($parcel$interopDefault($c4Nes$actionbar_cssmodulejs))), 'react-spectrum-ActionBar-bar')
99
- }, /*#__PURE__*/ (0, $c4Nes$react).createElement((0, $c4Nes$ActionGroup), {
100
- items: items,
101
- "aria-label": stringFormatter.format('actions'),
102
- isQuiet: true,
103
- staticColor: isEmphasized ? 'white' : undefined,
104
- overflowMode: "collapse",
105
- buttonLabelBehavior: buttonLabelBehavior,
106
- onAction: onAction,
107
- disabledKeys: disabledKeys,
108
- UNSAFE_className: (0, $c4Nes$classNames)((0, ($parcel$interopDefault($c4Nes$actionbar_cssmodulejs))), 'react-spectrum-ActionBar-actionGroup')
109
- }, children), /*#__PURE__*/ (0, $c4Nes$react).createElement((0, $c4Nes$ActionButton), {
110
- gridArea: (0, ($parcel$interopDefault($c4Nes$actionbar_cssmodulejs))).clear,
111
- "aria-label": stringFormatter.format('clearSelection'),
112
- onPress: ()=>onClearSelection(),
113
- isQuiet: true,
114
- staticColor: isEmphasized ? 'white' : undefined
115
- }, /*#__PURE__*/ (0, $c4Nes$react).createElement((0, $c4Nes$spectrumiconsuiCrossLarge), null)), /*#__PURE__*/ (0, $c4Nes$react).createElement((0, $c4Nes$Text), {
116
- UNSAFE_className: (0, $c4Nes$classNames)((0, ($parcel$interopDefault($c4Nes$actionbar_cssmodulejs))), 'react-spectrum-ActionBar-selectedCount')
117
- }, lastCount === 'all' ? stringFormatter.format('selectedAll') : stringFormatter.format('selected', {
118
- count: lastCount
119
- })))));
120
- }
121
- const $a4e665fbd087d71e$var$ActionBarInnerWithRef = /*#__PURE__*/ (0, $c4Nes$react).forwardRef($a4e665fbd087d71e$var$ActionBarInner);
122
-
123
-
124
- export {$a4e665fbd087d71e$export$e213cebad6250b4a as ActionBar};
125
- //# sourceMappingURL=ActionBar.module.js.map
@@ -1 +0,0 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;AAwBM,MAAM,0DAAY,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC,SAAS,UAA4B,KAAgC,EAAE,GAA2B;IAC1I,IAAI,SAAS,MAAM,iBAAiB,KAAK;IACzC,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IAEvB,qBACE,gCAAC,CAAA,GAAA,qBAAa;QACZ,SAAS;QACT,IAAI;QACJ,cAAA;QACA,eAAA;qBACA,gCAAC;QAAuB,GAAG,KAAK;QAAE,KAAK;;AAG7C;AAMA,SAAS,qCAAkB,KAA6B,EAAE,GAAwB;IAChF,QAAQ,CAAA,GAAA,uBAAe,EAAE;IAEzB,IAAI,YACF,QAAQ,gBACR,YAAY,YACZ,QAAQ,oBACR,gBAAgB,qBAChB,iBAAiB,UACjB,MAAM,uBACN,sBAAsB,mBACtB,KAAK,gBACL,YAAY,EACb,GAAG;IAEJ,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE;IACjC,IAAI,kBAAkB,CAAA,GAAA,kCAA0B,EAAE,CAAA,GAAA,oDAAW,GAAG;IAEhE,mHAAmH;IACnH,IAAI,CAAC,WAAW,aAAa,GAAG,CAAA,GAAA,eAAO,EAAE;IACzC,IAAI,AAAC,CAAA,sBAAsB,SAAS,oBAAoB,CAAA,KAAM,sBAAsB,WAClF,aAAa;IAGf,IAAI,iBAAC,aAAa,EAAC,GAAG,CAAA,GAAA,kBAAU,EAAE;QAChC,WAAU,CAAC;YACT,IAAI,EAAE,GAAG,KAAK,UAAU;gBACtB,EAAE,cAAc;gBAChB;YACF;QACF;IACF;IAEA,yCAAyC;IACzC,IAAI,YAAY,CAAA,GAAA,aAAK,EAAE;IACvB,CAAA,GAAA,gBAAQ,EAAE;QACR,IAAI,UAAU,OAAO,EAAE;YACrB,UAAU,OAAO,GAAG;YACpB,CAAA,GAAA,eAAO,EAAE,gBAAgB,MAAM,CAAC;QAClC;IACF,GAAG;QAAC;KAAgB;IAEpB,qBACE,gCAAC,CAAA,GAAA,iBAAS;QAAE,cAAA;qBACV,gCAAC;QACE,GAAG,CAAA,GAAA,qBAAa,EAAE,MAAM;QACxB,GAAG,UAAU;QACb,GAAG,aAAa;QACjB,KAAK;QACL,WAAW,CAAA,GAAA,iBAAS,EAClB,CAAA,GAAA,sDAAK,GACL,4BAA4B;YAC1B,wCAAwC;YACxC,WAAW;QACb,GACA,WAAW,SAAS;qBAEtB,gCAAC;QAAI,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,sDAAK,GAAG;qBACjC,gCAAC,CAAA,GAAA,kBAAU;QACT,OAAO;QACP,cAAY,gBAAgB,MAAM,CAAC;QACnC,SAAA;QACA,aAAa,eAAe,UAAU;QACtC,cAAa;QACb,qBAAqB;QACrB,UAAU;QACV,cAAc;QACd,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,sDAAK,GAAG;OACpC,yBAEH,gCAAC,CAAA,GAAA,mBAAW;QACV,UAAU,CAAA,GAAA,sDAAK,EAAE,KAAK;QACtB,cAAY,gBAAgB,MAAM,CAAC;QACnC,SAAS,IAAM;QACf,SAAA;QACA,aAAa,eAAe,UAAU;qBACtC,gCAAC,CAAA,GAAA,gCAAS,yBAEZ,gCAAC,CAAA,GAAA,WAAG;QAAE,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,sDAAK,GAAG;OACxC,cAAc,QACX,gBAAgB,MAAM,CAAC,iBACvB,gBAAgB,MAAM,CAAC,YAAY;QAAC,OAAO;IAAS;AAMpE;AAEA,MAAM,4DAAwB,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/actionbar/src/ActionBar.tsx"],"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\nimport {ActionButton} from '@react-spectrum/button';\nimport {ActionGroup} from '@react-spectrum/actiongroup';\nimport {announce} from '@react-aria/live-announcer';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport CrossLarge from '@spectrum-icons/ui/CrossLarge';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {FocusScope} from '@react-aria/focus';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {OpenTransition} from '@react-spectrum/overlays';\nimport React, {ReactElement, Ref, useEffect, useRef, useState} from 'react';\nimport {SpectrumActionBarProps} from '@react-types/actionbar';\nimport styles from './actionbar.css';\nimport {Text} from '@react-spectrum/text';\nimport {useKeyboard} from '@react-aria/interactions';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\n\n/**\n * Action bars are used for single and bulk selection patterns when a user needs to perform actions on one or more items at the same time.\n */\nexport const ActionBar = React.forwardRef(function ActionBar<T extends object>(props: SpectrumActionBarProps<T>, ref: DOMRef<HTMLDivElement>) {\n let isOpen = props.selectedItemCount !== 0;\n let domRef = useDOMRef(ref);\n\n return (\n <OpenTransition\n nodeRef={domRef}\n in={isOpen}\n mountOnEnter\n unmountOnExit>\n <ActionBarInnerWithRef {...props} ref={domRef} />\n </OpenTransition>\n );\n}) as <T>(props: SpectrumActionBarProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\n\ninterface ActionBarInnerProps<T> extends SpectrumActionBarProps<T> {\n isOpen?: boolean\n}\n\nfunction ActionBarInner<T>(props: ActionBarInnerProps<T>, ref: Ref<HTMLDivElement>) {\n props = useProviderProps(props);\n\n let {\n children,\n isEmphasized,\n onAction,\n onClearSelection,\n selectedItemCount,\n isOpen,\n buttonLabelBehavior = 'collapse',\n items,\n disabledKeys\n } = props;\n\n let {styleProps} = useStyleProps(props);\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/actionbar');\n\n // Store the last count greater than zero in a ref so that we can retain it while rendering the fade-out animation.\n let [lastCount, setLastCount] = useState(selectedItemCount);\n if ((selectedItemCount === 'all' || selectedItemCount > 0) && selectedItemCount !== lastCount) {\n setLastCount(selectedItemCount);\n }\n\n let {keyboardProps} = useKeyboard({\n onKeyDown(e) {\n if (e.key === 'Escape') {\n e.preventDefault();\n onClearSelection();\n }\n }\n });\n\n // Announce \"actions available\" on mount.\n let isInitial = useRef(true);\n useEffect(() => {\n if (isInitial.current) {\n isInitial.current = false;\n announce(stringFormatter.format('actionsAvailable'));\n }\n }, [stringFormatter]);\n\n return (\n <FocusScope restoreFocus>\n <div\n {...filterDOMProps(props)}\n {...styleProps}\n {...keyboardProps}\n ref={ref}\n className={classNames(\n styles,\n 'react-spectrum-ActionBar', {\n 'react-spectrum-ActionBar--emphasized': isEmphasized,\n 'is-open': isOpen\n },\n styleProps.className\n )}>\n <div className={classNames(styles, 'react-spectrum-ActionBar-bar')}>\n <ActionGroup\n items={items}\n aria-label={stringFormatter.format('actions')}\n isQuiet\n staticColor={isEmphasized ? 'white' : undefined}\n overflowMode=\"collapse\"\n buttonLabelBehavior={buttonLabelBehavior}\n onAction={onAction}\n disabledKeys={disabledKeys}\n UNSAFE_className={classNames(styles, 'react-spectrum-ActionBar-actionGroup')}>\n {children}\n </ActionGroup>\n <ActionButton\n gridArea={styles.clear}\n aria-label={stringFormatter.format('clearSelection')}\n onPress={() => onClearSelection()}\n isQuiet\n staticColor={isEmphasized ? 'white' : undefined}>\n <CrossLarge />\n </ActionButton>\n <Text UNSAFE_className={classNames(styles, 'react-spectrum-ActionBar-selectedCount')}>\n {lastCount === 'all'\n ? stringFormatter.format('selectedAll')\n : stringFormatter.format('selected', {count: lastCount})}\n </Text>\n </div>\n </div>\n </FocusScope>\n );\n}\n\nconst ActionBarInnerWithRef = React.forwardRef(ActionBarInner) as <T>(props: ActionBarInnerProps<T> & {ref?: Ref<HTMLDivElement>}) => ReactElement;\n"],"names":[],"version":3,"file":"ActionBar.module.js.map"}