@fluentui/react-tag-picker 0.0.0-nightly-20240510-0407.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (254) hide show
  1. package/CHANGELOG.md +189 -0
  2. package/LICENSE +15 -0
  3. package/README.md +68 -0
  4. package/Spec.md +208 -0
  5. package/dist/index.d.ts +453 -0
  6. package/lib/TagPicker.js +1 -0
  7. package/lib/TagPicker.js.map +1 -0
  8. package/lib/TagPickerButton.js +1 -0
  9. package/lib/TagPickerButton.js.map +1 -0
  10. package/lib/TagPickerControl.js +1 -0
  11. package/lib/TagPickerControl.js.map +1 -0
  12. package/lib/TagPickerGroup.js +1 -0
  13. package/lib/TagPickerGroup.js.map +1 -0
  14. package/lib/TagPickerInput.js +1 -0
  15. package/lib/TagPickerInput.js.map +1 -0
  16. package/lib/TagPickerList.js +1 -0
  17. package/lib/TagPickerList.js.map +1 -0
  18. package/lib/TagPickerOption.js +1 -0
  19. package/lib/TagPickerOption.js.map +1 -0
  20. package/lib/TagPickerOptionGroup.js +1 -0
  21. package/lib/TagPickerOptionGroup.js.map +1 -0
  22. package/lib/components/TagPicker/TagPicker.js +13 -0
  23. package/lib/components/TagPicker/TagPicker.js.map +1 -0
  24. package/lib/components/TagPicker/TagPicker.types.js +1 -0
  25. package/lib/components/TagPicker/TagPicker.types.js.map +1 -0
  26. package/lib/components/TagPicker/index.js +4 -0
  27. package/lib/components/TagPicker/index.js.map +1 -0
  28. package/lib/components/TagPicker/renderTagPicker.js +20 -0
  29. package/lib/components/TagPicker/renderTagPicker.js.map +1 -0
  30. package/lib/components/TagPicker/useTagPicker.js +123 -0
  31. package/lib/components/TagPicker/useTagPicker.js.map +1 -0
  32. package/lib/components/TagPicker/useTagPickerContextValues.js +41 -0
  33. package/lib/components/TagPicker/useTagPickerContextValues.js.map +1 -0
  34. package/lib/components/TagPickerButton/TagPickerButton.js +15 -0
  35. package/lib/components/TagPickerButton/TagPickerButton.js.map +1 -0
  36. package/lib/components/TagPickerButton/TagPickerButton.types.js +1 -0
  37. package/lib/components/TagPickerButton/TagPickerButton.types.js.map +1 -0
  38. package/lib/components/TagPickerButton/index.js +5 -0
  39. package/lib/components/TagPickerButton/index.js.map +1 -0
  40. package/lib/components/TagPickerButton/renderTagPickerButton.js +8 -0
  41. package/lib/components/TagPickerButton/renderTagPickerButton.js.map +1 -0
  42. package/lib/components/TagPickerButton/useTagPickerButton.js +54 -0
  43. package/lib/components/TagPickerButton/useTagPickerButton.js.map +1 -0
  44. package/lib/components/TagPickerButton/useTagPickerButtonStyles.styles.js +191 -0
  45. package/lib/components/TagPickerButton/useTagPickerButtonStyles.styles.js.map +1 -0
  46. package/lib/components/TagPickerControl/TagPickerControl.js +15 -0
  47. package/lib/components/TagPickerControl/TagPickerControl.js.map +1 -0
  48. package/lib/components/TagPickerControl/TagPickerControl.types.js +1 -0
  49. package/lib/components/TagPickerControl/TagPickerControl.types.js.map +1 -0
  50. package/lib/components/TagPickerControl/index.js +5 -0
  51. package/lib/components/TagPickerControl/index.js.map +1 -0
  52. package/lib/components/TagPickerControl/renderTagPickerControl.js +18 -0
  53. package/lib/components/TagPickerControl/renderTagPickerControl.js.map +1 -0
  54. package/lib/components/TagPickerControl/useTagPickerControl.js +101 -0
  55. package/lib/components/TagPickerControl/useTagPickerControl.js.map +1 -0
  56. package/lib/components/TagPickerControl/useTagPickerControlStyles.styles.js +262 -0
  57. package/lib/components/TagPickerControl/useTagPickerControlStyles.styles.js.map +1 -0
  58. package/lib/components/TagPickerGroup/TagPickerGroup.js +16 -0
  59. package/lib/components/TagPickerGroup/TagPickerGroup.js.map +1 -0
  60. package/lib/components/TagPickerGroup/TagPickerGroup.types.js +1 -0
  61. package/lib/components/TagPickerGroup/TagPickerGroup.types.js.map +1 -0
  62. package/lib/components/TagPickerGroup/index.js +5 -0
  63. package/lib/components/TagPickerGroup/index.js.map +1 -0
  64. package/lib/components/TagPickerGroup/renderTagPickerGroup.js +7 -0
  65. package/lib/components/TagPickerGroup/renderTagPickerGroup.js.map +1 -0
  66. package/lib/components/TagPickerGroup/useTagPickerGroup.js +62 -0
  67. package/lib/components/TagPickerGroup/useTagPickerGroup.js.map +1 -0
  68. package/lib/components/TagPickerGroup/useTagPickerGroupStyles.styles.js +53 -0
  69. package/lib/components/TagPickerGroup/useTagPickerGroupStyles.styles.js.map +1 -0
  70. package/lib/components/TagPickerInput/TagPickerInput.js +15 -0
  71. package/lib/components/TagPickerInput/TagPickerInput.js.map +1 -0
  72. package/lib/components/TagPickerInput/TagPickerInput.types.js +1 -0
  73. package/lib/components/TagPickerInput/TagPickerInput.types.js.map +1 -0
  74. package/lib/components/TagPickerInput/index.js +5 -0
  75. package/lib/components/TagPickerInput/index.js.map +1 -0
  76. package/lib/components/TagPickerInput/renderTagPickerInput.js +8 -0
  77. package/lib/components/TagPickerInput/renderTagPickerInput.js.map +1 -0
  78. package/lib/components/TagPickerInput/useTagPickerInput.js +137 -0
  79. package/lib/components/TagPickerInput/useTagPickerInput.js.map +1 -0
  80. package/lib/components/TagPickerInput/useTagPickerInputStyles.styles.js +60 -0
  81. package/lib/components/TagPickerInput/useTagPickerInputStyles.styles.js.map +1 -0
  82. package/lib/components/TagPickerList/TagPickerList.js +15 -0
  83. package/lib/components/TagPickerList/TagPickerList.js.map +1 -0
  84. package/lib/components/TagPickerList/TagPickerList.types.js +1 -0
  85. package/lib/components/TagPickerList/TagPickerList.types.js.map +1 -0
  86. package/lib/components/TagPickerList/index.js +5 -0
  87. package/lib/components/TagPickerList/index.js.map +1 -0
  88. package/lib/components/TagPickerList/renderTagPickerList.js +8 -0
  89. package/lib/components/TagPickerList/renderTagPickerList.js.map +1 -0
  90. package/lib/components/TagPickerList/useTagPickerList.js +39 -0
  91. package/lib/components/TagPickerList/useTagPickerList.js.map +1 -0
  92. package/lib/components/TagPickerList/useTagPickerListStyles.styles.js +33 -0
  93. package/lib/components/TagPickerList/useTagPickerListStyles.styles.js.map +1 -0
  94. package/lib/components/TagPickerOption/TagPickerOption.js +15 -0
  95. package/lib/components/TagPickerOption/TagPickerOption.js.map +1 -0
  96. package/lib/components/TagPickerOption/TagPickerOption.types.js +1 -0
  97. package/lib/components/TagPickerOption/TagPickerOption.types.js.map +1 -0
  98. package/lib/components/TagPickerOption/index.js +5 -0
  99. package/lib/components/TagPickerOption/index.js.map +1 -0
  100. package/lib/components/TagPickerOption/renderTagPickerOption.js +14 -0
  101. package/lib/components/TagPickerOption/renderTagPickerOption.js.map +1 -0
  102. package/lib/components/TagPickerOption/useTagPickerOption.js +35 -0
  103. package/lib/components/TagPickerOption/useTagPickerOption.js.map +1 -0
  104. package/lib/components/TagPickerOption/useTagPickerOptionStyles.styles.js +49 -0
  105. package/lib/components/TagPickerOption/useTagPickerOptionStyles.styles.js.map +1 -0
  106. package/lib/components/TagPickerOptionGroup/TagPickerOptionGroup.js +15 -0
  107. package/lib/components/TagPickerOptionGroup/TagPickerOptionGroup.js.map +1 -0
  108. package/lib/components/TagPickerOptionGroup/TagPickerOptionGroup.types.js +1 -0
  109. package/lib/components/TagPickerOptionGroup/TagPickerOptionGroup.types.js.map +1 -0
  110. package/lib/components/TagPickerOptionGroup/index.js +5 -0
  111. package/lib/components/TagPickerOptionGroup/index.js.map +1 -0
  112. package/lib/components/TagPickerOptionGroup/renderTagPickerOptionGroup.js +4 -0
  113. package/lib/components/TagPickerOptionGroup/renderTagPickerOptionGroup.js.map +1 -0
  114. package/lib/components/TagPickerOptionGroup/useTagPickerOptionGroup.js +11 -0
  115. package/lib/components/TagPickerOptionGroup/useTagPickerOptionGroup.js.map +1 -0
  116. package/lib/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.js +18 -0
  117. package/lib/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.js.map +1 -0
  118. package/lib/contexts/TagPickerContext.js +27 -0
  119. package/lib/contexts/TagPickerContext.js.map +1 -0
  120. package/lib/index.js +9 -0
  121. package/lib/index.js.map +1 -0
  122. package/lib/utils/tagPicker2Tag.js +32 -0
  123. package/lib/utils/tagPicker2Tag.js.map +1 -0
  124. package/lib/utils/tokens.js +6 -0
  125. package/lib/utils/tokens.js.map +1 -0
  126. package/lib/utils/useResizeObserverRef.js +22 -0
  127. package/lib/utils/useResizeObserverRef.js.map +1 -0
  128. package/lib/utils/useTagPickerFilter.js +35 -0
  129. package/lib/utils/useTagPickerFilter.js.map +1 -0
  130. package/lib-commonjs/TagPicker.js +6 -0
  131. package/lib-commonjs/TagPicker.js.map +1 -0
  132. package/lib-commonjs/TagPickerButton.js +6 -0
  133. package/lib-commonjs/TagPickerButton.js.map +1 -0
  134. package/lib-commonjs/TagPickerControl.js +6 -0
  135. package/lib-commonjs/TagPickerControl.js.map +1 -0
  136. package/lib-commonjs/TagPickerGroup.js +6 -0
  137. package/lib-commonjs/TagPickerGroup.js.map +1 -0
  138. package/lib-commonjs/TagPickerInput.js +6 -0
  139. package/lib-commonjs/TagPickerInput.js.map +1 -0
  140. package/lib-commonjs/TagPickerList.js +6 -0
  141. package/lib-commonjs/TagPickerList.js.map +1 -0
  142. package/lib-commonjs/TagPickerOption.js +6 -0
  143. package/lib-commonjs/TagPickerOption.js.map +1 -0
  144. package/lib-commonjs/TagPickerOptionGroup.js +6 -0
  145. package/lib-commonjs/TagPickerOptionGroup.js.map +1 -0
  146. package/lib-commonjs/components/TagPicker/TagPicker.js +21 -0
  147. package/lib-commonjs/components/TagPicker/TagPicker.js.map +1 -0
  148. package/lib-commonjs/components/TagPicker/TagPicker.types.js +4 -0
  149. package/lib-commonjs/components/TagPicker/TagPicker.types.js.map +1 -0
  150. package/lib-commonjs/components/TagPicker/index.js +9 -0
  151. package/lib-commonjs/components/TagPicker/index.js.map +1 -0
  152. package/lib-commonjs/components/TagPicker/renderTagPicker.js +29 -0
  153. package/lib-commonjs/components/TagPicker/renderTagPicker.js.map +1 -0
  154. package/lib-commonjs/components/TagPicker/useTagPicker.js +126 -0
  155. package/lib-commonjs/components/TagPicker/useTagPicker.js.map +1 -0
  156. package/lib-commonjs/components/TagPicker/useTagPickerContextValues.js +52 -0
  157. package/lib-commonjs/components/TagPicker/useTagPickerContextValues.js.map +1 -0
  158. package/lib-commonjs/components/TagPickerButton/TagPickerButton.js +23 -0
  159. package/lib-commonjs/components/TagPickerButton/TagPickerButton.js.map +1 -0
  160. package/lib-commonjs/components/TagPickerButton/TagPickerButton.types.js +4 -0
  161. package/lib-commonjs/components/TagPickerButton/TagPickerButton.types.js.map +1 -0
  162. package/lib-commonjs/components/TagPickerButton/index.js +10 -0
  163. package/lib-commonjs/components/TagPickerButton/index.js.map +1 -0
  164. package/lib-commonjs/components/TagPickerButton/renderTagPickerButton.js +16 -0
  165. package/lib-commonjs/components/TagPickerButton/renderTagPickerButton.js.map +1 -0
  166. package/lib-commonjs/components/TagPickerButton/useTagPickerButton.js +57 -0
  167. package/lib-commonjs/components/TagPickerButton/useTagPickerButton.js.map +1 -0
  168. package/lib-commonjs/components/TagPickerButton/useTagPickerButtonStyles.styles.js +453 -0
  169. package/lib-commonjs/components/TagPickerButton/useTagPickerButtonStyles.styles.js.map +1 -0
  170. package/lib-commonjs/components/TagPickerControl/TagPickerControl.js +23 -0
  171. package/lib-commonjs/components/TagPickerControl/TagPickerControl.js.map +1 -0
  172. package/lib-commonjs/components/TagPickerControl/TagPickerControl.types.js +6 -0
  173. package/lib-commonjs/components/TagPickerControl/TagPickerControl.types.js.map +1 -0
  174. package/lib-commonjs/components/TagPickerControl/index.js +10 -0
  175. package/lib-commonjs/components/TagPickerControl/index.js.map +1 -0
  176. package/lib-commonjs/components/TagPickerControl/renderTagPickerControl.js +26 -0
  177. package/lib-commonjs/components/TagPickerControl/renderTagPickerControl.js.map +1 -0
  178. package/lib-commonjs/components/TagPickerControl/useTagPickerControl.js +104 -0
  179. package/lib-commonjs/components/TagPickerControl/useTagPickerControl.js.map +1 -0
  180. package/lib-commonjs/components/TagPickerControl/useTagPickerControlStyles.styles.js +579 -0
  181. package/lib-commonjs/components/TagPickerControl/useTagPickerControlStyles.styles.js.map +1 -0
  182. package/lib-commonjs/components/TagPickerGroup/TagPickerGroup.js +24 -0
  183. package/lib-commonjs/components/TagPickerGroup/TagPickerGroup.js.map +1 -0
  184. package/lib-commonjs/components/TagPickerGroup/TagPickerGroup.types.js +4 -0
  185. package/lib-commonjs/components/TagPickerGroup/TagPickerGroup.types.js.map +1 -0
  186. package/lib-commonjs/components/TagPickerGroup/index.js +10 -0
  187. package/lib-commonjs/components/TagPickerGroup/index.js.map +1 -0
  188. package/lib-commonjs/components/TagPickerGroup/renderTagPickerGroup.js +17 -0
  189. package/lib-commonjs/components/TagPickerGroup/renderTagPickerGroup.js.map +1 -0
  190. package/lib-commonjs/components/TagPickerGroup/useTagPickerGroup.js +65 -0
  191. package/lib-commonjs/components/TagPickerGroup/useTagPickerGroup.js.map +1 -0
  192. package/lib-commonjs/components/TagPickerGroup/useTagPickerGroupStyles.styles.js +97 -0
  193. package/lib-commonjs/components/TagPickerGroup/useTagPickerGroupStyles.styles.js.map +1 -0
  194. package/lib-commonjs/components/TagPickerInput/TagPickerInput.js +23 -0
  195. package/lib-commonjs/components/TagPickerInput/TagPickerInput.js.map +1 -0
  196. package/lib-commonjs/components/TagPickerInput/TagPickerInput.types.js +4 -0
  197. package/lib-commonjs/components/TagPickerInput/TagPickerInput.types.js.map +1 -0
  198. package/lib-commonjs/components/TagPickerInput/index.js +10 -0
  199. package/lib-commonjs/components/TagPickerInput/index.js.map +1 -0
  200. package/lib-commonjs/components/TagPickerInput/renderTagPickerInput.js +16 -0
  201. package/lib-commonjs/components/TagPickerInput/renderTagPickerInput.js.map +1 -0
  202. package/lib-commonjs/components/TagPickerInput/useTagPickerInput.js +140 -0
  203. package/lib-commonjs/components/TagPickerInput/useTagPickerInput.js.map +1 -0
  204. package/lib-commonjs/components/TagPickerInput/useTagPickerInputStyles.styles.js +122 -0
  205. package/lib-commonjs/components/TagPickerInput/useTagPickerInputStyles.styles.js.map +1 -0
  206. package/lib-commonjs/components/TagPickerList/TagPickerList.js +23 -0
  207. package/lib-commonjs/components/TagPickerList/TagPickerList.js.map +1 -0
  208. package/lib-commonjs/components/TagPickerList/TagPickerList.types.js +4 -0
  209. package/lib-commonjs/components/TagPickerList/TagPickerList.types.js.map +1 -0
  210. package/lib-commonjs/components/TagPickerList/index.js +10 -0
  211. package/lib-commonjs/components/TagPickerList/index.js.map +1 -0
  212. package/lib-commonjs/components/TagPickerList/renderTagPickerList.js +16 -0
  213. package/lib-commonjs/components/TagPickerList/renderTagPickerList.js.map +1 -0
  214. package/lib-commonjs/components/TagPickerList/useTagPickerList.js +41 -0
  215. package/lib-commonjs/components/TagPickerList/useTagPickerList.js.map +1 -0
  216. package/lib-commonjs/components/TagPickerList/useTagPickerListStyles.styles.js +66 -0
  217. package/lib-commonjs/components/TagPickerList/useTagPickerListStyles.styles.js.map +1 -0
  218. package/lib-commonjs/components/TagPickerOption/TagPickerOption.js +23 -0
  219. package/lib-commonjs/components/TagPickerOption/TagPickerOption.js.map +1 -0
  220. package/lib-commonjs/components/TagPickerOption/TagPickerOption.types.js +6 -0
  221. package/lib-commonjs/components/TagPickerOption/TagPickerOption.types.js.map +1 -0
  222. package/lib-commonjs/components/TagPickerOption/index.js +10 -0
  223. package/lib-commonjs/components/TagPickerOption/index.js.map +1 -0
  224. package/lib-commonjs/components/TagPickerOption/renderTagPickerOption.js +22 -0
  225. package/lib-commonjs/components/TagPickerOption/renderTagPickerOption.js.map +1 -0
  226. package/lib-commonjs/components/TagPickerOption/useTagPickerOption.js +38 -0
  227. package/lib-commonjs/components/TagPickerOption/useTagPickerOption.js.map +1 -0
  228. package/lib-commonjs/components/TagPickerOption/useTagPickerOptionStyles.styles.js +69 -0
  229. package/lib-commonjs/components/TagPickerOption/useTagPickerOptionStyles.styles.js.map +1 -0
  230. package/lib-commonjs/components/TagPickerOptionGroup/TagPickerOptionGroup.js +23 -0
  231. package/lib-commonjs/components/TagPickerOptionGroup/TagPickerOptionGroup.js.map +1 -0
  232. package/lib-commonjs/components/TagPickerOptionGroup/TagPickerOptionGroup.types.js +4 -0
  233. package/lib-commonjs/components/TagPickerOptionGroup/TagPickerOptionGroup.types.js.map +1 -0
  234. package/lib-commonjs/components/TagPickerOptionGroup/index.js +10 -0
  235. package/lib-commonjs/components/TagPickerOptionGroup/index.js.map +1 -0
  236. package/lib-commonjs/components/TagPickerOptionGroup/renderTagPickerOptionGroup.js +12 -0
  237. package/lib-commonjs/components/TagPickerOptionGroup/renderTagPickerOptionGroup.js.map +1 -0
  238. package/lib-commonjs/components/TagPickerOptionGroup/useTagPickerOptionGroup.js +14 -0
  239. package/lib-commonjs/components/TagPickerOptionGroup/useTagPickerOptionGroup.js.map +1 -0
  240. package/lib-commonjs/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.js +32 -0
  241. package/lib-commonjs/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.js.map +1 -0
  242. package/lib-commonjs/contexts/TagPickerContext.js +47 -0
  243. package/lib-commonjs/contexts/TagPickerContext.js.map +1 -0
  244. package/lib-commonjs/index.js +138 -0
  245. package/lib-commonjs/index.js.map +1 -0
  246. package/lib-commonjs/utils/tagPicker2Tag.js +53 -0
  247. package/lib-commonjs/utils/tagPicker2Tag.js.map +1 -0
  248. package/lib-commonjs/utils/tokens.js +24 -0
  249. package/lib-commonjs/utils/tokens.js.map +1 -0
  250. package/lib-commonjs/utils/useResizeObserverRef.js +33 -0
  251. package/lib-commonjs/utils/useResizeObserverRef.js.map +1 -0
  252. package/lib-commonjs/utils/useTagPickerFilter.js +46 -0
  253. package/lib-commonjs/utils/useTagPickerFilter.js.map +1 -0
  254. package/package.json +75 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,189 @@
