@fluentui/react-tag-picker 9.7.0 → 9.7.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 (135) hide show
  1. package/CHANGELOG.md +20 -2
  2. package/lib/TagPicker.js.map +1 -1
  3. package/lib/TagPickerButton.js.map +1 -1
  4. package/lib/TagPickerControl.js.map +1 -1
  5. package/lib/TagPickerGroup.js.map +1 -1
  6. package/lib/TagPickerInput.js.map +1 -1
  7. package/lib/TagPickerList.js.map +1 -1
  8. package/lib/TagPickerOption.js.map +1 -1
  9. package/lib/TagPickerOptionGroup.js.map +1 -1
  10. package/lib/components/TagPicker/TagPicker.js.map +1 -1
  11. package/lib/components/TagPicker/TagPicker.types.js.map +1 -1
  12. package/lib/components/TagPicker/index.js.map +1 -1
  13. package/lib/components/TagPicker/renderTagPicker.js.map +1 -1
  14. package/lib/components/TagPicker/useTagPicker.js.map +1 -1
  15. package/lib/components/TagPicker/useTagPickerContextValues.js.map +1 -1
  16. package/lib/components/TagPickerButton/TagPickerButton.js.map +1 -1
  17. package/lib/components/TagPickerButton/TagPickerButton.types.js.map +1 -1
  18. package/lib/components/TagPickerButton/index.js.map +1 -1
  19. package/lib/components/TagPickerButton/renderTagPickerButton.js.map +1 -1
  20. package/lib/components/TagPickerButton/useTagPickerButton.js.map +1 -1
  21. package/lib/components/TagPickerButton/useTagPickerButtonStyles.styles.raw.js.map +1 -1
  22. package/lib/components/TagPickerControl/TagPickerControl.js.map +1 -1
  23. package/lib/components/TagPickerControl/TagPickerControl.types.js.map +1 -1
  24. package/lib/components/TagPickerControl/index.js.map +1 -1
  25. package/lib/components/TagPickerControl/renderTagPickerControl.js.map +1 -1
  26. package/lib/components/TagPickerControl/useTagPickerControl.js.map +1 -1
  27. package/lib/components/TagPickerControl/useTagPickerControlStyles.styles.raw.js.map +1 -1
  28. package/lib/components/TagPickerGroup/TagPickerGroup.js.map +1 -1
  29. package/lib/components/TagPickerGroup/TagPickerGroup.types.js.map +1 -1
  30. package/lib/components/TagPickerGroup/index.js.map +1 -1
  31. package/lib/components/TagPickerGroup/renderTagPickerGroup.js.map +1 -1
  32. package/lib/components/TagPickerGroup/useTagPickerGroup.js.map +1 -1
  33. package/lib/components/TagPickerGroup/useTagPickerGroupStyles.styles.raw.js.map +1 -1
  34. package/lib/components/TagPickerInput/TagPickerInput.js.map +1 -1
  35. package/lib/components/TagPickerInput/TagPickerInput.types.js.map +1 -1
  36. package/lib/components/TagPickerInput/index.js.map +1 -1
  37. package/lib/components/TagPickerInput/renderTagPickerInput.js.map +1 -1
  38. package/lib/components/TagPickerInput/useTagPickerInput.js.map +1 -1
  39. package/lib/components/TagPickerInput/useTagPickerInputStyles.styles.raw.js.map +1 -1
  40. package/lib/components/TagPickerList/TagPickerList.js.map +1 -1
  41. package/lib/components/TagPickerList/TagPickerList.types.js.map +1 -1
  42. package/lib/components/TagPickerList/index.js.map +1 -1
  43. package/lib/components/TagPickerList/renderTagPickerList.js.map +1 -1
  44. package/lib/components/TagPickerList/useTagPickerList.js.map +1 -1
  45. package/lib/components/TagPickerList/useTagPickerListStyles.styles.raw.js.map +1 -1
  46. package/lib/components/TagPickerOption/TagPickerOption.js.map +1 -1
  47. package/lib/components/TagPickerOption/TagPickerOption.types.js.map +1 -1
  48. package/lib/components/TagPickerOption/index.js.map +1 -1
  49. package/lib/components/TagPickerOption/renderTagPickerOption.js.map +1 -1
  50. package/lib/components/TagPickerOption/useTagPickerOption.js.map +1 -1
  51. package/lib/components/TagPickerOption/useTagPickerOptionStyles.styles.raw.js.map +1 -1
  52. package/lib/components/TagPickerOptionGroup/TagPickerOptionGroup.js.map +1 -1
  53. package/lib/components/TagPickerOptionGroup/TagPickerOptionGroup.types.js.map +1 -1
  54. package/lib/components/TagPickerOptionGroup/index.js.map +1 -1
  55. package/lib/components/TagPickerOptionGroup/renderTagPickerOptionGroup.js.map +1 -1
  56. package/lib/components/TagPickerOptionGroup/useTagPickerOptionGroup.js.map +1 -1
  57. package/lib/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.raw.js.map +1 -1
  58. package/lib/contexts/TagPickerContext.js.map +1 -1
  59. package/lib/index.js.map +1 -1
  60. package/lib/utils/tagPicker2Tag.js.map +1 -1
  61. package/lib/utils/tokens.js.map +1 -1
  62. package/lib/utils/useExpandLabel.js.map +1 -1
  63. package/lib/utils/useResizeObserverRef.js.map +1 -1
  64. package/lib/utils/useTagPickerFilter.js.map +1 -1
  65. package/lib-commonjs/TagPicker.js.map +1 -1
  66. package/lib-commonjs/TagPickerButton.js.map +1 -1
  67. package/lib-commonjs/TagPickerControl.js.map +1 -1
  68. package/lib-commonjs/TagPickerGroup.js.map +1 -1
  69. package/lib-commonjs/TagPickerInput.js.map +1 -1
  70. package/lib-commonjs/TagPickerList.js.map +1 -1
  71. package/lib-commonjs/TagPickerOption.js.map +1 -1
  72. package/lib-commonjs/TagPickerOptionGroup.js.map +1 -1
  73. package/lib-commonjs/components/TagPicker/TagPicker.js.map +1 -1
  74. package/lib-commonjs/components/TagPicker/TagPicker.types.js.map +1 -1
  75. package/lib-commonjs/components/TagPicker/index.js.map +1 -1
  76. package/lib-commonjs/components/TagPicker/renderTagPicker.js.map +1 -1
  77. package/lib-commonjs/components/TagPicker/useTagPicker.js.map +1 -1
  78. package/lib-commonjs/components/TagPicker/useTagPickerContextValues.js.map +1 -1
  79. package/lib-commonjs/components/TagPickerButton/TagPickerButton.js.map +1 -1
  80. package/lib-commonjs/components/TagPickerButton/TagPickerButton.types.js.map +1 -1
  81. package/lib-commonjs/components/TagPickerButton/index.js.map +1 -1
  82. package/lib-commonjs/components/TagPickerButton/renderTagPickerButton.js.map +1 -1
  83. package/lib-commonjs/components/TagPickerButton/useTagPickerButton.js.map +1 -1
  84. package/lib-commonjs/components/TagPickerButton/useTagPickerButtonStyles.styles.js.map +1 -1
  85. package/lib-commonjs/components/TagPickerButton/useTagPickerButtonStyles.styles.raw.js.map +1 -1
  86. package/lib-commonjs/components/TagPickerControl/TagPickerControl.js.map +1 -1
  87. package/lib-commonjs/components/TagPickerControl/TagPickerControl.types.js.map +1 -1
  88. package/lib-commonjs/components/TagPickerControl/index.js.map +1 -1
  89. package/lib-commonjs/components/TagPickerControl/renderTagPickerControl.js.map +1 -1
  90. package/lib-commonjs/components/TagPickerControl/useTagPickerControl.js.map +1 -1
  91. package/lib-commonjs/components/TagPickerControl/useTagPickerControlStyles.styles.js.map +1 -1
  92. package/lib-commonjs/components/TagPickerControl/useTagPickerControlStyles.styles.raw.js.map +1 -1
  93. package/lib-commonjs/components/TagPickerGroup/TagPickerGroup.js.map +1 -1
  94. package/lib-commonjs/components/TagPickerGroup/TagPickerGroup.types.js.map +1 -1
  95. package/lib-commonjs/components/TagPickerGroup/index.js.map +1 -1
  96. package/lib-commonjs/components/TagPickerGroup/renderTagPickerGroup.js.map +1 -1
  97. package/lib-commonjs/components/TagPickerGroup/useTagPickerGroup.js.map +1 -1
  98. package/lib-commonjs/components/TagPickerGroup/useTagPickerGroupStyles.styles.js.map +1 -1
  99. package/lib-commonjs/components/TagPickerGroup/useTagPickerGroupStyles.styles.raw.js.map +1 -1
  100. package/lib-commonjs/components/TagPickerInput/TagPickerInput.js.map +1 -1
  101. package/lib-commonjs/components/TagPickerInput/TagPickerInput.types.js.map +1 -1
  102. package/lib-commonjs/components/TagPickerInput/index.js.map +1 -1
  103. package/lib-commonjs/components/TagPickerInput/renderTagPickerInput.js.map +1 -1
  104. package/lib-commonjs/components/TagPickerInput/useTagPickerInput.js.map +1 -1
  105. package/lib-commonjs/components/TagPickerInput/useTagPickerInputStyles.styles.js.map +1 -1
  106. package/lib-commonjs/components/TagPickerInput/useTagPickerInputStyles.styles.raw.js.map +1 -1
  107. package/lib-commonjs/components/TagPickerList/TagPickerList.js.map +1 -1
  108. package/lib-commonjs/components/TagPickerList/TagPickerList.types.js.map +1 -1
  109. package/lib-commonjs/components/TagPickerList/index.js.map +1 -1
  110. package/lib-commonjs/components/TagPickerList/renderTagPickerList.js.map +1 -1
  111. package/lib-commonjs/components/TagPickerList/useTagPickerList.js.map +1 -1
  112. package/lib-commonjs/components/TagPickerList/useTagPickerListStyles.styles.js.map +1 -1
  113. package/lib-commonjs/components/TagPickerList/useTagPickerListStyles.styles.raw.js.map +1 -1
  114. package/lib-commonjs/components/TagPickerOption/TagPickerOption.js.map +1 -1
  115. package/lib-commonjs/components/TagPickerOption/TagPickerOption.types.js.map +1 -1
  116. package/lib-commonjs/components/TagPickerOption/index.js.map +1 -1
  117. package/lib-commonjs/components/TagPickerOption/renderTagPickerOption.js.map +1 -1
  118. package/lib-commonjs/components/TagPickerOption/useTagPickerOption.js.map +1 -1
  119. package/lib-commonjs/components/TagPickerOption/useTagPickerOptionStyles.styles.js.map +1 -1
  120. package/lib-commonjs/components/TagPickerOption/useTagPickerOptionStyles.styles.raw.js.map +1 -1
  121. package/lib-commonjs/components/TagPickerOptionGroup/TagPickerOptionGroup.js.map +1 -1
  122. package/lib-commonjs/components/TagPickerOptionGroup/TagPickerOptionGroup.types.js.map +1 -1
  123. package/lib-commonjs/components/TagPickerOptionGroup/index.js.map +1 -1
  124. package/lib-commonjs/components/TagPickerOptionGroup/renderTagPickerOptionGroup.js.map +1 -1
  125. package/lib-commonjs/components/TagPickerOptionGroup/useTagPickerOptionGroup.js.map +1 -1
  126. package/lib-commonjs/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.js.map +1 -1
  127. package/lib-commonjs/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.raw.js.map +1 -1
  128. package/lib-commonjs/contexts/TagPickerContext.js.map +1 -1
  129. package/lib-commonjs/index.js.map +1 -1
  130. package/lib-commonjs/utils/tagPicker2Tag.js.map +1 -1
  131. package/lib-commonjs/utils/tokens.js.map +1 -1
  132. package/lib-commonjs/utils/useExpandLabel.js.map +1 -1
  133. package/lib-commonjs/utils/useResizeObserverRef.js.map +1 -1
  134. package/lib-commonjs/utils/useTagPickerFilter.js.map +1 -1
  135. package/package.json +11 -11
package/CHANGELOG.md CHANGED
@@ -1,12 +1,30 @@
1
1
  # Change Log - @fluentui/react-tag-picker
2
2
 
