@fluentui/react-combobox 9.8.0 → 9.9.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 (56) hide show
  1. package/CHANGELOG.md +39 -2
  2. package/dist/index.d.ts +35 -10
  3. package/lib/components/Combobox/renderCombobox.js +15 -11
  4. package/lib/components/Combobox/renderCombobox.js.map +1 -1
  5. package/lib/components/Combobox/useInputTriggerSlot.js +2 -1
  6. package/lib/components/Combobox/useInputTriggerSlot.js.map +1 -1
  7. package/lib/components/Dropdown/renderDropdown.js +19 -15
  8. package/lib/components/Dropdown/renderDropdown.js.map +1 -1
  9. package/lib/components/Dropdown/useButtonTriggerSlot.js +2 -1
  10. package/lib/components/Dropdown/useButtonTriggerSlot.js.map +1 -1
  11. package/lib/components/Listbox/useListbox.js +9 -9
  12. package/lib/components/Listbox/useListbox.js.map +1 -1
  13. package/lib/components/Option/useOption.js +8 -14
  14. package/lib/components/Option/useOption.js.map +1 -1
  15. package/lib/components/Option/useOptionStyles.styles.js.map +1 -1
  16. package/lib/contexts/ComboboxContext.js +9 -1
  17. package/lib/contexts/ComboboxContext.js.map +1 -1
  18. package/lib/contexts/ListboxContext.js +9 -4
  19. package/lib/contexts/ListboxContext.js.map +1 -1
  20. package/lib/contexts/useComboboxContextValues.js +14 -6
  21. package/lib/contexts/useComboboxContextValues.js.map +1 -1
  22. package/lib/contexts/useListboxContextValues.js +8 -6
  23. package/lib/contexts/useListboxContextValues.js.map +1 -1
  24. package/lib/hooks/useComboboxFilter.js +3 -1
  25. package/lib/hooks/useComboboxFilter.js.map +1 -1
  26. package/lib/index.js +2 -1
  27. package/lib/index.js.map +1 -1
  28. package/lib/utils/ComboboxBase.types.js.map +1 -1
  29. package/lib/utils/useComboboxBaseState.js +9 -3
  30. package/lib/utils/useComboboxBaseState.js.map +1 -1
  31. package/lib/utils/useListboxSlot.js +1 -0
  32. package/lib/utils/useListboxSlot.js.map +1 -1
  33. package/lib-commonjs/components/Combobox/renderCombobox.js +15 -11
  34. package/lib-commonjs/components/Combobox/renderCombobox.js.map +1 -1
  35. package/lib-commonjs/components/Combobox/useInputTriggerSlot.js.map +1 -1
  36. package/lib-commonjs/components/Dropdown/renderDropdown.js +19 -15
  37. package/lib-commonjs/components/Dropdown/renderDropdown.js.map +1 -1
  38. package/lib-commonjs/components/Dropdown/useButtonTriggerSlot.js.map +1 -1
  39. package/lib-commonjs/components/Listbox/useListbox.js +7 -7
  40. package/lib-commonjs/components/Listbox/useListbox.js.map +1 -1
  41. package/lib-commonjs/components/Option/useOption.js +7 -13
  42. package/lib-commonjs/components/Option/useOption.js.map +1 -1
  43. package/lib-commonjs/contexts/ComboboxContext.js.map +1 -1
  44. package/lib-commonjs/contexts/ListboxContext.js +12 -2
  45. package/lib-commonjs/contexts/ListboxContext.js.map +1 -1
  46. package/lib-commonjs/contexts/useComboboxContextValues.js +14 -4
  47. package/lib-commonjs/contexts/useComboboxContextValues.js.map +1 -1
  48. package/lib-commonjs/contexts/useListboxContextValues.js +7 -5
  49. package/lib-commonjs/contexts/useListboxContextValues.js.map +1 -1
  50. package/lib-commonjs/hooks/useComboboxFilter.js.map +1 -1
  51. package/lib-commonjs/index.js +4 -0
  52. package/lib-commonjs/index.js.map +1 -1
  53. package/lib-commonjs/utils/useComboboxBaseState.js +7 -2
  54. package/lib-commonjs/utils/useComboboxBaseState.js.map +1 -1
  55. package/lib-commonjs/utils/useListboxSlot.js.map +1 -1
  56. package/package.json +12 -13
