@fluentui/react-tag-picker 9.10.5 → 9.10.7

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 (167) hide show
  1. package/CHANGELOG.md +29 -2
  2. package/lib/components/TagPicker/TagPicker.js.map +1 -1
  3. package/lib/components/TagPicker/TagPicker.types.js.map +1 -1
  4. package/lib/components/TagPicker/index.js.map +1 -1
  5. package/lib/components/TagPicker/renderTagPicker.js.map +1 -1
  6. package/lib/components/TagPicker/useTagPicker.js.map +1 -1
  7. package/lib/components/TagPicker/useTagPickerContextValues.js.map +1 -1
  8. package/lib/components/TagPickerButton/TagPickerButton.js.map +1 -1
  9. package/lib/components/TagPickerButton/TagPickerButton.types.js.map +1 -1
  10. package/lib/components/TagPickerButton/index.js.map +1 -1
  11. package/lib/components/TagPickerButton/renderTagPickerButton.js +2 -2
  12. package/lib/components/TagPickerButton/renderTagPickerButton.js.map +1 -1
  13. package/lib/components/TagPickerButton/useTagPickerButton.js.map +1 -1
  14. package/lib/components/TagPickerButton/useTagPickerButtonStyles.styles.raw.js.map +1 -1
  15. package/lib/components/TagPickerControl/TagPickerControl.js.map +1 -1
  16. package/lib/components/TagPickerControl/TagPickerControl.types.js.map +1 -1
  17. package/lib/components/TagPickerControl/index.js.map +1 -1
  18. package/lib/components/TagPickerControl/renderTagPickerControl.js +2 -2
  19. package/lib/components/TagPickerControl/renderTagPickerControl.js.map +1 -1
  20. package/lib/components/TagPickerControl/useTagPickerControl.js +6 -3
  21. package/lib/components/TagPickerControl/useTagPickerControl.js.map +1 -1
  22. package/lib/components/TagPickerControl/useTagPickerControlStyles.styles.raw.js.map +1 -1
  23. package/lib/components/TagPickerGroup/TagPickerGroup.js.map +1 -1
  24. package/lib/components/TagPickerGroup/TagPickerGroup.types.js.map +1 -1
  25. package/lib/components/TagPickerGroup/index.js.map +1 -1
  26. package/lib/components/TagPickerGroup/renderTagPickerGroup.js.map +1 -1
  27. package/lib/components/TagPickerGroup/useTagPickerGroup.js.map +1 -1
  28. package/lib/components/TagPickerGroup/useTagPickerGroupStyles.styles.raw.js.map +1 -1
  29. package/lib/components/TagPickerInput/TagPickerInput.js.map +1 -1
  30. package/lib/components/TagPickerInput/TagPickerInput.types.js.map +1 -1
  31. package/lib/components/TagPickerInput/index.js.map +1 -1
  32. package/lib/components/TagPickerInput/renderTagPickerInput.js +2 -2
  33. package/lib/components/TagPickerInput/renderTagPickerInput.js.map +1 -1
  34. package/lib/components/TagPickerInput/useTagPickerInput.js.map +1 -1
  35. package/lib/components/TagPickerInput/useTagPickerInputStyles.styles.raw.js.map +1 -1
  36. package/lib/components/TagPickerList/TagPickerList.js.map +1 -1
  37. package/lib/components/TagPickerList/TagPickerList.types.js.map +1 -1
  38. package/lib/components/TagPickerList/index.js.map +1 -1
  39. package/lib/components/TagPickerList/renderTagPickerList.js +2 -2
  40. package/lib/components/TagPickerList/renderTagPickerList.js.map +1 -1
  41. package/lib/components/TagPickerList/useTagPickerList.js.map +1 -1
  42. package/lib/components/TagPickerList/useTagPickerListStyles.styles.raw.js.map +1 -1
  43. package/lib/components/TagPickerOption/TagPickerOption.js.map +1 -1
  44. package/lib/components/TagPickerOption/TagPickerOption.types.js.map +1 -1
  45. package/lib/components/TagPickerOption/index.js.map +1 -1
  46. package/lib/components/TagPickerOption/renderTagPickerOption.js +2 -2
  47. package/lib/components/TagPickerOption/renderTagPickerOption.js.map +1 -1
  48. package/lib/components/TagPickerOption/useTagPickerOption.js +2 -0
  49. package/lib/components/TagPickerOption/useTagPickerOption.js.map +1 -1
  50. package/lib/components/TagPickerOption/useTagPickerOptionStyles.styles.raw.js.map +1 -1
  51. package/lib/components/TagPickerOptionGroup/TagPickerOptionGroup.js.map +1 -1
  52. package/lib/components/TagPickerOptionGroup/TagPickerOptionGroup.types.js.map +1 -1
  53. package/lib/components/TagPickerOptionGroup/index.js.map +1 -1
  54. package/lib/components/TagPickerOptionGroup/renderTagPickerOptionGroup.js.map +1 -1
  55. package/lib/components/TagPickerOptionGroup/useTagPickerOptionGroup.js.map +1 -1
  56. package/lib/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.raw.js.map +1 -1
  57. package/lib/contexts/TagPickerContext.js.map +1 -1
  58. package/lib/utils/tagPicker2Tag.js.map +1 -1
  59. package/lib/utils/tokens.js.map +1 -1
  60. package/lib/utils/useExpandLabel.js.map +1 -1
  61. package/lib/utils/useResizeObserverRef.js.map +1 -1
  62. package/lib/utils/useTabsterEscapeIgnore.js.map +1 -1
  63. package/lib/utils/useTagPickerFilter.js.map +1 -1
  64. package/lib-commonjs/TagPicker.cjs +6 -6
  65. package/lib-commonjs/TagPickerButton.cjs +7 -7
  66. package/lib-commonjs/TagPickerControl.cjs +9 -9
  67. package/lib-commonjs/TagPickerControl.cjs.map +1 -1
  68. package/lib-commonjs/TagPickerGroup.cjs +6 -6
  69. package/lib-commonjs/TagPickerInput.cjs +7 -7
  70. package/lib-commonjs/TagPickerList.cjs +6 -6
  71. package/lib-commonjs/TagPickerOption.cjs +6 -6
  72. package/lib-commonjs/TagPickerOptionGroup.cjs +6 -6
  73. package/lib-commonjs/components/TagPicker/TagPicker.cjs.map +1 -1
  74. package/lib-commonjs/components/TagPicker/TagPicker.types.cjs.map +1 -1
  75. package/lib-commonjs/components/TagPicker/index.cjs +6 -6
  76. package/lib-commonjs/components/TagPicker/index.cjs.map +1 -1
  77. package/lib-commonjs/components/TagPicker/renderTagPicker.cjs.map +1 -1
  78. package/lib-commonjs/components/TagPicker/useTagPicker.cjs +3 -3
  79. package/lib-commonjs/components/TagPicker/useTagPicker.cjs.map +1 -1
  80. package/lib-commonjs/components/TagPicker/useTagPickerContextValues.cjs.map +1 -1
  81. package/lib-commonjs/components/TagPickerButton/TagPickerButton.cjs.map +1 -1
  82. package/lib-commonjs/components/TagPickerButton/TagPickerButton.types.cjs.map +1 -1
  83. package/lib-commonjs/components/TagPickerButton/index.cjs +7 -7
  84. package/lib-commonjs/components/TagPickerButton/index.cjs.map +1 -1
  85. package/lib-commonjs/components/TagPickerButton/renderTagPickerButton.cjs.map +1 -1
  86. package/lib-commonjs/components/TagPickerButton/useTagPickerButton.cjs +3 -3
  87. package/lib-commonjs/components/TagPickerButton/useTagPickerButton.cjs.map +1 -1
  88. package/lib-commonjs/components/TagPickerButton/useTagPickerButtonStyles.styles.cjs +3 -3
  89. package/lib-commonjs/components/TagPickerButton/useTagPickerButtonStyles.styles.cjs.map +1 -1
  90. package/lib-commonjs/components/TagPickerButton/useTagPickerButtonStyles.styles.raw.cjs +3 -3
  91. package/lib-commonjs/components/TagPickerButton/useTagPickerButtonStyles.styles.raw.cjs.map +1 -1
  92. package/lib-commonjs/components/TagPickerControl/TagPickerControl.cjs.map +1 -1
  93. package/lib-commonjs/components/TagPickerControl/TagPickerControl.types.cjs.map +1 -1
  94. package/lib-commonjs/components/TagPickerControl/index.cjs +9 -9
  95. package/lib-commonjs/components/TagPickerControl/index.cjs.map +1 -1
  96. package/lib-commonjs/components/TagPickerControl/renderTagPickerControl.cjs.map +1 -1
  97. package/lib-commonjs/components/TagPickerControl/useTagPickerControl.cjs +9 -6
  98. package/lib-commonjs/components/TagPickerControl/useTagPickerControl.cjs.map +1 -1
  99. package/lib-commonjs/components/TagPickerControl/useTagPickerControlStyles.styles.cjs +5 -5
  100. package/lib-commonjs/components/TagPickerControl/useTagPickerControlStyles.styles.cjs.map +1 -1
  101. package/lib-commonjs/components/TagPickerControl/useTagPickerControlStyles.styles.raw.cjs +5 -5
  102. package/lib-commonjs/components/TagPickerControl/useTagPickerControlStyles.styles.raw.cjs.map +1 -1
  103. package/lib-commonjs/components/TagPickerGroup/TagPickerGroup.cjs.map +1 -1
  104. package/lib-commonjs/components/TagPickerGroup/TagPickerGroup.types.cjs.map +1 -1
  105. package/lib-commonjs/components/TagPickerGroup/index.cjs +6 -6
  106. package/lib-commonjs/components/TagPickerGroup/index.cjs.map +1 -1
  107. package/lib-commonjs/components/TagPickerGroup/renderTagPickerGroup.cjs.map +1 -1
  108. package/lib-commonjs/components/TagPickerGroup/useTagPickerGroup.cjs.map +1 -1
  109. package/lib-commonjs/components/TagPickerGroup/useTagPickerGroupStyles.styles.cjs +3 -3
  110. package/lib-commonjs/components/TagPickerGroup/useTagPickerGroupStyles.styles.cjs.map +1 -1
  111. package/lib-commonjs/components/TagPickerGroup/useTagPickerGroupStyles.styles.raw.cjs +3 -3
  112. package/lib-commonjs/components/TagPickerGroup/useTagPickerGroupStyles.styles.raw.cjs.map +1 -1
  113. package/lib-commonjs/components/TagPickerInput/TagPickerInput.cjs.map +1 -1
  114. package/lib-commonjs/components/TagPickerInput/TagPickerInput.types.cjs.map +1 -1
  115. package/lib-commonjs/components/TagPickerInput/index.cjs +7 -7
  116. package/lib-commonjs/components/TagPickerInput/index.cjs.map +1 -1
  117. package/lib-commonjs/components/TagPickerInput/renderTagPickerInput.cjs.map +1 -1
  118. package/lib-commonjs/components/TagPickerInput/useTagPickerInput.cjs +3 -3
  119. package/lib-commonjs/components/TagPickerInput/useTagPickerInput.cjs.map +1 -1
  120. package/lib-commonjs/components/TagPickerInput/useTagPickerInputStyles.styles.cjs +3 -3
  121. package/lib-commonjs/components/TagPickerInput/useTagPickerInputStyles.styles.cjs.map +1 -1
  122. package/lib-commonjs/components/TagPickerInput/useTagPickerInputStyles.styles.raw.cjs +3 -3
  123. package/lib-commonjs/components/TagPickerInput/useTagPickerInputStyles.styles.raw.cjs.map +1 -1
  124. package/lib-commonjs/components/TagPickerList/TagPickerList.cjs.map +1 -1
  125. package/lib-commonjs/components/TagPickerList/TagPickerList.types.cjs.map +1 -1
  126. package/lib-commonjs/components/TagPickerList/index.cjs +6 -6
  127. package/lib-commonjs/components/TagPickerList/index.cjs.map +1 -1
  128. package/lib-commonjs/components/TagPickerList/renderTagPickerList.cjs.map +1 -1
  129. package/lib-commonjs/components/TagPickerList/useTagPickerList.cjs.map +1 -1
  130. package/lib-commonjs/components/TagPickerList/useTagPickerListStyles.styles.cjs +3 -3
  131. package/lib-commonjs/components/TagPickerList/useTagPickerListStyles.styles.cjs.map +1 -1
  132. package/lib-commonjs/components/TagPickerList/useTagPickerListStyles.styles.raw.cjs +3 -3
  133. package/lib-commonjs/components/TagPickerList/useTagPickerListStyles.styles.raw.cjs.map +1 -1
  134. package/lib-commonjs/components/TagPickerOption/TagPickerOption.cjs.map +1 -1
  135. package/lib-commonjs/components/TagPickerOption/TagPickerOption.types.cjs.map +1 -1
  136. package/lib-commonjs/components/TagPickerOption/index.cjs +6 -6
  137. package/lib-commonjs/components/TagPickerOption/index.cjs.map +1 -1
  138. package/lib-commonjs/components/TagPickerOption/renderTagPickerOption.cjs.map +1 -1
  139. package/lib-commonjs/components/TagPickerOption/useTagPickerOption.cjs +2 -0
  140. package/lib-commonjs/components/TagPickerOption/useTagPickerOption.cjs.map +1 -1
  141. package/lib-commonjs/components/TagPickerOption/useTagPickerOptionStyles.styles.cjs +3 -3
  142. package/lib-commonjs/components/TagPickerOption/useTagPickerOptionStyles.styles.cjs.map +1 -1
  143. package/lib-commonjs/components/TagPickerOption/useTagPickerOptionStyles.styles.raw.cjs +3 -3
  144. package/lib-commonjs/components/TagPickerOption/useTagPickerOptionStyles.styles.raw.cjs.map +1 -1
  145. package/lib-commonjs/components/TagPickerOptionGroup/TagPickerOptionGroup.cjs.map +1 -1
  146. package/lib-commonjs/components/TagPickerOptionGroup/TagPickerOptionGroup.types.cjs.map +1 -1
  147. package/lib-commonjs/components/TagPickerOptionGroup/index.cjs +6 -6
  148. package/lib-commonjs/components/TagPickerOptionGroup/index.cjs.map +1 -1
  149. package/lib-commonjs/components/TagPickerOptionGroup/renderTagPickerOptionGroup.cjs.map +1 -1
  150. package/lib-commonjs/components/TagPickerOptionGroup/useTagPickerOptionGroup.cjs.map +1 -1
  151. package/lib-commonjs/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.cjs +3 -3
  152. package/lib-commonjs/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.cjs.map +1 -1
  153. package/lib-commonjs/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.raw.cjs +3 -3
  154. package/lib-commonjs/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.raw.cjs.map +1 -1
  155. package/lib-commonjs/contexts/TagPickerContext.cjs +4 -4
  156. package/lib-commonjs/contexts/TagPickerContext.cjs.map +1 -1
  157. package/lib-commonjs/index.cjs +47 -47
  158. package/lib-commonjs/index.cjs.map +1 -1
  159. package/lib-commonjs/utils/tagPicker2Tag.cjs +4 -4
  160. package/lib-commonjs/utils/tagPicker2Tag.cjs.map +1 -1
  161. package/lib-commonjs/utils/tokens.cjs +3 -3
  162. package/lib-commonjs/utils/tokens.cjs.map +1 -1
  163. package/lib-commonjs/utils/useExpandLabel.cjs.map +1 -1
  164. package/lib-commonjs/utils/useResizeObserverRef.cjs.map +1 -1
  165. package/lib-commonjs/utils/useTabsterEscapeIgnore.cjs.map +1 -1
  166. package/lib-commonjs/utils/useTagPickerFilter.cjs.map +1 -1
  167. package/package.json +11 -11
