@fluentui/react-tag-picker 9.1.1 → 9.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/CHANGELOG.md +35 -2
  2. package/dist/index.d.ts +2 -2
  3. package/lib/TagPicker.js.map +1 -1
  4. package/lib/TagPickerButton.js.map +1 -1
  5. package/lib/TagPickerControl.js.map +1 -1
  6. package/lib/TagPickerGroup.js.map +1 -1
  7. package/lib/TagPickerInput.js.map +1 -1
  8. package/lib/TagPickerList.js.map +1 -1
  9. package/lib/TagPickerOption.js.map +1 -1
  10. package/lib/TagPickerOptionGroup.js.map +1 -1
  11. package/lib/components/TagPicker/TagPicker.js.map +1 -1
  12. package/lib/components/TagPicker/TagPicker.types.js.map +1 -1
  13. package/lib/components/TagPicker/index.js.map +1 -1
  14. package/lib/components/TagPicker/renderTagPicker.js.map +1 -1
  15. package/lib/components/TagPicker/useTagPicker.js +1 -0
  16. package/lib/components/TagPicker/useTagPicker.js.map +1 -1
  17. package/lib/components/TagPicker/useTagPickerContextValues.js +3 -1
  18. package/lib/components/TagPicker/useTagPickerContextValues.js.map +1 -1
  19. package/lib/components/TagPickerButton/TagPickerButton.js.map +1 -1
  20. package/lib/components/TagPickerButton/TagPickerButton.types.js +3 -1
  21. package/lib/components/TagPickerButton/TagPickerButton.types.js.map +1 -1
  22. package/lib/components/TagPickerButton/index.js.map +1 -1
  23. package/lib/components/TagPickerButton/renderTagPickerButton.js.map +1 -1
  24. package/lib/components/TagPickerButton/useTagPickerButton.js.map +1 -1
  25. package/lib/components/TagPickerButton/useTagPickerButtonStyles.styles.js +2 -0
  26. package/lib/components/TagPickerButton/useTagPickerButtonStyles.styles.js.map +1 -1
  27. package/lib/components/TagPickerControl/TagPickerControl.js.map +1 -1
  28. package/lib/components/TagPickerControl/TagPickerControl.types.js.map +1 -1
  29. package/lib/components/TagPickerControl/index.js.map +1 -1
  30. package/lib/components/TagPickerControl/renderTagPickerControl.js.map +1 -1
  31. package/lib/components/TagPickerControl/useTagPickerControl.js.map +1 -1
  32. package/lib/components/TagPickerControl/useTagPickerControlStyles.styles.js +2 -0
  33. package/lib/components/TagPickerControl/useTagPickerControlStyles.styles.js.map +1 -1
  34. package/lib/components/TagPickerGroup/TagPickerGroup.js.map +1 -1
  35. package/lib/components/TagPickerGroup/TagPickerGroup.types.js +3 -1
  36. package/lib/components/TagPickerGroup/TagPickerGroup.types.js.map +1 -1
  37. package/lib/components/TagPickerGroup/index.js.map +1 -1
  38. package/lib/components/TagPickerGroup/renderTagPickerGroup.js.map +1 -1
  39. package/lib/components/TagPickerGroup/useTagPickerGroup.js.map +1 -1
  40. package/lib/components/TagPickerGroup/useTagPickerGroupStyles.styles.js +2 -0
  41. package/lib/components/TagPickerGroup/useTagPickerGroupStyles.styles.js.map +1 -1
  42. package/lib/components/TagPickerInput/TagPickerInput.js.map +1 -1
  43. package/lib/components/TagPickerInput/TagPickerInput.types.js +3 -1
  44. package/lib/components/TagPickerInput/TagPickerInput.types.js.map +1 -1
  45. package/lib/components/TagPickerInput/index.js.map +1 -1
  46. package/lib/components/TagPickerInput/renderTagPickerInput.js.map +1 -1
  47. package/lib/components/TagPickerInput/useTagPickerInput.js +2 -2
  48. package/lib/components/TagPickerInput/useTagPickerInput.js.map +1 -1
  49. package/lib/components/TagPickerInput/useTagPickerInputStyles.styles.js +2 -0
  50. package/lib/components/TagPickerInput/useTagPickerInputStyles.styles.js.map +1 -1
  51. package/lib/components/TagPickerList/TagPickerList.js.map +1 -1
  52. package/lib/components/TagPickerList/TagPickerList.types.js +3 -1
  53. package/lib/components/TagPickerList/TagPickerList.types.js.map +1 -1
  54. package/lib/components/TagPickerList/index.js.map +1 -1
  55. package/lib/components/TagPickerList/renderTagPickerList.js.map +1 -1
  56. package/lib/components/TagPickerList/useTagPickerList.js.map +1 -1
  57. package/lib/components/TagPickerList/useTagPickerListStyles.styles.js +2 -0
  58. package/lib/components/TagPickerList/useTagPickerListStyles.styles.js.map +1 -1
  59. package/lib/components/TagPickerOption/TagPickerOption.js.map +1 -1
  60. package/lib/components/TagPickerOption/TagPickerOption.types.js.map +1 -1
  61. package/lib/components/TagPickerOption/index.js.map +1 -1
  62. package/lib/components/TagPickerOption/renderTagPickerOption.js.map +1 -1
  63. package/lib/components/TagPickerOption/useTagPickerOption.js.map +1 -1
  64. package/lib/components/TagPickerOption/useTagPickerOptionStyles.styles.js +2 -0
  65. package/lib/components/TagPickerOption/useTagPickerOptionStyles.styles.js.map +1 -1
  66. package/lib/components/TagPickerOptionGroup/TagPickerOptionGroup.js.map +1 -1
  67. package/lib/components/TagPickerOptionGroup/TagPickerOptionGroup.types.js +3 -1
  68. package/lib/components/TagPickerOptionGroup/TagPickerOptionGroup.types.js.map +1 -1
  69. package/lib/components/TagPickerOptionGroup/index.js.map +1 -1
  70. package/lib/components/TagPickerOptionGroup/renderTagPickerOptionGroup.js.map +1 -1
  71. package/lib/components/TagPickerOptionGroup/useTagPickerOptionGroup.js.map +1 -1
  72. package/lib/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.js +2 -0
  73. package/lib/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.js.map +1 -1
  74. package/lib/contexts/TagPickerContext.js.map +1 -1
  75. package/lib/index.js.map +1 -1
  76. package/lib/utils/tagPicker2Tag.js.map +1 -1
  77. package/lib/utils/tokens.js.map +1 -1
  78. package/lib/utils/useResizeObserverRef.js.map +1 -1
  79. package/lib/utils/useTagPickerFilter.js.map +1 -1
  80. package/lib-commonjs/TagPicker.js.map +1 -1
  81. package/lib-commonjs/TagPickerButton.js.map +1 -1
  82. package/lib-commonjs/TagPickerControl.js.map +1 -1
  83. package/lib-commonjs/TagPickerGroup.js.map +1 -1
  84. package/lib-commonjs/TagPickerInput.js.map +1 -1
  85. package/lib-commonjs/TagPickerList.js.map +1 -1
  86. package/lib-commonjs/TagPickerOption.js.map +1 -1
  87. package/lib-commonjs/TagPickerOptionGroup.js.map +1 -1
  88. package/lib-commonjs/components/TagPicker/TagPicker.js.map +1 -1
  89. package/lib-commonjs/components/TagPicker/TagPicker.types.js.map +1 -1
  90. package/lib-commonjs/components/TagPicker/index.js.map +1 -1
  91. package/lib-commonjs/components/TagPicker/renderTagPicker.js.map +1 -1
  92. package/lib-commonjs/components/TagPicker/useTagPicker.js +1 -0
  93. package/lib-commonjs/components/TagPicker/useTagPicker.js.map +1 -1
  94. package/lib-commonjs/components/TagPicker/useTagPickerContextValues.js +3 -1
  95. package/lib-commonjs/components/TagPicker/useTagPickerContextValues.js.map +1 -1
  96. package/lib-commonjs/components/TagPickerButton/TagPickerButton.js.map +1 -1
  97. package/lib-commonjs/components/TagPickerButton/TagPickerButton.types.js +3 -1
  98. package/lib-commonjs/components/TagPickerButton/TagPickerButton.types.js.map +1 -1
  99. package/lib-commonjs/components/TagPickerButton/index.js.map +1 -1
  100. package/lib-commonjs/components/TagPickerButton/renderTagPickerButton.js.map +1 -1
  101. package/lib-commonjs/components/TagPickerButton/useTagPickerButton.js.map +1 -1
  102. package/lib-commonjs/components/TagPickerButton/useTagPickerButtonStyles.styles.js +1 -0
  103. package/lib-commonjs/components/TagPickerButton/useTagPickerButtonStyles.styles.js.map +1 -1
  104. package/lib-commonjs/components/TagPickerControl/TagPickerControl.js.map +1 -1
  105. package/lib-commonjs/components/TagPickerControl/TagPickerControl.types.js.map +1 -1
  106. package/lib-commonjs/components/TagPickerControl/index.js.map +1 -1
  107. package/lib-commonjs/components/TagPickerControl/renderTagPickerControl.js.map +1 -1
  108. package/lib-commonjs/components/TagPickerControl/useTagPickerControl.js.map +1 -1
  109. package/lib-commonjs/components/TagPickerControl/useTagPickerControlStyles.styles.js +5 -4
  110. package/lib-commonjs/components/TagPickerControl/useTagPickerControlStyles.styles.js.map +1 -1
  111. package/lib-commonjs/components/TagPickerGroup/TagPickerGroup.js.map +1 -1
  112. package/lib-commonjs/components/TagPickerGroup/TagPickerGroup.types.js +3 -1
  113. package/lib-commonjs/components/TagPickerGroup/TagPickerGroup.types.js.map +1 -1
  114. package/lib-commonjs/components/TagPickerGroup/index.js.map +1 -1
  115. package/lib-commonjs/components/TagPickerGroup/renderTagPickerGroup.js.map +1 -1
  116. package/lib-commonjs/components/TagPickerGroup/useTagPickerGroup.js.map +1 -1
  117. package/lib-commonjs/components/TagPickerGroup/useTagPickerGroupStyles.styles.js +1 -0
  118. package/lib-commonjs/components/TagPickerGroup/useTagPickerGroupStyles.styles.js.map +1 -1
  119. package/lib-commonjs/components/TagPickerInput/TagPickerInput.js.map +1 -1
  120. package/lib-commonjs/components/TagPickerInput/TagPickerInput.types.js +3 -1
  121. package/lib-commonjs/components/TagPickerInput/TagPickerInput.types.js.map +1 -1
  122. package/lib-commonjs/components/TagPickerInput/index.js.map +1 -1
  123. package/lib-commonjs/components/TagPickerInput/renderTagPickerInput.js.map +1 -1
  124. package/lib-commonjs/components/TagPickerInput/useTagPickerInput.js +2 -2
  125. package/lib-commonjs/components/TagPickerInput/useTagPickerInput.js.map +1 -1
  126. package/lib-commonjs/components/TagPickerInput/useTagPickerInputStyles.styles.js +1 -0
  127. package/lib-commonjs/components/TagPickerInput/useTagPickerInputStyles.styles.js.map +1 -1
  128. package/lib-commonjs/components/TagPickerList/TagPickerList.js.map +1 -1
  129. package/lib-commonjs/components/TagPickerList/TagPickerList.types.js +3 -1
  130. package/lib-commonjs/components/TagPickerList/TagPickerList.types.js.map +1 -1
  131. package/lib-commonjs/components/TagPickerList/index.js.map +1 -1
  132. package/lib-commonjs/components/TagPickerList/renderTagPickerList.js.map +1 -1
  133. package/lib-commonjs/components/TagPickerList/useTagPickerList.js.map +1 -1
  134. package/lib-commonjs/components/TagPickerList/useTagPickerListStyles.styles.js +1 -0
  135. package/lib-commonjs/components/TagPickerList/useTagPickerListStyles.styles.js.map +1 -1
  136. package/lib-commonjs/components/TagPickerOption/TagPickerOption.js.map +1 -1
  137. package/lib-commonjs/components/TagPickerOption/TagPickerOption.types.js.map +1 -1
  138. package/lib-commonjs/components/TagPickerOption/index.js.map +1 -1
  139. package/lib-commonjs/components/TagPickerOption/renderTagPickerOption.js.map +1 -1
  140. package/lib-commonjs/components/TagPickerOption/useTagPickerOption.js.map +1 -1
  141. package/lib-commonjs/components/TagPickerOption/useTagPickerOptionStyles.styles.js +1 -0
  142. package/lib-commonjs/components/TagPickerOption/useTagPickerOptionStyles.styles.js.map +1 -1
  143. package/lib-commonjs/components/TagPickerOptionGroup/TagPickerOptionGroup.js.map +1 -1
  144. package/lib-commonjs/components/TagPickerOptionGroup/TagPickerOptionGroup.types.js +3 -1
  145. package/lib-commonjs/components/TagPickerOptionGroup/TagPickerOptionGroup.types.js.map +1 -1
  146. package/lib-commonjs/components/TagPickerOptionGroup/index.js.map +1 -1
  147. package/lib-commonjs/components/TagPickerOptionGroup/renderTagPickerOptionGroup.js.map +1 -1
  148. package/lib-commonjs/components/TagPickerOptionGroup/useTagPickerOptionGroup.js.map +1 -1
  149. package/lib-commonjs/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.js +1 -0
  150. package/lib-commonjs/components/TagPickerOptionGroup/useTagPickerOptionGroupStyles.styles.js.map +1 -1
  151. package/lib-commonjs/contexts/TagPickerContext.js +3 -3
  152. package/lib-commonjs/contexts/TagPickerContext.js.map +1 -1
  153. package/lib-commonjs/index.js +65 -65
  154. package/lib-commonjs/index.js.map +1 -1
  155. package/lib-commonjs/utils/tagPicker2Tag.js +3 -3
  156. package/lib-commonjs/utils/tagPicker2Tag.js.map +1 -1
  157. package/lib-commonjs/utils/tokens.js.map +1 -1
  158. package/lib-commonjs/utils/useResizeObserverRef.js.map +1 -1
  159. package/lib-commonjs/utils/useTagPickerFilter.js.map +1 -1
  160. package/package.json +12 -12