1
+ # Change Log - @fluentui/react-tag-picker
2
+
3
+ This log was last generated on Fri, 10 May 2024 04:22:52 GMT and should not be manually modified.
4
+
5
+ <!-- Start content -->
6
+
7
+ ## [0.0.0-nightly-20240510-0407.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-tag-picker_v0.0.0-nightly-20240510-0407.1)
8
+
9
+ Fri, 10 May 2024 04:22:52 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tag-picker_v9.0.0..@fluentui/react-tag-picker_v0.0.0-nightly-20240510-0407.1)
11
+
12
+ ### Changes
13
+
14
+ - Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by fluentui-internal@service.microsoft.com)
15
+ - Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20240510-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/929b85ce9af2225973f9fa16123b087cdd8d0a46) by beachball)
16
+ - Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20240510-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/929b85ce9af2225973f9fa16123b087cdd8d0a46) by beachball)
17
+ - Bump @fluentui/react-theme to v0.0.0-nightly-20240510-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/929b85ce9af2225973f9fa16123b087cdd8d0a46) by beachball)
18
+ - Bump @fluentui/react-utilities to v0.0.0-nightly-20240510-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/929b85ce9af2225973f9fa16123b087cdd8d0a46) by beachball)
19
+ - Bump @fluentui/react-portal to v0.0.0-nightly-20240510-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/929b85ce9af2225973f9fa16123b087cdd8d0a46) by beachball)
20
+ - Bump @fluentui/react-tabster to v0.0.0-nightly-20240510-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/929b85ce9af2225973f9fa16123b087cdd8d0a46) by beachball)
21
+ - Bump @fluentui/react-aria to v0.0.0-nightly-20240510-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/929b85ce9af2225973f9fa16123b087cdd8d0a46) by beachball)
22
+ - Bump @fluentui/react-combobox to v0.0.0-nightly-20240510-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/929b85ce9af2225973f9fa16123b087cdd8d0a46) by beachball)
23
+ - Bump @fluentui/react-tags to v0.0.0-nightly-20240510-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/929b85ce9af2225973f9fa16123b087cdd8d0a46) by beachball)
24
+ - Bump @fluentui/react-context-selector to v0.0.0-nightly-20240510-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/929b85ce9af2225973f9fa16123b087cdd8d0a46) by beachball)
25
+ - Bump @fluentui/react-positioning to v0.0.0-nightly-20240510-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/929b85ce9af2225973f9fa16123b087cdd8d0a46) by beachball)
26
+ - Bump @fluentui/keyboard-keys to v0.0.0-nightly-20240510-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/929b85ce9af2225973f9fa16123b087cdd8d0a46) by beachball)
27
+ - Bump @fluentui/react-field to v0.0.0-nightly-20240510-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/929b85ce9af2225973f9fa16123b087cdd8d0a46) by beachball)
28
+ - Bump @fluentui/react-conformance to v0.0.0-nightly-20240510-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/929b85ce9af2225973f9fa16123b087cdd8d0a46) by beachball)
29
+ - Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20240510-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/929b85ce9af2225973f9fa16123b087cdd8d0a46) by beachball)
30
+
31
+ ## [9.0.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-tag-picker_v9.0.0)
32
+
33
+ Thu, 09 May 2024 19:35:12 GMT
34
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tag-picker-preview_v0.5.0..@fluentui/react-tag-picker_v9.0.0)
35
+
36
+ ### Minor changes
37
+
38
+ - feat: release stable ([PR #31321](https://github.com/microsoft/fluentui/pull/31321) by bernardo.sunderhus@gmail.com)
39
+ - Bump @fluentui/react-portal to v9.4.24 ([PR #31321](https://github.com/microsoft/fluentui/pull/31321) by beachball)
40
+ - Bump @fluentui/react-tabster to v9.21.2 ([PR #31321](https://github.com/microsoft/fluentui/pull/31321) by beachball)
41
+ - Bump @fluentui/react-aria to v9.11.2 ([PR #31321](https://github.com/microsoft/fluentui/pull/31321) by beachball)
42
+ - Bump @fluentui/react-combobox to v9.11.2 ([PR #31321](https://github.com/microsoft/fluentui/pull/31321) by beachball)
43
+ - Bump @fluentui/react-tags to v9.3.4 ([PR #31321](https://github.com/microsoft/fluentui/pull/31321) by beachball)
44
+ - Bump @fluentui/react-positioning to v9.15.0 ([PR #31321](https://github.com/microsoft/fluentui/pull/31321) by beachball)
45
+
46
+ ## [0.5.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-tag-picker-preview_v0.5.0)
47
+
48
+ Mon, 06 May 2024 12:55:01 GMT
49
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tag-picker-preview_v0.4.0..@fluentui/react-tag-picker-preview_v0.5.0)
50
+
51
+ ### Minor changes
52
+
53
+ - chore: removes freeform prop ([PR #31273](https://github.com/microsoft/fluentui/pull/31273) by bernardo.sunderhus@gmail.com)
54
+ - Bump @fluentui/react-jsx-runtime to v9.0.37 ([PR #31271](https://github.com/microsoft/fluentui/pull/31271) by beachball)
55
+ - Bump @fluentui/react-shared-contexts to v9.18.0 ([PR #31271](https://github.com/microsoft/fluentui/pull/31271) by beachball)
56
+ - Bump @fluentui/react-utilities to v9.18.8 ([PR #31271](https://github.com/microsoft/fluentui/pull/31271) by beachball)
57
+ - Bump @fluentui/react-portal to v9.4.23 ([PR #31271](https://github.com/microsoft/fluentui/pull/31271) by beachball)
58
+ - Bump @fluentui/react-tabster to v9.21.1 ([PR #31271](https://github.com/microsoft/fluentui/pull/31271) by beachball)
59
+ - Bump @fluentui/react-aria to v9.11.1 ([PR #31271](https://github.com/microsoft/fluentui/pull/31271) by beachball)
60
+ - Bump @fluentui/react-combobox to v9.11.1 ([PR #31271](https://github.com/microsoft/fluentui/pull/31271) by beachball)
61
+ - Bump @fluentui/react-tags to v9.3.3 ([PR #31271](https://github.com/microsoft/fluentui/pull/31271) by beachball)
62
+ - Bump @fluentui/react-context-selector to v9.1.59 ([PR #31271](https://github.com/microsoft/fluentui/pull/31271) by beachball)
63
+ - Bump @fluentui/react-positioning to v9.14.5 ([PR #31271](https://github.com/microsoft/fluentui/pull/31271) by beachball)
64
+ - Bump @fluentui/react-field to v9.1.64 ([PR #31271](https://github.com/microsoft/fluentui/pull/31271) by beachball)
65
+
66
+ ### Patches
67
+
68
+ - chore: ensure clicking on surface will toggle open state ([PR #31270](https://github.com/microsoft/fluentui/pull/31270) by bernardo.sunderhus@gmail.com)
69
+ - chore: bug bash follow up ([PR #31272](https://github.com/microsoft/fluentui/pull/31272) by bernardo.sunderhus@gmail.com)
70
+
71
+ ## [0.4.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-tag-picker-preview_v0.4.0)
72
+
73
+ Thu, 02 May 2024 11:36:40 GMT
74
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tag-picker-preview_v0.3.2..@fluentui/react-tag-picker-preview_v0.4.0)
75
+
76
+ ### Minor changes
77
+
78
+ - feat: adds useTagPickerFilter hook (similar to useComboboxFilter, but with proper TagPicker related components) ([PR #31207](https://github.com/microsoft/fluentui/pull/31207) by bernardo.sunderhus@gmail.com)
79
+ - feature: exports TagPicker event handlers types ([PR #31232](https://github.com/microsoft/fluentui/pull/31232) by bernardo.sunderhus@gmail.com)
80
+ - Bump @fluentui/react-portal to v9.4.22 ([PR #31231](https://github.com/microsoft/fluentui/pull/31231) by beachball)
81
+ - Bump @fluentui/react-tabster to v9.21.0 ([PR #31231](https://github.com/microsoft/fluentui/pull/31231) by beachball)
82
+ - Bump @fluentui/react-aria to v9.11.0 ([PR #31231](https://github.com/microsoft/fluentui/pull/31231) by beachball)
83
+ - Bump @fluentui/react-combobox to v9.11.0 ([PR #31231](https://github.com/microsoft/fluentui/pull/31231) by beachball)
84
+ - Bump @fluentui/react-tags to v9.3.2 ([PR #31231](https://github.com/microsoft/fluentui/pull/31231) by beachball)
85
+ - Bump @fluentui/react-field to v9.1.63 ([PR #31231](https://github.com/microsoft/fluentui/pull/31231) by beachball)
86
+
87
+ ### Patches
88
+
89
+ - chore: removes aria-checked from TagPickerOption ([PR #31172](https://github.com/microsoft/fluentui/pull/31172) by bernardo.sunderhus@gmail.com)
90
+ - chore: upgrade @fluentui/react-icons to 2.0.237. ([PR #31139](https://github.com/microsoft/fluentui/pull/31139) by ololubek@microsoft.com)
91
+ - chore: removes multiselect from TagPicker signatures ([PR #31173](https://github.com/microsoft/fluentui/pull/31173) by bernardo.sunderhus@gmail.com)
92
+ - chore: make expandIcon aria-hidden by default ([PR #31229](https://github.com/microsoft/fluentui/pull/31229) by bernardo.sunderhus@gmail.com)
93
+ - chore: ensures cursor looks like a text on whole control ([PR #31152](https://github.com/microsoft/fluentui/pull/31152) by bernardo.sunderhus@gmail.com)
94
+
95
+ ## [0.3.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-tag-picker-preview_v0.3.2)
96
+
97
+ Tue, 23 Apr 2024 08:17:49 GMT
98
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tag-picker-preview_v0.3.1..@fluentui/react-tag-picker-preview_v0.3.2)
99
+
100
+ ### Patches
101
+
102
+ - Bump @fluentui/react-jsx-runtime to v9.0.36 ([PR #31113](https://github.com/microsoft/fluentui/pull/31113) by beachball)
103
+ - Bump @fluentui/react-shared-contexts to v9.17.0 ([PR #31113](https://github.com/microsoft/fluentui/pull/31113) by beachball)
104
+ - Bump @fluentui/react-utilities to v9.18.7 ([PR #31113](https://github.com/microsoft/fluentui/pull/31113) by beachball)
105
+ - Bump @fluentui/react-portal to v9.4.21 ([PR #31113](https://github.com/microsoft/fluentui/pull/31113) by beachball)
106
+ - Bump @fluentui/react-tabster to v9.20.1 ([PR #31113](https://github.com/microsoft/fluentui/pull/31113) by beachball)
107
+ - Bump @fluentui/react-aria to v9.10.5 ([PR #31113](https://github.com/microsoft/fluentui/pull/31113) by beachball)
108
+ - Bump @fluentui/react-combobox to v9.10.1 ([PR #31113](https://github.com/microsoft/fluentui/pull/31113) by beachball)
109
+ - Bump @fluentui/react-tags to v9.3.1 ([PR #31113](https://github.com/microsoft/fluentui/pull/31113) by beachball)
110
+ - Bump @fluentui/react-context-selector to v9.1.58 ([PR #31113](https://github.com/microsoft/fluentui/pull/31113) by beachball)
111
+ - Bump @fluentui/react-positioning to v9.14.4 ([PR #31113](https://github.com/microsoft/fluentui/pull/31113) by beachball)
112
+ - Bump @fluentui/react-field to v9.1.62 ([PR #31113](https://github.com/microsoft/fluentui/pull/31113) by beachball)
113
+
114
+ ## [0.3.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-tag-picker-preview_v0.3.1)
115
+
116
+ Thu, 18 Apr 2024 12:43:14 GMT
117
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tag-picker-preview_v0.3.0..@fluentui/react-tag-picker-preview_v0.3.1)
118
+
119
+ ### Patches
120
+
121
+ - chore: ensure navigation between TagPickerGroup and TagPickerInput ([PR #31085](https://github.com/microsoft/fluentui/pull/31085) by bernardo.sunderhus@gmail.com)
122
+
123
+ ## [0.3.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-tag-picker-preview_v0.3.0)
124
+
125
+ Wed, 17 Apr 2024 21:54:00 GMT
126
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tag-picker-preview_v0.2.0..@fluentui/react-tag-picker-preview_v0.3.0)
127
+
128
+ ### Minor changes
129
+
130
+ - feature:adds support for Field component ([PR #30995](https://github.com/microsoft/fluentui/pull/30995) by bernardo.sunderhus@gmail.com)
131
+ - feat: adds inline property ([PR #31003](https://github.com/microsoft/fluentui/pull/31003) by bernardo.sunderhus@gmail.com)
132
+ - feature: adds support for InteractionTag ([PR #30976](https://github.com/microsoft/fluentui/pull/30976) by bernardo.sunderhus@gmail.com)
133
+ - feat: TagPickerInput input positioning ([PR #31036](https://github.com/microsoft/fluentui/pull/31036) by bernardo.sunderhus@gmail.com)
134
+ - Bump @fluentui/react-portal to v9.4.20 ([PR #31100](https://github.com/microsoft/fluentui/pull/31100) by beachball)
135
+ - Bump @fluentui/react-tabster to v9.20.0 ([PR #31100](https://github.com/microsoft/fluentui/pull/31100) by beachball)
136
+ - Bump @fluentui/react-aria to v9.10.4 ([PR #31100](https://github.com/microsoft/fluentui/pull/31100) by beachball)
137
+ - Bump @fluentui/react-combobox to v9.10.0 ([PR #31100](https://github.com/microsoft/fluentui/pull/31100) by beachball)
138
+ - Bump @fluentui/react-tags to v9.3.0 ([PR #31100](https://github.com/microsoft/fluentui/pull/31100) by beachball)
139
+ - Bump @fluentui/react-field to v9.1.61 ([PR #31100](https://github.com/microsoft/fluentui/pull/31100) by beachball)
140
+
141
+ ### Patches
142
+
143
+ - chore: removes disabled property from ComboboxBaseProps ([PR #30963](https://github.com/microsoft/fluentui/pull/30963) by bernardo.sunderhus@gmail.com)
144
+ - bugfix: Space and Enter should close TagPicker when selecting ([PR #31053](https://github.com/microsoft/fluentui/pull/31053) by bernardo.sunderhus@gmail.com)
145
+ - chore: adopt internal hooks provided by @fluentui/react-combobox ([PR #30975](https://github.com/microsoft/fluentui/pull/30975) by bernardo.sunderhus@gmail.com)
146
+ - chore: ensure Click and Enter open/close popover properly ([PR #31010](https://github.com/microsoft/fluentui/pull/31010) by bernardo.sunderhus@gmail.com)
147
+ - chore: Update react-icons to 2.0.235 ([PR #31011](https://github.com/microsoft/fluentui/pull/31011) by ololubek@microsoft.com)
148
+ - chore: removes unused props ([PR #31001](https://github.com/microsoft/fluentui/pull/31001) by bernardo.sunderhus@gmail.com)
149
+
150
+ ## [0.2.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-tag-picker-preview_v0.2.0)
151
+
152
+ Thu, 04 Apr 2024 12:08:08 GMT
153
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tag-picker-preview_v0.1.1..@fluentui/react-tag-picker-preview_v0.2.0)
154
+
155
+ ### Minor changes
156
+
157
+ - feature: adds freeform support for TagPicker ([PR #30947](https://github.com/microsoft/fluentui/pull/30947) by bernardo.sunderhus@gmail.com)
158
+ - Bump @fluentui/react-combobox to v9.9.6 ([PR #30947](https://github.com/microsoft/fluentui/pull/30947) by beachball)
159
+
160
+ ### Patches
161
+
162
+ - feat: adds TagPickerOptionGroup component ([PR #30934](https://github.com/microsoft/fluentui/pull/30934) by bernardo.sunderhus@gmail.com)
163
+
164
+ ## [0.1.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-tag-picker-preview_v0.1.1)
165
+
166
+ Tue, 02 Apr 2024 09:48:01 GMT
167
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tag-picker-preview_v0.1.0..@fluentui/react-tag-picker-preview_v0.1.1)
168
+
169
+ ### Patches
170
+
171
+ - bugfix: removes errouneous combobox imports ([PR #30926](https://github.com/microsoft/fluentui/pull/30926) by bernardo.sunderhus@gmail.com)
172
+ - Bump @fluentui/react-jsx-runtime to v9.0.35 ([PR #30644](https://github.com/microsoft/fluentui/pull/30644) by beachball)
173
+ - Bump @fluentui/react-shared-contexts to v9.16.0 ([PR #30644](https://github.com/microsoft/fluentui/pull/30644) by beachball)
174
+ - Bump @fluentui/react-utilities to v9.18.6 ([PR #30644](https://github.com/microsoft/fluentui/pull/30644) by beachball)
175
+ - Bump @fluentui/react-portal to v9.4.19 ([PR #30644](https://github.com/microsoft/fluentui/pull/30644) by beachball)
176
+ - Bump @fluentui/react-tabster to v9.19.6 ([PR #30644](https://github.com/microsoft/fluentui/pull/30644) by beachball)
177
+ - Bump @fluentui/react-aria to v9.10.3 ([PR #30644](https://github.com/microsoft/fluentui/pull/30644) by beachball)
178
+ - Bump @fluentui/react-combobox to v9.9.5 ([PR #30644](https://github.com/microsoft/fluentui/pull/30644) by beachball)
179
+ - Bump @fluentui/react-tags to v9.2.1 ([PR #30644](https://github.com/microsoft/fluentui/pull/30644) by beachball)
180
+ - Bump @fluentui/react-context-selector to v9.1.57 ([PR #30644](https://github.com/microsoft/fluentui/pull/30644) by beachball)
181
+ - Bump @fluentui/react-positioning to v9.14.3 ([PR #30644](https://github.com/microsoft/fluentui/pull/30644) by beachball)
182
+
183
+ ## [0.1.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-tag-picker-preview_v0.1.0)
184
+
185
+ Thu, 28 Mar 2024 10:43:54 GMT
186
+
187
+ ### Minor changes
188
+
189
+ - feat: release preview package ([PR #30897](https://github.com/microsoft/fluentui/pull/30897) by bernardo.sunderhus@gmail.com)
package/LICENSE ADDED
@@ -0,0 +1,15 @@
1
+ @fluentui/react-tag-picker-preview
2
+
3
+ Copyright (c) Microsoft Corporation
4
+
5
+ All rights reserved.
6
+
7
+ MIT License
8
+
9
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14
+
15
+ Note: Usage of the fonts and icons referenced in Fluent UI React is subject to the terms listed at https://aka.ms/fluentui-assets-license
package/README.md ADDED
@@ -0,0 +1,68 @@
1
+ # @fluentui/react-tag-picker
2
+
3
+ **React TagPicker components for [Fluent UI React](https://react.fluentui.dev)**
4
+
5
+ To import React TagPicker components:
6
+
7
+ ```jsx
8
+ import * as React from 'react';
9
+ import {
10
+ TagPicker,
11
+ TagPickerList,
12
+ TagPickerInput,
13
+ TagPickerControl,
14
+ TagPickerProps,
15
+ TagPickerOption,
16
+ TagPickerGroup,
17
+ } from '@fluentui/react-tag-picker';
18
+ import { Tag, Avatar } from '@fluentui/react-components';
19
+
20
+ const options = [
21
+ 'John Doe',
22
+ 'Jane Doe',
23
+ 'Max Mustermann',
24
+ 'Erika Mustermann',
25
+ 'Pierre Dupont',
26
+ 'Amelie Dupont',
27
+ 'Mario Rossi',
28
+ 'Maria Rossi',
29
+ ];
30
+
31
+ export const Example = () => {
32
+ const [selectedOptions, setSelectedOptions] = React.useState<string[]>([]);
33
+ const onOptionSelect: TagPickerProps['onOptionSelect'] = (e, data) => {
34
+ setSelectedOptions(data.selectedOptions);
35
+ };
36
+
37
+ return (
38
+ <div style={{ maxWidth: 400 }}>
39
+ <TagPicker onOptionSelect={onOptionSelect} selectedOptions={selectedOptions}>
40
+ <TagPickerControl>
41
+ <TagPickerGroup>
42
+ {selectedOptions.map(option => (
43
+ <Tag key={option} shape="rounded" media={<Avatar name={option} color="colorful" />} value={option}>
44
+ {option}
45
+ </Tag>
46
+ ))}
47
+ </TagPickerGroup>
48
+ <TagPickerInput />
49
+ </TagPickerControl>
50
+ <TagPickerList>
51
+ {options
52
+ .filter(option => !selectedOptions.includes(option))
53
+ .map(option => (
54
+ <TagPickerOption
55
+ secondaryContent="Microsoft FTE"
56
+ media={<Avatar name={option} color="colorful" />}
57
+ value={option}
58
+ key={option}
59
+ >
60
+ {option}
61
+ </TagPickerOption>
62
+ ))}
63
+ </TagPickerList>
64
+ </TagPicker>
65
+ </div>
66
+ );
67
+ };
68
+ ```
package/Spec.md ADDED
@@ -0,0 +1,208 @@
1
+ # Dialog
2
+
3
+ ## Background
4
+
5
+ This spec defines the default function of a `TagPicker`, the combination of a `Combobox` with `Tag`s components
6
+
7
+ ## Prior Art
8
+
9
+ - [Github epic](https://github.com/microsoft/fluentui/issues/26652)
10
+ - [Fabric](https://developer.microsoft.com/en-us/fluentui#/controls/web/references/tagpicker)
11
+
12
+ ## API
13
+
14
+ The `TagPicker` should implement a `children` based API. The component will leverage the use of `Context` in the interaction and data flows of child compound components.
15
+
16
+ Sample usages will be give in the following section of this document [Sample code](#sample-code)
17
+
18
+ ### TagPicker
19
+
20
+ The root level component serves as an interface for interaction with all possible behaviors exposed. It provides context down the hierarchy to `children` compound components to allow functionality. This component expects to receive as children either a `popover` or a `trigger` and a `popover` (or some component that will eventually render one of those compound components) in this specific order.
21
+
22
+ ```tsx
23
+ export type TagPickerSlots = {};
24
+
25
+ export type TagPickerProps = ComponentProps<TagPickerSlots> &
26
+ Pick<
27
+ ComboboxProps,
28
+ 'positioning' | 'disabled' | 'defaultOpen' | 'selectedOptions' | 'defaultSelectedOptions' | 'open' | 'freeform'
29
+ > &
30
+ Pick<Partial<TagPickerContextValue>, 'size' | 'appearance'> & {
31
+ onOpenChange?: EventHandler<TagPickerOnOpenChangeData>;
32
+ onOptionSelect?: EventHandler<TagPickerOnOptionSelectData>;
33
+
34
+ /**
35
+ * Can contain two children including a trigger and a popover
36
+ */
37
+ children: [JSX.Element, JSX.Element] | JSX.Element;
38
+ };
39
+ ```
40
+
41
+ ### TagPickerControl
42
+
43
+ A visual component to hold all the tags and the text field to be displayed. The `TagPickerControl` is responsible for ensuring consistent layout, it contains `secondaryAction` and `expandIcon`
44
+
45
+ ```typescript
46
+ export type TagPickerControlSlots = {
47
+ root: Slot<'div'>;
48
+ /**
49
+ * A secondary action should be a button-like element to be rendered right after
50
+ * the trigger responsible for opening/closing the tag picker popover.
51
+ */
52
+ secondaryAction: Slot<'span'>;
53
+ /**
54
+ * An expandIcon could be any non focusable element (preferably an icon)
55
+ * to be rendered by the end of the control, it is used by default to
56
+ * indicate that this component is expandable
57
+ */
58
+ expandIcon: Slot<'span'>;
59
+ };
60
+ export type TagPickerControlProps = ComponentProps<Partial<TagPickerControlSlots>>;
61
+ ```
62
+
63
+ ### TagPickerGroup
64
+
65
+ The `TagPickerGroup` component is a specialization of the [`TagGroup` component](https://react.fluentui.dev/?path=/docs/components-tag-taggroup--default), a `TagGroup` is a container for multiple controls that are [`Tag`](https://react.fluentui.dev/?path=/docs/components-tag-tag--default) or [`InteractionTag`](https://react.fluentui.dev/?path=/docs/components-tag-interactiontag--default). It is almost equivalent to a `TagGroup` component, differing on styles and `onDismiss` handling. The `TagPickerGroup` ensures that in the case there's no more tags to be dismissed the `trigger` should be focused
66
+
67
+ ```tsx
68
+ export type TagPickerGroupSlots = TagGroupSlots;
69
+
70
+ /**
71
+ * TagPickerGroup Props
72
+ */
73
+ export type TagPickerGroupProps = ComponentProps<TagPickerGroupSlots>;
74
+ ```
75
+
76
+ ### TagPickerInput
77
+
78
+ Equivalent to the `input` slot in the `Combobox` component, but alternatively the `TagPicker` implementation has opted for a compound component approach instead of slots.
79
+
80
+ The `TagPickerInput` is a `trigger` and it has 2 functionalities:
81
+
82
+ 1. open/close the `TagPicker` `popover` (`trigger` behavior)
83
+ 2. provide a text field functionality, allowing the user to write texts to select one of the options available on the `TagPicker`
84
+
85
+ ```tsx
86
+ export type TagPickerInputSlots = {
87
+ root: Slot<'input'>;
88
+ };
89
+
90
+ /**
91
+ * TagPickerInput Props
92
+ */
93
+ export type TagPickerInputProps = Omit<
94
+ ComponentProps<Partial<TagPickerInputSlots>>,
95
+ 'children' | 'size' | 'defaultValue'
96
+ > &
97
+ Pick<ComboboxProps, 'clearable' | 'appearance'> & {
98
+ disabled?: boolean;
99
+ value?: string;
100
+ };
101
+ ```
102
+
103
+ ### TagPickerButton
104
+
105
+ The `TagPickerButton` is a `trigger` similar to `TagPickerInput` but it does not provide a text field functionality to allow the user to write texts to select one of the options available on the `TagPicker`, it only provides `trigger` functionality, opening/closing the `popover` once clicked.
106
+
107
+ A `TagPickerButton` should be an empty space on the `TagPickerControl` that ensures that once clicked the `popover` open state is modified accordingly.
108
+
109
+ ```tsx
110
+ export type TagPickerButtonSlots = {
111
+ root: Slot<'button'>;
112
+ };
113
+
114
+ /**
115
+ * PickerButton Props
116
+ */
117
+ export type TagPickerButtonProps = ComponentProps<TagPickerButtonSlots> &
118
+ Pick<DropdownProps, 'size' | 'appearance'> & {
119
+ disabled?: boolean;
120
+ };
121
+ ```
122
+
123
+ ### TagPickerList
124
+
125
+ `TagPickerList` is equivalent to `listbox` slot from `Combobox`, and it represents the list of options that the `TagPicker` provides. This component should be a direct children of `TagPicker` and it'll be rendered inside of a `Portal` (if the `TagPicker` is not inlined).
126
+
127
+ `TagPickerList` job is to ensure proper focus once it's opened/closed, and to properly style as wrapper of `TagPickerOption`s.
128
+
129
+ ```tsx
130
+ export type TagPickerListSlots = {
131
+ root: Slot<typeof Listbox>;
132
+ };
133
+
134
+ export type TagPickerListProps = ComponentProps<TagPickerListSlots>;
135
+ ```
136
+
137
+ ### TagPickerOption
138
+
139
+ Equivalent to `Option` component from `Combobox`, it represents one option that can be picked on the `TagPicker`, main difference between this component and `Option` is on style and slots available. The `TagPickerOption` provides `media` and `secondaryContent` slots.
140
+
141
+ ```tsx
142
+ export type TagPickerOptionSlots = Pick<OptionSlots, 'root'> & {
143
+ media?: Slot<'div'>;
144
+ secondaryContent?: Slot<'span'>;
145
+ };
146
+
147
+ /**
148
+ * TagPickerOption Props
149
+ */
150
+ export type TagPickerOptionProps = ComponentProps<TagPickerOptionSlots> & {
151
+ children: React.ReactNode;
152
+ /**
153
+ * A TagPickerOption should always provide a value to
154
+ * identify itself once selected
155
+ */
156
+ value: string;
157
+ };
158
+ ```
159
+
160
+ ## Migration
161
+
162
+ _TBA: Link to migration guide doc_
163
+
164
+ ## Behaviors
165
+
166
+ `TagPicker` will use **Tabster** to handle the keyboard navigation and ensure focus trapping.
167
+
168
+ The `TagPicker` component relies on `Combobox` to ensure it's navigation behaviors.
169
+
170
+ #### Mouse & touch
171
+
172
+ Mouse and touch behavior of a tag picker
173
+
174
+ 1. Clicking on the trigger (element / button component, either a `TagPickerInput` or a `TagPickerButton`) the `popover` is displayed.
175
+ 2. A user can continue to interact with elements on the page behind the popover.
176
+ 3. Clicking on anything outside of the popover will close it.
177
+ 4. Clicking on an option inside of the popover will select the given option and close the popover, once selected the given selected value will be added to the control as a selected tag.
178
+ 5. If a selected tag is clicked it'll be dismissed and removed from the list of selected tags
179
+
180
+ #### Keyboard
181
+
182
+ Keyboard behavior of tag picker
183
+
184
+ 1. **TabKey** to set focus on Trigger, use **EnterKey** or **KeyDown** to open the popover (if it's a `TagPickerButton` trigger then **Space** key can also be used).
185
+ 2. Focus is always maintained in the Trigger, but active descendant is moved to the first option of the popover once it's opened.
186
+ 3. After the popover is dismissed, keyboard focus should maintain in the Trigger
187
+ 4. **TabKey** Moves focus to `secondaryAction` if available, or for the next focusable element otherwise.
188
+ 5. **Shift+Tab** Moves focus to the last selected tag if any available, or for the previous focusable element otherwise.
189
+ 6. **EscKey** Closes the popover.
190
+ 7. **Enter** Selects an option on the popover and closes it right after.
191
+ 8. **Space** Selects an option on the popover without closing it.
192
+ 9. **KeyDown** navigates active descendant to next option if available.
193
+ 10. **KeyUp** navigates active descendant to previous option if available
194
+
195
+ ## Accessibility
196
+
197
+ > ⚠️ _Note: All other accessibility information, not covered in this section, is provided throughout the spec._
198
+
199
+ The tag picker component follows `Combobox` accessibility provisions.
200
+
201
+ ### Aria roles and states
202
+
203
+ - Trigger
204
+ - [`role="combobox"`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/combobox_role)
205
+ - Popover
206
+ - [`role="menu"`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/menu_role)
207
+ - Option
208
+ - [`role="menuitemcheckbox"`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/menuitemcheckbox_role)