@fluentui/react-combobox 9.5.8 → 9.5.10

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 (147) hide show
  1. package/CHANGELOG.json +121 -1
  2. package/CHANGELOG.md +35 -2
  3. package/lib/components/Combobox/Combobox.js.map +1 -1
  4. package/lib/components/Combobox/renderCombobox.js +15 -7
  5. package/lib/components/Combobox/renderCombobox.js.map +1 -1
  6. package/lib/components/Combobox/useCombobox.js +17 -13
  7. package/lib/components/Combobox/useCombobox.js.map +1 -1
  8. package/lib/components/Combobox/useComboboxStyles.styles.js.map +1 -1
  9. package/lib/components/Dropdown/Dropdown.js.map +1 -1
  10. package/lib/components/Dropdown/renderDropdown.js +19 -7
  11. package/lib/components/Dropdown/renderDropdown.js.map +1 -1
  12. package/lib/components/Dropdown/useDropdown.js +4 -3
  13. package/lib/components/Dropdown/useDropdown.js.map +1 -1
  14. package/lib/components/Dropdown/useDropdownStyles.styles.js.map +1 -1
  15. package/lib/components/Listbox/Listbox.js.map +1 -1
  16. package/lib/components/Listbox/renderListbox.js +5 -4
  17. package/lib/components/Listbox/renderListbox.js.map +1 -1
  18. package/lib/components/Listbox/useListbox.js +5 -4
  19. package/lib/components/Listbox/useListbox.js.map +1 -1
  20. package/lib/components/Option/Option.js.map +1 -1
  21. package/lib/components/Option/renderOption.js +7 -2
  22. package/lib/components/Option/renderOption.js.map +1 -1
  23. package/lib/components/Option/useOption.js +5 -4
  24. package/lib/components/Option/useOption.js.map +1 -1
  25. package/lib/components/Option/useOptionStyles.styles.js.map +1 -1
  26. package/lib/components/OptionGroup/OptionGroup.js.map +1 -1
  27. package/lib/components/OptionGroup/renderOptionGroup.js +9 -2
  28. package/lib/components/OptionGroup/renderOptionGroup.js.map +1 -1
  29. package/lib/components/OptionGroup/useOptionGroup.js +1 -1
  30. package/lib/components/OptionGroup/useOptionGroup.js.map +1 -1
  31. package/lib/contexts/ComboboxContext.js.map +1 -1
  32. package/lib/contexts/ListboxContext.js.map +1 -1
  33. package/lib/contexts/useComboboxContextValues.js +1 -1
  34. package/lib/contexts/useComboboxContextValues.js.map +1 -1
  35. package/lib/contexts/useListboxContextValues.js +1 -1
  36. package/lib/contexts/useListboxContextValues.js.map +1 -1
  37. package/lib/utils/dropdownKeyActions.js +2 -2
  38. package/lib/utils/dropdownKeyActions.js.map +1 -1
  39. package/lib/utils/useComboboxBaseState.js +5 -4
  40. package/lib/utils/useComboboxBaseState.js.map +1 -1
  41. package/lib/utils/useComboboxPopup.js +5 -4
  42. package/lib/utils/useComboboxPopup.js.map +1 -1
  43. package/lib/utils/useOptionCollection.js +2 -1
  44. package/lib/utils/useOptionCollection.js.map +1 -1
  45. package/lib/utils/useScrollOptionsIntoView.js +3 -3
  46. package/lib/utils/useScrollOptionsIntoView.js.map +1 -1
  47. package/lib/utils/useSelection.js +5 -3
  48. package/lib/utils/useSelection.js.map +1 -1
  49. package/lib/utils/useTriggerListboxSlots.js +11 -9
  50. package/lib/utils/useTriggerListboxSlots.js.map +1 -1
  51. package/lib-commonjs/Combobox.js +2 -2
  52. package/lib-commonjs/Combobox.js.map +1 -1
  53. package/lib-commonjs/Dropdown.js +2 -2
  54. package/lib-commonjs/Dropdown.js.map +1 -1
  55. package/lib-commonjs/Listbox.js +2 -2
  56. package/lib-commonjs/Listbox.js.map +1 -1
  57. package/lib-commonjs/Option.js +2 -2
  58. package/lib-commonjs/Option.js.map +1 -1
  59. package/lib-commonjs/OptionGroup.js +2 -2
  60. package/lib-commonjs/OptionGroup.js.map +1 -1
  61. package/lib-commonjs/Selection.js +2 -2
  62. package/lib-commonjs/Selection.js.map +1 -1
  63. package/lib-commonjs/components/Combobox/Combobox.js +9 -7
  64. package/lib-commonjs/components/Combobox/Combobox.js.map +1 -1
  65. package/lib-commonjs/components/Combobox/Combobox.types.js +2 -2
  66. package/lib-commonjs/components/Combobox/Combobox.types.js.map +1 -1
  67. package/lib-commonjs/components/Combobox/index.js +6 -6
  68. package/lib-commonjs/components/Combobox/index.js.map +1 -1
  69. package/lib-commonjs/components/Combobox/renderCombobox.js +22 -12
  70. package/lib-commonjs/components/Combobox/renderCombobox.js.map +1 -1
  71. package/lib-commonjs/components/Combobox/useCombobox.js +43 -38
  72. package/lib-commonjs/components/Combobox/useCombobox.js.map +1 -1
  73. package/lib-commonjs/components/Combobox/useComboboxStyles.styles.js +10 -6
  74. package/lib-commonjs/components/Combobox/useComboboxStyles.styles.js.map +1 -1
  75. package/lib-commonjs/components/Dropdown/Dropdown.js +9 -7
  76. package/lib-commonjs/components/Dropdown/Dropdown.js.map +1 -1
  77. package/lib-commonjs/components/Dropdown/index.js +6 -6
  78. package/lib-commonjs/components/Dropdown/index.js.map +1 -1
  79. package/lib-commonjs/components/Dropdown/renderDropdown.js +26 -12
  80. package/lib-commonjs/components/Dropdown/renderDropdown.js.map +1 -1
  81. package/lib-commonjs/components/Dropdown/useDropdown.js +24 -21
  82. package/lib-commonjs/components/Dropdown/useDropdown.js.map +1 -1
  83. package/lib-commonjs/components/Dropdown/useDropdownStyles.styles.js +9 -5
  84. package/lib-commonjs/components/Dropdown/useDropdownStyles.styles.js.map +1 -1
  85. package/lib-commonjs/components/Listbox/Listbox.js +9 -7
  86. package/lib-commonjs/components/Listbox/Listbox.js.map +1 -1
  87. package/lib-commonjs/components/Listbox/index.js +6 -6
  88. package/lib-commonjs/components/Listbox/index.js.map +1 -1
  89. package/lib-commonjs/components/Listbox/renderListbox.js +12 -9
  90. package/lib-commonjs/components/Listbox/renderListbox.js.map +1 -1
  91. package/lib-commonjs/components/Listbox/useListbox.js +23 -20
  92. package/lib-commonjs/components/Listbox/useListbox.js.map +1 -1
  93. package/lib-commonjs/components/Listbox/useListboxStyles.styles.js +7 -3
  94. package/lib-commonjs/components/Listbox/useListboxStyles.styles.js.map +1 -1
  95. package/lib-commonjs/components/Option/Option.js +9 -7
  96. package/lib-commonjs/components/Option/Option.js.map +1 -1
  97. package/lib-commonjs/components/Option/Option.types.js +2 -2
  98. package/lib-commonjs/components/Option/Option.types.js.map +1 -1
  99. package/lib-commonjs/components/Option/index.js +6 -6
  100. package/lib-commonjs/components/Option/index.js.map +1 -1
  101. package/lib-commonjs/components/Option/renderOption.js +13 -6
  102. package/lib-commonjs/components/Option/renderOption.js.map +1 -1
  103. package/lib-commonjs/components/Option/useOption.js +29 -26
  104. package/lib-commonjs/components/Option/useOption.js.map +1 -1
  105. package/lib-commonjs/components/Option/useOptionStyles.styles.js +8 -4
  106. package/lib-commonjs/components/Option/useOptionStyles.styles.js.map +1 -1
  107. package/lib-commonjs/components/OptionGroup/OptionGroup.js +9 -7
  108. package/lib-commonjs/components/OptionGroup/OptionGroup.js.map +1 -1
  109. package/lib-commonjs/components/OptionGroup/index.js +6 -6
  110. package/lib-commonjs/components/OptionGroup/index.js.map +1 -1
  111. package/lib-commonjs/components/OptionGroup/renderOptionGroup.js +15 -6
  112. package/lib-commonjs/components/OptionGroup/renderOptionGroup.js.map +1 -1
  113. package/lib-commonjs/components/OptionGroup/useOptionGroup.js +10 -8
  114. package/lib-commonjs/components/OptionGroup/useOptionGroup.js.map +1 -1
  115. package/lib-commonjs/components/OptionGroup/useOptionGroupStyles.styles.js +7 -3
  116. package/lib-commonjs/components/OptionGroup/useOptionGroupStyles.styles.js.map +1 -1
  117. package/lib-commonjs/contexts/ComboboxContext.js +8 -4
  118. package/lib-commonjs/contexts/ComboboxContext.js.map +1 -1
  119. package/lib-commonjs/contexts/ListboxContext.js +8 -4
  120. package/lib-commonjs/contexts/ListboxContext.js.map +1 -1
  121. package/lib-commonjs/contexts/useComboboxContextValues.js +4 -2
  122. package/lib-commonjs/contexts/useComboboxContextValues.js.map +1 -1
  123. package/lib-commonjs/contexts/useListboxContextValues.js +8 -6
  124. package/lib-commonjs/contexts/useListboxContextValues.js.map +1 -1
  125. package/lib-commonjs/index.js +94 -36
  126. package/lib-commonjs/index.js.map +1 -1
  127. package/lib-commonjs/utils/ComboboxBase.types.js +2 -2
  128. package/lib-commonjs/utils/ComboboxBase.types.js.map +1 -1
  129. package/lib-commonjs/utils/Selection.types.js +2 -2
  130. package/lib-commonjs/utils/Selection.types.js.map +1 -1
  131. package/lib-commonjs/utils/dropdownKeyActions.js +23 -19
  132. package/lib-commonjs/utils/dropdownKeyActions.js.map +1 -1
  133. package/lib-commonjs/utils/internalTokens.js +3 -1
  134. package/lib-commonjs/utils/internalTokens.js.map +1 -1
  135. package/lib-commonjs/utils/useComboboxBaseState.js +14 -11
  136. package/lib-commonjs/utils/useComboboxBaseState.js.map +1 -1
  137. package/lib-commonjs/utils/useComboboxPopup.js +11 -8
  138. package/lib-commonjs/utils/useComboboxPopup.js.map +1 -1
  139. package/lib-commonjs/utils/useOptionCollection.js +7 -4
  140. package/lib-commonjs/utils/useOptionCollection.js.map +1 -1
  141. package/lib-commonjs/utils/useScrollOptionsIntoView.js +10 -8
  142. package/lib-commonjs/utils/useScrollOptionsIntoView.js.map +1 -1
  143. package/lib-commonjs/utils/useSelection.js +10 -6
  144. package/lib-commonjs/utils/useSelection.js.map +1 -1
  145. package/lib-commonjs/utils/useTriggerListboxSlots.js +25 -21
  146. package/lib-commonjs/utils/useTriggerListboxSlots.js.map +1 -1
  147. package/package.json +15 -15
@@ -4,22 +4,25 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(exports, "useListbox_unstable", {
6
6
  enumerable: true,
7
- get: ()=>useListbox_unstable
7
+ get: function() {
8
+ return useListbox_unstable;
9
+ }
8
10
  });
9
- const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
- const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
- const _reactUtilities = require("@fluentui/react-utilities");
12
- const _reactContextSelector = require("@fluentui/react-context-selector");
11
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
+ const _reactutilities = require("@fluentui/react-utilities");
14
+ const _reactcontextselector = require("@fluentui/react-context-selector");
13
15
  const _dropdownKeyActions = require("../../utils/dropdownKeyActions");
14
16
  const _useOptionCollection = require("../../utils/useOptionCollection");
15
17
  const _useScrollOptionsIntoView = require("../../utils/useScrollOptionsIntoView");
16
18
  const _useSelection = require("../../utils/useSelection");
