@react-spectrum/tag 3.3.10 → 3.4.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 (204) hide show
  1. package/dist/import.mjs +3 -3
  2. package/dist/main.js +4 -4
  3. package/dist/main.js.map +1 -1
  4. package/dist/module.js +3 -3
  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 -3
  9. package/dist/Tag.main.js +0 -95
  10. package/dist/Tag.main.js.map +0 -1
  11. package/dist/Tag.mjs +0 -90
  12. package/dist/Tag.module.js +0 -90
  13. package/dist/Tag.module.js.map +0 -1
  14. package/dist/TagGroup.main.js +0 -269
  15. package/dist/TagGroup.main.js.map +0 -1
  16. package/dist/TagGroup.mjs +0 -264
  17. package/dist/TagGroup.module.js +0 -264
  18. package/dist/TagGroup.module.js.map +0 -1
  19. package/dist/ar-AE.main.js +0 -9
  20. package/dist/ar-AE.main.js.map +0 -1
  21. package/dist/ar-AE.mjs +0 -11
  22. package/dist/ar-AE.module.js +0 -11
  23. package/dist/ar-AE.module.js.map +0 -1
  24. package/dist/bg-BG.main.js +0 -9
  25. package/dist/bg-BG.main.js.map +0 -1
  26. package/dist/bg-BG.mjs +0 -11
  27. package/dist/bg-BG.module.js +0 -11
  28. package/dist/bg-BG.module.js.map +0 -1
  29. package/dist/cs-CZ.main.js +0 -9
  30. package/dist/cs-CZ.main.js.map +0 -1
  31. package/dist/cs-CZ.mjs +0 -11
  32. package/dist/cs-CZ.module.js +0 -11
  33. package/dist/cs-CZ.module.js.map +0 -1
  34. package/dist/da-DK.main.js +0 -9
  35. package/dist/da-DK.main.js.map +0 -1
  36. package/dist/da-DK.mjs +0 -11
  37. package/dist/da-DK.module.js +0 -11
  38. package/dist/da-DK.module.js.map +0 -1
  39. package/dist/de-DE.main.js +0 -9
  40. package/dist/de-DE.main.js.map +0 -1
  41. package/dist/de-DE.mjs +0 -11
  42. package/dist/de-DE.module.js +0 -11
  43. package/dist/de-DE.module.js.map +0 -1
  44. package/dist/el-GR.main.js +0 -9
  45. package/dist/el-GR.main.js.map +0 -1
  46. package/dist/el-GR.mjs +0 -11
  47. package/dist/el-GR.module.js +0 -11
  48. package/dist/el-GR.module.js.map +0 -1
  49. package/dist/en-US.main.js +0 -9
  50. package/dist/en-US.main.js.map +0 -1
  51. package/dist/en-US.mjs +0 -11
  52. package/dist/en-US.module.js +0 -11
  53. package/dist/en-US.module.js.map +0 -1
  54. package/dist/es-ES.main.js +0 -9
  55. package/dist/es-ES.main.js.map +0 -1
  56. package/dist/es-ES.mjs +0 -11
  57. package/dist/es-ES.module.js +0 -11
  58. package/dist/es-ES.module.js.map +0 -1
  59. package/dist/et-EE.main.js +0 -9
  60. package/dist/et-EE.main.js.map +0 -1
  61. package/dist/et-EE.mjs +0 -11
  62. package/dist/et-EE.module.js +0 -11
  63. package/dist/et-EE.module.js.map +0 -1
  64. package/dist/fi-FI.main.js +0 -9
  65. package/dist/fi-FI.main.js.map +0 -1
  66. package/dist/fi-FI.mjs +0 -11
  67. package/dist/fi-FI.module.js +0 -11
  68. package/dist/fi-FI.module.js.map +0 -1
  69. package/dist/fr-FR.main.js +0 -9
  70. package/dist/fr-FR.main.js.map +0 -1
  71. package/dist/fr-FR.mjs +0 -11
  72. package/dist/fr-FR.module.js +0 -11
  73. package/dist/fr-FR.module.js.map +0 -1
  74. package/dist/he-IL.main.js +0 -9
  75. package/dist/he-IL.main.js.map +0 -1
  76. package/dist/he-IL.mjs +0 -11
  77. package/dist/he-IL.module.js +0 -11
  78. package/dist/he-IL.module.js.map +0 -1
  79. package/dist/hr-HR.main.js +0 -9
  80. package/dist/hr-HR.main.js.map +0 -1
  81. package/dist/hr-HR.mjs +0 -11
  82. package/dist/hr-HR.module.js +0 -11
  83. package/dist/hr-HR.module.js.map +0 -1
  84. package/dist/hu-HU.main.js +0 -9
  85. package/dist/hu-HU.main.js.map +0 -1
  86. package/dist/hu-HU.mjs +0 -11
  87. package/dist/hu-HU.module.js +0 -11
  88. package/dist/hu-HU.module.js.map +0 -1
  89. package/dist/intlStrings.main.js +0 -108
  90. package/dist/intlStrings.main.js.map +0 -1
  91. package/dist/intlStrings.mjs +0 -110
  92. package/dist/intlStrings.module.js +0 -110
  93. package/dist/intlStrings.module.js.map +0 -1
  94. package/dist/it-IT.main.js +0 -9
  95. package/dist/it-IT.main.js.map +0 -1
  96. package/dist/it-IT.mjs +0 -11
  97. package/dist/it-IT.module.js +0 -11
  98. package/dist/it-IT.module.js.map +0 -1
  99. package/dist/ja-JP.main.js +0 -9
  100. package/dist/ja-JP.main.js.map +0 -1
  101. package/dist/ja-JP.mjs +0 -11
  102. package/dist/ja-JP.module.js +0 -11
  103. package/dist/ja-JP.module.js.map +0 -1
  104. package/dist/ko-KR.main.js +0 -9
  105. package/dist/ko-KR.main.js.map +0 -1
  106. package/dist/ko-KR.mjs +0 -11
  107. package/dist/ko-KR.module.js +0 -11
  108. package/dist/ko-KR.module.js.map +0 -1
  109. package/dist/lt-LT.main.js +0 -9
  110. package/dist/lt-LT.main.js.map +0 -1
  111. package/dist/lt-LT.mjs +0 -11
  112. package/dist/lt-LT.module.js +0 -11
  113. package/dist/lt-LT.module.js.map +0 -1
  114. package/dist/lv-LV.main.js +0 -9
  115. package/dist/lv-LV.main.js.map +0 -1
  116. package/dist/lv-LV.mjs +0 -11
  117. package/dist/lv-LV.module.js +0 -11
  118. package/dist/lv-LV.module.js.map +0 -1
  119. package/dist/nb-NO.main.js +0 -9
  120. package/dist/nb-NO.main.js.map +0 -1
  121. package/dist/nb-NO.mjs +0 -11
  122. package/dist/nb-NO.module.js +0 -11
  123. package/dist/nb-NO.module.js.map +0 -1
  124. package/dist/nl-NL.main.js +0 -9
  125. package/dist/nl-NL.main.js.map +0 -1
  126. package/dist/nl-NL.mjs +0 -11
  127. package/dist/nl-NL.module.js +0 -11
  128. package/dist/nl-NL.module.js.map +0 -1
  129. package/dist/pl-PL.main.js +0 -9
  130. package/dist/pl-PL.main.js.map +0 -1
  131. package/dist/pl-PL.mjs +0 -11
  132. package/dist/pl-PL.module.js +0 -11
  133. package/dist/pl-PL.module.js.map +0 -1
  134. package/dist/pt-BR.main.js +0 -9
  135. package/dist/pt-BR.main.js.map +0 -1
  136. package/dist/pt-BR.mjs +0 -11
  137. package/dist/pt-BR.module.js +0 -11
  138. package/dist/pt-BR.module.js.map +0 -1
  139. package/dist/pt-PT.main.js +0 -9
  140. package/dist/pt-PT.main.js.map +0 -1
  141. package/dist/pt-PT.mjs +0 -11
  142. package/dist/pt-PT.module.js +0 -11
  143. package/dist/pt-PT.module.js.map +0 -1
  144. package/dist/ro-RO.main.js +0 -9
  145. package/dist/ro-RO.main.js.map +0 -1
  146. package/dist/ro-RO.mjs +0 -11
  147. package/dist/ro-RO.module.js +0 -11
  148. package/dist/ro-RO.module.js.map +0 -1
  149. package/dist/ru-RU.main.js +0 -9
  150. package/dist/ru-RU.main.js.map +0 -1
  151. package/dist/ru-RU.mjs +0 -11
  152. package/dist/ru-RU.module.js +0 -11
  153. package/dist/ru-RU.module.js.map +0 -1
  154. package/dist/sk-SK.main.js +0 -9
  155. package/dist/sk-SK.main.js.map +0 -1
  156. package/dist/sk-SK.mjs +0 -11
  157. package/dist/sk-SK.module.js +0 -11
  158. package/dist/sk-SK.module.js.map +0 -1
  159. package/dist/sl-SI.main.js +0 -9
  160. package/dist/sl-SI.main.js.map +0 -1
  161. package/dist/sl-SI.mjs +0 -11
  162. package/dist/sl-SI.module.js +0 -11
  163. package/dist/sl-SI.module.js.map +0 -1
  164. package/dist/sr-SP.main.js +0 -9
  165. package/dist/sr-SP.main.js.map +0 -1
  166. package/dist/sr-SP.mjs +0 -11
  167. package/dist/sr-SP.module.js +0 -11
  168. package/dist/sr-SP.module.js.map +0 -1
  169. package/dist/sv-SE.main.js +0 -9
  170. package/dist/sv-SE.main.js.map +0 -1
  171. package/dist/sv-SE.mjs +0 -11
  172. package/dist/sv-SE.module.js +0 -11
  173. package/dist/sv-SE.module.js.map +0 -1
  174. package/dist/tag.9dd3cf2c.css +0 -270
  175. package/dist/tag.9dd3cf2c.css.map +0 -1
  176. package/dist/tags_vars_css.main.js +0 -86
  177. package/dist/tags_vars_css.main.js.map +0 -1
  178. package/dist/tags_vars_css.mjs +0 -88
  179. package/dist/tags_vars_css.module.js +0 -88
  180. package/dist/tags_vars_css.module.js.map +0 -1
  181. package/dist/tr-TR.main.js +0 -9
  182. package/dist/tr-TR.main.js.map +0 -1
  183. package/dist/tr-TR.mjs +0 -11
  184. package/dist/tr-TR.module.js +0 -11
  185. package/dist/tr-TR.module.js.map +0 -1
  186. package/dist/types.d.ts +0 -20
  187. package/dist/types.d.ts.map +0 -1
  188. package/dist/uk-UA.main.js +0 -9
  189. package/dist/uk-UA.main.js.map +0 -1
  190. package/dist/uk-UA.mjs +0 -11
  191. package/dist/uk-UA.module.js +0 -11
  192. package/dist/uk-UA.module.js.map +0 -1
  193. package/dist/zh-CN.main.js +0 -9
  194. package/dist/zh-CN.main.js.map +0 -1
  195. package/dist/zh-CN.mjs +0 -11
  196. package/dist/zh-CN.module.js +0 -11
  197. package/dist/zh-CN.module.js.map +0 -1
  198. package/dist/zh-TW.main.js +0 -9
  199. package/dist/zh-TW.main.js.map +0 -1
  200. package/dist/zh-TW.mjs +0 -11
  201. package/dist/zh-TW.module.js +0 -11
  202. package/dist/zh-TW.module.js.map +0 -1
  203. package/src/Tag.tsx +0 -87
  204. package/src/TagGroup.tsx +0 -278
