@fluentui/react-combobox 9.74.7-experimental.cli-api.20261006-ccaa611d58.0 → 9.75.0-experimental.css-modules.20261031-810ab07afb.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (212) hide show
  1. package/CHANGELOG.md +60 -16
  2. package/README.md +12 -0
  3. package/dist/index.d.cts +30 -0
  4. package/dist/index.d.ts +30 -0
  5. package/lib/components/Combobox/Combobox.js.map +1 -1
  6. package/lib/components/Combobox/Combobox.module.css +233 -0
  7. package/lib/components/Combobox/Combobox.types.js.map +1 -1
  8. package/lib/components/Combobox/index.js.map +1 -1
  9. package/lib/components/Combobox/renderCombobox.js +2 -2
  10. package/lib/components/Combobox/renderCombobox.js.map +1 -1
  11. package/lib/components/Combobox/useCombobox.js +62 -42
  12. package/lib/components/Combobox/useCombobox.js.map +1 -1
  13. package/lib/components/Combobox/useComboboxExpandIconSlot.js +40 -0
  14. package/lib/components/Combobox/useComboboxExpandIconSlot.js.map +1 -0
  15. package/lib/components/Combobox/useComboboxStyles.styles.css.js +25 -0
  16. package/lib/components/Combobox/useComboboxStyles.styles.css.js.map +1 -0
  17. package/lib/components/Combobox/useComboboxStyles.styles.raw.css.js +25 -0
  18. package/lib/components/Combobox/useComboboxStyles.styles.raw.css.js.map +1 -0
  19. package/lib/components/Combobox/useComboboxStyles.styles.raw.js.map +1 -1
  20. package/lib/components/Combobox/useInputTriggerSlot.js +3 -2
  21. package/lib/components/Combobox/useInputTriggerSlot.js.map +1 -1
  22. package/lib/components/Dropdown/Dropdown.js.map +1 -1
  23. package/lib/components/Dropdown/Dropdown.module.css +237 -0
  24. package/lib/components/Dropdown/Dropdown.types.js.map +1 -1
  25. package/lib/components/Dropdown/index.js.map +1 -1
  26. package/lib/components/Dropdown/renderDropdown.js +2 -2
  27. package/lib/components/Dropdown/renderDropdown.js.map +1 -1
  28. package/lib/components/Dropdown/useButtonTriggerSlot.js.map +1 -1
  29. package/lib/components/Dropdown/useDropdown.js +5 -7
  30. package/lib/components/Dropdown/useDropdown.js.map +1 -1
  31. package/lib/components/Dropdown/useDropdownStyles.styles.css.js +25 -0
  32. package/lib/components/Dropdown/useDropdownStyles.styles.css.js.map +1 -0
  33. package/lib/components/Dropdown/useDropdownStyles.styles.js +4 -4
  34. package/lib/components/Dropdown/useDropdownStyles.styles.js.map +1 -1
  35. package/lib/components/Dropdown/useDropdownStyles.styles.raw.css.js +25 -0
  36. package/lib/components/Dropdown/useDropdownStyles.styles.raw.css.js.map +1 -0
  37. package/lib/components/Dropdown/useDropdownStyles.styles.raw.js +2 -2
  38. package/lib/components/Dropdown/useDropdownStyles.styles.raw.js.map +1 -1
  39. package/lib/components/Listbox/Listbox.js.map +1 -1
  40. package/lib/components/Listbox/Listbox.module.css +13 -0
  41. package/lib/components/Listbox/Listbox.types.js.map +1 -1
  42. package/lib/components/Listbox/index.js.map +1 -1
  43. package/lib/components/Listbox/renderListbox.js +2 -2
  44. package/lib/components/Listbox/renderListbox.js.map +1 -1
  45. package/lib/components/Listbox/useListbox.js.map +1 -1
  46. package/lib/components/Listbox/useListboxStyles.styles.css.js +9 -0
  47. package/lib/components/Listbox/useListboxStyles.styles.css.js.map +1 -0
  48. package/lib/components/Listbox/useListboxStyles.styles.raw.css.js +9 -0
  49. package/lib/components/Listbox/useListboxStyles.styles.raw.css.js.map +1 -0
  50. package/lib/components/Listbox/useListboxStyles.styles.raw.js.map +1 -1
  51. package/lib/components/Option/Option.js.map +1 -1
  52. package/lib/components/Option/Option.module.css +92 -0
  53. package/lib/components/Option/Option.types.js.map +1 -1
  54. package/lib/components/Option/index.js.map +1 -1
  55. package/lib/components/Option/renderOption.js +2 -2
  56. package/lib/components/Option/renderOption.js.map +1 -1
  57. package/lib/components/Option/useOption.js +1 -2
  58. package/lib/components/Option/useOption.js.map +1 -1
  59. package/lib/components/Option/useOptionStyles.styles.css.js +13 -0
  60. package/lib/components/Option/useOptionStyles.styles.css.js.map +1 -0
  61. package/lib/components/Option/useOptionStyles.styles.raw.css.js +13 -0
  62. package/lib/components/Option/useOptionStyles.styles.raw.css.js.map +1 -0
  63. package/lib/components/Option/useOptionStyles.styles.raw.js.map +1 -1
  64. package/lib/components/OptionGroup/OptionGroup.js.map +1 -1
  65. package/lib/components/OptionGroup/OptionGroup.module.css +23 -0
  66. package/lib/components/OptionGroup/OptionGroup.types.js.map +1 -1
  67. package/lib/components/OptionGroup/index.js.map +1 -1
  68. package/lib/components/OptionGroup/renderOptionGroup.js +2 -2
  69. package/lib/components/OptionGroup/renderOptionGroup.js.map +1 -1
  70. package/lib/components/OptionGroup/useOptionGroup.js.map +1 -1
  71. package/lib/components/OptionGroup/useOptionGroupStyles.styles.css.js +13 -0
  72. package/lib/components/OptionGroup/useOptionGroupStyles.styles.css.js.map +1 -0
  73. package/lib/components/OptionGroup/useOptionGroupStyles.styles.raw.css.js +13 -0
  74. package/lib/components/OptionGroup/useOptionGroupStyles.styles.raw.css.js.map +1 -0
  75. package/lib/components/OptionGroup/useOptionGroupStyles.styles.raw.js.map +1 -1
  76. package/lib/contexts/ComboboxContext.js.map +1 -1
  77. package/lib/contexts/ListboxContext.js.map +1 -1
  78. package/lib/contexts/useComboboxContextValues.js.map +1 -1
  79. package/lib/contexts/useListboxContextValues.js.map +1 -1
  80. package/lib/hooks/useComboboxFilter.js.map +1 -1
  81. package/lib/hooks/useTabsterEscapeIgnore.js.map +1 -1
  82. package/lib/index.js +1 -0
  83. package/lib/index.js.map +1 -1
  84. package/lib/utils/ComboboxBase.types.js.map +1 -1
  85. package/lib/utils/OptionCollection.types.js.map +1 -1
  86. package/lib/utils/Selection.types.js.map +1 -1
  87. package/lib/utils/dropdownKeyActions.js.map +1 -1
  88. package/lib/utils/internalTokens.js.map +1 -1
  89. package/lib/utils/isComboboxOptionElement.js.map +1 -1
  90. package/lib/utils/useComboboxBaseState.js +5 -4
  91. package/lib/utils/useComboboxBaseState.js.map +1 -1
  92. package/lib/utils/useComboboxPositioning.js.map +1 -1
  93. package/lib/utils/useListboxSlot.js.map +1 -1
  94. package/lib/utils/useOptionCollection.js.map +1 -1
  95. package/lib/utils/useSelection.js.map +1 -1
  96. package/lib/utils/useTriggerSlot.js +6 -3
  97. package/lib/utils/useTriggerSlot.js.map +1 -1
  98. package/lib-commonjs/Combobox.cjs +7 -7
  99. package/lib-commonjs/Dropdown.cjs +7 -7
  100. package/lib-commonjs/Listbox.cjs +6 -6
  101. package/lib-commonjs/Option.cjs +7 -7
  102. package/lib-commonjs/OptionGroup.cjs +6 -6
  103. package/lib-commonjs/components/Combobox/Combobox.cjs.map +1 -1
  104. package/lib-commonjs/components/Combobox/Combobox.module.css +233 -0
  105. package/lib-commonjs/components/Combobox/Combobox.types.cjs.map +1 -1
  106. package/lib-commonjs/components/Combobox/index.cjs +7 -7
  107. package/lib-commonjs/components/Combobox/index.cjs.map +1 -1
  108. package/lib-commonjs/components/Combobox/renderCombobox.cjs.map +1 -1
  109. package/lib-commonjs/components/Combobox/useCombobox.cjs +62 -44
  110. package/lib-commonjs/components/Combobox/useCombobox.cjs.map +1 -1
  111. package/lib-commonjs/components/Combobox/useComboboxExpandIconSlot.cjs +46 -0
  112. package/lib-commonjs/components/Combobox/useComboboxExpandIconSlot.cjs.map +1 -0
  113. package/lib-commonjs/components/Combobox/useComboboxStyles.styles.cjs +3 -3
  114. package/lib-commonjs/components/Combobox/useComboboxStyles.styles.cjs.map +1 -1
  115. package/lib-commonjs/components/Combobox/useComboboxStyles.styles.css.cjs +44 -0
  116. package/lib-commonjs/components/Combobox/useComboboxStyles.styles.css.cjs.map +1 -0
  117. package/lib-commonjs/components/Combobox/useComboboxStyles.styles.raw.cjs +3 -3
  118. package/lib-commonjs/components/Combobox/useComboboxStyles.styles.raw.cjs.map +1 -1
  119. package/lib-commonjs/components/Combobox/useComboboxStyles.styles.raw.css.cjs +44 -0
  120. package/lib-commonjs/components/Combobox/useComboboxStyles.styles.raw.css.cjs.map +1 -0
  121. package/lib-commonjs/components/Combobox/useInputTriggerSlot.cjs +3 -2
  122. package/lib-commonjs/components/Combobox/useInputTriggerSlot.cjs.map +1 -1
  123. package/lib-commonjs/components/Dropdown/Dropdown.cjs.map +1 -1
  124. package/lib-commonjs/components/Dropdown/Dropdown.module.css +237 -0
  125. package/lib-commonjs/components/Dropdown/Dropdown.types.cjs.map +1 -1
  126. package/lib-commonjs/components/Dropdown/index.cjs +7 -7
  127. package/lib-commonjs/components/Dropdown/index.cjs.map +1 -1
  128. package/lib-commonjs/components/Dropdown/renderDropdown.cjs.map +1 -1
  129. package/lib-commonjs/components/Dropdown/useButtonTriggerSlot.cjs.map +1 -1
  130. package/lib-commonjs/components/Dropdown/useDropdown.cjs +8 -10
  131. package/lib-commonjs/components/Dropdown/useDropdown.cjs.map +1 -1
  132. package/lib-commonjs/components/Dropdown/useDropdownStyles.styles.cjs +7 -7
  133. package/lib-commonjs/components/Dropdown/useDropdownStyles.styles.cjs.map +1 -1
  134. package/lib-commonjs/components/Dropdown/useDropdownStyles.styles.css.cjs +44 -0
  135. package/lib-commonjs/components/Dropdown/useDropdownStyles.styles.css.cjs.map +1 -0
  136. package/lib-commonjs/components/Dropdown/useDropdownStyles.styles.raw.cjs +5 -5
  137. package/lib-commonjs/components/Dropdown/useDropdownStyles.styles.raw.cjs.map +1 -1
  138. package/lib-commonjs/components/Dropdown/useDropdownStyles.styles.raw.css.cjs +44 -0
  139. package/lib-commonjs/components/Dropdown/useDropdownStyles.styles.raw.css.cjs.map +1 -0
  140. package/lib-commonjs/components/Listbox/Listbox.cjs.map +1 -1
  141. package/lib-commonjs/components/Listbox/Listbox.module.css +13 -0
  142. package/lib-commonjs/components/Listbox/Listbox.types.cjs.map +1 -1
  143. package/lib-commonjs/components/Listbox/index.cjs +6 -6
  144. package/lib-commonjs/components/Listbox/index.cjs.map +1 -1
  145. package/lib-commonjs/components/Listbox/renderListbox.cjs.map +1 -1
  146. package/lib-commonjs/components/Listbox/useListbox.cjs.map +1 -1
  147. package/lib-commonjs/components/Listbox/useListboxStyles.styles.cjs +3 -3
  148. package/lib-commonjs/components/Listbox/useListboxStyles.styles.cjs.map +1 -1
  149. package/lib-commonjs/components/Listbox/useListboxStyles.styles.css.cjs +28 -0
  150. package/lib-commonjs/components/Listbox/useListboxStyles.styles.css.cjs.map +1 -0
  151. package/lib-commonjs/components/Listbox/useListboxStyles.styles.raw.cjs +3 -3
  152. package/lib-commonjs/components/Listbox/useListboxStyles.styles.raw.cjs.map +1 -1
  153. package/lib-commonjs/components/Listbox/useListboxStyles.styles.raw.css.cjs +28 -0
  154. package/lib-commonjs/components/Listbox/useListboxStyles.styles.raw.css.cjs.map +1 -0
  155. package/lib-commonjs/components/Option/Option.cjs.map +1 -1
  156. package/lib-commonjs/components/Option/Option.module.css +92 -0
  157. package/lib-commonjs/components/Option/Option.types.cjs.map +1 -1
  158. package/lib-commonjs/components/Option/index.cjs +7 -7
  159. package/lib-commonjs/components/Option/index.cjs.map +1 -1
  160. package/lib-commonjs/components/Option/renderOption.cjs.map +1 -1
  161. package/lib-commonjs/components/Option/useOption.cjs +4 -5
  162. package/lib-commonjs/components/Option/useOption.cjs.map +1 -1
  163. package/lib-commonjs/components/Option/useOptionStyles.styles.cjs +3 -3
  164. package/lib-commonjs/components/Option/useOptionStyles.styles.cjs.map +1 -1
  165. package/lib-commonjs/components/Option/useOptionStyles.styles.css.cjs +32 -0
  166. package/lib-commonjs/components/Option/useOptionStyles.styles.css.cjs.map +1 -0
  167. package/lib-commonjs/components/Option/useOptionStyles.styles.raw.cjs +3 -3
  168. package/lib-commonjs/components/Option/useOptionStyles.styles.raw.cjs.map +1 -1
  169. package/lib-commonjs/components/Option/useOptionStyles.styles.raw.css.cjs +32 -0
  170. package/lib-commonjs/components/Option/useOptionStyles.styles.raw.css.cjs.map +1 -0
  171. package/lib-commonjs/components/OptionGroup/OptionGroup.cjs.map +1 -1
  172. package/lib-commonjs/components/OptionGroup/OptionGroup.module.css +23 -0
  173. package/lib-commonjs/components/OptionGroup/OptionGroup.types.cjs.map +1 -1
  174. package/lib-commonjs/components/OptionGroup/index.cjs +6 -6
  175. package/lib-commonjs/components/OptionGroup/index.cjs.map +1 -1
  176. package/lib-commonjs/components/OptionGroup/renderOptionGroup.cjs.map +1 -1
  177. package/lib-commonjs/components/OptionGroup/useOptionGroup.cjs.map +1 -1
  178. package/lib-commonjs/components/OptionGroup/useOptionGroupStyles.styles.cjs +3 -3
  179. package/lib-commonjs/components/OptionGroup/useOptionGroupStyles.styles.cjs.map +1 -1
  180. package/lib-commonjs/components/OptionGroup/useOptionGroupStyles.styles.css.cjs +32 -0
  181. package/lib-commonjs/components/OptionGroup/useOptionGroupStyles.styles.css.cjs.map +1 -0
  182. package/lib-commonjs/components/OptionGroup/useOptionGroupStyles.styles.raw.cjs +3 -3
  183. package/lib-commonjs/components/OptionGroup/useOptionGroupStyles.styles.raw.cjs.map +1 -1
  184. package/lib-commonjs/components/OptionGroup/useOptionGroupStyles.styles.raw.css.cjs +32 -0
  185. package/lib-commonjs/components/OptionGroup/useOptionGroupStyles.styles.raw.css.cjs.map +1 -0
  186. package/lib-commonjs/contexts/ComboboxContext.cjs +3 -3
  187. package/lib-commonjs/contexts/ComboboxContext.cjs.map +1 -1
  188. package/lib-commonjs/contexts/ListboxContext.cjs +4 -4
  189. package/lib-commonjs/contexts/ListboxContext.cjs.map +1 -1
  190. package/lib-commonjs/contexts/useComboboxContextValues.cjs.map +1 -1
  191. package/lib-commonjs/contexts/useListboxContextValues.cjs.map +1 -1
  192. package/lib-commonjs/hooks/useComboboxFilter.cjs.map +1 -1
  193. package/lib-commonjs/hooks/useTabsterEscapeIgnore.cjs.map +1 -1
  194. package/lib-commonjs/index.cjs +44 -40
  195. package/lib-commonjs/index.cjs.map +1 -1
  196. package/lib-commonjs/utils/ComboboxBase.types.cjs.map +1 -1
  197. package/lib-commonjs/utils/OptionCollection.types.cjs.map +1 -1
  198. package/lib-commonjs/utils/Selection.types.cjs.map +1 -1
  199. package/lib-commonjs/utils/dropdownKeyActions.cjs.map +1 -1
  200. package/lib-commonjs/utils/internalTokens.cjs.map +1 -1
  201. package/lib-commonjs/utils/isComboboxOptionElement.cjs.map +1 -1
  202. package/lib-commonjs/utils/useComboboxBaseState.cjs +5 -4
  203. package/lib-commonjs/utils/useComboboxBaseState.cjs.map +1 -1
  204. package/lib-commonjs/utils/useComboboxPositioning.cjs.map +1 -1
  205. package/lib-commonjs/utils/useListboxSlot.cjs.map +1 -1
  206. package/lib-commonjs/utils/useOptionCollection.cjs.map +1 -1
  207. package/lib-commonjs/utils/useSelection.cjs.map +1 -1
  208. package/lib-commonjs/utils/useTriggerSlot.cjs +6 -3
  209. package/lib-commonjs/utils/useTriggerSlot.cjs.map +1 -1
  210. package/package.json +19 -19
  211. package/dist/metadata/api/api-root.json +0 -1
  212. package/dist/metadata/index.json +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/utils/useOptionCollection.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { OptionCollectionState, OptionValue } from './OptionCollection.types';\n\n/**\n * A hook for managing a collection of child Options\n */\nexport const useOptionCollection = (): OptionCollectionState => {\n const optionsById = React.useRef(new Map<string, OptionValue>());\n\n const collectionAPI = React.useMemo(() => {\n const getCount = () => optionsById.current.size;\n\n // index searches are no longer used\n const getOptionAtIndex = () => undefined;\n const getIndexOfId = () => -1;\n\n const getOptionById = (id: string) => {\n return optionsById.current.get(id);\n };\n const getOptionsMatchingText = (matcher: (text: string) => boolean) => {\n return Array.from(optionsById.current.values()).filter(({ text }) => matcher(text));\n };\n\n const getOptionsMatchingValue = (matcher: (value: string) => boolean) => {\n const matches: OptionValue[] = [];\n for (const option of optionsById.current.values()) {\n if (matcher(option.value)) {\n matches.push(option);\n }\n }\n\n return matches;\n };\n\n return {\n getCount,\n getOptionAtIndex,\n getIndexOfId,\n getOptionById,\n getOptionsMatchingText,\n getOptionsMatchingValue,\n };\n }, []);\n\n const registerOption = React.useCallback((option: OptionValue) => {\n optionsById.current.set(option.id, option);\n\n return () => optionsById.current.delete(option.id);\n }, []);\n\n return {\n ...collectionAPI,\n // eslint-disable-next-line react-hooks/refs\n options: Array.from(optionsById.current.values()),\n registerOption,\n };\n};\n"],"names":["React","useOptionCollection","optionsById","useRef","Map","collectionAPI","useMemo","getCount","current","size","getOptionAtIndex","undefined","getIndexOfId","getOptionById","id","get","getOptionsMatchingText","matcher","Array","from","values","filter","text","getOptionsMatchingValue","matches","option","value","push","registerOption","useCallback","set","delete","options"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAG/B;;CAEC,GACD,OAAO,MAAMC,sBAAsB;IACjC,MAAMC,cAAcF,MAAMG,MAAM,CAAC,IAAIC;IAErC,MAAMC,gBAAgBL,MAAMM,OAAO,CAAC;QAClC,MAAMC,WAAW,IAAML,YAAYM,OAAO,CAACC,IAAI;QAE/C,oCAAoC;QACpC,MAAMC,mBAAmB,IAAMC;QAC/B,MAAMC,eAAe,IAAM,CAAC;QAE5B,MAAMC,gBAAgB,CAACC;YACrB,OAAOZ,YAAYM,OAAO,CAACO,GAAG,CAACD;QACjC;QACA,MAAME,yBAAyB,CAACC;YAC9B,OAAOC,MAAMC,IAAI,CAACjB,YAAYM,OAAO,CAACY,MAAM,IAAIC,MAAM,CAAC,CAAC,EAAEC,IAAI,EAAE,GAAKL,QAAQK;QAC/E;QAEA,MAAMC,0BAA0B,CAACN;YAC/B,MAAMO,UAAyB,EAAE;YACjC,KAAK,MAAMC,UAAUvB,YAAYM,OAAO,CAACY,MAAM,GAAI;gBACjD,IAAIH,QAAQQ,OAAOC,KAAK,GAAG;oBACzBF,QAAQG,IAAI,CAACF;gBACf;YACF;YAEA,OAAOD;QACT;QAEA,OAAO;YACLjB;YACAG;YACAE;YACAC;YACAG;YACAO;QACF;IACF,GAAG,EAAE;IAEL,MAAMK,iBAAiB5B,MAAM6B,WAAW,CAAC,CAACJ;QACxCvB,YAAYM,OAAO,CAACsB,GAAG,CAACL,OAAOX,EAAE,EAAEW;QAEnC,OAAO,IAAMvB,YAAYM,OAAO,CAACuB,MAAM,CAACN,OAAOX,EAAE;IACnD,GAAG,EAAE;IAEL,OAAO;QACL,GAAGT,aAAa;QAChB,4CAA4C;QAC5C2B,SAASd,MAAMC,IAAI,CAACjB,YAAYM,OAAO,CAACY,MAAM;QAC9CQ;IACF;AACF,EAAE"}
1
+ {"version":3,"sources":["../../src/utils/useOptionCollection.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { OptionCollectionState, OptionValue } from './OptionCollection.types';\n\n/**\n * A hook for managing a collection of child Options\n */\nexport const useOptionCollection = (): OptionCollectionState => {\n const optionsById = React.useRef(new Map<string, OptionValue>());\n\n const collectionAPI = React.useMemo(() => {\n const getCount = () => optionsById.current.size;\n\n // index searches are no longer used\n const getOptionAtIndex = () => undefined;\n const getIndexOfId = () => -1;\n\n const getOptionById = (id: string) => {\n return optionsById.current.get(id);\n };\n const getOptionsMatchingText = (matcher: (text: string) => boolean) => {\n return Array.from(optionsById.current.values()).filter(({ text }) => matcher(text));\n };\n\n const getOptionsMatchingValue = (matcher: (value: string) => boolean) => {\n const matches: OptionValue[] = [];\n for (const option of optionsById.current.values()) {\n if (matcher(option.value)) {\n matches.push(option);\n }\n }\n\n return matches;\n };\n\n return {\n getCount,\n getOptionAtIndex,\n getIndexOfId,\n getOptionById,\n getOptionsMatchingText,\n getOptionsMatchingValue,\n };\n }, []);\n\n const registerOption = React.useCallback((option: OptionValue) => {\n optionsById.current.set(option.id, option);\n\n return () => optionsById.current.delete(option.id);\n }, []);\n\n return {\n ...collectionAPI,\n // eslint-disable-next-line react-hooks/refs\n options: Array.from(optionsById.current.values()),\n registerOption,\n };\n};\n"],"names":["React","useOptionCollection","optionsById","useRef","Map","collectionAPI","useMemo","getCount","current","size","getOptionAtIndex","undefined","getIndexOfId","getOptionById","id","get","getOptionsMatchingText","matcher","Array","from","values","filter","text","getOptionsMatchingValue","matches","option","value","push","registerOption","useCallback","set","delete","options"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAG/B;;CAEC,GACD,OAAO,MAAMC,sBAAsB;IACjC,MAAMC,cAAcF,MAAMG,MAAM,CAAC,IAAIC;IAErC,MAAMC,gBAAgBL,MAAMM,OAAO,CAAC;QAClC,MAAMC,WAAW,IAAML,YAAYM,OAAO,CAACC,IAAI;QAE/C,oCAAoC;QACpC,MAAMC,mBAAmB,IAAMC;QAC/B,MAAMC,eAAe,IAAM,CAAC;QAE5B,MAAMC,gBAAgB,CAACC;YACrB,OAAOZ,YAAYM,OAAO,CAACO,GAAG,CAACD;QACjC;QACA,MAAME,yBAAyB,CAACC;YAC9B,OAAOC,MAAMC,IAAI,CAACjB,YAAYM,OAAO,CAACY,MAAM,IAAIC,MAAM,CAAC,CAAC,EAAEC,IAAI,EAAE,GAAKL,QAAQK;QAC/E;QAEA,MAAMC,0BAA0B,CAACN;YAC/B,MAAMO,UAAyB,EAAE;YACjC,KAAK,MAAMC,UAAUvB,YAAYM,OAAO,CAACY,MAAM,GAAI;gBACjD,IAAIH,QAAQQ,OAAOC,KAAK,GAAG;oBACzBF,QAAQG,IAAI,CAACF;gBACf;YACF;YAEA,OAAOD;QACT;QAEA,OAAO;YACLjB;YACAG;YACAE;YACAC;YACAG;YACAO;QACF;IACF,GAAG,EAAE;IAEL,MAAMK,iBAAiB5B,MAAM6B,WAAW,CAAC,CAACJ;QACxCvB,YAAYM,OAAO,CAACsB,GAAG,CAACL,OAAOX,EAAE,EAAEW;QAEnC,OAAO,IAAMvB,YAAYM,OAAO,CAACuB,MAAM,CAACN,OAAOX,EAAE;IACnD,GAAG,EAAE;IAEL,OAAO;QACL,GAAGT,aAAa;QAChB,4CAA4C;QAC5C2B,SAASd,MAAMC,IAAI,CAACjB,YAAYM,OAAO,CAACY,MAAM;QAC9CQ;IACF;AACF,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/utils/useSelection.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useControllableState } from '@fluentui/react-utilities';\nimport type { OptionValue } from './OptionCollection.types';\nimport type { SelectionEvents, SelectionProps, SelectionState } from './Selection.types';\n\nexport const useSelection = (props: SelectionProps): SelectionState => {\n const { defaultSelectedOptions, multiselect, onOptionSelect } = props;\n\n const [selectedOptions, setSelectedOptions] = useControllableState({\n state: props.selectedOptions,\n defaultState: defaultSelectedOptions,\n initialState: [],\n });\n\n const selectOption = React.useCallback(\n (event: SelectionEvents, option: OptionValue) => {\n // if the option is disabled, do nothing\n if (option.disabled) {\n return;\n }\n\n // for single-select, always return the selected option\n let newSelection = [option.value];\n\n // toggle selected state of the option for multiselect\n if (multiselect) {\n const selectedIndex = selectedOptions.findIndex(o => o === option.value);\n if (selectedIndex > -1) {\n // deselect option\n newSelection = [...selectedOptions.slice(0, selectedIndex), ...selectedOptions.slice(selectedIndex + 1)];\n } else {\n // select option\n newSelection = [...selectedOptions, option.value];\n }\n }\n\n setSelectedOptions(newSelection);\n onOptionSelect?.(event, { optionValue: option.value, optionText: option.text, selectedOptions: newSelection });\n },\n [onOptionSelect, multiselect, selectedOptions, setSelectedOptions],\n );\n\n const clearSelection = (event: SelectionEvents) => {\n setSelectedOptions([]);\n onOptionSelect?.(event, { optionValue: undefined, optionText: undefined, selectedOptions: [] });\n };\n\n return { clearSelection, selectOption, selectedOptions };\n};\n"],"names":["React","useControllableState","useSelection","props","defaultSelectedOptions","multiselect","onOptionSelect","selectedOptions","setSelectedOptions","state","defaultState","initialState","selectOption","useCallback","event","option","disabled","newSelection","value","selectedIndex","findIndex","o","slice","optionValue","optionText","text","clearSelection","undefined"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,oBAAoB,QAAQ,4BAA4B;AAIjE,OAAO,MAAMC,eAAe,CAACC;IAC3B,MAAM,EAAEC,sBAAsB,EAAEC,WAAW,EAAEC,cAAc,EAAE,GAAGH;IAEhE,MAAM,CAACI,iBAAiBC,mBAAmB,GAAGP,qBAAqB;QACjEQ,OAAON,MAAMI,eAAe;QAC5BG,cAAcN;QACdO,cAAc,EAAE;IAClB;IAEA,MAAMC,eAAeZ,MAAMa,WAAW,CACpC,CAACC,OAAwBC;QACvB,wCAAwC;QACxC,IAAIA,OAAOC,QAAQ,EAAE;YACnB;QACF;QAEA,uDAAuD;QACvD,IAAIC,eAAe;YAACF,OAAOG,KAAK;SAAC;QAEjC,sDAAsD;QACtD,IAAIb,aAAa;YACf,MAAMc,gBAAgBZ,gBAAgBa,SAAS,CAACC,CAAAA,IAAKA,MAAMN,OAAOG,KAAK;YACvE,IAAIC,gBAAgB,CAAC,GAAG;gBACtB,kBAAkB;gBAClBF,eAAe;uBAAIV,gBAAgBe,KAAK,CAAC,GAAGH;uBAAmBZ,gBAAgBe,KAAK,CAACH,gBAAgB;iBAAG;YAC1G,OAAO;gBACL,gBAAgB;gBAChBF,eAAe;uBAAIV;oBAAiBQ,OAAOG,KAAK;iBAAC;YACnD;QACF;QAEAV,mBAAmBS;QACnBX,2BAAAA,qCAAAA,eAAiBQ,OAAO;YAAES,aAAaR,OAAOG,KAAK;YAAEM,YAAYT,OAAOU,IAAI;YAAElB,iBAAiBU;QAAa;IAC9G,GACA;QAACX;QAAgBD;QAAaE;QAAiBC;KAAmB;IAGpE,MAAMkB,iBAAiB,CAACZ;QACtBN,mBAAmB,EAAE;QACrBF,2BAAAA,qCAAAA,eAAiBQ,OAAO;YAAES,aAAaI;YAAWH,YAAYG;YAAWpB,iBAAiB,EAAE;QAAC;IAC/F;IAEA,OAAO;QAAEmB;QAAgBd;QAAcL;IAAgB;AACzD,EAAE"}
1
+ {"version":3,"sources":["../../src/utils/useSelection.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useControllableState } from '@fluentui/react-utilities';\nimport type { OptionValue } from './OptionCollection.types';\nimport type { SelectionEvents, SelectionProps, SelectionState } from './Selection.types';\n\nexport const useSelection = (props: SelectionProps): SelectionState => {\n const { defaultSelectedOptions, multiselect, onOptionSelect } = props;\n\n const [selectedOptions, setSelectedOptions] = useControllableState({\n state: props.selectedOptions,\n defaultState: defaultSelectedOptions,\n initialState: [],\n });\n\n const selectOption = React.useCallback(\n (event: SelectionEvents, option: OptionValue) => {\n // if the option is disabled, do nothing\n if (option.disabled) {\n return;\n }\n\n // for single-select, always return the selected option\n let newSelection = [option.value];\n\n // toggle selected state of the option for multiselect\n if (multiselect) {\n const selectedIndex = selectedOptions.findIndex(o => o === option.value);\n if (selectedIndex > -1) {\n // deselect option\n newSelection = [...selectedOptions.slice(0, selectedIndex), ...selectedOptions.slice(selectedIndex + 1)];\n } else {\n // select option\n newSelection = [...selectedOptions, option.value];\n }\n }\n\n setSelectedOptions(newSelection);\n onOptionSelect?.(event, { optionValue: option.value, optionText: option.text, selectedOptions: newSelection });\n },\n [onOptionSelect, multiselect, selectedOptions, setSelectedOptions],\n );\n\n const clearSelection = (event: SelectionEvents) => {\n setSelectedOptions([]);\n onOptionSelect?.(event, { optionValue: undefined, optionText: undefined, selectedOptions: [] });\n };\n\n return { clearSelection, selectOption, selectedOptions };\n};\n"],"names":["React","useControllableState","useSelection","props","defaultSelectedOptions","multiselect","onOptionSelect","selectedOptions","setSelectedOptions","state","defaultState","initialState","selectOption","useCallback","event","option","disabled","newSelection","value","selectedIndex","findIndex","o","slice","optionValue","optionText","text","clearSelection","undefined"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,oBAAoB,QAAQ,4BAA4B;AAIjE,OAAO,MAAMC,eAAe,CAACC;IAC3B,MAAM,EAAEC,sBAAsB,EAAEC,WAAW,EAAEC,cAAc,EAAE,GAAGH;IAEhE,MAAM,CAACI,iBAAiBC,mBAAmB,GAAGP,qBAAqB;QACjEQ,OAAON,MAAMI,eAAe;QAC5BG,cAAcN;QACdO,cAAc,EAAE;IAClB;IAEA,MAAMC,eAAeZ,MAAMa,WAAW,CACpC,CAACC,OAAwBC;QACvB,wCAAwC;QACxC,IAAIA,OAAOC,QAAQ,EAAE;YACnB;QACF;QAEA,uDAAuD;QACvD,IAAIC,eAAe;YAACF,OAAOG,KAAK;SAAC;QAEjC,sDAAsD;QACtD,IAAIb,aAAa;YACf,MAAMc,gBAAgBZ,gBAAgBa,SAAS,CAACC,CAAAA,IAAKA,MAAMN,OAAOG,KAAK;YACvE,IAAIC,gBAAgB,CAAC,GAAG;gBACtB,kBAAkB;gBAClBF,eAAe;uBAAIV,gBAAgBe,KAAK,CAAC,GAAGH;uBAAmBZ,gBAAgBe,KAAK,CAACH,gBAAgB;iBAAG;YAC1G,OAAO;gBACL,gBAAgB;gBAChBF,eAAe;uBAAIV;oBAAiBQ,OAAOG,KAAK;iBAAC;YACnD;QACF;QAEAV,mBAAmBS;QACnBX,2BAAAA,qCAAAA,eAAiBQ,OAAO;YAAES,aAAaR,OAAOG,KAAK;YAAEM,YAAYT,OAAOU,IAAI;YAAElB,iBAAiBU;QAAa;IAC9G,GACA;QAACX;QAAgBD;QAAaE;QAAiBC;KAAmB;IAGpE,MAAMkB,iBAAiB,CAACZ;QACtBN,mBAAmB,EAAE;QACrBF,2BAAAA,qCAAAA,eAAiBQ,OAAO;YAAES,aAAaI;YAAWH,YAAYG;YAAWpB,iBAAiB,EAAE;QAAC;IAC/F;IAEA,OAAO;QAAEmB;QAAgBd;QAAcL;IAAgB;AACzD,EAAE"}
@@ -7,7 +7,7 @@ import { getDropdownActionFromKey } from "./dropdownKeyActions.js";
7
7
  * Shared trigger behaviour for combobox and dropdown
8
8
  * @returns trigger slot with desired behaviour and props
9
9
  */ export function useTriggerSlot(triggerSlotFromProp, ref, options) {
10
- const { state: { open, setOpen, setHasFocus }, defaultProps, elementType, activeDescendantController } = options;
10
+ const { state: { open, setOpen, setHasFocus }, defaultProps, elementType, activeDescendantController, shouldCloseOnBlur } = options;
11
11
  const trigger = slot.always(triggerSlotFromProp, {
12
12
  defaultProps: {
13
13
  type: 'text',
@@ -22,8 +22,11 @@ import { getDropdownActionFromKey } from "./dropdownKeyActions.js";
22
22
  trigger.ref = useMergedRefs(triggerRef, trigger.ref, ref);
23
23
  // the trigger should open/close the popup on click or blur
24
24
  trigger.onBlur = mergeCallbacks((event)=>{
25
- setOpen(event, false);
26
- setHasFocus(false);
25
+ var _ref;
26
+ if ((_ref = shouldCloseOnBlur === null || shouldCloseOnBlur === void 0 ? void 0 : shouldCloseOnBlur(event)) !== null && _ref !== void 0 ? _ref : true) {
27
+ setOpen(event, false);
28
+ setHasFocus(false);
29
+ }
27
30
  }, trigger.onBlur);
28
31
  trigger.onFocus = mergeCallbacks((event)=>{
29
32
  if (event.target === event.currentTarget) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/utils/useTriggerSlot.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useSetKeyboardNavigation } from '@fluentui/react-tabster';\nimport type { ActiveDescendantImperativeRef } from '@fluentui/react-aria';\nimport { mergeCallbacks, slot, useEventCallback, useMergedRefs } from '@fluentui/react-utilities';\nimport type { ExtractSlotProps, Slot, SlotComponentType } from '@fluentui/react-utilities';\nimport { getDropdownActionFromKey } from '../utils/dropdownKeyActions';\nimport type { ComboboxBaseState } from './ComboboxBase.types';\nimport type { OptionValue } from './OptionCollection.types';\n\nexport type UseTriggerSlotState = Pick<\n ComboboxBaseState,\n 'open' | 'getOptionById' | 'selectOption' | 'setOpen' | 'multiselect' | 'setHasFocus'\n>;\n\ntype UseTriggerSlotOptions = {\n state: UseTriggerSlotState;\n defaultProps: unknown;\n activeDescendantController: ActiveDescendantImperativeRef;\n};\n\nexport function useTriggerSlot(\n triggerSlotFromProp: NonNullable<Slot<'button'>>,\n ref: React.Ref<HTMLButtonElement>,\n options: UseTriggerSlotOptions & { elementType: 'button' },\n): SlotComponentType<ExtractSlotProps<Slot<'button'>>>;\n\nexport function useTriggerSlot(\n triggerSlotFromProp: NonNullable<Slot<'input'>>,\n ref: React.Ref<HTMLInputElement>,\n options: UseTriggerSlotOptions & { elementType: 'input' },\n): SlotComponentType<ExtractSlotProps<Slot<'input'>>>;\n\n/**\n * Shared trigger behaviour for combobox and dropdown\n * @returns trigger slot with desired behaviour and props\n */\nexport function useTriggerSlot(\n triggerSlotFromProp: NonNullable<Slot<'input'>> | NonNullable<Slot<'button'>>,\n ref: React.Ref<HTMLButtonElement> | React.Ref<HTMLInputElement>,\n options: UseTriggerSlotOptions & { elementType: 'input' | 'button' },\n): SlotComponentType<ExtractSlotProps<Slot<'button'>>> | SlotComponentType<ExtractSlotProps<Slot<'input'>>> {\n const {\n state: { open, setOpen, setHasFocus },\n defaultProps,\n elementType,\n activeDescendantController,\n } = options;\n\n const trigger = slot.always(triggerSlotFromProp, {\n defaultProps: {\n type: 'text',\n 'aria-expanded': open,\n role: 'combobox',\n ...(typeof defaultProps === 'object' && defaultProps),\n },\n elementType,\n });\n\n // handle trigger focus/blur\n const triggerRef = React.useRef<HTMLButtonElement | HTMLInputElement>(null);\n trigger.ref = useMergedRefs(triggerRef, trigger.ref, ref) as React.Ref<HTMLButtonElement & HTMLInputElement>;\n\n // the trigger should open/close the popup on click or blur\n trigger.onBlur = mergeCallbacks((event: React.FocusEvent<HTMLButtonElement> & React.FocusEvent<HTMLInputElement>) => {\n setOpen(event, false);\n setHasFocus(false);\n }, trigger.onBlur);\n\n trigger.onFocus = mergeCallbacks(\n (event: React.FocusEvent<HTMLButtonElement> & React.FocusEvent<HTMLInputElement>) => {\n if (event.target === event.currentTarget) {\n setHasFocus(true);\n }\n },\n trigger.onFocus,\n );\n trigger.onClick = mergeCallbacks(\n (event: React.MouseEvent<HTMLButtonElement> & React.MouseEvent<HTMLInputElement>) => {\n setOpen(event, !open);\n },\n trigger.onClick,\n );\n\n // handle combobox keyboard interaction\n trigger.onKeyDown = mergeCallbacks(\n useTriggerKeydown({ activeDescendantController, ...options.state }),\n trigger.onKeyDown,\n );\n\n return trigger as SlotComponentType<ExtractSlotProps<Slot<'input'>>>;\n}\n\nfunction useTriggerKeydown(\n options: {\n activeDescendantController: ActiveDescendantImperativeRef;\n } & Pick<UseTriggerSlotState, 'setOpen' | 'selectOption' | 'getOptionById' | 'multiselect' | 'open'>,\n) {\n const { activeDescendantController, getOptionById, setOpen, selectOption, multiselect, open } = options;\n\n const getActiveOption = React.useCallback(() => {\n const activeOptionId = activeDescendantController.active();\n return activeOptionId ? getOptionById(activeOptionId) : undefined;\n }, [activeDescendantController, getOptionById]);\n\n const first = () => {\n activeDescendantController.first();\n };\n\n const last = () => {\n activeDescendantController.last();\n };\n\n const next = (activeOption: OptionValue | undefined) => {\n if (activeOption) {\n activeDescendantController.next();\n } else {\n activeDescendantController.first();\n }\n };\n\n const previous = (activeOption: OptionValue | undefined) => {\n if (activeOption) {\n activeDescendantController.prev();\n } else {\n activeDescendantController.first();\n }\n };\n\n const pageUp = () => {\n for (let i = 0; i < 10; i++) {\n activeDescendantController.prev();\n }\n };\n\n const pageDown = () => {\n for (let i = 0; i < 10; i++) {\n activeDescendantController.next();\n }\n };\n\n const setKeyboardNavigation = useSetKeyboardNavigation();\n return useEventCallback((e: React.KeyboardEvent<HTMLInputElement> & React.KeyboardEvent<HTMLButtonElement>) => {\n const action = getDropdownActionFromKey(e, { open, multiselect });\n const activeOption = getActiveOption();\n\n switch (action) {\n case 'First':\n case 'Last':\n case 'Next':\n case 'Previous':\n case 'PageDown':\n case 'PageUp':\n case 'Open':\n case 'Close':\n case 'CloseSelect':\n case 'Select':\n e.preventDefault();\n break;\n }\n\n setKeyboardNavigation(true);\n\n switch (action) {\n case 'First':\n first();\n break;\n case 'Last':\n last();\n break;\n case 'Next':\n next(activeOption);\n break;\n case 'Previous':\n previous(activeOption);\n break;\n case 'PageDown':\n pageDown();\n break;\n case 'PageUp':\n pageUp();\n break;\n case 'Open':\n setOpen(e, true);\n break;\n case 'Close':\n // stop propagation for escape key to avoid dismissing any parent popups\n e.stopPropagation();\n setOpen(e, false);\n break;\n case 'CloseSelect':\n !multiselect && !activeOption?.disabled && setOpen(e, false);\n // fallthrough\n case 'Select':\n activeOption && selectOption(e, activeOption);\n break;\n case 'Tab':\n !multiselect && activeOption && selectOption(e, activeOption);\n break;\n }\n });\n}\n"],"names":["React","useSetKeyboardNavigation","mergeCallbacks","slot","useEventCallback","useMergedRefs","getDropdownActionFromKey","useTriggerSlot","triggerSlotFromProp","ref","options","state","open","setOpen","setHasFocus","defaultProps","elementType","activeDescendantController","trigger","always","type","role","triggerRef","useRef","onBlur","event","onFocus","target","currentTarget","onClick","onKeyDown","useTriggerKeydown","getOptionById","selectOption","multiselect","getActiveOption","useCallback","activeOptionId","active","undefined","first","last","next","activeOption","previous","prev","pageUp","i","pageDown","setKeyboardNavigation","e","action","preventDefault","stopPropagation","disabled"],"mappings":"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"}
1
+ {"version":3,"sources":["../../src/utils/useTriggerSlot.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useSetKeyboardNavigation } from '@fluentui/react-tabster';\nimport type { ActiveDescendantImperativeRef } from '@fluentui/react-aria';\nimport { mergeCallbacks, slot, useEventCallback, useMergedRefs } from '@fluentui/react-utilities';\nimport type { ExtractSlotProps, Slot, SlotComponentType } from '@fluentui/react-utilities';\nimport { getDropdownActionFromKey } from '../utils/dropdownKeyActions';\nimport type { ComboboxBaseState } from './ComboboxBase.types';\nimport type { OptionValue } from './OptionCollection.types';\n\nexport type UseTriggerSlotState = Pick<\n ComboboxBaseState,\n 'open' | 'getOptionById' | 'selectOption' | 'setOpen' | 'multiselect' | 'setHasFocus'\n>;\n\nexport type UseTriggerSlotOptions = {\n state: UseTriggerSlotState;\n defaultProps: unknown;\n activeDescendantController: ActiveDescendantImperativeRef;\n shouldCloseOnBlur?: (event: React.FocusEvent<HTMLButtonElement> & React.FocusEvent<HTMLInputElement>) => boolean;\n};\n\nexport function useTriggerSlot(\n triggerSlotFromProp: NonNullable<Slot<'button'>>,\n ref: React.Ref<HTMLButtonElement>,\n options: UseTriggerSlotOptions & { elementType: 'button' },\n): SlotComponentType<ExtractSlotProps<Slot<'button'>>>;\n\nexport function useTriggerSlot(\n triggerSlotFromProp: NonNullable<Slot<'input'>>,\n ref: React.Ref<HTMLInputElement>,\n options: UseTriggerSlotOptions & { elementType: 'input' },\n): SlotComponentType<ExtractSlotProps<Slot<'input'>>>;\n\n/**\n * Shared trigger behaviour for combobox and dropdown\n * @returns trigger slot with desired behaviour and props\n */\nexport function useTriggerSlot(\n triggerSlotFromProp: NonNullable<Slot<'input'>> | NonNullable<Slot<'button'>>,\n ref: React.Ref<HTMLButtonElement> | React.Ref<HTMLInputElement>,\n options: UseTriggerSlotOptions & { elementType: 'input' | 'button' },\n): SlotComponentType<ExtractSlotProps<Slot<'button'>>> | SlotComponentType<ExtractSlotProps<Slot<'input'>>> {\n const {\n state: { open, setOpen, setHasFocus },\n defaultProps,\n elementType,\n activeDescendantController,\n shouldCloseOnBlur,\n } = options;\n\n const trigger = slot.always(triggerSlotFromProp, {\n defaultProps: {\n type: 'text',\n 'aria-expanded': open,\n role: 'combobox',\n ...(typeof defaultProps === 'object' && defaultProps),\n },\n elementType,\n });\n\n // handle trigger focus/blur\n const triggerRef = React.useRef<HTMLButtonElement | HTMLInputElement>(null);\n trigger.ref = useMergedRefs(triggerRef, trigger.ref, ref) as React.Ref<HTMLButtonElement & HTMLInputElement>;\n\n // the trigger should open/close the popup on click or blur\n trigger.onBlur = mergeCallbacks((event: React.FocusEvent<HTMLButtonElement> & React.FocusEvent<HTMLInputElement>) => {\n if (shouldCloseOnBlur?.(event) ?? true) {\n setOpen(event, false);\n setHasFocus(false);\n }\n }, trigger.onBlur);\n\n trigger.onFocus = mergeCallbacks(\n (event: React.FocusEvent<HTMLButtonElement> & React.FocusEvent<HTMLInputElement>) => {\n if (event.target === event.currentTarget) {\n setHasFocus(true);\n }\n },\n trigger.onFocus,\n );\n trigger.onClick = mergeCallbacks(\n (event: React.MouseEvent<HTMLButtonElement> & React.MouseEvent<HTMLInputElement>) => {\n setOpen(event, !open);\n },\n trigger.onClick,\n );\n\n // handle combobox keyboard interaction\n trigger.onKeyDown = mergeCallbacks(\n useTriggerKeydown({ activeDescendantController, ...options.state }),\n trigger.onKeyDown,\n );\n\n return trigger as SlotComponentType<ExtractSlotProps<Slot<'input'>>>;\n}\n\nfunction useTriggerKeydown(\n options: {\n activeDescendantController: ActiveDescendantImperativeRef;\n } & Pick<UseTriggerSlotState, 'setOpen' | 'selectOption' | 'getOptionById' | 'multiselect' | 'open'>,\n) {\n const { activeDescendantController, getOptionById, setOpen, selectOption, multiselect, open } = options;\n\n const getActiveOption = React.useCallback(() => {\n const activeOptionId = activeDescendantController.active();\n return activeOptionId ? getOptionById(activeOptionId) : undefined;\n }, [activeDescendantController, getOptionById]);\n\n const first = () => {\n activeDescendantController.first();\n };\n\n const last = () => {\n activeDescendantController.last();\n };\n\n const next = (activeOption: OptionValue | undefined) => {\n if (activeOption) {\n activeDescendantController.next();\n } else {\n activeDescendantController.first();\n }\n };\n\n const previous = (activeOption: OptionValue | undefined) => {\n if (activeOption) {\n activeDescendantController.prev();\n } else {\n activeDescendantController.first();\n }\n };\n\n const pageUp = () => {\n for (let i = 0; i < 10; i++) {\n activeDescendantController.prev();\n }\n };\n\n const pageDown = () => {\n for (let i = 0; i < 10; i++) {\n activeDescendantController.next();\n }\n };\n\n const setKeyboardNavigation = useSetKeyboardNavigation();\n return useEventCallback((e: React.KeyboardEvent<HTMLInputElement> & React.KeyboardEvent<HTMLButtonElement>) => {\n const action = getDropdownActionFromKey(e, { open, multiselect });\n const activeOption = getActiveOption();\n\n switch (action) {\n case 'First':\n case 'Last':\n case 'Next':\n case 'Previous':\n case 'PageDown':\n case 'PageUp':\n case 'Open':\n case 'Close':\n case 'CloseSelect':\n case 'Select':\n e.preventDefault();\n break;\n }\n\n setKeyboardNavigation(true);\n\n switch (action) {\n case 'First':\n first();\n break;\n case 'Last':\n last();\n break;\n case 'Next':\n next(activeOption);\n break;\n case 'Previous':\n previous(activeOption);\n break;\n case 'PageDown':\n pageDown();\n break;\n case 'PageUp':\n pageUp();\n break;\n case 'Open':\n setOpen(e, true);\n break;\n case 'Close':\n // stop propagation for escape key to avoid dismissing any parent popups\n e.stopPropagation();\n setOpen(e, false);\n break;\n case 'CloseSelect':\n !multiselect && !activeOption?.disabled && setOpen(e, false);\n // fallthrough\n case 'Select':\n activeOption && selectOption(e, activeOption);\n break;\n case 'Tab':\n !multiselect && activeOption && selectOption(e, activeOption);\n break;\n }\n });\n}\n"],"names":["React","useSetKeyboardNavigation","mergeCallbacks","slot","useEventCallback","useMergedRefs","getDropdownActionFromKey","useTriggerSlot","triggerSlotFromProp","ref","options","state","open","setOpen","setHasFocus","defaultProps","elementType","activeDescendantController","shouldCloseOnBlur","trigger","always","type","role","triggerRef","useRef","onBlur","event","onFocus","target","currentTarget","onClick","onKeyDown","useTriggerKeydown","getOptionById","selectOption","multiselect","getActiveOption","useCallback","activeOptionId","active","undefined","first","last","next","activeOption","previous","prev","pageUp","i","pageDown","setKeyboardNavigation","e","action","preventDefault","stopPropagation","disabled"],"mappings":"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"}
@@ -5,26 +5,26 @@ Object.defineProperty(exports, "__esModule", {
5
5
  function _export(target, all) {
6
6
  for(var name in all)Object.defineProperty(target, name, {
7
7
  enumerable: true,
8
- get: all[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- Combobox: function() {
12
+ get Combobox () {
13
13
  return _index.Combobox;
14
14
  },
15
- comboboxClassNames: function() {
15
+ get comboboxClassNames () {
16
16
  return _index.comboboxClassNames;
17
17
  },
18
- renderCombobox_unstable: function() {
18
+ get renderCombobox_unstable () {
19
19
  return _index.renderCombobox_unstable;
20
20
  },
21
- useComboboxBase_unstable: function() {
21
+ get useComboboxBase_unstable () {
22
22
  return _index.useComboboxBase_unstable;
23
23
  },
24
- useComboboxStyles_unstable: function() {
24
+ get useComboboxStyles_unstable () {
25
25
  return _index.useComboboxStyles_unstable;
26
26
  },
27
- useCombobox_unstable: function() {
27
+ get useCombobox_unstable () {
28
28
  return _index.useCombobox_unstable;
29
29
  }
30
30
  });
@@ -5,26 +5,26 @@ Object.defineProperty(exports, "__esModule", {
5
5
  function _export(target, all) {
6
6
  for(var name in all)Object.defineProperty(target, name, {
7
7
  enumerable: true,
8
- get: all[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- Dropdown: function() {
12
+ get Dropdown () {
13
13
  return _index.Dropdown;
14
14
  },
15
- dropdownClassNames: function() {
15
+ get dropdownClassNames () {
16
16
  return _index.dropdownClassNames;
17
17
  },
18
- renderDropdown_unstable: function() {
18
+ get renderDropdown_unstable () {
19
19
  return _index.renderDropdown_unstable;
20
20
  },
21
- useDropdownBase_unstable: function() {
21
+ get useDropdownBase_unstable () {
22
22
  return _index.useDropdownBase_unstable;
23
23
  },
24
- useDropdownStyles_unstable: function() {
24
+ get useDropdownStyles_unstable () {
25
25
  return _index.useDropdownStyles_unstable;
26
26
  },
27
- useDropdown_unstable: function() {
27
+ get useDropdown_unstable () {
28
28
  return _index.useDropdown_unstable;
29
29
  }
30
30
  });
@@ -5,23 +5,23 @@ Object.defineProperty(exports, "__esModule", {
5
5
  function _export(target, all) {
6
6
  for(var name in all)Object.defineProperty(target, name, {
7
7
  enumerable: true,
8
- get: all[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- Listbox: function() {
12
+ get Listbox () {
13
13
  return _index.Listbox;
14
14
  },
15
- listboxClassNames: function() {
15
+ get listboxClassNames () {
16
16
  return _index.listboxClassNames;
17
17
  },
18
- renderListbox_unstable: function() {
18
+ get renderListbox_unstable () {
19
19
  return _index.renderListbox_unstable;
20
20
  },
21
- useListboxStyles_unstable: function() {
21
+ get useListboxStyles_unstable () {
22
22
  return _index.useListboxStyles_unstable;
23
23
  },
24
- useListbox_unstable: function() {
24
+ get useListbox_unstable () {
25
25
  return _index.useListbox_unstable;
26
26
  }
27
27
  });
@@ -5,26 +5,26 @@ Object.defineProperty(exports, "__esModule", {
5
5
  function _export(target, all) {
6
6
  for(var name in all)Object.defineProperty(target, name, {
7
7
  enumerable: true,
8
- get: all[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- Option: function() {
12
+ get Option () {
13
13
  return _index.Option;
14
14
  },
15
- optionClassNames: function() {
15
+ get optionClassNames () {
16
16
  return _index.optionClassNames;
17
17
  },
18
- renderOption_unstable: function() {
18
+ get renderOption_unstable () {
19
19
  return _index.renderOption_unstable;
20
20
  },
21
- useOptionBase_unstable: function() {
21
+ get useOptionBase_unstable () {
22
22
  return _index.useOptionBase_unstable;
23
23
  },
24
- useOptionStyles_unstable: function() {
24
+ get useOptionStyles_unstable () {
25
25
  return _index.useOptionStyles_unstable;
26
26
  },
27
- useOption_unstable: function() {
27
+ get useOption_unstable () {
28
28
  return _index.useOption_unstable;
29
29
  }
30
30
  });
@@ -5,23 +5,23 @@ Object.defineProperty(exports, "__esModule", {
5
5
  function _export(target, all) {
6
6
  for(var name in all)Object.defineProperty(target, name, {
7
7
  enumerable: true,
8
- get: all[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- OptionGroup: function() {
12
+ get OptionGroup () {
13
13
  return _index.OptionGroup;
14
14
  },
15
- optionGroupClassNames: function() {
15
+ get optionGroupClassNames () {
16
16
  return _index.optionGroupClassNames;
17
17
  },
18
- renderOptionGroup_unstable: function() {
18
+ get renderOptionGroup_unstable () {
19
19
  return _index.renderOptionGroup_unstable;
20
20
  },
21
- useOptionGroupStyles_unstable: function() {
21
+ get useOptionGroupStyles_unstable () {
22
22
  return _index.useOptionGroupStyles_unstable;
23
23
  },
24
- useOptionGroup_unstable: function() {
24
+ get useOptionGroup_unstable () {
25
25
  return _index.useOptionGroup_unstable;
26
26
  }
27
27
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Combobox/Combobox.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useCombobox_unstable } from './useCombobox';\nimport { renderCombobox_unstable } from './renderCombobox';\nimport { useComboboxStyles_unstable } from './useComboboxStyles.styles';\nimport type { ComboboxProps } from './Combobox.types';\nimport { useComboboxContextValues } from '../../contexts/useComboboxContextValues';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Combobox component: a selection control that allows users to choose from a set of possible options\n */\nexport const Combobox: ForwardRefComponent<ComboboxProps> = React.forwardRef((props, ref) => {\n const state = useCombobox_unstable(props, ref);\n const contextValues = useComboboxContextValues(state);\n\n useComboboxStyles_unstable(state);\n\n useCustomStyleHook_unstable('useComboboxStyles_unstable')(state);\n\n return renderCombobox_unstable(state, contextValues);\n});\n\nCombobox.displayName = 'Combobox';\n"],"names":["React","useCombobox_unstable","renderCombobox_unstable","useComboboxStyles_unstable","useComboboxContextValues","useCustomStyleHook_unstable","Combobox","forwardRef","props","ref","state","contextValues","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;6BACM,mBAAgB;gCACb,sBAAmB;yCAChB,gCAA6B;0CAE/B,6CAA0C;qCAEvC,kCAAkC;AAKvE,MAAMM,WAAAA,WAAAA,GAA+CN,OAAMO,UAAU,CAAC,CAACC,OAAOC;IACnF,MAAMC,YAAQT,iCAAAA,EAAqBO,OAAOC;IAC1C,MAAME,oBAAgBP,kDAAAA,EAAyBM;QAE/CP,mDAAAA,EAA2BO;QAE3BL,gDAAAA,EAA4B,8BAA8BK;IAE1D,WAAOR,uCAAAA,EAAwBQ,OAAOC;AACxC,GAAG;AAEHL,SAASM,WAAW,GAAG"}
1
+ {"version":3,"sources":["../../../src/components/Combobox/Combobox.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useCombobox_unstable } from './useCombobox';\nimport { renderCombobox_unstable } from './renderCombobox';\nimport { useComboboxStyles_unstable } from './useComboboxStyles.styles';\nimport type { ComboboxProps } from './Combobox.types';\nimport { useComboboxContextValues } from '../../contexts/useComboboxContextValues';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Combobox component: a selection control that allows users to choose from a set of possible options\n */\nexport const Combobox: ForwardRefComponent<ComboboxProps> = React.forwardRef((props, ref) => {\n const state = useCombobox_unstable(props, ref);\n const contextValues = useComboboxContextValues(state);\n\n useComboboxStyles_unstable(state);\n\n useCustomStyleHook_unstable('useComboboxStyles_unstable')(state);\n\n return renderCombobox_unstable(state, contextValues);\n});\n\nCombobox.displayName = 'Combobox';\n"],"names":["React","useCombobox_unstable","renderCombobox_unstable","useComboboxStyles_unstable","useComboboxContextValues","useCustomStyleHook_unstable","Combobox","forwardRef","props","ref","state","contextValues","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;6BACM,mBAAgB;gCACb,sBAAmB;yCAChB,gCAA6B;0CAE/B,6CAA0C;qCAEvC,kCAAkC;AAKvE,MAAMM,WAAAA,WAAAA,GAA+CN,OAAMO,UAAU,CAAC,CAACC,OAAOC;IACnF,MAAMC,YAAQT,iCAAAA,EAAqBO,OAAOC;IAC1C,MAAME,oBAAgBP,kDAAAA,EAAyBM;QAE/CP,mDAAAA,EAA2BO;QAE3BL,gDAAAA,EAA4B,8BAA8BK;IAE1D,WAAOR,uCAAAA,EAAwBQ,OAAOC;AACxC,GAAG;AAEHL,SAASM,WAAW,GAAG"}
@@ -0,0 +1,233 @@
1
+ @layer fluentui {
2
+ .root {
3
+ align-items: center;
4
+ border-radius: var(--borderRadiusMedium);
5
+ box-sizing: border-box;
6
+ column-gap: var(--spacingHorizontalXXS);
7
+ display: inline-grid;
8
+ grid-template-columns: 1fr auto;
9
+ justify-content: space-between;
10
+ min-width: 250px;
11
+ position: relative;
12
+ vertical-align: middle;
13
+ }
14
+ .root:focus-within {
15
+ outline-width: 2px;
16
+ outline-style: solid;
17
+ outline-color: transparent;
18
+ }
19
+ .root::after {
20
+ box-sizing: border-box;
21
+ content: '';
22
+ position: absolute;
23
+ inset-inline-start: -1px;
24
+ bottom: -1px;
25
+ inset-inline-end: -1px;
26
+ height: max(2px, var(--borderRadiusMedium));
27
+ border-bottom-left-radius: var(--borderRadiusMedium);
28
+ border-bottom-right-radius: var(--borderRadiusMedium);
29
+ border-bottom: var(--strokeWidthThick) solid var(--colorCompoundBrandStroke);
30
+ clip-path: inset(calc(100% - 2px) 0 0 0);
31
+ transform: scaleX(0);
32
+ transition-property: transform;
33
+ transition-duration: var(--durationUltraFast);
34
+ transition-delay: var(--curveAccelerateMid);
35
+ }
36
+ @media screen and (prefers-reduced-motion: reduce) {
37
+ .root::after {
38
+ transition-duration: 0.01ms;
39
+ transition-delay: 0.01ms;
40
+ }
41
+ }
42
+ .root:focus-within::after {
43
+ transform: scaleX(1);
44
+ transition-property: transform;
45
+ transition-duration: var(--durationNormal);
46
+ transition-delay: var(--curveDecelerateMid);
47
+ }
48
+ @media screen and (prefers-reduced-motion: reduce) {
49
+ .root:focus-within::after {
50
+ transition-duration: 0.01ms;
51
+ transition-delay: 0.01ms;
52
+ }
53
+ }
54
+ .root:focus-within:active::after {
55
+ border-bottom-color: var(--colorCompoundBrandStrokePressed);
56
+ }
57
+ .listbox {
58
+ box-shadow: var(--shadow16);
59
+ border-radius: var(--borderRadiusMedium);
60
+ max-height: 80vh;
61
+ box-sizing: border-box;
62
+ }
63
+ .collapsed {
64
+ display: none;
65
+ }
66
+ .inline {
67
+ z-index: 1;
68
+ }
69
+ .small {
70
+ height: 24px;
71
+ padding-inline-end: var(--spacingHorizontalSNudge);
72
+ }
73
+ .medium {
74
+ height: 32px;
75
+ padding-inline-end: var(--spacingHorizontalMNudge);
76
+ }
77
+ .large {
78
+ column-gap: var(--spacingHorizontalSNudge);
79
+ height: 40px;
80
+ padding-inline-end: var(--spacingHorizontalM);
81
+ }
82
+ .outline {
83
+ background-color: var(--colorNeutralBackground1);
84
+ border: var(--strokeWidthThin) solid var(--colorNeutralStroke1);
85
+ border-bottom-color: var(--colorNeutralStrokeAccessible);
86
+ }
87
+ .outline:where(:not(.disabled)):focus-within {
88
+ border-color: var(--colorNeutralStroke1Pressed);
89
+ border-bottom-color: var(--colorNeutralStrokeAccessiblePressed);
90
+ }
91
+ .outline:where(:not(.disabled)):hover {
92
+ border-color: var(--colorNeutralStroke1Hover);
93
+ border-bottom-color: var(--colorNeutralStrokeAccessibleHover);
94
+ }
95
+ .outline:where(:not(.disabled)):active {
96
+ border-color: var(--colorNeutralStroke1Pressed);
97
+ border-bottom-color: var(--colorNeutralStrokeAccessiblePressed);
98
+ }
99
+ .underline {
100
+ background-color: var(--colorTransparentBackground);
101
+ border-bottom: var(--strokeWidthThin) solid var(--colorNeutralStrokeAccessible);
102
+ border-radius: 0;
103
+ }
104
+ .filled-lighter {
105
+ background-color: var(--colorNeutralBackground1);
106
+ border: var(--strokeWidthThin) solid var(--colorTransparentStroke);
107
+ }
108
+ .filled-darker {
109
+ background-color: var(--colorNeutralBackground3);
110
+ border: var(--strokeWidthThin) solid var(--colorTransparentStroke);
111
+ }
112
+ .invalid:where(:not(.underline)):not(:focus-within),
113
+ .invalid:where(:not(.underline)):hover:not(:focus-within) {
114
+ border-color: var(--colorPaletteRedBorder2);
115
+ }
116
+ .invalid:where(.underline):not(:focus-within),
117
+ .invalid:where(.underline):hover:not(:focus-within) {
118
+ border-bottom-color: var(--colorPaletteRedBorder2);
119
+ }
120
+ .disabled {
121
+ cursor: not-allowed;
122
+ background-color: var(--colorTransparentBackground);
123
+ border-color: var(--colorNeutralStrokeDisabled);
124
+ }
125
+ @media (forced-colors: active) {
126
+ .disabled {
127
+ border-color: GrayText;
128
+ }
129
+ }
130
+ .input {
131
+ align-self: stretch;
132
+ background-color: var(--colorTransparentBackground);
133
+ border: none;
134
+ color: var(--colorNeutralForeground1);
135
+ font-family: var(--fontFamilyBase);
136
+ }
137
+ .input:focus {
138
+ outline-style: none;
139
+ }
140
+ .input::placeholder {
141
+ color: var(--colorNeutralForeground4);
142
+ opacity: 1;
143
+ }
144
+ :where(.small) > .input {
145
+ font-family: var(--fontFamilyBase);
146
+ font-size: var(--fontSizeBase200);
147
+ font-weight: var(--fontWeightRegular);
148
+ line-height: var(--lineHeightBase200);
149
+ padding: 0;
150
+ padding-inline-start: calc(var(--spacingHorizontalSNudge) + var(--spacingHorizontalXXS));
151
+ }
152
+ :where(.medium) > .input {
153
+ font-family: var(--fontFamilyBase);
154
+ font-size: var(--fontSizeBase300);
155
+ font-weight: var(--fontWeightRegular);
156
+ line-height: var(--lineHeightBase300);
157
+ padding: 0;
158
+ padding-inline-start: calc(var(--spacingHorizontalMNudge) + var(--spacingHorizontalXXS));
159
+ }
160
+ :where(.large) > .input {
161
+ font-family: var(--fontFamilyBase);
162
+ font-size: var(--fontSizeBase400);
163
+ font-weight: var(--fontWeightRegular);
164
+ line-height: var(--lineHeightBase400);
165
+ padding: 0;
166
+ padding-inline-start: calc(var(--spacingHorizontalM) + var(--spacingHorizontalSNudge));
167
+ }
168
+ :where(.disabled) > .input {
169
+ color: var(--colorNeutralForegroundDisabled);
170
+ background-color: var(--colorTransparentBackground);
171
+ cursor: not-allowed;
172
+ }
173
+ :where(.disabled) > .input::placeholder {
174
+ color: var(--colorNeutralForegroundDisabled);
175
+ }
176
+ .icon {
177
+ box-sizing: border-box;
178
+ color: var(--colorNeutralStrokeAccessible);
179
+ cursor: pointer;
180
+ display: block;
181
+ font-size: var(--fontSizeBase500);
182
+ position: relative;
183
+ }
184
+ .icon svg {
185
+ display: block;
186
+ }
187
+ .icon::after {
188
+ content: '';
189
+ position: absolute;
190
+ top: 0;
191
+ bottom: 0;
192
+ inset-inline-start: 0;
193
+ inset-inline-end: 0;
194
+ }
195
+ .hidden {
196
+ display: none;
197
+ }
198
+
199
+ :where(.small) > .icon {
200
+ font-size: var(--fontSizeBase400);
201
+ margin-inline-start: var(--spacingHorizontalXXS);
202
+ }
203
+ :where(.small) > .icon::after {
204
+ inset-inline-end: calc(-1 * var(--spacingHorizontalSNudge));
205
+ }
206
+ :where(.medium) > .icon {
207
+ font-size: var(--fontSizeBase500);
208
+ margin-inline-start: var(--spacingHorizontalXXS);
209
+ }
210
+ :where(.medium) > .icon::after {
211
+ inset-inline-end: calc(-1 * var(--spacingHorizontalMNudge));
212
+ }
213
+ :where(.large) > .icon {
214
+ font-size: var(--fontSizeBase600);
215
+ margin-inline-start: var(--spacingHorizontalSNudge);
216
+ }
217
+ :where(.large) > .icon::after {
218
+ inset-inline-end: calc(-1 * var(--spacingHorizontalM));
219
+ }
220
+ :where(.disabled) > .icon {
221
+ color: var(--colorNeutralForegroundDisabled);
222
+ cursor: not-allowed;
223
+ }
224
+ .visuallyHidden {
225
+ clip: rect(0px, 0px, 0px, 0px);
226
+ height: 1px;
227
+ margin: -1px;
228
+ overflow: hidden;
229
+ padding: 0px;
230
+ width: 1px;
231
+ position: absolute;
232
+ }
233
+ }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Combobox/Combobox.types.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { ComponentProps, ComponentState, DistributiveOmit, Slot } from '@fluentui/react-utilities';\nimport type { ActiveDescendantImperativeRef } from '@fluentui/react-aria';\nimport type {\n ActiveOptionChangeData as ComboboxBaseActiveOptionChangeData,\n ComboboxBaseContextValues,\n ComboboxBaseOpenChangeData,\n ComboboxBaseOpenEvents,\n ComboboxBaseProps,\n ComboboxBaseState,\n} from '../../utils/ComboboxBase.types';\nimport type { Listbox } from '../Listbox/Listbox';\n\nexport type ComboboxSlots = {\n /** The root combobox slot */\n root: NonNullable<Slot<'div'>>;\n\n /** The dropdown arrow icon */\n expandIcon?: Slot<'span'>;\n\n /** The dropdown clear icon */\n clearIcon?: Slot<'span'>;\n\n /** The primary slot, an input with role=\"combobox\" */\n input: NonNullable<Slot<'input'>>;\n\n /** The dropdown listbox slot */\n listbox?: Slot<typeof Listbox>;\n};\n\n/**\n * Combobox Props\n */\nexport type ComboboxProps = Omit<ComponentProps<Partial<ComboboxSlots>, 'input'>, 'children' | 'size'> &\n ComboboxBaseProps & {\n freeform?: boolean;\n /**\n * The primary slot, `<input>`, does not support children so we need to explicitly include it here.\n */\n children?: React.ReactNode;\n };\n\n/**\n * Combobox Props without design-only props.\n */\nexport type BaseComboboxProps = DistributiveOmit<ComboboxProps, 'appearance' | 'size'>;\n\n/**\n * State used in rendering Combobox\n */\nexport type ComboboxState = ComponentState<ComboboxSlots> &\n ComboboxBaseState & {\n showClearIcon?: boolean;\n activeDescendantController: ActiveDescendantImperativeRef;\n };\n\n/**\n * State used in rendering Combobox, without design-only state.\n */\nexport type BaseComboboxState = DistributiveOmit<ComboboxState, 'appearance' | 'size'>;\n\n/* Export types defined in ComboboxBase */\nexport type ComboboxContextValues = ComboboxBaseContextValues;\nexport type ComboboxOpenChangeData = ComboboxBaseOpenChangeData;\nexport type ComboboxOpenEvents = ComboboxBaseOpenEvents;\nexport type ActiveOptionChangeData = ComboboxBaseActiveOptionChangeData;\n"],"names":[],"mappings":""}
1
+ {"version":3,"sources":["../../../src/components/Combobox/Combobox.types.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { ComponentProps, ComponentState, DistributiveOmit, Slot } from '@fluentui/react-utilities';\nimport type { ActiveDescendantImperativeRef } from '@fluentui/react-aria';\nimport type {\n ActiveOptionChangeData as ComboboxBaseActiveOptionChangeData,\n ComboboxBaseContextValues,\n ComboboxBaseOpenChangeData,\n ComboboxBaseOpenEvents,\n ComboboxBaseProps,\n ComboboxBaseState,\n} from '../../utils/ComboboxBase.types';\nimport type { Listbox } from '../Listbox/Listbox';\n\nexport type ComboboxSlots = {\n /** The root combobox slot */\n root: NonNullable<Slot<'div'>>;\n\n /** The dropdown arrow icon */\n expandIcon?: Slot<'span'>;\n\n /** The dropdown clear icon */\n clearIcon?: Slot<'span'>;\n\n /** The primary slot, an input with role=\"combobox\" */\n input: NonNullable<Slot<'input'>>;\n\n /** The dropdown listbox slot */\n listbox?: Slot<typeof Listbox>;\n};\n\n/**\n * Combobox Props\n */\nexport type ComboboxProps = Omit<ComponentProps<Partial<ComboboxSlots>, 'input'>, 'children' | 'size'> &\n ComboboxBaseProps & {\n freeform?: boolean;\n /**\n * The primary slot, `<input>`, does not support children so we need to explicitly include it here.\n */\n children?: React.ReactNode;\n };\n\n/**\n * Combobox Props without design-only props.\n */\nexport type BaseComboboxProps = DistributiveOmit<ComboboxProps, 'appearance' | 'size'>;\n\n/**\n * State used in rendering Combobox\n */\nexport type ComboboxState = ComponentState<ComboboxSlots> &\n ComboboxBaseState & {\n showClearIcon?: boolean;\n activeDescendantController: ActiveDescendantImperativeRef;\n };\n\n/**\n * State used in rendering Combobox, without design-only state.\n */\nexport type BaseComboboxState = DistributiveOmit<ComboboxState, 'appearance' | 'size'>;\n\n/* Export types defined in ComboboxBase */\nexport type ComboboxContextValues = ComboboxBaseContextValues;\nexport type ComboboxOpenChangeData = ComboboxBaseOpenChangeData;\nexport type ComboboxOpenEvents = ComboboxBaseOpenEvents;\nexport type ActiveOptionChangeData = ComboboxBaseActiveOptionChangeData;\n"],"names":[],"mappings":""}
@@ -5,26 +5,26 @@ Object.defineProperty(exports, "__esModule", {
5
5
  function _export(target, all) {
6
6
  for(var name in all)Object.defineProperty(target, name, {
7
7
  enumerable: true,
8
- get: all[name]
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- Combobox: function() {
12
+ get Combobox () {
13
13
  return _Combobox.Combobox;
14
14
  },
15
- comboboxClassNames: function() {
15
+ get comboboxClassNames () {
16
16
  return _useComboboxStylesstyles.comboboxClassNames;
17
17
  },
18
- renderCombobox_unstable: function() {
18
+ get renderCombobox_unstable () {
19
19
  return _renderCombobox.renderCombobox_unstable;
20
20
  },
21
- useComboboxBase_unstable: function() {
21
+ get useComboboxBase_unstable () {
22
22
  return _useCombobox.useComboboxBase_unstable;
23
23
  },
24
- useComboboxStyles_unstable: function() {
24
+ get useComboboxStyles_unstable () {
25
25
  return _useComboboxStylesstyles.useComboboxStyles_unstable;
26
26
  },
27
- useCombobox_unstable: function() {
27
+ get useCombobox_unstable () {
28
28
  return _useCombobox.useCombobox_unstable;
29
29
  }
30
30
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Combobox/index.ts"],"sourcesContent":["export { Combobox } from './Combobox';\nexport type {\n ActiveOptionChangeData,\n BaseComboboxProps,\n BaseComboboxState,\n ComboboxContextValues,\n ComboboxOpenChangeData,\n ComboboxOpenEvents,\n ComboboxProps,\n ComboboxSlots,\n ComboboxState,\n} from './Combobox.types';\nexport { renderCombobox_unstable } from './renderCombobox';\nexport { useComboboxBase_unstable, useCombobox_unstable } from './useCombobox';\nexport { comboboxClassNames, useComboboxStyles_unstable } from './useComboboxStyles.styles';\n"],"names":["Combobox","renderCombobox_unstable","useComboboxBase_unstable","useCombobox_unstable","comboboxClassNames","useComboboxStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,kBAAQ;;;eAcRI,2CAAkB;;;eAFlBH,uCAAuB;;;eACvBC,qCAAwB;;;eACJG,mDAA0B;;;eADpBF,iCAAoB;;;0BAb9B,gBAAa;gCAYE,sBAAmB;6BACI,mBAAgB;yCAChB,gCAA6B"}
1
+ {"version":3,"sources":["../../../src/components/Combobox/index.ts"],"sourcesContent":["export { Combobox } from './Combobox';\nexport type {\n ActiveOptionChangeData,\n BaseComboboxProps,\n BaseComboboxState,\n ComboboxContextValues,\n ComboboxOpenChangeData,\n ComboboxOpenEvents,\n ComboboxProps,\n ComboboxSlots,\n ComboboxState,\n} from './Combobox.types';\nexport { renderCombobox_unstable } from './renderCombobox';\nexport { useComboboxBase_unstable, useCombobox_unstable } from './useCombobox';\nexport { comboboxClassNames, useComboboxStyles_unstable } from './useComboboxStyles.styles';\n"],"names":["Combobox","renderCombobox_unstable","useComboboxBase_unstable","useCombobox_unstable","comboboxClassNames","useComboboxStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,kBAAQ;;;eAcRI,2CAAkB;;;eAFlBH,uCAAuB;;;eACvBC,qCAAwB;;;eACJG,mDAA0B;;;eADpBF,iCAAoB;;;0BAb9B,gBAAa;gCAYE,sBAAmB;6BACI,mBAAgB;yCAChB,gCAA6B"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Combobox/renderCombobox.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { Portal } from '@fluentui/react-portal';\nimport { ActiveDescendantContextProvider } from '@fluentui/react-aria';\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { ComboboxContext } from '../../contexts/ComboboxContext';\nimport type { ComboboxContextValues, BaseComboboxState, ComboboxSlots } from './Combobox.types';\nimport { ListboxProvider } from '../../contexts/ListboxContext';\n\n/**\n * Render the final JSX of Combobox\n */\nexport const renderCombobox_unstable = (state: BaseComboboxState, contextValues: ComboboxContextValues): JSXElement => {\n assertSlots<ComboboxSlots>(state);\n\n return (\n <state.root>\n <ActiveDescendantContextProvider value={contextValues.activeDescendant}>\n <ListboxProvider value={contextValues.listbox}>\n {/*eslint-disable-next-line @typescript-eslint/no-deprecated*/}\n <ComboboxContext.Provider value={contextValues.combobox}>\n <state.input />\n {state.clearIcon && <state.clearIcon />}\n {state.expandIcon && <state.expandIcon />}\n {state.listbox &&\n (state.inlinePopup ? (\n <state.listbox />\n ) : (\n <Portal mountNode={state.mountNode}>\n <state.listbox />\n </Portal>\n ))}\n {/*eslint-disable-next-line @typescript-eslint/no-deprecated*/}\n </ComboboxContext.Provider>\n </ListboxProvider>\n </ActiveDescendantContextProvider>\n </state.root>\n );\n};\n"],"names":["Portal","ActiveDescendantContextProvider","assertSlots","ComboboxContext","ListboxProvider","renderCombobox_unstable","state","contextValues","root","value","activeDescendant","listbox","Provider","combobox","input","clearIcon","expandIcon","inlinePopup","mountNode"],"mappings":";;;;+BAcaK;;;;;;4BAbb,iCAAiD;6BAC1B,yBAAyB;2BACA,uBAAuB;gCAE3C,4BAA4B;iCAExB,oCAAiC;gCAEjC,mCAAgC;AAKzD,gCAAgC,CAACC,OAA0BC;QAChEL,2BAAAA,EAA2BI;IAE3B,OAAA,WAAA,OACE,eAAA,EAACA,MAAME,IAAI,EAAA;kBACT,WAAA,OAAA,eAAA,EAACP,0CAAAA,EAAAA;YAAgCQ,OAAOF,cAAcG,gBAAgB;sBACpE,WAAA,OAAA,eAAA,EAACN,+BAAAA,EAAAA;gBAAgBK,OAAOF,cAAcI,OAAO;0BAE3C,WAAA,OAAA,gBAAA,EAACR,gCAAAA,CAAgBS,QAAQ,EAAA;oBAACH,OAAOF,cAAcM,QAAQ;;0CACrD,eAAA,EAACP,MAAMQ,KAAK,EAAA,CAAA;wBACXR,MAAMS,SAAS,IAAA,WAAA,GAAI,mBAAA,EAACT,MAAMS,SAAS,EAAA,CAAA;wBACnCT,MAAMU,UAAU,IAAA,WAAA,OAAI,eAAA,EAACV,MAAMU,UAAU,EAAA,CAAA;wBACrCV,MAAMK,OAAO,IACXL,CAAAA,MAAMW,WAAW,GAAA,WAAA,OAChB,eAAA,EAACX,MAAMK,OAAO,EAAA,CAAA,KAAA,WAAA,OAEd,eAAA,EAACX,mBAAAA,EAAAA;4BAAOkB,WAAWZ,MAAMY,SAAS;sCAChC,WAAA,OAAA,eAAA,EAACZ,MAAMK,OAAO,EAAA,CAAA;2BAElB;;;;;;AAOd,EAAE"}
1
+ {"version":3,"sources":["../../../src/components/Combobox/renderCombobox.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { Portal } from '@fluentui/react-portal';\nimport { ActiveDescendantContextProvider } from '@fluentui/react-aria';\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { ComboboxContext } from '../../contexts/ComboboxContext';\nimport type { ComboboxContextValues, BaseComboboxState, ComboboxSlots } from './Combobox.types';\nimport { ListboxProvider } from '../../contexts/ListboxContext';\n\n/**\n * Render the final JSX of Combobox\n */\nexport const renderCombobox_unstable = (state: BaseComboboxState, contextValues: ComboboxContextValues): JSXElement => {\n assertSlots<ComboboxSlots>(state);\n\n return (\n <state.root>\n <ActiveDescendantContextProvider value={contextValues.activeDescendant}>\n <ListboxProvider value={contextValues.listbox}>\n {/*eslint-disable-next-line @typescript-eslint/no-deprecated*/}\n <ComboboxContext.Provider value={contextValues.combobox}>\n <state.input />\n {state.clearIcon && <state.clearIcon />}\n {state.expandIcon && <state.expandIcon />}\n {state.listbox &&\n (state.inlinePopup ? (\n <state.listbox />\n ) : (\n <Portal mountNode={state.mountNode}>\n <state.listbox />\n </Portal>\n ))}\n {/*eslint-disable-next-line @typescript-eslint/no-deprecated*/}\n </ComboboxContext.Provider>\n </ListboxProvider>\n </ActiveDescendantContextProvider>\n </state.root>\n );\n};\n"],"names":["Portal","ActiveDescendantContextProvider","assertSlots","ComboboxContext","ListboxProvider","renderCombobox_unstable","state","contextValues","root","value","activeDescendant","listbox","Provider","combobox","input","clearIcon","expandIcon","inlinePopup","mountNode"],"mappings":";;;;+BAcaK;;;;;;;6BAdb,CAA0B,GAC1B,iDAAiD,GACjD,SAASL,MAAM,QAAQ,yBAAyB;2BACA,uBAAuB;gCAE3C,4BAA4B;iCAExB,oCAAiC;gCAEjC,mCAAgC;AAKzD,gCAAgC,CAACM,OAA0BC;QAChEL,2BAAAA,EAA2BI;IAE3B,OAAA,WAAA,OACE,eAAA,EAACA,MAAME,IAAI,EAAA;kBACT,WAAA,OAAA,eAAA,EAACP,0CAAAA,EAAAA;YAAgCQ,OAAOF,cAAcG,gBAAgB;sBACpE,WAAA,OAAA,eAAA,EAACN,+BAAAA,EAAAA;gBAAgBK,OAAOF,cAAcI,OAAO;0BAE3C,WAAA,OAAA,gBAAA,EAACR,gCAAAA,CAAgBS,QAAQ,EAAA;oBAACH,OAAOF,cAAcM,QAAQ;;0CACrD,eAAA,EAACP,MAAMQ,KAAK,EAAA,CAAA;wBACXR,MAAMS,SAAS,IAAA,WAAA,GAAI,mBAAA,EAACT,MAAMS,SAAS,EAAA,CAAA;wBACnCT,MAAMU,UAAU,IAAA,WAAA,OAAI,eAAA,EAACV,MAAMU,UAAU,EAAA,CAAA;wBACrCV,MAAMK,OAAO,IACXL,CAAAA,MAAMW,WAAW,GAAA,WAAA,OAChB,eAAA,EAACX,MAAMK,OAAO,EAAA,CAAA,KAAA,WAAA,OAEd,eAAA,EAACX,mBAAAA,EAAAA;4BAAOkB,WAAWZ,MAAMY,SAAS;sCAChC,WAAA,OAAA,eAAA,EAACZ,MAAMK,OAAO,EAAA,CAAA;2BAElB;;;;;;AAOd,EAAE"}