@@ -1 +1 @@
1
- {"version":3,"sources":["useListboxSlot.js"],"sourcesContent":["import * as React from 'react';\nimport { mergeCallbacks, useId, useEventCallback, slot, isResolvedShorthand, useMergedRefs } from '@fluentui/react-utilities';\nimport { Listbox } from '../Listbox';\n/**\n * @returns listbox slot with desired behaviour and props\n */ export function useListboxSlot(listboxSlotFromProp, ref, options) {\n const { state: { multiselect }, triggerRef, defaultProps } = options;\n const listboxId = useId('fluent-listbox', isResolvedShorthand(listboxSlotFromProp) ? listboxSlotFromProp.id : undefined);\n const listboxSlot = slot.optional(listboxSlotFromProp, {\n renderByDefault: true,\n elementType: Listbox,\n defaultProps: {\n id: listboxId,\n multiselect,\n tabIndex: undefined,\n ...defaultProps\n }\n });\n /**\n * Clicking on the listbox should never blur the trigger\n * in a combobox\n */ const onMouseDown = useEventCallback(mergeCallbacks((event)=>{\n event.preventDefault();\n }, listboxSlot === null || listboxSlot === void 0 ? void 0 : listboxSlot.onMouseDown));\n const onClick = useEventCallback(mergeCallbacks((event)=>{\n var _triggerRef_current;\n event.preventDefault();\n (_triggerRef_current = triggerRef.current) === null || _triggerRef_current === void 0 ? void 0 : _triggerRef_current.focus();\n }, listboxSlot === null || listboxSlot === void 0 ? void 0 : listboxSlot.onClick));\n const listboxRef = useMergedRefs(listboxSlot === null || listboxSlot === void 0 ? void 0 : listboxSlot.ref, ref);\n if (listboxSlot) {\n listboxSlot.ref = listboxRef;\n listboxSlot.onMouseDown = onMouseDown;\n listboxSlot.onClick = onClick;\n }\n return listboxSlot;\n}\n"],"names":["useListboxSlot","listboxSlotFromProp","ref","options","state","multiselect","triggerRef","defaultProps","listboxId","useId","isResolvedShorthand","id","undefined","listboxSlot","slot","optional","renderByDefault","elementType","Listbox","tabIndex","onMouseDown","useEventCallback","mergeCallbacks","event","preventDefault","onClick","_triggerRef_current","current","focus","listboxRef","useMergedRefs"],"mappings":";;;;+BAKoBA;;;eAAAA;;;;iEALG;gCAC2E;yBAC1E;AAGb,SAASA,eAAeC,mBAAmB,EAAEC,GAAG,EAAEC,OAAO;IAChE,MAAM,EAAEC,OAAO,EAAEC,WAAW,EAAE,EAAEC,UAAU,EAAEC,YAAY,EAAE,GAAGJ;IAC7D,MAAMK,YAAYC,IAAAA,qBAAK,EAAC,kBAAkBC,IAAAA,mCAAmB,EAACT,uBAAuBA,oBAAoBU,EAAE,GAAGC;IAC9G,MAAMC,cAAcC,oBAAI,CAACC,QAAQ,CAACd,qBAAqB;QACnDe,iBAAiB;QACjBC,aAAaC,gBAAO;QACpBX,cAAc;YACVI,IAAIH;YACJH;YACAc,UAAUP;YACV,GAAGL,YAAY;QACnB;IACJ;IACA;;;GAGD,GAAG,MAAMa,cAAcC,IAAAA,gCAAgB,EAACC,IAAAA,8BAAc,EAAC,CAACC;QACnDA,MAAMC,cAAc;IACxB,GAAGX,gBAAgB,QAAQA,gBAAgB,KAAK,IAAI,KAAK,IAAIA,YAAYO,WAAW;IACpF,MAAMK,UAAUJ,IAAAA,gCAAgB,EAACC,IAAAA,8BAAc,EAAC,CAACC;QAC7C,IAAIG;QACJH,MAAMC,cAAc;QACnBE,CAAAA,sBAAsBpB,WAAWqB,OAAO,AAAD,MAAO,QAAQD,wBAAwB,KAAK,IAAI,KAAK,IAAIA,oBAAoBE,KAAK;IAC9H,GAAGf,gBAAgB,QAAQA,gBAAgB,KAAK,IAAI,KAAK,IAAIA,YAAYY,OAAO;IAChF,MAAMI,aAAaC,IAAAA,6BAAa,EAACjB,gBAAgB,QAAQA,gBAAgB,KAAK,IAAI,KAAK,IAAIA,YAAYX,GAAG,EAAEA;IAC5G,IAAIW,aAAa;QACbA,YAAYX,GAAG,GAAG2B;QAClBhB,YAAYO,WAAW,GAAGA;QAC1BP,YAAYY,OAAO,GAAGA;IAC1B;IACA,OAAOZ;AACX"}
1
+ {"version":3,"sources":["useListboxSlot.js"],"sourcesContent":["import * as React from 'react';\nimport { mergeCallbacks, useId, useEventCallback, slot, isResolvedShorthand, useMergedRefs } from '@fluentui/react-utilities';\nimport { Listbox } from '../Listbox';\n/**\n * @internal\n * @returns listbox slot with desired behaviour and props\n */ export function useListboxSlot(listboxSlotFromProp, ref, options) {\n const { state: { multiselect }, triggerRef, defaultProps } = options;\n const listboxId = useId('fluent-listbox', isResolvedShorthand(listboxSlotFromProp) ? listboxSlotFromProp.id : undefined);\n const listboxSlot = slot.optional(listboxSlotFromProp, {\n renderByDefault: true,\n elementType: Listbox,\n defaultProps: {\n id: listboxId,\n multiselect,\n tabIndex: undefined,\n ...defaultProps\n }\n });\n /**\n * Clicking on the listbox should never blur the trigger\n * in a combobox\n */ const onMouseDown = useEventCallback(mergeCallbacks((event)=>{\n event.preventDefault();\n }, listboxSlot === null || listboxSlot === void 0 ? void 0 : listboxSlot.onMouseDown));\n const onClick = useEventCallback(mergeCallbacks((event)=>{\n var _triggerRef_current;\n event.preventDefault();\n (_triggerRef_current = triggerRef.current) === null || _triggerRef_current === void 0 ? void 0 : _triggerRef_current.focus();\n }, listboxSlot === null || listboxSlot === void 0 ? void 0 : listboxSlot.onClick));\n const listboxRef = useMergedRefs(listboxSlot === null || listboxSlot === void 0 ? void 0 : listboxSlot.ref, ref);\n if (listboxSlot) {\n listboxSlot.ref = listboxRef;\n listboxSlot.onMouseDown = onMouseDown;\n listboxSlot.onClick = onClick;\n }\n return listboxSlot;\n}\n"],"names":["useListboxSlot","listboxSlotFromProp","ref","options","state","multiselect","triggerRef","defaultProps","listboxId","useId","isResolvedShorthand","id","undefined","listboxSlot","slot","optional","renderByDefault","elementType","Listbox","tabIndex","onMouseDown","useEventCallback","mergeCallbacks","event","preventDefault","onClick","_triggerRef_current","current","focus","listboxRef","useMergedRefs"],"mappings":";;;;+BAMoBA;;;eAAAA;;;;iEANG;gCAC2E;yBAC1E;AAIb,SAASA,eAAeC,mBAAmB,EAAEC,GAAG,EAAEC,OAAO;IAChE,MAAM,EAAEC,OAAO,EAAEC,WAAW,EAAE,EAAEC,UAAU,EAAEC,YAAY,EAAE,GAAGJ;IAC7D,MAAMK,YAAYC,IAAAA,qBAAK,EAAC,kBAAkBC,IAAAA,mCAAmB,EAACT,uBAAuBA,oBAAoBU,EAAE,GAAGC;IAC9G,MAAMC,cAAcC,oBAAI,CAACC,QAAQ,CAACd,qBAAqB;QACnDe,iBAAiB;QACjBC,aAAaC,gBAAO;QACpBX,cAAc;YACVI,IAAIH;YACJH;YACAc,UAAUP;YACV,GAAGL,YAAY;QACnB;IACJ;IACA;;;GAGD,GAAG,MAAMa,cAAcC,IAAAA,gCAAgB,EAACC,IAAAA,8BAAc,EAAC,CAACC;QACnDA,MAAMC,cAAc;IACxB,GAAGX,gBAAgB,QAAQA,gBAAgB,KAAK,IAAI,KAAK,IAAIA,YAAYO,WAAW;IACpF,MAAMK,UAAUJ,IAAAA,gCAAgB,EAACC,IAAAA,8BAAc,EAAC,CAACC;QAC7C,IAAIG;QACJH,MAAMC,cAAc;QACnBE,CAAAA,sBAAsBpB,WAAWqB,OAAO,AAAD,MAAO,QAAQD,wBAAwB,KAAK,IAAI,KAAK,IAAIA,oBAAoBE,KAAK;IAC9H,GAAGf,gBAAgB,QAAQA,gBAAgB,KAAK,IAAI,KAAK,IAAIA,YAAYY,OAAO;IAChF,MAAMI,aAAaC,IAAAA,6BAAa,EAACjB,gBAAgB,QAAQA,gBAAgB,KAAK,IAAI,KAAK,IAAIA,YAAYX,GAAG,EAAEA;IAC5G,IAAIW,aAAa;QACbA,YAAYX,GAAG,GAAG2B;QAClBhB,YAAYO,WAAW,GAAGA;QAC1BP,YAAYY,OAAO,GAAGA;IAC1B;IACA,OAAOZ;AACX"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-combobox",
3
- "version": "9.8.0",
3
+ "version": "9.9.1",
4
4
  "description": "Fluent UI React Combobox component",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -33,18 +33,18 @@
33
33
  "@fluentui/scripts-tasks": "*"
34
34
  },