17
- const _comboboxContext = require("../../contexts/ComboboxContext");
19
+ const _ComboboxContext = require("../../contexts/ComboboxContext");
18
20
  const useListbox_unstable = (props, ref)=>{
19
- const { multiselect } = props;
21
+ var _activeOption;
22
+ const { multiselect } = props;
20
23
  const optionCollection = (0, _useOptionCollection.useOptionCollection)();
21
- const { getCount , getOptionAtIndex , getIndexOfId } = optionCollection;
22
- const { clearSelection , selectedOptions , selectOption } = (0, _useSelection.useSelection)(props);
24
+ const { getCount, getOptionAtIndex, getIndexOfId } = optionCollection;
25
+ const { clearSelection, selectedOptions, selectOption } = (0, _useSelection.useSelection)(props);
23
26
  const [activeOption, setActiveOption] = _react.useState();
24
27
  // track whether keyboard focus outline should be shown
25
28
  // tabster/keyborg doesn't work here, since the actual keyboard focus target doesn't move
@@ -50,12 +53,12 @@ const useListbox_unstable = (props, ref)=>{
50
53
  setFocusVisible(false);
51
54
  };
52
55
  // get state from parent combobox, if it exists
53
- const hasComboboxContext = (0, _reactContextSelector.useHasParentContext)(_comboboxContext.ComboboxContext);
54
- const comboboxActiveOption = (0, _reactContextSelector.useContextSelector)(_comboboxContext.ComboboxContext, (ctx)=>ctx.activeOption);
55
- const comboboxFocusVisible = (0, _reactContextSelector.useContextSelector)(_comboboxContext.ComboboxContext, (ctx)=>ctx.focusVisible);
56
- const comboboxSelectedOptions = (0, _reactContextSelector.useContextSelector)(_comboboxContext.ComboboxContext, (ctx)=>ctx.selectedOptions);
57
- const comboboxSelectOption = (0, _reactContextSelector.useContextSelector)(_comboboxContext.ComboboxContext, (ctx)=>ctx.selectOption);
58
- const comboboxSetActiveOption = (0, _reactContextSelector.useContextSelector)(_comboboxContext.ComboboxContext, (ctx)=>ctx.setActiveOption);
56
+ const hasComboboxContext = (0, _reactcontextselector.useHasParentContext)(_ComboboxContext.ComboboxContext);
57
+ const comboboxActiveOption = (0, _reactcontextselector.useContextSelector)(_ComboboxContext.ComboboxContext, (ctx)=>ctx.activeOption);
58
+ const comboboxFocusVisible = (0, _reactcontextselector.useContextSelector)(_ComboboxContext.ComboboxContext, (ctx)=>ctx.focusVisible);
59
+ const comboboxSelectedOptions = (0, _reactcontextselector.useContextSelector)(_ComboboxContext.ComboboxContext, (ctx)=>ctx.selectedOptions);
60
+ const comboboxSelectOption = (0, _reactcontextselector.useContextSelector)(_ComboboxContext.ComboboxContext, (ctx)=>ctx.selectOption);
61
+ const comboboxSetActiveOption = (0, _reactcontextselector.useContextSelector)(_ComboboxContext.ComboboxContext, (ctx)=>ctx.setActiveOption);
59
62
  // without a parent combobox context, provide values directly from Listbox
60
63
  const optionContextValues = hasComboboxContext ? {
61
64
  activeOption: comboboxActiveOption,
@@ -74,10 +77,10 @@ const useListbox_unstable = (props, ref)=>{
74
77
  components: {
75
78
  root: 'div'
76
79
  },
77
- root: _reactUtilities.slot.always((0, _reactUtilities.getNativeElementProps)('div', {
80
+ root: _reactutilities.slot.always((0, _reactutilities.getNativeElementProps)('div', {
78
81
  ref,
79
82
  role: multiselect ? 'menu' : 'listbox',
80
- 'aria-activedescendant': hasComboboxContext ? undefined : activeOption === null || activeOption === void 0 ? void 0 : activeOption.id,
83
+ 'aria-activedescendant': hasComboboxContext ? undefined : (_activeOption = activeOption) === null || _activeOption === void 0 ? void 0 : _activeOption.id,
81
84
  'aria-multiselectable': multiselect,
82
85
  tabIndex: 0,
83
86
  ...props
@@ -90,8 +93,8 @@ const useListbox_unstable = (props, ref)=>{
90
93
  ...optionContextValues
91
94
  };
92
95
  const scrollContainerRef = (0, _useScrollOptionsIntoView.useScrollOptionsIntoView)(state);
93
- state.root.ref = (0, _reactUtilities.useMergedRefs)(state.root.ref, scrollContainerRef);
94
- state.root.onKeyDown = (0, _reactUtilities.useEventCallback)((0, _reactUtilities.mergeCallbacks)(state.root.onKeyDown, onKeyDown));
95
- state.root.onMouseOver = (0, _reactUtilities.useEventCallback)((0, _reactUtilities.mergeCallbacks)(state.root.onMouseOver, onMouseOver));
96
+ state.root.ref = (0, _reactutilities.useMergedRefs)(state.root.ref, scrollContainerRef);
97
+ state.root.onKeyDown = (0, _reactutilities.useEventCallback)((0, _reactutilities.mergeCallbacks)(state.root.onKeyDown, onKeyDown));
98
+ state.root.onMouseOver = (0, _reactutilities.useEventCallback)((0, _reactutilities.mergeCallbacks)(state.root.onMouseOver, onMouseOver));
96
99
  return state;
97
100
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["useListbox.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, mergeCallbacks, useEventCallback, useMergedRefs, slot } from '@fluentui/react-utilities';\nimport { useContextSelector, useHasParentContext } from '@fluentui/react-context-selector';\nimport { getDropdownActionFromKey, getIndexFromAction } from '../../utils/dropdownKeyActions';\nimport { useOptionCollection } from '../../utils/useOptionCollection';\nimport { useScrollOptionsIntoView } from '../../utils/useScrollOptionsIntoView';\nimport { useSelection } from '../../utils/useSelection';\nimport { ComboboxContext } from '../../contexts/ComboboxContext';\n/**\n * Create the state required to render Listbox.\n *\n * The returned state can be modified with hooks such as useListboxStyles_unstable,\n * before being passed to renderListbox_unstable.\n *\n * @param props - props from this instance of Listbox\n * @param ref - reference to root HTMLElement of Listbox\n */ export const useListbox_unstable = (props, ref)=>{\n const { multiselect } = props;\n const optionCollection = useOptionCollection();\n const { getCount , getOptionAtIndex , getIndexOfId } = optionCollection;\n const { clearSelection , selectedOptions , selectOption } = useSelection(props);\n const [activeOption, setActiveOption] = React.useState();\n // track whether keyboard focus outline should be shown\n // tabster/keyborg doesn't work here, since the actual keyboard focus target doesn't move\n const [focusVisible, setFocusVisible] = React.useState(false);\n const onKeyDown = (event)=>{\n const action = getDropdownActionFromKey(event, {\n open: true\n });\n const maxIndex = getCount() - 1;\n const activeIndex = activeOption ? getIndexOfId(activeOption.id) : -1;\n let newIndex = activeIndex;\n switch(action){\n case 'Select':\n case 'CloseSelect':\n activeOption && selectOption(event, activeOption);\n break;\n default:\n newIndex = getIndexFromAction(action, activeIndex, maxIndex);\n }\n if (newIndex !== activeIndex) {\n // prevent default page scroll/keyboard action if the index changed\n event.preventDefault();\n setActiveOption(getOptionAtIndex(newIndex));\n setFocusVisible(true);\n }\n };\n const onMouseOver = (event)=>{\n setFocusVisible(false);\n };\n // get state from parent combobox, if it exists\n const hasComboboxContext = useHasParentContext(ComboboxContext);\n const comboboxActiveOption = useContextSelector(ComboboxContext, (ctx)=>ctx.activeOption);\n const comboboxFocusVisible = useContextSelector(ComboboxContext, (ctx)=>ctx.focusVisible);\n const comboboxSelectedOptions = useContextSelector(ComboboxContext, (ctx)=>ctx.selectedOptions);\n const comboboxSelectOption = useContextSelector(ComboboxContext, (ctx)=>ctx.selectOption);\n const comboboxSetActiveOption = useContextSelector(ComboboxContext, (ctx)=>ctx.setActiveOption);\n // without a parent combobox context, provide values directly from Listbox\n const optionContextValues = hasComboboxContext ? {\n activeOption: comboboxActiveOption,\n focusVisible: comboboxFocusVisible,\n selectedOptions: comboboxSelectedOptions,\n selectOption: comboboxSelectOption,\n setActiveOption: comboboxSetActiveOption\n } : {\n activeOption,\n focusVisible,\n selectedOptions,\n selectOption,\n setActiveOption\n };\n const state = {\n components: {\n root: 'div'\n },\n root: slot.always(getNativeElementProps('div', {\n ref,\n role: multiselect ? 'menu' : 'listbox',\n 'aria-activedescendant': hasComboboxContext ? undefined : activeOption === null || activeOption === void 0 ? void 0 : activeOption.id,\n 'aria-multiselectable': multiselect,\n tabIndex: 0,\n ...props\n }), {\n elementType: 'div'\n }),\n multiselect,\n clearSelection,\n ...optionCollection,\n ...optionContextValues\n };\n const scrollContainerRef = useScrollOptionsIntoView(state);\n state.root.ref = useMergedRefs(state.root.ref, scrollContainerRef);\n state.root.onKeyDown = useEventCallback(mergeCallbacks(state.root.onKeyDown, onKeyDown));\n state.root.onMouseOver = useEventCallback(mergeCallbacks(state.root.onMouseOver, onMouseOver));\n return state;\n};\n"],"names":["useListbox_unstable","props","ref","multiselect","optionCollection","useOptionCollection","getCount","getOptionAtIndex","getIndexOfId","clearSelection","selectedOptions","selectOption","useSelection","activeOption","setActiveOption","React","useState","focusVisible","setFocusVisible","onKeyDown","event","action","getDropdownActionFromKey","open","maxIndex","activeIndex","id","newIndex","getIndexFromAction","preventDefault","onMouseOver","hasComboboxContext","useHasParentContext","ComboboxContext","comboboxActiveOption","useContextSelector","ctx","comboboxFocusVisible","comboboxSelectedOptions","comboboxSelectOption","comboboxSetActiveOption","optionContextValues","state","components","root","slot","always","getNativeElementProps","role","undefined","tabIndex","elementType","scrollContainerRef","useScrollOptionsIntoView","useMergedRefs","useEventCallback","mergeCallbacks"],"mappings":";;;;+BAgBiBA;;aAAAA;;;6DAhBM;gCACsE;sCACrC;oCACK;qCACzB;0CACK;8BACZ;iCACG;AASrB,MAAMA,sBAAsB,CAACC,OAAOC,MAAM;IACjD,MAAM,EAAEC,YAAW,EAAG,GAAGF;IACzB,MAAMG,mBAAmBC,IAAAA,wCAAmB;IAC5C,MAAM,EAAEC,SAAQ,EAAGC,iBAAgB,EAAGC,aAAY,EAAG,GAAGJ;IACxD,MAAM,EAAEK,eAAc,EAAGC,gBAAe,EAAGC,aAAY,EAAG,GAAGC,IAAAA,0BAAY,EAACX;IAC1E,MAAM,CAACY,cAAcC,gBAAgB,GAAGC,OAAMC,QAAQ;IACtD,uDAAuD;IACvD,yFAAyF;IACzF,MAAM,CAACC,cAAcC,gBAAgB,GAAGH,OAAMC,QAAQ,CAAC,KAAK;IAC5D,MAAMG,YAAY,CAACC,QAAQ;QACvB,MAAMC,SAASC,IAAAA,4CAAwB,EAACF,OAAO;YAC3CG,MAAM,IAAI;QACd;QACA,MAAMC,WAAWlB,aAAa;QAC9B,MAAMmB,cAAcZ,eAAeL,aAAaK,aAAaa,EAAE,IAAI,CAAC,CAAC;QACrE,IAAIC,WA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,IAAIA,iBAAiB,KAAK,IAAI,KAAK,IAAIA,aAAaa,EAAE;YACrI,wBAAwBvB;YACxB+C,UAAU;YACV,GAAGjD,KAAK;QACZ,IAAI;YACAkD,aAAa;QACjB;QACAhD;QACAM;QACA,GAAGL,gBAAgB;QACnB,GAAGqC,mBAAmB;IAC1B;IACA,MAAMW,qBAAqBC,IAAAA,kDAAwB,EAACX;IACpDA,MAAME,IAAI,CAAC1C,GAAG,GAAGoD,IAAAA,6BAAa,EAACZ,MAAME,IAAI,CAAC1C,GAAG,EAAEkD;IAC/CV,MAAME,IAAI,CAACzB,SAAS,GAAGoC,IAAAA,gCAAgB,EAACC,IAAAA,8BAAc,EAACd,MAAME,IAAI,CAACzB,SAAS,EAAEA;IAC7EuB,MAAME,IAAI,CAACd,WAAW,GAAGyB,IAAAA,gCAAgB,EAACC,IAAAA,8BAAc,EAACd,MAAME,IAAI,CAACd,WAAW,EAAEA;IACjF,OAAOY;AACX"}
1
+ {"version":3,"sources":["useListbox.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, mergeCallbacks, useEventCallback, useMergedRefs, slot } from '@fluentui/react-utilities';\nimport { useContextSelector, useHasParentContext } from '@fluentui/react-context-selector';\nimport { getDropdownActionFromKey, getIndexFromAction } from '../../utils/dropdownKeyActions';\nimport { useOptionCollection } from '../../utils/useOptionCollection';\nimport { useScrollOptionsIntoView } from '../../utils/useScrollOptionsIntoView';\nimport { useSelection } from '../../utils/useSelection';\nimport { ComboboxContext } from '../../contexts/ComboboxContext';\n/**\n * Create the state required to render Listbox.\n *\n * The returned state can be modified with hooks such as useListboxStyles_unstable,\n * before being passed to renderListbox_unstable.\n *\n * @param props - props from this instance of Listbox\n * @param ref - reference to root HTMLElement of Listbox\n */ export const useListbox_unstable = (props, ref)=>{\n var _activeOption;\n const { multiselect } = props;\n const optionCollection = useOptionCollection();\n const { getCount, getOptionAtIndex, getIndexOfId } = optionCollection;\n const { clearSelection, selectedOptions, selectOption } = useSelection(props);\n const [activeOption, setActiveOption] = React.useState();\n // track whether keyboard focus outline should be shown\n // tabster/keyborg doesn't work here, since the actual keyboard focus target doesn't move\n const [focusVisible, setFocusVisible] = React.useState(false);\n const onKeyDown = (event)=>{\n const action = getDropdownActionFromKey(event, {\n open: true\n });\n const maxIndex = getCount() - 1;\n const activeIndex = activeOption ? getIndexOfId(activeOption.id) : -1;\n let newIndex = activeIndex;\n switch(action){\n case 'Select':\n case 'CloseSelect':\n activeOption && selectOption(event, activeOption);\n break;\n default:\n newIndex = getIndexFromAction(action, activeIndex, maxIndex);\n }\n if (newIndex !== activeIndex) {\n // prevent default page scroll/keyboard action if the index changed\n event.preventDefault();\n setActiveOption(getOptionAtIndex(newIndex));\n setFocusVisible(true);\n }\n };\n const onMouseOver = (event)=>{\n setFocusVisible(false);\n };\n // get state from parent combobox, if it exists\n const hasComboboxContext = useHasParentContext(ComboboxContext);\n const comboboxActiveOption = useContextSelector(ComboboxContext, (ctx)=>ctx.activeOption);\n const comboboxFocusVisible = useContextSelector(ComboboxContext, (ctx)=>ctx.focusVisible);\n const comboboxSelectedOptions = useContextSelector(ComboboxContext, (ctx)=>ctx.selectedOptions);\n const comboboxSelectOption = useContextSelector(ComboboxContext, (ctx)=>ctx.selectOption);\n const comboboxSetActiveOption = useContextSelector(ComboboxContext, (ctx)=>ctx.setActiveOption);\n // without a parent combobox context, provide values directly from Listbox\n const optionContextValues = hasComboboxContext ? {\n activeOption: comboboxActiveOption,\n focusVisible: comboboxFocusVisible,\n selectedOptions: comboboxSelectedOptions,\n selectOption: comboboxSelectOption,\n setActiveOption: comboboxSetActiveOption\n } : {\n activeOption,\n focusVisible,\n selectedOptions,\n selectOption,\n setActiveOption\n };\n const state = {\n components: {\n root: 'div'\n },\n root: slot.always(getNativeElementProps('div', {\n ref,\n role: multiselect ? 'menu' : 'listbox',\n 'aria-activedescendant': hasComboboxContext ? undefined : (_activeOption = activeOption) === null || _activeOption === void 0 ? void 0 : _activeOption.id,\n 'aria-multiselectable': multiselect,\n tabIndex: 0,\n ...props\n }), {\n elementType: 'div'\n }),\n multiselect,\n clearSelection,\n ...optionCollection,\n ...optionContextValues\n };\n const scrollContainerRef = useScrollOptionsIntoView(state);\n state.root.ref = useMergedRefs(state.root.ref, scrollContainerRef);\n state.root.onKeyDown = useEventCallback(mergeCallbacks(state.root.onKeyDown, onKeyDown));\n state.root.onMouseOver = useEventCallback(mergeCallbacks(state.root.onMouseOver, onMouseOver));\n return state;\n};\n"],"names":["useListbox_unstable","props","ref","_activeOption","multiselect","optionCollection","useOptionCollection","getCount","getOptionAtIndex","getIndexOfId","clearSelection","selectedOptions","selectOption","useSelection","activeOption","setActiveOption","React","useState","focusVisible","setFocusVisible","onKeyDown","event","action","getDropdownActionFromKey","open","maxIndex","activeIndex","id","newIndex","getIndexFromAction","preventDefault","onMouseOver","hasComboboxContext","useHasParentContext","ComboboxContext","comboboxActiveOption","useContextSelector","ctx","comboboxFocusVisible","comboboxSelectedOptions","comboboxSelectOption","comboboxSetActiveOption","optionContextValues","state","components","root","slot","always","getNativeElementProps","role","undefined","tabIndex","elementType","scrollContainerRef","useScrollOptionsIntoView","useMergedRefs","useEventCallback","mergeCallbacks"],"mappings":";;;;+BAgBiBA;;;eAAAA;;;;iEAhBM;gCACsE;sCACrC;oCACK;qCACzB;0CACK;8BACZ;iCACG;AASrB,MAAMA,sBAAsB,CAACC,OAAOC;IAC3C,IAAIC;IACJ,MAAM,EAAEC,WAAW,EAAE,GAAGH;IACxB,MAAMI,mBAAmBC,IAAAA,wCAAmB;IAC5C,MAAM,EAAEC,QAAQ,EAAEC,gBAAgB,EAAEC,YAAY,EAAE,GAAGJ;IACrD,MAAM,EAAEK,cAAc,EAAEC,eAAe,EAAEC,YAAY,EAAE,GAAGC,IAAAA,0BAAY,EAACZ;IACvE,MAAM,CAACa,cAAcC,gBAAgB,GAAGC,OAAMC,QAAQ;IACtD,uDAAuD;IACvD,yFAAyF;IACzF,MAAM,CAACC,cAAcC,gBAAgB,GAAG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C,YAAY;YACRC,MAAM;QACV;QACAA,MAAMC,oBAAI,CAACC,MAAM,CAACC,IAAAA,qCAAqB,EAAC,OAAO;YAC3C9C;YACA+C,MAAM7C,cAAc,SAAS;YAC7B,yBAAyB4B,qBAAqBkB,YAAY,AAAC/C,CAAAA,gBAAgBW,YAAW,MAAO,QAAQX,kBAAkB,KAAK,IAAI,KAAK,IAAIA,cAAcwB,EAAE;YACzJ,wBAAwBvB;YACxB+C,UAAU;YACV,GAAGlD,KAAK;QACZ,IAAI;YACAmD,aAAa;QACjB;QACAhD;QACAM;QACA,GAAGL,gBAAgB;QACnB,GAAGqC,mBAAmB;IAC1B;IACA,MAAMW,qBAAqBC,IAAAA,kDAAwB,EAACX;IACpDA,MAAME,IAAI,CAAC3C,GAAG,GAAGqD,IAAAA,6BAAa,EAACZ,MAAME,IAAI,CAAC3C,GAAG,EAAEmD;IAC/CV,MAAME,IAAI,CAACzB,SAAS,GAAGoC,IAAAA,gCAAgB,EAACC,IAAAA,8BAAc,EAACd,MAAME,IAAI,CAACzB,SAAS,EAAEA;IAC7EuB,MAAME,IAAI,CAACd,WAAW,GAAGyB,IAAAA,gCAAgB,EAACC,IAAAA,8BAAc,EAACd,MAAME,IAAI,CAACd,WAAW,EAAEA;IACjF,OAAOY;AACX"}
@@ -9,8 +9,12 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- listboxClassNames: ()=>listboxClassNames,
13
- useListboxStyles_unstable: ()=>useListboxStyles_unstable
12
+ listboxClassNames: function() {
13
+ return listboxClassNames;
14
+ },
15
+ useListboxStyles_unstable: function() {
16
+ return useListboxStyles_unstable;
17
+ }
14
18
  });
15
19
  const _react = require("@griffel/react");
16
20
  const listboxClassNames = {
@@ -18,7 +22,7 @@ const listboxClassNames = {
18
22
  };
19
23
  /**
20
24
  * Styles for the root slot
21
- */ const useStyles = /*#__PURE__*/ (0, _react["__styles"])({
25
+ */ const useStyles = /*#__PURE__*/ (0, _react.__styles)({
22
26
  root: {
23
27
  De3pzq: "fxugw4r",
24
28
  B7ck84d: "f1ewtqcl",
@@ -1 +1 @@
1
- {"version":3,"sources":["useListboxStyles.styles.js"],"sourcesContent":["import { tokens } from '@fluentui/react-theme';\nimport { __styles, mergeClasses, shorthands } from '@griffel/react';\nexport const listboxClassNames = {\n root: 'fui-Listbox'\n};\n/**\n * Styles for the root slot\n */\nconst useStyles = /*#__PURE__*/__styles({\n root: {\n De3pzq: \"fxugw4r\",\n B7ck84d: \"f1ewtqcl\",\n mc9l5x: \"f22iagw\",\n Beiy3e4: \"f1vx9l62\",\n Bf4jedk: \"f3hsy1e\",\n Bmxbyg5: \"f5zp4f\",\n Bpd4iqm: \"fpvhumw\",\n oeaueh: \"f1yog68k\",\n Bw0xxkn: \"f13sgyd8\",\n z8tnut: \"f1x4af0m\",\n z189sj: [\"f7x41pl\", \"fruq291\"],\n Byoj8tv: \"fd55psn\",\n uwmqm3: [\"fruq291\", \"f7x41pl\"],\n Belr9w4: \"fiut8dr\"\n }\n}, {\n d: [\".fxugw4r{background-color:var(--colorNeutralBackground1);}\", \".f1ewtqcl{box-sizing:border-box;}\", \".f22iagw{display:flex;}\", \".f1vx9l62{flex-direction:column;}\", \".f3hsy1e{min-width:160px;}\", \".f5zp4f{overflow-y:auto;}\", \".fpvhumw{outline-width:1px;}\", \".f1yog68k{outline-style:solid;}\", \".f13sgyd8{outline-color:var(--colorTransparentStroke);}\", \".f1x4af0m{padding-top:var(--spacingHorizontalXS);}\", \".f7x41pl{padding-right:var(--spacingHorizontalXS);}\", \".fruq291{padding-left:var(--spacingHorizontalXS);}\", \".fd55psn{padding-bottom:var(--spacingHorizontalXS);}\", \".fiut8dr{row-gap:var(--spacingHorizontalXXS);}\"]\n});\n/**\n * Apply styling to the Listbox slots based on the state\n */\nexport const useListboxStyles_unstable = state => {\n const styles = useStyles();\n state.root.className = mergeClasses(listboxClassNames.root, styles.root, state.root.className);\n return state;\n};\n//# sourceMappingURL=useListboxStyles.styles.js.map"],"names":["listboxClassNames","useListboxStyles_unstable","root","useStyles","__styles","De3pzq","B7ck84d","mc9l5x","Beiy3e4","Bf4jedk","Bmxbyg5","Bpd4iqm","oeaueh","Bw0xxkn","z8tnut","z189sj","Byoj8tv","uwmqm3","Belr9w4","d","state","styles","className","mergeClasses"],"mappings":";;;;;;;;;;;IAEaA,iBAAiB,MAAjBA;IA6BAC,yBAAyB,MAAzBA;;uBA9BsC;AAC5C,MAAMD,oBAAoB;IAC/BE,MAAM;AACR;AACA;;CAEC,GACD,MAAMC,YAAY,WAAW,GAAEC,IAAAA,kBAAQ,EAAC;IACtCF,MAAM;QACJG,QAAQ;QACRC,SAAS;QACTC,QAAQ;QACRC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,QAAQ;QACRC,SAAS;QACTC,QAAQ;QACRC,QAAQ;YAAC;YAAW;SAAU;QAC9BC,SAAS;QACTC,QAAQ;YAAC;YAAW;SAAU;QAC9BC,SAAS;IACX;AACF,GAAG;IACDC,GAAG;QAAC;QAA8D;QAAqC;QAA2B;QAAqC;QAA8B;QAA6B;QAAgC;QAAmC;QAA2D;QAAsD;QAAuD;QAAsD;QAAwD;KAAiD;AAC9mB;AAIO,MAAMlB,4BAA4BmB,CAAAA,QAAS;IAChD,MAAMC,SAASlB;IACfiB,MAAMlB,IAAI,CAACoB,SAAS,GAAGC,IAAAA,mBAAY,EAACvB,kBAAkBE,IAAI,EAAEmB,OAAOnB,IAAI,EAAEkB,MAAMlB,IAAI,CAACoB,SAAS;IAC7F,OAAOF;AACT,GACA,mDAAmD"}
1
+ {"version":3,"sources":["useListboxStyles.styles.js"],"sourcesContent":["import { tokens } from '@fluentui/react-theme';\nimport { __styles, mergeClasses, shorthands } from '@griffel/react';\nexport const listboxClassNames = {\n root: 'fui-Listbox'\n};\n/**\n * Styles for the root slot\n */\nconst useStyles = /*#__PURE__*/__styles({\n root: {\n De3pzq: \"fxugw4r\",\n B7ck84d: \"f1ewtqcl\",\n mc9l5x: \"f22iagw\",\n Beiy3e4: \"f1vx9l62\",\n Bf4jedk: \"f3hsy1e\",\n Bmxbyg5: \"f5zp4f\",\n Bpd4iqm: \"fpvhumw\",\n oeaueh: \"f1yog68k\",\n Bw0xxkn: \"f13sgyd8\",\n z8tnut: \"f1x4af0m\",\n z189sj: [\"f7x41pl\", \"fruq291\"],\n Byoj8tv: \"fd55psn\",\n uwmqm3: [\"fruq291\", \"f7x41pl\"],\n Belr9w4: \"fiut8dr\"\n }\n}, {\n d: [\".fxugw4r{background-color:var(--colorNeutralBackground1);}\", \".f1ewtqcl{box-sizing:border-box;}\", \".f22iagw{display:flex;}\", \".f1vx9l62{flex-direction:column;}\", \".f3hsy1e{min-width:160px;}\", \".f5zp4f{overflow-y:auto;}\", \".fpvhumw{outline-width:1px;}\", \".f1yog68k{outline-style:solid;}\", \".f13sgyd8{outline-color:var(--colorTransparentStroke);}\", \".f1x4af0m{padding-top:var(--spacingHorizontalXS);}\", \".f7x41pl{padding-right:var(--spacingHorizontalXS);}\", \".fruq291{padding-left:var(--spacingHorizontalXS);}\", \".fd55psn{padding-bottom:var(--spacingHorizontalXS);}\", \".fiut8dr{row-gap:var(--spacingHorizontalXXS);}\"]\n});\n/**\n * Apply styling to the Listbox slots based on the state\n */\nexport const useListboxStyles_unstable = state => {\n const styles = useStyles();\n state.root.className = mergeClasses(listboxClassNames.root, styles.root, state.root.className);\n return state;\n};\n//# sourceMappingURL=useListboxStyles.styles.js.map"],"names":["listboxClassNames","useListboxStyles_unstable","root","useStyles","__styles","De3pzq","B7ck84d","mc9l5x","Beiy3e4","Bf4jedk","Bmxbyg5","Bpd4iqm","oeaueh","Bw0xxkn","z8tnut","z189sj","Byoj8tv","uwmqm3","Belr9w4","d","state","styles","className","mergeClasses"],"mappings":";;;;;;;;;;;IAEaA,iBAAiB;eAAjBA;;IA6BAC,yBAAyB;eAAzBA;;;uBA9BsC;AAC5C,MAAMD,oBAAoB;IAC/BE,MAAM;AACR;AACA;;CAEC,GACD,MAAMC,YAAY,WAAW,GAAEC,IAAAA,eAAQ,EAAC;IACtCF,MAAM;QACJG,QAAQ;QACRC,SAAS;QACTC,QAAQ;QACRC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,QAAQ;QACRC,SAAS;QACTC,QAAQ;QACRC,QAAQ;YAAC;YAAW;SAAU;QAC9BC,SAAS;QACTC,QAAQ;YAAC;YAAW;SAAU;QAC9BC,SAAS;IACX;AACF,GAAG;IACDC,GAAG;QAAC;QAA8D;QAAqC;QAA2B;QAAqC;QAA8B;QAA6B;QAAgC;QAAmC;QAA2D;QAAsD;QAAuD;QAAsD;QAAwD;KAAiD;AAC9mB;AAIO,MAAMlB,4BAA4BmB,CAAAA;IACvC,MAAMC,SAASlB;IACfiB,MAAMlB,IAAI,CAACoB,SAAS,GAAGC,IAAAA,mBAAY,EAACvB,kBAAkBE,IAAI,EAAEmB,OAAOnB,IAAI,EAAEkB,MAAMlB,IAAI,CAACoB,SAAS;IAC7F,OAAOF;AACT,GACA,mDAAmD"}
@@ -4,18 +4,20 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(exports, "Option", {
6
6
  enumerable: true,
7
- get: ()=>Option
7
+ get: function() {
8
+ return Option;
9
+ }
8
10
  });
9
- const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
- const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
11
13
  const _useOption = require("./useOption");
12
14
  const _renderOption = require("./renderOption");
13
- const _useOptionStylesStyles = require("./useOptionStyles.styles");
14
- const _reactSharedContexts = require("@fluentui/react-shared-contexts");
15
+ const _useOptionStylesstyles = require("./useOptionStyles.styles");
16
+ const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
15
17
  const Option = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
16
18
  const state = (0, _useOption.useOption_unstable)(props, ref);
17
- (0, _useOptionStylesStyles.useOptionStyles_unstable)(state);
18
- (0, _reactSharedContexts.useCustomStyleHook_unstable)('useOptionStyles_unstable')(state);
19
+ (0, _useOptionStylesstyles.useOptionStyles_unstable)(state);
20
+ (0, _reactsharedcontexts.useCustomStyleHook_unstable)('useOptionStyles_unstable')(state);
19
21
  return (0, _renderOption.renderOption_unstable)(state);
20
22
  });
21
23
  Option.displayName = 'Option';
@@ -1 +1 @@
1
- {"version":3,"sources":["Option.js"],"sourcesContent":["import * as React from 'react';\nimport { useOption_unstable } from './useOption';\nimport { renderOption_unstable } from './renderOption';\nimport { useOptionStyles_unstable } from './useOptionStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * Option component: a styled child option of a Combobox\n */ export const Option = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useOption_unstable(props, ref);\n useOptionStyles_unstable(state);\n useCustomStyleHook_unstable('useOptionStyles_unstable')(state);\n return renderOption_unstable(state);\n});\nOption.displayName = 'Option';\n"],"names":["Option","React","forwardRef","props","ref","state","useOption_unstable","useOptionStyles_unstable","useCustomStyleHook_unstable","renderOption_unstable","displayName"],"mappings":";;;;+BAOiBA;;aAAAA;;;6DAPM;2BACY;8BACG;uCACG;qCACG;AAGjC,MAAMA,SAAS,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAM;IACnE,MAAMC,QAAQC,IAAAA,6BAAkB,EAACH,OAAOC;IACxCG,IAAAA,+CAAwB,EAACF;IACzBG,IAAAA,gDAA2B,EAAC,4BAA4BH;IACxD,OAAOI,IAAAA,mCAAqB,EAACJ;AACjC;AACAL,OAAOU,WAAW,GAAG"}
1
+ {"version":3,"sources":["Option.js"],"sourcesContent":["import * as React from 'react';\nimport { useOption_unstable } from './useOption';\nimport { renderOption_unstable } from './renderOption';\nimport { useOptionStyles_unstable } from './useOptionStyles.styles';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * Option component: a styled child option of a Combobox\n */ export const Option = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useOption_unstable(props, ref);\n useOptionStyles_unstable(state);\n useCustomStyleHook_unstable('useOptionStyles_unstable')(state);\n return renderOption_unstable(state);\n});\nOption.displayName = 'Option';\n"],"names":["Option","React","forwardRef","props","ref","state","useOption_unstable","useOptionStyles_unstable","useCustomStyleHook_unstable","renderOption_unstable","displayName"],"mappings":";;;;+BAOiBA;;;eAAAA;;;;iEAPM;2BACY;8BACG;uCACG;qCACG;AAGjC,MAAMA,SAAS,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC7D,MAAMC,QAAQC,IAAAA,6BAAkB,EAACH,OAAOC;IACxCG,IAAAA,+CAAwB,EAACF;IACzBG,IAAAA,gDAA2B,EAAC,4BAA4BH;IACxD,OAAOI,IAAAA,mCAAqB,EAACJ;AACjC;AACAL,OAAOU,WAAW,GAAG"}
@@ -2,5 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
6
- const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
5
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
6
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
@@ -1 +1 @@
1
- {"version":3,"sources":["Option.types.js"],"sourcesContent":["import * as React from 'react';\n"],"names":[],"mappings":";;;;;6DAAuB"}
1
+ {"version":3,"sources":["Option.types.js"],"sourcesContent":["import * as React from 'react';\n"],"names":[],"mappings":";;;;;iEAAuB"}
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
- _exportStar(require("./Option"), exports);
7
- _exportStar(require("./Option.types"), exports);
8
- _exportStar(require("./renderOption"), exports);
9
- _exportStar(require("./useOption"), exports);
10
- _exportStar(require("./useOptionStyles.styles"), exports);
5
+ const _export_star = require("@swc/helpers/_/_export_star");
6
+ _export_star._(require("./Option"), exports);
7
+ _export_star._(require("./Option.types"), exports);
8
+ _export_star._(require("./renderOption"), exports);
9
+ _export_star._(require("./useOption"), exports);
10
+ _export_star._(require("./useOptionStyles.styles"), exports);
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export * from './Option';\nexport * from './Option.types';\nexport * from './renderOption';\nexport * from './useOption';\nexport * from './useOptionStyles.styles';\n"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA"}
1
+ {"version":3,"sources":["index.js"],"sourcesContent":["export * from './Option';\nexport * from './Option.types';\nexport * from './renderOption';\nexport * from './useOption';\nexport * from './useOptionStyles.styles';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
@@ -1,14 +1,21 @@
1
- /** @jsxRuntime classic */ /** @jsx createElement */ "use strict";
1
+ /** @jsxRuntime automatic */ /** @jsxImportSource @fluentui/react-jsx-runtime */ "use strict";
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
5
  Object.defineProperty(exports, "renderOption_unstable", {
6
6
  enumerable: true,
7
- get: ()=>renderOption_unstable
7
+ get: function() {
8
+ return renderOption_unstable;
9
+ }
8
10
  });
9
- const _reactJsxRuntime = require("@fluentui/react-jsx-runtime");
10
- const _reactUtilities = require("@fluentui/react-utilities");
11
+ const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
12
+ const _reactutilities = require("@fluentui/react-utilities");
11
13
  const renderOption_unstable = (state)=>{
12
- (0, _reactUtilities.assertSlots)(state);
13
- return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.root, null, state.checkIcon && /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.checkIcon, null), state.root.children);
14
+ (0, _reactutilities.assertSlots)(state);
15
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(state.root, {
16
+ children: [
17
+ state.checkIcon && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.checkIcon, {}),
18
+ state.root.children
19
+ ]
20
+ });
14
21
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderOption.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { assertSlots } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of Option\n */ export const renderOption_unstable = (state)=>{\n assertSlots(state);\n return /*#__PURE__*/ createElement(state.root, null, state.checkIcon && /*#__PURE__*/ createElement(state.checkIcon, null), state.root.children);\n};\n"],"names":["renderOption_unstable","state","assertSlots","createElement","root","checkIcon","children"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAIjCA;;aAAAA;;iCAJkE;gCACvD;AAGjB,MAAMA,wBAAwB,CAACC,QAAQ;IAC9CC,IAAAA,2BAAW,EAACD;IACZ,OAAO,WAAW,GAAGE,IAAAA,8BAAa,EAACF,MAAMG,IAAI,EAAE,IAAI,EAAEH,MAAMI,SAAS,IAAI,WAAW,GAAGF,IAAAA,8BAAa,EAACF,MAAMI,SAAS,EAAE,IAAI,GAAGJ,MAAMG,IAAI,CAACE,QAAQ;AACnJ"}
1
+ {"version":3,"sources":["renderOption.js"],"sourcesContent":["/** @jsxRuntime automatic */ /** @jsxImportSource @fluentui/react-jsx-runtime */ 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 Option\n */ export const renderOption_unstable = (state)=>{\n assertSlots(state);\n return /*#__PURE__*/ _jsxs(state.root, {\n children: [\n state.checkIcon && /*#__PURE__*/ _jsx(state.checkIcon, {}),\n state.root.children\n ]\n });\n};\n"],"names":["renderOption_unstable","state","assertSlots","_jsxs","root","children","checkIcon","_jsx"],"mappings":"AAAA,0BAA0B,GAAG,iDAAiD;;;;+BAI7DA;;;eAAAA;;;4BAJ2G;gCAChG;AAGjB,MAAMA,wBAAwB,CAACC;IACtCC,IAAAA,2BAAW,EAACD;IACZ,OAAO,WAAW,GAAGE,IAAAA,gBAAK,EAACF,MAAMG,IAAI,EAAE;QACnCC,UAAU;YACNJ,MAAMK,SAAS,IAAI,WAAW,GAAGC,IAAAA,eAAI,EAACN,MAAMK,SAAS,EAAE,CAAC;YACxDL,MAAMG,IAAI,CAACC,QAAQ;SACtB;IACL;AACJ"}
@@ -4,15 +4,17 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(exports, "useOption_unstable", {
6
6
  enumerable: true,
7
- get: ()=>useOption_unstable
7
+ get: function() {
8
+ return useOption_unstable;
9
+ }
8
10
  });
9
- const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
- const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
- const _reactUtilities = require("@fluentui/react-utilities");
12
- const _reactContextSelector = require("@fluentui/react-context-selector");
13
- const _reactIcons = require("@fluentui/react-icons");
14
- const _comboboxContext = require("../../contexts/ComboboxContext");
15
- const _listboxContext = require("../../contexts/ListboxContext");
11
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
+ const _reactutilities = require("@fluentui/react-utilities");
14
+ const _reactcontextselector = require("@fluentui/react-context-selector");
15
+ const _reacticons = require("@fluentui/react-icons");
16
+ const _ComboboxContext = require("../../contexts/ComboboxContext");
17
+ const _ListboxContext = require("../../contexts/ListboxContext");
16
18
  function getTextString(text, children) {
17
19
  if (text !== undefined) {
18
20
  return text;
@@ -34,12 +36,12 @@ function getTextString(text, children) {
34
36
  return textString;
35
37
  }
36
38
  const useOption_unstable = (props, ref)=>{
37
- const { children , disabled , text , value } = props;
39
+ const { children, disabled, text, value } = props;
38
40
  const optionRef = _react.useRef(null);
39
41
  const optionText = getTextString(text, children);
40
42
  const optionValue = value !== null && value !== void 0 ? value : optionText;
41
43
  // use the id if provided, otherwise use a generated id
42
- const id = (0, _reactUtilities.useId)('fluent-option', props.id);
44
+ const id = (0, _reactutilities.useId)('fluent-option', props.id);
43
45
  // data used for context registration & events
44
46
  const optionData = _react.useMemo(()=>({
45
47
  id,
@@ -53,28 +55,28 @@ const useOption_unstable = (props, ref)=>{
53
55
  optionValue
54
56
  ]);
55
57
  // context values
56
- const focusVisible = (0, _reactContextSelector.useContextSelector)(_listboxContext.ListboxContext, (ctx)=>ctx.focusVisible);
57
- const multiselect = (0, _reactContextSelector.useContextSelector)(_listboxContext.ListboxContext, (ctx)=>ctx.multiselect);
58
- const registerOption = (0, _reactContextSelector.useContextSelector)(_listboxContext.ListboxContext, (ctx)=>ctx.registerOption);
59
- const selected = (0, _reactContextSelector.useContextSelector)(_listboxContext.ListboxContext, (ctx)=>{
58
+ const focusVisible = (0, _reactcontextselector.useContextSelector)(_ListboxContext.ListboxContext, (ctx)=>ctx.focusVisible);
59
+ const multiselect = (0, _reactcontextselector.useContextSelector)(_ListboxContext.ListboxContext, (ctx)=>ctx.multiselect);
60
+ const registerOption = (0, _reactcontextselector.useContextSelector)(_ListboxContext.ListboxContext, (ctx)=>ctx.registerOption);
61
+ const selected = (0, _reactcontextselector.useContextSelector)(_ListboxContext.ListboxContext, (ctx)=>{
60
62
  const selectedOptions = ctx.selectedOptions;
61
63
  return !!optionValue && !!selectedOptions.find((o)=>o === optionValue);
62
64
  });
63
- const selectOption = (0, _reactContextSelector.useContextSelector)(_listboxContext.ListboxContext, (ctx)=>ctx.selectOption);
64
- const setActiveOption = (0, _reactContextSelector.useContextSelector)(_listboxContext.ListboxContext, (ctx)=>ctx.setActiveOption);
65
- const setOpen = (0, _reactContextSelector.useContextSelector)(_comboboxContext.ComboboxContext, (ctx)=>ctx.setOpen);
65
+ const selectOption = (0, _reactcontextselector.useContextSelector)(_ListboxContext.ListboxContext, (ctx)=>ctx.selectOption);
66
+ const setActiveOption = (0, _reactcontextselector.useContextSelector)(_ListboxContext.ListboxContext, (ctx)=>ctx.setActiveOption);
67
+ const setOpen = (0, _reactcontextselector.useContextSelector)(_ComboboxContext.ComboboxContext, (ctx)=>ctx.setOpen);
66
68
  // current active option?
67
- const active = (0, _reactContextSelector.useContextSelector)(_listboxContext.ListboxContext, (ctx)=>{
69
+ const active = (0, _reactcontextselector.useContextSelector)(_ListboxContext.ListboxContext, (ctx)=>{
68
70
  var _ctx_activeOption, _ctx_activeOption1;
69
71
  return ((_ctx_activeOption = ctx.activeOption) === null || _ctx_activeOption === void 0 ? void 0 : _ctx_activeOption.id) !== undefined && ((_ctx_activeOption1 = ctx.activeOption) === null || _ctx_activeOption1 === void 0 ? void 0 : _ctx_activeOption1.id) === id;
70
72
  });
71
73
  // check icon
72
- let CheckIcon = /*#__PURE__*/ _react.createElement(_reactIcons.CheckmarkFilled, null);
74
+ let CheckIcon = /*#__PURE__*/ _react.createElement(_reacticons.CheckmarkFilled, null);
73
75
  if (multiselect) {
74
- CheckIcon = selected ? /*#__PURE__*/ _react.createElement(_reactIcons.Checkmark12Filled, null) : '';
76
+ CheckIcon = selected ? /*#__PURE__*/ _react.createElement(_reacticons.Checkmark12Filled, null) : '';
75
77
  }
76
78
  const onClick = (event)=>{
77
- var _props_onClick;
79
+ var _props_onClick, _props;
78
80
  if (disabled) {
79
81
  event.preventDefault();
80
82
  return;
@@ -83,11 +85,12 @@ const useOption_unstable = (props, ref)=>{
83
85
  setActiveOption(optionData);
84
86
  // close on option click for single-select options in a combobox
85
87
  if (!multiselect) {
86
- setOpen === null || setOpen === void 0 ? void 0 : setOpen(event, false);
88
+ var _setOpen;
89
+ (_setOpen = setOpen) === null || _setOpen === void 0 ? void 0 : _setOpen(event, false);
87
90
  }
88
91
  // handle selection change
89
92
  selectOption(event, optionData);
90
- (_props_onClick = props.onClick) === null || _props_onClick === void 0 ? void 0 : _props_onClick.call(props, event);
93
+ (_props_onClick = (_props = props).onClick) === null || _props_onClick === void 0 ? void 0 : _props_onClick.call(_props, event);
91
94
  };
92
95
  // register option data with context
93
96
  _react.useEffect(()=>{
@@ -111,8 +114,8 @@ const useOption_unstable = (props, ref)=>{
111
114
  root: 'div',
112
115
  checkIcon: 'span'
113
116
  },
114
- root: _reactUtilities.slot.always((0, _reactUtilities.getNativeElementProps)('div', {
115
- ref: (0, _reactUtilities.useMergedRefs)(ref, optionRef),
117
+ root: _reactutilities.slot.always((0, _reactutilities.getNativeElementProps)('div', {
118
+ ref: (0, _reactutilities.useMergedRefs)(ref, optionRef),
116
119
  'aria-disabled': disabled ? 'true' : undefined,
117
120
  id,
118
121
  ...semanticProps,
@@ -121,7 +124,7 @@ const useOption_unstable = (props, ref)=>{
121
124
  }), {
122
125
  elementType: 'div'
123
126
  }),
124
- checkIcon: _reactUtilities.slot.optional(props.checkIcon, {
127
+ checkIcon: _reactutilities.slot.optional(props.checkIcon, {
125
128
  renderByDefault: true,
126
129
  defaultProps: {
127
130
  'aria-hidden': 'true',
@@ -1 +1 @@
1
- {"version":3,"sources":["useOption.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, useId, useMergedRefs, slot } from '@fluentui/react-utilities';\nimport { useContextSelector } from '@fluentui/react-context-selector';\nimport { CheckmarkFilled, Checkmark12Filled } from '@fluentui/react-icons';\nimport { ComboboxContext } from '../../contexts/ComboboxContext';\nimport { ListboxContext } from '../../contexts/ListboxContext';\nfunction getTextString(text, children) {\n if (text !== undefined) {\n return text;\n }\n let textString = '';\n let hasNonStringChild = false;\n React.Children.forEach(children, (child)=>{\n if (typeof child === 'string') {\n textString += child;\n } else {\n hasNonStringChild = true;\n }\n });\n // warn if an Option has non-string children and no text prop\n if (hasNonStringChild) {\n // eslint-disable-next-line no-console\n console.warn('Provide a `text` prop to Option components when they contain non-string children.');\n }\n return textString;\n}\n/**\n * Create the state required to render Option.\n *\n * The returned state can be modified with hooks such as useOptionStyles_unstable,\n * before being passed to renderOption_unstable.\n *\n * @param props - props from this instance of Option\n * @param ref - reference to root HTMLElement of Option\n */ export const useOption_unstable = (props, ref)=>{\n const { children , disabled , text , value } = props;\n const optionRef = React.useRef(null);\n const optionText = getTextString(text, children);\n const optionValue = value !== null && value !== void 0 ? value : optionText;\n // use the id if provided, otherwise use a generated id\n const id = useId('fluent-option', props.id);\n // data used for context registration & events\n const optionData = React.useMemo(()=>({\n id,\n disabled,\n text: optionText,\n value: optionValue\n }), [\n id,\n disabled,\n optionText,\n optionValue\n ]);\n // context values\n const focusVisible = useContextSelector(ListboxContext, (ctx)=>ctx.focusVisible);\n const multiselect = useContextSelector(ListboxContext, (ctx)=>ctx.multiselect);\n const registerOption = useContextSelector(ListboxContext, (ctx)=>ctx.registerOption);\n const selected = useContextSelector(ListboxContext, (ctx)=>{\n const selectedOptions = ctx.selectedOptions;\n return !!optionValue && !!selectedOptions.find((o)=>o === optionValue);\n });\n const selectOption = useContextSelector(ListboxContext, (ctx)=>ctx.selectOption);\n const setActiveOption = useContextSelector(ListboxContext, (ctx)=>ctx.setActiveOption);\n const setOpen = useContextSelector(ComboboxContext, (ctx)=>ctx.setOpen);\n // current active option?\n const active = useContextSelector(ListboxContext, (ctx)=>{\n var _ctx_activeOption, _ctx_activeOption1;\n return ((_ctx_activeOption = ctx.activeOption) === null || _ctx_activeOption === void 0 ? void 0 : _ctx_activeOption.id) !== undefined && ((_ctx_activeOption1 = ctx.activeOption) === null || _ctx_activeOption1 === void 0 ? void 0 : _ctx_activeOption1.id) === id;\n });\n // check icon\n let CheckIcon = /*#__PURE__*/ React.createElement(CheckmarkFilled, null);\n if (multiselect) {\n CheckIcon = selected ? /*#__PURE__*/ React.createElement(Checkmark12Filled, null) : '';\n }\n const onClick = (event)=>{\n var _props_onClick;\n if (disabled) {\n event.preventDefault();\n return;\n }\n // clicked option should always become active option\n setActiveOption(optionData);\n // close on option click for single-select options in a combobox\n if (!multiselect) {\n setOpen === null || setOpen === void 0 ? void 0 : setOpen(event, false);\n }\n // handle selection change\n selectOption(event, optionData);\n (_props_onClick = props.onClick) === null || _props_onClick === void 0 ? void 0 : _props_onClick.call(props, event);\n };\n // register option data with context\n React.useEffect(()=>{\n if (id && optionRef.current) {\n return registerOption(optionData, optionRef.current);\n }\n }, [\n id,\n optionData,\n registerOption\n ]);\n const semanticProps = multiselect ? {\n role: 'menuitemcheckbox',\n 'aria-checked': selected\n } : {\n role: 'option',\n 'aria-selected': selected\n };\n return {\n components: {\n root: 'div',\n checkIcon: 'span'\n },\n root: slot.always(getNativeElementProps('div', {\n ref: useMergedRefs(ref, optionRef),\n 'aria-disabled': disabled ? 'true' : undefined,\n id,\n ...semanticProps,\n ...props,\n onClick\n }), {\n elementType: 'div'\n }),\n checkIcon: slot.optional(props.checkIcon, {\n renderByDefault: true,\n defaultProps: {\n 'aria-hidden': 'true',\n children: CheckIcon\n },\n elementType: 'span'\n }),\n active,\n disabled,\n focusVisible,\n multiselect,\n selected\n };\n};\n"],"names":["useOption_unstable","getTextString","text","children","undefined","textString","hasNonStringChild","React","Children","forEach","child","console","warn","props","ref","disabled","value","optionRef","useRef","optionText","optionValue","id","useId","optionData","useMemo","focusVisible","useContextSelector","ListboxContext","ctx","multiselect","registerOption","selected","selectedOptions","find","o","selectOption","setActiveOption","setOpen","ComboboxContext","active","_ctx_activeOption","_ctx_activeOption1","activeOption","CheckIcon","createElement","CheckmarkFilled","Checkmark12Filled","onClick","event","_props_onClick","preventDefault","call","useEffect","current","semanticProps","role","components","root","checkIcon","slot","always","getNativeElementProps","useMergedRefs","elementType","optional","renderByDefault","defaultProps"],"mappings":";;;;+BAkCiBA;;aAAAA;;;6DAlCM;gCAC2C;sCAC/B;4BACgB;iCACnB;gCACD;AAC/B,SAASC,cAAcC,IAAI,EAAEC,QAAQ,EAAE;IACnC,IAAID,SAASE,WAAW;QACpB,OAAOF;IACX,CAAC;IACD,IAAIG,aAAa;IACjB,IAAIC,oBAAoB,KAAK;IAC7BC,OAAMC,QAAQ,CAACC,OAAO,CAACN,UAAU,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I,CAACtC,OAAOmC,MAAM;IACvH;IACA,oCAAoC;IACpCzC,OAAM6C,SAAS,CAAC,IAAI;QAChB,IAAI/B,MAAMJ,UAAUoC,OAAO,EAAE;YACzB,OAAOvB,eAAeP,YAAYN,UAAUoC,OAAO;QACvD,CAAC;IACL,GAAG;QACChC;QACAE;QACAO;KACH;IACD,MAAMwB,gBAAgBzB,cAAc;QAChC0B,MAAM;QACN,gBAAgBxB;IACpB,IAAI;QACAwB,MAAM;QACN,iBAAiBxB;IACrB,CAAC;IACD,OAAO;QACHyB,YAAY;YACRC,MAAM;YACNC,WAAW;QACf;QACAD,MAAME,oBAAI,CAACC,MAAM,CAACC,IAAAA,qCAAqB,EAAC,OAAO;YAC3C/C,KAAKgD,IAAAA,6BAAa,EAAChD,KAAKG;YACxB,iBAAiBF,WAAW,SAASX,SAAS;YAC9CiB;YACA,GAAGiC,aAAa;YAChB,GAAGzC,KAAK;YACRkC;QACJ,IAAI;YACAgB,aAAa;QACjB;QACAL,WAAWC,oBAAI,CAACK,QAAQ,CAACnD,MAAM6C,SAAS,EAAE;YACtCO,iBAAiB,IAAI;YACrBC,cAAc;gBACV,eAAe;gBACf/D,UAAUwC;YACd;YACAoB,aAAa;QACjB;QACAxB;QACAxB;QACAU;QACAI;QACAE;IACJ;AACJ"}
1
+ {"version":3,"sources":["useOption.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, useId, useMergedRefs, slot } from '@fluentui/react-utilities';\nimport { useContextSelector } from '@fluentui/react-context-selector';\nimport { CheckmarkFilled, Checkmark12Filled } from '@fluentui/react-icons';\nimport { ComboboxContext } from '../../contexts/ComboboxContext';\nimport { ListboxContext } from '../../contexts/ListboxContext';\nfunction getTextString(text, children) {\n if (text !== undefined) {\n return text;\n }\n let textString = '';\n let hasNonStringChild = false;\n React.Children.forEach(children, (child)=>{\n if (typeof child === 'string') {\n textString += child;\n } else {\n hasNonStringChild = true;\n }\n });\n // warn if an Option has non-string children and no text prop\n if (hasNonStringChild) {\n // eslint-disable-next-line no-console\n console.warn('Provide a `text` prop to Option components when they contain non-string children.');\n }\n return textString;\n}\n/**\n * Create the state required to render Option.\n *\n * The returned state can be modified with hooks such as useOptionStyles_unstable,\n * before being passed to renderOption_unstable.\n *\n * @param props - props from this instance of Option\n * @param ref - reference to root HTMLElement of Option\n */ export const useOption_unstable = (props, ref)=>{\n const { children, disabled, text, value } = props;\n const optionRef = React.useRef(null);\n const optionText = getTextString(text, children);\n const optionValue = value !== null && value !== void 0 ? value : optionText;\n // use the id if provided, otherwise use a generated id\n const id = useId('fluent-option', props.id);\n // data used for context registration & events\n const optionData = React.useMemo(()=>({\n id,\n disabled,\n text: optionText,\n value: optionValue\n }), [\n id,\n disabled,\n optionText,\n optionValue\n ]);\n // context values\n const focusVisible = useContextSelector(ListboxContext, (ctx)=>ctx.focusVisible);\n const multiselect = useContextSelector(ListboxContext, (ctx)=>ctx.multiselect);\n const registerOption = useContextSelector(ListboxContext, (ctx)=>ctx.registerOption);\n const selected = useContextSelector(ListboxContext, (ctx)=>{\n const selectedOptions = ctx.selectedOptions;\n return !!optionValue && !!selectedOptions.find((o)=>o === optionValue);\n });\n const selectOption = useContextSelector(ListboxContext, (ctx)=>ctx.selectOption);\n const setActiveOption = useContextSelector(ListboxContext, (ctx)=>ctx.setActiveOption);\n const setOpen = useContextSelector(ComboboxContext, (ctx)=>ctx.setOpen);\n // current active option?\n const active = useContextSelector(ListboxContext, (ctx)=>{\n var _ctx_activeOption, _ctx_activeOption1;\n return ((_ctx_activeOption = ctx.activeOption) === null || _ctx_activeOption === void 0 ? void 0 : _ctx_activeOption.id) !== undefined && ((_ctx_activeOption1 = ctx.activeOption) === null || _ctx_activeOption1 === void 0 ? void 0 : _ctx_activeOption1.id) === id;\n });\n // check icon\n let CheckIcon = /*#__PURE__*/ React.createElement(CheckmarkFilled, null);\n if (multiselect) {\n CheckIcon = selected ? /*#__PURE__*/ React.createElement(Checkmark12Filled, null) : '';\n }\n const onClick = (event)=>{\n var _props_onClick, _props;\n if (disabled) {\n event.preventDefault();\n return;\n }\n // clicked option should always become active option\n setActiveOption(optionData);\n // close on option click for single-select options in a combobox\n if (!multiselect) {\n var _setOpen;\n (_setOpen = setOpen) === null || _setOpen === void 0 ? void 0 : _setOpen(event, false);\n }\n // handle selection change\n selectOption(event, optionData);\n (_props_onClick = (_props = props).onClick) === null || _props_onClick === void 0 ? void 0 : _props_onClick.call(_props, event);\n };\n // register option data with context\n React.useEffect(()=>{\n if (id && optionRef.current) {\n return registerOption(optionData, optionRef.current);\n }\n }, [\n id,\n optionData,\n registerOption\n ]);\n const semanticProps = multiselect ? {\n role: 'menuitemcheckbox',\n 'aria-checked': selected\n } : {\n role: 'option',\n 'aria-selected': selected\n };\n return {\n components: {\n root: 'div',\n checkIcon: 'span'\n },\n root: slot.always(getNativeElementProps('div', {\n ref: useMergedRefs(ref, optionRef),\n 'aria-disabled': disabled ? 'true' : undefined,\n id,\n ...semanticProps,\n ...props,\n onClick\n }), {\n elementType: 'div'\n }),\n checkIcon: slot.optional(props.checkIcon, {\n renderByDefault: true,\n defaultProps: {\n 'aria-hidden': 'true',\n children: CheckIcon\n },\n elementType: 'span'\n }),\n active,\n disabled,\n focusVisible,\n multiselect,\n selected\n };\n};\n"],"names":["useOption_unstable","getTextString","text","children","undefined","textString","hasNonStringChild","React","Children","forEach","child","console","warn","props","ref","disabled","value","optionRef","useRef","optionText","optionValue","id","useId","optionData","useMemo","focusVisible","useContextSelector","ListboxContext","ctx","multiselect","registerOption","selected","selectedOptions","find","o","selectOption","setActiveOption","setOpen","ComboboxContext","active","_ctx_activeOption","_ctx_activeOption1","activeOption","CheckIcon","createElement","CheckmarkFilled","Checkmark12Filled","onClick","event","_props_onClick","_props","preventDefault","_setOpen","call","useEffect","current","semanticProps","role","components","root","checkIcon","slot","always","getNativeElementProps","useMergedRefs","elementType","optional","renderByDefault","defaultProps"],"mappings":";;;;+BAkCiBA;;;eAAAA;;;;iEAlCM;gCAC2C;sCAC/B;4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AA,iBAAiB,AAACC,CAAAA,SAASrC,KAAI,EAAGkC,OAAO,AAAD,MAAO,QAAQE,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAeI,IAAI,CAACH,QAAQF;IAC7H;IACA,oCAAoC;IACpCzC,OAAM+C,SAAS,CAAC;QACZ,IAAIjC,MAAMJ,UAAUsC,OAAO,EAAE;YACzB,OAAOzB,eAAeP,YAAYN,UAAUsC,OAAO;QACvD;IACJ,GAAG;QACClC;QACAE;QACAO;KACH;IACD,MAAM0B,gBAAgB3B,cAAc;QAChC4B,MAAM;QACN,gBAAgB1B;IACpB,IAAI;QACA0B,MAAM;QACN,iBAAiB1B;IACrB;IACA,OAAO;QACH2B,YAAY;YACRC,MAAM;YACNC,WAAW;QACf;QACAD,MAAME,oBAAI,CAACC,MAAM,CAACC,IAAAA,qCAAqB,EAAC,OAAO;YAC3CjD,KAAKkD,IAAAA,6BAAa,EAAClD,KAAKG;YACxB,iBAAiBF,WAAW,SAASX;YACrCiB;YACA,GAAGmC,aAAa;YAChB,GAAG3C,KAAK;YACRkC;QACJ,IAAI;YACAkB,aAAa;QACjB;QACAL,WAAWC,oBAAI,CAACK,QAAQ,CAACrD,MAAM+C,SAAS,EAAE;YACtCO,iBAAiB;YACjBC,cAAc;gBACV,eAAe;gBACfjE,UAAUwC;YACd;YACAsB,aAAa;QACjB;QACA1B;QACAxB;QACAU;QACAI;QACAE;IACJ;AACJ"}
@@ -9,8 +9,12 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- optionClassNames: ()=>optionClassNames,
13
- useOptionStyles_unstable: ()=>useOptionStyles_unstable
12
+ optionClassNames: function() {
13
+ return optionClassNames;
14
+ },
15
+ useOptionStyles_unstable: function() {
16
+ return useOptionStyles_unstable;
17
+ }
14
18
  });
15
19
  const _react = require("@griffel/react");
16
20
  const optionClassNames = {
@@ -19,7 +23,7 @@ const optionClassNames = {
19
23
  };
20
24
  /**
21
25
  * Styles for the root slot
22
- */ const useStyles = /*#__PURE__*/ (0, _react["__styles"])({
26
+ */ const useStyles = /*#__PURE__*/ (0, _react.__styles)({
23
27
  root: {
24
28
  Bt984gj: "f122n59",
25
29
  Bbmb7ep: [
@@ -318,7 +322,7 @@ const optionClassNames = {
318
322
  ]
319
323
  });
320
324
  const useOptionStyles_unstable = (state)=>{
321
- const { active , disabled , focusVisible , multiselect , selected } = state;
325
+ const { active, disabled, focusVisible, multiselect, selected } = state;
322
326
  const styles = useStyles();
323
327
  state.root.className = (0, _react.mergeClasses)(optionClassNames.root, styles.root, active && focusVisible && styles.active, disabled && styles.disabled, selected && styles.selected, state.root.className);
324
328
  if (state.checkIcon) {
@@ -1 +1 @@
1
- {"version":3,"sources":["useOptionStyles.styles.js"],"sourcesContent":["import { tokens } from '@fluentui/react-theme';\nimport { __styles, mergeClasses, shorthands } from '@griffel/react';\nexport const optionClassNames = {\n root: 'fui-Option',\n checkIcon: 'fui-Option__checkIcon'\n};\n/**\n * Styles for the root slot\n */\nconst useStyles = /*#__PURE__*/__styles({\n root: {\n Bt984gj: \"f122n59\",\n Bbmb7ep: [\"f1aa9q02\", \"f16jpd5f\"],\n Beyfa6y: [\"f16jpd5f\", \"f1aa9q02\"],\n B7oj6ja: [\"f1jar5jt\", \"fyu767a\"],\n Btl43ni: [\"fyu767a\", \"f1jar5jt\"],\n sj55zd: \"f19n0e5\",\n i8kkvl: \"f1ufnopg\",\n Bceei9c: \"f1k6fduh\",\n mc9l5x: \"f22iagw\",\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"fkhj508\",\n Bg96gwp: \"f1i3iumi\",\n z8tnut: \"fp2oml8\",\n z189sj: [\"f1vdfbxk\", \"f1f5gg8d\"],\n Byoj8tv: \"f1tdddsa\",\n uwmqm3: [\"f1f5gg8d\", \"f1vdfbxk\"],\n qhf8xq: \"f10pi13n\",\n Jwef8y: \"f1knas48\",\n ecr2s2: \"fb40n2d\"\n },\n active: {\n Bsft5z2: \"f13zj6fq\",\n E3zdtr: \"f1mdlcz9\",\n B80jsxd: \"f1nwj1ja\",\n t2ki1e: \"ffmd2fr\",\n Bm2nyyq: \"f8rth92\",\n Barhvk9: [\"flthirb\", \"ftkbnf5\"],\n Bw17bha: \"f1lh990p\",\n vfts7: [\"ftkbnf5\", \"flthirb\"],\n xrcqlc: \"fc9v8v1\",\n Ihftqj: [\"f1mwfetb\", \"f18mat8f\"],\n Bcgy8vk: \"f1cb6c3\",\n Bhxzhr1: [\"f18mat8f\", \"f1mwfetb\"],\n B3778ie: [\"f1ibwz09\", \"f1kp91vd\"],\n d9w3h3: [\"f1kp91vd\", \"f1ibwz09\"],\n Bl18szs: [\"f1pix4dl\", \"f13nd1z4\"],\n B4j8arr: [\"f13nd1z4\", \"f1pix4dl\"],\n B0n5ga8: \"f1qw5sz7\",\n s924m2: [\"f19va7ni\", \"f1a9v3mw\"],\n B1q35kw: \"fkkziue\",\n Gp14am: [\"f1a9v3mw\", \"f19va7ni\"],\n bn5sak: \"f1a97anr\",\n By385i5: \"f5226zp\",\n Eqx8gd: [\"fa2bdqt\", \"fei6g0k\"],\n B1piin3: [\"fei6g0k\", \"fa2bdqt\"]\n },\n disabled: {\n sj55zd: \"f1s2aq7o\",\n Jwef8y: \"f9ql6rf\",\n ecr2s2: \"fgj9um3\",\n Bbusuzp: \"f1dcs8yz\"\n },\n selected: {},\n checkIcon: {\n Be2twd7: \"fod5ikn\",\n Frg6f3: [\"f18b9hdq\", \"fn6qj8t\"],\n t21cq0: [\"f1xk557c\", \"f1h9en5y\"],\n Bcdw1i0: \"fd7fpy0\",\n Bo70h7d: \"fvc9v3g\"\n },\n selectedCheck: {\n Bcdw1i0: \"f1022m68\"\n },\n multiselectCheck: {\n B4j52fo: \"f192inf7\",\n Bekrc4i: [\"f5tn483\", \"f1ojsxk5\"],\n Bn0qgzm: \"f1vxd6vx\",\n ibv6hh: [\"f1ojsxk5\", \"f5tn483\"],\n icvyot: \"fzkkow9\",\n vrafjx: [\"fcdblym\", \"fjik90z\"],\n oivjwe: \"fg706s2\",\n wvpqe5: [\"fjik90z\", \"fcdblym\"],\n g2u3we: \"fq0vr37\",\n h3c5rm: [\"f1byw159\", \"f11cr0be\"],\n B9xav0g: \"f1c1zstj\",\n zhjwy3: [\"f11cr0be\", \"f1byw159\"],\n Bbmb7ep: [\"f1g3puop\", \"fi2rrw2\"],\n Beyfa6y: [\"fi2rrw2\", \"f1g3puop\"],\n B7oj6ja: [\"f1rstyi9\", \"f1s4nn1u\"],\n Btl43ni: [\"f1s4nn1u\", \"f1rstyi9\"],\n B7ck84d: \"f1ewtqcl\",\n mc9l5x: \"f22iagw\",\n Bt984gj: \"f122n59\",\n Brf1p80: \"f4d9j23\",\n Bkfmm31: \"f1w9h62z\",\n Be2twd7: \"f1ugzwwg\",\n Bqenvij: \"fd461yt\",\n a9b677: \"fjw5fx7\",\n Bcdw1i0: \"f1022m68\"\n },\n selectedMultiselectCheck: {\n De3pzq: \"ftywsgz\",\n sj55zd: \"fqpbvvt\",\n g2u3we: \"f3xi7mh\",\n h3c5rm: [\"ftovhe4\", \"f1wczvin\"],\n B9xav0g: \"f68vbr6\",\n zhjwy3: [\"f1wczvin\", \"ftovhe4\"]\n },\n checkDisabled: {\n sj55zd: \"f1s2aq7o\",\n Bbusuzp: \"f1dcs8yz\"\n }\n}, {\n d: [\".f122n59{align-items:center;}\", \".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}\", \".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}\", \".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}\", \".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}\", \".f19n0e5{color:var(--colorNeutralForeground1);}\", \".f1ufnopg{column-gap:var(--spacingHorizontalXS);}\", \".f1k6fduh{cursor:pointer;}\", \".f22iagw{display:flex;}\", \".fk6fouc{font-family:var(--fontFamilyBase);}\", \".fkhj508{font-size:var(--fontSizeBase300);}\", \".f1i3iumi{line-height:var(--lineHeightBase300);}\", \".fp2oml8{padding-top:var(--spacingVerticalSNudge);}\", \".f1vdfbxk{padding-right:var(--spacingHorizontalS);}\", \".f1f5gg8d{padding-left:var(--spacingHorizontalS);}\", \".f1tdddsa{padding-bottom:var(--spacingVerticalSNudge);}\", \".f10pi13n{position:relative;}\", \".f13zj6fq::after{content:\\\"\\\";}\", \".f1mdlcz9::after{position:absolute;}\", \".f1nwj1ja::after{pointer-events:none;}\", \".ffmd2fr::after{z-index:1;}\", \".f8rth92::after{border-top-style:solid;}\", \".flthirb::after{border-right-style:solid;}\", \".ftkbnf5::after{border-left-style:solid;}\", \".f1lh990p::after{border-bottom-style:solid;}\", \".fc9v8v1::after{border-top-width:2px;}\", \".f1mwfetb::after{border-right-width:2px;}\", \".f18mat8f::after{border-left-width:2px;}\", \".f1cb6c3::after{border-bottom-width:2px;}\", \".f1ibwz09::after{border-bottom-right-radius:var(--borderRadiusMedium);}\", \".f1kp91vd::after{border-bottom-left-radius:var(--borderRadiusMedium);}\", \".f1pix4dl::after{border-top-right-radius:var(--borderRadiusMedium);}\", \".f13nd1z4::after{border-top-left-radius:var(--borderRadiusMedium);}\", \".f1qw5sz7::after{border-top-color:var(--colorStrokeFocus2);}\", \".f19va7ni::after{border-right-color:var(--colorStrokeFocus2);}\", \".f1a9v3mw::after{border-left-color:var(--colorStrokeFocus2);}\", \".fkkziue::after{border-bottom-color:var(--colorStrokeFocus2);}\", \".f1a97anr::after{top:-2px;}\", \".f5226zp::after{bottom:-2px;}\", \".fa2bdqt::after{left:-2px;}\", \".fei6g0k::after{right:-2px;}\", \".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}\", \".fod5ikn{font-size:var(--fontSizeBase400);}\", \".f18b9hdq{margin-left:calc(var(--spacingHorizontalXXS) * -1);}\", \".fn6qj8t{margin-right:calc(var(--spacingHorizontalXXS) * -1);}\", \".f1xk557c{margin-right:var(--spacingHorizontalXXS);}\", \".f1h9en5y{margin-left:var(--spacingHorizontalXXS);}\", \".fd7fpy0{visibility:hidden;}\", \".fvc9v3g svg{display:block;}\", \".f1022m68{visibility:visible;}\", \".f192inf7{border-top-width:var(--strokeWidthThin);}\", \".f5tn483{border-right-width:var(--strokeWidthThin);}\", \".f1ojsxk5{border-left-width:var(--strokeWidthThin);}\", \".f1vxd6vx{border-bottom-width:var(--strokeWidthThin);}\", \".fzkkow9{border-top-style:solid;}\", \".fcdblym{border-right-style:solid;}\", \".fjik90z{border-left-style:solid;}\", \".fg706s2{border-bottom-style:solid;}\", \".fq0vr37{border-top-color:var(--colorNeutralStrokeAccessible);}\", \".f1byw159{border-right-color:var(--colorNeutralStrokeAccessible);}\", \".f11cr0be{border-left-color:var(--colorNeutralStrokeAccessible);}\", \".f1c1zstj{border-bottom-color:var(--colorNeutralStrokeAccessible);}\", \".f1g3puop{border-bottom-right-radius:var(--borderRadiusSmall);}\", \".fi2rrw2{border-bottom-left-radius:var(--borderRadiusSmall);}\", \".f1rstyi9{border-top-right-radius:var(--borderRadiusSmall);}\", \".f1s4nn1u{border-top-left-radius:var(--borderRadiusSmall);}\", \".f1ewtqcl{box-sizing:border-box;}\", \".f4d9j23{justify-content:center;}\", \".f1w9h62z{fill:currentColor;}\", \".f1ugzwwg{font-size:12px;}\", \".fd461yt{height:16px;}\", \".fjw5fx7{width:16px;}\", \".ftywsgz{background-color:var(--colorCompoundBrandBackground);}\", \".fqpbvvt{color:var(--colorNeutralForegroundInverted);}\", \".f3xi7mh{border-top-color:var(--colorCompoundBrandBackground);}\", \".ftovhe4{border-right-color:var(--colorCompoundBrandBackground);}\", \".f1wczvin{border-left-color:var(--colorCompoundBrandBackground);}\", \".f68vbr6{border-bottom-color:var(--colorCompoundBrandBackground);}\"],\n h: [\".f1knas48:hover{background-color:var(--colorNeutralBackground1Hover);}\", \".f9ql6rf:hover{background-color:var(--colorTransparentBackground);}\"],\n a: [\".fb40n2d:active{background-color:var(--colorNeutralBackground1Pressed);}\", \".fgj9um3:active{background-color:var(--colorTransparentBackground);}\"],\n m: [[\"@media (forced-colors: active){.f1dcs8yz{color:GrayText;}}\", {\n m: \"(forced-colors: active)\"\n }]]\n});\n/**\n * Apply styling to the Option slots based on the state\n */\nexport const useOptionStyles_unstable = state => {\n const {\n active,\n disabled,\n focusVisible,\n multiselect,\n selected\n } = state;\n const styles = useStyles();\n state.root.className = mergeClasses(optionClassNames.root, styles.root, active && focusVisible && styles.active, disabled && styles.disabled, selected && styles.selected, state.root.className);\n if (state.checkIcon) {\n state.checkIcon.className = mergeClasses(optionClassNames.checkIcon, styles.checkIcon, multiselect && styles.multiselectCheck, selected && styles.selectedCheck, selected && multiselect && styles.selectedMultiselectCheck, disabled && styles.checkDisabled, state.checkIcon.className);\n }\n return state;\n};\n//# sourceMappingURL=useOptionStyles.styles.js.map"],"names":["optionClassNames","useOptionStyles_unstable","root","checkIcon","useStyles","__styles","Bt984gj","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","sj55zd","i8kkvl","Bceei9c","mc9l5x","Bahqtrf","Be2twd7","Bg96gwp","z8tnut","z189sj","Byoj8tv","uwmqm3","qhf8xq","Jwef8y","ecr2s2","active","Bsft5z2","E3zdtr","B80jsxd","t2ki1e","Bm2nyyq","Barhvk9","Bw17bha","vfts7","xrcqlc","Ihftqj","Bcgy8vk","Bhxzhr1","B3778ie","d9w3h3","Bl18szs","B4j8arr","B0n5ga8","s924m2","B1q35kw","Gp14am","bn5sak","By385i5","Eqx8gd","B1piin3","disabled","Bbusuzp","selected","Frg6f3","t21cq0","Bcdw1i0","Bo70h7d","selectedCheck","multiselectCheck","B4j52fo","Bekrc4i","Bn0qgzm","ibv6hh","icvyot","vrafjx","oivjwe","wvpqe5","g2u3we","h3c5rm","B9xav0g","zhjwy3","B7ck84d","Brf1p80","Bkfmm31","Bqenvij","a9b677","selectedMultiselectCheck","De3pzq","checkDisabled","d","h","a","m","state","focusVisible","multiselect","styles","className","mergeClasses"],"mappings":";;;;;;;;;;;IAEaA,gBAAgB,MAAhBA;IA0HAC,wBAAwB,MAAxBA;;uBA3HsC;AA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AAsE;QAAqE;QAAuE;QAAmE;QAAiE;QAAgE;QAA+D;QAAqC;QAAqC;QAAiC;QAA8B;QAA0B;QAAyB;QAAmE;QAA0D;QAAmE;QAAqE;QAAqE;KAAqE;IACh6HC,GAAG;QAAC;QAA0E;KAAsE;IACpJC,GAAG;QAAC;QAA4E;KAAuE;IACvJC,GAAG;QAAC;YAAC;YAA8D;gBACjEA,GAAG;YACL;SAAE;KAAC;AACL;AAIO,MAAMjF,2BAA2BkF,CAAAA,QAAS;IAC/C,MAAM,EACJ1D,OAAM,EACNyB,SAAQ,EACRkC,aAAY,EACZC,YAAW,EACXjC,SAAQ,EACT,GAAG+B;IACJ,MAAMG,SAASlF;IACf+E,MAAMjF,IAAI,CAACqF,SAAS,GAAGC,IAAAA,mBAAY,EAACxF,iBAAiBE,IAAI,EAAEoF,OAAOpF,IAAI,EAAEuB,UAAU2D,gBAAgBE,OAAO7D,MAAM,EAAEyB,YAAYoC,OAAOpC,QAAQ,EAAEE,YAAYkC,OAAOlC,QAAQ,EAAE+B,MAAMjF,IAAI,CAACqF,SAAS;IAC/L,IAAIJ,MAAMhF,SAAS,EAAE;QACnBgF,MAAMhF,SAAS,CAACoF,SAAS,GAAGC,IAAAA,mBAAY,EAACxF,iBAAiBG,SAAS,EAAEmF,OAAOnF,SAAS,EAAEkF,eAAeC,OAAO5B,gBAAgB,EAAEN,YAAYkC,OAAO7B,aAAa,EAAEL,YAAYiC,eAAeC,OAAOV,wBAAwB,EAAE1B,YAAYoC,OAAOR,aAAa,EAAEK,MAAMhF,SAAS,CAACoF,SAAS;IAC1R,CAAC;IACD,OAAOJ;AACT,GACA,kDAAkD"}
1
+ {"version":3,"sources":["useOptionStyles.styles.js"],"sourcesContent":["import { tokens } from '@fluentui/react-theme';\nimport { __styles, mergeClasses, shorthands } from '@griffel/react';\nexport const optionClassNames = {\n root: 'fui-Option',\n checkIcon: 'fui-Option__checkIcon'\n};\n/**\n * Styles for the root slot\n */\nconst useStyles = /*#__PURE__*/__styles({\n root: {\n Bt984gj: \"f122n59\",\n Bbmb7ep: [\"f1aa9q02\", \"f16jpd5f\"],\n Beyfa6y: [\"f16jpd5f\", \"f1aa9q02\"],\n B7oj6ja: [\"f1jar5jt\", \"fyu767a\"],\n Btl43ni: [\"fyu767a\", \"f1jar5jt\"],\n sj55zd: \"f19n0e5\",\n i8kkvl: \"f1ufnopg\",\n Bceei9c: \"f1k6fduh\",\n mc9l5x: \"f22iagw\",\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"fkhj508\",\n Bg96gwp: \"f1i3iumi\",\n z8tnut: \"fp2oml8\",\n z189sj: [\"f1vdfbxk\", \"f1f5gg8d\"],\n Byoj8tv: \"f1tdddsa\",\n uwmqm3: [\"f1f5gg8d\", \"f1vdfbxk\"],\n qhf8xq: \"f10pi13n\",\n Jwef8y: \"f1knas48\",\n ecr2s2: \"fb40n2d\"\n },\n active: {\n Bsft5z2: \"f13zj6fq\",\n E3zdtr: \"f1mdlcz9\",\n B80jsxd: \"f1nwj1ja\",\n t2ki1e: \"ffmd2fr\",\n Bm2nyyq: \"f8rth92\",\n Barhvk9: [\"flthirb\", \"ftkbnf5\"],\n Bw17bha: \"f1lh990p\",\n vfts7: [\"ftkbnf5\", \"flthirb\"],\n xrcqlc: \"fc9v8v1\",\n Ihftqj: [\"f1mwfetb\", \"f18mat8f\"],\n Bcgy8vk: \"f1cb6c3\",\n Bhxzhr1: [\"f18mat8f\", \"f1mwfetb\"],\n B3778ie: [\"f1ibwz09\", \"f1kp91vd\"],\n d9w3h3: [\"f1kp91vd\", \"f1ibwz09\"],\n Bl18szs: [\"f1pix4dl\", \"f13nd1z4\"],\n B4j8arr: [\"f13nd1z4\", \"f1pix4dl\"],\n B0n5ga8: \"f1qw5sz7\",\n s924m2: [\"f19va7ni\", \"f1a9v3mw\"],\n B1q35kw: \"fkkziue\",\n Gp14am: [\"f1a9v3mw\", \"f19va7ni\"],\n bn5sak: \"f1a97anr\",\n By385i5: \"f5226zp\",\n Eqx8gd: [\"fa2bdqt\", \"fei6g0k\"],\n B1piin3: [\"fei6g0k\", \"fa2bdqt\"]\n },\n disabled: {\n sj55zd: \"f1s2aq7o\",\n Jwef8y: \"f9ql6rf\",\n ecr2s2: \"fgj9um3\",\n Bbusuzp: \"f1dcs8yz\"\n },\n selected: {},\n checkIcon: {\n Be2twd7: \"fod5ikn\",\n Frg6f3: [\"f18b9hdq\", \"fn6qj8t\"],\n t21cq0: [\"f1xk557c\", \"f1h9en5y\"],\n Bcdw1i0: \"fd7fpy0\",\n Bo70h7d: \"fvc9v3g\"\n },\n selectedCheck: {\n Bcdw1i0: \"f1022m68\"\n },\n multiselectCheck: {\n B4j52fo: \"f192inf7\",\n Bekrc4i: [\"f5tn483\", \"f1ojsxk5\"],\n Bn0qgzm: \"f1vxd6vx\",\n ibv6hh: [\"f1ojsxk5\", \"f5tn483\"],\n icvyot: \"fzkkow9\",\n vrafjx: [\"fcdblym\", \"fjik90z\"],\n oivjwe: \"fg706s2\",\n wvpqe5: [\"fjik90z\", \"fcdblym\"],\n g2u3we: \"fq0vr37\",\n h3c5rm: [\"f1byw159\", \"f11cr0be\"],\n B9xav0g: \"f1c1zstj\",\n zhjwy3: [\"f11cr0be\", \"f1byw159\"],\n Bbmb7ep: [\"f1g3puop\", \"fi2rrw2\"],\n Beyfa6y: [\"fi2rrw2\", \"f1g3puop\"],\n B7oj6ja: [\"f1rstyi9\", \"f1s4nn1u\"],\n Btl43ni: [\"f1s4nn1u\", \"f1rstyi9\"],\n B7ck84d: \"f1ewtqcl\",\n mc9l5x: \"f22iagw\",\n Bt984gj: \"f122n59\",\n Brf1p80: \"f4d9j23\",\n Bkfmm31: \"f1w9h62z\",\n Be2twd7: \"f1ugzwwg\",\n Bqenvij: \"fd461yt\",\n a9b677: \"fjw5fx7\",\n Bcdw1i0: \"f1022m68\"\n },\n selectedMultiselectCheck: {\n De3pzq: \"ftywsgz\",\n sj55zd: \"fqpbvvt\",\n g2u3we: \"f3xi7mh\",\n h3c5rm: [\"ftovhe4\", \"f1wczvin\"],\n B9xav0g: \"f68vbr6\",\n zhjwy3: [\"f1wczvin\", \"ftovhe4\"]\n },\n checkDisabled: {\n sj55zd: \"f1s2aq7o\",\n Bbusuzp: \"f1dcs8yz\"\n }\n}, {\n d: [\".f122n59{align-items:center;}\", \".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}\", \".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}\", \".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}\", \".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}\", \".f19n0e5{color:var(--colorNeutralForeground1);}\", \".f1ufnopg{column-gap:var(--spacingHorizontalXS);}\", \".f1k6fduh{cursor:pointer;}\", \".f22iagw{display:flex;}\", \".fk6fouc{font-family:var(--fontFamilyBase);}\", \".fkhj508{font-size:var(--fontSizeBase300);}\", \".f1i3iumi{line-height:var(--lineHeightBase300);}\", \".fp2oml8{padding-top:var(--spacingVerticalSNudge);}\", \".f1vdfbxk{padding-right:var(--spacingHorizontalS);}\", \".f1f5gg8d{padding-left:var(--spacingHorizontalS);}\", \".f1tdddsa{padding-bottom:var(--spacingVerticalSNudge);}\", \".f10pi13n{position:relative;}\", \".f13zj6fq::after{content:\\\"\\\";}\", \".f1mdlcz9::after{position:absolute;}\", \".f1nwj1ja::after{pointer-events:none;}\", \".ffmd2fr::after{z-index:1;}\", \".f8rth92::after{border-top-style:solid;}\", \".flthirb::after{border-right-style:solid;}\", \".ftkbnf5::after{border-left-style:solid;}\", \".f1lh990p::after{border-bottom-style:solid;}\", \".fc9v8v1::after{border-top-width:2px;}\", \".f1mwfetb::after{border-right-width:2px;}\", \".f18mat8f::after{border-left-width:2px;}\", \".f1cb6c3::after{border-bottom-width:2px;}\", \".f1ibwz09::after{border-bottom-right-radius:var(--borderRadiusMedium);}\", \".f1kp91vd::after{border-bottom-left-radius:var(--borderRadiusMedium);}\", \".f1pix4dl::after{border-top-right-radius:var(--borderRadiusMedium);}\", \".f13nd1z4::after{border-top-left-radius:var(--borderRadiusMedium);}\", \".f1qw5sz7::after{border-top-color:var(--colorStrokeFocus2);}\", \".f19va7ni::after{border-right-color:var(--colorStrokeFocus2);}\", \".f1a9v3mw::after{border-left-color:var(--colorStrokeFocus2);}\", \".fkkziue::after{border-bottom-color:var(--colorStrokeFocus2);}\", \".f1a97anr::after{top:-2px;}\", \".f5226zp::after{bottom:-2px;}\", \".fa2bdqt::after{left:-2px;}\", \".fei6g0k::after{right:-2px;}\", \".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}\", \".fod5ikn{font-size:var(--fontSizeBase400);}\", \".f18b9hdq{margin-left:calc(var(--spacingHorizontalXXS) * -1);}\", \".fn6qj8t{margin-right:calc(var(--spacingHorizontalXXS) * -1);}\", \".f1xk557c{margin-right:var(--spacingHorizontalXXS);}\", \".f1h9en5y{margin-left:var(--spacingHorizontalXXS);}\", \".fd7fpy0{visibility:hidden;}\", \".fvc9v3g svg{display:block;}\", \".f1022m68{visibility:visible;}\", \".f192inf7{border-top-width:var(--strokeWidthThin);}\", \".f5tn483{border-right-width:var(--strokeWidthThin);}\", \".f1ojsxk5{border-left-width:var(--strokeWidthThin);}\", \".f1vxd6vx{border-bottom-width:var(--strokeWidthThin);}\", \".fzkkow9{border-top-style:solid;}\", \".fcdblym{border-right-style:solid;}\", \".fjik90z{border-left-style:solid;}\", \".fg706s2{border-bottom-style:solid;}\", \".fq0vr37{border-top-color:var(--colorNeutralStrokeAccessible);}\", \".f1byw159{border-right-color:var(--colorNeutralStrokeAccessible);}\", \".f11cr0be{border-left-color:var(--colorNeutralStrokeAccessible);}\", \".f1c1zstj{border-bottom-color:var(--colorNeutralStrokeAccessible);}\", \".f1g3puop{border-bottom-right-radius:var(--borderRadiusSmall);}\", \".fi2rrw2{border-bottom-left-radius:var(--borderRadiusSmall);}\", \".f1rstyi9{border-top-right-radius:var(--borderRadiusSmall);}\", \".f1s4nn1u{border-top-left-radius:var(--borderRadiusSmall);}\", \".f1ewtqcl{box-sizing:border-box;}\", \".f4d9j23{justify-content:center;}\", \".f1w9h62z{fill:currentColor;}\", \".f1ugzwwg{font-size:12px;}\", \".fd461yt{height:16px;}\", \".fjw5fx7{width:16px;}\", \".ftywsgz{background-color:var(--colorCompoundBrandBackground);}\", \".fqpbvvt{color:var(--colorNeutralForegroundInverted);}\", \".f3xi7mh{border-top-color:var(--colorCompoundBrandBackground);}\", \".ftovhe4{border-right-color:var(--colorCompoundBrandBackground);}\", \".f1wczvin{border-left-color:var(--colorCompoundBrandBackground);}\", \".f68vbr6{border-bottom-color:var(--colorCompoundBrandBackground);}\"],\n h: [\".f1knas48:hover{background-color:var(--colorNeutralBackground1Hover);}\", \".f9ql6rf:hover{background-color:var(--colorTransparentBackground);}\"],\n a: [\".fb40n2d:active{background-color:var(--colorNeutralBackground1Pressed);}\", \".fgj9um3:active{background-color:var(--colorTransparentBackground);}\"],\n m: [[\"@media (forced-colors: active){.f1dcs8yz{color:GrayText;}}\", {\n m: \"(forced-colors: active)\"\n }]]\n});\n/**\n * Apply styling to the Option slots based on the state\n */\nexport const useOptionStyles_unstable = state => {\n const {\n active,\n disabled,\n focusVisible,\n multiselect,\n selected\n } = state;\n const styles = useStyles();\n state.root.className = mergeClasses(optionClassNames.root, styles.root, active && focusVisible && styles.active, disabled && styles.disabled, selected && styles.selected, state.root.className);\n if (state.checkIcon) {\n state.checkIcon.className = mergeClasses(optionClassNames.checkIcon, styles.checkIcon, multiselect && styles.multiselectCheck, selected && styles.selectedCheck, selected && multiselect && styles.selectedMultiselectCheck, disabled && styles.checkDisabled, state.checkIcon.className);\n }\n return state;\n};\n//# sourceMappingURL=useOptionStyles.styles.js.map"],"names":["optionClassNames","useOptionStyles_unstable","root","checkIcon","useStyles","__styles","Bt984gj","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","sj55zd","i8kkvl","Bceei9c","mc9l5x","Bahqtrf","Be2twd7","Bg96gwp","z8tnut","z189sj","Byoj8tv","uwmqm3","qhf8xq","Jwef8y","ecr2s2","active","Bsft5z2","E3zdtr","B80jsxd","t2ki1e","Bm2nyyq","Barhvk9","Bw17bha","vfts7","xrcqlc","Ihftqj","Bcgy8vk","Bhxzhr1","B3778ie","d9w3h3","Bl18szs","B4j8arr","B0n5ga8","s924m2","B1q35kw","Gp14am","bn5sak","By385i5","Eqx8gd","B1piin3","disabled","Bbusuzp","selected","Frg6f3","t21cq0","Bcdw1i0","Bo70h7d","selectedCheck","multiselectCheck","B4j52fo","Bekrc4i","Bn0qgzm","ibv6hh","icvyot","vrafjx","oivjwe","wvpqe5","g2u3we","h3c5rm","B9xav0g","zhjwy3","B7ck84d","Brf1p80","Bkfmm31","Bqenvij","a9b677","selectedMultiselectCheck","De3pzq","checkDisabled","d","h","a","m","state","focusVisible","multiselect","styles","className","mergeClasses"],"mappings":";;;;;;;;;;;IAEaA,gBAAgB;eAAhBA;;IA0HAC,wBAAwB;eAAxBA;;;uBA3HsC;AAC5C,MAAMD,mBAAmB;IAC9BE,MAAM;IACNC,WAAW;AACb;AACA;;CAEC,GACD,MAAMC,YAAY,WAAW,GAAEC,IAAAA,eAAQ,EAAC;IACtCH,MAAM;QACJI,SAAS;QACTC,SAAS;YAAC;YAAY;SAAW;QACjCC,SAAS;YAAC;YAAY;SAAW;QACjCC,SAAS;YAAC;YAAY;SAAU;QAChCC,SAAS;YAAC;YAAW;SAAW;QAChCC,QAAQ;QACRC,QAAQ;QACRC,SAAS;QACTC,QAAQ;QACRC,SAAS;QACTC,SAAS;QACTC,SAAS;QACTC,QAAQ;QACRC,QAAQ;YAAC;YAAY;SAAW;QAChCC,SAAS;QACTC,QAAQ;YAAC;YAAY;SAAW;QAChCC,QAAQ;QACRC,QAAQ;QACRC,QAAQ;IACV;IACAC,QAAQ;QACNC,SAAS;QACTC,QAAQ;QACRC,SAAS;QACTC,QAAQ;QACRC,SAAS;QACTC,SAAS;YAAC;YAAW;SAAU;QAC/BC,SAAS;QACTC,OAAO;YAAC;YAAW;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,MAAMjF,IAAI,CAACqF,SAAS;IAC/L,IAAIJ,MAAMhF,SAAS,EAAE;QACnBgF,MAAMhF,SAAS,CAACoF,SAAS,GAAGC,IAAAA,mBAAY,EAACxF,iBAAiBG,SAAS,EAAEmF,OAAOnF,SAAS,EAAEkF,eAAeC,OAAO5B,gBAAgB,EAAEN,YAAYkC,OAAO7B,aAAa,EAAEL,YAAYiC,eAAeC,OAAOV,wBAAwB,EAAE1B,YAAYoC,OAAOR,aAAa,EAAEK,MAAMhF,SAAS,CAACoF,SAAS;IAC1R;IACA,OAAOJ;AACT,GACA,kDAAkD"}
@@ -4,18 +4,20 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(exports, "OptionGroup", {
6
6
  enumerable: true,
7
- get: ()=>OptionGroup
7
+ get: function() {
8
+ return OptionGroup;
9
+ }
8
10
  });
9
- const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
- const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
11
13
  const _useOptionGroup = require("./useOptionGroup");
12
14
  const _renderOptionGroup = require("./renderOptionGroup");
13
- const _useOptionGroupStylesStyles = require("./useOptionGroupStyles.styles");
14
- const _reactSharedContexts = require("@fluentui/react-shared-contexts");
15
+ const _useOptionGroupStylesstyles = require("./useOptionGroupStyles.styles");
16
+ const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
15
17
  const OptionGroup = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
16
18
  const state = (0, _useOptionGroup.useOptionGroup_unstable)(props, ref);
17
- (0, _useOptionGroupStylesStyles.useOptionGroupStyles_unstable)(state);
18
- (0, _reactSharedContexts.useCustomStyleHook_unstable)('useOptionGroupStyles_unstable')(state);
19
+ (0, _useOptionGroupStylesstyles.useOptionGroupStyles_unstable)(state);
20
+ (0, _reactsharedcontexts.useCustomStyleHook_unstable)('useOptionGroupStyles_unstable')(state);
19
21
  return (0, _renderOptionGroup.renderOptionGroup_unstable)(state);
20
22
  });
21
23
  OptionGroup.displayName = 'OptionGroup';