3
- This log was last generated on Thu, 17 Jul 2025 13:45:49 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 28 Jul 2025 18:44:12 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.7.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-tag-picker_v9.7.1)
8
+
9
+ Mon, 28 Jul 2025 18:44:12 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tag-picker_v9.7.0..@fluentui/react-tag-picker_v9.7.1)
11
+
12
+ ### Patches
13
+
14
+ - Bump @fluentui/react-jsx-runtime to v9.1.3 ([PR #34918](https://github.com/microsoft/fluentui/pull/34918) by beachball)
15
+ - Bump @fluentui/react-utilities to v9.23.0 ([PR #34918](https://github.com/microsoft/fluentui/pull/34918) by beachball)
16
+ - Bump @fluentui/react-portal to v9.7.1 ([PR #34918](https://github.com/microsoft/fluentui/pull/34918) by beachball)
17
+ - Bump @fluentui/react-tabster to v9.26.1 ([PR #34918](https://github.com/microsoft/fluentui/pull/34918) by beachball)
18
+ - Bump @fluentui/react-aria to v9.16.0 ([PR #34918](https://github.com/microsoft/fluentui/pull/34918) by beachball)
19
+ - Bump @fluentui/react-combobox to v9.16.1 ([PR #34918](https://github.com/microsoft/fluentui/pull/34918) by beachball)
20
+ - Bump @fluentui/react-tags to v9.7.1 ([PR #34918](https://github.com/microsoft/fluentui/pull/34918) by beachball)
21
+ - Bump @fluentui/react-context-selector to v9.2.3 ([PR #34918](https://github.com/microsoft/fluentui/pull/34918) by beachball)
22
+ - Bump @fluentui/react-positioning to v9.20.1 ([PR #34918](https://github.com/microsoft/fluentui/pull/34918) by beachball)
23
+ - Bump @fluentui/react-field to v9.4.1 ([PR #34918](https://github.com/microsoft/fluentui/pull/34918) by beachball)
24
+
7
25
  ## [9.7.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-tag-picker_v9.7.0)
8
26
 
9
- Thu, 17 Jul 2025 13:45:49 GMT
27
+ Thu, 17 Jul 2025 13:49:49 GMT
10
28
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tag-picker_v9.6.7..@fluentui/react-tag-picker_v9.7.0)
11
29
 
12
30
  ### Minor changes
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/TagPicker.ts"],"sourcesContent":["export type {\n TagPickerContextValues,\n TagPickerOnOpenChangeData,\n TagPickerOnOptionSelectData,\n TagPickerProps,\n TagPickerSize,\n TagPickerSlots,\n TagPickerState,\n} from './components/TagPicker/index';\nexport { TagPicker, renderTagPicker_unstable, useTagPicker_unstable } from './components/TagPicker/index';\n"],"names":["TagPicker","renderTagPicker_unstable","useTagPicker_unstable"],"rangeMappings":"","mappings":"AASA,SAASA,SAAS,EAAEC,wBAAwB,EAAEC,qBAAqB,QAAQ,+BAA+B"}
1
+ {"version":3,"sources":["../src/TagPicker.ts"],"sourcesContent":["export type {\n TagPickerContextValues,\n TagPickerOnOpenChangeData,\n TagPickerOnOptionSelectData,\n TagPickerProps,\n TagPickerSize,\n TagPickerSlots,\n TagPickerState,\n} from './components/TagPicker/index';\nexport { TagPicker, renderTagPicker_unstable, useTagPicker_unstable } from './components/TagPicker/index';\n"],"names":["TagPicker","renderTagPicker_unstable","useTagPicker_unstable"],"mappings":"AASA,SAASA,SAAS,EAAEC,wBAAwB,EAAEC,qBAAqB,QAAQ,+BAA+B"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/TagPickerButton.ts"],"sourcesContent":["export type {\n TagPickerButtonProps,\n TagPickerButtonSlots,\n TagPickerButtonState,\n} from './components/TagPickerButton/index';\nexport {\n TagPickerButton,\n renderTagPickerButton_unstable,\n tagPickerButtonClassNames,\n useTagPickerButtonStyles_unstable,\n useTagPickerButton_unstable,\n} from './components/TagPickerButton/index';\n"],"names":["TagPickerButton","renderTagPickerButton_unstable","tagPickerButtonClassNames","useTagPickerButtonStyles_unstable","useTagPickerButton_unstable"],"rangeMappings":"","mappings":"AAKA,SACEA,eAAe,EACfC,8BAA8B,EAC9BC,yBAAyB,EACzBC,iCAAiC,EACjCC,2BAA2B,QACtB,qCAAqC"}
1
+ {"version":3,"sources":["../src/TagPickerButton.ts"],"sourcesContent":["export type {\n TagPickerButtonProps,\n TagPickerButtonSlots,\n TagPickerButtonState,\n} from './components/TagPickerButton/index';\nexport {\n TagPickerButton,\n renderTagPickerButton_unstable,\n tagPickerButtonClassNames,\n useTagPickerButtonStyles_unstable,\n useTagPickerButton_unstable,\n} from './components/TagPickerButton/index';\n"],"names":["TagPickerButton","renderTagPickerButton_unstable","tagPickerButtonClassNames","useTagPickerButtonStyles_unstable","useTagPickerButton_unstable"],"mappings":"AAKA,SACEA,eAAe,EACfC,8BAA8B,EAC9BC,yBAAyB,EACzBC,iCAAiC,EACjCC,2BAA2B,QACtB,qCAAqC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/TagPickerControl.ts"],"sourcesContent":["export type {\n TagPickerControlCSSProperties,\n TagPickerControlInternalSlots,\n TagPickerControlProps,\n TagPickerControlSlots,\n TagPickerControlState,\n} from './components/TagPickerControl/index';\nexport {\n TagPickerControl,\n iconSizes,\n renderTagPickerControl_unstable,\n tagPickerControlAsideWidthToken,\n tagPickerControlClassNames,\n useTagPickerControlStyles_unstable,\n useTagPickerControl_unstable,\n} from './components/TagPickerControl/index';\n"],"names":["TagPickerControl","iconSizes","renderTagPickerControl_unstable","tagPickerControlAsideWidthToken","tagPickerControlClassNames","useTagPickerControlStyles_unstable","useTagPickerControl_unstable"],"rangeMappings":"","mappings":"AAOA,SACEA,gBAAgB,EAChBC,SAAS,EACTC,+BAA+B,EAC/BC,+BAA+B,EAC/BC,0BAA0B,EAC1BC,kCAAkC,EAClCC,4BAA4B,QACvB,sCAAsC"}
1
+ {"version":3,"sources":["../src/TagPickerControl.ts"],"sourcesContent":["export type {\n TagPickerControlCSSProperties,\n TagPickerControlInternalSlots,\n TagPickerControlProps,\n TagPickerControlSlots,\n TagPickerControlState,\n} from './components/TagPickerControl/index';\nexport {\n TagPickerControl,\n iconSizes,\n renderTagPickerControl_unstable,\n tagPickerControlAsideWidthToken,\n tagPickerControlClassNames,\n useTagPickerControlStyles_unstable,\n useTagPickerControl_unstable,\n} from './components/TagPickerControl/index';\n"],"names":["TagPickerControl","iconSizes","renderTagPickerControl_unstable","tagPickerControlAsideWidthToken","tagPickerControlClassNames","useTagPickerControlStyles_unstable","useTagPickerControl_unstable"],"mappings":"AAOA,SACEA,gBAAgB,EAChBC,SAAS,EACTC,+BAA+B,EAC/BC,+BAA+B,EAC/BC,0BAA0B,EAC1BC,kCAAkC,EAClCC,4BAA4B,QACvB,sCAAsC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/TagPickerGroup.ts"],"sourcesContent":["export type { TagPickerGroupProps, TagPickerGroupSlots, TagPickerGroupState } from './components/TagPickerGroup/index';\nexport {\n TagPickerGroup,\n renderTagPickerGroup_unstable,\n tagPickerGroupClassNames,\n useTagPickerGroupStyles_unstable,\n useTagPickerGroup_unstable,\n} from './components/TagPickerGroup/index';\n"],"names":["TagPickerGroup","renderTagPickerGroup_unstable","tagPickerGroupClassNames","useTagPickerGroupStyles_unstable","useTagPickerGroup_unstable"],"rangeMappings":"","mappings":"AACA,SACEA,cAAc,EACdC,6BAA6B,EAC7BC,wBAAwB,EACxBC,gCAAgC,EAChCC,0BAA0B,QACrB,oCAAoC"}
1
+ {"version":3,"sources":["../src/TagPickerGroup.ts"],"sourcesContent":["export type { TagPickerGroupProps, TagPickerGroupSlots, TagPickerGroupState } from './components/TagPickerGroup/index';\nexport {\n TagPickerGroup,\n renderTagPickerGroup_unstable,\n tagPickerGroupClassNames,\n useTagPickerGroupStyles_unstable,\n useTagPickerGroup_unstable,\n} from './components/TagPickerGroup/index';\n"],"names":["TagPickerGroup","renderTagPickerGroup_unstable","tagPickerGroupClassNames","useTagPickerGroupStyles_unstable","useTagPickerGroup_unstable"],"mappings":"AACA,SACEA,cAAc,EACdC,6BAA6B,EAC7BC,wBAAwB,EACxBC,gCAAgC,EAChCC,0BAA0B,QACrB,oCAAoC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/TagPickerInput.ts"],"sourcesContent":["export type { TagPickerInputProps, TagPickerInputSlots, TagPickerInputState } from './components/TagPickerInput/index';\nexport {\n TagPickerInput,\n renderTagPickerInput_unstable,\n tagPickerInputClassNames,\n useTagPickerInputStyles_unstable,\n useTagPickerInput_unstable,\n} from './components/TagPickerInput/index';\n"],"names":["TagPickerInput","renderTagPickerInput_unstable","tagPickerInputClassNames","useTagPickerInputStyles_unstable","useTagPickerInput_unstable"],"rangeMappings":"","mappings":"AACA,SACEA,cAAc,EACdC,6BAA6B,EAC7BC,wBAAwB,EACxBC,gCAAgC,EAChCC,0BAA0B,QACrB,oCAAoC"}
1
+ {"version":3,"sources":["../src/TagPickerInput.ts"],"sourcesContent":["export type { TagPickerInputProps, TagPickerInputSlots, TagPickerInputState } from './components/TagPickerInput/index';\nexport {\n TagPickerInput,\n renderTagPickerInput_unstable,\n tagPickerInputClassNames,\n useTagPickerInputStyles_unstable,\n useTagPickerInput_unstable,\n} from './components/TagPickerInput/index';\n"],"names":["TagPickerInput","renderTagPickerInput_unstable","tagPickerInputClassNames","useTagPickerInputStyles_unstable","useTagPickerInput_unstable"],"mappings":"AACA,SACEA,cAAc,EACdC,6BAA6B,EAC7BC,wBAAwB,EACxBC,gCAAgC,EAChCC,0BAA0B,QACrB,oCAAoC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/TagPickerList.ts"],"sourcesContent":["export type { TagPickerListProps, TagPickerListSlots, TagPickerListState } from './components/TagPickerList/index';\nexport {\n TagPickerList,\n renderTagPickerList_unstable,\n tagPickerListClassNames,\n useTagPickerListStyles_unstable,\n useTagPickerList_unstable,\n} from './components/TagPickerList/index';\n"],"names":["TagPickerList","renderTagPickerList_unstable","tagPickerListClassNames","useTagPickerListStyles_unstable","useTagPickerList_unstable"],"rangeMappings":"","mappings":"AACA,SACEA,aAAa,EACbC,4BAA4B,EAC5BC,uBAAuB,EACvBC,+BAA+B,EAC/BC,yBAAyB,QACpB,mCAAmC"}
1
+ {"version":3,"sources":["../src/TagPickerList.ts"],"sourcesContent":["export type { TagPickerListProps, TagPickerListSlots, TagPickerListState } from './components/TagPickerList/index';\nexport {\n TagPickerList,\n renderTagPickerList_unstable,\n tagPickerListClassNames,\n useTagPickerListStyles_unstable,\n useTagPickerList_unstable,\n} from './components/TagPickerList/index';\n"],"names":["TagPickerList","renderTagPickerList_unstable","tagPickerListClassNames","useTagPickerListStyles_unstable","useTagPickerList_unstable"],"mappings":"AACA,SACEA,aAAa,EACbC,4BAA4B,EAC5BC,uBAAuB,EACvBC,+BAA+B,EAC/BC,yBAAyB,QACpB,mCAAmC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/TagPickerOption.ts"],"sourcesContent":["export type {\n TagPickerOptionProps,\n TagPickerOptionSlots,\n TagPickerOptionState,\n} from './components/TagPickerOption/index';\nexport {\n TagPickerOption,\n renderTagPickerOption_unstable,\n tagPickerOptionClassNames,\n useTagPickerOptionStyles_unstable,\n useTagPickerOption_unstable,\n} from './components/TagPickerOption/index';\n"],"names":["TagPickerOption","renderTagPickerOption_unstable","tagPickerOptionClassNames","useTagPickerOptionStyles_unstable","useTagPickerOption_unstable"],"rangeMappings":"","mappings":"AAKA,SACEA,eAAe,EACfC,8BAA8B,EAC9BC,yBAAyB,EACzBC,iCAAiC,EACjCC,2BAA2B,QACtB,qCAAqC"}
1
+ {"version":3,"sources":["../src/TagPickerOption.ts"],"sourcesContent":["export type {\n TagPickerOptionProps,\n TagPickerOptionSlots,\n TagPickerOptionState,\n} from './components/TagPickerOption/index';\nexport {\n TagPickerOption,\n renderTagPickerOption_unstable,\n tagPickerOptionClassNames,\n useTagPickerOptionStyles_unstable,\n useTagPickerOption_unstable,\n} from './components/TagPickerOption/index';\n"],"names":["TagPickerOption","renderTagPickerOption_unstable","tagPickerOptionClassNames","useTagPickerOptionStyles_unstable","useTagPickerOption_unstable"],"mappings":"AAKA,SACEA,eAAe,EACfC,8BAA8B,EAC9BC,yBAAyB,EACzBC,iCAAiC,EACjCC,2BAA2B,QACtB,qCAAqC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/TagPickerOptionGroup.ts"],"sourcesContent":["export type {\n TagPickerOptionGroupProps,\n TagPickerOptionGroupSlots,\n TagPickerOptionGroupState,\n} from './components/TagPickerOptionGroup/index';\nexport {\n TagPickerOptionGroup,\n renderTagPickerOptionGroup,\n tagPickerOptionGroupClassNames,\n useTagPickerOptionGroup,\n useTagPickerOptionGroupStyles,\n} from './components/TagPickerOptionGroup/index';\n"],"names":["TagPickerOptionGroup","renderTagPickerOptionGroup","tagPickerOptionGroupClassNames","useTagPickerOptionGroup","useTagPickerOptionGroupStyles"],"rangeMappings":"","mappings":"AAKA,SACEA,oBAAoB,EACpBC,0BAA0B,EAC1BC,8BAA8B,EAC9BC,uBAAuB,EACvBC,6BAA6B,QACxB,0CAA0C"}
1
+ {"version":3,"sources":["../src/TagPickerOptionGroup.ts"],"sourcesContent":["export type {\n TagPickerOptionGroupProps,\n TagPickerOptionGroupSlots,\n TagPickerOptionGroupState,\n} from './components/TagPickerOptionGroup/index';\nexport {\n TagPickerOptionGroup,\n renderTagPickerOptionGroup,\n tagPickerOptionGroupClassNames,\n useTagPickerOptionGroup,\n useTagPickerOptionGroupStyles,\n} from './components/TagPickerOptionGroup/index';\n"],"names":["TagPickerOptionGroup","renderTagPickerOptionGroup","tagPickerOptionGroupClassNames","useTagPickerOptionGroup","useTagPickerOptionGroupStyles"],"mappings":"AAKA,SACEA,oBAAoB,EACpBC,0BAA0B,EAC1BC,8BAA8B,EAC9BC,uBAAuB,EACvBC,6BAA6B,QACxB,0CAA0C"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPicker/TagPicker.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useTagPicker_unstable } from './useTagPicker';\nimport { renderTagPicker_unstable } from './renderTagPicker';\nimport type { TagPickerProps } from './TagPicker.types';\nimport { useTagPickerContextValues } from './useTagPickerContextValues';\n\n/**\n * TagPicker component -\n * A TagPicker is a composite component that allows users to pick tags from a list of options.\n */\nexport const TagPicker: React.FC<TagPickerProps> = React.memo(props => {\n const state = useTagPicker_unstable(props);\n const contextValues = useTagPickerContextValues(state);\n return renderTagPicker_unstable(state, contextValues);\n});\n\nTagPicker.displayName = 'TagPicker';\n"],"names":["React","useTagPicker_unstable","renderTagPicker_unstable","useTagPickerContextValues","TagPicker","memo","props","state","contextValues","displayName"],"rangeMappings":";;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,QAAQ,iBAAiB;AACvD,SAASC,wBAAwB,QAAQ,oBAAoB;AAE7D,SAASC,yBAAyB,QAAQ,8BAA8B;AAExE;;;CAGC,GACD,OAAO,MAAMC,0BAAsCJ,MAAMK,IAAI,CAACC,CAAAA;IAC5D,MAAMC,QAAQN,sBAAsBK;IACpC,MAAME,gBAAgBL,0BAA0BI;IAChD,OAAOL,yBAAyBK,OAAOC;AACzC,GAAG;AAEHJ,UAAUK,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/components/TagPicker/TagPicker.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useTagPicker_unstable } from './useTagPicker';\nimport { renderTagPicker_unstable } from './renderTagPicker';\nimport type { TagPickerProps } from './TagPicker.types';\nimport { useTagPickerContextValues } from './useTagPickerContextValues';\n\n/**\n * TagPicker component -\n * A TagPicker is a composite component that allows users to pick tags from a list of options.\n */\nexport const TagPicker: React.FC<TagPickerProps> = React.memo(props => {\n const state = useTagPicker_unstable(props);\n const contextValues = useTagPickerContextValues(state);\n return renderTagPicker_unstable(state, contextValues);\n});\n\nTagPicker.displayName = 'TagPicker';\n"],"names":["React","useTagPicker_unstable","renderTagPicker_unstable","useTagPickerContextValues","TagPicker","memo","props","state","contextValues","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,QAAQ,iBAAiB;AACvD,SAASC,wBAAwB,QAAQ,oBAAoB;AAE7D,SAASC,yBAAyB,QAAQ,8BAA8B;AAExE;;;CAGC,GACD,OAAO,MAAMC,0BAAsCJ,MAAMK,IAAI,CAACC,CAAAA;IAC5D,MAAMC,QAAQN,sBAAsBK;IACpC,MAAME,gBAAgBL,0BAA0BI;IAChD,OAAOL,yBAAyBK,OAAOC;AACzC,GAAG;AAEHJ,UAAUK,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPicker/TagPicker.types.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { ComponentProps, ComponentState, EventData, EventHandler } from '@fluentui/react-utilities';\nimport type { ComboboxProps, ComboboxState, ListboxContextValue } from '@fluentui/react-combobox';\nimport type { TagPickerContextValue } from '../../contexts/TagPickerContext';\nimport type { ActiveDescendantContextValue } from '@fluentui/react-aria';\n\nexport type TagPickerSlots = {};\n\nexport type TagPickerSize = 'medium' | 'large' | 'extra-large';\n\n/**\n * Event data for the `onOptionSelect` event.\n *\n * * value - The value of the selected option that triggered the event\n * * selectedOptions - The list of selected options\n */\nexport type TagPickerOnOptionSelectData = {\n value: string;\n selectedOptions: string[];\n} & (EventData<'click', React.MouseEvent<HTMLDivElement>> | EventData<'keydown', React.KeyboardEvent<HTMLDivElement>>);\n\nexport type TagPickerOnOpenChangeData = { open: boolean } & (\n | EventData<'click', React.MouseEvent<HTMLDivElement>>\n | EventData<'keydown', React.KeyboardEvent<HTMLDivElement>>\n);\n\n/**\n * Picker Props\n */\nexport type TagPickerProps = ComponentProps<TagPickerSlots> &\n Pick<\n ComboboxProps,\n 'positioning' | 'disabled' | 'defaultOpen' | 'selectedOptions' | 'defaultSelectedOptions' | 'open'\n > &\n Pick<Partial<TagPickerContextValue>, 'size' | 'appearance'> & {\n /**\n * By default, when a single children is provided, the TagPicker will assume that the children\n * is a popover. By setting this prop to true, the children will be treated as a trigger instead.\n *\n * @default false\n */\n noPopover?: boolean;\n onOpenChange?: EventHandler<TagPickerOnOpenChangeData>;\n onOptionSelect?: EventHandler<TagPickerOnOptionSelectData>;\n\n /**\n * Can contain two children including a trigger and a popover\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n children: [JSX.Element, JSX.Element | undefined | false] | JSX.Element;\n /**\n * TagPickers are rendered out of DOM order on `document.body` by default,\n * use this to render the popover in DOM order\n *\n * @default false\n */\n inline?: boolean;\n };\n\n/**\n * State used in rendering Picker\n */\nexport type TagPickerState = ComponentState<TagPickerSlots> &\n Pick<\n ComboboxState,\n | 'open'\n | 'activeDescendantController'\n | 'mountNode'\n | 'onOptionClick'\n | 'registerOption'\n | 'selectedOptions'\n | 'selectOption'\n | 'value'\n | 'setValue'\n | 'setOpen'\n | 'setHasFocus'\n | 'appearance'\n | 'clearSelection'\n | 'getOptionById'\n | 'getOptionsMatchingValue'\n | 'disabled'\n > &\n Pick<\n TagPickerContextValue,\n | 'triggerRef'\n | 'secondaryActionRef'\n | 'popoverId'\n | 'popoverRef'\n | 'targetRef'\n | 'tagPickerGroupRef'\n | 'size'\n | 'noPopover'\n > & {\n trigger: React.ReactNode;\n popover?: React.ReactNode;\n inline: boolean;\n };\n\nexport type TagPickerContextValues = {\n picker: TagPickerContextValue;\n activeDescendant: ActiveDescendantContextValue;\n listbox: ListboxContextValue;\n};\n"],"names":[],"rangeMappings":"","mappings":"AAkGA,WAIE"}
1
+ {"version":3,"sources":["../src/components/TagPicker/TagPicker.types.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { ComponentProps, ComponentState, EventData, EventHandler } from '@fluentui/react-utilities';\nimport type { ComboboxProps, ComboboxState, ListboxContextValue } from '@fluentui/react-combobox';\nimport type { TagPickerContextValue } from '../../contexts/TagPickerContext';\nimport type { ActiveDescendantContextValue } from '@fluentui/react-aria';\n\nexport type TagPickerSlots = {};\n\nexport type TagPickerSize = 'medium' | 'large' | 'extra-large';\n\n/**\n * Event data for the `onOptionSelect` event.\n *\n * * value - The value of the selected option that triggered the event\n * * selectedOptions - The list of selected options\n */\nexport type TagPickerOnOptionSelectData = {\n value: string;\n selectedOptions: string[];\n} & (EventData<'click', React.MouseEvent<HTMLDivElement>> | EventData<'keydown', React.KeyboardEvent<HTMLDivElement>>);\n\nexport type TagPickerOnOpenChangeData = { open: boolean } & (\n | EventData<'click', React.MouseEvent<HTMLDivElement>>\n | EventData<'keydown', React.KeyboardEvent<HTMLDivElement>>\n);\n\n/**\n * Picker Props\n */\nexport type TagPickerProps = ComponentProps<TagPickerSlots> &\n Pick<\n ComboboxProps,\n 'positioning' | 'disabled' | 'defaultOpen' | 'selectedOptions' | 'defaultSelectedOptions' | 'open'\n > &\n Pick<Partial<TagPickerContextValue>, 'size' | 'appearance'> & {\n /**\n * By default, when a single children is provided, the TagPicker will assume that the children\n * is a popover. By setting this prop to true, the children will be treated as a trigger instead.\n *\n * @default false\n */\n noPopover?: boolean;\n onOpenChange?: EventHandler<TagPickerOnOpenChangeData>;\n onOptionSelect?: EventHandler<TagPickerOnOptionSelectData>;\n\n /**\n * Can contain two children including a trigger and a popover\n */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n children: [JSX.Element, JSX.Element | undefined | false] | JSX.Element;\n /**\n * TagPickers are rendered out of DOM order on `document.body` by default,\n * use this to render the popover in DOM order\n *\n * @default false\n */\n inline?: boolean;\n };\n\n/**\n * State used in rendering Picker\n */\nexport type TagPickerState = ComponentState<TagPickerSlots> &\n Pick<\n ComboboxState,\n | 'open'\n | 'activeDescendantController'\n | 'mountNode'\n | 'onOptionClick'\n | 'registerOption'\n | 'selectedOptions'\n | 'selectOption'\n | 'value'\n | 'setValue'\n | 'setOpen'\n | 'setHasFocus'\n | 'appearance'\n | 'clearSelection'\n | 'getOptionById'\n | 'getOptionsMatchingValue'\n | 'disabled'\n > &\n Pick<\n TagPickerContextValue,\n | 'triggerRef'\n | 'secondaryActionRef'\n | 'popoverId'\n | 'popoverRef'\n | 'targetRef'\n | 'tagPickerGroupRef'\n | 'size'\n | 'noPopover'\n > & {\n trigger: React.ReactNode;\n popover?: React.ReactNode;\n inline: boolean;\n };\n\nexport type TagPickerContextValues = {\n picker: TagPickerContextValue;\n activeDescendant: ActiveDescendantContextValue;\n listbox: ListboxContextValue;\n};\n"],"names":[],"mappings":"AAkGA,WAIE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPicker/index.ts"],"sourcesContent":["export { TagPicker } from './TagPicker';\nexport type {\n TagPickerContextValues,\n TagPickerOnOpenChangeData,\n TagPickerOnOptionSelectData,\n TagPickerProps,\n TagPickerSize,\n TagPickerSlots,\n TagPickerState,\n} from './TagPicker.types';\nexport { renderTagPicker_unstable } from './renderTagPicker';\nexport { useTagPicker_unstable } from './useTagPicker';\n"],"names":["TagPicker","renderTagPicker_unstable","useTagPicker_unstable"],"rangeMappings":";;","mappings":"AAAA,SAASA,SAAS,QAAQ,cAAc;AAUxC,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,qBAAqB,QAAQ,iBAAiB"}
1
+ {"version":3,"sources":["../src/components/TagPicker/index.ts"],"sourcesContent":["export { TagPicker } from './TagPicker';\nexport type {\n TagPickerContextValues,\n TagPickerOnOpenChangeData,\n TagPickerOnOptionSelectData,\n TagPickerProps,\n TagPickerSize,\n TagPickerSlots,\n TagPickerState,\n} from './TagPicker.types';\nexport { renderTagPicker_unstable } from './renderTagPicker';\nexport { useTagPicker_unstable } from './useTagPicker';\n"],"names":["TagPicker","renderTagPicker_unstable","useTagPicker_unstable"],"mappings":"AAAA,SAASA,SAAS,QAAQ,cAAc;AAUxC,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,qBAAqB,QAAQ,iBAAiB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPicker/renderTagPicker.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { TagPickerState, TagPickerContextValues, TagPickerSlots } from './TagPicker.types';\nimport { ActiveDescendantContextProvider } from '@fluentui/react-aria';\nimport { ListboxProvider } from '@fluentui/react-combobox';\nimport { Portal } from '@fluentui/react-portal';\nimport { TagPickerContextProvider } from '../../contexts/TagPickerContext';\nimport { assertSlots } from '@fluentui/react-utilities';\n\n/**\n * Render the final JSX of Picker\n */\n\nexport const renderTagPicker_unstable = (\n state: TagPickerState,\n contexts: TagPickerContextValues,\n): // eslint-disable-next-line @typescript-eslint/no-deprecated\nJSX.Element => {\n assertSlots<TagPickerSlots>(state);\n return (\n <TagPickerContextProvider value={contexts.picker}>\n <ActiveDescendantContextProvider value={contexts.activeDescendant}>\n <ListboxProvider value={contexts.listbox}>\n {state.trigger}\n {state.inline ? state.popover : <Portal mountNode={state.mountNode}>{state.popover}</Portal>}\n </ListboxProvider>\n </ActiveDescendantContextProvider>\n </TagPickerContextProvider>\n );\n};\n"],"names":["React","ActiveDescendantContextProvider","ListboxProvider","Portal","TagPickerContextProvider","assertSlots","renderTagPicker_unstable","state","contexts","value","picker","activeDescendant","listbox","trigger","inline","popover","mountNode"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,+BAA+B,QAAQ,uBAAuB;AACvE,SAASC,eAAe,QAAQ,2BAA2B;AAC3D,SAASC,MAAM,QAAQ,yBAAyB;AAChD,SAASC,wBAAwB,QAAQ,kCAAkC;AAC3E,SAASC,WAAW,QAAQ,4BAA4B;AAExD;;CAEC,GAED,OAAO,MAAMC,2BAA2B,CACtCC,OACAC;IAGAH,YAA4BE;IAC5B,qBACE,oBAACH;QAAyBK,OAAOD,SAASE,MAAM;qBAC9C,oBAACT;QAAgCQ,OAAOD,SAASG,gBAAgB;qBAC/D,oBAACT;QAAgBO,OAAOD,SAASI,OAAO;OACrCL,MAAMM,OAAO,EACbN,MAAMO,MAAM,GAAGP,MAAMQ,OAAO,iBAAG,oBAACZ;QAAOa,WAAWT,MAAMS,SAAS;OAAGT,MAAMQ,OAAO;AAK5F,EAAE"}
1
+ {"version":3,"sources":["../src/components/TagPicker/renderTagPicker.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { TagPickerState, TagPickerContextValues, TagPickerSlots } from './TagPicker.types';\nimport { ActiveDescendantContextProvider } from '@fluentui/react-aria';\nimport { ListboxProvider } from '@fluentui/react-combobox';\nimport { Portal } from '@fluentui/react-portal';\nimport { TagPickerContextProvider } from '../../contexts/TagPickerContext';\nimport { assertSlots } from '@fluentui/react-utilities';\n\n/**\n * Render the final JSX of Picker\n */\n\nexport const renderTagPicker_unstable = (\n state: TagPickerState,\n contexts: TagPickerContextValues,\n): // eslint-disable-next-line @typescript-eslint/no-deprecated\nJSX.Element => {\n assertSlots<TagPickerSlots>(state);\n return (\n <TagPickerContextProvider value={contexts.picker}>\n <ActiveDescendantContextProvider value={contexts.activeDescendant}>\n <ListboxProvider value={contexts.listbox}>\n {state.trigger}\n {state.inline ? state.popover : <Portal mountNode={state.mountNode}>{state.popover}</Portal>}\n </ListboxProvider>\n </ActiveDescendantContextProvider>\n </TagPickerContextProvider>\n );\n};\n"],"names":["React","ActiveDescendantContextProvider","ListboxProvider","Portal","TagPickerContextProvider","assertSlots","renderTagPicker_unstable","state","contexts","value","picker","activeDescendant","listbox","trigger","inline","popover","mountNode"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,+BAA+B,QAAQ,uBAAuB;AACvE,SAASC,eAAe,QAAQ,2BAA2B;AAC3D,SAASC,MAAM,QAAQ,yBAAyB;AAChD,SAASC,wBAAwB,QAAQ,kCAAkC;AAC3E,SAASC,WAAW,QAAQ,4BAA4B;AAExD;;CAEC,GAED,OAAO,MAAMC,2BAA2B,CACtCC,OACAC;IAGAH,YAA4BE;IAC5B,qBACE,oBAACH;QAAyBK,OAAOD,SAASE,MAAM;qBAC9C,oBAACT;QAAgCQ,OAAOD,SAASG,gBAAgB;qBAC/D,oBAACT;QAAgBO,OAAOD,SAASI,OAAO;OACrCL,MAAMM,OAAO,EACbN,MAAMO,MAAM,GAAGP,MAAMQ,OAAO,iBAAG,oBAACZ;QAAOa,WAAWT,MAAMS,SAAS;OAAGT,MAAMQ,OAAO;AAK5F,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPicker/useTagPicker.ts"],"sourcesContent":["import * as React from 'react';\nimport { elementContains, useEventCallback, useId, useMergedRefs } from '@fluentui/react-utilities';\nimport type {\n TagPickerOnOpenChangeData,\n TagPickerOnOptionSelectData,\n TagPickerProps,\n TagPickerState,\n} from './TagPicker.types';\nimport { optionClassNames } from '@fluentui/react-combobox';\nimport { PositioningShorthandValue, resolvePositioningShorthand, usePositioning } from '@fluentui/react-positioning';\nimport { useActiveDescendant } from '@fluentui/react-aria';\nimport { useComboboxBaseState } from '@fluentui/react-combobox';\n\n// Set a default set of fallback positions to try if the dropdown does not fit on screen\nconst fallbackPositions: PositioningShorthandValue[] = ['above', 'after', 'after-top', 'before', 'before-top'];\n\n/**\n * Create the state required to render Picker.\n *\n * The returned state can be modified with hooks such as usePickerStyles_unstable,\n * before being passed to renderPicker_unstable.\n *\n * @param props - props from this instance of Picker\n */\nexport const useTagPicker_unstable = (props: TagPickerProps): TagPickerState => {\n const popoverId = useId('picker-listbox');\n const triggerInnerRef = React.useRef<HTMLInputElement | HTMLButtonElement>(null);\n const secondaryActionRef = React.useRef<HTMLSpanElement>(null);\n const tagPickerGroupRef = React.useRef<HTMLDivElement>(null);\n const { positioning, size = 'medium', inline = false, noPopover = false } = props;\n\n const { targetRef, containerRef } = usePositioning({\n position: 'below' as const,\n align: 'start' as const,\n offset: { crossAxis: 0, mainAxis: 2 },\n fallbackPositions,\n matchTargetSize: 'width' as const,\n ...resolvePositioningShorthand(positioning),\n });\n\n const {\n controller: activeDescendantController,\n activeParentRef,\n listboxRef,\n } = useActiveDescendant<HTMLInputElement, HTMLDivElement>({\n matchOption: el => el.classList.contains(optionClassNames.root),\n });\n\n const comboboxState = useComboboxBaseState({\n ...props,\n onOptionSelect: useEventCallback((event, data) =>\n props.onOptionSelect?.(event, {\n selectedOptions: data.selectedOptions,\n value: data.optionValue,\n type: event.type,\n event,\n } as TagPickerOnOptionSelectData),\n ),\n onOpenChange: useEventCallback((event, data) =>\n props.onOpenChange?.(event, {\n ...data,\n type: event.type,\n event,\n } as TagPickerOnOpenChangeData),\n ),\n activeDescendantController,\n editable: true,\n multiselect: true,\n size: 'medium',\n });\n\n const { trigger, popover } = childrenToTriggerAndPopover(props.children, noPopover);\n return {\n activeDescendantController,\n components: {},\n trigger,\n popover: comboboxState.open || comboboxState.hasFocus ? popover : undefined,\n popoverId,\n noPopover,\n disabled: comboboxState.disabled,\n triggerRef: useMergedRefs(triggerInnerRef, activeParentRef),\n popoverRef: useMergedRefs(listboxRef, containerRef),\n secondaryActionRef,\n tagPickerGroupRef,\n targetRef,\n size,\n inline,\n open: comboboxState.open,\n mountNode: comboboxState.mountNode,\n onOptionClick: useEventCallback(event => {\n comboboxState.onOptionClick(event);\n comboboxState.setOpen(event, false);\n }),\n appearance: comboboxState.appearance,\n clearSelection: comboboxState.clearSelection,\n getOptionById: comboboxState.getOptionById,\n getOptionsMatchingValue: comboboxState.getOptionsMatchingValue,\n registerOption: comboboxState.registerOption,\n selectedOptions: comboboxState.selectedOptions,\n selectOption: useEventCallback((event, data) => {\n // if the option is already selected, invoke onOptionSelect callback with current selected values\n // the combobox state would unselect the option, which is not the behavior expected\n if (\n comboboxState.selectedOptions.includes(data.value) &&\n !elementContains(tagPickerGroupRef.current, event.target as Node)\n ) {\n props.onOptionSelect?.(event, {\n selectedOptions: comboboxState.selectedOptions,\n value: data.value,\n type: event.type,\n event,\n } as TagPickerOnOptionSelectData);\n return;\n }\n comboboxState.selectOption(event, data);\n }),\n setHasFocus: comboboxState.setHasFocus,\n setOpen: comboboxState.setOpen,\n setValue: comboboxState.setValue,\n value: comboboxState.value,\n };\n};\n\nconst childrenToTriggerAndPopover = (children: React.ReactNode, noPopover: boolean) => {\n const childrenArray = React.Children.toArray(children) as React.ReactElement[];\n\n if (process.env.NODE_ENV !== 'production') {\n if (childrenArray.length === 0) {\n // eslint-disable-next-line no-console\n console.warn('TagPicker must contain at least one child');\n }\n\n if (childrenArray.length > 2) {\n // eslint-disable-next-line no-console\n console.warn('TagPicker must contain at most two children');\n }\n }\n\n if (noPopover) {\n return { trigger: childrenArray[0] };\n }\n\n let trigger: React.ReactElement | undefined = undefined;\n let popover: React.ReactElement | undefined = undefined;\n\n if (childrenArray.length === 2) {\n trigger = childrenArray[0];\n popover = childrenArray[1];\n } else if (childrenArray.length === 1) {\n popover = childrenArray[0];\n }\n\n return { trigger, popover };\n};\n"],"names":["React","elementContains","useEventCallback","useId","useMergedRefs","optionClassNames","resolvePositioningShorthand","usePositioning","useActiveDescendant","useComboboxBaseState","fallbackPositions","useTagPicker_unstable","props","popoverId","triggerInnerRef","useRef","secondaryActionRef","tagPickerGroupRef","positioning","size","inline","noPopover","targetRef","containerRef","position","align","offset","crossAxis","mainAxis","matchTargetSize","controller","activeDescendantController","activeParentRef","listboxRef","matchOption","el","classList","contains","root","comboboxState","onOptionSelect","event","data","selectedOptions","value","optionValue","type","onOpenChange","editable","multiselect","trigger","popover","childrenToTriggerAndPopover","children","components","open","hasFocus","undefined","disabled","triggerRef","popoverRef","mountNode","onOptionClick","setOpen","appearance","clearSelection","getOptionById","getOptionsMatchingValue","registerOption","selectOption","includes","current","target","setHasFocus","setValue","childrenArray","Children","toArray","process","env","NODE_ENV","length","console","warn"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,eAAe,EAAEC,gBAAgB,EAAEC,KAAK,EAAEC,aAAa,QAAQ,4BAA4B;AAOpG,SAASC,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jBE,MAAML,MAAMK,IAAI;oBAChBL;gBACF;gBACA;YACF;YACAF,cAAc8B,YAAY,CAAC5B,OAAOC;QACpC;QACA+B,aAAalC,cAAckC,WAAW;QACtCV,SAASxB,cAAcwB,OAAO;QAC9BW,UAAUnC,cAAcmC,QAAQ;QAChC9B,OAAOL,cAAcK,KAAK;IAC5B;AACF,EAAE;AAEF,MAAMQ,8BAA8B,CAACC,UAA2BhC;IAC9D,MAAMsD,gBAAgB3E,MAAM4E,QAAQ,CAACC,OAAO,CAACxB;IAE7C,IAAIyB,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACzC,IAAIL,cAAcM,MAAM,KAAK,GAAG;YAC9B,sCAAsC;YACtCC,QAAQC,IAAI,CAAC;QACf;QAEA,IAAIR,cAAcM,MAAM,GAAG,GAAG;YAC5B,sCAAsC;YACtCC,QAAQC,IAAI,CAAC;QACf;IACF;IAEA,IAAI9D,WAAW;QACb,OAAO;YAAE6B,SAASyB,aAAa,CAAC,EAAE;QAAC;IACrC;IAEA,IAAIzB,UAA0CO;IAC9C,IAAIN,UAA0CM;IAE9C,IAAIkB,cAAcM,MAAM,KAAK,GAAG;QAC9B/B,UAAUyB,aAAa,CAAC,EAAE;QAC1BxB,UAAUwB,aAAa,CAAC,EAAE;IAC5B,OAAO,IAAIA,cAAcM,MAAM,KAAK,GAAG;QACrC9B,UAAUwB,aAAa,CAAC,EAAE;IAC5B;IAEA,OAAO;QAAEzB;QAASC;IAAQ;AAC5B"}
1
+ {"version":3,"sources":["../src/components/TagPicker/useTagPicker.ts"],"sourcesContent":["import * as React from 'react';\nimport { elementContains, useEventCallback, useId, useMergedRefs } from '@fluentui/react-utilities';\nimport type {\n TagPickerOnOpenChangeData,\n TagPickerOnOptionSelectData,\n TagPickerProps,\n TagPickerState,\n} from './TagPicker.types';\nimport { optionClassNames } from '@fluentui/react-combobox';\nimport { PositioningShorthandValue, resolvePositioningShorthand, usePositioning } from '@fluentui/react-positioning';\nimport { useActiveDescendant } from '@fluentui/react-aria';\nimport { useComboboxBaseState } from '@fluentui/react-combobox';\n\n// Set a default set of fallback positions to try if the dropdown does not fit on screen\nconst fallbackPositions: PositioningShorthandValue[] = ['above', 'after', 'after-top', 'before', 'before-top'];\n\n/**\n * Create the state required to render Picker.\n *\n * The returned state can be modified with hooks such as usePickerStyles_unstable,\n * before being passed to renderPicker_unstable.\n *\n * @param props - props from this instance of Picker\n */\nexport const useTagPicker_unstable = (props: TagPickerProps): TagPickerState => {\n const popoverId = useId('picker-listbox');\n const triggerInnerRef = React.useRef<HTMLInputElement | HTMLButtonElement>(null);\n const secondaryActionRef = React.useRef<HTMLSpanElement>(null);\n const tagPickerGroupRef = React.useRef<HTMLDivElement>(null);\n const { positioning, size = 'medium', inline = false, noPopover = false } = props;\n\n const { targetRef, containerRef } = usePositioning({\n position: 'below' as const,\n align: 'start' as const,\n offset: { crossAxis: 0, mainAxis: 2 },\n fallbackPositions,\n matchTargetSize: 'width' as const,\n ...resolvePositioningShorthand(positioning),\n });\n\n const {\n controller: activeDescendantController,\n activeParentRef,\n listboxRef,\n } = useActiveDescendant<HTMLInputElement, HTMLDivElement>({\n matchOption: el => el.classList.contains(optionClassNames.root),\n });\n\n const comboboxState = useComboboxBaseState({\n ...props,\n onOptionSelect: useEventCallback((event, data) =>\n props.onOptionSelect?.(event, {\n selectedOptions: data.selectedOptions,\n value: data.optionValue,\n type: event.type,\n event,\n } as TagPickerOnOptionSelectData),\n ),\n onOpenChange: useEventCallback((event, data) =>\n props.onOpenChange?.(event, {\n ...data,\n type: event.type,\n event,\n } as TagPickerOnOpenChangeData),\n ),\n activeDescendantController,\n editable: true,\n multiselect: true,\n size: 'medium',\n });\n\n const { trigger, popover } = childrenToTriggerAndPopover(props.children, noPopover);\n return {\n activeDescendantController,\n components: {},\n trigger,\n popover: comboboxState.open || comboboxState.hasFocus ? popover : undefined,\n popoverId,\n noPopover,\n disabled: comboboxState.disabled,\n triggerRef: useMergedRefs(triggerInnerRef, activeParentRef),\n popoverRef: useMergedRefs(listboxRef, containerRef),\n secondaryActionRef,\n tagPickerGroupRef,\n targetRef,\n size,\n inline,\n open: comboboxState.open,\n mountNode: comboboxState.mountNode,\n onOptionClick: useEventCallback(event => {\n comboboxState.onOptionClick(event);\n comboboxState.setOpen(event, false);\n }),\n appearance: comboboxState.appearance,\n clearSelection: comboboxState.clearSelection,\n getOptionById: comboboxState.getOptionById,\n getOptionsMatchingValue: comboboxState.getOptionsMatchingValue,\n registerOption: comboboxState.registerOption,\n selectedOptions: comboboxState.selectedOptions,\n selectOption: useEventCallback((event, data) => {\n // if the option is already selected, invoke onOptionSelect callback with current selected values\n // the combobox state would unselect the option, which is not the behavior expected\n if (\n comboboxState.selectedOptions.includes(data.value) &&\n !elementContains(tagPickerGroupRef.current, event.target as Node)\n ) {\n props.onOptionSelect?.(event, {\n selectedOptions: comboboxState.selectedOptions,\n value: data.value,\n type: event.type,\n event,\n } as TagPickerOnOptionSelectData);\n return;\n }\n comboboxState.selectOption(event, data);\n }),\n setHasFocus: comboboxState.setHasFocus,\n setOpen: comboboxState.setOpen,\n setValue: comboboxState.setValue,\n value: comboboxState.value,\n };\n};\n\nconst childrenToTriggerAndPopover = (children: React.ReactNode, noPopover: boolean) => {\n const childrenArray = React.Children.toArray(children) as React.ReactElement[];\n\n if (process.env.NODE_ENV !== 'production') {\n if (childrenArray.length === 0) {\n // eslint-disable-next-line no-console\n console.warn('TagPicker must contain at least one child');\n }\n\n if (childrenArray.length > 2) {\n // eslint-disable-next-line no-console\n console.warn('TagPicker must contain at most two children');\n }\n }\n\n if (noPopover) {\n return { trigger: childrenArray[0] };\n }\n\n let trigger: React.ReactElement | undefined = undefined;\n let popover: React.ReactElement | undefined = undefined;\n\n if (childrenArray.length === 2) {\n trigger = childrenArray[0];\n popover = childrenArray[1];\n } else if (childrenArray.length === 1) {\n popover = childrenArray[0];\n }\n\n return { trigger, popover };\n};\n"],"names":["React","elementContains","useEventCallback","useId","useMergedRefs","optionClassNames","resolvePositioningShorthand","usePositioning","useActiveDescendant","useComboboxBaseState","fallbackPositions","useTagPicker_unstable","props","popoverId","triggerInnerRef","useRef","secondaryActionRef","tagPickerGroupRef","positioning","size","inline","noPopover","targetRef","containerRef","position","align","offset","crossAxis","mainAxis","matchTargetSize","controller","activeDescendantController","activeParentRef","listboxRef","matchOption","el","classList","contains","root","comboboxState","onOptionSelect","event","data","selectedOptions","value","optionValue","type","onOpenChange","editable","multiselect","trigger","popover","childrenToTriggerAndPopover","children","components","open","hasFocus","undefined","disabled","triggerRef","popoverRef","mountNode","onOptionClick","setOpen","appearance","clearSelection","getOptionById","getOptionsMatchingValue","registerOption","selectOption","includes","current","target","setHasFocus","setValue","childrenArray","Children","toArray","process","env","NODE_ENV","length","console","warn"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,eAAe,EAAEC,gBAAgB,EAAEC,KAAK,EAAEC,aAAa,QAAQ,4BAA4B;AAOpG,SAASC,gBAAgB,QAAQ,2BAA2B;AAC5D,SAAoCC,2BAA2B,EAAEC,cAAc,QAAQ,8BAA8B;AACrH,SAASC,mBAAmB,QAAQ,uBAAuB;AAC3D,SAASC,oBAAoB,QAAQ,2BAA2B;AAEhE,wFAAwF;AACxF,MAAMC,oBAAiD;IAAC;IAAS;IAAS;IAAa;IAAU;CAAa;AAE9G;;;;;;;CAOC,GACD,OAAO,MAAMC,wBAAwB,CAACC;IACpC,MAAMC,YAAYV,MAAM;IACxB,MAAMW,kBAAkBd,MAAMe,MAAM,CAAuC;IAC3E,MAAMC,qBAAqBhB,MAAMe,MAAM,CAAkB;IACzD,MAAME,oBAAoBjB,MAAMe,MAAM,CAAiB;IACvD,MAAM,EAAEG,WAAW,EAAEC,OAAO,QAAQ,EAAEC,SAAS,KAAK,EAAEC,YAAY,KAAK,EAAE,GAAGT;IAE5E,MAAM,EAAEU,SAAS,EAAEC,YAAY,EAAE,GAAGhB,eAAe;QACjDiB,UAAU;QACVC,OAAO;QACPC,QAAQ;YAAE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A,IAAIzB,UAA0CO;IAC9C,IAAIN,UAA0CM;IAE9C,IAAIkB,cAAcM,MAAM,KAAK,GAAG;QAC9B/B,UAAUyB,aAAa,CAAC,EAAE;QAC1BxB,UAAUwB,aAAa,CAAC,EAAE;IAC5B,OAAO,IAAIA,cAAcM,MAAM,KAAK,GAAG;QACrC9B,UAAUwB,aAAa,CAAC,EAAE;IAC5B;IAEA,OAAO;QAAEzB;QAASC;IAAQ;AAC5B"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPicker/useTagPickerContextValues.ts"],"sourcesContent":["import * as React from 'react';\nimport { TagPickerContextValues, TagPickerState } from './TagPicker.types';\n\nexport function useTagPickerContextValues(state: TagPickerState): TagPickerContextValues {\n const {\n onOptionClick,\n registerOption,\n selectedOptions,\n selectOption,\n value,\n triggerRef,\n secondaryActionRef,\n tagPickerGroupRef,\n targetRef,\n size,\n setValue,\n setOpen,\n setHasFocus,\n popoverRef,\n appearance,\n clearSelection,\n getOptionById,\n getOptionsMatchingValue,\n open,\n popoverId,\n disabled,\n noPopover,\n } = state;\n return {\n activeDescendant: React.useMemo(\n () => ({ controller: state.activeDescendantController }),\n [state.activeDescendantController],\n ),\n listbox: {\n onOptionClick,\n registerOption,\n getOptionById,\n getOptionsMatchingValue,\n selectedOptions,\n selectOption,\n focusVisible: false,\n setActiveOption: noop,\n },\n picker: {\n value,\n triggerRef,\n targetRef,\n secondaryActionRef,\n tagPickerGroupRef,\n size,\n setValue,\n setOpen,\n setHasFocus,\n selectOption,\n popoverRef,\n selectedOptions,\n appearance,\n clearSelection,\n getOptionById,\n open,\n popoverId,\n disabled,\n noPopover,\n },\n };\n}\n\nconst noop = () => {\n /** noop */\n};\n"],"names":["React","useTagPickerContextValues","state","onOptionClick","registerOption","selectedOptions","selectOption","value","triggerRef","secondaryActionRef","tagPickerGroupRef","targetRef","size","setValue","setOpen","setHasFocus","popoverRef","appearance","clearSelection","getOptionById","getOptionsMatchingValue","open","popoverId","disabled","noPopover","activeDescendant","useMemo","controller","activeDescendantController","listbox","focusVisible","setActiveOption","noop","picker"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAG/B,OAAO,SAASC,0BAA0BC,KAAqB;IAC7D,MAAM,EACJC,aAAa,EACbC,cAAc,EACdC,eAAe,EACfC,YAAY,EACZC,KAAK,EACLC,UAAU,EACVC,kBAAkB,EAClBC,iBAAiB,EACjBC,SAAS,EACTC,IAAI,EACJC,QAAQ,EACRC,OAAO,EACPC,WAAW,EACXC,UAAU,EACVC,UAAU,EACVC,cAAc,EACdC,aAAa,EACbC,uBAAuB,EACvBC,IAAI,EACJC,SAAS,EACTC,QAAQ,EACRC,SAAS,EACV,GAAGtB;IACJ,OAAO;QACLuB,kBAAkBzB,MAAM0B,OAAO,CAC7B,IAAO,CAAA;gBAAEC,YAAYzB,MAAM0B,0BAA0B;YAAC,CAAA,GACtD;YAAC1B,MAAM0B,0BAA0B;SAAC;QAEpCC,SAAS;YACP1B;YACAC;YACAe;YACAC;YACAf;YACAC;YACAwB,cAAc;YACdC,iBAAiBC;QACnB;QACAC,QAAQ;YACN1B;YACAC;YACAG;YACAF;YACAC;YACAE;YACAC;YACAC;YACAC;YACAT;YACAU;YACAX;YACAY;YACAC;YACAC;YACAE;YACAC;YACAC;YACAC;QACF;IACF;AACF;AAEA,MAAMQ,OAAO;AACX,SAAS,GACX"}
1
+ {"version":3,"sources":["../src/components/TagPicker/useTagPickerContextValues.ts"],"sourcesContent":["import * as React from 'react';\nimport { TagPickerContextValues, TagPickerState } from './TagPicker.types';\n\nexport function useTagPickerContextValues(state: TagPickerState): TagPickerContextValues {\n const {\n onOptionClick,\n registerOption,\n selectedOptions,\n selectOption,\n value,\n triggerRef,\n secondaryActionRef,\n tagPickerGroupRef,\n targetRef,\n size,\n setValue,\n setOpen,\n setHasFocus,\n popoverRef,\n appearance,\n clearSelection,\n getOptionById,\n getOptionsMatchingValue,\n open,\n popoverId,\n disabled,\n noPopover,\n } = state;\n return {\n activeDescendant: React.useMemo(\n () => ({ controller: state.activeDescendantController }),\n [state.activeDescendantController],\n ),\n listbox: {\n onOptionClick,\n registerOption,\n getOptionById,\n getOptionsMatchingValue,\n selectedOptions,\n selectOption,\n focusVisible: false,\n setActiveOption: noop,\n },\n picker: {\n value,\n triggerRef,\n targetRef,\n secondaryActionRef,\n tagPickerGroupRef,\n size,\n setValue,\n setOpen,\n setHasFocus,\n selectOption,\n popoverRef,\n selectedOptions,\n appearance,\n clearSelection,\n getOptionById,\n open,\n popoverId,\n disabled,\n noPopover,\n },\n };\n}\n\nconst noop = () => {\n /** noop */\n};\n"],"names":["React","useTagPickerContextValues","state","onOptionClick","registerOption","selectedOptions","selectOption","value","triggerRef","secondaryActionRef","tagPickerGroupRef","targetRef","size","setValue","setOpen","setHasFocus","popoverRef","appearance","clearSelection","getOptionById","getOptionsMatchingValue","open","popoverId","disabled","noPopover","activeDescendant","useMemo","controller","activeDescendantController","listbox","focusVisible","setActiveOption","noop","picker"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAG/B,OAAO,SAASC,0BAA0BC,KAAqB;IAC7D,MAAM,EACJC,aAAa,EACbC,cAAc,EACdC,eAAe,EACfC,YAAY,EACZC,KAAK,EACLC,UAAU,EACVC,kBAAkB,EAClBC,iBAAiB,EACjBC,SAAS,EACTC,IAAI,EACJC,QAAQ,EACRC,OAAO,EACPC,WAAW,EACXC,UAAU,EACVC,UAAU,EACVC,cAAc,EACdC,aAAa,EACbC,uBAAuB,EACvBC,IAAI,EACJC,SAAS,EACTC,QAAQ,EACRC,SAAS,EACV,GAAGtB;IACJ,OAAO;QACLuB,kBAAkBzB,MAAM0B,OAAO,CAC7B,IAAO,CAAA;gBAAEC,YAAYzB,MAAM0B,0BAA0B;YAAC,CAAA,GACtD;YAAC1B,MAAM0B,0BAA0B;SAAC;QAEpCC,SAAS;YACP1B;YACAC;YACAe;YACAC;YACAf;YACAC;YACAwB,cAAc;YACdC,iBAAiBC;QACnB;QACAC,QAAQ;YACN1B;YACAC;YACAG;YACAF;YACAC;YACAE;YACAC;YACAC;YACAC;YACAT;YACAU;YACAX;YACAY;YACAC;YACAC;YACAE;YACAC;YACAC;YACAC;QACF;IACF;AACF;AAEA,MAAMQ,OAAO;AACX,SAAS,GACX"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPickerButton/TagPickerButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useTagPickerButton_unstable } from './useTagPickerButton';\nimport { renderTagPickerButton_unstable } from './renderTagPickerButton';\nimport { useTagPickerButtonStyles_unstable } from './useTagPickerButtonStyles.styles';\nimport type { TagPickerButtonProps } from './TagPickerButton.types';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * TagPickerButton component -\n * A TagPickerButton is an alternative to TagPickerInput that does not include an input field.\n */\nexport const TagPickerButton: ForwardRefComponent<TagPickerButtonProps> = React.forwardRef((props, ref) => {\n const state = useTagPickerButton_unstable(props, ref);\n\n useTagPickerButtonStyles_unstable(state);\n useCustomStyleHook_unstable('useTagPickerButtonStyles_unstable')(state);\n return renderTagPickerButton_unstable(state);\n});\n\nTagPickerButton.displayName = 'TagPickerButton';\n"],"names":["React","useTagPickerButton_unstable","renderTagPickerButton_unstable","useTagPickerButtonStyles_unstable","useCustomStyleHook_unstable","TagPickerButton","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,2BAA2B,QAAQ,uBAAuB;AACnE,SAASC,8BAA8B,QAAQ,0BAA0B;AACzE,SAASC,iCAAiC,QAAQ,oCAAoC;AAEtF,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;;CAGC,GACD,OAAO,MAAMC,gCAA6DL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACjG,MAAMC,QAAQR,4BAA4BM,OAAOC;IAEjDL,kCAAkCM;IAClCL,4BAA4B,qCAAqCK;IACjE,OAAOP,+BAA+BO;AACxC,GAAG;AAEHJ,gBAAgBK,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/components/TagPickerButton/TagPickerButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useTagPickerButton_unstable } from './useTagPickerButton';\nimport { renderTagPickerButton_unstable } from './renderTagPickerButton';\nimport { useTagPickerButtonStyles_unstable } from './useTagPickerButtonStyles.styles';\nimport type { TagPickerButtonProps } from './TagPickerButton.types';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * TagPickerButton component -\n * A TagPickerButton is an alternative to TagPickerInput that does not include an input field.\n */\nexport const TagPickerButton: ForwardRefComponent<TagPickerButtonProps> = React.forwardRef((props, ref) => {\n const state = useTagPickerButton_unstable(props, ref);\n\n useTagPickerButtonStyles_unstable(state);\n useCustomStyleHook_unstable('useTagPickerButtonStyles_unstable')(state);\n return renderTagPickerButton_unstable(state);\n});\n\nTagPickerButton.displayName = 'TagPickerButton';\n"],"names":["React","useTagPickerButton_unstable","renderTagPickerButton_unstable","useTagPickerButtonStyles_unstable","useCustomStyleHook_unstable","TagPickerButton","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,2BAA2B,QAAQ,uBAAuB;AACnE,SAASC,8BAA8B,QAAQ,0BAA0B;AACzE,SAASC,iCAAiC,QAAQ,oCAAoC;AAEtF,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;;CAGC,GACD,OAAO,MAAMC,gCAA6DL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACjG,MAAMC,QAAQR,4BAA4BM,OAAOC;IAEjDL,kCAAkCM;IAClCL,4BAA4B,qCAAqCK;IACjE,OAAOP,+BAA+BO;AACxC,GAAG;AAEHJ,gBAAgBK,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPickerButton/TagPickerButton.types.ts"],"sourcesContent":["import { DropdownProps } from '@fluentui/react-combobox';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { TagPickerContextValue } from '../../contexts/TagPickerContext';\n\nexport type TagPickerButtonSlots = {\n root: Slot<'button'>;\n};\n\n/**\n * PickerButton Props\n */\nexport type TagPickerButtonProps = ComponentProps<TagPickerButtonSlots> &\n Pick<DropdownProps, 'size' | 'appearance'> & {\n disabled?: boolean;\n };\n\n/**\n * State used in rendering PickerButton\n */\nexport type TagPickerButtonState = ComponentState<TagPickerButtonSlots> &\n Pick<TagPickerContextValue, 'size'> & {\n hasSelectedOption: boolean;\n };\n"],"names":[],"rangeMappings":";;","mappings":"AAgBA;;CAEC,GACD,WAGI"}
1
+ {"version":3,"sources":["../src/components/TagPickerButton/TagPickerButton.types.ts"],"sourcesContent":["import { DropdownProps } from '@fluentui/react-combobox';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { TagPickerContextValue } from '../../contexts/TagPickerContext';\n\nexport type TagPickerButtonSlots = {\n root: Slot<'button'>;\n};\n\n/**\n * PickerButton Props\n */\nexport type TagPickerButtonProps = ComponentProps<TagPickerButtonSlots> &\n Pick<DropdownProps, 'size' | 'appearance'> & {\n disabled?: boolean;\n };\n\n/**\n * State used in rendering PickerButton\n */\nexport type TagPickerButtonState = ComponentState<TagPickerButtonSlots> &\n Pick<TagPickerContextValue, 'size'> & {\n hasSelectedOption: boolean;\n };\n"],"names":[],"mappings":"AAgBA;;CAEC,GACD,WAGI"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPickerButton/index.ts"],"sourcesContent":["export { TagPickerButton } from './TagPickerButton';\nexport type { TagPickerButtonProps, TagPickerButtonSlots, TagPickerButtonState } from './TagPickerButton.types';\nexport { renderTagPickerButton_unstable } from './renderTagPickerButton';\nexport { useTagPickerButton_unstable } from './useTagPickerButton';\nexport { tagPickerButtonClassNames, useTagPickerButtonStyles_unstable } from './useTagPickerButtonStyles.styles';\n"],"names":["TagPickerButton","renderTagPickerButton_unstable","useTagPickerButton_unstable","tagPickerButtonClassNames","useTagPickerButtonStyles_unstable"],"rangeMappings":";;;","mappings":"AAAA,SAASA,eAAe,QAAQ,oBAAoB;AAEpD,SAASC,8BAA8B,QAAQ,0BAA0B;AACzE,SAASC,2BAA2B,QAAQ,uBAAuB;AACnE,SAASC,yBAAyB,EAAEC,iCAAiC,QAAQ,oCAAoC"}
1
+ {"version":3,"sources":["../src/components/TagPickerButton/index.ts"],"sourcesContent":["export { TagPickerButton } from './TagPickerButton';\nexport type { TagPickerButtonProps, TagPickerButtonSlots, TagPickerButtonState } from './TagPickerButton.types';\nexport { renderTagPickerButton_unstable } from './renderTagPickerButton';\nexport { useTagPickerButton_unstable } from './useTagPickerButton';\nexport { tagPickerButtonClassNames, useTagPickerButtonStyles_unstable } from './useTagPickerButtonStyles.styles';\n"],"names":["TagPickerButton","renderTagPickerButton_unstable","useTagPickerButton_unstable","tagPickerButtonClassNames","useTagPickerButtonStyles_unstable"],"mappings":"AAAA,SAASA,eAAe,QAAQ,oBAAoB;AAEpD,SAASC,8BAA8B,QAAQ,0BAA0B;AACzE,SAASC,2BAA2B,QAAQ,uBAAuB;AACnE,SAASC,yBAAyB,EAAEC,iCAAiC,QAAQ,oCAAoC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPickerButton/renderTagPickerButton.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { TagPickerButtonState, TagPickerButtonSlots } from './TagPickerButton.types';\n\n/**\n * Render the final JSX of PickerButton\n */\nexport const renderTagPickerButton_unstable = (state: TagPickerButtonState) => {\n assertSlots<TagPickerButtonSlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderTagPickerButton_unstable","state","root"],"rangeMappings":";;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,iCAAiC,CAACC;IAC7CF,YAAkCE;IAElC,qBAAO,KAACA,MAAMC,IAAI;AACpB,EAAE"}
1
+ {"version":3,"sources":["../src/components/TagPickerButton/renderTagPickerButton.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { TagPickerButtonState, TagPickerButtonSlots } from './TagPickerButton.types';\n\n/**\n * Render the final JSX of PickerButton\n */\nexport const renderTagPickerButton_unstable = (state: TagPickerButtonState) => {\n assertSlots<TagPickerButtonSlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderTagPickerButton_unstable","state","root"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,iCAAiC,CAACC;IAC7CF,YAAkCE;IAElC,qBAAO,KAACA,MAAMC,IAAI;AACpB,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPickerButton/useTagPickerButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useActiveDescendantContext } from '@fluentui/react-aria';\nimport type { TagPickerButtonProps, TagPickerButtonState } from './TagPickerButton.types';\nimport { useTagPickerContext_unstable } from '../../contexts/TagPickerContext';\nimport { useButtonTriggerSlot } from '@fluentui/react-combobox';\n\n/**\n * Create the state required to render PickerButton.\n *\n * The returned state can be modified with hooks such as usePickerButtonStyles_unstable,\n * before being passed to renderPickerButton_unstable.\n *\n * @param props - props from this instance of PickerButton\n * @param ref - reference to root HTMLDivElement of PickerButton\n */\nexport const useTagPickerButton_unstable = (\n props: TagPickerButtonProps,\n ref: React.Ref<HTMLButtonElement>,\n): TagPickerButtonState => {\n const { controller: activeDescendantController } = useActiveDescendantContext();\n const triggerRef = useTagPickerContext_unstable(ctx => ctx.triggerRef);\n const open = useTagPickerContext_unstable(ctx => ctx.open);\n const value = useTagPickerContext_unstable(ctx => ctx.value);\n const hasSelectedOption = useTagPickerContext_unstable(ctx => ctx.selectedOptions.length > 0);\n const popoverId = useTagPickerContext_unstable(ctx => ctx.popoverId);\n const getOptionById = useTagPickerContext_unstable(ctx => ctx.getOptionById);\n const selectOption = useTagPickerContext_unstable(ctx => ctx.selectOption);\n const setHasFocus = useTagPickerContext_unstable(ctx => ctx.setHasFocus);\n const setOpen = useTagPickerContext_unstable(ctx => ctx.setOpen);\n\n // casting is required here as triggerRef can either be button or input,\n // but in this case we can assure it's a button\n const root = useButtonTriggerSlot(props, triggerRef as React.RefObject<HTMLButtonElement>, {\n activeDescendantController,\n defaultProps: {\n type: 'button',\n tabIndex: 0,\n children:\n value ||\n // @ts-expect-error - FIXME: TS2339: Property 'placeholder' does not exist on type 'TagPickerButtonProps'\n props.placeholder,\n 'aria-controls': open ? popoverId : undefined,\n ref,\n },\n state: {\n getOptionById,\n open,\n selectOption,\n setHasFocus,\n setOpen,\n multiselect: true,\n },\n });\n\n const size = useTagPickerContext_unstable(ctx => ctx.size);\n\n const state: TagPickerButtonState = {\n components: {\n root: 'button',\n },\n root,\n size,\n hasSelectedOption,\n };\n\n return state;\n};\n"],"names":["React","useActiveDescendantContext","useTagPickerContext_unstable","useButtonTriggerSlot","useTagPickerButton_unstable","props","ref","controller","activeDescendantController","triggerRef","ctx","open","value","hasSelectedOption","selectedOptions","length","popoverId","getOptionById","selectOption","setHasFocus","setOpen","root","defaultProps","type","tabIndex","children","placeholder","undefined","state","multiselect","size","components"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,0BAA0B,QAAQ,uBAAuB;AAElE,SAASC,4BAA4B,QAAQ,kCAAkC;AAC/E,SAASC,oBAAoB,QAAQ,2BAA2B;AAEhE;;;;;;;;CAQC,GACD,OAAO,MAAMC,8BAA8B,CACzCC,OACAC;IAEA,MAAM,EAAEC,YAAYC,0BAA0B,EAAE,GAAGP;IACnD,MAAMQ,aAAaP,6BAA6BQ,CAAAA,MAAOA,IAAID,UAAU;IACrE,MAAME,OAAOT,6BAA6BQ,CAAAA,MAAOA,IAAIC,IAAI;IACzD,MAAMC,QAAQV,6BAA6BQ,CAAAA,MAAOA,IAAIE,KAAK;IAC3D,MAAMC,oBAAoBX,6BAA6BQ,CAAAA,MAAOA,IAAII,eAAe,CAACC,MAAM,GAAG;IAC3F,MAAMC,YAAYd,6BAA6BQ,CAAAA,MAAOA,IAAIM,SAAS;IACnE,MAAMC,gBAAgBf,6BAA6BQ,CAAAA,MAAOA,IAAIO,aAAa;IAC3E,MAAMC,eAAehB,6BAA6BQ,CAAAA,MAAOA,IAAIQ,YAAY;IACzE,MAAMC,cAAcjB,6BAA6BQ,CAAAA,MAAOA,IAAIS,WAAW;IACvE,MAAMC,UAAUlB,6BAA6BQ,CAAAA,MAAOA,IAAIU,OAAO;IAE/D,wEAAwE;IACxE,+CAA+C;IAC/C,MAAMC,OAAOlB,qBAAqBE,OAAOI,YAAkD;QACzFD;QACAc,cAAc;YACZC,MAAM;YACNC,UAAU;YACVC,UACEb,SACA,yGAAyG;YACzGP,MAAMqB,WAAW;YACnB,iBAAiBf,OAAOK,YAAYW;YACpCrB;QACF;QACAsB,OAAO;YACLX;YACAN;YACAO;YACAC;YACAC;YACAS,aAAa;QACf;IACF;IAEA,MAAMC,OAAO5B,6BAA6BQ,CAAAA,MAAOA,IAAIoB,IAAI;IAEzD,MAAMF,QAA8B;QAClCG,YAAY;YACVV,MAAM;QACR;QACAA;QACAS;QACAjB;IACF;IAEA,OAAOe;AACT,EAAE"}
1
+ {"version":3,"sources":["../src/components/TagPickerButton/useTagPickerButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useActiveDescendantContext } from '@fluentui/react-aria';\nimport type { TagPickerButtonProps, TagPickerButtonState } from './TagPickerButton.types';\nimport { useTagPickerContext_unstable } from '../../contexts/TagPickerContext';\nimport { useButtonTriggerSlot } from '@fluentui/react-combobox';\n\n/**\n * Create the state required to render PickerButton.\n *\n * The returned state can be modified with hooks such as usePickerButtonStyles_unstable,\n * before being passed to renderPickerButton_unstable.\n *\n * @param props - props from this instance of PickerButton\n * @param ref - reference to root HTMLDivElement of PickerButton\n */\nexport const useTagPickerButton_unstable = (\n props: TagPickerButtonProps,\n ref: React.Ref<HTMLButtonElement>,\n): TagPickerButtonState => {\n const { controller: activeDescendantController } = useActiveDescendantContext();\n const triggerRef = useTagPickerContext_unstable(ctx => ctx.triggerRef);\n const open = useTagPickerContext_unstable(ctx => ctx.open);\n const value = useTagPickerContext_unstable(ctx => ctx.value);\n const hasSelectedOption = useTagPickerContext_unstable(ctx => ctx.selectedOptions.length > 0);\n const popoverId = useTagPickerContext_unstable(ctx => ctx.popoverId);\n const getOptionById = useTagPickerContext_unstable(ctx => ctx.getOptionById);\n const selectOption = useTagPickerContext_unstable(ctx => ctx.selectOption);\n const setHasFocus = useTagPickerContext_unstable(ctx => ctx.setHasFocus);\n const setOpen = useTagPickerContext_unstable(ctx => ctx.setOpen);\n\n // casting is required here as triggerRef can either be button or input,\n // but in this case we can assure it's a button\n const root = useButtonTriggerSlot(props, triggerRef as React.RefObject<HTMLButtonElement>, {\n activeDescendantController,\n defaultProps: {\n type: 'button',\n tabIndex: 0,\n children:\n value ||\n // @ts-expect-error - FIXME: TS2339: Property 'placeholder' does not exist on type 'TagPickerButtonProps'\n props.placeholder,\n 'aria-controls': open ? popoverId : undefined,\n ref,\n },\n state: {\n getOptionById,\n open,\n selectOption,\n setHasFocus,\n setOpen,\n multiselect: true,\n },\n });\n\n const size = useTagPickerContext_unstable(ctx => ctx.size);\n\n const state: TagPickerButtonState = {\n components: {\n root: 'button',\n },\n root,\n size,\n hasSelectedOption,\n };\n\n return state;\n};\n"],"names":["React","useActiveDescendantContext","useTagPickerContext_unstable","useButtonTriggerSlot","useTagPickerButton_unstable","props","ref","controller","activeDescendantController","triggerRef","ctx","open","value","hasSelectedOption","selectedOptions","length","popoverId","getOptionById","selectOption","setHasFocus","setOpen","root","defaultProps","type","tabIndex","children","placeholder","undefined","state","multiselect","size","components"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,0BAA0B,QAAQ,uBAAuB;AAElE,SAASC,4BAA4B,QAAQ,kCAAkC;AAC/E,SAASC,oBAAoB,QAAQ,2BAA2B;AAEhE;;;;;;;;CAQC,GACD,OAAO,MAAMC,8BAA8B,CACzCC,OACAC;IAEA,MAAM,EAAEC,YAAYC,0BAA0B,EAAE,GAAGP;IACnD,MAAMQ,aAAaP,6BAA6BQ,CAAAA,MAAOA,IAAID,UAAU;IACrE,MAAME,OAAOT,6BAA6BQ,CAAAA,MAAOA,IAAIC,IAAI;IACzD,MAAMC,QAAQV,6BAA6BQ,CAAAA,MAAOA,IAAIE,KAAK;IAC3D,MAAMC,oBAAoBX,6BAA6BQ,CAAAA,MAAOA,IAAII,eAAe,CAACC,MAAM,GAAG;IAC3F,MAAMC,YAAYd,6BAA6BQ,CAAAA,MAAOA,IAAIM,SAAS;IACnE,MAAMC,gBAAgBf,6BAA6BQ,CAAAA,MAAOA,IAAIO,aAAa;IAC3E,MAAMC,eAAehB,6BAA6BQ,CAAAA,MAAOA,IAAIQ,YAAY;IACzE,MAAMC,cAAcjB,6BAA6BQ,CAAAA,MAAOA,IAAIS,WAAW;IACvE,MAAMC,UAAUlB,6BAA6BQ,CAAAA,MAAOA,IAAIU,OAAO;IAE/D,wEAAwE;IACxE,+CAA+C;IAC/C,MAAMC,OAAOlB,qBAAqBE,OAAOI,YAAkD;QACzFD;QACAc,cAAc;YACZC,MAAM;YACNC,UAAU;YACVC,UACEb,SACA,yGAAyG;YACzGP,MAAMqB,WAAW;YACnB,iBAAiBf,OAAOK,YAAYW;YACpCrB;QACF;QACAsB,OAAO;YACLX;YACAN;YACAO;YACAC;YACAC;YACAS,aAAa;QACf;IACF;IAEA,MAAMC,OAAO5B,6BAA6BQ,CAAAA,MAAOA,IAAIoB,IAAI;IAEzD,MAAMF,QAA8B;QAClCG,YAAY;YACVV,MAAM;QACR;QACAA;QACAS;QACAjB;IACF;IAEA,OAAOe;AACT,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPickerButton/useTagPickerButtonStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { TagPickerButtonSlots, TagPickerButtonState } from './TagPickerButton.types';\n\nexport const tagPickerButtonClassNames: SlotClassNames<TagPickerButtonSlots> = {\n root: 'fui-TagPickerButton',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n button: {\n alignItems: 'center',\n minHeight: '32px',\n backgroundColor: tokens.colorTransparentBackground,\n border: 'none',\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground1,\n columnGap: tokens.spacingHorizontalXXS,\n cursor: 'pointer',\n fontFamily: tokens.fontFamilyBase,\n textAlign: 'left',\n flexGrow: 1,\n\n '&:focus': {\n outlineStyle: 'none',\n },\n },\n\n placeholder: {\n color: tokens.colorNeutralForeground4,\n },\n\n // size variants\n medium: {\n ...typographyStyles.caption1,\n padding: `3px ${\n tokens.spacingHorizontalSNudge\n } 3px ${`calc(${tokens.spacingHorizontalSNudge} + ${tokens.spacingHorizontalXXS})`}`,\n },\n large: {\n ...typographyStyles.body1,\n padding: `5px ${\n tokens.spacingHorizontalMNudge\n } 5px ${`calc(${tokens.spacingHorizontalMNudge} + ${tokens.spacingHorizontalXXS})`}`,\n },\n 'extra-large': {\n columnGap: tokens.spacingHorizontalSNudge,\n ...typographyStyles.body2,\n padding: `7px ${\n tokens.spacingHorizontalM\n } 7px ${`calc(${tokens.spacingHorizontalM} + ${tokens.spacingHorizontalSNudge})`}`,\n },\n\n // appearance variants\n outline: {\n backgroundColor: tokens.colorNeutralBackground1,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,\n borderBottomColor: tokens.colorNeutralStrokeAccessible,\n },\n outlineInteractive: {\n '&:hover': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Hover),\n borderBottomColor: tokens.colorNeutralStrokeAccessible,\n },\n\n '&:active': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Pressed),\n borderBottomColor: tokens.colorNeutralStrokeAccessible,\n },\n },\n underline: {\n backgroundColor: tokens.colorTransparentBackground,\n borderBottom: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStrokeAccessible}`,\n borderRadius: '0',\n },\n 'filled-lighter': {\n backgroundColor: tokens.colorNeutralBackground1,\n border: `${tokens.strokeWidthThin} solid transparent`,\n },\n 'filled-darker': {\n backgroundColor: tokens.colorNeutralBackground3,\n border: `${tokens.strokeWidthThin} solid transparent`,\n },\n invalid: {\n ':not(:focus-within),:hover:not(:focus-within)': {\n ...shorthands.borderColor(tokens.colorPaletteRedBorder2),\n },\n },\n invalidUnderline: {\n ':not(:focus-within),:hover:not(:focus-within)': {\n borderBottomColor: tokens.colorPaletteRedBorder2,\n },\n },\n disabled: {\n cursor: 'not-allowed',\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n '@media (forced-colors: active)': {\n ...shorthands.borderColor('GrayText'),\n },\n },\n\n disabledText: {\n color: tokens.colorNeutralForegroundDisabled,\n cursor: 'not-allowed',\n },\n\n hidden: {\n display: 'none',\n },\n visuallyHidden: {\n clip: 'rect(0px, 0px, 0px, 0px)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: '0px',\n width: '1px',\n position: 'absolute',\n },\n});\n\n/**\n * Apply styling to the PickerButton slots based on the state\n */\nexport const useTagPickerButtonStyles_unstable = (state: TagPickerButtonState): TagPickerButtonState => {\n 'use no memo';\n\n const styles = useStyles();\n state.root.className = mergeClasses(\n tagPickerButtonClassNames.root,\n styles.button,\n styles[state.size],\n state.hasSelectedOption && styles.visuallyHidden,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","shorthands","tokens","typographyStyles","tagPickerButtonClassNames","root","useStyles","button","alignItems","minHeight","backgroundColor","colorTransparentBackground","border","boxSizing","color","colorNeutralForeground1","columnGap","spacingHorizontalXXS","cursor","fontFamily","fontFamilyBase","textAlign","flexGrow","outlineStyle","placeholder","colorNeutralForeground4","medium","caption1","padding","spacingHorizontalSNudge","large","body1","spacingHorizontalMNudge","body2","spacingHorizontalM","outline","colorNeutralBackground1","strokeWidthThin","colorNeutralStroke1","borderBottomColor","colorNeutralStrokeAccessible","outlineInteractive","borderColor","colorNeutralStroke1Hover","colorNeutralStroke1Pressed","underline","borderBottom","borderRadius","colorNeutralBackground3","invalid","colorPaletteRedBorder2","invalidUnderline","disabled","colorNeutralStrokeDisabled","disabledText","colorNeutralForegroundDisabled","hidden","display","visuallyHidden","clip","height","margin","overflow","width","position","useTagPickerButtonStyles_unstable","state","styles","className","size","hasSelectedOption"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,EAAEC,UAAU,QAAQ,iBAAiB;AACtE,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,wBAAwB;AAIjE,OAAO,MAAMC,4BAAkE;IAC7EC,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYP,WAAW;IAC3BQ,QAAQ;QACNC,YAAY;QACZC,WAAW;QACXC,iBAAiBR,OAAOS,0BAA0B;QAClDC,QAAQ;QACRC,WAAW;QACXC,OAAOZ,OAAOa,uBAAuB;QACrCC,WAAWd,OAAOe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ACD,MAAMG,IAAI,CAAC,EAClBH,MAAMI,iBAAiB,IAAIH,OAAOT,cAAc,EAChDQ,MAAM7D,IAAI,CAAC+D,SAAS;IAGtB,OAAOF;AACT,EAAE"}
1
+ {"version":3,"sources":["../src/components/TagPickerButton/useTagPickerButtonStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { TagPickerButtonSlots, TagPickerButtonState } from './TagPickerButton.types';\n\nexport const tagPickerButtonClassNames: SlotClassNames<TagPickerButtonSlots> = {\n root: 'fui-TagPickerButton',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n button: {\n alignItems: 'center',\n minHeight: '32px',\n backgroundColor: tokens.colorTransparentBackground,\n border: 'none',\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground1,\n columnGap: tokens.spacingHorizontalXXS,\n cursor: 'pointer',\n fontFamily: tokens.fontFamilyBase,\n textAlign: 'left',\n flexGrow: 1,\n\n '&:focus': {\n outlineStyle: 'none',\n },\n },\n\n placeholder: {\n color: tokens.colorNeutralForeground4,\n },\n\n // size variants\n medium: {\n ...typographyStyles.caption1,\n padding: `3px ${\n tokens.spacingHorizontalSNudge\n } 3px ${`calc(${tokens.spacingHorizontalSNudge} + ${tokens.spacingHorizontalXXS})`}`,\n },\n large: {\n ...typographyStyles.body1,\n padding: `5px ${\n tokens.spacingHorizontalMNudge\n } 5px ${`calc(${tokens.spacingHorizontalMNudge} + ${tokens.spacingHorizontalXXS})`}`,\n },\n 'extra-large': {\n columnGap: tokens.spacingHorizontalSNudge,\n ...typographyStyles.body2,\n padding: `7px ${\n tokens.spacingHorizontalM\n } 7px ${`calc(${tokens.spacingHorizontalM} + ${tokens.spacingHorizontalSNudge})`}`,\n },\n\n // appearance variants\n outline: {\n backgroundColor: tokens.colorNeutralBackground1,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,\n borderBottomColor: tokens.colorNeutralStrokeAccessible,\n },\n outlineInteractive: {\n '&:hover': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Hover),\n borderBottomColor: tokens.colorNeutralStrokeAccessible,\n },\n\n '&:active': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Pressed),\n borderBottomColor: tokens.colorNeutralStrokeAccessible,\n },\n },\n underline: {\n backgroundColor: tokens.colorTransparentBackground,\n borderBottom: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStrokeAccessible}`,\n borderRadius: '0',\n },\n 'filled-lighter': {\n backgroundColor: tokens.colorNeutralBackground1,\n border: `${tokens.strokeWidthThin} solid transparent`,\n },\n 'filled-darker': {\n backgroundColor: tokens.colorNeutralBackground3,\n border: `${tokens.strokeWidthThin} solid transparent`,\n },\n invalid: {\n ':not(:focus-within),:hover:not(:focus-within)': {\n ...shorthands.borderColor(tokens.colorPaletteRedBorder2),\n },\n },\n invalidUnderline: {\n ':not(:focus-within),:hover:not(:focus-within)': {\n borderBottomColor: tokens.colorPaletteRedBorder2,\n },\n },\n disabled: {\n cursor: 'not-allowed',\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n '@media (forced-colors: active)': {\n ...shorthands.borderColor('GrayText'),\n },\n },\n\n disabledText: {\n color: tokens.colorNeutralForegroundDisabled,\n cursor: 'not-allowed',\n },\n\n hidden: {\n display: 'none',\n },\n visuallyHidden: {\n clip: 'rect(0px, 0px, 0px, 0px)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: '0px',\n width: '1px',\n position: 'absolute',\n },\n});\n\n/**\n * Apply styling to the PickerButton slots based on the state\n */\nexport const useTagPickerButtonStyles_unstable = (state: TagPickerButtonState): TagPickerButtonState => {\n 'use no memo';\n\n const styles = useStyles();\n state.root.className = mergeClasses(\n tagPickerButtonClassNames.root,\n styles.button,\n styles[state.size],\n state.hasSelectedOption && styles.visuallyHidden,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","shorthands","tokens","typographyStyles","tagPickerButtonClassNames","root","useStyles","button","alignItems","minHeight","backgroundColor","colorTransparentBackground","border","boxSizing","color","colorNeutralForeground1","columnGap","spacingHorizontalXXS","cursor","fontFamily","fontFamilyBase","textAlign","flexGrow","outlineStyle","placeholder","colorNeutralForeground4","medium","caption1","padding","spacingHorizontalSNudge","large","body1","spacingHorizontalMNudge","body2","spacingHorizontalM","outline","colorNeutralBackground1","strokeWidthThin","colorNeutralStroke1","borderBottomColor","colorNeutralStrokeAccessible","outlineInteractive","borderColor","colorNeutralStroke1Hover","colorNeutralStroke1Pressed","underline","borderBottom","borderRadius","colorNeutralBackground3","invalid","colorPaletteRedBorder2","invalidUnderline","disabled","colorNeutralStrokeDisabled","disabledText","colorNeutralForegroundDisabled","hidden","display","visuallyHidden","clip","height","margin","overflow","width","position","useTagPickerButtonStyles_unstable","state","styles","className","size","hasSelectedOption"],"mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,EAAEC,UAAU,QAAQ,iBAAiB;AACtE,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,wBAAwB;AAIjE,OAAO,MAAMC,4BAAkE;IAC7EC,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYP,WAAW;IAC3BQ,QAAQ;QACNC,YAAY;QACZC,WAAW;QACXC,iBAAiBR,OAAOS,0BAA0B;QAClDC,QAAQ;QACRC,WAAW;QACXC,OAAOZ,OAAOa,uBAAuB;QACrCC,WAAWd,OAAOe,oBAAoB;QACtCC,QAAQ;QACRC,YAAYjB,OAAOkB,cAAc;QACjCC,WAAW;QACXC,UAAU;QAEV,WAAW;YACTC,cAAc;QAChB;IACF;IAEAC,aAAa;QACXV,OAAOZ,OAAOuB,uBAAuB;IACvC;IAEA,gBAAgB;IAChBC,QAAQ;QACN,GAAGvB,iBAAiBwB,QAAQ;QAC5BC,SAAS,CAAC,IAAI,EACZ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CxB,QAAQ,GAAGV,OAAOmC,eAAe,CAAC,kBAAkB,CAAC;IACvD;IACA,iBAAiB;QACf3B,iBAAiBR,OAAO8C,uBAAuB;QAC/CpC,QAAQ,GAAGV,OAAOmC,eAAe,CAAC,kBAAkB,CAAC;IACvD;IACAY,SAAS;QACP,iDAAiD;YAC/C,GAAGhD,WAAWyC,WAAW,CAACxC,OAAOgD,sBAAsB,CAAC;QAC1D;IACF;IACAC,kBAAkB;QAChB,iDAAiD;YAC/CZ,mBAAmBrC,OAAOgD,sBAAsB;QAClD;IACF;IACAE,UAAU;QACRlC,QAAQ;QACRR,iBAAiBR,OAAOS,0BAA0B;QAClD,GAAGV,WAAWyC,WAAW,CAACxC,OAAOmD,0BAA0B,CAAC;QAC5D,kCAAkC;YAChC,GAAGpD,WAAWyC,WAAW,CAAC,WAAW;QACvC;IACF;IAEAY,cAAc;QACZxC,OAAOZ,OAAOqD,8BAA8B;QAC5CrC,QAAQ;IACV;IAEAsC,QAAQ;QACNC,SAAS;IACX;IACAC,gBAAgB;QACdC,MAAM;QACNC,QAAQ;QACRC,QAAQ;QACRC,UAAU;QACVlC,SAAS;QACTmC,OAAO;QACPC,UAAU;IACZ;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,oCAAoC,CAACC;IAChD;IAEA,MAAMC,SAAS7D;IACf4D,MAAM7D,IAAI,CAAC+D,SAAS,GAAGpE,aACrBI,0BAA0BC,IAAI,EAC9B8D,OAAO5D,MAAM,EACb4D,MAAM,CAACD,MAAMG,IAAI,CAAC,EAClBH,MAAMI,iBAAiB,IAAIH,OAAOT,cAAc,EAChDQ,MAAM7D,IAAI,CAAC+D,SAAS;IAGtB,OAAOF;AACT,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPickerControl/TagPickerControl.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useTagPickerControl_unstable } from './useTagPickerControl';\nimport { renderTagPickerControl_unstable } from './renderTagPickerControl';\nimport { useTagPickerControlStyles_unstable } from './useTagPickerControlStyles.styles';\nimport type { TagPickerControlProps } from './TagPickerControl.types';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * TagPickerControl component -\n * A TagPickerControl is a composite component that controls actions and state for a TagPicker.\n */\nexport const TagPickerControl: ForwardRefComponent<TagPickerControlProps> = React.forwardRef((props, ref) => {\n const state = useTagPickerControl_unstable(props, ref);\n\n useTagPickerControlStyles_unstable(state);\n useCustomStyleHook_unstable('useTagPickerControlStyles_unstable')(state);\n return renderTagPickerControl_unstable(state);\n});\n\nTagPickerControl.displayName = 'TagPickerControl';\n"],"names":["React","useTagPickerControl_unstable","renderTagPickerControl_unstable","useTagPickerControlStyles_unstable","useCustomStyleHook_unstable","TagPickerControl","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,4BAA4B,QAAQ,wBAAwB;AACrE,SAASC,+BAA+B,QAAQ,2BAA2B;AAC3E,SAASC,kCAAkC,QAAQ,qCAAqC;AAExF,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;;CAGC,GACD,OAAO,MAAMC,iCAA+DL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACnG,MAAMC,QAAQR,6BAA6BM,OAAOC;IAElDL,mCAAmCM;IACnCL,4BAA4B,sCAAsCK;IAClE,OAAOP,gCAAgCO;AACzC,GAAG;AAEHJ,iBAAiBK,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/components/TagPickerControl/TagPickerControl.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useTagPickerControl_unstable } from './useTagPickerControl';\nimport { renderTagPickerControl_unstable } from './renderTagPickerControl';\nimport { useTagPickerControlStyles_unstable } from './useTagPickerControlStyles.styles';\nimport type { TagPickerControlProps } from './TagPickerControl.types';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * TagPickerControl component -\n * A TagPickerControl is a composite component that controls actions and state for a TagPicker.\n */\nexport const TagPickerControl: ForwardRefComponent<TagPickerControlProps> = React.forwardRef((props, ref) => {\n const state = useTagPickerControl_unstable(props, ref);\n\n useTagPickerControlStyles_unstable(state);\n useCustomStyleHook_unstable('useTagPickerControlStyles_unstable')(state);\n return renderTagPickerControl_unstable(state);\n});\n\nTagPickerControl.displayName = 'TagPickerControl';\n"],"names":["React","useTagPickerControl_unstable","renderTagPickerControl_unstable","useTagPickerControlStyles_unstable","useCustomStyleHook_unstable","TagPickerControl","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,4BAA4B,QAAQ,wBAAwB;AACrE,SAASC,+BAA+B,QAAQ,2BAA2B;AAC3E,SAASC,kCAAkC,QAAQ,qCAAqC;AAExF,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;;CAGC,GACD,OAAO,MAAMC,iCAA+DL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACnG,MAAMC,QAAQR,6BAA6BM,OAAOC;IAElDL,mCAAmCM;IACnCL,4BAA4B,sCAAsCK;IAClE,OAAOP,gCAAgCO;AACzC,GAAG;AAEHJ,iBAAiBK,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPickerControl/TagPickerControl.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, ExtractSlotProps, Slot } from '@fluentui/react-utilities';\nimport { TagPickerContextValue } from '../../contexts/TagPickerContext';\nimport { ComboboxSlots } from '@fluentui/react-combobox';\nimport * as React from 'react';\n\nexport type TagPickerControlSlots = {\n root: Slot<ExtractSlotProps<Slot<'div'> & { style?: TagPickerControlCSSProperties }>>;\n /**\n * A secondary action should be a button-like element to be rendered right after\n * the trigger responsible for opening/closing the tag picker popover.\n */\n secondaryAction: Slot<'span'>;\n} & Pick<ComboboxSlots, 'expandIcon'>;\n\nexport type TagPickerControlInternalSlots = {\n aside?: NonNullable<Slot<'span'>>;\n};\n\nexport type TagPickerControlCSSProperties = React.CSSProperties & {\n '--fui-TagPickerControl-aside-width'?: string | number;\n};\n\n/**\n * PickerControl Props\n */\nexport type TagPickerControlProps = ComponentProps<Partial<TagPickerControlSlots>>;\n\n/**\n * State used in rendering PickerControl\n */\nexport type TagPickerControlState = ComponentState<TagPickerControlSlots & TagPickerControlInternalSlots> &\n Pick<TagPickerContextValue, 'size' | 'appearance' | 'disabled'> & {\n invalid: boolean;\n };\n"],"names":["React"],"rangeMappings":"","mappings":"AAGA,YAAYA,WAAW,QAAQ"}
1
+ {"version":3,"sources":["../src/components/TagPickerControl/TagPickerControl.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, ExtractSlotProps, Slot } from '@fluentui/react-utilities';\nimport { TagPickerContextValue } from '../../contexts/TagPickerContext';\nimport { ComboboxSlots } from '@fluentui/react-combobox';\nimport * as React from 'react';\n\nexport type TagPickerControlSlots = {\n root: Slot<ExtractSlotProps<Slot<'div'> & { style?: TagPickerControlCSSProperties }>>;\n /**\n * A secondary action should be a button-like element to be rendered right after\n * the trigger responsible for opening/closing the tag picker popover.\n */\n secondaryAction: Slot<'span'>;\n} & Pick<ComboboxSlots, 'expandIcon'>;\n\nexport type TagPickerControlInternalSlots = {\n aside?: NonNullable<Slot<'span'>>;\n};\n\nexport type TagPickerControlCSSProperties = React.CSSProperties & {\n '--fui-TagPickerControl-aside-width'?: string | number;\n};\n\n/**\n * PickerControl Props\n */\nexport type TagPickerControlProps = ComponentProps<Partial<TagPickerControlSlots>>;\n\n/**\n * State used in rendering PickerControl\n */\nexport type TagPickerControlState = ComponentState<TagPickerControlSlots & TagPickerControlInternalSlots> &\n Pick<TagPickerContextValue, 'size' | 'appearance' | 'disabled'> & {\n invalid: boolean;\n };\n"],"names":["React"],"mappings":"AAGA,YAAYA,WAAW,QAAQ"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPickerControl/index.ts"],"sourcesContent":["export { TagPickerControl } from './TagPickerControl';\nexport type {\n TagPickerControlCSSProperties,\n TagPickerControlInternalSlots,\n TagPickerControlProps,\n TagPickerControlSlots,\n TagPickerControlState,\n} from './TagPickerControl.types';\nexport { renderTagPickerControl_unstable } from './renderTagPickerControl';\nexport { useTagPickerControl_unstable } from './useTagPickerControl';\nexport {\n iconSizes,\n tagPickerControlAsideWidthToken,\n tagPickerControlClassNames,\n useTagPickerControlStyles_unstable,\n} from './useTagPickerControlStyles.styles';\n"],"names":["TagPickerControl","renderTagPickerControl_unstable","useTagPickerControl_unstable","iconSizes","tagPickerControlAsideWidthToken","tagPickerControlClassNames","useTagPickerControlStyles_unstable"],"rangeMappings":";;;","mappings":"AAAA,SAASA,gBAAgB,QAAQ,qBAAqB;AAQtD,SAASC,+BAA+B,QAAQ,2BAA2B;AAC3E,SAASC,4BAA4B,QAAQ,wBAAwB;AACrE,SACEC,SAAS,EACTC,+BAA+B,EAC/BC,0BAA0B,EAC1BC,kCAAkC,QAC7B,qCAAqC"}
1
+ {"version":3,"sources":["../src/components/TagPickerControl/index.ts"],"sourcesContent":["export { TagPickerControl } from './TagPickerControl';\nexport type {\n TagPickerControlCSSProperties,\n TagPickerControlInternalSlots,\n TagPickerControlProps,\n TagPickerControlSlots,\n TagPickerControlState,\n} from './TagPickerControl.types';\nexport { renderTagPickerControl_unstable } from './renderTagPickerControl';\nexport { useTagPickerControl_unstable } from './useTagPickerControl';\nexport {\n iconSizes,\n tagPickerControlAsideWidthToken,\n tagPickerControlClassNames,\n useTagPickerControlStyles_unstable,\n} from './useTagPickerControlStyles.styles';\n"],"names":["TagPickerControl","renderTagPickerControl_unstable","useTagPickerControl_unstable","iconSizes","tagPickerControlAsideWidthToken","tagPickerControlClassNames","useTagPickerControlStyles_unstable"],"mappings":"AAAA,SAASA,gBAAgB,QAAQ,qBAAqB;AAQtD,SAASC,+BAA+B,QAAQ,2BAA2B;AAC3E,SAASC,4BAA4B,QAAQ,wBAAwB;AACrE,SACEC,SAAS,EACTC,+BAA+B,EAC/BC,0BAA0B,EAC1BC,kCAAkC,QAC7B,qCAAqC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPickerControl/renderTagPickerControl.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type {\n TagPickerControlState,\n TagPickerControlSlots,\n TagPickerControlInternalSlots,\n} from './TagPickerControl.types';\n\n/**\n * Render the final JSX of PickerControl\n */\nexport const renderTagPickerControl_unstable = (state: TagPickerControlState) => {\n assertSlots<TagPickerControlSlots & TagPickerControlInternalSlots>(state);\n\n return (\n <state.root>\n {state.root.children}\n {state.aside && (\n <state.aside>\n {state.secondaryAction && <state.secondaryAction />}\n {state.expandIcon && <state.expandIcon />}\n </state.aside>\n )}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderTagPickerControl_unstable","state","root","children","aside","secondaryAction","expandIcon"],"rangeMappings":";;;;;;;;;;;;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAOxD;;CAEC,GACD,OAAO,MAAMC,kCAAkC,CAACC;IAC9CF,YAAmEE;IAEnE,qBACE,MAACA,MAAMC,IAAI;;YACRD,MAAMC,IAAI,CAACC,QAAQ;YACnBF,MAAMG,KAAK,kBACV,MAACH,MAAMG,KAAK;;oBACTH,MAAMI,eAAe,kBAAI,KAACJ,MAAMI,eAAe;oBAC/CJ,MAAMK,UAAU,kBAAI,KAACL,MAAMK,UAAU;;;;;AAKhD,EAAE"}
1
+ {"version":3,"sources":["../src/components/TagPickerControl/renderTagPickerControl.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type {\n TagPickerControlState,\n TagPickerControlSlots,\n TagPickerControlInternalSlots,\n} from './TagPickerControl.types';\n\n/**\n * Render the final JSX of PickerControl\n */\nexport const renderTagPickerControl_unstable = (state: TagPickerControlState) => {\n assertSlots<TagPickerControlSlots & TagPickerControlInternalSlots>(state);\n\n return (\n <state.root>\n {state.root.children}\n {state.aside && (\n <state.aside>\n {state.secondaryAction && <state.secondaryAction />}\n {state.expandIcon && <state.expandIcon />}\n </state.aside>\n )}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderTagPickerControl_unstable","state","root","children","aside","secondaryAction","expandIcon"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAOxD;;CAEC,GACD,OAAO,MAAMC,kCAAkC,CAACC;IAC9CF,YAAmEE;IAEnE,qBACE,MAACA,MAAMC,IAAI;;YACRD,MAAMC,IAAI,CAACC,QAAQ;YACnBF,MAAMG,KAAK,kBACV,MAACH,MAAMG,KAAK;;oBACTH,MAAMI,eAAe,kBAAI,KAACJ,MAAMI,eAAe;oBAC/CJ,MAAMK,UAAU,kBAAI,KAACL,MAAMK,UAAU;;;;;AAKhD,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPickerControl/useTagPickerControl.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n ExtractSlotProps,\n Slot,\n elementContains,\n getIntrinsicElementProps,\n slot,\n useEventCallback,\n useId,\n useMergedRefs,\n} from '@fluentui/react-utilities';\nimport { useFluent_unstable } from '@fluentui/react-shared-contexts';\nimport type { TagPickerControlProps, TagPickerControlState } from './TagPickerControl.types';\nimport { useTagPickerContext_unstable } from '../../contexts/TagPickerContext';\nimport { ChevronDownRegular } from '@fluentui/react-icons';\nimport { useResizeObserverRef } from '../../utils/useResizeObserverRef';\nimport { tagPickerControlAsideWidthToken } from './useTagPickerControlStyles.styles';\nimport { useFieldContext_unstable } from '@fluentui/react-field';\nimport { useExpandLabel } from '../../utils/useExpandLabel';\n\n/**\n * Create the state required to render PickerControl.\n *\n * The returned state can be modified with hooks such as usePickerControlStyles_unstable,\n * before being passed to renderPickerControl_unstable.\n *\n * @param props - props from this instance of PickerControl\n * @param ref - reference to root HTMLDivElement of PickerControl\n */\nexport const useTagPickerControl_unstable = (\n props: TagPickerControlProps,\n ref: React.Ref<HTMLDivElement>,\n): TagPickerControlState => {\n const targetRef = useTagPickerContext_unstable(ctx => ctx.targetRef);\n const triggerRef = useTagPickerContext_unstable(ctx => ctx.triggerRef);\n const tagPickerGroupRef = useTagPickerContext_unstable(ctx => ctx.tagPickerGroupRef);\n const open = useTagPickerContext_unstable(ctx => ctx.open);\n const popoverId = useTagPickerContext_unstable(ctx => ctx.popoverId);\n const setOpen = useTagPickerContext_unstable(ctx => ctx.setOpen);\n const secondaryInnerActionRef = useTagPickerContext_unstable(ctx => ctx.secondaryActionRef);\n const size = useTagPickerContext_unstable(ctx => ctx.size);\n const appearance = useTagPickerContext_unstable(ctx => ctx.appearance);\n const disabled = useTagPickerContext_unstable(ctx => ctx.disabled);\n const invalid = useFieldContext_unstable()?.validationState === 'error';\n const noPopover = useTagPickerContext_unstable(ctx => ctx.noPopover ?? false);\n\n const { targetDocument } = useFluent_unstable();\n const tagPickerId = useId('tagPicker-');\n const rafIdRef = React.useRef<number | null>(null);\n\n const innerRef = React.useRef<HTMLDivElement>(null);\n const expandIconRef = React.useRef<HTMLSpanElement>(null);\n const asideRef = React.useRef<HTMLSpanElement>(null);\n\n const secondaryAction = slot.optional(props.secondaryAction, {\n elementType: 'span',\n });\n const secondaryActionRef = useMergedRefs(secondaryInnerActionRef, secondaryAction?.ref);\n if (secondaryAction) {\n secondaryAction.ref = secondaryActionRef;\n }\n\n const expandIcon = slot.optional(props.expandIcon, {\n renderByDefault: !noPopover,\n defaultProps: {\n 'aria-expanded': open,\n 'aria-disabled': disabled ? 'true' : undefined,\n children: <ChevronDownRegular />,\n role: 'button',\n },\n elementType: 'span',\n });\n\n const expandIconMergeRef = useMergedRefs(expandIcon?.ref, expandIconRef);\n if (expandIcon) {\n expandIcon.ref = expandIconMergeRef;\n }\n\n const observerRef = useResizeObserverRef<HTMLSpanElement>(([entry]) => {\n const targetWindow = targetDocument?.defaultView;\n\n if (targetWindow) {\n rafIdRef.current = targetWindow.requestAnimationFrame(() => {\n innerRef.current?.style.setProperty(tagPickerControlAsideWidthToken, `${entry.contentRect.width}px`);\n });\n }\n });\n const aside = slot.optional<ExtractSlotProps<Slot<'span'>>>(undefined, {\n elementType: 'span',\n renderByDefault: Boolean(secondaryAction || expandIcon),\n defaultProps: {\n ref: observerRef,\n },\n });\n const mergedAsideRefs = useMergedRefs(asideRef, aside?.ref);\n if (aside) {\n aside.ref = mergedAsideRefs;\n }\n\n const handleMouseDown = useEventCallback((event: React.MouseEvent<HTMLDivElement>) => {\n if (event.isDefaultPrevented()) {\n return;\n }\n if (\n elementContains(expandIconRef.current, event.target as Node) ||\n event.target === innerRef.current ||\n event.target === tagPickerGroupRef.current ||\n event.target === asideRef.current\n ) {\n event.preventDefault();\n setOpen(event, !open);\n triggerRef.current?.focus();\n }\n });\n\n const state: TagPickerControlState = {\n components: {\n root: 'div',\n expandIcon: 'span',\n secondaryAction: 'span',\n aside: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref: useMergedRefs(ref, targetRef, innerRef),\n 'aria-owns': open && !noPopover ? popoverId : undefined,\n ...props,\n onMouseDown: handleMouseDown,\n }),\n { elementType: 'div' },\n ),\n aside,\n expandIcon,\n secondaryAction,\n size,\n appearance,\n disabled,\n invalid,\n };\n\n const expandIconLabelRef = useExpandLabel({ tagPickerId, state: state as Pick<TagPickerControlState, 'expandIcon'> });\n\n const expandIconLabelMergeRef = useMergedRefs(expandIcon?.ref, expandIconLabelRef);\n if (state.expandIcon) {\n state.expandIcon.ref = expandIconLabelMergeRef;\n }\n\n React.useEffect(() => {\n if (rafIdRef.current && targetDocument?.defaultView) {\n targetDocument.defaultView.cancelAnimationFrame(rafIdRef.current);\n }\n }, [targetDocument]);\n\n return state;\n};\n"],"names":["React","elementContains","getIntrinsicElementProps","slot","useEventCallback","useId","useMergedRefs","useFluent_unstable","useTagPickerContext_unstable","ChevronDownRegular","useResizeObserverRef","tagPickerControlAsideWidthToken","useFieldContext_unstable","useExpandLabel","useTagPickerControl_unstable","props","ref","targetRef","ctx","triggerRef","tagPickerGroupRef","open","popoverId","setOpen","secondaryInnerActionRef","secondaryActionRef","size","appearance","disabled","invalid","validationState","noPopover","targetDocument","tagPickerId","rafIdRef","useRef","innerRef","expandIconRef","asideRef","secondaryAction","optional","elementType","expandIcon","renderByDefault","defaultProps","undefined","children","role","expandIconMergeRef","observerRef","entry","targetWindow","defaultView","current","requestAnimationFrame","style","setProperty","contentRect","width","aside","Boolean","mergedAsideRefs","handleMouseDown","event","isDefaultPrevented","target","preventDefault","focus","state","components","root","always","onMouseDown","expandIconLabelRef","expandIconLabelMergeRef","useEffect","cancelAnimationFrame"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAGEC,eAAe,EACfC,wBAAwB,EACxBC,IAAI,EACJC,gBAAgB,EAChBC,KAAK,EACLC,aAAa,QACR,4BAA4B;AACnC,SAASC,kBAAkB,QAAQ,kCAAkC;AAErE,SAASC,4BAA4B,QAAQ,kCAAkC;AAC/E,SAASC,kBAAkB,QAAQ,wBAAwB;AAC3D,SAASC,oBAAoB,QAAQ,mCAAmC;AACxE,SAASC,+BAA+B,QAAQ,qCAAqC;AACrF,SAASC,wBAAwB,QAAQ,wBAAwB;AACjE,SAASC,cAAc,QAAQ,6BAA6B;AAE5D;;;;;;;;CAQC,GACD,OAAO,MAAMC,+BAA+B,CAC1CC,OACAC;QAYgBJ;IAVhB,MAAMK,YAAYT,6BAA6BU,CAAAA,MAAOA,IAAID,SAAS;IACnE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C,OAAO,CAAC1C;aAChBF,sBAAAA,WAAWkC,OAAO,cAAlBlC,0CAAAA,oBAAoBgD,KAAK;QAC3B;IACF;IAEA,MAAMC,QAA+B;QACnCC,YAAY;YACVC,MAAM;YACN5B,YAAY;YACZH,iBAAiB;YACjBoB,OAAO;QACT;QACAW,MAAMnE,KAAKoE,MAAM,CACfrE,yBAAyB,OAAO;YAC9Bc,KAAKV,cAAcU,KAAKC,WAAWmB;YACnC,aAAaf,QAAQ,CAACU,YAAYT,YAAYuB;YAC9C,GAAG9B,KAAK;YACRyD,aAAaV;QACf,IACA;YAAErB,aAAa;QAAM;QAEvBkB;QACAjB;QACAH;QACAb;QACAC;QACAC;QACAC;IACF;IAEA,MAAM4C,qBAAqB5D,eAAe;QAAEoB;QAAamC,OAAOA;IAAmD;IAEnH,MAAMM,0BAA0BpE,cAAcoC,uBAAAA,iCAAAA,WAAY1B,GAAG,EAAEyD;IAC/D,IAAIL,MAAM1B,UAAU,EAAE;QACpB0B,MAAM1B,UAAU,CAAC1B,GAAG,GAAG0D;IACzB;IAEA1E,MAAM2E,SAAS,CAAC;QACd,IAAIzC,SAASmB,OAAO,KAAIrB,2BAAAA,qCAAAA,eAAgBoB,WAAW,GAAE;YACnDpB,eAAeoB,WAAW,CAACwB,oBAAoB,CAAC1C,SAASmB,OAAO;QAClE;IACF,GAAG;QAACrB;KAAe;IAEnB,OAAOoC;AACT,EAAE"}
1
+ {"version":3,"sources":["../src/components/TagPickerControl/useTagPickerControl.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n ExtractSlotProps,\n Slot,\n elementContains,\n getIntrinsicElementProps,\n slot,\n useEventCallback,\n useId,\n useMergedRefs,\n} from '@fluentui/react-utilities';\nimport { useFluent_unstable } from '@fluentui/react-shared-contexts';\nimport type { TagPickerControlProps, TagPickerControlState } from './TagPickerControl.types';\nimport { useTagPickerContext_unstable } from '../../contexts/TagPickerContext';\nimport { ChevronDownRegular } from '@fluentui/react-icons';\nimport { useResizeObserverRef } from '../../utils/useResizeObserverRef';\nimport { tagPickerControlAsideWidthToken } from './useTagPickerControlStyles.styles';\nimport { useFieldContext_unstable } from '@fluentui/react-field';\nimport { useExpandLabel } from '../../utils/useExpandLabel';\n\n/**\n * Create the state required to render PickerControl.\n *\n * The returned state can be modified with hooks such as usePickerControlStyles_unstable,\n * before being passed to renderPickerControl_unstable.\n *\n * @param props - props from this instance of PickerControl\n * @param ref - reference to root HTMLDivElement of PickerControl\n */\nexport const useTagPickerControl_unstable = (\n props: TagPickerControlProps,\n ref: React.Ref<HTMLDivElement>,\n): TagPickerControlState => {\n const targetRef = useTagPickerContext_unstable(ctx => ctx.targetRef);\n const triggerRef = useTagPickerContext_unstable(ctx => ctx.triggerRef);\n const tagPickerGroupRef = useTagPickerContext_unstable(ctx => ctx.tagPickerGroupRef);\n const open = useTagPickerContext_unstable(ctx => ctx.open);\n const popoverId = useTagPickerContext_unstable(ctx => ctx.popoverId);\n const setOpen = useTagPickerContext_unstable(ctx => ctx.setOpen);\n const secondaryInnerActionRef = useTagPickerContext_unstable(ctx => ctx.secondaryActionRef);\n const size = useTagPickerContext_unstable(ctx => ctx.size);\n const appearance = useTagPickerContext_unstable(ctx => ctx.appearance);\n const disabled = useTagPickerContext_unstable(ctx => ctx.disabled);\n const invalid = useFieldContext_unstable()?.validationState === 'error';\n const noPopover = useTagPickerContext_unstable(ctx => ctx.noPopover ?? false);\n\n const { targetDocument } = useFluent_unstable();\n const tagPickerId = useId('tagPicker-');\n const rafIdRef = React.useRef<number | null>(null);\n\n const innerRef = React.useRef<HTMLDivElement>(null);\n const expandIconRef = React.useRef<HTMLSpanElement>(null);\n const asideRef = React.useRef<HTMLSpanElement>(null);\n\n const secondaryAction = slot.optional(props.secondaryAction, {\n elementType: 'span',\n });\n const secondaryActionRef = useMergedRefs(secondaryInnerActionRef, secondaryAction?.ref);\n if (secondaryAction) {\n secondaryAction.ref = secondaryActionRef;\n }\n\n const expandIcon = slot.optional(props.expandIcon, {\n renderByDefault: !noPopover,\n defaultProps: {\n 'aria-expanded': open,\n 'aria-disabled': disabled ? 'true' : undefined,\n children: <ChevronDownRegular />,\n role: 'button',\n },\n elementType: 'span',\n });\n\n const expandIconMergeRef = useMergedRefs(expandIcon?.ref, expandIconRef);\n if (expandIcon) {\n expandIcon.ref = expandIconMergeRef;\n }\n\n const observerRef = useResizeObserverRef<HTMLSpanElement>(([entry]) => {\n const targetWindow = targetDocument?.defaultView;\n\n if (targetWindow) {\n rafIdRef.current = targetWindow.requestAnimationFrame(() => {\n innerRef.current?.style.setProperty(tagPickerControlAsideWidthToken, `${entry.contentRect.width}px`);\n });\n }\n });\n const aside = slot.optional<ExtractSlotProps<Slot<'span'>>>(undefined, {\n elementType: 'span',\n renderByDefault: Boolean(secondaryAction || expandIcon),\n defaultProps: {\n ref: observerRef,\n },\n });\n const mergedAsideRefs = useMergedRefs(asideRef, aside?.ref);\n if (aside) {\n aside.ref = mergedAsideRefs;\n }\n\n const handleMouseDown = useEventCallback((event: React.MouseEvent<HTMLDivElement>) => {\n if (event.isDefaultPrevented()) {\n return;\n }\n if (\n elementContains(expandIconRef.current, event.target as Node) ||\n event.target === innerRef.current ||\n event.target === tagPickerGroupRef.current ||\n event.target === asideRef.current\n ) {\n event.preventDefault();\n setOpen(event, !open);\n triggerRef.current?.focus();\n }\n });\n\n const state: TagPickerControlState = {\n components: {\n root: 'div',\n expandIcon: 'span',\n secondaryAction: 'span',\n aside: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref: useMergedRefs(ref, targetRef, innerRef),\n 'aria-owns': open && !noPopover ? popoverId : undefined,\n ...props,\n onMouseDown: handleMouseDown,\n }),\n { elementType: 'div' },\n ),\n aside,\n expandIcon,\n secondaryAction,\n size,\n appearance,\n disabled,\n invalid,\n };\n\n const expandIconLabelRef = useExpandLabel({ tagPickerId, state: state as Pick<TagPickerControlState, 'expandIcon'> });\n\n const expandIconLabelMergeRef = useMergedRefs(expandIcon?.ref, expandIconLabelRef);\n if (state.expandIcon) {\n state.expandIcon.ref = expandIconLabelMergeRef;\n }\n\n React.useEffect(() => {\n if (rafIdRef.current && targetDocument?.defaultView) {\n targetDocument.defaultView.cancelAnimationFrame(rafIdRef.current);\n }\n }, [targetDocument]);\n\n return state;\n};\n"],"names":["React","elementContains","getIntrinsicElementProps","slot","useEventCallback","useId","useMergedRefs","useFluent_unstable","useTagPickerContext_unstable","ChevronDownRegular","useResizeObserverRef","tagPickerControlAsideWidthToken","useFieldContext_unstable","useExpandLabel","useTagPickerControl_unstable","props","ref","targetRef","ctx","triggerRef","tagPickerGroupRef","open","popoverId","setOpen","secondaryInnerActionRef","secondaryActionRef","size","appearance","disabled","invalid","validationState","noPopover","targetDocument","tagPickerId","rafIdRef","useRef","innerRef","expandIconRef","asideRef","secondaryAction","optional","elementType","expandIcon","renderByDefault","defaultProps","undefined","children","role","expandIconMergeRef","observerRef","entry","targetWindow","defaultView","current","requestAnimationFrame","style","setProperty","contentRect","width","aside","Boolean","mergedAsideRefs","handleMouseDown","event","isDefaultPrevented","target","preventDefault","focus","state","components","root","always","onMouseDown","expandIconLabelRef","expandIconLabelMergeRef","useEffect","cancelAnimationFrame"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAGEC,eAAe,EACfC,wBAAwB,EACxBC,IAAI,EACJC,gBAAgB,EAChBC,KAAK,EACLC,aAAa,QACR,4BAA4B;AACnC,SAASC,kBAAkB,QAAQ,kCAAkC;AAErE,SAASC,4BAA4B,QAAQ,kCAAkC;AAC/E,SAASC,kBAAkB,QAAQ,wBAAwB;AAC3D,SAASC,oBAAoB,QAAQ,mCAAmC;AACxE,SAASC,+BAA+B,QAAQ,qCAAqC;AACrF,SAASC,wBAAwB,QAAQ,wBAAwB;AACjE,SAASC,cAAc,QAAQ,6BAA6B;AAE5D;;;;;;;;CAQC,GACD,OAAO,MAAMC,+BAA+B,CAC1CC,OACAC;QAYgBJ;IAVhB,MAAMK,YAAYT,6BAA6BU,CAAAA,MAAOA,IA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AQwC,OAAO,CAAC1C;aAChBF,sBAAAA,WAAWkC,OAAO,cAAlBlC,0CAAAA,oBAAoBgD,KAAK;QAC3B;IACF;IAEA,MAAMC,QAA+B;QACnCC,YAAY;YACVC,MAAM;YACN5B,YAAY;YACZH,iBAAiB;YACjBoB,OAAO;QACT;QACAW,MAAMnE,KAAKoE,MAAM,CACfrE,yBAAyB,OAAO;YAC9Bc,KAAKV,cAAcU,KAAKC,WAAWmB;YACnC,aAAaf,QAAQ,CAACU,YAAYT,YAAYuB;YAC9C,GAAG9B,KAAK;YACRyD,aAAaV;QACf,IACA;YAAErB,aAAa;QAAM;QAEvBkB;QACAjB;QACAH;QACAb;QACAC;QACAC;QACAC;IACF;IAEA,MAAM4C,qBAAqB5D,eAAe;QAAEoB;QAAamC,OAAOA;IAAmD;IAEnH,MAAMM,0BAA0BpE,cAAcoC,uBAAAA,iCAAAA,WAAY1B,GAAG,EAAEyD;IAC/D,IAAIL,MAAM1B,UAAU,EAAE;QACpB0B,MAAM1B,UAAU,CAAC1B,GAAG,GAAG0D;IACzB;IAEA1E,MAAM2E,SAAS,CAAC;QACd,IAAIzC,SAASmB,OAAO,KAAIrB,2BAAAA,qCAAAA,eAAgBoB,WAAW,GAAE;YACnDpB,eAAeoB,WAAW,CAACwB,oBAAoB,CAAC1C,SAASmB,OAAO;QAClE;IACF,GAAG;QAACrB;KAAe;IAEnB,OAAOoC;AACT,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPickerControl/useTagPickerControlStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { tokens } from '@fluentui/react-theme';\nimport type {\n TagPickerControlInternalSlots,\n TagPickerControlSlots,\n TagPickerControlState,\n} from './TagPickerControl.types';\n\nexport const tagPickerControlClassNames: SlotClassNames<TagPickerControlSlots & TagPickerControlInternalSlots> = {\n root: 'fui-TagPickerControl',\n expandIcon: 'fui-TagPickerControl__expandIcon',\n secondaryAction: 'fui-TagPickerControl__secondaryAction',\n aside: 'fui-TagPickerControl__aside',\n};\n\nexport const tagPickerControlAsideWidthToken = '--fui-TagPickerControl-aside-width' as const;\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n borderRadius: tokens.borderRadiusMedium,\n paddingRight: `calc(${tokens.spacingHorizontalM} + var(${tagPickerControlAsideWidthToken}, 0px))`,\n paddingLeft: tokens.spacingHorizontalM,\n alignItems: 'center',\n columnGap: tokens.spacingHorizontalXXS,\n boxSizing: 'border-box',\n display: 'flex',\n minWidth: '250px',\n position: 'relative',\n flexWrap: 'wrap',\n\n // windows high contrast mode focus indicator\n ':focus-within': {\n outlineWidth: '2px',\n outlineStyle: 'solid',\n outlineColor: 'transparent',\n },\n\n // bottom focus border, shared with Input, Select, and SpinButton\n '::after': {\n boxSizing: 'border-box',\n content: '\"\"',\n position: 'absolute',\n left: '-1px',\n bottom: '-1px',\n right: '-1px',\n height: `max(2px, ${tokens.borderRadiusMedium})`,\n borderBottomLeftRadius: tokens.borderRadiusMedium,\n borderBottomRightRadius: tokens.borderRadiusMedium,\n borderBottom: `${tokens.strokeWidthThick} solid ${tokens.colorCompoundBrandStroke}`,\n clipPath: 'inset(calc(100% - 2px) 0 0 0)',\n transform: 'scaleX(0)',\n transitionProperty: 'transform',\n transitionDuration: tokens.durationUltraFast,\n transitionDelay: tokens.curveAccelerateMid,\n\n '@media screen and (prefers-reduced-motion: reduce)': {\n transitionDuration: '0.01ms',\n transitionDelay: '0.01ms',\n },\n },\n ':focus-within::after': {\n transform: 'scaleX(1)',\n transitionProperty: 'transform',\n transitionDuration: tokens.durationNormal,\n transitionDelay: tokens.curveDecelerateMid,\n\n '@media screen and (prefers-reduced-motion: reduce)': {\n transitionDuration: '0.01ms',\n transitionDelay: '0.01ms',\n },\n },\n ':focus-within:active::after': {\n borderBottomColor: tokens.colorCompoundBrandStrokePressed,\n },\n },\n\n listbox: {\n boxShadow: `${tokens.shadow16}`,\n borderRadius: tokens.borderRadiusMedium,\n maxHeight: '80vh',\n boxSizing: 'border-box',\n },\n\n listboxCollapsed: {\n display: 'none',\n },\n\n // size variants\n medium: {\n minHeight: '32px',\n },\n large: {\n minHeight: '40px',\n },\n 'extra-large': {\n minHeight: '44px',\n },\n\n // appearance variants\n outline: {\n backgroundColor: tokens.colorNeutralBackground1,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,\n borderBottomColor: tokens.colorNeutralStrokeAccessible,\n },\n\n outlineInteractive: {\n '&:hover': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Hover),\n borderBottomColor: tokens.colorNeutralStrokeAccessibleHover,\n },\n\n '&:active': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Pressed),\n borderBottomColor: tokens.colorNeutralStrokeAccessiblePressed,\n },\n\n '&:focus-within': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Pressed),\n borderBottomColor: tokens.colorNeutralStrokeAccessiblePressed,\n },\n },\n underline: {\n backgroundColor: tokens.colorTransparentBackground,\n borderBottom: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStrokeAccessible}`,\n borderRadius: '0',\n },\n 'filled-lighter': {\n backgroundColor: tokens.colorNeutralBackground1,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,\n },\n 'filled-darker': {\n backgroundColor: tokens.colorNeutralBackground3,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,\n },\n invalid: {\n ':not(:focus-within),:hover:not(:focus-within)': {\n ...shorthands.borderColor(tokens.colorPaletteRedBorder2),\n },\n },\n invalidUnderline: {\n ':not(:focus-within),:hover:not(:focus-within)': {\n borderBottomColor: tokens.colorPaletteRedBorder2,\n },\n },\n\n disabled: {\n cursor: 'not-allowed',\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n '@media (forced-colors: active)': {\n ...shorthands.borderColor('GrayText'),\n },\n },\n});\n\nconst useAsideStyles = makeStyles({\n root: {\n display: 'flex',\n position: 'absolute',\n top: '0',\n right: tokens.spacingHorizontalM,\n height: '100%',\n cursor: 'text',\n },\n // size variants\n medium: {\n minHeight: '32px',\n },\n large: {\n minHeight: '40px',\n },\n 'extra-large': {\n minHeight: '44px',\n },\n});\n\nexport const iconSizes = {\n small: '16px',\n medium: '20px',\n large: '24px',\n};\n\nconst useIconStyles = makeStyles({\n icon: {\n boxSizing: 'border-box',\n color: tokens.colorNeutralStrokeAccessible,\n cursor: 'pointer',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n alignSelf: 'flex-start',\n fontSize: tokens.fontSizeBase500,\n // the SVG must have display: block for accurate positioning\n // otherwise an extra inline space is inserted after the svg element\n '& svg': {\n display: 'block',\n },\n },\n // icon size variants\n medium: {\n fontSize: iconSizes.small,\n marginLeft: tokens.spacingHorizontalXXS,\n minHeight: '32px',\n },\n large: {\n fontSize: iconSizes.medium,\n marginLeft: tokens.spacingHorizontalXXS,\n minHeight: '40px',\n },\n 'extra-large': {\n fontSize: iconSizes.large,\n marginLeft: tokens.spacingHorizontalSNudge,\n minHeight: '44px',\n },\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n cursor: 'not-allowed',\n },\n});\n\nconst useSecondaryActionStyles = makeStyles({\n root: { display: 'flex' },\n});\n\n/**\n * Apply styling to the PickerControl slots based on the state\n */\nexport const useTagPickerControlStyles_unstable = (state: TagPickerControlState): TagPickerControlState => {\n 'use no memo';\n\n const styles = useStyles();\n const iconStyles = useIconStyles();\n const asideStyles = useAsideStyles();\n const secondaryActionStyles = useSecondaryActionStyles();\n state.root.className = mergeClasses(\n tagPickerControlClassNames.root,\n styles.root,\n styles[state.size],\n styles[state.appearance],\n !state.disabled && state.appearance === 'outline' && styles.outlineInteractive,\n state.invalid && state.appearance !== 'underline' && styles.invalid,\n state.invalid && state.appearance === 'underline' && styles.invalidUnderline,\n state.disabled && styles.disabled,\n state.root.className,\n );\n\n if (state.aside) {\n state.aside.className = mergeClasses(\n tagPickerControlClassNames.aside,\n asideStyles.root,\n asideStyles[state.size],\n state.aside.className,\n );\n }\n\n if (state.expandIcon) {\n state.expandIcon.className = mergeClasses(\n tagPickerControlClassNames.expandIcon,\n iconStyles.icon,\n iconStyles[state.size],\n state.disabled && iconStyles.disabled,\n state.expandIcon.className,\n );\n }\n\n if (state.secondaryAction) {\n state.secondaryAction.className = mergeClasses(\n tagPickerControlClassNames.secondaryAction,\n secondaryActionStyles.root,\n state.secondaryAction.className,\n );\n }\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","shorthands","tokens","tagPickerControlClassNames","root","expandIcon","secondaryAction","aside","tagPickerControlAsideWidthToken","useStyles","borderRadius","borderRadiusMedium","paddingRight","spacingHorizontalM","paddingLeft","alignItems","columnGap","spacingHorizontalXXS","boxSizing","display","minWidth","position","flexWrap","outlineWidth","outlineStyle","outlineColor","content","left","bottom","right","height","borderBottomLeftRadius","borderBottomRightRadius","borderBottom","strokeWidthThick","colorCompoundBrandStroke","clipPath","transform","transitionProperty","transitionDuration","durationUltraFast","transitionDelay","curveAccelerateMid","durationNormal","curveDecelerateMid","borderBottomColor","colorCompoundBrandStrokePressed","listbox","boxShadow","shadow16","maxHeight","listboxCollapsed","medium","minHeight","large","outline","backgroundColor","colorNeutralBackground1","border","strokeWidthThin","colorNeutralStroke1","colorNeutralStrokeAccessible","outlineInteractive","borderColor","colorNeutralStroke1Hover","colorNeutralStrokeAccessibleHover","colorNeutralStroke1Pressed","colorNeutralStrokeAccessiblePressed","underline","colorTransparentBackground","colorTransparentStroke","colorNeutralBackground3","invalid","colorPaletteRedBorder2","invalidUnderline","disabled","cursor","colorNeutralStrokeDisabled","useAsideStyles","top","iconSizes","small","useIconStyles","icon","color","justifyContent","alignSelf","fontSize","fontSizeBase500","marginLeft","spacingHorizontalSNudge","colorNeutralForegroundDisabled","useSecondaryActionStyles","useTagPickerControlStyles_unstable","state","styles","iconStyles","asideSty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CmB,MAAM1F,IAAI,CAAC+F,SAAS;IAGtB,IAAIL,MAAMvF,KAAK,EAAE;QACfuF,MAAMvF,KAAK,CAAC4F,SAAS,GAAGnG,aACtBG,2BAA2BI,KAAK,EAChC0F,YAAY7F,IAAI,EAChB6F,WAAW,CAACH,MAAMM,IAAI,CAAC,EACvBN,MAAMvF,KAAK,CAAC4F,SAAS;IAEzB;IAEA,IAAIL,MAAMzF,UAAU,EAAE;QACpByF,MAAMzF,UAAU,CAAC8F,SAAS,GAAGnG,aAC3BG,2BAA2BE,UAAU,EACrC2F,WAAWb,IAAI,EACfa,UAAU,CAACF,MAAMM,IAAI,CAAC,EACtBN,MAAMnB,QAAQ,IAAIqB,WAAWrB,QAAQ,EACrCmB,MAAMzF,UAAU,CAAC8F,SAAS;IAE9B;IAEA,IAAIL,MAAMxF,eAAe,EAAE;QACzBwF,MAAMxF,eAAe,CAAC6F,SAAS,GAAGnG,aAChCG,2BAA2BG,eAAe,EAC1C4F,sBAAsB9F,IAAI,EAC1B0F,MAAMxF,eAAe,CAAC6F,SAAS;IAEnC;IAEA,OAAOL;AACT,EAAE"}
1
+ {"version":3,"sources":["../src/components/TagPickerControl/useTagPickerControlStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { tokens } from '@fluentui/react-theme';\nimport type {\n TagPickerControlInternalSlots,\n TagPickerControlSlots,\n TagPickerControlState,\n} from './TagPickerControl.types';\n\nexport const tagPickerControlClassNames: SlotClassNames<TagPickerControlSlots & TagPickerControlInternalSlots> = {\n root: 'fui-TagPickerControl',\n expandIcon: 'fui-TagPickerControl__expandIcon',\n secondaryAction: 'fui-TagPickerControl__secondaryAction',\n aside: 'fui-TagPickerControl__aside',\n};\n\nexport const tagPickerControlAsideWidthToken = '--fui-TagPickerControl-aside-width' as const;\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n borderRadius: tokens.borderRadiusMedium,\n paddingRight: `calc(${tokens.spacingHorizontalM} + var(${tagPickerControlAsideWidthToken}, 0px))`,\n paddingLeft: tokens.spacingHorizontalM,\n alignItems: 'center',\n columnGap: tokens.spacingHorizontalXXS,\n boxSizing: 'border-box',\n display: 'flex',\n minWidth: '250px',\n position: 'relative',\n flexWrap: 'wrap',\n\n // windows high contrast mode focus indicator\n ':focus-within': {\n outlineWidth: '2px',\n outlineStyle: 'solid',\n outlineColor: 'transparent',\n },\n\n // bottom focus border, shared with Input, Select, and SpinButton\n '::after': {\n boxSizing: 'border-box',\n content: '\"\"',\n position: 'absolute',\n left: '-1px',\n bottom: '-1px',\n right: '-1px',\n height: `max(2px, ${tokens.borderRadiusMedium})`,\n borderBottomLeftRadius: tokens.borderRadiusMedium,\n borderBottomRightRadius: tokens.borderRadiusMedium,\n borderBottom: `${tokens.strokeWidthThick} solid ${tokens.colorCompoundBrandStroke}`,\n clipPath: 'inset(calc(100% - 2px) 0 0 0)',\n transform: 'scaleX(0)',\n transitionProperty: 'transform',\n transitionDuration: tokens.durationUltraFast,\n transitionDelay: tokens.curveAccelerateMid,\n\n '@media screen and (prefers-reduced-motion: reduce)': {\n transitionDuration: '0.01ms',\n transitionDelay: '0.01ms',\n },\n },\n ':focus-within::after': {\n transform: 'scaleX(1)',\n transitionProperty: 'transform',\n transitionDuration: tokens.durationNormal,\n transitionDelay: tokens.curveDecelerateMid,\n\n '@media screen and (prefers-reduced-motion: reduce)': {\n transitionDuration: '0.01ms',\n transitionDelay: '0.01ms',\n },\n },\n ':focus-within:active::after': {\n borderBottomColor: tokens.colorCompoundBrandStrokePressed,\n },\n },\n\n listbox: {\n boxShadow: `${tokens.shadow16}`,\n borderRadius: tokens.borderRadiusMedium,\n maxHeight: '80vh',\n boxSizing: 'border-box',\n },\n\n listboxCollapsed: {\n display: 'none',\n },\n\n // size variants\n medium: {\n minHeight: '32px',\n },\n large: {\n minHeight: '40px',\n },\n 'extra-large': {\n minHeight: '44px',\n },\n\n // appearance variants\n outline: {\n backgroundColor: tokens.colorNeutralBackground1,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,\n borderBottomColor: tokens.colorNeutralStrokeAccessible,\n },\n\n outlineInteractive: {\n '&:hover': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Hover),\n borderBottomColor: tokens.colorNeutralStrokeAccessibleHover,\n },\n\n '&:active': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Pressed),\n borderBottomColor: tokens.colorNeutralStrokeAccessiblePressed,\n },\n\n '&:focus-within': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Pressed),\n borderBottomColor: tokens.colorNeutralStrokeAccessiblePressed,\n },\n },\n underline: {\n backgroundColor: tokens.colorTransparentBackground,\n borderBottom: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStrokeAccessible}`,\n borderRadius: '0',\n },\n 'filled-lighter': {\n backgroundColor: tokens.colorNeutralBackground1,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,\n },\n 'filled-darker': {\n backgroundColor: tokens.colorNeutralBackground3,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,\n },\n invalid: {\n ':not(:focus-within),:hover:not(:focus-within)': {\n ...shorthands.borderColor(tokens.colorPaletteRedBorder2),\n },\n },\n invalidUnderline: {\n ':not(:focus-within),:hover:not(:focus-within)': {\n borderBottomColor: tokens.colorPaletteRedBorder2,\n },\n },\n\n disabled: {\n cursor: 'not-allowed',\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n '@media (forced-colors: active)': {\n ...shorthands.borderColor('GrayText'),\n },\n },\n});\n\nconst useAsideStyles = makeStyles({\n root: {\n display: 'flex',\n position: 'absolute',\n top: '0',\n right: tokens.spacingHorizontalM,\n height: '100%',\n cursor: 'text',\n },\n // size variants\n medium: {\n minHeight: '32px',\n },\n large: {\n minHeight: '40px',\n },\n 'extra-large': {\n minHeight: '44px',\n },\n});\n\nexport const iconSizes = {\n small: '16px',\n medium: '20px',\n large: '24px',\n};\n\nconst useIconStyles = makeStyles({\n icon: {\n boxSizing: 'border-box',\n color: tokens.colorNeutralStrokeAccessible,\n cursor: 'pointer',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n alignSelf: 'flex-start',\n fontSize: tokens.fontSizeBase500,\n // the SVG must have display: block for accurate positioning\n // otherwise an extra inline space is inserted after the svg element\n '& svg': {\n display: 'block',\n },\n },\n // icon size variants\n medium: {\n fontSize: iconSizes.small,\n marginLeft: tokens.spacingHorizontalXXS,\n minHeight: '32px',\n },\n large: {\n fontSize: iconSizes.medium,\n marginLeft: tokens.spacingHorizontalXXS,\n minHeight: '40px',\n },\n 'extra-large': {\n fontSize: iconSizes.large,\n marginLeft: tokens.spacingHorizontalSNudge,\n minHeight: '44px',\n },\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n cursor: 'not-allowed',\n },\n});\n\nconst useSecondaryActionStyles = makeStyles({\n root: { display: 'flex' },\n});\n\n/**\n * Apply styling to the PickerControl slots based on the state\n */\nexport const useTagPickerControlStyles_unstable = (state: TagPickerControlState): TagPickerControlState => {\n 'use no memo';\n\n const styles = useStyles();\n const iconStyles = useIconStyles();\n const asideStyles = useAsideStyles();\n const secondaryActionStyles = useSecondaryActionStyles();\n state.root.className = mergeClasses(\n tagPickerControlClassNames.root,\n styles.root,\n styles[state.size],\n styles[state.appearance],\n !state.disabled && state.appearance === 'outline' && styles.outlineInteractive,\n state.invalid && state.appearance !== 'underline' && styles.invalid,\n state.invalid && state.appearance === 'underline' && styles.invalidUnderline,\n state.disabled && styles.disabled,\n state.root.className,\n );\n\n if (state.aside) {\n state.aside.className = mergeClasses(\n tagPickerControlClassNames.aside,\n asideStyles.root,\n asideStyles[state.size],\n state.aside.className,\n );\n }\n\n if (state.expandIcon) {\n state.expandIcon.className = mergeClasses(\n tagPickerControlClassNames.expandIcon,\n iconStyles.icon,\n iconStyles[state.size],\n state.disabled && iconStyles.disabled,\n state.expandIcon.className,\n );\n }\n\n if (state.secondaryAction) {\n state.secondaryAction.className = mergeClasses(\n tagPickerControlClassNames.secondaryAction,\n secondaryActionStyles.root,\n state.secondaryAction.className,\n );\n }\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","shorthands","tokens","tagPickerControlClassNames","root","expandIcon","secondaryAction","aside","tagPickerControlAsideWidthToken","useStyles","borderRadius","borderRadiusMedium","paddingRight","spacingHorizontalM","paddingLeft","alignItems","columnGap","spacingHorizontalXXS","boxSizing","display","minWidth","position","flexWrap","outlineWidth","outlineStyle","outlineColor","content","left","bottom","right","height","borderBottomLeftRadius","borderBottomRightRadius","borderBottom","strokeWidthThick","colorCompoundBrandStroke","clipPath","transform","transitionProperty","transitionDuration","durationUltraFast","transitionDelay","curveAccelerateMid","durationNormal","curveDecelerateMid","borderBottomColor","colorCompoundBrandStrokePressed","listbox","boxShadow","shadow16","maxHeight","listboxCollapsed","medium","minHeight","large","outline","backgroundColor","colorNeutralBackground1","border","strokeWidthThin","colorNeutralStroke1","colorNeutralStrokeAccessible","outlineInteractive","borderColor","colorNeutralStroke1Hover","colorNeutralStrokeAccessibleHover","colorNeutralStroke1Pressed","colorNeutralStrokeAccessiblePressed","underline","colorTransparentBackground","colorTransparentStroke","colorNeutralBackground3","invalid","colorPaletteRedBorder2","invalidUnderline","disabled","cursor","colorNeutralStrokeDisabled","useAsideStyles","top","iconSizes","small","useIconStyles","icon","color","justifyContent","alignSelf","fontSize","fontSizeBase500","marginLeft","spacingHorizontalSNudge","colorNeutralForegroundDisabled","useSecondaryActionStyles","useTagPickerControlStyles_unstable","state","styles","iconStyles","asideStyles","secondaryActionStyles","className","size","appearance"],"mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,EAAEC,UAAU,QAAQ,iBAAiB;AAEtE,SAASC,MAAM,QAAQ,wBAAwB;AAO/C,OAAO,MAAMC,6BAAoG;IAC/GC,MAAM;IACNC,YAAY;IACZC,iBAAiB;IAC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eAAe,CAAC6F,SAAS,GAAGnG,aAChCG,2BAA2BG,eAAe,EAC1C4F,sBAAsB9F,IAAI,EAC1B0F,MAAMxF,eAAe,CAAC6F,SAAS;IAEnC;IAEA,OAAOL;AACT,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPickerGroup/TagPickerGroup.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useTagPickerGroup_unstable } from './useTagPickerGroup';\nimport type { TagPickerGroupProps } from './TagPickerGroup.types';\nimport { useTagGroupContextValues_unstable } from '@fluentui/react-tags';\nimport { renderTagPickerGroup_unstable } from './renderTagPickerGroup';\nimport { useTagPickerGroupStyles_unstable } from './useTagPickerGroupStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * TagPickerGroup component -\n * A TagPickerGroup is a composite component that allows users to group tags together.\n */\nexport const TagPickerGroup: ForwardRefComponent<TagPickerGroupProps> = React.forwardRef((props, ref) => {\n const state = useTagPickerGroup_unstable(props, ref);\n\n useTagPickerGroupStyles_unstable(state);\n useCustomStyleHook_unstable('useTagPickerGroupStyles_unstable')(state);\n return renderTagPickerGroup_unstable(state, useTagGroupContextValues_unstable(state));\n});\n\nTagPickerGroup.displayName = 'TagPickerGroup';\n"],"names":["React","useTagPickerGroup_unstable","useTagGroupContextValues_unstable","renderTagPickerGroup_unstable","useTagPickerGroupStyles_unstable","useCustomStyleHook_unstable","TagPickerGroup","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,0BAA0B,QAAQ,sBAAsB;AAEjE,SAASC,iCAAiC,QAAQ,uBAAuB;AACzE,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,gCAAgC,QAAQ,mCAAmC;AACpF,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;;CAGC,GACD,OAAO,MAAMC,+BAA2DN,MAAMO,UAAU,CAAC,CAACC,OAAOC;IAC/F,MAAMC,QAAQT,2BAA2BO,OAAOC;IAEhDL,iCAAiCM;IACjCL,4BAA4B,oCAAoCK;IAChE,OAAOP,8BAA8BO,OAAOR,kCAAkCQ;AAChF,GAAG;AAEHJ,eAAeK,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/components/TagPickerGroup/TagPickerGroup.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useTagPickerGroup_unstable } from './useTagPickerGroup';\nimport type { TagPickerGroupProps } from './TagPickerGroup.types';\nimport { useTagGroupContextValues_unstable } from '@fluentui/react-tags';\nimport { renderTagPickerGroup_unstable } from './renderTagPickerGroup';\nimport { useTagPickerGroupStyles_unstable } from './useTagPickerGroupStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * TagPickerGroup component -\n * A TagPickerGroup is a composite component that allows users to group tags together.\n */\nexport const TagPickerGroup: ForwardRefComponent<TagPickerGroupProps> = React.forwardRef((props, ref) => {\n const state = useTagPickerGroup_unstable(props, ref);\n\n useTagPickerGroupStyles_unstable(state);\n useCustomStyleHook_unstable('useTagPickerGroupStyles_unstable')(state);\n return renderTagPickerGroup_unstable(state, useTagGroupContextValues_unstable(state));\n});\n\nTagPickerGroup.displayName = 'TagPickerGroup';\n"],"names":["React","useTagPickerGroup_unstable","useTagGroupContextValues_unstable","renderTagPickerGroup_unstable","useTagPickerGroupStyles_unstable","useCustomStyleHook_unstable","TagPickerGroup","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,0BAA0B,QAAQ,sBAAsB;AAEjE,SAASC,iCAAiC,QAAQ,uBAAuB;AACzE,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,gCAAgC,QAAQ,mCAAmC;AACpF,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;;CAGC,GACD,OAAO,MAAMC,+BAA2DN,MAAMO,UAAU,CAAC,CAACC,OAAOC;IAC/F,MAAMC,QAAQT,2BAA2BO,OAAOC;IAEhDL,iCAAiCM;IACjCL,4BAA4B,oCAAoCK;IAChE,OAAOP,8BAA8BO,OAAOR,kCAAkCQ;AAChF,GAAG;AAEHJ,eAAeK,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPickerGroup/TagPickerGroup.types.ts"],"sourcesContent":["import type { TagGroupSlots, TagGroupState } from '@fluentui/react-tags';\nimport type { ComponentProps } from '@fluentui/react-utilities';\n\nexport type TagPickerGroupSlots = TagGroupSlots;\n\n/**\n * TagPickerGroup Props\n */\nexport type TagPickerGroupProps = ComponentProps<TagPickerGroupSlots>;\n\n/**\n * State used in rendering TagPickerGroup\n */\nexport type TagPickerGroupState = TagGroupState & {\n hasSelectedOptions: boolean;\n};\n"],"names":[],"rangeMappings":";;","mappings":"AAUA;;CAEC,GACD,WAEE"}
1
+ {"version":3,"sources":["../src/components/TagPickerGroup/TagPickerGroup.types.ts"],"sourcesContent":["import type { TagGroupSlots, TagGroupState } from '@fluentui/react-tags';\nimport type { ComponentProps } from '@fluentui/react-utilities';\n\nexport type TagPickerGroupSlots = TagGroupSlots;\n\n/**\n * TagPickerGroup Props\n */\nexport type TagPickerGroupProps = ComponentProps<TagPickerGroupSlots>;\n\n/**\n * State used in rendering TagPickerGroup\n */\nexport type TagPickerGroupState = TagGroupState & {\n hasSelectedOptions: boolean;\n};\n"],"names":[],"mappings":"AAUA;;CAEC,GACD,WAEE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPickerGroup/index.ts"],"sourcesContent":["export { TagPickerGroup } from './TagPickerGroup';\nexport type { TagPickerGroupProps, TagPickerGroupSlots, TagPickerGroupState } from './TagPickerGroup.types';\nexport { renderTagPickerGroup_unstable } from './renderTagPickerGroup';\nexport { useTagPickerGroup_unstable } from './useTagPickerGroup';\nexport { tagPickerGroupClassNames, useTagPickerGroupStyles_unstable } from './useTagPickerGroupStyles.styles';\n"],"names":["TagPickerGroup","renderTagPickerGroup_unstable","useTagPickerGroup_unstable","tagPickerGroupClassNames","useTagPickerGroupStyles_unstable"],"rangeMappings":";;;","mappings":"AAAA,SAASA,cAAc,QAAQ,mBAAmB;AAElD,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,0BAA0B,QAAQ,sBAAsB;AACjE,SAASC,wBAAwB,EAAEC,gCAAgC,QAAQ,mCAAmC"}
1
+ {"version":3,"sources":["../src/components/TagPickerGroup/index.ts"],"sourcesContent":["export { TagPickerGroup } from './TagPickerGroup';\nexport type { TagPickerGroupProps, TagPickerGroupSlots, TagPickerGroupState } from './TagPickerGroup.types';\nexport { renderTagPickerGroup_unstable } from './renderTagPickerGroup';\nexport { useTagPickerGroup_unstable } from './useTagPickerGroup';\nexport { tagPickerGroupClassNames, useTagPickerGroupStyles_unstable } from './useTagPickerGroupStyles.styles';\n"],"names":["TagPickerGroup","renderTagPickerGroup_unstable","useTagPickerGroup_unstable","tagPickerGroupClassNames","useTagPickerGroupStyles_unstable"],"mappings":"AAAA,SAASA,cAAc,QAAQ,mBAAmB;AAElD,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,0BAA0B,QAAQ,sBAAsB;AACjE,SAASC,wBAAwB,EAAEC,gCAAgC,QAAQ,mCAAmC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPickerGroup/renderTagPickerGroup.ts"],"sourcesContent":["import { TagPickerGroupState } from './TagPickerGroup.types';\nimport { renderTagGroup_unstable, type TagGroupContextValues } from '@fluentui/react-tags';\n\nexport function renderTagPickerGroup_unstable(state: TagPickerGroupState, contexts: TagGroupContextValues) {\n if (!state.hasSelectedOptions) {\n return null;\n }\n\n return renderTagGroup_unstable(state, contexts);\n}\n"],"names":["renderTagGroup_unstable","renderTagPickerGroup_unstable","state","contexts","hasSelectedOptions"],"rangeMappings":";;;;;;","mappings":"AACA,SAASA,uBAAuB,QAAoC,uBAAuB;AAE3F,OAAO,SAASC,8BAA8BC,KAA0B,EAAEC,QAA+B;IACvG,IAAI,CAACD,MAAME,kBAAkB,EAAE;QAC7B,OAAO;IACT;IAEA,OAAOJ,wBAAwBE,OAAOC;AACxC"}
1
+ {"version":3,"sources":["../src/components/TagPickerGroup/renderTagPickerGroup.ts"],"sourcesContent":["import { TagPickerGroupState } from './TagPickerGroup.types';\nimport { renderTagGroup_unstable, type TagGroupContextValues } from '@fluentui/react-tags';\n\nexport function renderTagPickerGroup_unstable(state: TagPickerGroupState, contexts: TagGroupContextValues) {\n if (!state.hasSelectedOptions) {\n return null;\n }\n\n return renderTagGroup_unstable(state, contexts);\n}\n"],"names":["renderTagGroup_unstable","renderTagPickerGroup_unstable","state","contexts","hasSelectedOptions"],"mappings":"AACA,SAASA,uBAAuB,QAAoC,uBAAuB;AAE3F,OAAO,SAASC,8BAA8BC,KAA0B,EAAEC,QAA+B;IACvG,IAAI,CAACD,MAAME,kBAAkB,EAAE;QAC7B,OAAO;IACT;IAEA,OAAOJ,wBAAwBE,OAAOC;AACxC"}