package/dist/import.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import {TagGroup as $880d112c7a588209$export$67ea30858aaf75e3} from "./TagGroup.mjs";
2
- import {Item as $c14698d57a91452e$re_export$Item} from "@react-stately/collections";
1
+ import {TagGroup as $423f8fcf23477fa1$re_export$TagGroup} from "@adobe/react-spectrum/TagGroup";
2
+ import {Item as $423f8fcf23477fa1$re_export$Item} from "react-stately/Item";
3
3
 
4
4
  /*
5
5
  * Copyright 2020 Adobe. All rights reserved.
@@ -15,5 +15,5 @@ import {Item as $c14698d57a91452e$re_export$Item} from "@react-stately/collectio
15
15
 
16
16
 
17
17
 
18
- export {$880d112c7a588209$export$67ea30858aaf75e3 as TagGroup, $c14698d57a91452e$re_export$Item as Item};
18
+ export {$423f8fcf23477fa1$re_export$TagGroup as TagGroup, $423f8fcf23477fa1$re_export$Item as Item};
19
19
  //# sourceMappingURL=module.js.map
package/dist/main.js CHANGED
@@ -1,13 +1,13 @@
1
- var $e7b72d8874e98cd4$exports = require("./TagGroup.main.js");
2
- var $dTV3V$reactstatelycollections = require("@react-stately/collections");
1
+ var $76Dju$adobereactspectrumTagGroup = require("@adobe/react-spectrum/TagGroup");
2
+ var $76Dju$reactstatelyItem = require("react-stately/Item");
3
3
 
4
4
 
5
5
  function $parcel$export(e, n, v, s) {
6
6
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
7
7
  }
8
8
 
9
- $parcel$export(module.exports, "TagGroup", () => $e7b72d8874e98cd4$exports.TagGroup);
10
- $parcel$export(module.exports, "Item", () => $dTV3V$reactstatelycollections.Item);
9
+ $parcel$export(module.exports, "TagGroup", function () { return $76Dju$adobereactspectrumTagGroup.TagGroup; });
10
+ $parcel$export(module.exports, "Item", function () { return $76Dju$reactstatelyItem.Item; });
11
11
  /*
12
12
  * Copyright 2020 Adobe. All rights reserved.
13
13
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-spectrum/tag/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\nexport {TagGroup} from './TagGroup';\nexport {Item} from '@react-stately/collections';\nexport type {SpectrumTagGroupProps} from './TagGroup';\n"],"names":[],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-spectrum/tag/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\nexport {TagGroup} from '@adobe/react-spectrum/TagGroup';\n\nexport type {SpectrumTagGroupProps} from '@adobe/react-spectrum/TagGroup';\nexport {Item} from 'react-stately/Item';\n"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -1,5 +1,5 @@
1
- import {TagGroup as $880d112c7a588209$export$67ea30858aaf75e3} from "./TagGroup.module.js";
2
- import {Item as $c14698d57a91452e$re_export$Item} from "@react-stately/collections";
1
+ import {TagGroup as $423f8fcf23477fa1$re_export$TagGroup} from "@adobe/react-spectrum/TagGroup";
2
+ import {Item as $423f8fcf23477fa1$re_export$Item} from "react-stately/Item";
3
3
 
4
4
  /*
5
5
  * Copyright 2020 Adobe. All rights reserved.
@@ -15,5 +15,5 @@ import {Item as $c14698d57a91452e$re_export$Item} from "@react-stately/collectio
15
15
 
16
16
 
17
17
 
18
- export {$880d112c7a588209$export$67ea30858aaf75e3 as TagGroup, $c14698d57a91452e$re_export$Item as Item};
18
+ export {$423f8fcf23477fa1$re_export$TagGroup as TagGroup, $423f8fcf23477fa1$re_export$Item as Item};
19
19
  //# sourceMappingURL=module.js.map
@@ -1 +1 @@
1
- {"mappings":";;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-spectrum/tag/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\nexport {TagGroup} from './TagGroup';\nexport {Item} from '@react-stately/collections';\nexport type {SpectrumTagGroupProps} from './TagGroup';\n"],"names":[],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-spectrum/tag/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\nexport {TagGroup} from '@adobe/react-spectrum/TagGroup';\n\nexport type {SpectrumTagGroupProps} from '@adobe/react-spectrum/TagGroup';\nexport {Item} from 'react-stately/Item';\n"],"names":[],"version":3,"file":"module.js.map"}
@@ -0,0 +1,3 @@
1
+ export { TagGroup } from '@adobe/react-spectrum/TagGroup';
2
+ export type { SpectrumTagGroupProps } from '@adobe/react-spectrum/TagGroup';
3
+ export { Item } from 'react-stately/Item';
package/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "@react-spectrum/tag",
3
- "version": "3.3.10",
3
+ "version": "3.4.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/selection": "^3.27.2",
47
- "@react-aria/tag": "^3.8.1",
48
- "@react-aria/utils": "^3.33.1",
49
- "@react-spectrum/button": "^3.17.7",
50
- "@react-spectrum/form": "^3.7.22",
51
- "@react-spectrum/label": "^3.16.22",
52
- "@react-spectrum/text": "^3.5.25",
53
- "@react-spectrum/utils": "^3.12.12",
54
- "@react-stately/collections": "^3.12.10",
55
- "@react-stately/list": "^3.13.4",
56
- "@react-types/shared": "^3.33.1",
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,6 +10,7 @@
10
10
  * governing permissions and limitations under the License.
11
11
  */