package/CHANGELOG.md CHANGED
@@ -1,12 +1,39 @@
1
1
  # Change Log - @fluentui/react-tag-picker
2
2
 
3
- <!-- This log was last generated on Wed, 23 Sep 2026 09:03:15 GMT and should not be manually modified. -->
3
+ <!-- This log was last generated on Mon, 02 Nov 2026 13:22:37 GMT and should not be manually modified. -->
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.10.7](https://github.com/microsoft/fluentui/tree/@fluentui/react-tag-picker_v9.10.7)
8
+
9
+ Mon, 02 Nov 2026 13:22:37 GMT
10
+
11
+ ### Patches
12
+
13
+ - fix: keep the measured aside width instead of cancelling its update after mount ([PR #36986](https://github.com/microsoft/fluentui/pull/36986) by dmytrokirpa@microsoft.com)
14
+
15
+ ## [9.10.6](https://github.com/microsoft/fluentui/tree/@fluentui/react-tag-picker_v9.10.6)
16
+
17
+ Mon, 19 Oct 2026 16:49:01 GMT
18
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tag-picker_v9.10.5..@fluentui/react-tag-picker_v9.10.6)
19
+
20
+ ### Patches
21
+
22
+ - fix: expose selection state on grouped TagPicker options for assistive technology ([PR #36834](https://github.com/microsoft/fluentui/pull/36834) by paulmardling@microsoft.com)
23
+ - Bump @fluentui/react-aria to v9.17.16 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
24
+ - Bump @fluentui/react-combobox to v9.17.8 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
25
+ - Bump @fluentui/react-context-selector to v9.2.21 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
26
+ - Bump @fluentui/react-field to v9.5.6 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
27
+ - Bump @fluentui/react-jsx-runtime to v9.4.7 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
28
+ - Bump @fluentui/react-portal to v9.8.17 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
29
+ - Bump @fluentui/react-positioning to v9.23.4 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
30
+ - Bump @fluentui/react-tabster to v9.26.19 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
31
+ - Bump @fluentui/react-tags to v9.9.8 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
32
+ - Bump @fluentui/react-utilities to v9.27.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
33
+
7
34
  ## [9.10.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-tag-picker_v9.10.5)
8
35
 
9
- Wed, 23 Sep 2026 09:03:15 GMT
36
+ Wed, 23 Sep 2026 09:04:33 GMT
10
37
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tag-picker_v9.10.4..@fluentui/react-tag-picker_v9.10.5)
11
38
 
12
39
  ### Patches
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPicker/TagPicker.tsx"],"sourcesContent":["'use client';\n\nimport * 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;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,QAAQ,oBAAiB;AACvD,SAASC,wBAAwB,QAAQ,uBAAoB;AAE7D,SAASC,yBAAyB,QAAQ,iCAA8B;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":["'use client';\n\nimport * 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;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,QAAQ,oBAAiB;AACvD,SAASC,wBAAwB,QAAQ,uBAAoB;AAE7D,SAASC,yBAAyB,QAAQ,iCAA8B;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 {\n ComponentProps,\n ComponentState,\n DistributiveOmit,\n EventData,\n EventHandler,\n JSXElement,\n} 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'\n | 'disabled'\n | 'defaultOpen'\n | 'selectedOptions'\n | 'defaultSelectedOptions'\n | 'open'\n | 'disableAutoFocus'\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 children: [JSXElement, JSXElement | undefined | false] | JSXElement;\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\n/**\n * TagPicker Base Props - omits the presentation-related props that the base hook does not handle:\n * the floating-ui `positioning` prop (the styled {@link TagPickerProps} re-introduces it via\n * `usePositioning`) as well as `size`, `appearance` and `inline` (layered on by the styled\n * {@link useTagPicker_unstable} hook).\n */\nexport type TagPickerBaseProps = DistributiveOmit<TagPickerProps, 'positioning' | 'size' | 'appearance' | 'inline'>;\n\n/**\n * TagPicker Base State - the state produced by the base hook, which does not interact with the\n * `size`, `appearance` and `inline` props. These are layered on by the styled\n * {@link useTagPicker_unstable} hook.\n */\nexport type TagPickerBaseState = Omit<TagPickerState, 'size' | 'appearance' | 'inline'>;\n"],"names":[],"mappings":"AA4HA;;;;CAIC,GACD,WAAwF"}
1
+ {"version":3,"sources":["../../../src/components/TagPicker/TagPicker.types.ts"],"sourcesContent":["import type * as React from 'react';\nimport type {\n ComponentProps,\n ComponentState,\n DistributiveOmit,\n EventData,\n EventHandler,\n JSXElement,\n} 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'\n | 'disabled'\n | 'defaultOpen'\n | 'selectedOptions'\n | 'defaultSelectedOptions'\n | 'open'\n | 'disableAutoFocus'\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 children: [JSXElement, JSXElement | undefined | false] | JSXElement;\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\n/**\n * TagPicker Base Props - omits the presentation-related props that the base hook does not handle:\n * the floating-ui `positioning` prop (the styled {@link TagPickerProps} re-introduces it via\n * `usePositioning`) as well as `size`, `appearance` and `inline` (layered on by the styled\n * {@link useTagPicker_unstable} hook).\n */\nexport type TagPickerBaseProps = DistributiveOmit<TagPickerProps, 'positioning' | 'size' | 'appearance' | 'inline'>;\n\n/**\n * TagPicker Base State - the state produced by the base hook, which does not interact with the\n * `size`, `appearance` and `inline` props. These are layered on by the styled\n * {@link useTagPicker_unstable} hook.\n */\nexport type TagPickerBaseState = Omit<TagPickerState, 'size' | 'appearance' | 'inline'>;\n"],"names":[],"mappings":"AA4HA;;;;CAIC,GACD,WAAwF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPicker/index.ts"],"sourcesContent":["export { TagPicker } from './TagPicker';\nexport type {\n TagPickerBaseProps,\n TagPickerBaseState,\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, useTagPickerBase_unstable } from './useTagPicker';\nexport { useTagPickerContextValues } from './useTagPickerContextValues';\n"],"names":["TagPicker","renderTagPicker_unstable","useTagPicker_unstable","useTagPickerBase_unstable","useTagPickerContextValues"],"mappings":"AAAA,SAASA,SAAS,QAAQ,iBAAc;AAYxC,SAASC,wBAAwB,QAAQ,uBAAoB;AAC7D,SAASC,qBAAqB,EAAEC,yBAAyB,QAAQ,oBAAiB;AAClF,SAASC,yBAAyB,QAAQ,iCAA8B"}
1
+ {"version":3,"sources":["../../../src/components/TagPicker/index.ts"],"sourcesContent":["export { TagPicker } from './TagPicker';\nexport type {\n TagPickerBaseProps,\n TagPickerBaseState,\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, useTagPickerBase_unstable } from './useTagPicker';\nexport { useTagPickerContextValues } from './useTagPickerContextValues';\n"],"names":["TagPicker","renderTagPicker_unstable","useTagPicker_unstable","useTagPickerBase_unstable","useTagPickerContextValues"],"mappings":"AAAA,SAASA,SAAS,QAAQ,iBAAc;AAYxC,SAASC,wBAAwB,QAAQ,uBAAoB;AAC7D,SAASC,qBAAqB,EAAEC,yBAAyB,QAAQ,oBAAiB;AAClF,SAASC,yBAAyB,QAAQ,iCAA8B"}
@@ -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 { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { TagPickerContextProvider } from '../../contexts/TagPickerContext';\n\n/**\n * Render the final JSX of Picker\n */\n\nexport const renderTagPicker_unstable = (state: TagPickerState, contexts: TagPickerContextValues): JSXElement => {\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.popover &&\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","assertSlots","TagPickerContextProvider","renderTagPicker_unstable","state","contexts","value","picker","activeDescendant","listbox","trigger","popover","inline","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,WAAW,QAAQ,4BAA4B;AAExD,SAASC,wBAAwB,QAAQ,qCAAkC;AAE3E;;CAEC,GAED,OAAO,MAAMC,2BAA2B,CAACC,OAAuBC;IAC9DJ,YAA4BG;IAC5B,qBACE,oBAACF;QAAyBI,OAAOD,SAASE,MAAM;qBAC9C,oBAACT;QAAgCQ,OAAOD,SAASG,gBAAgB;qBAC/D,oBAACT;QAAgBO,OAAOD,SAASI,OAAO;OACrCL,MAAMM,OAAO,EACbN,MAAMO,OAAO,IACXP,CAAAA,MAAMQ,MAAM,GAAGR,MAAMO,OAAO,iBAAG,oBAACX;QAAOa,WAAWT,MAAMS,SAAS;OAAGT,MAAMO,OAAO,CAAS;AAKvG,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 { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { TagPickerContextProvider } from '../../contexts/TagPickerContext';\n\n/**\n * Render the final JSX of Picker\n */\n\nexport const renderTagPicker_unstable = (state: TagPickerState, contexts: TagPickerContextValues): JSXElement => {\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.popover &&\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","assertSlots","TagPickerContextProvider","renderTagPicker_unstable","state","contexts","value","picker","activeDescendant","listbox","trigger","popover","inline","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,WAAW,QAAQ,4BAA4B;AAExD,SAASC,wBAAwB,QAAQ,qCAAkC;AAE3E;;CAEC,GAED,OAAO,MAAMC,2BAA2B,CAACC,OAAuBC;IAC9DJ,YAA4BG;IAC5B,qBACE,oBAACF;QAAyBI,OAAOD,SAASE,MAAM;qBAC9C,oBAACT;QAAgCQ,OAAOD,SAASG,gBAAgB;qBAC/D,oBAACT;QAAgBO,OAAOD,SAASI,OAAO;OACrCL,MAAMM,OAAO,EACbN,MAAMO,OAAO,IACXP,CAAAA,MAAMQ,MAAM,GAAGR,MAAMO,OAAO,iBAAG,oBAACX;QAAOa,WAAWT,MAAMS,SAAS;OAAGT,MAAMO,OAAO,CAAS;AAKvG,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPicker/useTagPicker.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { elementContains, useEventCallback, useId, useMergedRefs } from '@fluentui/react-utilities';\nimport type {\n TagPickerBaseProps,\n TagPickerBaseState,\n TagPickerOnOpenChangeData,\n TagPickerOnOptionSelectData,\n TagPickerProps,\n TagPickerState,\n} from './TagPicker.types';\nimport { optionClassNames } from '@fluentui/react-combobox';\nimport type { PositioningShorthandValue } from '@fluentui/react-positioning';\nimport { 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 base state required to render TagPicker, without floating-ui positioning.\n * @param props - props from this instance of TagPicker (without `positioning`)\n */\nexport const useTagPickerBase_unstable = (props: TagPickerBaseProps): TagPickerBaseState => {\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 passiveTargetRef = React.useRef<HTMLDivElement>(null);\n const { noPopover = false, disableAutoFocus } = props;\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 disableAutoFocus,\n editable: true,\n multiselect: true,\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),\n secondaryActionRef,\n tagPickerGroupRef,\n targetRef: passiveTargetRef,\n open: comboboxState.open,\n mountNode: comboboxState.mountNode,\n onOptionClick: useEventCallback(event => {\n comboboxState.onOptionClick(event);\n comboboxState.setOpen(event, false);\n }),\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\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 { positioning, size = 'medium', appearance = 'outline', inline = 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 baseState = useTagPickerBase_unstable(props);\n\n return {\n ...baseState,\n size,\n appearance,\n inline,\n targetRef,\n popoverRef: useMergedRefs(baseState.popoverRef, containerRef),\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","useTagPickerBase_unstable","props","popoverId","triggerInnerRef","useRef","secondaryActionRef","tagPickerGroupRef","passiveTargetRef","noPopover","disableAutoFocus","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","targetRef","mountNode","onOptionClick","setOpen","clearSelection","getOptionById","getOptionsMatchingValue","registerOption","selectOption","includes","current","target","setHasFocus","setValue","useTagPicker_unstable","positioning","size","appearance","inline","containerRef","position","align","offset","crossAxis","mainAxis","matchTargetSize","baseState","childrenArray","Children","toArray","process","env","NODE_ENV","length","console","warn"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,eAAe,EAAEC,gBAAgB,EAAEC,KAAK,EAAEC,aAAa,QAAQ,4BAA4B;AASpG,SAASC,gBAAgB,QAAQ,2BAA2B;AAE5D,SAASC,2BAA2B,EAAEC,cAAc,QAAQ,8BAA8B;AAC1F,SAASC,mBAAmB,QAAQ,uBAAuB;AAC3D,SAASC,oBAAoB,QAAQ,2BAA2B;AAEhE,wFAAwF;AACxF,MAAMC,oBAAiD;IAAC;IAAS;IAAS;IAAa;IAAU;CAAa;AAE9G;;;CAGC,GACD,OAAO,MAAMC,4BAA4B,CAACC;IACxC,MAAMC,YAAYV,MAAM;IACxB,MAAMW,kBAAkBd,MAAMe,MAAM,CAAuC;IAC3E,MAAMC,qBAAqBhB,MAAMe,MAAM,CAAkB;IACzD,MAAME,oBAAoBjB,MAAMe,MAAM,CAAiB;IACvD,MAAMG,mBAAmBlB,MAAMe,MAAM,CAAiB;IACtD,MAAM,EAAEI,YAAY,KAAK,EAAEC,gBAAgB,EAAE,GAAGR;IAEhD,MAAM,EACJS,YAAYC,0BAA0B,EACtCC,eAAe,EACfC,UAAU,EACX,GAAGhB,oBAAsD;QACxDiB,aAAaC,CAAAA,KAAMA,GAAGC,SAAS,CAACC,QAAQ,CAACvB,iBAAiBwB,IAAI;IAChE;IAEA,MAAMC,gBAAgBrB,qBAAqB;QACzC,GAAGG,KAAK;QACRmB,gBAAgB7B,iBAAiB,CAAC8B,OAAOC;gBACvCrB;oBAAAA,wBAAAA,MAAMmB,cAAc,cAApBnB,4CAAAA,2BAAAA,OAAuBoB,OAAO;gBAC5BE,iBAAiBD,KAAKC,eAAe;gBACrCC,OAAOF,KAAKG,WAAW;gBACvBC,MAAML,MAAMK,IAAI;gBAChBL;YACF;;QAEFM,cAAcpC,iBAAiB,CAAC8B,OAAOC;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C1BrC,UAAUqC,aAAa,CAAC,EAAE;IAC5B,OAAO,IAAIA,cAAcM,MAAM,KAAK,GAAG;QACrC3C,UAAUqC,aAAa,CAAC,EAAE;IAC5B;IAEA,OAAO;QAAEtC;QAASC;IAAQ;AAC5B"}
1
+ {"version":3,"sources":["../../../src/components/TagPicker/useTagPicker.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { elementContains, useEventCallback, useId, useMergedRefs } from '@fluentui/react-utilities';\nimport type {\n TagPickerBaseProps,\n TagPickerBaseState,\n TagPickerOnOpenChangeData,\n TagPickerOnOptionSelectData,\n TagPickerProps,\n TagPickerState,\n} from './TagPicker.types';\nimport { optionClassNames } from '@fluentui/react-combobox';\nimport type { PositioningShorthandValue } from '@fluentui/react-positioning';\nimport { 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 base state required to render TagPicker, without floating-ui positioning.\n * @param props - props from this instance of TagPicker (without `positioning`)\n */\nexport const useTagPickerBase_unstable = (props: TagPickerBaseProps): TagPickerBaseState => {\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 passiveTargetRef = React.useRef<HTMLDivElement>(null);\n const { noPopover = false, disableAutoFocus } = props;\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 disableAutoFocus,\n editable: true,\n multiselect: true,\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),\n secondaryActionRef,\n tagPickerGroupRef,\n targetRef: passiveTargetRef,\n open: comboboxState.open,\n mountNode: comboboxState.mountNode,\n onOptionClick: useEventCallback(event => {\n comboboxState.onOptionClick(event);\n comboboxState.setOpen(event, false);\n }),\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\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 { positioning, size = 'medium', appearance = 'outline', inline = 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 baseState = useTagPickerBase_unstable(props);\n\n return {\n ...baseState,\n size,\n appearance,\n inline,\n targetRef,\n popoverRef: useMergedRefs(baseState.popoverRef, containerRef),\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","useTagPickerBase_unstable","props","popoverId","triggerInnerRef","useRef","secondaryActionRef","tagPickerGroupRef","passiveTargetRef","noPopover","disableAutoFocus","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","targetRef","mountNode","onOptionClick","setOpen","clearSelection","getOptionById","getOptionsMatchingValue","registerOption","selectOption","includes","current","target","setHasFocus","setValue","useTagPicker_unstable","positioning","size","appearance","inline","containerRef","position","align","offset","crossAxis","mainAxis","matchTargetSize","baseState","childrenArray","Children","toArray","process","env","NODE_ENV","length","console","warn"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,eAAe,EAAEC,gBAAgB,EAAEC,KAAK,EAAEC,aAAa,QAAQ,4BAA4B;AASpG,SAASC,gBAAgB,QAAQ,2BAA2B;AAE5D,SAASC,2BAA2B,EAAEC,cAAc,QAAQ,8BAA8B;AAC1F,SAASC,mBAAmB,QAAQ,uBAAuB;AAC3D,SAASC,oBAAoB,QAAQ,2BAA2B;AAEhE,wFAAwF;AACxF,MAAMC,oBAAiD;IAAC;IAAS;IAAS;IAAa;IAAU;CAAa;AAE9G;;;CAGC,GACD,OAAO,MAAMC,4BAA4B,CAACC;IACxC,MAAMC,YAAYV,MAAM;IACxB,MAAMW,kBAAkBd,MAAMe,MAAM,CAAuC;IAC3E,MAAMC,qBAAqBhB,MAAMe,MAAM,CAAkB;IACzD,MAAME,oBAAoBjB,MAAMe,MAAM,CAAiB;IACvD,MAAMG,mBAAmBlB,MAAMe,MAAM,CAAiB;IACtD,MAAM,EAAEI,YAAY,KAAK,EAAEC,gBAAgB,EAAE,GAAGR;IAEhD,MAAM,EACJS,YAAYC,0BAA0B,EACtCC,eAAe,EACfC,UAAU,EACX,GAAGhB,oBAAsD;QACxDiB,aAAaC,CAAAA,KAAMA,GAAGC,SAAS,CAACC,QAAQ,CAACvB,iBAAiBwB,IAAI;IAChE;IAEA,MAAMC,gBAAgBrB,qBAAqB;QACzC,GAAGG,KAAK;QACRmB,gBAAgB7B,iBAAiB,CAAC8B,OAAOC;gBACvCrB;oBAAAA,wBAAAA,MAAMmB,cAAc,cAApBnB,4CAAAA,2BAAAA,OAAuBoB,OAAO;gBAC5BE,iBAAiBD,KAAKC,eAAe;gBACrCC,OAAOF,KAAKG,WAAW;gBACvBC,MAAML,MAAMK,IAAI;gBAChBL;YACF;;QAEFM,cAAcpC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UsC,aAAa,CAAC,EAAE;QAC1BrC,UAAUqC,aAAa,CAAC,EAAE;IAC5B,OAAO,IAAIA,cAAcM,MAAM,KAAK,GAAG;QACrC3C,UAAUqC,aAAa,CAAC,EAAE;IAC5B;IAEA,OAAO;QAAEtC;QAASC;IAAQ;AAC5B"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPicker/useTagPickerContextValues.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { 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;AAEA,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":["'use client';\n\nimport * as React from 'react';\nimport type { 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;AAEA,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":["'use client';\n\nimport * 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;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,2BAA2B,QAAQ,0BAAuB;AACnE,SAASC,8BAA8B,QAAQ,6BAA0B;AACzE,SAASC,iCAAiC,QAAQ,uCAAoC;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":["'use client';\n\nimport * 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;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,2BAA2B,QAAQ,0BAAuB;AACnE,SAASC,8BAA8B,QAAQ,6BAA0B;AACzE,SAASC,iCAAiC,QAAQ,uCAAoC;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 type { DropdownProps } from '@fluentui/react-combobox';\nimport type { ComponentProps, ComponentState, DistributiveOmit, Slot } from '@fluentui/react-utilities';\nimport type { 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\n/**\n * TagPickerButton Base Props - omits design-only props\n */\nexport type TagPickerButtonBaseProps = DistributiveOmit<TagPickerButtonProps, 'size' | 'appearance'>;\n\n/**\n * TagPickerButton Base State - omits design-only state\n */\nexport type TagPickerButtonBaseState = DistributiveOmit<TagPickerButtonState, 'size'>;\n"],"names":[],"mappings":"AA6BA;;CAEC,GACD,WAAsF"}
1
+ {"version":3,"sources":["../../../src/components/TagPickerButton/TagPickerButton.types.ts"],"sourcesContent":["import type { DropdownProps } from '@fluentui/react-combobox';\nimport type { ComponentProps, ComponentState, DistributiveOmit, Slot } from '@fluentui/react-utilities';\nimport type { 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\n/**\n * TagPickerButton Base Props - omits design-only props\n */\nexport type TagPickerButtonBaseProps = DistributiveOmit<TagPickerButtonProps, 'size' | 'appearance'>;\n\n/**\n * TagPickerButton Base State - omits design-only state\n */\nexport type TagPickerButtonBaseState = DistributiveOmit<TagPickerButtonState, 'size'>;\n"],"names":[],"mappings":"AA6BA;;CAEC,GACD,WAAsF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPickerButton/index.ts"],"sourcesContent":["export { TagPickerButton } from './TagPickerButton';\nexport type {\n TagPickerButtonBaseProps,\n TagPickerButtonBaseState,\n TagPickerButtonProps,\n TagPickerButtonSlots,\n TagPickerButtonState,\n} from './TagPickerButton.types';\nexport { renderTagPickerButton_unstable } from './renderTagPickerButton';\nexport { useTagPickerButton_unstable, useTagPickerButtonBase_unstable } from './useTagPickerButton';\nexport { tagPickerButtonClassNames, useTagPickerButtonStyles_unstable } from './useTagPickerButtonStyles.styles';\n"],"names":["TagPickerButton","renderTagPickerButton_unstable","useTagPickerButton_unstable","useTagPickerButtonBase_unstable","tagPickerButtonClassNames","useTagPickerButtonStyles_unstable"],"mappings":"AAAA,SAASA,eAAe,QAAQ,uBAAoB;AAQpD,SAASC,8BAA8B,QAAQ,6BAA0B;AACzE,SAASC,2BAA2B,EAAEC,+BAA+B,QAAQ,0BAAuB;AACpG,SAASC,yBAAyB,EAAEC,iCAAiC,QAAQ,uCAAoC"}
1
+ {"version":3,"sources":["../../../src/components/TagPickerButton/index.ts"],"sourcesContent":["export { TagPickerButton } from './TagPickerButton';\nexport type {\n TagPickerButtonBaseProps,\n TagPickerButtonBaseState,\n TagPickerButtonProps,\n TagPickerButtonSlots,\n TagPickerButtonState,\n} from './TagPickerButton.types';\nexport { renderTagPickerButton_unstable } from './renderTagPickerButton';\nexport { useTagPickerButton_unstable, useTagPickerButtonBase_unstable } from './useTagPickerButton';\nexport { tagPickerButtonClassNames, useTagPickerButtonStyles_unstable } from './useTagPickerButtonStyles.styles';\n"],"names":["TagPickerButton","renderTagPickerButton_unstable","useTagPickerButton_unstable","useTagPickerButtonBase_unstable","tagPickerButtonClassNames","useTagPickerButtonStyles_unstable"],"mappings":"AAAA,SAASA,eAAe,QAAQ,uBAAoB;AAQpD,SAASC,8BAA8B,QAAQ,6BAA0B;AACzE,SAASC,2BAA2B,EAAEC,+BAA+B,QAAQ,0BAAuB;AACpG,SAASC,yBAAyB,EAAEC,iCAAiC,QAAQ,uCAAoC"}
@@ -1,5 +1,5 @@
1
- import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
- import { assertSlots } from "@fluentui/react-utilities";
1
+ import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
+ import { assertSlots } from "@fluentui/react-utilities";
3
3
  /**
4
4
  * Render the final JSX of PickerButton
5
5
  */ export const renderTagPickerButton_unstable = (state)=>{
@@ -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 { JSXElement } from '@fluentui/react-utilities';\nimport type { TagPickerButtonBaseState, TagPickerButtonSlots } from './TagPickerButton.types';\n\n/**\n * Render the final JSX of PickerButton\n */\nexport const renderTagPickerButton_unstable = (state: TagPickerButtonBaseState): JSXElement => {\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;AAIxD;;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 { JSXElement } from '@fluentui/react-utilities';\nimport type { TagPickerButtonBaseState, TagPickerButtonSlots } from './TagPickerButton.types';\n\n/**\n * Render the final JSX of PickerButton\n */\nexport const renderTagPickerButton_unstable = (state: TagPickerButtonBaseState): JSXElement => {\n assertSlots<TagPickerButtonSlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderTagPickerButton_unstable","state","root"],"mappings":";AAAA,0BAA0B,GAC1B,iDAAiD,GAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;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":["'use client';\n\nimport type * as React from 'react';\nimport { useActiveDescendantContext } from '@fluentui/react-aria';\nimport type {\n TagPickerButtonBaseProps,\n TagPickerButtonBaseState,\n TagPickerButtonProps,\n TagPickerButtonState,\n} from './TagPickerButton.types';\nimport { useTagPickerContext_unstable } from '../../contexts/TagPickerContext';\nimport { useButtonTriggerSlot } from '@fluentui/react-combobox';\nimport { useTabsterEscapeIgnore } from '../../utils/useTabsterEscapeIgnore';\n\n/**\n * Create the base state required to render TagPickerButton, without design-only props.\n *\n * @param props - props from this instance of TagPickerButton (without size, appearance)\n * @param ref - reference to root HTMLButtonElement of TagPickerButton\n */\nexport const useTagPickerButtonBase_unstable = (\n props: TagPickerButtonBaseProps,\n ref: React.Ref<HTMLButtonElement>,\n): TagPickerButtonBaseState => {\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 'TagPickerButtonBaseProps'\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 return {\n components: {\n root: 'button',\n },\n root,\n hasSelectedOption,\n };\n};\n\n/**\n * Create the state required to render TagPickerButton.\n *\n * The returned state can be modified with hooks such as useTagPickerButtonStyles_unstable,\n * before being passed to renderTagPickerButton_unstable.\n *\n * @param props - props from this instance of TagPickerButton\n * @param ref - reference to root HTMLButtonElement of TagPickerButton\n */\nexport const useTagPickerButton_unstable = (\n props: TagPickerButtonProps,\n ref: React.Ref<HTMLButtonElement>,\n): TagPickerButtonState => {\n const baseState = useTagPickerButtonBase_unstable(props, ref);\n const open = useTagPickerContext_unstable(ctx => ctx.open);\n const size = useTagPickerContext_unstable(ctx => ctx.size);\n\n return {\n ...baseState,\n size,\n root: {\n ...useTabsterEscapeIgnore(baseState.root, open),\n ...baseState.root,\n },\n };\n};\n"],"names":["useActiveDescendantContext","useTagPickerContext_unstable","useButtonTriggerSlot","useTabsterEscapeIgnore","useTagPickerButtonBase_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","components","useTagPickerButton_unstable","baseState","size"],"mappings":"AAAA;AAGA,SAASA,0BAA0B,QAAQ,uBAAuB;AAOlE,SAASC,4BAA4B,QAAQ,qCAAkC;AAC/E,SAASC,oBAAoB,QAAQ,2BAA2B;AAChE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AAOA,IAAIuB,IAAI;IAEzD,OAAO;QACL,GAAGD,SAAS;QACZC;QACAZ,MAAM;YACJ,GAAGlB,uBAAuB6B,UAAUX,IAAI,EAAEV,KAAK;YAC/C,GAAGqB,UAAUX,IAAI;QACnB;IACF;AACF,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/TagPickerButton/useTagPickerButton.tsx"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { useActiveDescendantContext } from '@fluentui/react-aria';\nimport type {\n TagPickerButtonBaseProps,\n TagPickerButtonBaseState,\n TagPickerButtonProps,\n TagPickerButtonState,\n} from './TagPickerButton.types';\nimport { useTagPickerContext_unstable } from '../../contexts/TagPickerContext';\nimport { useButtonTriggerSlot } from '@fluentui/react-combobox';\nimport { useTabsterEscapeIgnore } from '../../utils/useTabsterEscapeIgnore';\n\n/**\n * Create the base state required to render TagPickerButton, without design-only props.\n *\n * @param props - props from this instance of TagPickerButton (without size, appearance)\n * @param ref - reference to root HTMLButtonElement of TagPickerButton\n */\nexport const useTagPickerButtonBase_unstable = (\n props: TagPickerButtonBaseProps,\n ref: React.Ref<HTMLButtonElement>,\n): TagPickerButtonBaseState => {\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 'TagPickerButtonBaseProps'\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 return {\n components: {\n root: 'button',\n },\n root,\n hasSelectedOption,\n };\n};\n\n/**\n * Create the state required to render TagPickerButton.\n *\n * The returned state can be modified with hooks such as useTagPickerButtonStyles_unstable,\n * before being passed to renderTagPickerButton_unstable.\n *\n * @param props - props from this instance of TagPickerButton\n * @param ref - reference to root HTMLButtonElement of TagPickerButton\n */\nexport const useTagPickerButton_unstable = (\n props: TagPickerButtonProps,\n ref: React.Ref<HTMLButtonElement>,\n): TagPickerButtonState => {\n const baseState = useTagPickerButtonBase_unstable(props, ref);\n const open = useTagPickerContext_unstable(ctx => ctx.open);\n const size = useTagPickerContext_unstable(ctx => ctx.size);\n\n return {\n ...baseState,\n size,\n root: {\n ...useTabsterEscapeIgnore(baseState.root, open),\n ...baseState.root,\n },\n };\n};\n"],"names":["useActiveDescendantContext","useTagPickerContext_unstable","useButtonTriggerSlot","useTabsterEscapeIgnore","useTagPickerButtonBase_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","components","useTagPickerButton_unstable","baseState","size"],"mappings":"AAAA;AAGA,SAASA,0BAA0B,QAAQ,uBAAuB;AAOlE,SAASC,4BAA4B,QAAQ,qCAAkC;AAC/E,SAASC,oBAAoB,QAAQ,2BAA2B;AAChE,SAASC,sBAAsB,QAAQ,wCAAqC;AAE5E;;;;;CAKC,GACD,OAAO,MAAMC,kCAAkC,CAC7CC,OACAC;IAEA,MAAM,EAAEC,YAAYC,0BAA0B,EAAE,GAAGR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,UAAUX,IAAI;QACnB;IACF;AACF,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPickerButton/useTagPickerButtonStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { 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 const styles = useStyles();\n // eslint-disable-next-line react-hooks/immutability\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;AAEA,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,EACZ1B,OAAO2B,uBAAuB,CAC/B,KAAK,EAAE,CAAC,KA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AAC;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,MAAMC,SAAS7D;IACf,oDAAoD;IACpD4D,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
+ {"version":3,"sources":["../../../src/components/TagPickerButton/useTagPickerButtonStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { 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 const styles = useStyles();\n // eslint-disable-next-line react-hooks/immutability\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;AAEA,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,EACZ1B,OAAO2B,uBAAuB,CAC/B,KAAK,EAAE,CAAC,KAAK,EAAE3B,OAAO2B,uBAAuB,CAAC,GAAG,EAAE3B,OAAOe,oBAAoB,CAAC,CAAC,CAAC,EAAE;IACtF;IACAa,OAAO;QACL,GAAG3B,iBAAiB4B,KAAK;QACzBH,SAAS,CAAC,IAAI,EACZ1B,OAAO8B,uBAAuB,CAC/B,KAAK,EAAE,CAAC,KAAK,EAAE9B,OAAO8B,uBAAuB,CAAC,GAAG,EAAE9B,OA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C,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,MAAMC,SAAS7D;IACf,oDAAoD;IACpD4D,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":["'use client';\n\nimport * 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;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,4BAA4B,QAAQ,2BAAwB;AACrE,SAASC,+BAA+B,QAAQ,8BAA2B;AAC3E,SAASC,kCAAkC,QAAQ,wCAAqC;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":["'use client';\n\nimport * 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;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,4BAA4B,QAAQ,2BAAwB;AACrE,SAASC,+BAA+B,QAAQ,8BAA2B;AAC3E,SAASC,kCAAkC,QAAQ,wCAAqC;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 {\n ComponentProps,\n ComponentState,\n DistributiveOmit,\n ExtractSlotProps,\n Slot,\n} from '@fluentui/react-utilities';\nimport type { TagPickerContextValue } from '../../contexts/TagPickerContext';\nimport type { ComboboxSlots } from '@fluentui/react-combobox';\nimport type * 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\n/**\n * TagPickerControl Base State - omits design-only state derived from picker context.\n */\nexport type TagPickerControlBaseState = DistributiveOmit<TagPickerControlState, 'size' | 'appearance'>;\n"],"names":[],"mappings":"AAyCA;;CAEC,GACD,WAAuG"}
1
+ {"version":3,"sources":["../../../src/components/TagPickerControl/TagPickerControl.types.ts"],"sourcesContent":["import type {\n ComponentProps,\n ComponentState,\n DistributiveOmit,\n ExtractSlotProps,\n Slot,\n} from '@fluentui/react-utilities';\nimport type { TagPickerContextValue } from '../../contexts/TagPickerContext';\nimport type { ComboboxSlots } from '@fluentui/react-combobox';\nimport type * 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\n/**\n * TagPickerControl Base State - omits design-only state derived from picker context.\n */\nexport type TagPickerControlBaseState = DistributiveOmit<TagPickerControlState, 'size' | 'appearance'>;\n"],"names":[],"mappings":"AAyCA;;CAEC,GACD,WAAuG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPickerControl/index.ts"],"sourcesContent":["export { TagPickerControl } from './TagPickerControl';\nexport type {\n TagPickerControlBaseState,\n TagPickerControlCSSProperties,\n TagPickerControlInternalSlots,\n TagPickerControlProps,\n TagPickerControlSlots,\n TagPickerControlState,\n} from './TagPickerControl.types';\nexport { renderTagPickerControl_unstable } from './renderTagPickerControl';\nexport { useTagPickerControl_unstable, useTagPickerControlBase_unstable } from './useTagPickerControl';\nexport {\n iconSizes,\n tagPickerControlAsideWidthToken,\n tagPickerControlClassNames,\n useTagPickerControlStyles_unstable,\n} from './useTagPickerControlStyles.styles';\n"],"names":["TagPickerControl","renderTagPickerControl_unstable","useTagPickerControl_unstable","useTagPickerControlBase_unstable","iconSizes","tagPickerControlAsideWidthToken","tagPickerControlClassNames","useTagPickerControlStyles_unstable"],"mappings":"AAAA,SAASA,gBAAgB,QAAQ,wBAAqB;AAStD,SAASC,+BAA+B,QAAQ,8BAA2B;AAC3E,SAASC,4BAA4B,EAAEC,gCAAgC,QAAQ,2BAAwB;AACvG,SACEC,SAAS,EACTC,+BAA+B,EAC/BC,0BAA0B,EAC1BC,kCAAkC,QAC7B,wCAAqC"}
1
+ {"version":3,"sources":["../../../src/components/TagPickerControl/index.ts"],"sourcesContent":["export { TagPickerControl } from './TagPickerControl';\nexport type {\n TagPickerControlBaseState,\n TagPickerControlCSSProperties,\n TagPickerControlInternalSlots,\n TagPickerControlProps,\n TagPickerControlSlots,\n TagPickerControlState,\n} from './TagPickerControl.types';\nexport { renderTagPickerControl_unstable } from './renderTagPickerControl';\nexport { useTagPickerControl_unstable, useTagPickerControlBase_unstable } from './useTagPickerControl';\nexport {\n iconSizes,\n tagPickerControlAsideWidthToken,\n tagPickerControlClassNames,\n useTagPickerControlStyles_unstable,\n} from './useTagPickerControlStyles.styles';\n"],"names":["TagPickerControl","renderTagPickerControl_unstable","useTagPickerControl_unstable","useTagPickerControlBase_unstable","iconSizes","tagPickerControlAsideWidthToken","tagPickerControlClassNames","useTagPickerControlStyles_unstable"],"mappings":"AAAA,SAASA,gBAAgB,QAAQ,wBAAqB;AAStD,SAASC,+BAA+B,QAAQ,8BAA2B;AAC3E,SAASC,4BAA4B,EAAEC,gCAAgC,QAAQ,2BAAwB;AACvG,SACEC,SAAS,EACTC,+BAA+B,EAC/BC,0BAA0B,EAC1BC,kCAAkC,QAC7B,wCAAqC"}
@@ -1,5 +1,5 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
- import { assertSlots } from "@fluentui/react-utilities";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
+ import { assertSlots } from "@fluentui/react-utilities";
3
3
  /**
4
4
  * Render the final JSX of PickerControl
5
5
  */ export const renderTagPickerControl_unstable = (state)=>{
@@ -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 { JSXElement } from '@fluentui/react-utilities';\nimport type {\n TagPickerControlBaseState,\n TagPickerControlSlots,\n TagPickerControlInternalSlots,\n} from './TagPickerControl.types';\n\n/**\n * Render the final JSX of PickerControl\n */\nexport const renderTagPickerControl_unstable = (state: TagPickerControlBaseState): JSXElement => {\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;AAQxD;;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 { JSXElement } from '@fluentui/react-utilities';\nimport type {\n TagPickerControlBaseState,\n TagPickerControlSlots,\n TagPickerControlInternalSlots,\n} from './TagPickerControl.types';\n\n/**\n * Render the final JSX of PickerControl\n */\nexport const renderTagPickerControl_unstable = (state: TagPickerControlBaseState): JSXElement => {\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,GAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAQxD;;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"}
@@ -114,9 +114,12 @@ import { useResizeObserverRef } from "../../utils/useResizeObserverRef.js";
114
114
  state.expandIcon.ref = expandIconLabelMergeRef;
115
115
  }
116
116
  React.useEffect(()=>{
117
- if (rafIdRef.current && (targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.defaultView)) {
118
- targetDocument.defaultView.cancelAnimationFrame(rafIdRef.current);
119
- }
117
+ const targetWindow = targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.defaultView;
118
+ return ()=>{
119
+ if (rafIdRef.current && targetWindow) {
120
+ targetWindow.cancelAnimationFrame(rafIdRef.current);
121
+ }
122
+ };
120
123
  }, [
121
124
  targetDocument
122
125
  ]);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPickerControl/useTagPickerControl.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ExtractSlotProps, Slot } from '@fluentui/react-utilities';\nimport {\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 { useFieldContext_unstable } from '@fluentui/react-field';\nimport { ChevronDownRegular } from '@fluentui/react-icons';\n\nimport type { TagPickerControlBaseState, TagPickerControlProps, TagPickerControlState } from './TagPickerControl.types';\nimport { tagPickerControlAsideWidthToken } from './useTagPickerControlStyles.styles';\nimport { useTagPickerContext_unstable } from '../../contexts/TagPickerContext';\nimport { useExpandLabel } from '../../utils/useExpandLabel';\nimport { useResizeObserverRef } from '../../utils/useResizeObserverRef';\n\n/**\n * Create the base state required to render TagPickerControl, without design-only state.\n *\n * @param props - props from this instance of TagPickerControl\n * @param ref - reference to root HTMLDivElement of TagPickerControl\n */\nexport const useTagPickerControlBase_unstable = (\n props: TagPickerControlProps,\n ref: React.Ref<HTMLDivElement>,\n): TagPickerControlBaseState => {\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 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 defaultProps: {\n 'aria-expanded': open,\n 'aria-disabled': disabled ? 'true' : undefined,\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: TagPickerControlBaseState = {\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 disabled,\n invalid,\n };\n\n const expandIconLabelRef = useExpandLabel({\n tagPickerId,\n state: state as Pick<TagPickerControlBaseState, 'expandIcon'>,\n });\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\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 noPopover = useTagPickerContext_unstable(ctx => ctx.noPopover ?? false);\n const baseProps =\n !noPopover && props.expandIcon === undefined\n ? {\n ...props,\n expandIcon: <ChevronDownRegular />,\n }\n : props;\n const baseState = useTagPickerControlBase_unstable(baseProps, ref);\n const size = useTagPickerContext_unstable(ctx => ctx.size);\n const appearance = useTagPickerContext_unstable(ctx => ctx.appearance);\n\n return {\n ...baseState,\n size,\n appearance,\n };\n};\n"],"names":["React","elementContains","getIntrinsicElementProps","slot","useEventCallback","useId","useMergedRefs","useFluent_unstable","useFieldContext_unstable","ChevronDownRegular","tagPickerControlAsideWidthToken","useTagPickerContext_unstable","useExpandLabel","useResizeObserverRef","useTagPickerControlBase_unstable","props","ref","targetRef","ctx","triggerRef","tagPickerGroupRef","open","popoverId","setOpen","secondaryInnerActionRef","secondaryActionRef","disabled","invalid","validationState","noPopover","targetDocument","tagPickerId","rafIdRef","useRef","innerRef","expandIconRef","asideRef","secondaryAction","optional","elementType","expandIcon","defaultProps","undefined","role","expandIconMergeRef","observerRef","entry","targetWindow","defaultView","current","requestAnimationFrame","style","setProperty","contentRect","width","aside","renderByDefault","Boolean","mergedAsideRefs","handleMouseDown","event","isDefaultPrevented","target","preventDefault","focus","state","components","root","always","onMouseDown","expandIconLabelRef","expandIconLabelMergeRef","useEffect","cancelAnimationFrame","useTagPickerControl_unstable","baseProps","baseState","size","appearance"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SACEC,eAAe,EACfC,wBAAwB,EACxBC,IAAI,EACJC,gBAAgB,EAChBC,KAAK,EACLC,aAAa,QACR,4BAA4B;AACnC,SAASC,kBAAkB,QAAQ,kCAAkC;AACrE,SAASC,wBAAwB,QAAQ,wBAAwB;AACjE,SAASC,kBAAkB,QAAQ,wBAAwB;AAG3D,SAASC,+BAA+B,QAAQ,wCAAqC;AACrF,SAASC,4BAA4B,QAAQ,qCAAkC;AAC/E,SAASC,cAAc,QAAQ,gCAA6B;AAC5D,SAASC,oBAAoB,QAAQ,sCAAmC;AAExE;;;;;CAKC,GACD,OAAO,MAAMC,mCAAmC,CAC9CC,OACAC;QAUgBR;IARhB,MAAMS,YAAYN,6BAA6BO,CAAAA,MAAOA,IAAID,SAAS;IACnE,MAAME,aAAaR,6BAA6BO,CAAAA,MAAOA,IAAIC,UAAU;IACrE,MAAMC,oBAAoBT,6BAA6BO,CAAAA,MAAOA,IAAIE,iBAAiB;IACnF,MAAMC,OAAOV,6BAA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G3B,KAAK;YACRsD,aAAaV;QACf,IACA;YAAEpB,aAAa;QAAM;QAEvBgB;QACAf;QACAH;QACAX;QACAC;IACF;IAEA,MAAM2C,qBAAqB1D,eAAe;QACxCmB;QACAkC,OAAOA;IACT;IAEA,MAAMM,0BAA0BjE,cAAckC,uBAAAA,iCAAAA,WAAYxB,GAAG,EAAEsD;IAC/D,IAAIL,MAAMzB,UAAU,EAAE;QACpByB,MAAMzB,UAAU,CAACxB,GAAG,GAAGuD;IACzB;IAEAvE,MAAMwE,SAAS,CAAC;QACd,IAAIxC,SAASiB,OAAO,KAAInB,2BAAAA,qCAAAA,eAAgBkB,WAAW,GAAE;YACnDlB,eAAekB,WAAW,CAACyB,oBAAoB,CAACzC,SAASiB,OAAO;QAClE;IACF,GAAG;QAACnB;KAAe;IAEnB,OAAOmC;AACT,EAAE;AAEF;;;;;;;;CAQC,GACD,OAAO,MAAMS,+BAA+B,CAC1C3D,OACAC;IAEA,MAAMa,YAAYlB,6BAA6BO,CAAAA;YAAOA;eAAAA,CAAAA,iBAAAA,IAAIW,SAAS,cAAbX,4BAAAA,iBAAiB;;IACvE,MAAMyD,YACJ,CAAC9C,aAAad,MAAMyB,UAAU,KAAKE,YAC/B;QACE,GAAG3B,KAAK;QACRyB,0BAAY,oBAAC/B;IACf,IACAM;IACN,MAAM6D,YAAY9D,iCAAiC6D,WAAW3D;IAC9D,MAAM6D,OAAOlE,6BAA6BO,CAAAA,MAAOA,IAAI2D,IAAI;IACzD,MAAMC,aAAanE,6BAA6BO,CAAAA,MAAOA,IAAI4D,UAAU;IAErE,OAAO;QACL,GAAGF,SAAS;QACZC;QACAC;IACF;AACF,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/TagPickerControl/useTagPickerControl.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ExtractSlotProps, Slot } from '@fluentui/react-utilities';\nimport {\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 { useFieldContext_unstable } from '@fluentui/react-field';\nimport { ChevronDownRegular } from '@fluentui/react-icons';\n\nimport type { TagPickerControlBaseState, TagPickerControlProps, TagPickerControlState } from './TagPickerControl.types';\nimport { tagPickerControlAsideWidthToken } from './useTagPickerControlStyles.styles';\nimport { useTagPickerContext_unstable } from '../../contexts/TagPickerContext';\nimport { useExpandLabel } from '../../utils/useExpandLabel';\nimport { useResizeObserverRef } from '../../utils/useResizeObserverRef';\n\n/**\n * Create the base state required to render TagPickerControl, without design-only state.\n *\n * @param props - props from this instance of TagPickerControl\n * @param ref - reference to root HTMLDivElement of TagPickerControl\n */\nexport const useTagPickerControlBase_unstable = (\n props: TagPickerControlProps,\n ref: React.Ref<HTMLDivElement>,\n): TagPickerControlBaseState => {\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 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 defaultProps: {\n 'aria-expanded': open,\n 'aria-disabled': disabled ? 'true' : undefined,\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: TagPickerControlBaseState = {\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 disabled,\n invalid,\n };\n\n const expandIconLabelRef = useExpandLabel({\n tagPickerId,\n state: state as Pick<TagPickerControlBaseState, 'expandIcon'>,\n });\n\n const expandIconLabelMergeRef = useMergedRefs(expandIcon?.ref, expandIconLabelRef);\n if (state.expandIcon) {\n state.expandIcon.ref = expandIconLabelMergeRef;\n }\n\n React.useEffect(() => {\n const targetWindow = targetDocument?.defaultView;\n\n return () => {\n if (rafIdRef.current && targetWindow) {\n targetWindow.cancelAnimationFrame(rafIdRef.current);\n }\n };\n }, [targetDocument]);\n\n return state;\n};\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 noPopover = useTagPickerContext_unstable(ctx => ctx.noPopover ?? false);\n const baseProps =\n !noPopover && props.expandIcon === undefined\n ? {\n ...props,\n expandIcon: <ChevronDownRegular />,\n }\n : props;\n const baseState = useTagPickerControlBase_unstable(baseProps, ref);\n const size = useTagPickerContext_unstable(ctx => ctx.size);\n const appearance = useTagPickerContext_unstable(ctx => ctx.appearance);\n\n return {\n ...baseState,\n size,\n appearance,\n };\n};\n"],"names":["React","elementContains","getIntrinsicElementProps","slot","useEventCallback","useId","useMergedRefs","useFluent_unstable","useFieldContext_unstable","ChevronDownRegular","tagPickerControlAsideWidthToken","useTagPickerContext_unstable","useExpandLabel","useResizeObserverRef","useTagPickerControlBase_unstable","props","ref","targetRef","ctx","triggerRef","tagPickerGroupRef","open","popoverId","setOpen","secondaryInnerActionRef","secondaryActionRef","disabled","invalid","validationState","noPopover","targetDocument","tagPickerId","rafIdRef","useRef","innerRef","expandIconRef","asideRef","secondaryAction","optional","elementType","expandIcon","defaultProps","undefined","role","expandIconMergeRef","observerRef","entry","targetWindow","defaultView","current","requestAnimationFrame","style","setProperty","contentRect","width","aside","renderByDefault","Boolean","mergedAsideRefs","handleMouseDown","event","isDefaultPrevented","target","preventDefault","focus","state","components","root","always","onMouseDown","expandIconLabelRef","expandIconLabelMergeRef","useEffect","cancelAnimationFrame","useTagPickerControl_unstable","baseProps","baseState","size","appearance"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SACEC,eAAe,EACfC,wBAAwB,EACxBC,IAAI,EACJC,gBAAgB,EAChBC,KAAK,EACLC,aAAa,QACR,4BAA4B;AACnC,SAASC,kBAAkB,QAAQ,kCAAkC;AACrE,SAASC,wBAAwB,QAAQ,wBAAwB;AACjE,SAASC,kBAAkB,QAAQ,wBAAwB;AAG3D,SAASC,+BAA+B,QAAQ,wCAAqC;AACrF,SAASC,4BAA4B,QAAQ,qCAAkC;AAC/E,SAASC,cAAc,QAAQ,gCAA6B;AAC5D,SAASC,oBAAoB,QAAQ,sCAAmC;AAExE;;;;;CAKC,GACD,OAAO,MAAMC,mCAAmC,CAC9CC,OACAC;QAUgBR;IARhB,MAAMS,YAAYN,6BAA6BO,CAAAA,MAAOA,IAAID,SAAS;IACnE,MAAME,aAAaR,6BAA6BO,CAAAA,MAAOA,IAAIC,UAAU;IACrE,MAAMC,oBAAoBT,6BAA6BO,CAAAA,MAAOA,IAAIE,iBAAiB;IACnF,MAAMC,OAAOV,6BAA6BO,CAAAA,MAAOA,IAAIG,IAAI;IACzD,MAAMC,YAAYX,6BAA6BO,CAAAA,MAAOA,IAAII,SAAS;IACnE,MAAMC,UAAUZ,6BAA6BO,CAAAA,MAAOA,IAAIK,OAAO;IAC/D,MAAMC,0BAA0Bb,6BAA6BO,CAAAA,MAAOA,IAAIO,kBAAkB;IAC1F,MAAMC,WAAWf,6BAA6BO,CAAAA,MAAOA,IAAIQ,QAAQ;IACjE,MAAMC,UAAUnB,EAAAA,4BAAAA,wCAAAA,gDAAAA,0BAA4BoB,eAAe,MAAK;IAChE,MAAMC,YAAYlB,6BAA6BO,CAAAA;YAAOA;gBAAAA,iBAAAA,IAAIW,SAAS,cAAbX,4BAAAA,iBAAiB;;IAEvE,MAAM,EAAEY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ASiB,OAAO;YACpD;QACF;IACF,GAAG;QAACnB;KAAe;IAEnB,OAAOmC;AACT,EAAE;AAEF;;;;;;;;CAQC,GACD,OAAO,MAAMS,+BAA+B,CAC1C3D,OACAC;IAEA,MAAMa,YAAYlB,6BAA6BO,CAAAA;YAAOA;gBAAAA,iBAAAA,IAAIW,SAAS,cAAbX,4BAAAA,iBAAiB;;IACvE,MAAMyD,YACJ,CAAC9C,aAAad,MAAMyB,UAAU,KAAKE,YAC/B;QACE,GAAG3B,KAAK;QACRyB,0BAAY,oBAAC/B;IACf,IACAM;IACN,MAAM6D,YAAY9D,iCAAiC6D,WAAW3D;IAC9D,MAAM6D,OAAOlE,6BAA6BO,CAAAA,MAAOA,IAAI2D,IAAI;IACzD,MAAMC,aAAanE,6BAA6BO,CAAAA,MAAOA,IAAI4D,UAAU;IAErE,OAAO;QACL,GAAGF,SAAS;QACZC;QACAC;IACF;AACF,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPickerControl/useTagPickerControlStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { 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 const styles = useStyles();\n const iconStyles = useIconStyles();\n const asideStyles = useAsideStyles();\n const secondaryActionStyles = useSecondaryActionStyles();\n // eslint-disable-next-line react-hooks/immutability\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 // eslint-disable-next-line react-hooks/immutability\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 // eslint-disable-next-line react-hooks/immutability\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 // eslint-disable-next-line react-hooks/immutability\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;AAEA,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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AIL,MAAMxF,eAAe,EAAE;QACzB,oDAAoD;QACpDwF,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":["'use client';\n\nimport { 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 const styles = useStyles();\n const iconStyles = useIconStyles();\n const asideStyles = useAsideStyles();\n const secondaryActionStyles = useSecondaryActionStyles();\n // eslint-disable-next-line react-hooks/immutability\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 // eslint-disable-next-line react-hooks/immutability\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 // eslint-disable-next-line react-hooks/immutability\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 // eslint-disable-next-line react-hooks/immutability\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;AAEA,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;IACjBC,OAAO;AACT,EAAE;AAEF,OAAO,MAAMC,kCAAkC,qCAA8C;AAE7F;;CAEC,GACD,MAAMC,YAAYV,WAAW;IAC3BK,MAAM;QACJM,cAAcR,OAAOS,kBAAkB;QACvCC,cAAc,CAAC,KAAK,EAAEV,OAAOW,kBAAkB,CAAC,OAAO,EAAEL,gCAAgC,OAAO,CAAC;QACjGM,aAAaZ,OAAOW,kBAAkB;QACtCE,YAAY;QACZC,WAAWd,OAAOe,oBAAoB;QACtCC,WAAW;QACXC,SAAS;QACTC,UAAU;QACVC,UAAU;QACVC,UAAU;QAEV,6CAA6C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,EAClBL,MAAM,CAACD,MAAMO,UAAU,CAAC,EACxB,CAACP,MAAMnB,QAAQ,IAAImB,MAAMO,UAAU,KAAK,aAAaN,OAAOjC,kBAAkB,EAC9EgC,MAAMtB,OAAO,IAAIsB,MAAMO,UAAU,KAAK,eAAeN,OAAOvB,OAAO,EACnEsB,MAAMtB,OAAO,IAAIsB,MAAMO,UAAU,KAAK,eAAeN,OAAOrB,gBAAgB,EAC5EoB,MAAMnB,QAAQ,IAAIoB,OAAOpB,QAAQ,EACjCmB,MAAM1F,IAAI,CAAC+F,SAAS;IAGtB,IAAIL,MAAMvF,KAAK,EAAE;QACf,oDAAoD;QACpDuF,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;QACpB,oDAAoD;QACpDyF,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;QACzB,oDAAoD;QACpDwF,MAAMxF,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":["'use client';\n\nimport * 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;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,0BAA0B,QAAQ,yBAAsB;AAEjE,SAASC,iCAAiC,QAAQ,uBAAuB;AACzE,SAASC,6BAA6B,QAAQ,4BAAyB;AACvE,SAASC,gCAAgC,QAAQ,sCAAmC;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":["'use client';\n\nimport * 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;AAEA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,0BAA0B,QAAQ,yBAAsB;AAEjE,SAASC,iCAAiC,QAAQ,uBAAuB;AACzE,SAASC,6BAA6B,QAAQ,4BAAyB;AACvE,SAASC,gCAAgC,QAAQ,sCAAmC;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 { TagGroupBaseState, 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\n/**\n * TagPickerGroup Base State - omits design-only state.\n */\nexport type TagPickerGroupBaseState = TagGroupBaseState & {\n hasSelectedOptions: boolean;\n};\n"],"names":[],"mappings":"AAiBA;;CAEC,GACD,WAEE"}
1
+ {"version":3,"sources":["../../../src/components/TagPickerGroup/TagPickerGroup.types.ts"],"sourcesContent":["import type { TagGroupBaseState, 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\n/**\n * TagPickerGroup Base State - omits design-only state.\n */\nexport type TagPickerGroupBaseState = TagGroupBaseState & {\n hasSelectedOptions: boolean;\n};\n"],"names":[],"mappings":"AAiBA;;CAEC,GACD,WAEE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPickerGroup/index.ts"],"sourcesContent":["export { TagPickerGroup } from './TagPickerGroup';\nexport type {\n TagPickerGroupBaseState,\n TagPickerGroupProps,\n TagPickerGroupSlots,\n TagPickerGroupState,\n} 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,sBAAmB;AAOlD,SAASC,6BAA6B,QAAQ,4BAAyB;AACvE,SAASC,0BAA0B,QAAQ,yBAAsB;AACjE,SAASC,wBAAwB,EAAEC,gCAAgC,QAAQ,sCAAmC"}
1
+ {"version":3,"sources":["../../../src/components/TagPickerGroup/index.ts"],"sourcesContent":["export { TagPickerGroup } from './TagPickerGroup';\nexport type {\n TagPickerGroupBaseState,\n TagPickerGroupProps,\n TagPickerGroupSlots,\n TagPickerGroupState,\n} 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,sBAAmB;AAOlD,SAASC,6BAA6B,QAAQ,4BAAyB;AACvE,SAASC,0BAA0B,QAAQ,yBAAsB;AACjE,SAASC,wBAAwB,EAAEC,gCAAgC,QAAQ,sCAAmC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/TagPickerGroup/renderTagPickerGroup.ts"],"sourcesContent":["import type { JSXElement } from '@fluentui/react-utilities';\nimport type { TagPickerGroupBaseState } from './TagPickerGroup.types';\nimport { renderTagGroup_unstable, type TagGroupContextValues } from '@fluentui/react-tags';\n\nexport function renderTagPickerGroup_unstable(\n state: TagPickerGroupBaseState,\n contexts: TagGroupContextValues,\n): JSXElement | null {\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":"AAEA,SAASA,uBAAuB,QAAoC,uBAAuB;AAE3F,OAAO,SAASC,8BACdC,KAA8B,EAC9BC,QAA+B;IAE/B,IAAI,CAACD,MAAME,kBAAkB,EAAE;QAC7B,OAAO;IACT;IAEA,OAAOJ,wBAAwBE,OAAOC;AACxC"}
1
+ {"version":3,"sources":["../../../src/components/TagPickerGroup/renderTagPickerGroup.ts"],"sourcesContent":["import type { JSXElement } from '@fluentui/react-utilities';\nimport type { TagPickerGroupBaseState } from './TagPickerGroup.types';\nimport { renderTagGroup_unstable, type TagGroupContextValues } from '@fluentui/react-tags';\n\nexport function renderTagPickerGroup_unstable(\n state: TagPickerGroupBaseState,\n contexts: TagGroupContextValues,\n): JSXElement | null {\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":"AAEA,SAASA,uBAAuB,QAAoC,uBAAuB;AAE3F,OAAO,SAASC,8BACdC,KAA8B,EAC9BC,QAA+B;IAE/B,IAAI,CAACD,MAAME,kBAAkB,EAAE;QAC7B,OAAO;IACT;IAEA,OAAOJ,wBAAwBE,OAAOC;AACxC"}