35
35
  "dependencies": {
36
- "@fluentui/react-aria": "^9.9.0",
36
+ "@fluentui/react-aria": "^9.10.0",
37
37
  "@fluentui/keyboard-keys": "^9.0.7",
38
- "@fluentui/react-context-selector": "^9.1.52",
39
- "@fluentui/react-field": "^9.1.54",
38
+ "@fluentui/react-context-selector": "^9.1.54",
39
+ "@fluentui/react-field": "^9.1.56",
40
40
  "@fluentui/react-icons": "^2.0.224",
41
- "@fluentui/react-jsx-runtime": "^9.0.30",
42
- "@fluentui/react-portal": "^9.4.14",
43
- "@fluentui/react-positioning": "^9.13.4",
44
- "@fluentui/react-shared-contexts": "^9.14.0",
45
- "@fluentui/react-tabster": "^9.19.1",
46
- "@fluentui/react-theme": "^9.1.16",
47
- "@fluentui/react-utilities": "^9.18.1",
41
+ "@fluentui/react-jsx-runtime": "^9.0.32",
42
+ "@fluentui/react-portal": "^9.4.16",
43
+ "@fluentui/react-positioning": "^9.14.0",
44
+ "@fluentui/react-shared-contexts": "^9.15.0",
45
+ "@fluentui/react-tabster": "^9.19.3",
46
+ "@fluentui/react-theme": "^9.1.17",
47
+ "@fluentui/react-utilities": "^9.18.3",
48
48
  "@griffel/react": "^1.5.14",
49
49
  "@swc/helpers": "^0.5.1"
50
50
  },
@@ -52,8 +52,7 @@
52
52
  "@types/react": ">=16.14.0 <19.0.0",
53
53
  "@types/react-dom": ">=16.9.0 <19.0.0",
54
54
  "react": ">=16.14.0 <19.0.0",
55
- "react-dom": ">=16.14.0 <19.0.0",
56
- "scheduler": "^0.19.0 || ^0.20.0"
55
+ "react-dom": ">=16.14.0 <19.0.0"
57
56
  },
58
57
  "beachball": {
59
58
  "disallowedChangeTypes": [