@@ -1 +1 @@
1
- {"version":3,"sources":["TagPickerGroup.js"],"sourcesContent":["import * as React from 'react';\nimport { useTagPickerGroup_unstable } from './useTagPickerGroup';\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 * TagPickerGroup component -\n * A TagPickerGroup is a composite component that allows users to group tags together.\n */ export const TagPickerGroup = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useTagPickerGroup_unstable(props, ref);\n useTagPickerGroupStyles_unstable(state);\n useCustomStyleHook_unstable('useTagPickerGroupStyles_unstable')(state);\n return renderTagPickerGroup_unstable(state, useTagGroupContextValues_unstable(state));\n});\nTagPickerGroup.displayName = 'TagPickerGroup';\n"],"names":["TagPickerGroup","React","forwardRef","props","ref","state","useTagPickerGroup_unstable","useTagPickerGroupStyles_unstable","useCustomStyleHook_unstable","renderTagPickerGroup_unstable","useTagGroupContextValues_unstable","displayName"],"mappings":";;;;+BASiBA;;;eAAAA;;;;iEATM;mCACoB;2BACO;sCACJ;+CACG;qCACL;AAIjC,MAAMA,iBAAiB,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACrE,MAAMC,QAAQC,IAAAA,6CAA0B,EAACH,OAAOC;IAChDG,IAAAA,+DAAgC,EAACF;IACjCG,IAAAA,gDAA2B,EAAC,oCAAoCH;IAChE,OAAOI,IAAAA,mDAA6B,EAACJ,OAAOK,IAAAA,4CAAiC,EAACL;AAClF;AACAL,eAAeW,WAAW,GAAG"}
1
+ {"version":3,"sources":["TagPickerGroup.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useTagPickerGroup_unstable } from './useTagPickerGroup';\nimport type { TagPickerGroupProps } from './TagPickerGroup.types';\nimport { useTagGroupContextValues_unstable } from '@fluentui/react-tags';\nimport { renderTagPickerGroup_unstable } from './renderTagPickerGroup';\nimport { useTagPickerGroupStyles_unstable } from './useTagPickerGroupStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * TagPickerGroup component -\n * A TagPickerGroup is a composite component that allows users to group tags together.\n */\nexport const TagPickerGroup: ForwardRefComponent<TagPickerGroupProps> = React.forwardRef((props, ref) => {\n const state = useTagPickerGroup_unstable(props, ref);\n\n useTagPickerGroupStyles_unstable(state);\n useCustomStyleHook_unstable('useTagPickerGroupStyles_unstable')(state);\n return renderTagPickerGroup_unstable(state, useTagGroupContextValues_unstable(state));\n});\n\nTagPickerGroup.displayName = 'TagPickerGroup';\n"],"names":["TagPickerGroup","React","forwardRef","props","ref","state","useTagPickerGroup_unstable","useTagPickerGroupStyles_unstable","useCustomStyleHook_unstable","renderTagPickerGroup_unstable","useTagGroupContextValues_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAaaA;;;eAAAA;;;;iEAbU;mCAEoB;2BAEO;sCACJ;+CACG;qCACL;AAMrC,MAAMA,iBAAAA,WAAAA,GAA2DC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC/F,MAAMC,QAAQC,IAAAA,6CAAAA,EAA2BH,OAAOC;IAEhDG,IAAAA,+DAAAA,EAAiCF;IACjCG,IAAAA,gDAAAA,EAA4B,oCAAoCH;IAChE,OAAOI,IAAAA,mDAAAA,EAA8BJ,OAAOK,IAAAA,4CAAAA,EAAkCL;AAChF;AAEAL,eAAeW,WAAW,GAAG"}
@@ -1,4 +1,6 @@
1
- "use strict";
1
+ /**
2
+ * State used in rendering TagPickerGroup
3
+ */ "use strict";
2
4
  Object.defineProperty(exports, "__esModule", {
3
5
  value: true
4
6
  });
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":""}
1
+ {"version":3,"sources":["TagPickerGroup.types.ts"],"sourcesContent":["import type { TagGroupSlots, TagGroupState } from '@fluentui/react-tags';\nimport type { ComponentProps } from '@fluentui/react-utilities';\n\nexport type TagPickerGroupSlots = TagGroupSlots;\n\n/**\n * TagPickerGroup Props\n */\nexport type TagPickerGroupProps = ComponentProps<TagPickerGroupSlots>;\n\n/**\n * State used in rendering TagPickerGroup\n */\nexport type TagPickerGroupState = TagGroupState & {\n hasSelectedOptions: boolean;\n};\n"],"names":[],"rangeMappings":";;","mappings":"AAUA;;CAEC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export * from './TagPickerGroup';\nexport * from './TagPickerGroup.types';\nexport * from './renderTagPickerGroup';\nexport * from './useTagPickerGroup';\nexport * from './useTagPickerGroupStyles.styles';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './TagPickerGroup';\nexport * from './TagPickerGroup.types';\nexport * from './renderTagPickerGroup';\nexport * from './useTagPickerGroup';\nexport * from './useTagPickerGroupStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["renderTagPickerGroup.js"],"sourcesContent":["import { renderTagGroup_unstable } from '@fluentui/react-tags';\nexport function renderTagPickerGroup_unstable(state, contexts) {\n if (!state.hasSelectedOptions) {\n return null;\n }\n return renderTagGroup_unstable(state, contexts);\n}\n"],"names":["renderTagPickerGroup_unstable","state","contexts","hasSelectedOptions","renderTagGroup_unstable"],"mappings":";;;;+BACgBA;;;eAAAA;;;2BADwB;AACjC,SAASA,8BAA8BC,KAAK,EAAEC,QAAQ;IACzD,IAAI,CAACD,MAAME,kBAAkB,EAAE;QAC3B,OAAO;IACX;IACA,OAAOC,IAAAA,kCAAuB,EAACH,OAAOC;AAC1C"}
1
+ {"version":3,"sources":["renderTagPickerGroup.ts"],"sourcesContent":["import { TagPickerGroupState } from './TagPickerGroup.types';\nimport { renderTagGroup_unstable, type TagGroupContextValues } from '@fluentui/react-tags';\n\nexport function renderTagPickerGroup_unstable(state: TagPickerGroupState, contexts: TagGroupContextValues) {\n if (!state.hasSelectedOptions) {\n return null;\n }\n\n return renderTagGroup_unstable(state, contexts);\n}\n"],"names":["renderTagPickerGroup_unstable","state","contexts","hasSelectedOptions","renderTagGroup_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;","mappings":";;;;+BAGgBA;;;eAAAA;;;2BAFoD;AAE7D,SAASA,8BAA8BC,KAA0B,EAAEC,QAA+B;IACvG,IAAI,CAACD,MAAME,kBAAkB,EAAE;QAC7B,OAAO;IACT;IAEA,OAAOC,IAAAA,kCAAAA,EAAwBH,OAAOC;AACxC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useTagPickerGroup.js"],"sourcesContent":["import * as React from 'react';\nimport { useTagGroup_unstable } from '@fluentui/react-tags';\nimport { useTagPickerContext_unstable } from '../../contexts/TagPickerContext';\nimport { isHTMLElement, useEventCallback, useMergedRefs } from '@fluentui/react-utilities';\nimport { tagPickerAppearanceToTagAppearance, tagPickerSizeToTagSize } from '../../utils/tagPicker2Tag';\nimport { useArrowNavigationGroup } from '@fluentui/react-tabster';\nimport { ArrowRight } from '@fluentui/keyboard-keys';\n/**\n * Create the state required to render TagPickerGroup.\n *\n * The returned state can be modified with hooks such as usePickerTagGroupStyles_unstable,\n * before being passed to renderPickerTagGroup_unstable.\n *\n * @param props - props from this instance of TagPickerGroup\n * @param ref - reference to root HTMLDivElement of TagPickerGroup\n */ export const useTagPickerGroup_unstable = (props, ref)=>{\n const hasSelectedOptions = useTagPickerContext_unstable((ctx)=>ctx.selectedOptions.length > 0);\n const hasOneSelectedOption = useTagPickerContext_unstable((ctx)=>ctx.selectedOptions.length === 1);\n const triggerRef = useTagPickerContext_unstable((ctx)=>ctx.triggerRef);\n const tagPickerGroupRef = useTagPickerContext_unstable((ctx)=>ctx.tagPickerGroupRef);\n const selectOption = useTagPickerContext_unstable((ctx)=>ctx.selectOption);\n const size = useTagPickerContext_unstable((ctx)=>tagPickerSizeToTagSize(ctx.size));\n const appearance = useTagPickerContext_unstable((ctx)=>ctx.appearance);\n const arrowNavigationProps = useArrowNavigationGroup({\n circular: false,\n axis: 'both',\n memorizeCurrent: true\n });\n const state = useTagGroup_unstable({\n role: 'listbox',\n ...props,\n ...arrowNavigationProps,\n size,\n appearance: tagPickerAppearanceToTagAppearance(appearance),\n dismissible: true,\n onKeyDown: useEventCallback((event)=>{\n var _props_onKeyDown;\n (_props_onKeyDown = props.onKeyDown) === null || _props_onKeyDown === void 0 ? void 0 : _props_onKeyDown.call(props, event);\n if (isHTMLElement(event.target) && event.key === ArrowRight) {\n var _triggerRef_current;\n (_triggerRef_current = triggerRef.current) === null || _triggerRef_current === void 0 ? void 0 : _triggerRef_current.focus();\n }\n }),\n onDismiss: useEventCallback((event, data)=>{\n selectOption(event, {\n value: data.value,\n // These values no longer exist because the option has unregistered itself\n // for the purposes of selection - these values aren't actually used\n id: 'ERROR_DO_NOT_USE',\n text: 'ERROR_DO_NOT_USE'\n });\n if (hasOneSelectedOption && !event.isDefaultPrevented()) {\n var _triggerRef_current;\n (_triggerRef_current = triggerRef.current) === null || _triggerRef_current === void 0 ? void 0 : _triggerRef_current.focus();\n }\n })\n }, useMergedRefs(ref, tagPickerGroupRef));\n return {\n ...state,\n hasSelectedOptions\n };\n};\n"],"names":["useTagPickerGroup_unstable","props","ref","hasSelectedOptions","useTagPickerContext_unstable","ctx","selectedOptions","length","hasOneSelectedOption","triggerRef","tagPickerGroupRef","selectOption","size","tagPickerSizeToTagSize","appearance","arrowNavigationProps","useArrowNavigationGroup","circular","axis","memorizeCurrent","state","useTagGroup_unstable","role","tagPickerAppearanceToTagAppearance","dismissible","onKeyDown","useEventCallback","event","_props_onKeyDown","call","isHTMLElement","target","key","ArrowRight","_triggerRef_current","current","focus","onDismiss","data","value","id","text","isDefaultPrevented","useMergedRefs"],"mappings":";;;;+BAeiBA;;;eAAAA;;;;iEAfM;2BACc;kCACQ;gCACkB;+BACY;8BACnC;8BACb;AAShB,MAAMA,6BAA6B,CAACC,OAAOC;IAClD,MAAMC,qBAAqBC,IAAAA,8CAA4B,EAAC,CAACC,MAAMA,IAAIC,eAAe,CAACC,M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C1E,oEAAoE;gBACpEC,IAAI;gBACJC,MAAM;YACV;YACA,IAAIjC,wBAAwB,CAACmB,MAAMe,kBAAkB,IAAI;gBACrD,IAAIR;gBACHA,CAAAA,sBAAsBzB,WAAW0B,OAAO,AAAD,MAAO,QAAQD,wBAAwB,KAAK,IAAI,KAAK,IAAIA,oBAAoBE,KAAK;YAC9H;QACJ;IACJ,GAAGO,IAAAA,6BAAa,EAACzC,KAAKQ;IACtB,OAAO;QACH,GAAGU,KAAK;QACRjB;IACJ;AACJ"}
1
+ {"version":3,"sources":["useTagPickerGroup.ts"],"sourcesContent":["import * as React from 'react';\nimport type { TagPickerGroupProps, TagPickerGroupState } from './TagPickerGroup.types';\nimport { useTagGroup_unstable } from '@fluentui/react-tags';\nimport { useTagPickerContext_unstable } from '../../contexts/TagPickerContext';\nimport { isHTMLElement, useEventCallback, useMergedRefs } from '@fluentui/react-utilities';\nimport { tagPickerAppearanceToTagAppearance, tagPickerSizeToTagSize } from '../../utils/tagPicker2Tag';\nimport { useArrowNavigationGroup } from '@fluentui/react-tabster';\nimport { ArrowRight } from '@fluentui/keyboard-keys';\n\n/**\n * Create the state required to render TagPickerGroup.\n *\n * The returned state can be modified with hooks such as usePickerTagGroupStyles_unstable,\n * before being passed to renderPickerTagGroup_unstable.\n *\n * @param props - props from this instance of TagPickerGroup\n * @param ref - reference to root HTMLDivElement of TagPickerGroup\n */\nexport const useTagPickerGroup_unstable = (\n props: TagPickerGroupProps,\n ref: React.Ref<HTMLDivElement>,\n): TagPickerGroupState => {\n const hasSelectedOptions = useTagPickerContext_unstable(ctx => ctx.selectedOptions.length > 0);\n const hasOneSelectedOption = useTagPickerContext_unstable(ctx => ctx.selectedOptions.length === 1);\n const triggerRef = useTagPickerContext_unstable(ctx => ctx.triggerRef);\n const tagPickerGroupRef = useTagPickerContext_unstable(ctx => ctx.tagPickerGroupRef);\n const selectOption = useTagPickerContext_unstable(ctx => ctx.selectOption);\n const size = useTagPickerContext_unstable(ctx => tagPickerSizeToTagSize(ctx.size));\n const appearance = useTagPickerContext_unstable(ctx => ctx.appearance);\n\n const arrowNavigationProps = useArrowNavigationGroup({\n circular: false,\n axis: 'both',\n memorizeCurrent: true,\n });\n\n const state = useTagGroup_unstable(\n {\n role: 'listbox',\n ...props,\n ...arrowNavigationProps,\n size,\n appearance: tagPickerAppearanceToTagAppearance(appearance),\n dismissible: true,\n onKeyDown: useEventCallback(event => {\n props.onKeyDown?.(event);\n if (isHTMLElement(event.target) && event.key === ArrowRight) {\n triggerRef.current?.focus();\n }\n }),\n onDismiss: useEventCallback((event, data) => {\n selectOption(event as React.MouseEvent<HTMLDivElement> | React.KeyboardEvent<HTMLDivElement>, {\n value: data.value,\n // These values no longer exist because the option has unregistered itself\n // for the purposes of selection - these values aren't actually used\n id: 'ERROR_DO_NOT_USE',\n text: 'ERROR_DO_NOT_USE',\n });\n if (hasOneSelectedOption && !event.isDefaultPrevented()) {\n triggerRef.current?.focus();\n }\n }),\n },\n useMergedRefs(ref, tagPickerGroupRef),\n );\n\n return {\n ...state,\n hasSelectedOptions,\n };\n};\n"],"names":["useTagPickerGroup_unstable","props","ref","hasSelectedOptions","useTagPickerContext_unstable","ctx","selectedOptions","length","hasOneSelectedOption","triggerRef","tagPickerGroupRef","selectOption","size","tagPickerSizeToTagSize","appearance","arrowNavigationProps","useArrowNavigationGroup","circular","axis","memorizeCurrent","state","useTagGroup_unstable","role","tagPickerAppearanceToTagAppearance","dismissible","onKeyDown","useEventCallback","event","isHTMLElement","target","key","ArrowRight","current","focus","onDismiss","data","value","id","text","isDefaultPrevented","useMergedRefs"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAkBaA;;;eAAAA;;;;iEAlBU;2BAEc;kCACQ;gCACkB;+BACY;8BACnC;8BACb;AAWpB,MAAMA,6BAA6B,CACxCC,OACAC;IAEA,MAAMC,qBAAqBC,IAAAA,8CAAAA,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C,OAAOQ;YAClCxB,aAAagB,OAAiF;gBAC5FS,OAAOD,KAAKC,KAAK;gBACjB,0EAA0E;gBAC1E,oEAAoE;gBACpEC,IAAI;gBACJC,MAAM;YACR;YACA,IAAI9B,wBAAwB,CAACmB,MAAMY,kBAAkB,IAAI;oBACvD9B;gBAAAA,CAAAA,sBAAAA,WAAWuB,OAAO,AAAPA,MAAO,QAAlBvB,wBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,oBAAoBwB,KAAK;YAC3B;QACF;IACF,GACAO,IAAAA,6BAAAA,EAActC,KAAKQ;IAGrB,OAAO;QACL,GAAGU,KAAK;QACRjB;IACF;AACF"}
@@ -104,6 +104,7 @@ const tagPickerGroupClassNames = {
104
104
  ]
105
105
  });
106
106
  const useTagPickerGroupStyles_unstable = (state)=>{
107
+ 'use no memo';
107
108
  (0, _reacttags.useTagGroupStyles_unstable)(state);
108
109
  const styles = useStyles();
109
110
  state.root.className = (0, _react.mergeClasses)(tagPickerGroupClassNames.root, styles[(0, _tagPicker2Tag.tagSizeToTagPickerSize)(state.size)], styles.root, state.root.className);
@@ -1 +1 @@
1
- {"version":3,"sources":["useTagPickerGroupStyles.styles.js"],"sourcesContent":["import { __styles, mergeClasses } from '@griffel/react';\nimport { useTagGroupStyles_unstable } from '@fluentui/react-tags';\nimport { tokens } from '@fluentui/react-theme';\nimport { tagSizeToTagPickerSize } from '../../utils/tagPicker2Tag';\nexport const tagPickerGroupClassNames = {\n root: 'fui-TagPickerGroup'\n};\n/**\n * Styles for the root slot\n */\nconst useStyles = /*#__PURE__*/__styles({\n root: {\n Eh141a: \"fni485r\",\n B7ck84d: \"f1ewtqcl\",\n Bceei9c: \"f113hnb5\"\n },\n medium: {\n Byoj8tv: 0,\n uwmqm3: 0,\n z189sj: 0,\n z8tnut: 0,\n B0ocmuz: \"fa2pw7h\",\n i8kkvl: 0,\n Belr9w4: 0,\n rmohyg: \"fkln5zr\"\n },\n large: {\n Byoj8tv: 0,\n uwmqm3: 0,\n z189sj: 0,\n z8tnut: 0,\n B0ocmuz: \"fc0zr7g\",\n i8kkvl: 0,\n Belr9w4: 0,\n rmohyg: \"f1eyhf9v\"\n },\n \"extra-large\": {\n Byoj8tv: 0,\n uwmqm3: 0,\n z189sj: 0,\n z8tnut: 0,\n B0ocmuz: \"fc0zr7g\",\n i8kkvl: 0,\n Belr9w4: 0,\n rmohyg: \"f1eyhf9v\"\n }\n}, {\n d: [\".fni485r{flex-wrap:wrap;}\", \".f1ewtqcl{box-sizing:border-box;}\", \".f113hnb5{cursor:text;}\", [\".fa2pw7h{padding:var(--spacingVerticalSNudge) 0 var(--spacingVerticalSNudge) 0;}\", {\n p: -1\n }], [\".fkln5zr{gap:var(--spacingHorizontalXS);}\", {\n p: -1\n }], [\".fc0zr7g{padding:var(--spacingVerticalS) 0 var(--spacingVerticalS) 0;}\", {\n p: -1\n }], [\".f1eyhf9v{gap:var(--spacingHorizontalSNudge);}\", {\n p: -1\n }], [\".fc0zr7g{padding:var(--spacingVerticalS) 0 var(--spacingVerticalS) 0;}\", {\n p: -1\n }], [\".f1eyhf9v{gap:var(--spacingHorizontalSNudge);}\", {\n p: -1\n }]]\n});\n/**\n * Apply styling to the TagPickerGroup slots based on the state\n */\nexport const useTagPickerGroupStyles_unstable = state => {\n useTagGroupStyles_unstable(state);\n const styles = useStyles();\n state.root.className = mergeClasses(tagPickerGroupClassNames.root, styles[tagSizeToTagPickerSize(state.size)], styles.root, state.root.className);\n return state;\n};\n//# sourceMappingURL=useTagPickerGroupStyles.styles.js.map"],"names":["tagPickerGroupClassNames","useTagPickerGroupStyles_unstable","root","useStyles","__styles","Eh141a","B7ck84d","Bceei9c","medium","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","i8kkvl","Belr9w4","rmohyg","large","d","p","state","useTagGroupStyles_unstable","styles","className","mergeClasses","tagSizeToTagPickerSize","size"],"mappings":";;;;;;;;;;;IAIaA,wBAAwB;eAAxBA;;IA4DAC,gCAAgC;eAAhCA;;;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sources":["useTagPickerGroupStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { useTagGroupStyles_unstable } from '@fluentui/react-tags';\nimport { tokens } from '@fluentui/react-theme';\nimport { tagSizeToTagPickerSize } from '../../utils/tagPicker2Tag';\nexport const tagPickerGroupClassNames = {\n root: 'fui-TagPickerGroup'\n};\n/**\n * Styles for the root slot\n */ const useStyles = makeStyles({\n root: {\n flexWrap: 'wrap',\n boxSizing: 'border-box',\n cursor: 'text'\n },\n // size variants\n medium: {\n padding: `${tokens.spacingVerticalSNudge} 0 ${tokens.spacingVerticalSNudge} 0`,\n gap: tokens.spacingHorizontalXS\n },\n large: {\n padding: `${tokens.spacingVerticalS} 0 ${tokens.spacingVerticalS} 0`,\n gap: tokens.spacingHorizontalSNudge\n },\n 'extra-large': {\n padding: `${tokens.spacingVerticalS} 0 ${tokens.spacingVerticalS} 0`,\n gap: tokens.spacingHorizontalSNudge\n }\n});\n/**\n * Apply styling to the TagPickerGroup slots based on the state\n */ export const useTagPickerGroupStyles_unstable = (state)=>{\n 'use no memo';\n useTagGroupStyles_unstable(state);\n const styles = useStyles();\n state.root.className = mergeClasses(tagPickerGroupClassNames.root, styles[tagSizeToTagPickerSize(state.size)], styles.root, state.root.className);\n return state;\n};\n"],"names":["tagPickerGroupClassNames","useTagPickerGroupStyles_unstable","root","useStyles","__styles","Eh141a","B7ck84d","Bceei9c","medium","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","i8kkvl","Belr9w4","rmohyg","large","d","p","state","useTagGroupStyles_unstable","styles","className","mergeClasses","tagSizeToTagPickerSize","size"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIaA,wBAAwB;eAAxBA;;IA2BIC,gCAAgC;eAAhCA;;;uBA/BwB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@
1
- {"version":3,"sources":["TagPickerInput.js"],"sourcesContent":["import * as React from 'react';\nimport { useTagPickerInput_unstable } from './useTagPickerInput';\nimport { renderTagPickerInput_unstable } from './renderTagPickerInput';\nimport { useTagPickerInputStyles_unstable } from './useTagPickerInputStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * TagPickerInput component -\n * A TagPickerInput is a composite component that allows users to query tags.\n */ export const TagPickerInput = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useTagPickerInput_unstable(props, ref);\n useTagPickerInputStyles_unstable(state);\n useCustomStyleHook_unstable('useTagPickerInputStyles_unstable')(state);\n return renderTagPickerInput_unstable(state);\n});\nTagPickerInput.displayName = 'TagPickerInput';\n"],"names":["TagPickerInput","React","forwardRef","props","ref","state","useTagPickerInput_unstable","useTagPickerInputStyles_unstable","useCustomStyleHook_unstable","renderTagPickerInput_unstable","displayName"],"mappings":";;;;+BAQiBA;;;eAAAA;;;;iEARM;mCACoB;sCACG;+CACG;qCACL;AAIjC,MAAMA,iBAAiB,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACrE,MAAMC,QAAQC,IAAAA,6CAA0B,EAACH,OAAOC;IAChDG,IAAAA,+DAAgC,EAACF;IACjCG,IAAAA,gDAA2B,EAAC,oCAAoCH;IAChE,OAAOI,IAAAA,mDAA6B,EAACJ;AACzC;AACAL,eAAeU,WAAW,GAAG"}
1
+ {"version":3,"sources":["TagPickerInput.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useTagPickerInput_unstable } from './useTagPickerInput';\nimport { renderTagPickerInput_unstable } from './renderTagPickerInput';\nimport { useTagPickerInputStyles_unstable } from './useTagPickerInputStyles.styles';\nimport type { TagPickerInputProps } from './TagPickerInput.types';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * TagPickerInput component -\n * A TagPickerInput is a composite component that allows users to query tags.\n */\nexport const TagPickerInput: ForwardRefComponent<TagPickerInputProps> = React.forwardRef((props, ref) => {\n const state = useTagPickerInput_unstable(props, ref);\n\n useTagPickerInputStyles_unstable(state);\n useCustomStyleHook_unstable('useTagPickerInputStyles_unstable')(state);\n\n return renderTagPickerInput_unstable(state);\n});\n\nTagPickerInput.displayName = 'TagPickerInput';\n"],"names":["TagPickerInput","React","forwardRef","props","ref","state","useTagPickerInput_unstable","useTagPickerInputStyles_unstable","useCustomStyleHook_unstable","renderTagPickerInput_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAYaA;;;eAAAA;;;;iEAZU;mCAEoB;sCACG;+CACG;qCAEL;AAMrC,MAAMA,iBAAAA,WAAAA,GAA2DC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC/F,MAAMC,QAAQC,IAAAA,6CAAAA,EAA2BH,OAAOC;IAEhDG,IAAAA,+DAAAA,EAAiCF;IACjCG,IAAAA,gDAAAA,EAA4B,oCAAoCH;IAEhE,OAAOI,IAAAA,mDAAAA,EAA8BJ;AACvC;AAEAL,eAAeU,WAAW,GAAG"}
@@ -1,4 +1,6 @@
1
- "use strict";
1
+ /**
2
+ * State used in rendering TagPickerInput
3
+ */ "use strict";
2
4
  Object.defineProperty(exports, "__esModule", {
3
5
  value: true
4
6
  });
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":""}
1
+ {"version":3,"sources":["TagPickerInput.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { ComboboxProps } from '@fluentui/react-combobox';\nimport { TagPickerContextValue } from '../../contexts/TagPickerContext';\n\nexport type TagPickerInputSlots = {\n root: NonNullable<Slot<'input'>>;\n};\n\n/**\n * TagPickerInput Props\n */\nexport type TagPickerInputProps = Omit<\n ComponentProps<Partial<TagPickerInputSlots>>,\n 'children' | 'size' | 'defaultValue'\n> &\n Pick<ComboboxProps, 'clearable' | 'appearance'> & {\n disabled?: boolean;\n value?: string;\n };\n\n/**\n * State used in rendering TagPickerInput\n */\nexport type TagPickerInputState = ComponentState<TagPickerInputSlots> &\n Pick<TagPickerContextValue, 'size' | 'disabled'>;\n"],"names":[],"rangeMappings":";;","mappings":"AAoBA;;CAEC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export * from './TagPickerInput';\nexport * from './TagPickerInput.types';\nexport * from './renderTagPickerInput';\nexport * from './useTagPickerInput';\nexport * from './useTagPickerInputStyles.styles';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './TagPickerInput';\nexport * from './TagPickerInput.types';\nexport * from './renderTagPickerInput';\nexport * from './useTagPickerInput';\nexport * from './useTagPickerInputStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["renderTagPickerInput.js"],"sourcesContent":[" import { jsx as _jsx } from \"@fluentui/react-jsx-runtime/jsx-runtime\";\nimport { assertSlots } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of TagPickerInput\n */ export const renderTagPickerInput_unstable = (state)=>{\n assertSlots(state);\n return /*#__PURE__*/ _jsx(state.root, {});\n};\n"],"names":["renderTagPickerInput_unstable","state","assertSlots","_jsx","root"],"mappings":";;;;+BAIiBA;;;eAAAA;;;4BAJa;gCACF;AAGjB,MAAMA,gCAAgC,CAACC;IAC9CC,IAAAA,2BAAW,EAACD;IACZ,OAAO,WAAW,GAAGE,IAAAA,eAAI,EAACF,MAAMG,IAAI,EAAE,CAAC;AAC3C"}
1
+ {"version":3,"sources":["renderTagPickerInput.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { TagPickerInputState, TagPickerInputSlots } from './TagPickerInput.types';\n\n/**\n * Render the final JSX of TagPickerInput\n */\nexport const renderTagPickerInput_unstable = (state: TagPickerInputState) => {\n assertSlots<TagPickerInputSlots>(state);\n\n return <state.root />;\n};\n"],"names":["renderTagPickerInput_unstable","state","assertSlots","_jsx","root"],"rangeMappings":";;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;4BARb;gCAE4B;AAMrB,MAAMA,gCAAgC,CAACC;IAC5CC,IAAAA,2BAAAA,EAAiCD;IAEjC,OAAA,WAAA,GAAOE,IAAAA,eAAA,EAACF,MAAMG,IAAI,EAAA,CAAA;AACpB"}
@@ -19,8 +19,8 @@ const _reactcombobox = require("@fluentui/react-combobox");
19
19
  const _reactfield = require("@fluentui/react-field");
20
20
  const _tokens = require("../../utils/tokens");
21
21
  const _reacttabster = require("@fluentui/react-tabster");
22
- const useTagPickerInput_unstable = (props, ref)=>{
23
- props = (0, _reactfield.useFieldControlProps_unstable)(props, {
22
+ const useTagPickerInput_unstable = (propsArg, ref)=>{
23
+ const props = (0, _reactfield.useFieldControlProps_unstable)(propsArg, {
24
24
  supportsLabelFor: true,
25
25
  supportsRequired: true,
26
26
  supportsSize: true
@@ -1 +1 @@
1
- {"version":3,"sources":["useTagPickerInput.js"],"sourcesContent":["import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { useActiveDescendantContext } from '@fluentui/react-aria';\nimport { useTagPickerContext_unstable } from '../../contexts/TagPickerContext';\nimport { useMergedRefs, getIntrinsicElementProps, useEventCallback, useIsomorphicLayoutEffect } from '@fluentui/react-utilities';\nimport { ArrowLeft, Backspace, Enter, Space } from '@fluentui/keyboard-keys';\nimport { useInputTriggerSlot } from '@fluentui/react-combobox';\nimport { useFieldControlProps_unstable } from '@fluentui/react-field';\nimport { tagPickerInputCSSRules } from '../../utils/tokens';\nimport { useFocusFinders } from '@fluentui/react-tabster';\n/**\n * Create the state required to render TagPickerInput.\n *\n * The returned state can be modified with hooks such as useTagPickerInputStyles_unstable,\n * before being passed to renderTagPickerInput_unstable.\n *\n * @param props - props from this instance of TagPickerInput\n * @param ref - reference to root HTMLDivElement of TagPickerInput\n */ export const useTagPickerInput_unstable = (props, ref)=>{\n props = useFieldControlProps_unstable(props, {\n supportsLabelFor: true,\n supportsRequired: true,\n supportsSize: true\n });\n const { controller: activeDescendantController } = useActiveDescendantContext();\n const size = useTagPickerContext_unstable((ctx)=>ctx.size);\n const contextDisabled = useTagPickerContext_unstable((ctx)=>ctx.disabled);\n const tagPickerGroupRef = useTagPickerContext_unstable((ctx)=>ctx.tagPickerGroupRef);\n const triggerRef = useTagPickerContext_unstable((ctx)=>ctx.triggerRef);\n const selectedOptions = useTagPickerContext_unstable((ctx)=>ctx.selectedOptions);\n const setValue = useTagPickerContext_unstable((ctx)=>ctx.setValue);\n const setOpen = useTagPickerContext_unstable((ctx)=>ctx.setOpen);\n const setHasFocus = useTagPickerContext_unstable((ctx)=>ctx.setHasFocus);\n const clearSelection = useTagPickerContext_unstable((ctx)=>ctx.clearSelection);\n const open = useTagPickerContext_unstable((ctx)=>ctx.open);\n const popoverId = useTagPickerContext_unstable((ctx)=>ctx.popoverId);\n const selectOption = useTagPickerContext_unstable((ctx)=>ctx.selectOption);\n const getOptionById = useTagPickerContext_unstable((ctx)=>ctx.getOptionById);\n const contextValue = useTagPickerContext_unstable((ctx)=>ctx.value);\n useIsomorphicLayoutEffect(()=>{\n if (!triggerRef.current) {\n return;\n }\n setTagPickerInputStretchStyle(triggerRef.current);\n }, [\n selectedOptions,\n triggerRef\n ]);\n useIsomorphicLayoutEffect(()=>{\n if (triggerRef.current) {\n const input = triggerRef.current;\n const cb = ()=>setTagPickerInputStretchStyle(input);\n input.addEventListener('input', cb);\n return ()=>{\n input.removeEventListener('input', cb);\n };\n }\n }, [\n triggerRef\n ]);\n const { value = contextValue, disabled = contextDisabled } = props;\n const { findLastFocusable } = useFocusFinders();\n const isTypingRef = React.useRef(false);\n const root = useInputTriggerSlot({\n type: 'text',\n value: value !== null && value !== void 0 ? value : '',\n 'aria-controls': open ? popoverId : undefined,\n disabled,\n ...getIntrinsicElementProps('input', props),\n onKeyDown: useEventCallback((event)=>{\n var _props_onKeyDown;\n (_props_onKeyDown = props.onKeyDown) === null || _props_onKeyDown === void 0 ? void 0 : _props_onKeyDown.call(props, event);\n if ((event.key === ArrowLeft || event.key === Backspace) && event.currentTarget.selectionStart === 0 && tagPickerGroupRef.current) {\n var _findLastFocusable;\n (_findLastFocusable = findLastFocusable(tagPickerGroupRef.current)) === null || _findLastFocusable === void 0 ? void 0 : _findLastFocusable.focus();\n } else if (event.key === Space) {\n if (open && !isTypingRef.current) {\n setOpen(event, false);\n }\n } else if (event.key === Enter) {\n if (open) {\n ReactDOM.unstable_batchedUpdates(()=>{\n setValue(undefined);\n setOpen(event, false);\n });\n } else {\n setOpen(event, true);\n }\n }\n isTypingRef.current = event.key.length === 1 && event.code !== Space && !event.altKey && !event.ctrlKey && !event.metaKey;\n })\n }, useMergedRefs(triggerRef, ref), {\n activeDescendantController,\n freeform: false,\n state: {\n clearSelection,\n getOptionById,\n open,\n selectedOptions,\n selectOption,\n setHasFocus,\n setOpen,\n setValue,\n multiselect: true,\n value: props.value\n }\n });\n const state = {\n components: {\n root: 'input'\n },\n root,\n disabled,\n size\n };\n return state;\n};\n/**\n * while typing the user might need a bit more of space to see the text,\n * which means the input should stretch to 100% width\n * occupying a whole new line.\n *\n * This function will set the CSS variable `--width` to `100%` if the scrollWidth is greater than the offsetWidth,\n * meaning the text is overflowing the input.\n *\n * @param input - input element to apply the style\n * @returns void\n */ const setTagPickerInputStretchStyle = (input)=>{\n // first we need to remove the CSS variable\n // to properly calculate the difference between scrollWidth and offsetWidth\n input.style.removeProperty(tagPickerInputCSSRules.width);\n if (input.scrollWidth > input.offsetWidth + 1) {\n input.style.setProperty(tagPickerInputCSSRules.width, '100%');\n } else {\n input.style.removeProperty(tagPickerInputCSSRules.width);\n }\n};\n"],"names":["useTagPickerInput_unstable","props","ref","useFieldControlProps_unstable","supportsLabelFor","supportsRequired","supportsSize","controller","activeDescendantController","useActiveDescendantContext","size","useTagPickerContext_unstable","ctx","contextDisabled","disabled","tagPickerGroupRef","triggerRef","selectedOptions","setValue","setOpen","setHasFocus","clearSelection","open","popoverId","selectOption","getOptionById","contextValue","value","useIsomorphicLayoutEffect","current","setTagPickerInputStretchStyle","input","cb","addEventListener","removeEventListener","findLastFocusable","useFocusFinders","isTypingRef","React","useRef","root","useInputTriggerSlot","type","undefined","getIntrinsicElementProps","onKeyDown","useEventCallback","event","_props_onKeyDown","call","key","ArrowLeft","Backspace","currentTarget","selectionStart","_findLastFocusable","focus","Space","Enter","ReactDOM","unstable_batchedUpdates","length","code","altKey","ctrlKey","metaKey","useMergedRefs","freeform","state","multiselect","components","style","removeProperty","tagPickerInputCSSRules","width","scrollWidth","offsetWidth","setProperty"],"mappings":";;;;+BAkBiBA;;;eAAAA;;;;iEAlBM;oEACG;2BACiB;kCACE;gCACwD;8BAClD;+BACf;4BACU;wBACP;8BACP;AASrB,MAAMA,6BAA6B,CAACC,OAAOC;IAClDD,QAAQE,IAAAA,yCAA6B,EAACF,OAAO;QACzCG,kBAAkB;QAClBC,kBAAkB;QAClBC,cAAc;IAClB;IACA,MAAM,EAAEC,YAAYC,0BAA0B,EAAE,GAAGC,IAAAA,qCAA0B;IAC7E,MAAMC,OAAOC,IAAAA,8CAA4B,EAAC,CAACC,MAAMA,IAAIF,IAAI;IACzD,MAAMG,kBAAkBF,IAAAA,8CAA4B,EAAC,CAACC,MAAMA,IAAIE,QAAQ;IACxE,MAAMC,oBAAoBJ,IAAAA,8CAA4B,EAAC,CAACC,MAAMA,IAAIG,iBAAiB;IACnF,MAAMC,aAAaL,IAAAA,8CAA4B,EAAC,CAACC,MAAMA,IAAII,UAAU;IACrE,MAAMC,kBAAkBN,IAAAA,8CAA4B,EAAC,CAACC,MAAMA,IAAIK,eAAe;IAC/E,MAAMC,WAAWP,IAAAA,8CAA4B,EAAC,CAACC,MAAMA,IAAIM,QAA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YACb1C,OAAO1B,MAAM0B,KAAK;QACtB;IACJ;IACA,MAAMyC,QAAQ;QACVE,YAAY;YACR9B,MAAM;QACV;QACAA;QACA1B;QACAJ;IACJ;IACA,OAAO0D;AACX;AACA;;;;;;;;;;CAUC,GAAG,MAAMtC,gCAAgC,CAACC;IACvC,2CAA2C;IAC3C,2EAA2E;IAC3EA,MAAMwC,KAAK,CAACC,cAAc,CAACC,8BAAsB,CAACC,KAAK;IACvD,IAAI3C,MAAM4C,WAAW,GAAG5C,MAAM6C,WAAW,GAAG,GAAG;QAC3C7C,MAAMwC,KAAK,CAACM,WAAW,CAACJ,8BAAsB,CAACC,KAAK,EAAE;IAC1D,OAAO;QACH3C,MAAMwC,KAAK,CAACC,cAAc,CAACC,8BAAsB,CAACC,KAAK;IAC3D;AACJ"}
1
+ {"version":3,"sources":["useTagPickerInput.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport type { TagPickerInputProps, TagPickerInputState } from './TagPickerInput.types';\nimport { useActiveDescendantContext } from '@fluentui/react-aria';\nimport { useTagPickerContext_unstable } from '../../contexts/TagPickerContext';\nimport {\n useMergedRefs,\n getIntrinsicElementProps,\n useEventCallback,\n useIsomorphicLayoutEffect,\n} from '@fluentui/react-utilities';\nimport { ArrowLeft, Backspace, Enter, Space } from '@fluentui/keyboard-keys';\nimport { useInputTriggerSlot } from '@fluentui/react-combobox';\nimport { useFieldControlProps_unstable } from '@fluentui/react-field';\nimport { tagPickerInputCSSRules } from '../../utils/tokens';\nimport { useFocusFinders } from '@fluentui/react-tabster';\n\n/**\n * Create the state required to render TagPickerInput.\n *\n * The returned state can be modified with hooks such as useTagPickerInputStyles_unstable,\n * before being passed to renderTagPickerInput_unstable.\n *\n * @param props - props from this instance of TagPickerInput\n * @param ref - reference to root HTMLDivElement of TagPickerInput\n */\nexport const useTagPickerInput_unstable = (\n propsArg: TagPickerInputProps,\n ref: React.Ref<HTMLInputElement>,\n): TagPickerInputState => {\n const props = useFieldControlProps_unstable(propsArg, {\n supportsLabelFor: true,\n supportsRequired: true,\n supportsSize: true,\n });\n const { controller: activeDescendantController } = useActiveDescendantContext();\n const size = useTagPickerContext_unstable(ctx => ctx.size);\n const contextDisabled = useTagPickerContext_unstable(ctx => ctx.disabled);\n const tagPickerGroupRef = useTagPickerContext_unstable(ctx => ctx.tagPickerGroupRef);\n\n const triggerRef = useTagPickerContext_unstable(ctx => ctx.triggerRef as React.RefObject<HTMLInputElement>);\n const selectedOptions = useTagPickerContext_unstable(ctx => ctx.selectedOptions);\n const setValue = useTagPickerContext_unstable(ctx => ctx.setValue);\n const setOpen = useTagPickerContext_unstable(ctx => ctx.setOpen);\n const setHasFocus = useTagPickerContext_unstable(ctx => ctx.setHasFocus);\n const clearSelection = useTagPickerContext_unstable(ctx => ctx.clearSelection);\n const open = useTagPickerContext_unstable(ctx => ctx.open);\n const popoverId = useTagPickerContext_unstable(ctx => ctx.popoverId);\n const selectOption = useTagPickerContext_unstable(ctx => ctx.selectOption);\n const getOptionById = useTagPickerContext_unstable(ctx => ctx.getOptionById);\n const contextValue = useTagPickerContext_unstable(ctx => ctx.value);\n\n useIsomorphicLayoutEffect(() => {\n if (!triggerRef.current) {\n return;\n }\n setTagPickerInputStretchStyle(triggerRef.current);\n }, [selectedOptions, triggerRef]);\n\n useIsomorphicLayoutEffect(() => {\n if (triggerRef.current) {\n const input = triggerRef.current;\n const cb = () => setTagPickerInputStretchStyle(input);\n input.addEventListener('input', cb);\n return () => {\n input.removeEventListener('input', cb);\n };\n }\n }, [triggerRef]);\n\n const { value = contextValue, disabled = contextDisabled } = props;\n const { findLastFocusable } = useFocusFinders();\n\n const isTypingRef = React.useRef(false);\n\n const root = useInputTriggerSlot(\n {\n type: 'text',\n value: value ?? '',\n 'aria-controls': open ? popoverId : undefined,\n disabled,\n ...getIntrinsicElementProps('input', props),\n onKeyDown: useEventCallback((event: React.KeyboardEvent<HTMLInputElement>) => {\n props.onKeyDown?.(event);\n if (\n (event.key === ArrowLeft || event.key === Backspace) &&\n event.currentTarget.selectionStart === 0 &&\n tagPickerGroupRef.current\n ) {\n findLastFocusable(tagPickerGroupRef.current)?.focus();\n } else if (event.key === Space) {\n if (open && !isTypingRef.current) {\n setOpen(event, false);\n }\n } else if (event.key === Enter) {\n if (open) {\n ReactDOM.unstable_batchedUpdates(() => {\n setValue(undefined);\n setOpen(event, false);\n });\n } else {\n setOpen(event, true);\n }\n }\n isTypingRef.current =\n event.key.length === 1 && event.code !== Space && !event.altKey && !event.ctrlKey && !event.metaKey;\n }),\n },\n useMergedRefs(triggerRef, ref),\n {\n activeDescendantController,\n freeform: false,\n state: {\n clearSelection,\n getOptionById,\n open,\n selectedOptions,\n selectOption,\n setHasFocus,\n setOpen,\n setValue,\n multiselect: true,\n value: props.value,\n },\n },\n );\n\n const state: TagPickerInputState = {\n components: {\n root: 'input',\n },\n root,\n disabled,\n size,\n };\n\n return state;\n};\n\n/**\n * while typing the user might need a bit more of space to see the text,\n * which means the input should stretch to 100% width\n * occupying a whole new line.\n *\n * This function will set the CSS variable `--width` to `100%` if the scrollWidth is greater than the offsetWidth,\n * meaning the text is overflowing the input.\n *\n * @param input - input element to apply the style\n * @returns void\n */\nconst setTagPickerInputStretchStyle = (input: HTMLInputElement) => {\n // first we need to remove the CSS variable\n // to properly calculate the difference between scrollWidth and offsetWidth\n input.style.removeProperty(tagPickerInputCSSRules.width);\n if (input.scrollWidth > input.offsetWidth + 1) {\n input.style.setProperty(tagPickerInputCSSRules.width, '100%');\n } else {\n input.style.removeProperty(tagPickerInputCSSRules.width);\n }\n};\n"],"names":["useTagPickerInput_unstable","propsArg","ref","props","useFieldControlProps_unstable","supportsLabelFor","supportsRequired","supportsSize","controller","activeDescendantController","useActiveDescendantContext","size","useTagPickerContext_unstable","ctx","contextDisabled","disabled","tagPickerGroupRef","triggerRef","selectedOptions","setValue","setOpen","setHasFocus","clearSelection","open","popoverId","selectOption","getOptionById","contextValue","value","useIsomorphicLayoutEffect","current","setTagPickerInputStretchStyle","input","cb","addEventListener","removeEventListener","findLastFocusable","useFocusFinders","isTypingRef","React","useRef","root","useInputTriggerSlot","type","undefined","getIntrinsicElementProps","onKeyDown","useEventCallback","event","key","ArrowLeft","Backspace","currentTarget","selectionStart","focus","Space","Enter","ReactDOM","unstable_batchedUpdates","length","code","altKey","ctrlKey","metaKey","useMergedRefs","freeform","state","multiselect","components","style","removeProperty","tagPickerInputCSSRules","width","scrollWidth","offsetWidth","setProperty"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BA0BaA;;;eAAAA;;;;iEA1BU;oEACG;2BAEiB;kCACE;gCAMtC;8BAC4C;+BACf;4BACU;wBACP;8BACP;AAWzB,MAAMA,6BAA6B,CACxCC,UACAC;IAEA,MAAMC,QAAQC,IAAAA,yCAAAA,EAA8BH,UAAU;QACpDI,kBAAkB;QAClBC,kBAAkB;QAClBC,cAAc;IAChB;IACA,MAAM,EAAEC,YAAYC,0BAA0B,EAAE,GAAGC,IAAAA,qCAAAA;IACnD,MAAMC,OAAOC,IAAAA,8CAAAA,EAA6BC,CAAAA,MAAOA,IAAIF,IAAI;IACzD,MAAMG,kBAAkBF,IAAAA,8CAAAA,EAA6BC,CAAAA,MAAOA,IAAIE,QAAQ;IACxE,MAAMC,oBAAoBJ,IAAAA,8CAAAA,EAA6BC,CAAAA,MAAOA,IAAIG,iBAAiB;IAEnF,MAAMC,aAAaL,IAAAA,8CAAAA,EAA6BC,CAAAA,MAAOA,IAAII,UAAU;IACrE,MAAMC,kBAAkBN,IAAAA,8CAAAA,EAA6BC,CAAAA,MAAOA,IAAIK,eAAe;IAC/E,MAAMC,WAAWP,IAAAA,8CAAAA,EAA6BC,CAAAA,MAAOA,IAAIM,QAAQ;IACjE,MA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;YACAgD,aAAa;YACbvC,OAAOzB,MAAMyB,KAAK;QACpB;IACF;IAGF,MAAMsC,QAA6B;QACjCE,YAAY;YACV3B,MAAM;QACR;QACAA;QACA1B;QACAJ;IACF;IAEA,OAAOuD;AACT;AAEA;;;;;;;;;;CAUC,GACD,MAAMnC,gCAAgC,CAACC;IACrC,2CAA2C;IAC3C,2EAA2E;IAC3EA,MAAMqC,KAAK,CAACC,cAAc,CAACC,8BAAAA,CAAuBC,KAAK;IACvD,IAAIxC,MAAMyC,WAAW,GAAGzC,MAAM0C,WAAW,GAAG,GAAG;QAC7C1C,MAAMqC,KAAK,CAACM,WAAW,CAACJ,8BAAAA,CAAuBC,KAAK,EAAE;IACxD,OAAO;QACLxC,MAAMqC,KAAK,CAACC,cAAc,CAACC,8BAAAA,CAAuBC,KAAK;IACzD;AACF"}
@@ -102,6 +102,7 @@ const useBaseStyle = /*#__PURE__*/ (0, _react.__resetStyles)("r1hdk6fw", null, [
102
102
  ]
103
103
  });
104
104
  const useTagPickerInputStyles_unstable = (state)=>{
105
+ 'use no memo';
105
106
  const baseStyle = useBaseStyle();
106
107
  const styles = useStyles();
107
108
  state.root.className = (0, _react.mergeClasses)(tagPickerInputClassNames.root, baseStyle, styles[state.size], state.disabled && styles.disabled, state.root.className);
@@ -1 +1 @@
1
- {"version":3,"sources":["useTagPickerInputStyles.styles.js"],"sourcesContent":["import { __resetStyles, __styles, mergeClasses } from '@griffel/react';\nimport { typographyStyles, tokens } from '@fluentui/react-theme';\nimport { tagPickerInputTokens } from '../../utils/tokens';\nexport const tagPickerInputClassNames = {\n root: 'fui-TagPickerInput'\n};\nconst useBaseStyle = /*#__PURE__*/__resetStyles(\"r1hdk6fw\", null, [\".r1hdk6fw{background-color:var(--colorTransparentBackground);color:var(--colorNeutralForeground1);font-family:var(--fontFamilyBase);box-sizing:border-box;border:none;min-width:24px;max-width:100%;width:var(--fluent-TagPickerInput__width, 0);flex-grow:1;}\", \".r1hdk6fw:focus{outline-style:none;}\", \".r1hdk6fw::-webkit-input-placeholder{color:var(--colorNeutralForeground4);opacity:1;}\", \".r1hdk6fw::-moz-placeholder{color:var(--colorNeutralForeground4);opacity:1;}\", \".r1hdk6fw::placeholder{color:var(--colorNeutralForeground4);opacity:1;}\", \".r1hdk6fw::after{visibility:hidden;white-space:pre-wrap;}\"]);\n/**\n * Styles for the root slot\n */\nconst useStyles = /*#__PURE__*/__styles({\n medium: {\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"fkhj508\",\n Bhrd7zp: \"figsok6\",\n Bg96gwp: \"f1i3iumi\",\n Byoj8tv: 0,\n uwmqm3: 0,\n z189sj: 0,\n z8tnut: 0,\n B0ocmuz: \"fa2pw7h\"\n },\n large: {\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"fkhj508\",\n Bhrd7zp: \"figsok6\",\n Bg96gwp: \"f1i3iumi\",\n Byoj8tv: 0,\n uwmqm3: 0,\n z189sj: 0,\n z8tnut: 0,\n B0ocmuz: \"ft37c3\"\n },\n \"extra-large\": {\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"fkhj508\",\n Bhrd7zp: \"figsok6\",\n Bg96gwp: \"f1i3iumi\",\n Byoj8tv: 0,\n uwmqm3: 0,\n z189sj: 0,\n z8tnut: 0,\n B0ocmuz: \"f3abo53\"\n },\n disabled: {\n sj55zd: \"f1s2aq7o\",\n De3pzq: \"f1c21dwh\",\n Bceei9c: \"fdrzuqr\",\n yvdlaj: \"fahhnxm\"\n }\n}, {\n d: [\".fk6fouc{font-family:var(--fontFamilyBase);}\", \".fkhj508{font-size:var(--fontSizeBase300);}\", \".figsok6{font-weight:var(--fontWeightRegular);}\", \".f1i3iumi{line-height:var(--lineHeightBase300);}\", [\".fa2pw7h{padding:var(--spacingVerticalSNudge) 0 var(--spacingVerticalSNudge) 0;}\", {\n p: -1\n }], [\".ft37c3{padding:var(--spacingVerticalMNudge) 0 var(--spacingVerticalMNudge) 0;}\", {\n p: -1\n }], [\".f3abo53{padding:var(--spacingVerticalM) 0 var(--spacingVerticalM) 0;}\", {\n p: -1\n }], \".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}\", \".f1c21dwh{background-color:var(--colorTransparentBackground);}\", \".fdrzuqr{cursor:not-allowed;}\", \".fahhnxm::-webkit-input-placeholder{color:var(--colorNeutralForegroundDisabled);}\", \".fahhnxm::-moz-placeholder{color:var(--colorNeutralForegroundDisabled);}\"]\n});\n/**\n * Apply styling to the TagPickerInput slots based on the state\n */\nexport const useTagPickerInputStyles_unstable = state => {\n const baseStyle = useBaseStyle();\n const styles = useStyles();\n state.root.className = mergeClasses(tagPickerInputClassNames.root, baseStyle, styles[state.size], state.disabled && styles.disabled, state.root.className);\n return state;\n};\n//# sourceMappingURL=useTagPickerInputStyles.styles.js.map"],"names":["tagPickerInputClassNames","useTagPickerInputStyles_unstable","root","useBaseStyle","__resetStyles","useStyles","__styles","medium","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","large","disabled","sj55zd","De3pzq","Bceei9c","yvdlaj","d","p","state","baseStyle","styles","className","mergeClasses","size"],"mappings":";;;;;;;;;;;IAGaA,wBAAwB;eAAxBA;;IA2DAC,gCAAgC;eAAhCA;;;uBA9DyC;AAG/C,MAAMD,2BAA2B;IACtCE,MAAM;AACR;AACA,MAAMC,eAAe,WAAW,GAAEC,IAAAA,oBAAa,EAAC,YAAY,MAAM;IAAC;IAAkQ;IAAwC;IAAyF;IAAgF;IAA2E;CAA4D;AAC7pB;;CAEC,GACD,MAAMC,YAAY,WAAW,GAAEC,IAAAA,eAAQ,EAAC;IACtCC,QAAQ;QACNC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,QAAQ;QACRC,QAAQ;QACRC,QAAQ;QACRC,SAAS;IACX;IACAC,OAAO;QACLT,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,QAAQ;QACRC,QAAQ;QACRC,QAAQ;QACRC,SAAS;IACX;IACA,eAAe;QACbR,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,QAAQ;QACRC,QAAQ;QACRC,QAAQ;QACRC,SAAS;IACX;IACAE,UAAU;QACRC,QAAQ;QACRC,QAAQ;QACRC,SAAS;QACTC,QAAQ;IACV;AACF,GAAG;IACDC,GAAG;QAAC;QAAgD;QAA+C;QAAmD;QAAoD;YAAC;YAAoF;gBAC7RC,GAAG,CAAC;YACN;SAAE;QAAE;YAAC;YAAmF;gBACtFA,GAAG,CAAC;YACN;SAAE;QAAE;YAAC;YAA0E;gBAC7EA,GAAG,CAAC;YACN;SAAE;QAAE;QAA2D;QAAkE;QAAiC;QAAqF;KAA2E;AACpU;AAIO,MAAMvB,mCAAmCwB,CAAAA;IAC9C,MAAMC,YAAYvB;IAClB,MAAMwB,SAAStB;IACfoB,MAAMvB,IAAI,CAAC0B,SAAS,GAAGC,IAAAA,mBAAY,EAAC7B,yBAAyBE,IAAI,EAAEwB,WAAWC,MAAM,CAACF,MAAMK,IAAI,CAAC,EAAEL,MAAMP,QAAQ,IAAIS,OAAOT,QAAQ,EAAEO,MAAMvB,IAAI,CAAC0B,SAAS;IACzJ,OAAOH;AACT,GACA,0DAA0D"}
1
+ {"version":3,"sources":["useTagPickerInputStyles.styles.js"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { typographyStyles, tokens } from '@fluentui/react-theme';\nimport { tagPickerInputTokens } from '../../utils/tokens';\nexport const tagPickerInputClassNames = {\n root: 'fui-TagPickerInput'\n};\nconst useBaseStyle = makeResetStyles({\n backgroundColor: tokens.colorTransparentBackground,\n color: tokens.colorNeutralForeground1,\n fontFamily: tokens.fontFamilyBase,\n boxSizing: 'border-box',\n '&:focus': {\n outlineStyle: 'none'\n },\n '&::placeholder': {\n color: tokens.colorNeutralForeground4,\n opacity: 1\n },\n '&::after': {\n visibility: 'hidden',\n whiteSpace: 'pre-wrap'\n },\n border: 'none',\n minWidth: '24px',\n maxWidth: '100%',\n // by default width is 0,\n // it will be calculated based on the requirement of stretching the component to 100% width\n // see setTagPickerInputStretchStyle method for more details\n width: tagPickerInputTokens.width,\n flexGrow: 1\n});\n/**\n * Styles for the root slot\n */ const useStyles = makeStyles({\n // size variants\n medium: {\n ...typographyStyles.body1,\n padding: `${tokens.spacingVerticalSNudge} 0 ${tokens.spacingVerticalSNudge} 0`\n },\n large: {\n ...typographyStyles.body1,\n padding: `${tokens.spacingVerticalMNudge} 0 ${tokens.spacingVerticalMNudge} 0`\n },\n 'extra-large': {\n ...typographyStyles.body1,\n padding: `${tokens.spacingVerticalM} 0 ${tokens.spacingVerticalM} 0`\n },\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n backgroundColor: tokens.colorTransparentBackground,\n cursor: 'not-allowed',\n '::placeholder': {\n color: tokens.colorNeutralForegroundDisabled\n }\n }\n});\n/**\n * Apply styling to the TagPickerInput slots based on the state\n */ export const useTagPickerInputStyles_unstable = (state)=>{\n 'use no memo';\n const baseStyle = useBaseStyle();\n const styles = useStyles();\n state.root.className = mergeClasses(tagPickerInputClassNames.root, baseStyle, styles[state.size], state.disabled && styles.disabled, state.root.className);\n return state;\n};\n"],"names":["tagPickerInputClassNames","useTagPickerInputStyles_unstable","root","useBaseStyle","__resetStyles","useStyles","__styles","medium","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","large","disabled","sj55zd","De3pzq","Bceei9c","yvdlaj","d","p","state","baseStyle","styles","className","mergeClasses","size"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAGaA,wBAAwB;eAAxBA;;IAuDIC,gCAAgC;eAAhCA;;;uBA1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AAS;IACzJ,OAAOH;AACX"}
@@ -1 +1 @@
1
- {"version":3,"sources":["TagPickerList.js"],"sourcesContent":["import * as React from 'react';\nimport { useTagPickerList_unstable } from './useTagPickerList';\nimport { renderTagPickerList_unstable } from './renderTagPickerList';\nimport { useTagPickerListStyles_unstable } from './useTagPickerListStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * TagPickerList component -\n * A TagPickerList is a composite component that allows users to display a list of tag options to be selected.\n */ export const TagPickerList = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useTagPickerList_unstable(props, ref);\n useTagPickerListStyles_unstable(state);\n useCustomStyleHook_unstable('useTagPickerListStyles_unstable')(state);\n return renderTagPickerList_unstable(state);\n});\nTagPickerList.displayName = 'TagPickerList';\n"],"names":["TagPickerList","React","forwardRef","props","ref","state","useTagPickerList_unstable","useTagPickerListStyles_unstable","useCustomStyleHook_unstable","renderTagPickerList_unstable","displayName"],"mappings":";;;;+BAQiBA;;;eAAAA;;;;iEARM;kCACmB;qCACG;8CACG;qCACJ;AAIjC,MAAMA,gBAAgB,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACpE,MAAMC,QAAQC,IAAAA,2CAAyB,EAACH,OAAOC;IAC/CG,IAAAA,6DAA+B,EAACF;IAChCG,IAAAA,gDAA2B,EAAC,mCAAmCH;IAC/D,OAAOI,IAAAA,iDAA4B,EAACJ;AACxC;AACAL,cAAcU,WAAW,GAAG"}
1
+ {"version":3,"sources":["TagPickerList.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useTagPickerList_unstable } from './useTagPickerList';\nimport { renderTagPickerList_unstable } from './renderTagPickerList';\nimport { useTagPickerListStyles_unstable } from './useTagPickerListStyles.styles';\nimport type { TagPickerListProps } from './TagPickerList.types';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * TagPickerList component -\n * A TagPickerList is a composite component that allows users to display a list of tag options to be selected.\n */\nexport const TagPickerList: ForwardRefComponent<TagPickerListProps> = React.forwardRef((props, ref) => {\n const state = useTagPickerList_unstable(props, ref);\n\n useTagPickerListStyles_unstable(state);\n useCustomStyleHook_unstable('useTagPickerListStyles_unstable')(state);\n return renderTagPickerList_unstable(state);\n});\n\nTagPickerList.displayName = 'TagPickerList';\n"],"names":["TagPickerList","React","forwardRef","props","ref","state","useTagPickerList_unstable","useTagPickerListStyles_unstable","useCustomStyleHook_unstable","renderTagPickerList_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAYaA;;;eAAAA;;;;iEAZU;kCAEmB;qCACG;8CACG;qCAEJ;AAMrC,MAAMA,gBAAAA,WAAAA,GAAyDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC7F,MAAMC,QAAQC,IAAAA,2CAAAA,EAA0BH,OAAOC;IAE/CG,IAAAA,6DAAAA,EAAgCF;IAChCG,IAAAA,gDAAAA,EAA4B,mCAAmCH;IAC/D,OAAOI,IAAAA,iDAAAA,EAA6BJ;AACtC;AAEAL,cAAcU,WAAW,GAAG"}
@@ -1,4 +1,6 @@
1
- "use strict";
1
+ /**
2
+ * State used in rendering TagPickerList
3
+ */ "use strict";
2
4
  Object.defineProperty(exports, "__esModule", {
3
5
  value: true
4
6
  });
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":""}
1
+ {"version":3,"sources":["TagPickerList.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { Listbox } from '@fluentui/react-combobox';\nimport { TagPickerContextValue } from '../../contexts/TagPickerContext';\n\nexport type TagPickerListSlots = {\n root: Slot<typeof Listbox>;\n};\n\n/**\n * TagPickerList Props\n */\nexport type TagPickerListProps = ComponentProps<TagPickerListSlots>;\n\n/**\n * State used in rendering TagPickerList\n */\nexport type TagPickerListState = ComponentState<TagPickerListSlots> & Pick<TagPickerContextValue, 'open'>;\n"],"names":[],"rangeMappings":";;","mappings":"AAaA;;CAEC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export * from './TagPickerList';\nexport * from './TagPickerList.types';\nexport * from './renderTagPickerList';\nexport * from './useTagPickerList';\nexport * from './useTagPickerListStyles.styles';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './TagPickerList';\nexport * from './TagPickerList.types';\nexport * from './renderTagPickerList';\nexport * from './useTagPickerList';\nexport * from './useTagPickerListStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["renderTagPickerList.js"],"sourcesContent":[" import { jsx as _jsx } from \"@fluentui/react-jsx-runtime/jsx-runtime\";\nimport { assertSlots } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of TagPickerList\n */ export const renderTagPickerList_unstable = (state)=>{\n assertSlots(state);\n return /*#__PURE__*/ _jsx(state.root, {});\n};\n"],"names":["renderTagPickerList_unstable","state","assertSlots","_jsx","root"],"mappings":";;;;+BAIiBA;;;eAAAA;;;4BAJa;gCACF;AAGjB,MAAMA,+BAA+B,CAACC;IAC7CC,IAAAA,2BAAW,EAACD;IACZ,OAAO,WAAW,GAAGE,IAAAA,eAAI,EAACF,MAAMG,IAAI,EAAE,CAAC;AAC3C"}
1
+ {"version":3,"sources":["renderTagPickerList.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { TagPickerListState, TagPickerListSlots } from './TagPickerList.types';\n\n/**\n * Render the final JSX of TagPickerList\n */\nexport const renderTagPickerList_unstable = (state: TagPickerListState) => {\n assertSlots<TagPickerListSlots>(state);\n return <state.root />;\n};\n"],"names":["renderTagPickerList_unstable","state","assertSlots","_jsx","root"],"rangeMappings":";;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;4BARb;gCAE4B;AAMrB,MAAMA,+BAA+B,CAACC;IAC3CC,IAAAA,2BAAAA,EAAgCD;IAChC,OAAA,WAAA,GAAOE,IAAAA,eAAA,EAACF,MAAMG,IAAI,EAAA,CAAA;AACpB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useTagPickerList.js"],"sourcesContent":["import * as React from 'react';\nimport { Listbox } from '@fluentui/react-combobox';\nimport { useTagPickerContext_unstable } from '../../contexts/TagPickerContext';\nimport { slot, useMergedRefs } from '@fluentui/react-utilities';\nimport { useListboxSlot } from '@fluentui/react-combobox';\n/**\n * Create the state required to render TagPickerList.\n *\n * The returned state can be modified with hooks such as useTagPickerListStyles_unstable,\n * before being passed to renderTagPickerList_unstable.\n *\n * @param props - props from this instance of TagPickerList\n * @param ref - reference to root HTMLDivElement of TagPickerList\n */ export const useTagPickerList_unstable = (props, ref)=>{\n const triggerRef = useTagPickerContext_unstable((ctx)=>ctx.triggerRef);\n const popoverRef = useTagPickerContext_unstable((ctx)=>ctx.popoverRef);\n const popoverId = useTagPickerContext_unstable((ctx)=>ctx.popoverId);\n const open = useTagPickerContext_unstable((ctx)=>ctx.open);\n return {\n open,\n components: {\n root: Listbox\n },\n root: slot.always({\n ...useListboxSlot(props, useMergedRefs(popoverRef, ref), {\n state: {\n multiselect: true\n },\n triggerRef,\n defaultProps: {\n id: popoverId\n }\n }),\n role: 'listbox'\n }, {\n elementType: Listbox\n })\n };\n};\n"],"names":["useTagPickerList_unstable","props","ref","triggerRef","useTagPickerContext_unstable","ctx","popoverRef","popoverId","open","components","root","Listbox","slot","always","useListboxSlot","useMergedRefs","state","multiselect","defaultProps","id","role","elementType"],"mappings":";;;;+BAaiBA;;;eAAAA;;;;iEAbM;+BACC;kCACqB;gCACT;AAUzB,MAAMA,4BAA4B,CAACC,OAAOC;IACjD,MAAMC,aAAaC,IAAAA,8CAA4B,EAAC,CAACC,MAAMA,IAAIF,UAAU;IACrE,MAAMG,aAAaF,IAAAA,8CAA4B,EAAC,CAACC,MAAMA,IAAIC,UAAU;IACrE,MAAMC,YAAYH,IAAAA,8CAA4B,EAAC,CAACC,MAAMA,IAAIE,SAAS;IACnE,MAAMC,OAAOJ,IAAAA,8CAA4B,EAAC,CAACC,MAAMA,IAAIG,IAAI;IACzD,OAAO;QACHA;QACAC,YAAY;YACRC,MAAMC,sBAAO;QACjB;QACAD,MAAME,oBAAI,CAACC,MAAM,CAAC;YACd,GAAGC,IAAAA,6BAAc,EAACb,OAAOc,IAAAA,6BAAa,EAACT,YAAYJ,MAAM;gBACrDc,OAAO;oBACHC,aAAa;gBACjB;gBACAd;gBACAe,cAAc;oBACVC,IAAIZ;gBACR;YACJ,EAAE;YACFa,MAAM;QACV,GAAG;YACCC,aAAaV,sBAAO;QACxB;IACJ;AACJ"}
1
+ {"version":3,"sources":["useTagPickerList.ts"],"sourcesContent":["import * as React from 'react';\nimport type { TagPickerListProps, TagPickerListState } from './TagPickerList.types';\nimport { Listbox } from '@fluentui/react-combobox';\nimport { useTagPickerContext_unstable } from '../../contexts/TagPickerContext';\nimport { slot, useMergedRefs } from '@fluentui/react-utilities';\nimport { useListboxSlot } from '@fluentui/react-combobox';\n\n/**\n * Create the state required to render TagPickerList.\n *\n * The returned state can be modified with hooks such as useTagPickerListStyles_unstable,\n * before being passed to renderTagPickerList_unstable.\n *\n * @param props - props from this instance of TagPickerList\n * @param ref - reference to root HTMLDivElement of TagPickerList\n */\nexport const useTagPickerList_unstable = (\n props: TagPickerListProps,\n ref: React.Ref<HTMLDivElement>,\n): TagPickerListState => {\n const triggerRef = useTagPickerContext_unstable(ctx => ctx.triggerRef) as\n | React.RefObject<HTMLInputElement>\n | React.RefObject<HTMLButtonElement>;\n const popoverRef = useTagPickerContext_unstable(ctx => ctx.popoverRef);\n const popoverId = useTagPickerContext_unstable(ctx => ctx.popoverId);\n const open = useTagPickerContext_unstable(ctx => ctx.open);\n\n return {\n open,\n components: {\n root: Listbox,\n },\n root: slot.always(\n {\n ...useListboxSlot(props, useMergedRefs(popoverRef, ref), {\n state: { multiselect: true },\n triggerRef,\n defaultProps: { id: popoverId },\n }),\n role: 'listbox',\n },\n { elementType: Listbox },\n ),\n };\n};\n"],"names":["useTagPickerList_unstable","props","ref","triggerRef","useTagPickerContext_unstable","ctx","popoverRef","popoverId","open","components","root","Listbox","slot","always","useListboxSlot","useMergedRefs","state","multiselect","defaultProps","id","role","elementType"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAgBaA;;;eAAAA;;;;iEAhBU;+BAEC;kCACqB;gCACT;AAY7B,MAAMA,4BAA4B,CACvCC,OACAC;IAEA,MAAMC,aAAaC,IAAAA,8CAAAA,EAA6BC,CAAAA,MAAOA,IAAIF,UAAU;IAGrE,MAAMG,aAAaF,IAAAA,8CAAAA,EAA6BC,CAAAA,MAAOA,IAAIC,UAAU;IACrE,MAAMC,YAAYH,IAAAA,8CAAAA,EAA6BC,CAAAA,MAAOA,IAAIE,SAAS;IACnE,MAAMC,OAAOJ,IAAAA,8CAAAA,EAA6BC,CAAAA,MAAOA,IAAIG,IAAI;IAEzD,OAAO;QACLA;QACAC,YAAY;YACVC,MAAMC,sBAAAA;QACR;QACAD,MAAME,oBAAAA,CAAKC,MAAM,CACf;YACE,GAAGC,IAAAA,6BAAAA,EAAeb,OAAOc,IAAAA,6BAAAA,EAAcT,YAAYJ,MAAM;gBACvDc,OAAO;oBAAEC,aAAa;gBAAK;gBAC3Bd;gBACAe,cAAc;oBAAEC,IAAIZ;gBAAU;YAChC,EAAE;YACFa,MAAM;QACR,GACA;YAAEC,aAAaV,sBAAAA;QAAQ;IAE3B;AACF"}
@@ -51,6 +51,7 @@ const tagPickerListClassNames = {
51
51
  ]
52
52
  });
53
53
  const useTagPickerListStyles_unstable = (state)=>{
54
+ 'use no memo';
54
55
  const styles = useStyles();
55
56
  state.root.className = (0, _react.mergeClasses)(tagPickerListClassNames.root, styles.root, !state.open && styles.collapsed, state.root.className);
56
57
  return state;
@@ -1 +1 @@
1
- {"version":3,"sources":["useTagPickerListStyles.styles.js"],"sourcesContent":["import { __styles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nexport const tagPickerListClassNames = {\n root: 'fui-TagPickerList'\n};\n/**\n * Styles for the root slot\n */\nconst useStyles = /*#__PURE__*/__styles({\n root: {\n E5pizo: \"f1hg901r\",\n Beyfa6y: 0,\n Bbmb7ep: 0,\n Btl43ni: 0,\n B7oj6ja: 0,\n Dimara: \"ft85np5\",\n Bxyxcbc: \"fmmk62d\",\n B7ck84d: \"f1ewtqcl\"\n },\n collapsed: {\n mc9l5x: \"fjseox\"\n }\n}, {\n d: [\".f1hg901r{box-shadow:var(--shadow16);}\", [\".ft85np5{border-radius:var(--borderRadiusMedium);}\", {\n p: -1\n }], \".fmmk62d{max-height:80vh;}\", \".f1ewtqcl{box-sizing:border-box;}\", \".fjseox{display:none;}\"]\n});\n/**\n * Apply styling to the TagPickerList slots based on the state\n */\nexport const useTagPickerListStyles_unstable = state => {\n const styles = useStyles();\n state.root.className = mergeClasses(tagPickerListClassNames.root, styles.root, !state.open && styles.collapsed, state.root.className);\n return state;\n};\n//# sourceMappingURL=useTagPickerListStyles.styles.js.map"],"names":["tagPickerListClassNames","useTagPickerListStyles_unstable","root","useStyles","__styles","E5pizo","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Bxyxcbc","B7ck84d","collapsed","mc9l5x","d","p","state","styles","className","mergeClasses","open"],"mappings":";;;;;;;;;;;IAEaA,uBAAuB;eAAvBA;;IA4BAC,+BAA+B;eAA/BA;;;uBA9B0B;AAEhC,MAAMD,0BAA0B;IACrCE,MAAM;AACR;AACA;;CAEC,GACD,MAAMC,YAAY,WAAW,GAAEC,IAAAA,eAAQ,EAAC;IACtCF,MAAM;QACJG,QAAQ;QACRC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,QAAQ;QACRC,SAAS;QACTC,SAAS;IACX;IACAC,WAAW;QACTC,QAAQ;IACV;AACF,GAAG;IACDC,GAAG;QAAC;QAA0C;YAAC;YAAsD;gBACnGC,GAAG,CAAC;YACN;SAAE;QAAE;QAA8B;QAAqC;KAAyB;AAClG;AAIO,MAAMf,kCAAkCgB,CAAAA;IAC7C,MAAMC,SAASf;IACfc,MAAMf,IAAI,CAACiB,SAAS,GAAGC,IAAAA,mBAAY,EAACpB,wBAAwBE,IAAI,EAAEgB,OAAOhB,IAAI,EAAE,CAACe,MAAMI,IAAI,IAAIH,OAAOL,SAAS,EAAEI,MAAMf,IAAI,CAACiB,SAAS;IACpI,OAAOF;AACT,GACA,yDAAyD"}
1
+ {"version":3,"sources":["useTagPickerListStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nexport const tagPickerListClassNames = {\n root: 'fui-TagPickerList'\n};\n/**\n * Styles for the root slot\n */ const useStyles = makeStyles({\n root: {\n boxShadow: `${tokens.shadow16}`,\n borderRadius: tokens.borderRadiusMedium,\n maxHeight: '80vh',\n boxSizing: 'border-box'\n },\n collapsed: {\n display: 'none'\n }\n});\n/**\n * Apply styling to the TagPickerList slots based on the state\n */ export const useTagPickerListStyles_unstable = (state)=>{\n 'use no memo';\n const styles = useStyles();\n state.root.className = mergeClasses(tagPickerListClassNames.root, styles.root, !state.open && styles.collapsed, state.root.className);\n return state;\n};\n"],"names":["tagPickerListClassNames","useTagPickerListStyles_unstable","root","useStyles","__styles","E5pizo","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Bxyxcbc","B7ck84d","collapsed","mc9l5x","d","p","state","styles","className","mergeClasses","open"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAEaA,uBAAuB;eAAvBA;;IAkBIC,+BAA+B;eAA/BA;;;uBApBwB;AAElC,MAAMD,0BAA0B;IACnCE,MAAM;AACV;AACA;;CAEA,GAAI,MAAMC,YAAS,WAAA,GAAGC,IAAAA,eAAA,EAAA;IAAAF,MAAA;QAAAG,QAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,SAAA;QAAAC,SAAA;IAAA;IAAAC,WAAA;QAAAC,QAAA;IAAA;AAAA,GAAA;IAAAC,GAAA;QAAA;QAAA;YAAA;YAAA;gBAAAC,GAAA,CAAA;YAAA;SAAA;QAAA;QAAA;QAAA;KAAA;AAAA;AAaX,MAAMf,kCAAmCgB,CAAAA;IAChD;IACA,MAAMC,SAASf;IACfc,MAAMf,IAAI,CAACiB,SAAS,GAAGC,IAAAA,mBAAY,EAACpB,wBAAwBE,IAAI,EAAEgB,OAAOhB,IAAI,EAAE,CAACe,MAAMI,IAAI,IAAIH,OAAOL,SAAS,EAAEI,MAAMf,IAAI,CAACiB,SAAS;IACpI,OAAOF;AACX"}
@@ -1 +1 @@
1
- {"version":3,"sources":["TagPickerOption.js"],"sourcesContent":["import * as React from 'react';\nimport { useTagPickerOption_unstable } from './useTagPickerOption';\nimport { renderTagPickerOption_unstable } from './renderTagPickerOption';\nimport { useTagPickerOptionStyles_unstable } from './useTagPickerOptionStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * TagPickerOption component -\n * A TagPickerOption is a composite component that allows users to select tags.\n */ export const TagPickerOption = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useTagPickerOption_unstable(props, ref);\n useTagPickerOptionStyles_unstable(state);\n useCustomStyleHook_unstable('useTagPickerOptionStyles_unstable')(state);\n return renderTagPickerOption_unstable(state);\n});\nTagPickerOption.displayName = 'TagPickerOption';\n"],"names":["TagPickerOption","React","forwardRef","props","ref","state","useTagPickerOption_unstable","useTagPickerOptionStyles_unstable","useCustomStyleHook_unstable","renderTagPickerOption_unstable","displayName"],"mappings":";;;;+BAQiBA;;;eAAAA;;;;iEARM;oCACqB;uCACG;gDACG;qCACN;AAIjC,MAAMA,kBAAkB,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACtE,MAAMC,QAAQC,IAAAA,+CAA2B,EAACH,OAAOC;IACjDG,IAAAA,iEAAiC,EAACF;IAClCG,IAAAA,gDAA2B,EAAC,qCAAqCH;IACjE,OAAOI,IAAAA,qDAA8B,EAACJ;AAC1C;AACAL,gBAAgBU,WAAW,GAAG"}
1
+ {"version":3,"sources":["TagPickerOption.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useTagPickerOption_unstable } from './useTagPickerOption';\nimport { renderTagPickerOption_unstable } from './renderTagPickerOption';\nimport { useTagPickerOptionStyles_unstable } from './useTagPickerOptionStyles.styles';\nimport type { TagPickerOptionProps } from './TagPickerOption.types';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * TagPickerOption component -\n * A TagPickerOption is a composite component that allows users to select tags.\n */\nexport const TagPickerOption: ForwardRefComponent<TagPickerOptionProps> = React.forwardRef((props, ref) => {\n const state = useTagPickerOption_unstable(props, ref);\n\n useTagPickerOptionStyles_unstable(state);\n useCustomStyleHook_unstable('useTagPickerOptionStyles_unstable')(state);\n return renderTagPickerOption_unstable(state);\n});\n\nTagPickerOption.displayName = 'TagPickerOption';\n"],"names":["TagPickerOption","React","forwardRef","props","ref","state","useTagPickerOption_unstable","useTagPickerOptionStyles_unstable","useCustomStyleHook_unstable","renderTagPickerOption_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAYaA;;;eAAAA;;;;iEAZU;oCAEqB;uCACG;gDACG;qCAEN;AAMrC,MAAMA,kBAAAA,WAAAA,GAA6DC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACjG,MAAMC,QAAQC,IAAAA,+CAAAA,EAA4BH,OAAOC;IAEjDG,IAAAA,iEAAAA,EAAkCF;IAClCG,IAAAA,gDAAAA,EAA4B,qCAAqCH;IACjE,OAAOI,IAAAA,qDAAAA,EAA+BJ;AACxC;AAEAL,gBAAgBU,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["TagPickerOption.types.js"],"sourcesContent":["import * as React from 'react';\n"],"names":[],"mappings":";;;;;iEAAuB"}
1
+ {"version":3,"sources":["TagPickerOption.types.ts"],"sourcesContent":["import { OptionSlots, OptionState } from '@fluentui/react-combobox';\nimport { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport * as React from 'react';\n\nexport type TagPickerOptionSlots = Pick<OptionSlots, 'root'> & {\n media?: Slot<'div'>;\n secondaryContent?: Slot<'span'>;\n};\n\n/**\n * TagPickerOption Props\n */\nexport type TagPickerOptionProps = ComponentProps<TagPickerOptionSlots> & {\n value: string;\n} & (\n | {\n /**\n * An optional override the string value of the Option's display text,\n * defaulting to the Option's child content.\n * This is used as the Dropdown button's or Combobox input's value when the option is selected,\n * and as the comparison for type-to-find keyboard functionality.\n */\n text?: string;\n children: string;\n }\n | {\n /**\n * The string value of the Option's display text when the Option's children are not a string.\n * This is used as the Dropdown button's or Combobox input's value when the option is selected,\n * and as the comparison for type-to-find keyboard functionality.\n */\n text: string;\n children?: React.ReactNode;\n }\n );\n\n/**\n * State used in rendering TagPickerOption\n */\nexport type TagPickerOptionState = ComponentState<TagPickerOptionSlots> & Pick<OptionState, 'components' | 'root'>;\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;iEAEuB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export * from './TagPickerOption';\nexport * from './TagPickerOption.types';\nexport * from './renderTagPickerOption';\nexport * from './useTagPickerOption';\nexport * from './useTagPickerOptionStyles.styles';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './TagPickerOption';\nexport * from './TagPickerOption.types';\nexport * from './renderTagPickerOption';\nexport * from './useTagPickerOption';\nexport * from './useTagPickerOptionStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["renderTagPickerOption.js"],"sourcesContent":[" import { jsx as _jsx, jsxs as _jsxs } from \"@fluentui/react-jsx-runtime/jsx-runtime\";\nimport { assertSlots } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of TagPickerOption\n */ export const renderTagPickerOption_unstable = (state)=>{\n assertSlots(state);\n return /*#__PURE__*/ _jsxs(state.root, {\n children: [\n state.media && /*#__PURE__*/ _jsx(state.media, {}),\n state.root.children,\n state.secondaryContent && /*#__PURE__*/ _jsx(state.secondaryContent, {})\n ]\n });\n};\n"],"names":["renderTagPickerOption_unstable","state","assertSlots","_jsxs","root","children","media","_jsx","secondaryContent"],"mappings":";;;;+BAIiBA;;;eAAAA;;;4BAJ4B;gCACjB;AAGjB,MAAMA,iCAAiC,CAACC;IAC/CC,IAAAA,2BAAW,EAACD;IACZ,OAAO,WAAW,GAAGE,IAAAA,gBAAK,EAACF,MAAMG,IAAI,EAAE;QACnCC,UAAU;YACNJ,MAAMK,KAAK,IAAI,WAAW,GAAGC,IAAAA,eAAI,EAACN,MAAMK,KAAK,EAAE,CAAC;YAChDL,MAAMG,IAAI,CAACC,QAAQ;YACnBJ,MAAMO,gBAAgB,IAAI,WAAW,GAAGD,IAAAA,eAAI,EAACN,MAAMO,gBAAgB,EAAE,CAAC;SACzE;IACL;AACJ"}
1
+ {"version":3,"sources":["renderTagPickerOption.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { TagPickerOptionState, TagPickerOptionSlots } from './TagPickerOption.types';\n\n/**\n * Render the final JSX of TagPickerOption\n */\nexport const renderTagPickerOption_unstable = (state: TagPickerOptionState) => {\n assertSlots<TagPickerOptionSlots>(state);\n\n return (\n <state.root>\n {state.media && <state.media />}\n {state.root.children}\n {state.secondaryContent && <state.secondaryContent />}\n </state.root>\n );\n};\n"],"names":["renderTagPickerOption_unstable","state","assertSlots","_jsxs","root","media","_jsx","children","secondaryContent"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;4BARb;gCAE4B;AAMrB,MAAMA,iCAAiC,CAACC;IAC7CC,IAAAA,2BAAAA,EAAkCD;IAElC,OAAA,WAAA,GACEE,IAAAA,gBAAA,EAACF,MAAMG,IAAI,EAAA;;YACRH,MAAMI,KAAK,IAAA,WAAA,GAAIC,IAAAA,eAAA,EAACL,MAAMI,KAAK,EAAA,CAAA;YAC3BJ,MAAMG,IAAI,CAACG,QAAQ;YACnBN,MAAMO,gBAAgB,IAAA,WAAA,GAAIF,IAAAA,eAAA,EAACL,MAAMO,gBAAgB,EAAA,CAAA;;;AAGxD"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useTagPickerOption.js"],"sourcesContent":["import * as React from 'react';\nimport { slot } from '@fluentui/react-utilities';\nimport { useOption_unstable } from '@fluentui/react-combobox';\n/**\n * Create the state required to render TagPickerOption.\n *\n * The returned state can be modified with hooks such as useTagPickerOptionStyles_unstable,\n * before being passed to renderTagPickerOption_unstable.\n *\n * @param props - props from this instance of TagPickerOption\n * @param ref - reference to root HTMLDivElement of TagPickerOption\n */ export const useTagPickerOption_unstable = (props, ref)=>{\n const optionState = useOption_unstable(props, ref);\n const state = {\n components: {\n ...optionState.components,\n media: 'div',\n secondaryContent: 'span'\n },\n media: slot.optional(props.media, {\n elementType: 'div'\n }),\n secondaryContent: slot.optional(props.secondaryContent, {\n elementType: 'span'\n }),\n root: slot.always({\n ...optionState.root,\n role: 'option',\n 'aria-checked': props['aria-checked']\n }, {\n elementType: 'div'\n })\n };\n return state;\n};\n"],"names":["useTagPickerOption_unstable","props","ref","optionState","useOption_unstable","state","components","media","secondaryContent","slot","optional","elementType","root","always","role"],"mappings":";;;;+BAWiBA;;;eAAAA;;;;iEAXM;gCACF;+BACc;AASxB,MAAMA,8BAA8B,CAACC,OAAOC;IACnD,MAAMC,cAAcC,IAAAA,iCAAkB,EAACH,OAAOC;IAC9C,MAAMG,QAAQ;QACVC,YAAY;YACR,GAAGH,YAAYG,UAAU;YACzBC,OAAO;YACPC,kBAAkB;QACtB;QACAD,OAAOE,oBAAI,CAACC,QAAQ,CAACT,MAAMM,KAAK,EAAE;YAC9BI,aAAa;QACjB;QACAH,kBAAkBC,oBAAI,CAACC,QAAQ,CAACT,MAAMO,gBAAgB,EAAE;YACpDG,aAAa;QACjB;QACAC,MAAMH,oBAAI,CAACI,MAAM,CAAC;YACd,GAAGV,YAAYS,IAAI;YACnBE,MAAM;YACN,gBAAgBb,KAAK,CAAC,eAAe;QACzC,GAAG;YACCU,aAAa;QACjB;IACJ;IACA,OAAON;AACX"}
1
+ {"version":3,"sources":["useTagPickerOption.ts"],"sourcesContent":["import * as React from 'react';\nimport { slot } from '@fluentui/react-utilities';\nimport { useOption_unstable } from '@fluentui/react-combobox';\nimport type { TagPickerOptionProps, TagPickerOptionState } from './TagPickerOption.types';\n\n/**\n * Create the state required to render TagPickerOption.\n *\n * The returned state can be modified with hooks such as useTagPickerOptionStyles_unstable,\n * before being passed to renderTagPickerOption_unstable.\n *\n * @param props - props from this instance of TagPickerOption\n * @param ref - reference to root HTMLDivElement of TagPickerOption\n */\nexport const useTagPickerOption_unstable = (\n props: TagPickerOptionProps,\n ref: React.Ref<HTMLDivElement>,\n): TagPickerOptionState => {\n const optionState = useOption_unstable(props, ref);\n const state: TagPickerOptionState = {\n components: {\n ...optionState.components,\n media: 'div',\n secondaryContent: 'span',\n },\n media: slot.optional(props.media, {\n elementType: 'div',\n }),\n secondaryContent: slot.optional(props.secondaryContent, {\n elementType: 'span',\n }),\n root: slot.always(\n { ...optionState.root, role: 'option', 'aria-checked': props['aria-checked'] },\n {\n elementType: 'div',\n },\n ),\n };\n\n return state;\n};\n"],"names":["useTagPickerOption_unstable","props","ref","optionState","useOption_unstable","state","components","media","secondaryContent","slot","optional","elementType","root","always","role"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAcaA;;;eAAAA;;;;iEAdU;gCACF;+BACc;AAY5B,MAAMA,8BAA8B,CACzCC,OACAC;IAEA,MAAMC,cAAcC,IAAAA,iCAAAA,EAAmBH,OAAOC;IAC9C,MAAMG,QAA8B;QAClCC,YAAY;YACV,GAAGH,YAAYG,UAAU;YACzBC,OAAO;YACPC,kBAAkB;QACpB;QACAD,OAAOE,oBAAAA,CAAKC,QAAQ,CAACT,MAAMM,KAAK,EAAE;YAChCI,aAAa;QACf;QACAH,kBAAkBC,oBAAAA,CAAKC,QAAQ,CAACT,MAAMO,gBAAgB,EAAE;YACtDG,aAAa;QACf;QACAC,MAAMH,oBAAAA,CAAKI,MAAM,CACf;YAAE,GAAGV,YAAYS,IAAI;YAAEE,MAAM;YAAU,gBAAgBb,KAAK,CAAC,eAAe;QAAC,GAC7E;YACEU,aAAa;QACf;IAEJ;IAEA,OAAON;AACT"}
@@ -49,6 +49,7 @@ const tagPickerOptionClassNames = {
49
49
  ]
50
50
  });
51
51
  const useTagPickerOptionStyles_unstable = (state)=>{
52
+ 'use no memo';
52
53
  (0, _reactcombobox.useOptionStyles_unstable)({
53
54
  ...state,
54
55
  active: false,
@@ -1 +1 @@
1
- {"version":3,"sources":["useTagPickerOptionStyles.styles.js"],"sourcesContent":["import { __styles, mergeClasses } from '@griffel/react';\nimport { useOptionStyles_unstable } from '@fluentui/react-combobox';\nexport const tagPickerOptionClassNames = {\n root: 'fui-TagPickerOption',\n media: 'fui-TagPickerOption__media',\n secondaryContent: 'fui-TagPickerOption__secondaryContent'\n};\n/**\n * Styles for the root slot\n */\nconst useStyles = /*#__PURE__*/__styles({\n root: {\n mc9l5x: \"f13qh94s\",\n Budl1dq: \"fjxzuw\",\n Bt984gj: \"f122n59\"\n },\n secondaryContent: {\n Br312pm: \"fd46tj4\",\n Ijaq50: \"faunodf\"\n },\n media: {\n Ijaq50: \"fldnz9j\"\n }\n}, {\n d: [\".f13qh94s{display:grid;}\", \".fjxzuw{grid-template-columns:auto 1fr;}\", \".f122n59{align-items:center;}\", \".fd46tj4{grid-column-start:2;}\", \".faunodf{grid-row-start:2;}\", \".fldnz9j{grid-row-start:span 2;}\"]\n});\n/**\n * Apply styling to the TagPickerOption slots based on the state\n */\nexport const useTagPickerOptionStyles_unstable = state => {\n useOptionStyles_unstable({\n ...state,\n active: false,\n disabled: false,\n focusVisible: false,\n checkIcon: undefined,\n selected: false\n });\n const styles = useStyles();\n state.root.className = mergeClasses(tagPickerOptionClassNames.root, styles.root, state.root.className);\n if (state.media) {\n state.media.className = mergeClasses(tagPickerOptionClassNames.media, styles.media, state.media.className);\n }\n if (state.secondaryContent) {\n state.secondaryContent.className = mergeClasses(tagPickerOptionClassNames.secondaryContent, styles.secondaryContent, state.secondaryContent.className);\n }\n return state;\n};\n//# sourceMappingURL=useTagPickerOptionStyles.styles.js.map"],"names":["tagPickerOptionClassNames","useTagPickerOptionStyles_unstable","root","media","secondaryContent","useStyles","__styles","mc9l5x","Budl1dq","Bt984gj","Br312pm","Ijaq50","d","state","useOptionStyles_unstable","active","disabled","focusVisible","checkIcon","undefined","selected","styles","className","mergeClasses"],"mappings":";;;;;;;;;;;IAEaA,yBAAyB;eAAzBA;;IA2BAC,iCAAiC;eAAjCA;;;uBA7B0B;+BACE;AAClC,MAAMD,4BAA4B;IACvCE,MAAM;IACNC,OAAO;IACPC,kBAAkB;AACpB;AACA;;CAEC,GACD,MAAMC,YAAY,WAAW,GAAEC,IAAAA,eAAQ,EAAC;IACtCJ,MAAM;QACJK,QAAQ;QACRC,SAAS;QACTC,SAAS;IACX;IACAL,kBAAkB;QAChBM,SAAS;QACTC,QAAQ;IACV;IACAR,OAAO;QACLQ,QAAQ;IACV;AACF,GAAG;IACDC,GAAG;QAAC;QAA4B;QAA4C;QAAiC;QAAkC;QAA+B;KAAmC;AACnN;AAIO,MAAMX,oCAAoCY,CAAAA;IAC/CC,IAAAA,uCAAwB,EAAC;QACvB,GAAGD,KAAK;QACRE,QAAQ;QACRC,UAAU;QACVC,cAAc;QACdC,WAAWC;QACXC,UAAU;IACZ;IACA,MAAMC,SAAShB;IACfQ,MAAMX,IAAI,CAACoB,SAAS,GAAGC,IAAAA,mBAAY,EAACvB,0BAA0BE,IAAI,EAAEmB,OAAOnB,IAAI,EAAEW,MAAMX,IAAI,CAACoB,SAAS;IACrG,IAAIT,MAAMV,KAAK,EAAE;QACfU,MAAMV,KAAK,CAACmB,SAAS,GAAGC,IAAAA,mBAAY,EAACvB,0BAA0BG,KAAK,EAAEkB,OAAOlB,KAAK,EAAEU,MAAMV,KAAK,CAACmB,SAAS;IAC3G;IACA,IAAIT,MAAMT,gBAAgB,EAAE;QAC1BS,MAAMT,gBAAgB,CAACkB,SAAS,GAAGC,IAAAA,mBAAY,EAACvB,0BAA0BI,gBAAgB,EAAEiB,OAAOjB,gBAAgB,EAAES,MAAMT,gBAAgB,CAACkB,SAAS;IACvJ;IACA,OAAOT;AACT,GACA,2DAA2D"}
1
+ {"version":3,"sources":["useTagPickerOptionStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { useOptionStyles_unstable } from '@fluentui/react-combobox';\nexport const tagPickerOptionClassNames = {\n root: 'fui-TagPickerOption',\n media: 'fui-TagPickerOption__media',\n secondaryContent: 'fui-TagPickerOption__secondaryContent'\n};\n/**\n * Styles for the root slot\n */ const useStyles = makeStyles({\n root: {\n display: 'grid',\n gridTemplateColumns: 'auto 1fr',\n alignItems: 'center'\n },\n secondaryContent: {\n gridColumnStart: 2,\n gridRowStart: 2\n },\n media: {\n gridRowStart: 'span 2'\n }\n});\n/**\n * Apply styling to the TagPickerOption slots based on the state\n */ export const useTagPickerOptionStyles_unstable = (state)=>{\n 'use no memo';\n useOptionStyles_unstable({\n ...state,\n active: false,\n disabled: false,\n focusVisible: false,\n checkIcon: undefined,\n selected: false\n });\n const styles = useStyles();\n state.root.className = mergeClasses(tagPickerOptionClassNames.root, styles.root, state.root.className);\n if (state.media) {\n state.media.className = mergeClasses(tagPickerOptionClassNames.media, styles.media, state.media.className);\n }\n if (state.secondaryContent) {\n state.secondaryContent.className = mergeClasses(tagPickerOptionClassNames.secondaryContent, styles.secondaryContent, state.secondaryContent.className);\n }\n return state;\n};\n"],"names":["tagPickerOptionClassNames","useTagPickerOptionStyles_unstable","root","media","secondaryContent","useStyles","__styles","mc9l5x","Budl1dq","Bt984gj","Br312pm","Ijaq50","d","state","useOptionStyles_unstable","active","disabled","focusVisible","checkIcon","undefined","selected","styles","className","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAEaA,yBAAyB;eAAzBA;;IAuBIC,iCAAiC;eAAjCA;;;uBAzBwB;+BACA;AAClC,MAAMD,4BAA4B;IACrCE,MAAM;IACNC,OAAO;IACPC,kBAAkB;AACtB;AACA;;CAEA,GAAI,MAAMC,YAAS,WAAA,GAAGC,IAAAA,eAAA,EAAA;IAAAJ,MAAA;QAAAK,QAAA;QAAAC,SAAA;QAAAC,SAAA;IAAA;IAAAL,kBAAA;QAAAM,SAAA;QAAAC,QAAA;IAAA;IAAAR,OAAA;QAAAQ,QAAA;IAAA;AAAA,GAAA;IAAAC,GAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;AAAA;AAgBX,MAAMX,oCAAqCY,CAAAA;IAClD;IACAC,IAAAA,uCAAwB,EAAC;QACrB,GAAGD,KAAK;QACRE,QAAQ;QACRC,UAAU;QACVC,cAAc;QACdC,WAAWC;QACXC,UAAU;IACd;IACA,MAAMC,SAAShB;IACfQ,MAAMX,IAAI,CAACoB,SAAS,GAAGC,IAAAA,mBAAY,EAACvB,0BAA0BE,IAAI,EAAEmB,OAAOnB,IAAI,EAAEW,MAAMX,IAAI,CAACoB,SAAS;IACrG,IAAIT,MAAMV,KAAK,EAAE;QACbU,MAAMV,KAAK,CAACmB,SAAS,GAAGC,IAAAA,mBAAY,EAACvB,0BAA0BG,KAAK,EAAEkB,OAAOlB,KAAK,EAAEU,MAAMV,KAAK,CAACmB,SAAS;IAC7G;IACA,IAAIT,MAAMT,gBAAgB,EAAE;QACxBS,MAAMT,gBAAgB,CAACkB,SAAS,GAAGC,IAAAA,mBAAY,EAACvB,0BAA0BI,gBAAgB,EAAEiB,OAAOjB,gBAAgB,EAAES,MAAMT,gBAAgB,CAACkB,SAAS;IACzJ;IACA,OAAOT;AACX"}
@@ -1 +1 @@
1
- {"version":3,"sources":["TagPickerOptionGroup.js"],"sourcesContent":["import * as React from 'react';\nimport { useTagPickerOptionGroup } from './useTagPickerOptionGroup';\nimport { renderTagPickerOptionGroup } from './renderTagPickerOptionGroup';\nimport { useTagPickerOptionGroupStyles } from './useTagPickerOptionGroupStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * TagPickerOptionGroup component -\n * A TagPickerOptionGroup is a composite component that allows users to group TagPickerOptions.\n */ export const TagPickerOptionGroup = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useTagPickerOptionGroup(props, ref);\n useTagPickerOptionGroupStyles(state);\n useCustomStyleHook_unstable('useTagPickerOptionGroupStyles_unstable')(state);\n return renderTagPickerOptionGroup(state);\n});\nTagPickerOptionGroup.displayName = 'TagPickerOptionGroup';\n"],"names":["TagPickerOptionGroup","React","forwardRef","props","ref","state","useTagPickerOptionGroup","useTagPickerOptionGroupStyles","useCustomStyleHook_unstable","renderTagPickerOptionGroup","displayName"],"mappings":";;;;+BAQiBA;;;eAAAA;;;;iEARM;yCACiB;4CACG;qDACG;qCACF;AAIjC,MAAMA,uBAAuB,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC3E,MAAMC,QAAQC,IAAAA,gDAAuB,EAACH,OAAOC;IAC7CG,IAAAA,kEAA6B,EAACF;IAC9BG,IAAAA,gDAA2B,EAAC,0CAA0CH;IACtE,OAAOI,IAAAA,sDAA0B,EAACJ;AACtC;AACAL,qBAAqBU,WAAW,GAAG"}
1
+ {"version":3,"sources":["TagPickerOptionGroup.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useTagPickerOptionGroup } from './useTagPickerOptionGroup';\nimport { renderTagPickerOptionGroup } from './renderTagPickerOptionGroup';\nimport { useTagPickerOptionGroupStyles } from './useTagPickerOptionGroupStyles.styles';\nimport type { TagPickerOptionGroupProps } from './TagPickerOptionGroup.types';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * TagPickerOptionGroup component -\n * A TagPickerOptionGroup is a composite component that allows users to group TagPickerOptions.\n */\nexport const TagPickerOptionGroup: ForwardRefComponent<TagPickerOptionGroupProps> = React.forwardRef((props, ref) => {\n const state = useTagPickerOptionGroup(props, ref);\n\n useTagPickerOptionGroupStyles(state);\n useCustomStyleHook_unstable('useTagPickerOptionGroupStyles_unstable')(state);\n return renderTagPickerOptionGroup(state);\n});\n\nTagPickerOptionGroup.displayName = 'TagPickerOptionGroup';\n"],"names":["TagPickerOptionGroup","React","forwardRef","props","ref","state","useTagPickerOptionGroup","useTagPickerOptionGroupStyles","useCustomStyleHook_unstable","renderTagPickerOptionGroup","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAYaA;;;eAAAA;;;;iEAZU;yCAEiB;4CACG;qDACG;qCAEF;AAMrC,MAAMA,uBAAAA,WAAAA,GAAuEC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC3G,MAAMC,QAAQC,IAAAA,gDAAAA,EAAwBH,OAAOC;IAE7CG,IAAAA,kEAAAA,EAA8BF;IAC9BG,IAAAA,gDAAAA,EAA4B,0CAA0CH;IACtE,OAAOI,IAAAA,sDAAAA,EAA2BJ;AACpC;AAEAL,qBAAqBU,WAAW,GAAG"}
@@ -1,4 +1,6 @@
1
- "use strict";
1
+ /**
2
+ * State used in rendering TagPickerOptionGroup
3
+ */ "use strict";
2
4
  Object.defineProperty(exports, "__esModule", {
3
5
  value: true
4
6
  });
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":""}
1
+ {"version":3,"sources":["TagPickerOptionGroup.types.ts"],"sourcesContent":["import { OptionGroupProps, OptionGroupSlots, OptionGroupState } from '@fluentui/react-combobox';\n\nexport type TagPickerOptionGroupSlots = OptionGroupSlots;\n\n/**\n * TagPickerOptionGroup Props\n */\nexport type TagPickerOptionGroupProps = OptionGroupProps;\n\n/**\n * State used in rendering TagPickerOptionGroup\n */\nexport type TagPickerOptionGroupState = OptionGroupState;\n"],"names":[],"rangeMappings":";;","mappings":"AASA;;CAEC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export * from './TagPickerOptionGroup';\nexport * from './TagPickerOptionGroup.types';\nexport * from './renderTagPickerOptionGroup';\nexport * from './useTagPickerOptionGroup';\nexport * from './useTagPickerOptionGroupStyles.styles';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './TagPickerOptionGroup';\nexport * from './TagPickerOptionGroup.types';\nexport * from './renderTagPickerOptionGroup';\nexport * from './useTagPickerOptionGroup';\nexport * from './useTagPickerOptionGroupStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["renderTagPickerOptionGroup.js"],"sourcesContent":[" import { renderOptionGroup_unstable } from '@fluentui/react-combobox';\n/**\n * Render the final JSX of TagPickerOptionGroup\n */ export const renderTagPickerOptionGroup = renderOptionGroup_unstable;\n"],"names":["renderTagPickerOptionGroup","renderOptionGroup_unstable"],"mappings":";;;;+BAGiBA;;;eAAAA;;;+BAH4B;AAGlC,MAAMA,6BAA6BC,yCAA0B"}
1
+ {"version":3,"sources":["renderTagPickerOptionGroup.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport type { TagPickerOptionGroupState } from './TagPickerOptionGroup.types';\nimport { renderOptionGroup_unstable } from '@fluentui/react-combobox';\n\n/**\n * Render the final JSX of TagPickerOptionGroup\n */\nexport const renderTagPickerOptionGroup: (state: TagPickerOptionGroupState) => JSX.Element = renderOptionGroup_unstable;\n"],"names":["renderTagPickerOptionGroup","renderOptionGroup_unstable"],"rangeMappings":";;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;+BARb;AAQO,MAAMA,6BAAgFC,yCAAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useTagPickerOptionGroup.js"],"sourcesContent":["import * as React from 'react';\nimport { useOptionGroup_unstable } from '@fluentui/react-combobox';\n/**\n * Create the state required to render TagPickerOptionGroup.\n *\n * The returned state can be modified with hooks such as useTagPickerOptionGroupStyles_unstable,\n * before being passed to renderTagPickerOptionGroup_unstable.\n *\n * @param props - props from this instance of TagPickerOptionGroup\n * @param ref - reference to root HTMLDivElement of TagPickerOptionGroup\n */ export const useTagPickerOptionGroup = useOptionGroup_unstable;\n"],"names":["useTagPickerOptionGroup","useOptionGroup_unstable"],"mappings":";;;;+BAUiBA;;;eAAAA;;;;iEAVM;+BACiB;AAS7B,MAAMA,0BAA0BC,sCAAuB"}
1
+ {"version":3,"sources":["useTagPickerOptionGroup.ts"],"sourcesContent":["import * as React from 'react';\nimport type { TagPickerOptionGroupProps, TagPickerOptionGroupState } from './TagPickerOptionGroup.types';\nimport { useOptionGroup_unstable } from '@fluentui/react-combobox';\n\n/**\n * Create the state required to render TagPickerOptionGroup.\n *\n * The returned state can be modified with hooks such as useTagPickerOptionGroupStyles_unstable,\n * before being passed to renderTagPickerOptionGroup_unstable.\n *\n * @param props - props from this instance of TagPickerOptionGroup\n * @param ref - reference to root HTMLDivElement of TagPickerOptionGroup\n */\nexport const useTagPickerOptionGroup: (\n props: TagPickerOptionGroupProps,\n ref: React.Ref<HTMLDivElement>,\n) => TagPickerOptionGroupState = useOptionGroup_unstable;\n"],"names":["useTagPickerOptionGroup","useOptionGroup_unstable"],"rangeMappings":";;;;;;;;;;;;;","mappings":";;;;+BAaaA;;;eAAAA;;;;iEAbU;+BAEiB;AAWjC,MAAMA,0BAGoBC,sCAAAA"}
@@ -23,6 +23,7 @@ const tagPickerOptionGroupClassNames = {
23
23
  label: 'fui-TagPickerOptionGroup__label'
24
24
  };
25
25
  const useTagPickerOptionGroupStyles = (state)=>{
26
+ 'use no memo';
26
27
  (0, _reactcombobox.useOptionGroupStyles_unstable)(state);
27
28
  state.root.className = (0, _react.mergeClasses)(tagPickerOptionGroupClassNames.root, state.root.className);
28
29
  if (state.label) {
@@ -1 +1 @@
1
- {"version":3,"sources":["useTagPickerOptionGroupStyles.styles.js"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport { useOptionGroupStyles_unstable } from '@fluentui/react-combobox';\nexport const tagPickerOptionGroupClassNames = {\n root: 'fui-TagPickerOptionGroup',\n label: 'fui-TagPickerOptionGroup__label'\n};\n/**\n * Apply styling to the TagPickerOptionGroup slots based on the state\n */\nexport const useTagPickerOptionGroupStyles = state => {\n useOptionGroupStyles_unstable(state);\n state.root.className = mergeClasses(tagPickerOptionGroupClassNames.root, state.root.className);\n if (state.label) {\n state.label.className = mergeClasses(tagPickerOptionGroupClassNames.label, state.label.className);\n }\n return state;\n};\n//# sourceMappingURL=useTagPickerOptionGroupStyles.styles.js.map"],"names":["tagPickerOptionGroupClassNames","useTagPickerOptionGroupStyles","root","label","state","useOptionGroupStyles_unstable","className","mergeClasses"],"mappings":";;;;;;;;;;;IAEaA,8BAA8B;eAA9BA;;IAOAC,6BAA6B;eAA7BA;;;uBATgB;+BACiB;AACvC,MAAMD,iCAAiC;IAC5CE,MAAM;IACNC,OAAO;AACT;AAIO,MAAMF,gCAAgCG,CAAAA;IAC3CC,IAAAA,4CAA6B,EAACD;IAC9BA,MAAMF,IAAI,CAACI,SAAS,GAAGC,IAAAA,mBAAY,EAACP,+BAA+BE,IAAI,EAAEE,MAAMF,IAAI,CAACI,SAAS;IAC7F,IAAIF,MAAMD,KAAK,EAAE;QACfC,MAAMD,KAAK,CAACG,SAAS,GAAGC,IAAAA,mBAAY,EAACP,+BAA+BG,KAAK,EAAEC,MAAMD,KAAK,CAACG,SAAS;IAClG;IACA,OAAOF;AACT,GACA,gEAAgE"}
1
+ {"version":3,"sources":["useTagPickerOptionGroupStyles.styles.js"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport { useOptionGroupStyles_unstable } from '@fluentui/react-combobox';\nexport const tagPickerOptionGroupClassNames = {\n root: 'fui-TagPickerOptionGroup',\n label: 'fui-TagPickerOptionGroup__label'\n};\n/**\n * Apply styling to the TagPickerOptionGroup slots based on the state\n */ export const useTagPickerOptionGroupStyles = (state)=>{\n 'use no memo';\n useOptionGroupStyles_unstable(state);\n state.root.className = mergeClasses(tagPickerOptionGroupClassNames.root, state.root.className);\n if (state.label) {\n state.label.className = mergeClasses(tagPickerOptionGroupClassNames.label, state.label.className);\n }\n return state;\n};\n"],"names":["tagPickerOptionGroupClassNames","useTagPickerOptionGroupStyles","root","label","state","useOptionGroupStyles_unstable","className","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAEaA,8BAA8B;eAA9BA;;IAMIC,6BAA6B;eAA7BA;;;uBARY;+BACiB;AACvC,MAAMD,iCAAiC;IAC1CE,MAAM;IACNC,OAAO;AACX;AAGW,MAAMF,gCAAiCG,CAAAA;IAC9C;IACAC,IAAAA,4CAA6B,EAACD;IAC9BA,MAAMF,IAAI,CAACI,SAAS,GAAGC,IAAAA,mBAAY,EAACP,+BAA+BE,IAAI,EAAEE,MAAMF,IAAI,CAACI,SAAS;IAC7F,IAAIF,MAAMD,KAAK,EAAE;QACbC,MAAMD,KAAK,CAACG,SAAS,GAAGC,IAAAA,mBAAY,EAACP,+BAA+BG,KAAK,EAAEC,MAAMD,KAAK,CAACG,SAAS;IACpG;IACA,OAAOF;AACX"}
@@ -9,12 +9,12 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- tagPickerContextDefaultValue: function() {
13
- return tagPickerContextDefaultValue;
14
- },
15
12
  TagPickerContextProvider: function() {
16
13
  return TagPickerContextProvider;
17
14
  },
15
+ tagPickerContextDefaultValue: function() {
16
+ return tagPickerContextDefaultValue;
17
+ },
18
18
  useTagPickerContext_unstable: function() {
19
19
  return useTagPickerContext_unstable;
20
20
  }