12
12
 
13
- export {TagGroup} from './TagGroup';
14
- export {Item} from '@react-stately/collections';
15
- export type {SpectrumTagGroupProps} from './TagGroup';
13
+ export {TagGroup} from '@adobe/react-spectrum/TagGroup';
14
+
15
+ export type {SpectrumTagGroupProps} from '@adobe/react-spectrum/TagGroup';
16
+ export {Item} from 'react-stately/Item';
package/dist/Tag.main.js DELETED
@@ -1,95 +0,0 @@
1
- require("./tag.9dd3cf2c.css");
2
- var $ed889f8f1f091fc8$exports = require("./tags_vars_css.main.js");
3
- var $hZPqg$reactariatag = require("@react-aria/tag");
4
- var $hZPqg$reactspectrumutils = require("@react-spectrum/utils");
5
- var $hZPqg$reactspectrumbutton = require("@react-spectrum/button");
6
- var $hZPqg$reactariautils = require("@react-aria/utils");
7
- var $hZPqg$react = require("react");
8
- var $hZPqg$reactspectrumtext = require("@react-spectrum/text");
9
- var $hZPqg$reactariafocus = require("@react-aria/focus");
10
- var $hZPqg$reactariainteractions = require("@react-aria/interactions");
11
-
12
-
13
- function $parcel$interopDefault(a) {
14
- return a && a.__esModule ? a.default : a;
15
- }
16
-
17
- function $parcel$export(e, n, v, s) {
18
- Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
19
- }
20
-
21
- $parcel$export(module.exports, "Tag", () => $dd2c5d00108c1840$export$3288d34c523a1192);
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
- function $dd2c5d00108c1840$export$3288d34c523a1192(props) {
42
- const { item: item, state: state, ...otherProps } = props;
43
- // @ts-ignore
44
- let { styleProps: styleProps } = (0, $hZPqg$reactspectrumutils.useStyleProps)(otherProps);
45
- let { hoverProps: hoverProps, isHovered: isHovered } = (0, $hZPqg$reactariainteractions.useHover)({});
46
- let { isFocused: isFocused, isFocusVisible: isFocusVisible, focusProps: focusProps } = (0, $hZPqg$reactariafocus.useFocusRing)({
47
- within: false
48
- });
49
- let ref = (0, $hZPqg$react.useRef)(null);
50
- let { removeButtonProps: removeButtonProps, gridCellProps: gridCellProps, rowProps: rowProps, allowsRemoving: allowsRemoving } = (0, $hZPqg$reactariatag.useTag)({
51
- ...props,
52
- item: item
53
- }, state, ref);
54
- return /*#__PURE__*/ (0, ($parcel$interopDefault($hZPqg$react))).createElement("div", {
55
- ...(0, $hZPqg$reactariautils.mergeProps)(rowProps, hoverProps, focusProps),
56
- className: (0, $hZPqg$reactspectrumutils.classNames)((0, ($parcel$interopDefault($ed889f8f1f091fc8$exports))), 'spectrum-Tag', {
57
- 'focus-ring': isFocusVisible,
58
- 'is-focused': isFocused,
59
- 'is-hovered': isHovered,
60
- 'spectrum-Tag--removable': allowsRemoving
61
- }, styleProps.className),
62
- ref: ref
63
- }, /*#__PURE__*/ (0, ($parcel$interopDefault($hZPqg$react))).createElement("div", {
64
- className: (0, $hZPqg$reactspectrumutils.classNames)((0, ($parcel$interopDefault($ed889f8f1f091fc8$exports))), 'spectrum-Tag-cell'),
65
- ...gridCellProps
66
- }, /*#__PURE__*/ (0, ($parcel$interopDefault($hZPqg$react))).createElement((0, $hZPqg$reactspectrumutils.SlotProvider), {
67
- slots: {
68
- icon: {
69
- UNSAFE_className: (0, $hZPqg$reactspectrumutils.classNames)((0, ($parcel$interopDefault($ed889f8f1f091fc8$exports))), 'spectrum-Tag-icon'),
70
- size: 'XS'
71
- },
72
- text: {
73
- UNSAFE_className: (0, $hZPqg$reactspectrumutils.classNames)((0, ($parcel$interopDefault($ed889f8f1f091fc8$exports))), 'spectrum-Tag-content')
74
- },
75
- avatar: {
76
- UNSAFE_className: (0, $hZPqg$reactspectrumutils.classNames)((0, ($parcel$interopDefault($ed889f8f1f091fc8$exports))), 'spectrum-Tag-avatar'),
77
- size: 'avatar-size-50'
78
- }
79
- }
80
- }, typeof item.rendered === 'string' ? /*#__PURE__*/ (0, ($parcel$interopDefault($hZPqg$react))).createElement((0, $hZPqg$reactspectrumtext.Text), null, item.rendered) : item.rendered, /*#__PURE__*/ (0, ($parcel$interopDefault($hZPqg$react))).createElement((0, $hZPqg$reactspectrumutils.ClearSlots), null, allowsRemoving && /*#__PURE__*/ (0, ($parcel$interopDefault($hZPqg$react))).createElement($dd2c5d00108c1840$var$TagRemoveButton, {
81
- item: item,
82
- ...removeButtonProps,
83
- UNSAFE_className: (0, $hZPqg$reactspectrumutils.classNames)((0, ($parcel$interopDefault($ed889f8f1f091fc8$exports))), 'spectrum-Tag-removeButton')
84
- })))));
85
- }
86
- function $dd2c5d00108c1840$var$TagRemoveButton(props) {
87
- let { styleProps: styleProps } = (0, $hZPqg$reactspectrumutils.useStyleProps)(props);
88
- return /*#__PURE__*/ (0, ($parcel$interopDefault($hZPqg$react))).createElement("span", styleProps, /*#__PURE__*/ (0, ($parcel$interopDefault($hZPqg$react))).createElement((0, $hZPqg$reactspectrumbutton.ClearButton), {
89
- ...props,
90
- inset: true
91
- }));
92
- }
93
-
94
-
95
- //# sourceMappingURL=Tag.main.js.map
@@ -1 +0,0 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AAiBM,SAAS,0CAAO,KAA0B;IAC/C,MAAM,QACJ,IAAI,SACJ,KAAK,EACL,GAAG,YACJ,GAAG;IAEJ,aAAa;IACb,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IACjC,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,qCAAO,EAAE,CAAC;IACxC,IAAI,aAAC,SAAS,kBAAE,cAAc,cAAE,UAAU,EAAC,GAAG,CAAA,GAAA,kCAAW,EAAE;QAAC,QAAQ;IAAK;IACzE,IAAI,MAAM,CAAA,GAAA,mBAAK,EAAE;IACjB,IAAI,qBAAC,iBAAiB,iBAAE,aAAa,YAAE,QAAQ,kBAAE,cAAc,EAAC,GAAG,CAAA,GAAA,0BAAK,EAAE;QACxE,GAAG,KAAK;cACR;IACF,GAAG,OAAO;IAEV,qBACE,0DAAC;QACE,GAAG,CAAA,GAAA,gCAAS,EAAE,UAAU,YAAY,WAAW;QAChD,WAAW,CAAA,GAAA,oCAAS,EAChB,CAAA,GAAA,mDAAK,GACL,gBACF;YACE,cAAc;YACd,cAAc;YACd,cAAc;YACd,2BAA2B;QAC7B,GACE,WAAW,SAAS;QAExB,KAAK;qBACL,0DAAC;QACC,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;QAC7B,GAAG,aAAa;qBACjB,0DAAC,CAAA,GAAA,sCAAW;QACV,OAAO;YACL,MAAM;gBAAC,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;gBAAsB,MAAM;YAAI;YAC5E,MAAM;gBAAC,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;YAAuB;YACnE,QAAQ;gBAAC,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;gBAAwB,MAAM;YAAgB;QAC9F;OACC,OAAO,KAAK,QAAQ,KAAK,yBAAW,0DAAC,CAAA,GAAA,6BAAG,SAAG,KAAK,QAAQ,IAAW,KAAK,QAAQ,gBACjF,0DAAC,CAAA,GAAA,oCAAS,SACP,gCAAkB,0DAAC;QAAgB,MAAM;QAAO,GAAG,iBAAiB;QAAE,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;;AAMxH;AAEA,SAAS,sCAAgB,KAAK;IAC5B,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IAEjC,qBACE,0DAAC,QAAS,0BACR,0DAAC,CAAA,GAAA,sCAAU;QAAG,GAAG,KAAK;QAAE,OAAA;;AAG9B","sources":["packages/@react-spectrum/tag/src/Tag.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 {AriaTagProps, useTag} from '@react-aria/tag';\nimport {classNames, ClearSlots, SlotProvider, useStyleProps} from '@react-spectrum/utils';\nimport {ClearButton} from '@react-spectrum/button';\nimport type {ListState} from '@react-stately/list';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {ReactNode, useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/tags/vars.css';\nimport {Text} from '@react-spectrum/text';\nimport {useFocusRing} from '@react-aria/focus';\nimport {useHover} from '@react-aria/interactions';\n\nexport interface SpectrumTagProps<T> extends AriaTagProps<T> {\n state: ListState<T>\n}\n\nexport function Tag<T>(props: SpectrumTagProps<T>): ReactNode {\n const {\n item,\n state,\n ...otherProps\n } = props;\n\n // @ts-ignore\n let {styleProps} = useStyleProps(otherProps);\n let {hoverProps, isHovered} = useHover({});\n let {isFocused, isFocusVisible, focusProps} = useFocusRing({within: false});\n let ref = useRef(null);\n let {removeButtonProps, gridCellProps, rowProps, allowsRemoving} = useTag({\n ...props,\n item\n }, state, ref);\n\n return (\n <div\n {...mergeProps(rowProps, hoverProps, focusProps)}\n className={classNames(\n styles,\n 'spectrum-Tag',\n {\n 'focus-ring': isFocusVisible,\n 'is-focused': isFocused,\n 'is-hovered': isHovered,\n 'spectrum-Tag--removable': allowsRemoving\n },\n styleProps.className\n )}\n ref={ref}>\n <div\n className={classNames(styles, 'spectrum-Tag-cell')}\n {...gridCellProps}>\n <SlotProvider\n slots={{\n icon: {UNSAFE_className: classNames(styles, 'spectrum-Tag-icon'), size: 'XS'},\n text: {UNSAFE_className: classNames(styles, 'spectrum-Tag-content')},\n avatar: {UNSAFE_className: classNames(styles, 'spectrum-Tag-avatar'), size: 'avatar-size-50'}\n }}>\n {typeof item.rendered === 'string' ? <Text>{item.rendered}</Text> : item.rendered}\n <ClearSlots>\n {allowsRemoving && <TagRemoveButton item={item} {...removeButtonProps} UNSAFE_className={classNames(styles, 'spectrum-Tag-removeButton')} />}\n </ClearSlots>\n </SlotProvider>\n </div>\n </div>\n );\n}\n\nfunction TagRemoveButton(props) {\n let {styleProps} = useStyleProps(props);\n\n return (\n <span {...styleProps}>\n <ClearButton {...props} inset />\n </span>\n );\n}\n"],"names":[],"version":3,"file":"Tag.main.js.map"}
package/dist/Tag.mjs DELETED
@@ -1,90 +0,0 @@
1
- import "./tag.9dd3cf2c.css";
2
- import $X1F04$tags_vars_cssmodulejs from "./tags_vars_css.mjs";
3
- import {useTag as $X1F04$useTag} from "@react-aria/tag";
4
- import {useStyleProps as $X1F04$useStyleProps, classNames as $X1F04$classNames, SlotProvider as $X1F04$SlotProvider, ClearSlots as $X1F04$ClearSlots} from "@react-spectrum/utils";
5
- import {ClearButton as $X1F04$ClearButton} from "@react-spectrum/button";
6
- import {mergeProps as $X1F04$mergeProps} from "@react-aria/utils";
7
- import $X1F04$react, {useRef as $X1F04$useRef} from "react";
8
- import {Text as $X1F04$Text} from "@react-spectrum/text";
9
- import {useFocusRing as $X1F04$useFocusRing} from "@react-aria/focus";
10
- import {useHover as $X1F04$useHover} from "@react-aria/interactions";
11
-
12
-
13
- function $parcel$interopDefault(a) {
14
- return a && a.__esModule ? a.default : a;
15
- }
16
- /*
17
- * Copyright 2020 Adobe. All rights reserved.
18
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
19
- * you may not use this file except in compliance with the License. You may obtain a copy
20
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
21
- *
22
- * Unless required by applicable law or agreed to in writing, software distributed under
23
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
24
- * OF ANY KIND, either express or implied. See the License for the specific language
25
- * governing permissions and limitations under the License.
26
- */
27
-
28
-
29
-
30
-
31
-
32
-
33
-
34
-
35
- function $b5f5ee35d3b6b95c$export$3288d34c523a1192(props) {
36
- const { item: item, state: state, ...otherProps } = props;
37
- // @ts-ignore
38
- let { styleProps: styleProps } = (0, $X1F04$useStyleProps)(otherProps);
39
- let { hoverProps: hoverProps, isHovered: isHovered } = (0, $X1F04$useHover)({});
40
- let { isFocused: isFocused, isFocusVisible: isFocusVisible, focusProps: focusProps } = (0, $X1F04$useFocusRing)({
41
- within: false
42
- });
43
- let ref = (0, $X1F04$useRef)(null);
44
- let { removeButtonProps: removeButtonProps, gridCellProps: gridCellProps, rowProps: rowProps, allowsRemoving: allowsRemoving } = (0, $X1F04$useTag)({
45
- ...props,
46
- item: item
47
- }, state, ref);
48
- return /*#__PURE__*/ (0, $X1F04$react).createElement("div", {
49
- ...(0, $X1F04$mergeProps)(rowProps, hoverProps, focusProps),
50
- className: (0, $X1F04$classNames)((0, ($parcel$interopDefault($X1F04$tags_vars_cssmodulejs))), 'spectrum-Tag', {
51
- 'focus-ring': isFocusVisible,
52
- 'is-focused': isFocused,
53
- 'is-hovered': isHovered,
54
- 'spectrum-Tag--removable': allowsRemoving
55
- }, styleProps.className),
56
- ref: ref
57
- }, /*#__PURE__*/ (0, $X1F04$react).createElement("div", {
58
- className: (0, $X1F04$classNames)((0, ($parcel$interopDefault($X1F04$tags_vars_cssmodulejs))), 'spectrum-Tag-cell'),
59
- ...gridCellProps
60
- }, /*#__PURE__*/ (0, $X1F04$react).createElement((0, $X1F04$SlotProvider), {
61
- slots: {
62
- icon: {
63
- UNSAFE_className: (0, $X1F04$classNames)((0, ($parcel$interopDefault($X1F04$tags_vars_cssmodulejs))), 'spectrum-Tag-icon'),
64
- size: 'XS'
65
- },
66
- text: {
67
- UNSAFE_className: (0, $X1F04$classNames)((0, ($parcel$interopDefault($X1F04$tags_vars_cssmodulejs))), 'spectrum-Tag-content')
68
- },
69
- avatar: {
70
- UNSAFE_className: (0, $X1F04$classNames)((0, ($parcel$interopDefault($X1F04$tags_vars_cssmodulejs))), 'spectrum-Tag-avatar'),
71
- size: 'avatar-size-50'
72
- }
73
- }
74
- }, typeof item.rendered === 'string' ? /*#__PURE__*/ (0, $X1F04$react).createElement((0, $X1F04$Text), null, item.rendered) : item.rendered, /*#__PURE__*/ (0, $X1F04$react).createElement((0, $X1F04$ClearSlots), null, allowsRemoving && /*#__PURE__*/ (0, $X1F04$react).createElement($b5f5ee35d3b6b95c$var$TagRemoveButton, {
75
- item: item,
76
- ...removeButtonProps,
77
- UNSAFE_className: (0, $X1F04$classNames)((0, ($parcel$interopDefault($X1F04$tags_vars_cssmodulejs))), 'spectrum-Tag-removeButton')
78
- })))));
79
- }
80
- function $b5f5ee35d3b6b95c$var$TagRemoveButton(props) {
81
- let { styleProps: styleProps } = (0, $X1F04$useStyleProps)(props);
82
- return /*#__PURE__*/ (0, $X1F04$react).createElement("span", styleProps, /*#__PURE__*/ (0, $X1F04$react).createElement((0, $X1F04$ClearButton), {
83
- ...props,
84
- inset: true
85
- }));
86
- }
87
-
88
-
89
- export {$b5f5ee35d3b6b95c$export$3288d34c523a1192 as Tag};
90
- //# sourceMappingURL=Tag.module.js.map
@@ -1,90 +0,0 @@
1
- import "./tag.9dd3cf2c.css";
2
- import $X1F04$tags_vars_cssmodulejs from "./tags_vars_css.module.js";
3
- import {useTag as $X1F04$useTag} from "@react-aria/tag";
4
- import {useStyleProps as $X1F04$useStyleProps, classNames as $X1F04$classNames, SlotProvider as $X1F04$SlotProvider, ClearSlots as $X1F04$ClearSlots} from "@react-spectrum/utils";
5
- import {ClearButton as $X1F04$ClearButton} from "@react-spectrum/button";
6
- import {mergeProps as $X1F04$mergeProps} from "@react-aria/utils";
7
- import $X1F04$react, {useRef as $X1F04$useRef} from "react";
8
- import {Text as $X1F04$Text} from "@react-spectrum/text";
9
- import {useFocusRing as $X1F04$useFocusRing} from "@react-aria/focus";
10
- import {useHover as $X1F04$useHover} from "@react-aria/interactions";
11
-
12
-
13
- function $parcel$interopDefault(a) {
14
- return a && a.__esModule ? a.default : a;
15
- }
16
- /*
17
- * Copyright 2020 Adobe. All rights reserved.
18
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
19
- * you may not use this file except in compliance with the License. You may obtain a copy
20
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
21
- *
22
- * Unless required by applicable law or agreed to in writing, software distributed under
23
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
24
- * OF ANY KIND, either express or implied. See the License for the specific language
25
- * governing permissions and limitations under the License.
26
- */
27
-
28
-
29
-
30
-
31
-
32
-
33
-
34
-
35
- function $b5f5ee35d3b6b95c$export$3288d34c523a1192(props) {
36
- const { item: item, state: state, ...otherProps } = props;
37
- // @ts-ignore
38
- let { styleProps: styleProps } = (0, $X1F04$useStyleProps)(otherProps);
39
- let { hoverProps: hoverProps, isHovered: isHovered } = (0, $X1F04$useHover)({});
40
- let { isFocused: isFocused, isFocusVisible: isFocusVisible, focusProps: focusProps } = (0, $X1F04$useFocusRing)({
41
- within: false
42
- });
43
- let ref = (0, $X1F04$useRef)(null);
44
- let { removeButtonProps: removeButtonProps, gridCellProps: gridCellProps, rowProps: rowProps, allowsRemoving: allowsRemoving } = (0, $X1F04$useTag)({
45
- ...props,
46
- item: item
47
- }, state, ref);
48
- return /*#__PURE__*/ (0, $X1F04$react).createElement("div", {
49
- ...(0, $X1F04$mergeProps)(rowProps, hoverProps, focusProps),
50
- className: (0, $X1F04$classNames)((0, ($parcel$interopDefault($X1F04$tags_vars_cssmodulejs))), 'spectrum-Tag', {
51
- 'focus-ring': isFocusVisible,
52
- 'is-focused': isFocused,
53
- 'is-hovered': isHovered,
54
- 'spectrum-Tag--removable': allowsRemoving
55
- }, styleProps.className),
56
- ref: ref
57
- }, /*#__PURE__*/ (0, $X1F04$react).createElement("div", {
58
- className: (0, $X1F04$classNames)((0, ($parcel$interopDefault($X1F04$tags_vars_cssmodulejs))), 'spectrum-Tag-cell'),
59
- ...gridCellProps
60
- }, /*#__PURE__*/ (0, $X1F04$react).createElement((0, $X1F04$SlotProvider), {
61
- slots: {
62
- icon: {
63
- UNSAFE_className: (0, $X1F04$classNames)((0, ($parcel$interopDefault($X1F04$tags_vars_cssmodulejs))), 'spectrum-Tag-icon'),
64
- size: 'XS'
65
- },
66
- text: {
67
- UNSAFE_className: (0, $X1F04$classNames)((0, ($parcel$interopDefault($X1F04$tags_vars_cssmodulejs))), 'spectrum-Tag-content')
68
- },
69
- avatar: {
70
- UNSAFE_className: (0, $X1F04$classNames)((0, ($parcel$interopDefault($X1F04$tags_vars_cssmodulejs))), 'spectrum-Tag-avatar'),
71
- size: 'avatar-size-50'
72
- }
73
- }
74
- }, typeof item.rendered === 'string' ? /*#__PURE__*/ (0, $X1F04$react).createElement((0, $X1F04$Text), null, item.rendered) : item.rendered, /*#__PURE__*/ (0, $X1F04$react).createElement((0, $X1F04$ClearSlots), null, allowsRemoving && /*#__PURE__*/ (0, $X1F04$react).createElement($b5f5ee35d3b6b95c$var$TagRemoveButton, {
75
- item: item,
76
- ...removeButtonProps,
77
- UNSAFE_className: (0, $X1F04$classNames)((0, ($parcel$interopDefault($X1F04$tags_vars_cssmodulejs))), 'spectrum-Tag-removeButton')
78
- })))));
79
- }
80
- function $b5f5ee35d3b6b95c$var$TagRemoveButton(props) {
81
- let { styleProps: styleProps } = (0, $X1F04$useStyleProps)(props);
82
- return /*#__PURE__*/ (0, $X1F04$react).createElement("span", styleProps, /*#__PURE__*/ (0, $X1F04$react).createElement((0, $X1F04$ClearButton), {
83
- ...props,
84
- inset: true
85
- }));
86
- }
87
-
88
-
89
- export {$b5f5ee35d3b6b95c$export$3288d34c523a1192 as Tag};
90
- //# sourceMappingURL=Tag.module.js.map
@@ -1 +0,0 @@
1
- {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AAiBM,SAAS,0CAAO,KAA0B;IAC/C,MAAM,QACJ,IAAI,SACJ,KAAK,EACL,GAAG,YACJ,GAAG;IAEJ,aAAa;IACb,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE;IACjC,IAAI,cAAC,UAAU,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,eAAO,EAAE,CAAC;IACxC,IAAI,aAAC,SAAS,kBAAE,cAAc,cAAE,UAAU,EAAC,GAAG,CAAA,GAAA,mBAAW,EAAE;QAAC,QAAQ;IAAK;IACzE,IAAI,MAAM,CAAA,GAAA,aAAK,EAAE;IACjB,IAAI,qBAAC,iBAAiB,iBAAE,aAAa,YAAE,QAAQ,kBAAE,cAAc,EAAC,GAAG,CAAA,GAAA,aAAK,EAAE;QACxE,GAAG,KAAK;cACR;IACF,GAAG,OAAO;IAEV,qBACE,gCAAC;QACE,GAAG,CAAA,GAAA,iBAAS,EAAE,UAAU,YAAY,WAAW;QAChD,WAAW,CAAA,GAAA,iBAAS,EAChB,CAAA,GAAA,sDAAK,GACL,gBACF;YACE,cAAc;YACd,cAAc;YACd,cAAc;YACd,2BAA2B;QAC7B,GACE,WAAW,SAAS;QAExB,KAAK;qBACL,gCAAC;QACC,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,sDAAK,GAAG;QAC7B,GAAG,aAAa;qBACjB,gCAAC,CAAA,GAAA,mBAAW;QACV,OAAO;YACL,MAAM;gBAAC,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,sDAAK,GAAG;gBAAsB,MAAM;YAAI;YAC5E,MAAM;gBAAC,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,sDAAK,GAAG;YAAuB;YACnE,QAAQ;gBAAC,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,sDAAK,GAAG;gBAAwB,MAAM;YAAgB;QAC9F;OACC,OAAO,KAAK,QAAQ,KAAK,yBAAW,gCAAC,CAAA,GAAA,WAAG,SAAG,KAAK,QAAQ,IAAW,KAAK,QAAQ,gBACjF,gCAAC,CAAA,GAAA,iBAAS,SACP,gCAAkB,gCAAC;QAAgB,MAAM;QAAO,GAAG,iBAAiB;QAAE,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,sDAAK,GAAG;;AAMxH;AAEA,SAAS,sCAAgB,KAAK;IAC5B,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE;IAEjC,qBACE,gCAAC,QAAS,0BACR,gCAAC,CAAA,GAAA,kBAAU;QAAG,GAAG,KAAK;QAAE,OAAA;;AAG9B","sources":["packages/@react-spectrum/tag/src/Tag.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 {AriaTagProps, useTag} from '@react-aria/tag';\nimport {classNames, ClearSlots, SlotProvider, useStyleProps} from '@react-spectrum/utils';\nimport {ClearButton} from '@react-spectrum/button';\nimport type {ListState} from '@react-stately/list';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {ReactNode, useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/tags/vars.css';\nimport {Text} from '@react-spectrum/text';\nimport {useFocusRing} from '@react-aria/focus';\nimport {useHover} from '@react-aria/interactions';\n\nexport interface SpectrumTagProps<T> extends AriaTagProps<T> {\n state: ListState<T>\n}\n\nexport function Tag<T>(props: SpectrumTagProps<T>): ReactNode {\n const {\n item,\n state,\n ...otherProps\n } = props;\n\n // @ts-ignore\n let {styleProps} = useStyleProps(otherProps);\n let {hoverProps, isHovered} = useHover({});\n let {isFocused, isFocusVisible, focusProps} = useFocusRing({within: false});\n let ref = useRef(null);\n let {removeButtonProps, gridCellProps, rowProps, allowsRemoving} = useTag({\n ...props,\n item\n }, state, ref);\n\n return (\n <div\n {...mergeProps(rowProps, hoverProps, focusProps)}\n className={classNames(\n styles,\n 'spectrum-Tag',\n {\n 'focus-ring': isFocusVisible,\n 'is-focused': isFocused,\n 'is-hovered': isHovered,\n 'spectrum-Tag--removable': allowsRemoving\n },\n styleProps.className\n )}\n ref={ref}>\n <div\n className={classNames(styles, 'spectrum-Tag-cell')}\n {...gridCellProps}>\n <SlotProvider\n slots={{\n icon: {UNSAFE_className: classNames(styles, 'spectrum-Tag-icon'), size: 'XS'},\n text: {UNSAFE_className: classNames(styles, 'spectrum-Tag-content')},\n avatar: {UNSAFE_className: classNames(styles, 'spectrum-Tag-avatar'), size: 'avatar-size-50'}\n }}>\n {typeof item.rendered === 'string' ? <Text>{item.rendered}</Text> : item.rendered}\n <ClearSlots>\n {allowsRemoving && <TagRemoveButton item={item} {...removeButtonProps} UNSAFE_className={classNames(styles, 'spectrum-Tag-removeButton')} />}\n </ClearSlots>\n </SlotProvider>\n </div>\n </div>\n );\n}\n\nfunction TagRemoveButton(props) {\n let {styleProps} = useStyleProps(props);\n\n return (\n <span {...styleProps}>\n <ClearButton {...props} inset />\n </span>\n );\n}\n"],"names":[],"version":3,"file":"Tag.module.js.map"}