@fluentui/react-combobox 9.2.11 → 9.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +106 -3
- package/CHANGELOG.md +29 -4
- package/lib/components/Combobox/Combobox.js +3 -6
- package/lib/components/Combobox/Combobox.js.map +1 -1
- package/lib/components/Combobox/index.js +1 -1
- package/lib/components/Combobox/index.js.map +1 -1
- package/lib/components/Combobox/useCombobox.js +34 -13
- package/lib/components/Combobox/useCombobox.js.map +1 -1
- package/lib/components/Combobox/{useComboboxStyles.js → useComboboxStyles.styles.js} +1 -1
- package/lib/components/Combobox/useComboboxStyles.styles.js.map +1 -0
- package/lib/components/Dropdown/Dropdown.js +3 -6
- package/lib/components/Dropdown/Dropdown.js.map +1 -1
- package/lib/components/Dropdown/index.js +1 -1
- package/lib/components/Dropdown/index.js.map +1 -1
- package/lib/components/Dropdown/{useDropdownStyles.js → useDropdownStyles.styles.js} +1 -1
- package/lib/components/Dropdown/useDropdownStyles.styles.js.map +1 -0
- package/lib/components/Listbox/Listbox.js +3 -6
- package/lib/components/Listbox/Listbox.js.map +1 -1
- package/lib/components/Listbox/index.js +1 -1
- package/lib/components/Listbox/index.js.map +1 -1
- package/lib/components/Listbox/{useListboxStyles.js → useListboxStyles.styles.js} +1 -1
- package/lib/components/Listbox/useListboxStyles.styles.js.map +1 -0
- package/lib/components/Option/Option.js +3 -6
- package/lib/components/Option/Option.js.map +1 -1
- package/lib/components/Option/index.js +1 -1
- package/lib/components/Option/index.js.map +1 -1
- package/lib/components/Option/{useOptionStyles.js → useOptionStyles.styles.js} +1 -1
- package/lib/components/Option/useOptionStyles.styles.js.map +1 -0
- package/lib/components/OptionGroup/OptionGroup.js +3 -6
- package/lib/components/OptionGroup/OptionGroup.js.map +1 -1
- package/lib/components/OptionGroup/index.js +1 -1
- package/lib/components/OptionGroup/index.js.map +1 -1
- package/lib/components/OptionGroup/{useOptionGroupStyles.js → useOptionGroupStyles.styles.js} +1 -1
- package/lib/components/OptionGroup/useOptionGroupStyles.styles.js.map +1 -0
- package/lib-commonjs/components/Combobox/Combobox.js +3 -4
- package/lib-commonjs/components/Combobox/Combobox.js.map +1 -1
- package/lib-commonjs/components/Combobox/index.js +1 -1
- package/lib-commonjs/components/Combobox/index.js.map +1 -1
- package/lib-commonjs/components/Combobox/useCombobox.js +33 -13
- package/lib-commonjs/components/Combobox/useCombobox.js.map +1 -1
- package/lib-commonjs/components/Combobox/{useComboboxStyles.js → useComboboxStyles.styles.js} +2 -2
- package/lib-commonjs/components/Combobox/useComboboxStyles.styles.js.map +1 -0
- package/lib-commonjs/components/Dropdown/Dropdown.js +3 -4
- package/lib-commonjs/components/Dropdown/Dropdown.js.map +1 -1
- package/lib-commonjs/components/Dropdown/index.js +1 -1
- package/lib-commonjs/components/Dropdown/index.js.map +1 -1
- package/lib-commonjs/components/Dropdown/{useDropdownStyles.js → useDropdownStyles.styles.js} +2 -2
- package/lib-commonjs/components/Dropdown/useDropdownStyles.styles.js.map +1 -0
- package/lib-commonjs/components/Listbox/Listbox.js +3 -4
- package/lib-commonjs/components/Listbox/Listbox.js.map +1 -1
- package/lib-commonjs/components/Listbox/index.js +1 -1
- package/lib-commonjs/components/Listbox/index.js.map +1 -1
- package/lib-commonjs/components/Listbox/{useListboxStyles.js → useListboxStyles.styles.js} +2 -2
- package/lib-commonjs/components/Listbox/useListboxStyles.styles.js.map +1 -0
- package/lib-commonjs/components/Option/Option.js +3 -4
- package/lib-commonjs/components/Option/Option.js.map +1 -1
- package/lib-commonjs/components/Option/index.js +1 -1
- package/lib-commonjs/components/Option/index.js.map +1 -1
- package/lib-commonjs/components/Option/{useOptionStyles.js → useOptionStyles.styles.js} +2 -2
- package/lib-commonjs/components/Option/useOptionStyles.styles.js.map +1 -0
- package/lib-commonjs/components/OptionGroup/OptionGroup.js +3 -4
- package/lib-commonjs/components/OptionGroup/OptionGroup.js.map +1 -1
- package/lib-commonjs/components/OptionGroup/index.js +1 -1
- package/lib-commonjs/components/OptionGroup/index.js.map +1 -1
- package/lib-commonjs/components/OptionGroup/{useOptionGroupStyles.js → useOptionGroupStyles.styles.js} +2 -2
- package/lib-commonjs/components/OptionGroup/useOptionGroupStyles.styles.js.map +1 -0
- package/package.json +11 -11
- package/.swcrc +0 -30
- package/lib/components/Combobox/useComboboxStyles.js.map +0 -1
- package/lib/components/Dropdown/useDropdownStyles.js.map +0 -1
- package/lib/components/Listbox/useListboxStyles.js.map +0 -1
- package/lib/components/Option/useOptionStyles.js.map +0 -1
- package/lib/components/OptionGroup/useOptionGroupStyles.js.map +0 -1
- package/lib-commonjs/components/Combobox/useComboboxStyles.js.map +0 -1
- package/lib-commonjs/components/Dropdown/useDropdownStyles.js.map +0 -1
- package/lib-commonjs/components/Listbox/useListboxStyles.js.map +0 -1
- package/lib-commonjs/components/Option/useOptionStyles.js.map +0 -1
- package/lib-commonjs/components/OptionGroup/useOptionGroupStyles.js.map +0 -1
|
@@ -34,4 +34,4 @@ export const useListboxStyles_unstable = state => {
|
|
|
34
34
|
state.root.className = mergeClasses(listboxClassNames.root, styles.root, state.root.className);
|
|
35
35
|
return state;
|
|
36
36
|
};
|
|
37
|
-
//# sourceMappingURL=useListboxStyles.js.map
|
|
37
|
+
//# sourceMappingURL=useListboxStyles.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["tokens","__styles","mergeClasses","shorthands","listboxClassNames","root","useStyles","De3pzq","B7ck84d","mc9l5x","Beiy3e4","Bf4jedk","Bmxbyg5","Bpd4iqm","oeaueh","Bw0xxkn","z8tnut","z189sj","Byoj8tv","uwmqm3","Belr9w4","d","useListboxStyles_unstable","state","styles","className"],"sources":["../../../src/components/Listbox/useListboxStyles.styles.ts"],"sourcesContent":["import { tokens } from '@fluentui/react-theme';\nimport { SlotClassNames } from '@fluentui/react-utilities';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { ListboxSlots, ListboxState } from './Listbox.types';\n\nexport const listboxClassNames: SlotClassNames<ListboxSlots> = {\n root: 'fui-Listbox',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n backgroundColor: tokens.colorNeutralBackground1,\n boxSizing: 'border-box',\n display: 'flex',\n flexDirection: 'column',\n minWidth: '160px',\n overflowY: 'auto',\n ...shorthands.outline('1px', 'solid', tokens.colorTransparentStroke),\n ...shorthands.padding(tokens.spacingHorizontalXS),\n rowGap: tokens.spacingHorizontalXXS,\n },\n});\n\n/**\n * Apply styling to the Listbox slots based on the state\n */\nexport const useListboxStyles_unstable = (state: ListboxState): ListboxState => {\n const styles = useStyles();\n state.root.className = mergeClasses(listboxClassNames.root, styles.root, state.root.className);\n\n return state;\n};\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ;AAEvB,SAAAC,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ;AAGrD,OAAO,MAAMC,iBAAA,GAAkD;EAC7DC,IAAA,EAAM;AACR;AAEA;;;AAGA,MAAMC,SAAA,gBAAYL,QAAA;EAAAI,IAAA;IAAAE,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,EAYlB;AAEA;;;AAGA,OAAO,MAAMC,yBAAA,GAA6BC,KAAA,IAAsC;EAC9E,MAAMC,MAAA,GAASlB,SAAA;EACfiB,KAAA,CAAMlB,IAAI,CAACoB,SAAS,GAAGvB,YAAA,CAAaE,iBAAA,CAAkBC,IAAI,EAAEmB,MAAA,CAAOnB,IAAI,EAAEkB,KAAA,CAAMlB,IAAI,CAACoB,SAAS;EAE7F,OAAOF,KAAA;AACT"}
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useOption_unstable } from './useOption';
|
|
3
3
|
import { renderOption_unstable } from './renderOption';
|
|
4
|
-
import { useOptionStyles_unstable } from './useOptionStyles';
|
|
5
|
-
import {
|
|
4
|
+
import { useOptionStyles_unstable } from './useOptionStyles.styles';
|
|
5
|
+
import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
|
|
6
6
|
/**
|
|
7
7
|
* Option component: a styled child option of a Combobox
|
|
8
8
|
*/
|
|
9
9
|
export const Option = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
10
10
|
const state = useOption_unstable(props, ref);
|
|
11
11
|
useOptionStyles_unstable(state);
|
|
12
|
-
|
|
13
|
-
useOptionStyles_unstable: useCustomStyles
|
|
14
|
-
} = useCustomStyleHooks_unstable();
|
|
15
|
-
useCustomStyles(state);
|
|
12
|
+
useCustomStyleHook_unstable('useOptionStyles_unstable')(state);
|
|
16
13
|
return renderOption_unstable(state);
|
|
17
14
|
});
|
|
18
15
|
Option.displayName = 'Option';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useOption_unstable","renderOption_unstable","useOptionStyles_unstable","
|
|
1
|
+
{"version":3,"names":["React","useOption_unstable","renderOption_unstable","useOptionStyles_unstable","useCustomStyleHook_unstable","Option","forwardRef","props","ref","state","displayName"],"sources":["../../../src/components/Option/Option.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useOption_unstable } from './useOption';\nimport { renderOption_unstable } from './renderOption';\nimport { useOptionStyles_unstable } from './useOptionStyles.styles';\nimport type { OptionProps } from './Option.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Option component: a styled child option of a Combobox\n */\nexport const Option: ForwardRefComponent<OptionProps> = React.forwardRef((props, ref) => {\n const state = useOption_unstable(props, ref);\n\n useOptionStyles_unstable(state);\n\n useCustomStyleHook_unstable('useOptionStyles_unstable')(state);\n\n return renderOption_unstable(state);\n});\n\nOption.displayName = 'Option';\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,kBAAkB,QAAQ;AACnC,SAASC,qBAAqB,QAAQ;AACtC,SAASC,wBAAwB,QAAQ;AAGzC,SAASC,2BAA2B,QAAQ;AAE5C;;;AAGA,OAAO,MAAMC,MAAA,gBAA2CL,KAAA,CAAMM,UAAU,CAAC,CAACC,KAAA,EAAOC,GAAA,KAAQ;EACvF,MAAMC,KAAA,GAAQR,kBAAA,CAAmBM,KAAA,EAAOC,GAAA;EAExCL,wBAAA,CAAyBM,KAAA;EAEzBL,2BAAA,CAA4B,4BAA4BK,KAAA;EAExD,OAAOP,qBAAA,CAAsBO,KAAA;AAC/B;AAEAJ,MAAA,CAAOK,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../../src/components/Option/index.ts"],"sourcesContent":["export * from './Option';\nexport * from './Option.types';\nexport * from './renderOption';\nexport * from './useOption';\nexport * from './useOptionStyles';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/components/Option/index.ts"],"sourcesContent":["export * from './Option';\nexport * from './Option.types';\nexport * from './renderOption';\nexport * from './useOption';\nexport * from './useOptionStyles.styles';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["tokens","__styles","mergeClasses","shorthands","optionClassNames","root","checkIcon","useStyles","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","useOptionStyles_unstable","state","focusVisible","multiselect","styles","className"],"sources":["../../../src/components/Option/useOptionStyles.styles.ts"],"sourcesContent":["import { tokens } from '@fluentui/react-theme';\nimport { SlotClassNames } from '@fluentui/react-utilities';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { OptionSlots, OptionState } from './Option.types';\n\nexport const optionClassNames: SlotClassNames<OptionSlots> = {\n root: 'fui-Option',\n checkIcon: 'fui-Option__checkIcon',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n alignItems: 'center',\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n color: tokens.colorNeutralForeground1,\n columnGap: tokens.spacingHorizontalXS,\n cursor: 'pointer',\n display: 'flex',\n fontFamily: tokens.fontFamilyBase,\n fontSize: tokens.fontSizeBase300,\n lineHeight: tokens.lineHeightBase300,\n ...shorthands.padding(tokens.spacingVerticalSNudge, tokens.spacingHorizontalS),\n position: 'relative',\n\n '&:hover': {\n backgroundColor: tokens.colorNeutralBackground1Hover,\n },\n\n '&:active': {\n backgroundColor: tokens.colorNeutralBackground1Pressed,\n },\n },\n\n active: {\n // taken from @fluentui/react-tabster\n // cannot use createFocusIndicatorStyle() directly, since we aren't using the :focus selector\n '::after': {\n content: '\"\"',\n position: 'absolute',\n pointerEvents: 'none',\n zIndex: 1,\n\n ...shorthands.borderStyle('solid'),\n ...shorthands.borderWidth('2px'),\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n ...shorthands.borderColor(tokens.colorStrokeFocus2),\n\n top: '-2px',\n bottom: '-2px',\n left: '-2px',\n right: '-2px',\n },\n },\n\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n\n '&:hover': {\n backgroundColor: tokens.colorTransparentBackground,\n },\n\n '&:active': {\n backgroundColor: tokens.colorTransparentBackground,\n },\n\n '@media (forced-colors: active)': {\n color: 'GrayText',\n },\n },\n\n selected: {},\n\n checkIcon: {\n fontSize: tokens.fontSizeBase400,\n // Shift icon(s) to the left to give text content extra spacing without needing an extra node\n // This is done instead of gap since the extra space only exists between icon > content, not icon > icon\n marginLeft: `calc(${tokens.spacingHorizontalXXS} * -1)`,\n marginRight: tokens.spacingHorizontalXXS,\n visibility: 'hidden',\n\n '& svg': {\n display: 'block',\n },\n },\n\n selectedCheck: {\n visibility: 'visible',\n },\n\n multiselectCheck: {\n ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStrokeAccessible),\n ...shorthands.borderRadius(tokens.borderRadiusSmall),\n boxSizing: 'border-box',\n\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n\n fill: 'currentColor',\n fontSize: '12px',\n height: '16px',\n width: '16px',\n visibility: 'visible',\n },\n\n selectedMultiselectCheck: {\n backgroundColor: tokens.colorCompoundBrandBackground,\n color: tokens.colorNeutralForegroundInverted,\n ...shorthands.borderColor(tokens.colorCompoundBrandBackground),\n },\n\n checkDisabled: {\n color: tokens.colorNeutralForegroundDisabled,\n\n '@media (forced-colors: active)': {\n color: 'GrayText',\n },\n },\n});\n\n/**\n * Apply styling to the Option slots based on the state\n */\nexport const useOptionStyles_unstable = (state: OptionState): OptionState => {\n const { active, disabled, focusVisible, multiselect, selected } = state;\n const styles = useStyles();\n state.root.className = mergeClasses(\n optionClassNames.root,\n styles.root,\n active && focusVisible && styles.active,\n disabled && styles.disabled,\n selected && styles.selected,\n state.root.className,\n );\n\n if (state.checkIcon) {\n state.checkIcon.className = mergeClasses(\n optionClassNames.checkIcon,\n styles.checkIcon,\n state.checkIcon.className,\n multiselect && styles.multiselectCheck,\n selected && styles.selectedCheck,\n selected && multiselect && styles.selectedMultiselectCheck,\n disabled && styles.checkDisabled,\n );\n }\n\n return state;\n};\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ;AAEvB,SAAAC,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ;AAGrD,OAAO,MAAMC,gBAAA,GAAgD;EAC3DC,IAAA,EAAM;EACNC,SAAA,EAAW;AACb;AAEA;;;AAGA,MAAMC,SAAA,gBAAYN,QAAA;EAAAI,IAAA;IAAAG,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;EAAA;EAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,KAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;EAAAC,QAAA;IAAAvC,MAAA;IAAAY,MAAA;IAAAC,MAAA;IAAA2B,OAAA;EAAA;EAAAC,QAAA;EAAAhD,SAAA;IAAAY,OAAA;IAAAqC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;EAAAC,aAAA;IAAAF,OAAA;EAAA;EAAAG,gB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,SAAS,EAC1BmF,MAAA,CAAOnF,SAAS,EAChBgF,KAAA,CAAMhF,SAAS,CAACoF,SAAS,EACzBF,WAAA,IAAeC,MAAA,CAAO7B,gBAAgB,EACtCN,QAAA,IAAYmC,MAAA,CAAO9B,aAAa,EAChCL,QAAA,IAAYkC,WAAA,IAAeC,MAAA,CAAOX,wBAAwB,EAC1D1B,QAAA,IAAYqC,MAAA,CAAOT,aAAa;EAEpC;EAEA,OAAOM,KAAA;AACT"}
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useOptionGroup_unstable } from './useOptionGroup';
|
|
3
3
|
import { renderOptionGroup_unstable } from './renderOptionGroup';
|
|
4
|
-
import { useOptionGroupStyles_unstable } from './useOptionGroupStyles';
|
|
5
|
-
import {
|
|
4
|
+
import { useOptionGroupStyles_unstable } from './useOptionGroupStyles.styles';
|
|
5
|
+
import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
|
|
6
6
|
/**
|
|
7
7
|
* OptionGroup component: allows grouping of Option components within a Combobox
|
|
8
8
|
*/
|
|
9
9
|
export const OptionGroup = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
10
10
|
const state = useOptionGroup_unstable(props, ref);
|
|
11
11
|
useOptionGroupStyles_unstable(state);
|
|
12
|
-
|
|
13
|
-
useOptionGroupStyles_unstable: useCustomStyles
|
|
14
|
-
} = useCustomStyleHooks_unstable();
|
|
15
|
-
useCustomStyles(state);
|
|
12
|
+
useCustomStyleHook_unstable('useOptionGroupStyles_unstable')(state);
|
|
16
13
|
return renderOptionGroup_unstable(state);
|
|
17
14
|
});
|
|
18
15
|
OptionGroup.displayName = 'OptionGroup';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useOptionGroup_unstable","renderOptionGroup_unstable","useOptionGroupStyles_unstable","
|
|
1
|
+
{"version":3,"names":["React","useOptionGroup_unstable","renderOptionGroup_unstable","useOptionGroupStyles_unstable","useCustomStyleHook_unstable","OptionGroup","forwardRef","props","ref","state","displayName"],"sources":["../../../src/components/OptionGroup/OptionGroup.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useOptionGroup_unstable } from './useOptionGroup';\nimport { renderOptionGroup_unstable } from './renderOptionGroup';\nimport { useOptionGroupStyles_unstable } from './useOptionGroupStyles.styles';\nimport type { OptionGroupProps } from './OptionGroup.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * OptionGroup component: allows grouping of Option components within a Combobox\n */\nexport const OptionGroup: ForwardRefComponent<OptionGroupProps> = React.forwardRef((props, ref) => {\n const state = useOptionGroup_unstable(props, ref);\n\n useOptionGroupStyles_unstable(state);\n\n useCustomStyleHook_unstable('useOptionGroupStyles_unstable')(state);\n\n return renderOptionGroup_unstable(state);\n});\n\nOptionGroup.displayName = 'OptionGroup';\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,uBAAuB,QAAQ;AACxC,SAASC,0BAA0B,QAAQ;AAC3C,SAASC,6BAA6B,QAAQ;AAG9C,SAASC,2BAA2B,QAAQ;AAE5C;;;AAGA,OAAO,MAAMC,WAAA,gBAAqDL,KAAA,CAAMM,UAAU,CAAC,CAACC,KAAA,EAAOC,GAAA,KAAQ;EACjG,MAAMC,KAAA,GAAQR,uBAAA,CAAwBM,KAAA,EAAOC,GAAA;EAE7CL,6BAAA,CAA8BM,KAAA;EAE9BL,2BAAA,CAA4B,iCAAiCK,KAAA;EAE7D,OAAOP,0BAAA,CAA2BO,KAAA;AACpC;AAEAJ,WAAA,CAAYK,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../../src/components/OptionGroup/index.ts"],"sourcesContent":["export * from './OptionGroup';\nexport * from './OptionGroup.types';\nexport * from './renderOptionGroup';\nexport * from './useOptionGroup';\nexport * from './useOptionGroupStyles';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/components/OptionGroup/index.ts"],"sourcesContent":["export * from './OptionGroup';\nexport * from './OptionGroup.types';\nexport * from './renderOptionGroup';\nexport * from './useOptionGroup';\nexport * from './useOptionGroupStyles.styles';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["tokens","__styles","mergeClasses","shorthands","optionGroupClassNames","root","label","useStyles","mc9l5x","Beiy3e4","Belr9w4","B8lkq7l","Gwp8xu","H93o2g","eii1in","om0q45","Hl9o3s","Bi9x0x4","B0i58d9","sl1c2c","z4hxbw","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","sj55zd","Be2twd7","Bhrd7zp","Bg96gwp","z8tnut","z189sj","Byoj8tv","uwmqm3","d","useOptionGroupStyles_unstable","state","styles","className"],"sources":["../../../src/components/OptionGroup/useOptionGroupStyles.styles.ts"],"sourcesContent":["import { tokens } from '@fluentui/react-theme';\nimport { SlotClassNames } from '@fluentui/react-utilities';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { OptionGroupSlots, OptionGroupState } from './OptionGroup.types';\n\nexport const optionGroupClassNames: SlotClassNames<OptionGroupSlots> = {\n root: 'fui-OptionGroup',\n label: 'fui-OptionGroup__label',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n flexDirection: 'column',\n rowGap: tokens.spacingHorizontalXXS,\n\n '&:not(:last-child)::after': {\n content: '\"\"',\n ...shorthands.borderBottom(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke2),\n display: 'block',\n paddingBottom: tokens.spacingHorizontalXS,\n ...shorthands.margin(0, `calc(${tokens.spacingHorizontalXS} * -1)`, tokens.spacingVerticalXS),\n },\n },\n\n label: {\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n color: tokens.colorNeutralForeground3,\n display: 'block',\n fontSize: tokens.fontSizeBase200,\n fontWeight: tokens.fontWeightSemibold,\n lineHeight: tokens.lineHeightBase200,\n ...shorthands.padding(tokens.spacingHorizontalS, tokens.spacingHorizontalSNudge),\n },\n});\n\n/**\n * Apply styling to the OptionGroup slots based on the state\n */\nexport const useOptionGroupStyles_unstable = (state: OptionGroupState): OptionGroupState => {\n const styles = useStyles();\n state.root.className = mergeClasses(optionGroupClassNames.root, styles.root, state.root.className);\n\n if (state.label) {\n state.label.className = mergeClasses(optionGroupClassNames.label, styles.label, state.label.className);\n }\n\n return state;\n};\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ;AAEvB,SAAAC,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ;AAGrD,OAAO,MAAMC,qBAAA,GAA0D;EACrEC,IAAA,EAAM;EACNC,KAAA,EAAO;AACT;AAEA;;;AAGA,MAAMC,SAAA,gBAAYN,QAAA;EAAAI,IAAA;IAAAG,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;EAAA;EAAAd,KAAA;IAAAe,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAjB,MAAA;IAAAkB,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,EAwBlB;AAEA;;;AAGA,OAAO,MAAMC,6BAAA,GAAiCC,KAAA,IAA8C;EAC1F,MAAMC,MAAA,GAAS7B,SAAA;EACf4B,KAAA,CAAM9B,IAAI,CAACgC,SAAS,GAAGnC,YAAA,CAAaE,qBAAA,CAAsBC,IAAI,EAAE+B,MAAA,CAAO/B,IAAI,EAAE8B,KAAA,CAAM9B,IAAI,CAACgC,SAAS;EAEjG,IAAIF,KAAA,CAAM7B,KAAK,EAAE;IACf6B,KAAA,CAAM7B,KAAK,CAAC+B,SAAS,GAAGnC,YAAA,CAAaE,qBAAA,CAAsBE,KAAK,EAAE8B,MAAA,CAAO9B,KAAK,EAAE6B,KAAA,CAAM7B,KAAK,CAAC+B,SAAS;EACvG;EAEA,OAAOF,KAAA;AACT"}
|
|
@@ -10,15 +10,14 @@ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildc
|
|
|
10
10
|
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
|
11
11
|
const _useCombobox = require("./useCombobox");
|
|
12
12
|
const _renderCombobox = require("./renderCombobox");
|
|
13
|
-
const
|
|
13
|
+
const _useComboboxStylesStyles = require("./useComboboxStyles.styles");
|
|
14
14
|
const _useComboboxContextValues = require("../../contexts/useComboboxContextValues");
|
|
15
15
|
const _reactSharedContexts = require("@fluentui/react-shared-contexts");
|
|
16
16
|
const Combobox = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
17
17
|
const state = (0, _useCombobox.useCombobox_unstable)(props, ref);
|
|
18
18
|
const contextValues = (0, _useComboboxContextValues.useComboboxContextValues)(state);
|
|
19
|
-
(0,
|
|
20
|
-
|
|
21
|
-
useCustomStyles(state);
|
|
19
|
+
(0, _useComboboxStylesStyles.useComboboxStyles_unstable)(state);
|
|
20
|
+
(0, _reactSharedContexts.useCustomStyleHook_unstable)('useComboboxStyles_unstable')(state);
|
|
22
21
|
return (0, _renderCombobox.renderCombobox_unstable)(state, contextValues);
|
|
23
22
|
});
|
|
24
23
|
Combobox.displayName = 'Combobox'; //# sourceMappingURL=Combobox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/Combobox/Combobox.js"],"sourcesContent":["import * as React from 'react';\nimport { useCombobox_unstable } from './useCombobox';\nimport { renderCombobox_unstable } from './renderCombobox';\nimport { useComboboxStyles_unstable } from './useComboboxStyles';\nimport { useComboboxContextValues } from '../../contexts/useComboboxContextValues';\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../lib/components/Combobox/Combobox.js"],"sourcesContent":["import * as React from 'react';\nimport { useCombobox_unstable } from './useCombobox';\nimport { renderCombobox_unstable } from './renderCombobox';\nimport { useComboboxStyles_unstable } from './useComboboxStyles.styles';\nimport { useComboboxContextValues } from '../../contexts/useComboboxContextValues';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * Combobox component: a selection control that allows users to choose from a set of possible options\n */\nexport const Combobox = /*#__PURE__*/React.forwardRef((props, ref) => {\n const state = useCombobox_unstable(props, ref);\n const contextValues = useComboboxContextValues(state);\n useComboboxStyles_unstable(state);\n useCustomStyleHook_unstable('useComboboxStyles_unstable')(state);\n return renderCombobox_unstable(state, contextValues);\n});\nCombobox.displayName = 'Combobox';\n//# sourceMappingURL=Combobox.js.map"],"names":["Combobox","React","forwardRef","props","ref","state","useCombobox_unstable","contextValues","useComboboxContextValues","useComboboxStyles_unstable","useCustomStyleHook_unstable","renderCombobox_unstable","displayName"],"mappings":";;;;+BASaA;;aAAAA;;;6DATU;6BACc;gCACG;yCACG;0CACF;qCACG;AAIrC,MAAMA,WAAW,WAAW,GAAEC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAQ;IACpE,MAAMC,QAAQC,IAAAA,iCAAoB,EAACH,OAAOC;IAC1C,MAAMG,gBAAgBC,IAAAA,kDAAwB,EAACH;IAC/CI,IAAAA,mDAA0B,EAACJ;IAC3BK,IAAAA,gDAA2B,EAAC,8BAA8BL;IAC1D,OAAOM,IAAAA,uCAAuB,EAACN,OAAOE;AACxC;AACAP,SAASY,WAAW,GAAG,YACvB,oCAAoC"}
|
|
@@ -7,7 +7,7 @@ _exportStar(require("./Combobox"), exports);
|
|
|
7
7
|
_exportStar(require("./Combobox.types"), exports);
|
|
8
8
|
_exportStar(require("./renderCombobox"), exports);
|
|
9
9
|
_exportStar(require("./useCombobox"), exports);
|
|
10
|
-
_exportStar(require("./useComboboxStyles"), exports);
|
|
10
|
+
_exportStar(require("./useComboboxStyles.styles"), exports);
|
|
11
11
|
//# sourceMappingURL=index.js.map
|
|
12
12
|
|
|
13
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/Combobox/index.js"],"sourcesContent":["export * from './Combobox';\nexport * from './Combobox.types';\nexport * from './renderCombobox';\nexport * from './useCombobox';\nexport * from './useComboboxStyles';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
|
|
1
|
+
{"version":3,"sources":["../../../lib/components/Combobox/index.js"],"sourcesContent":["export * from './Combobox';\nexport * from './Combobox.types';\nexport * from './renderCombobox';\nexport * from './useCombobox';\nexport * from './useComboboxStyles.styles';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
|
|
@@ -46,6 +46,9 @@ const useCombobox_unstable = (props, ref)=>{
|
|
|
46
46
|
// To prevent this, we clear the HTML attribute (but save the state) when a user presses left/right arrows
|
|
47
47
|
// ref: https://github.com/microsoft/fluentui/issues/26359#issuecomment-1397759888
|
|
48
48
|
const [hideActiveDescendant, setHideActiveDescendant] = _react.useState(false);
|
|
49
|
+
// save the typing vs. navigating options state, as the space key should behave differently in each case
|
|
50
|
+
// we do not want to update the combobox when this changes, just save the value between renders
|
|
51
|
+
const isTyping = _react.useRef(false);
|
|
49
52
|
// calculate listbox width style based on trigger width
|
|
50
53
|
const [popupDimensions, setPopupDimensions] = _react.useState();
|
|
51
54
|
_react.useEffect(()=>{
|
|
@@ -119,18 +122,6 @@ const useCombobox_unstable = (props, ref)=>{
|
|
|
119
122
|
clearSelection(ev);
|
|
120
123
|
}
|
|
121
124
|
};
|
|
122
|
-
// open Combobox when typing
|
|
123
|
-
const onTriggerKeyDown = (ev)=>{
|
|
124
|
-
if (!open && (0, _dropdownKeyActions.getDropdownActionFromKey)(ev) === 'Type') {
|
|
125
|
-
baseState.setOpen(ev, true);
|
|
126
|
-
}
|
|
127
|
-
// clear activedescendant when moving the text insertion cursor
|
|
128
|
-
if (ev.key === _keyboardKeys.ArrowLeft || ev.key === _keyboardKeys.ArrowRight) {
|
|
129
|
-
setHideActiveDescendant(true);
|
|
130
|
-
} else {
|
|
131
|
-
setHideActiveDescendant(false);
|
|
132
|
-
}
|
|
133
|
-
};
|
|
134
125
|
// resolve input and listbox slot props
|
|
135
126
|
let triggerSlot;
|
|
136
127
|
let listboxSlot;
|
|
@@ -143,9 +134,9 @@ const useCombobox_unstable = (props, ref)=>{
|
|
|
143
134
|
...triggerNativeProps
|
|
144
135
|
}
|
|
145
136
|
});
|
|
137
|
+
const resolvedPropsOnKeyDown = triggerSlot.onKeyDown;
|
|
146
138
|
triggerSlot.onChange = (0, _reactUtilities.mergeCallbacks)(triggerSlot.onChange, onTriggerChange);
|
|
147
139
|
triggerSlot.onBlur = (0, _reactUtilities.mergeCallbacks)(triggerSlot.onBlur, onTriggerBlur);
|
|
148
|
-
triggerSlot.onKeyDown = (0, _reactUtilities.mergeCallbacks)(triggerSlot.onKeyDown, onTriggerKeyDown);
|
|
149
140
|
// only resolve listbox slot if needed
|
|
150
141
|
listboxSlot = open || hasFocus ? (0, _reactUtilities.resolveShorthand)(props.listbox, {
|
|
151
142
|
required: true,
|
|
@@ -186,6 +177,35 @@ const useCombobox_unstable = (props, ref)=>{
|
|
|
186
177
|
...baseState
|
|
187
178
|
};
|
|
188
179
|
state.root.ref = (0, _reactUtilities.useMergedRefs)(state.root.ref, rootRef);
|
|
180
|
+
/* Set input.onKeyDown here, so we can override the default behavior for spacebar */ const defaultOnTriggerKeyDown = state.input.onKeyDown;
|
|
181
|
+
state.input.onKeyDown = (0, _reactUtilities.useEventCallback)((ev)=>{
|
|
182
|
+
if (!open && (0, _dropdownKeyActions.getDropdownActionFromKey)(ev) === 'Type') {
|
|
183
|
+
baseState.setOpen(ev, true);
|
|
184
|
+
}
|
|
185
|
+
// clear activedescendant when moving the text insertion cursor
|
|
186
|
+
if (ev.key === _keyboardKeys.ArrowLeft || ev.key === _keyboardKeys.ArrowRight) {
|
|
187
|
+
setHideActiveDescendant(true);
|
|
188
|
+
} else {
|
|
189
|
+
setHideActiveDescendant(false);
|
|
190
|
+
}
|
|
191
|
+
// update typing state to true if the user is typing
|
|
192
|
+
const action = (0, _dropdownKeyActions.getDropdownActionFromKey)(ev, {
|
|
193
|
+
open,
|
|
194
|
+
multiselect
|
|
195
|
+
});
|
|
196
|
+
if (action === 'Type') {
|
|
197
|
+
isTyping.current = true;
|
|
198
|
+
} else if (action === 'Open' && ev.key !== ' ' || action === 'Next' || action === 'Previous' || action === 'First' || action === 'Last' || action === 'PageUp' || action === 'PageDown') {
|
|
199
|
+
isTyping.current = false;
|
|
200
|
+
}
|
|
201
|
+
// allow space to insert a character if freeform & the last action was typing, or if the popup is closed
|
|
202
|
+
if (freeform && (isTyping.current || !open) && ev.key === ' ') {
|
|
203
|
+
resolvedPropsOnKeyDown === null || resolvedPropsOnKeyDown === void 0 ? void 0 : resolvedPropsOnKeyDown(ev);
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
// if we're not allowing space to type, continue with default behavior
|
|
207
|
+
defaultOnTriggerKeyDown === null || defaultOnTriggerKeyDown === void 0 ? void 0 : defaultOnTriggerKeyDown(ev);
|
|
208
|
+
});
|
|
189
209
|
/* handle open/close + focus change when clicking expandIcon */ const { onMouseDown: onIconMouseDown , onClick: onIconClick } = state.expandIcon || {};
|
|
190
210
|
const onExpandIconMouseDown = (0, _reactUtilities.useEventCallback)((0, _reactUtilities.mergeCallbacks)(onIconMouseDown, ()=>{
|
|
191
211
|
// do not dismiss on blur when closing via clicking the icon
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/Combobox/useCombobox.js"],"sourcesContent":["import * as React from 'react';\nimport { useFieldControlProps_unstable } from '@fluentui/react-field';\nimport { ArrowLeft, ArrowRight } from '@fluentui/keyboard-keys';\nimport { ChevronDownRegular as ChevronDownIcon } from '@fluentui/react-icons';\nimport { getPartitionedNativeProps, resolveShorthand, mergeCallbacks, useEventCallback, useId, useMergedRefs } from '@fluentui/react-utilities';\nimport { getDropdownActionFromKey } from '../../utils/dropdownKeyActions';\nimport { useComboboxBaseState } from '../../utils/useComboboxBaseState';\nimport { useComboboxPopup } from '../../utils/useComboboxPopup';\nimport { useTriggerListboxSlots } from '../../utils/useTriggerListboxSlots';\nimport { Listbox } from '../Listbox/Listbox';\n/**\n * Create the state required to render Combobox.\n *\n * The returned state can be modified with hooks such as useComboboxStyles_unstable,\n * before being passed to renderCombobox_unstable.\n *\n * @param props - props from this instance of Combobox\n * @param ref - reference to root HTMLElement of Combobox\n */\nexport const useCombobox_unstable = (props, ref) => {\n var _props_input;\n // Merge props from surrounding <Field>, if any\n props = useFieldControlProps_unstable(props, {\n supportsLabelFor: true,\n supportsRequired: true,\n supportsSize: true\n });\n const baseState = useComboboxBaseState({\n ...props,\n editable: true\n });\n const {\n activeOption,\n clearSelection,\n getIndexOfId,\n getOptionsMatchingText,\n hasFocus,\n open,\n selectOption,\n selectedOptions,\n setActiveOption,\n setFocusVisible,\n setOpen,\n setValue,\n value\n } = baseState;\n const {\n disabled,\n freeform,\n inlinePopup,\n multiselect\n } = props;\n const comboId = useId('combobox-');\n const {\n primary: triggerNativeProps,\n root: rootNativeProps\n } = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'input',\n excludedPropNames: ['children', 'size']\n });\n const rootRef = React.useRef(null);\n const triggerRef = React.useRef(null);\n // NVDA and JAWS have bugs that suppress reading the input value text when aria-activedescendant is set\n // To prevent this, we clear the HTML attribute (but save the state) when a user presses left/right arrows\n // ref: https://github.com/microsoft/fluentui/issues/26359#issuecomment-1397759888\n const [hideActiveDescendant, setHideActiveDescendant] = React.useState(false);\n // calculate listbox width style based on trigger width\n const [popupDimensions, setPopupDimensions] = React.useState();\n React.useEffect(() => {\n // only recalculate width when opening\n if (open) {\n var _rootRef_current;\n const width = `${(_rootRef_current = rootRef.current) === null || _rootRef_current === void 0 ? void 0 : _rootRef_current.clientWidth}px`;\n if (width !== (popupDimensions === null || popupDimensions === void 0 ? void 0 : popupDimensions.width)) {\n setPopupDimensions({\n width\n });\n }\n }\n }, [open, popupDimensions]);\n // set active option and selection based on typing\n const getOptionFromInput = inputValue => {\n const searchString = inputValue === null || inputValue === void 0 ? void 0 : inputValue.trim().toLowerCase();\n if (!searchString || searchString.length === 0) {\n return;\n }\n const matcher = optionText => optionText.toLowerCase().indexOf(searchString) === 0;\n const matches = getOptionsMatchingText(matcher);\n // return first matching option after the current active option, looping back to the top\n if (matches.length > 1 && activeOption) {\n const startIndex = getIndexOfId(activeOption.id);\n const nextMatch = matches.find(option => getIndexOfId(option.id) >= startIndex);\n return nextMatch !== null && nextMatch !== void 0 ? nextMatch : matches[0];\n }\n var _matches_;\n return (_matches_ = matches[0]) !== null && _matches_ !== void 0 ? _matches_ : undefined;\n };\n /* Handle typed input */ // reset any typed value when an option is selected\n baseState.selectOption = (ev, option) => {\n setValue(undefined);\n selectOption(ev, option);\n };\n const onTriggerBlur = ev => {\n // handle selection and updating value if freeform is false\n if (!baseState.open && !freeform) {\n // select matching option, if the value fully matches\n if (value && activeOption && value.trim().toLowerCase() === (activeOption === null || activeOption === void 0 ? void 0 : activeOption.text.toLowerCase())) {\n baseState.selectOption(ev, activeOption);\n }\n // reset typed value when the input loses focus while collapsed, unless freeform is true\n setValue(undefined);\n }\n };\n baseState.setOpen = (ev, newState) => {\n if (disabled) {\n return;\n }\n if (!newState && !freeform) {\n setValue(undefined);\n }\n setOpen(ev, newState);\n };\n // update value and active option based on input\n const onTriggerChange = ev => {\n const inputValue = ev.target.value;\n // update uncontrolled value\n baseState.setValue(inputValue);\n // handle updating active option based on input\n const matchingOption = getOptionFromInput(inputValue);\n setActiveOption(matchingOption);\n setFocusVisible(true);\n // clear selection for single-select if the input value no longer matches the selection\n if (!multiselect && selectedOptions.length === 1 && (inputValue.length < 1 || !matchingOption)) {\n clearSelection(ev);\n }\n };\n // open Combobox when typing\n const onTriggerKeyDown = ev => {\n if (!open && getDropdownActionFromKey(ev) === 'Type') {\n baseState.setOpen(ev, true);\n }\n // clear activedescendant when moving the text insertion cursor\n if (ev.key === ArrowLeft || ev.key === ArrowRight) {\n setHideActiveDescendant(true);\n } else {\n setHideActiveDescendant(false);\n }\n };\n // resolve input and listbox slot props\n let triggerSlot;\n let listboxSlot;\n triggerSlot = resolveShorthand(props.input, {\n required: true,\n defaultProps: {\n ref: useMergedRefs((_props_input = props.input) === null || _props_input === void 0 ? void 0 : _props_input.ref, triggerRef),\n type: 'text',\n value: value !== null && value !== void 0 ? value : '',\n ...triggerNativeProps\n }\n });\n triggerSlot.onChange = mergeCallbacks(triggerSlot.onChange, onTriggerChange);\n triggerSlot.onBlur = mergeCallbacks(triggerSlot.onBlur, onTriggerBlur);\n triggerSlot.onKeyDown = mergeCallbacks(triggerSlot.onKeyDown, onTriggerKeyDown);\n // only resolve listbox slot if needed\n listboxSlot = open || hasFocus ? resolveShorthand(props.listbox, {\n required: true,\n defaultProps: {\n children: props.children,\n style: popupDimensions\n }\n }) : undefined;\n [triggerSlot, listboxSlot] = useComboboxPopup(props, triggerSlot, listboxSlot);\n [triggerSlot, listboxSlot] = useTriggerListboxSlots(props, baseState, ref, triggerSlot, listboxSlot);\n if (hideActiveDescendant) {\n triggerSlot['aria-activedescendant'] = undefined;\n }\n const state = {\n components: {\n root: 'div',\n input: 'input',\n expandIcon: 'span',\n listbox: Listbox\n },\n root: resolveShorthand(props.root, {\n required: true,\n defaultProps: {\n 'aria-owns': !inlinePopup ? listboxSlot === null || listboxSlot === void 0 ? void 0 : listboxSlot.id : undefined,\n ...rootNativeProps\n }\n }),\n input: triggerSlot,\n listbox: listboxSlot,\n expandIcon: resolveShorthand(props.expandIcon, {\n required: true,\n defaultProps: {\n 'aria-expanded': open,\n children: /*#__PURE__*/React.createElement(ChevronDownIcon, null),\n role: 'button'\n }\n }),\n ...baseState\n };\n state.root.ref = useMergedRefs(state.root.ref, rootRef);\n /* handle open/close + focus change when clicking expandIcon */\n const {\n onMouseDown: onIconMouseDown,\n onClick: onIconClick\n } = state.expandIcon || {};\n const onExpandIconMouseDown = useEventCallback(mergeCallbacks(onIconMouseDown, () => {\n // do not dismiss on blur when closing via clicking the icon\n if (open) {\n baseState.ignoreNextBlur.current = true;\n }\n }));\n const onExpandIconClick = useEventCallback(mergeCallbacks(onIconClick, event => {\n var _triggerRef_current;\n // open and set focus\n state.setOpen(event, !state.open);\n (_triggerRef_current = triggerRef.current) === null || _triggerRef_current === void 0 ? void 0 : _triggerRef_current.focus();\n // set focus visible=false, since this can only be done with the mouse/pointer\n setFocusVisible(false);\n }));\n if (state.expandIcon) {\n state.expandIcon.onMouseDown = onExpandIconMouseDown;\n state.expandIcon.onClick = onExpandIconClick;\n // If there is no explicit aria-label, calculate default accName attribute for expandIcon button,\n // using the following steps:\n // 1. If there is an aria-label, it is \"Open [aria-label]\"\n // 2. If there is an aria-labelledby, it is \"Open [aria-labelledby target]\" (using aria-labelledby + ids)\n // 3. If there is no aria-label/ledby attr, it falls back to \"Open\"\n // We can't fall back to a label/htmlFor name because of https://github.com/w3c/accname/issues/179\n const hasExpandLabel = state.expandIcon['aria-label'] || state.expandIcon['aria-labelledby'];\n const defaultOpenString = 'Open'; // this is english-only since it is the fallback\n if (!hasExpandLabel) {\n if (props['aria-labelledby']) {\n var _state_expandIcon_id;\n const chevronId = (_state_expandIcon_id = state.expandIcon.id) !== null && _state_expandIcon_id !== void 0 ? _state_expandIcon_id : `${comboId}-chevron`;\n const chevronLabelledBy = `${chevronId} ${state.input['aria-labelledby']}`;\n state.expandIcon['aria-label'] = defaultOpenString;\n state.expandIcon.id = chevronId;\n state.expandIcon['aria-labelledby'] = chevronLabelledBy;\n } else if (props['aria-label']) {\n state.expandIcon['aria-label'] = `${defaultOpenString} ${props['aria-label']}`;\n } else {\n state.expandIcon['aria-label'] = defaultOpenString;\n }\n }\n }\n return state;\n};\n//# sourceMappingURL=useCombobox.js.map"],"names":["useCombobox_unstable","props","ref","_props_input","useFieldControlProps_unstable","supportsLabelFor","supportsRequired","supportsSize","baseState","useComboboxBaseState","editable","activeOption","clearSelection","getIndexOfId","getOptionsMatchingText","hasFocus","open","selectOption","selectedOptions","setActiveOption","setFocusVisible","setOpen","setValue","value","disabled","freeform","inlinePopup","multiselect","comboId","useId","primary","triggerNativeProps","root","rootNativeProps","getPartitionedNativeProps","primarySlotTagName","excludedPropNames","rootRef","React","useRef","triggerRef","hideActiveDescendant","setHideActiveDescendant","useState","popupDimensions","setPopupDimensions","useEffect","_rootRef_current","width","current","clientWidth","getOptionFromInput","inputValue","searchString","trim","toLowerCase","length","matcher","optionText","indexOf","matches","startIndex","id","nextMatch","find","option","_matches_","undefined","ev","onTriggerBlur","text","newState","onTriggerChange","target","matchingOption","onTriggerKeyDown","getDropdownActionFromKey","key","ArrowLeft","ArrowRight","triggerSlot","listboxSlot","resolveShorthand","input","required","defaultProps","useMergedRefs","type","onChange","mergeCallbacks","onBlur","onKeyDown","listbox","children","style","useComboboxPopup","useTriggerListboxSlots","state","components","expandIcon","Listbox","createElement","ChevronDownIcon","role","onMouseDown","onIconMouseDown","onClick","onIconClick","onExpandIconMouseDown","useEventCallback","ignoreNextBlur","onExpandIconClick","event","_triggerRef_current","focus","hasExpandLabel","defaultOpenString","_state_expandIcon_id","chevronId","chevronLabelledBy"],"mappings":";;;;+BAmBaA;;aAAAA;;;6DAnBU;4BACuB;8BACR;4BACgB;gCAC8D;oCAC3E;sCACJ;kCACJ;wCACM;yBACf;AAUjB,MAAMA,uBAAuB,CAACC,OAAOC,MAAQ;IAClD,IAAIC;IACJ,+CAA+C;IAC/CF,QAAQG,IAAAA,yCAA6B,EAACH,OAAO;QAC3CI,kBAAkB,I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AoB,QAAQ,gDAAgD;QAClF,IAAI,CAACD,gBAAgB;YACnB,IAAIlH,KAAK,CAAC,kBAAkB,EAAE;gBAC5B,IAAIoH;gBACJ,MAAMC,YAAY,AAACD,CAAAA,uBAAuBpB,MAAME,UAAU,CAACrC,EAAE,AAAD,MAAO,IAAI,IAAIuD,yBAAyB,KAAK,IAAIA,uBAAuB,CAAC,EAAEzF,QAAQ,QAAQ,CAAC;gBACxJ,MAAM2F,oBAAoB,CAAC,EAAED,UAAU,CAAC,EAAErB,MAAMd,KAAK,CAAC,kBAAkB,CAAC,CAAC;gBAC1Ec,MAAME,UAAU,CAAC,aAAa,GAAGiB;gBACjCnB,MAAME,UAAU,CAACrC,EAAE,GAAGwD;gBACtBrB,MAAME,UAAU,CAAC,kBAAkB,GAAGoB;YACxC,OAAO,IAAItH,KAAK,CAAC,aAAa,EAAE;gBAC9BgG,MAAME,UAAU,CAAC,aAAa,GAAG,CAAC,EAAEiB,kBAAkB,CAAC,EAAEnH,KAAK,CAAC,aAAa,CAAC,CAAC;YAChF,OAAO;gBACLgG,MAAME,UAAU,CAAC,aAAa,GAAGiB;YACnC,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAOnB;AACT,GACA,uCAAuC"}
|
|
1
|
+
{"version":3,"sources":["../../../lib/components/Combobox/useCombobox.js"],"sourcesContent":["import * as React from 'react';\nimport { useFieldControlProps_unstable } from '@fluentui/react-field';\nimport { ArrowLeft, ArrowRight } from '@fluentui/keyboard-keys';\nimport { ChevronDownRegular as ChevronDownIcon } from '@fluentui/react-icons';\nimport { getPartitionedNativeProps, resolveShorthand, mergeCallbacks, useEventCallback, useId, useMergedRefs } from '@fluentui/react-utilities';\nimport { getDropdownActionFromKey } from '../../utils/dropdownKeyActions';\nimport { useComboboxBaseState } from '../../utils/useComboboxBaseState';\nimport { useComboboxPopup } from '../../utils/useComboboxPopup';\nimport { useTriggerListboxSlots } from '../../utils/useTriggerListboxSlots';\nimport { Listbox } from '../Listbox/Listbox';\n/**\n * Create the state required to render Combobox.\n *\n * The returned state can be modified with hooks such as useComboboxStyles_unstable,\n * before being passed to renderCombobox_unstable.\n *\n * @param props - props from this instance of Combobox\n * @param ref - reference to root HTMLElement of Combobox\n */\nexport const useCombobox_unstable = (props, ref) => {\n var _props_input;\n // Merge props from surrounding <Field>, if any\n props = useFieldControlProps_unstable(props, {\n supportsLabelFor: true,\n supportsRequired: true,\n supportsSize: true\n });\n const baseState = useComboboxBaseState({\n ...props,\n editable: true\n });\n const {\n activeOption,\n clearSelection,\n getIndexOfId,\n getOptionsMatchingText,\n hasFocus,\n open,\n selectOption,\n selectedOptions,\n setActiveOption,\n setFocusVisible,\n setOpen,\n setValue,\n value\n } = baseState;\n const {\n disabled,\n freeform,\n inlinePopup,\n multiselect\n } = props;\n const comboId = useId('combobox-');\n const {\n primary: triggerNativeProps,\n root: rootNativeProps\n } = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'input',\n excludedPropNames: ['children', 'size']\n });\n const rootRef = React.useRef(null);\n const triggerRef = React.useRef(null);\n // NVDA and JAWS have bugs that suppress reading the input value text when aria-activedescendant is set\n // To prevent this, we clear the HTML attribute (but save the state) when a user presses left/right arrows\n // ref: https://github.com/microsoft/fluentui/issues/26359#issuecomment-1397759888\n const [hideActiveDescendant, setHideActiveDescendant] = React.useState(false);\n // save the typing vs. navigating options state, as the space key should behave differently in each case\n // we do not want to update the combobox when this changes, just save the value between renders\n const isTyping = React.useRef(false);\n // calculate listbox width style based on trigger width\n const [popupDimensions, setPopupDimensions] = React.useState();\n React.useEffect(() => {\n // only recalculate width when opening\n if (open) {\n var _rootRef_current;\n const width = `${(_rootRef_current = rootRef.current) === null || _rootRef_current === void 0 ? void 0 : _rootRef_current.clientWidth}px`;\n if (width !== (popupDimensions === null || popupDimensions === void 0 ? void 0 : popupDimensions.width)) {\n setPopupDimensions({\n width\n });\n }\n }\n }, [open, popupDimensions]);\n // set active option and selection based on typing\n const getOptionFromInput = inputValue => {\n const searchString = inputValue === null || inputValue === void 0 ? void 0 : inputValue.trim().toLowerCase();\n if (!searchString || searchString.length === 0) {\n return;\n }\n const matcher = optionText => optionText.toLowerCase().indexOf(searchString) === 0;\n const matches = getOptionsMatchingText(matcher);\n // return first matching option after the current active option, looping back to the top\n if (matches.length > 1 && activeOption) {\n const startIndex = getIndexOfId(activeOption.id);\n const nextMatch = matches.find(option => getIndexOfId(option.id) >= startIndex);\n return nextMatch !== null && nextMatch !== void 0 ? nextMatch : matches[0];\n }\n var _matches_;\n return (_matches_ = matches[0]) !== null && _matches_ !== void 0 ? _matches_ : undefined;\n };\n /* Handle typed input */ // reset any typed value when an option is selected\n baseState.selectOption = (ev, option) => {\n setValue(undefined);\n selectOption(ev, option);\n };\n const onTriggerBlur = ev => {\n // handle selection and updating value if freeform is false\n if (!baseState.open && !freeform) {\n // select matching option, if the value fully matches\n if (value && activeOption && value.trim().toLowerCase() === (activeOption === null || activeOption === void 0 ? void 0 : activeOption.text.toLowerCase())) {\n baseState.selectOption(ev, activeOption);\n }\n // reset typed value when the input loses focus while collapsed, unless freeform is true\n setValue(undefined);\n }\n };\n baseState.setOpen = (ev, newState) => {\n if (disabled) {\n return;\n }\n if (!newState && !freeform) {\n setValue(undefined);\n }\n setOpen(ev, newState);\n };\n // update value and active option based on input\n const onTriggerChange = ev => {\n const inputValue = ev.target.value;\n // update uncontrolled value\n baseState.setValue(inputValue);\n // handle updating active option based on input\n const matchingOption = getOptionFromInput(inputValue);\n setActiveOption(matchingOption);\n setFocusVisible(true);\n // clear selection for single-select if the input value no longer matches the selection\n if (!multiselect && selectedOptions.length === 1 && (inputValue.length < 1 || !matchingOption)) {\n clearSelection(ev);\n }\n };\n // resolve input and listbox slot props\n let triggerSlot;\n let listboxSlot;\n triggerSlot = resolveShorthand(props.input, {\n required: true,\n defaultProps: {\n ref: useMergedRefs((_props_input = props.input) === null || _props_input === void 0 ? void 0 : _props_input.ref, triggerRef),\n type: 'text',\n value: value !== null && value !== void 0 ? value : '',\n ...triggerNativeProps\n }\n });\n const resolvedPropsOnKeyDown = triggerSlot.onKeyDown;\n triggerSlot.onChange = mergeCallbacks(triggerSlot.onChange, onTriggerChange);\n triggerSlot.onBlur = mergeCallbacks(triggerSlot.onBlur, onTriggerBlur);\n // only resolve listbox slot if needed\n listboxSlot = open || hasFocus ? resolveShorthand(props.listbox, {\n required: true,\n defaultProps: {\n children: props.children,\n style: popupDimensions\n }\n }) : undefined;\n [triggerSlot, listboxSlot] = useComboboxPopup(props, triggerSlot, listboxSlot);\n [triggerSlot, listboxSlot] = useTriggerListboxSlots(props, baseState, ref, triggerSlot, listboxSlot);\n if (hideActiveDescendant) {\n triggerSlot['aria-activedescendant'] = undefined;\n }\n const state = {\n components: {\n root: 'div',\n input: 'input',\n expandIcon: 'span',\n listbox: Listbox\n },\n root: resolveShorthand(props.root, {\n required: true,\n defaultProps: {\n 'aria-owns': !inlinePopup ? listboxSlot === null || listboxSlot === void 0 ? void 0 : listboxSlot.id : undefined,\n ...rootNativeProps\n }\n }),\n input: triggerSlot,\n listbox: listboxSlot,\n expandIcon: resolveShorthand(props.expandIcon, {\n required: true,\n defaultProps: {\n 'aria-expanded': open,\n children: /*#__PURE__*/React.createElement(ChevronDownIcon, null),\n role: 'button'\n }\n }),\n ...baseState\n };\n state.root.ref = useMergedRefs(state.root.ref, rootRef);\n /* Set input.onKeyDown here, so we can override the default behavior for spacebar */\n const defaultOnTriggerKeyDown = state.input.onKeyDown;\n state.input.onKeyDown = useEventCallback(ev => {\n if (!open && getDropdownActionFromKey(ev) === 'Type') {\n baseState.setOpen(ev, true);\n }\n // clear activedescendant when moving the text insertion cursor\n if (ev.key === ArrowLeft || ev.key === ArrowRight) {\n setHideActiveDescendant(true);\n } else {\n setHideActiveDescendant(false);\n }\n // update typing state to true if the user is typing\n const action = getDropdownActionFromKey(ev, {\n open,\n multiselect\n });\n if (action === 'Type') {\n isTyping.current = true;\n } else if (action === 'Open' && ev.key !== ' ' || action === 'Next' || action === 'Previous' || action === 'First' || action === 'Last' || action === 'PageUp' || action === 'PageDown') {\n isTyping.current = false;\n }\n // allow space to insert a character if freeform & the last action was typing, or if the popup is closed\n if (freeform && (isTyping.current || !open) && ev.key === ' ') {\n resolvedPropsOnKeyDown === null || resolvedPropsOnKeyDown === void 0 ? void 0 : resolvedPropsOnKeyDown(ev);\n return;\n }\n // if we're not allowing space to type, continue with default behavior\n defaultOnTriggerKeyDown === null || defaultOnTriggerKeyDown === void 0 ? void 0 : defaultOnTriggerKeyDown(ev);\n });\n /* handle open/close + focus change when clicking expandIcon */\n const {\n onMouseDown: onIconMouseDown,\n onClick: onIconClick\n } = state.expandIcon || {};\n const onExpandIconMouseDown = useEventCallback(mergeCallbacks(onIconMouseDown, () => {\n // do not dismiss on blur when closing via clicking the icon\n if (open) {\n baseState.ignoreNextBlur.current = true;\n }\n }));\n const onExpandIconClick = useEventCallback(mergeCallbacks(onIconClick, event => {\n var _triggerRef_current;\n // open and set focus\n state.setOpen(event, !state.open);\n (_triggerRef_current = triggerRef.current) === null || _triggerRef_current === void 0 ? void 0 : _triggerRef_current.focus();\n // set focus visible=false, since this can only be done with the mouse/pointer\n setFocusVisible(false);\n }));\n if (state.expandIcon) {\n state.expandIcon.onMouseDown = onExpandIconMouseDown;\n state.expandIcon.onClick = onExpandIconClick;\n // If there is no explicit aria-label, calculate default accName attribute for expandIcon button,\n // using the following steps:\n // 1. If there is an aria-label, it is \"Open [aria-label]\"\n // 2. If there is an aria-labelledby, it is \"Open [aria-labelledby target]\" (using aria-labelledby + ids)\n // 3. If there is no aria-label/ledby attr, it falls back to \"Open\"\n // We can't fall back to a label/htmlFor name because of https://github.com/w3c/accname/issues/179\n const hasExpandLabel = state.expandIcon['aria-label'] || state.expandIcon['aria-labelledby'];\n const defaultOpenString = 'Open'; // this is english-only since it is the fallback\n if (!hasExpandLabel) {\n if (props['aria-labelledby']) {\n var _state_expandIcon_id;\n const chevronId = (_state_expandIcon_id = state.expandIcon.id) !== null && _state_expandIcon_id !== void 0 ? _state_expandIcon_id : `${comboId}-chevron`;\n const chevronLabelledBy = `${chevronId} ${state.input['aria-labelledby']}`;\n state.expandIcon['aria-label'] = defaultOpenString;\n state.expandIcon.id = chevronId;\n state.expandIcon['aria-labelledby'] = chevronLabelledBy;\n } else if (props['aria-label']) {\n state.expandIcon['aria-label'] = `${defaultOpenString} ${props['aria-label']}`;\n } else {\n state.expandIcon['aria-label'] = defaultOpenString;\n }\n }\n }\n return state;\n};\n//# sourceMappingURL=useCombobox.js.map"],"names":["useCombobox_unstable","props","ref","_props_input","useFieldControlProps_unstable","supportsLabelFor","supportsRequired","supportsSize","baseState","useComboboxBaseState","editable","activeOption","clearSelection","getIndexOfId","getOptionsMatchingText","hasFocus","open","selectOption","selectedOptions","setActiveOption","setFocusVisible","setOpen","setValue","value","disabled","freeform","inlinePopup","multiselect","comboId","useId","primary","triggerNativeProps","root","rootNativeProps","getPartitionedNativeProps","primarySlotTagName","excludedPropNames","rootRef","React","useRef","triggerRef","hideActiveDescendant","setHideActiveDescendant","useState","isTyping","popupDimensions","setPopupDimensions","useEffect","_rootRef_current","width","current","clientWidth","getOptionFromInput","inputValue","searchString","trim","toLowerCase","length","matcher","optionText","indexOf","matches","startIndex","id","nextMatch","find","option","_matches_","undefined","ev","onTriggerBlur","text","newState","onTriggerChange","target","matchingOption","triggerSlot","listboxSlot","resolveShorthand","input","required","defaultProps","useMergedRefs","type","resolvedPropsOnKeyDown","onKeyDown","onChange","mergeCallbacks","onBlur","listbox","children","style","useComboboxPopup","useTriggerListboxSlots","state","components","expandIcon","Listbox","createElement","ChevronDownIcon","role","defaultOnTriggerKeyDown","useEventCallback","getDropdownActionFromKey","key","ArrowLeft","ArrowRight","action","onMouseDown","onIconMouseDown","onClick","onIconClick","onExpandIconMouseDown","ignoreNextBlur","onExpandIconClick","event","_triggerRef_current","focus","hasExpandLabel","defaultOpenString","_state_expandIcon_id","chevronId","chevronLabelledBy"],"mappings":";;;;+BAmBaA;;aAAAA;;;6DAnBU;4BACu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,MAAM8F,oBAAoB,CAAC,EAAED,UAAU,CAAC,EAAE3B,MAAMf,KAAK,CAAC,kBAAkB,CAAC,CAAC;gBAC1Ee,MAAME,UAAU,CAAC,aAAa,GAAGuB;gBACjCzB,MAAME,UAAU,CAACjC,EAAE,GAAG0D;gBACtB3B,MAAME,UAAU,CAAC,kBAAkB,GAAG0B;YACxC,OAAO,IAAIzH,KAAK,CAAC,aAAa,EAAE;gBAC9B6F,MAAME,UAAU,CAAC,aAAa,GAAG,CAAC,EAAEuB,kBAAkB,CAAC,EAAEtH,KAAK,CAAC,aAAa,CAAC,CAAC;YAChF,OAAO;gBACL6F,MAAME,UAAU,CAAC,aAAa,GAAGuB;YACnC,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAOzB;AACT,GACA,uCAAuC"}
|
package/lib-commonjs/components/Combobox/{useComboboxStyles.js → useComboboxStyles.styles.js}
RENAMED
|
@@ -654,6 +654,6 @@ const useComboboxStyles_unstable = (state)=>{
|
|
|
654
654
|
state.expandIcon.className = (0, _react.mergeClasses)(comboboxClassNames.expandIcon, iconStyles.icon, iconStyles[size], disabled && iconStyles.disabled, state.expandIcon.className);
|
|
655
655
|
}
|
|
656
656
|
return state;
|
|
657
|
-
}; //# sourceMappingURL=useComboboxStyles.js.map
|
|
657
|
+
}; //# sourceMappingURL=useComboboxStyles.styles.js.map
|
|
658
658
|
|
|
659
|
-
//# sourceMappingURL=useComboboxStyles.js.map
|
|
659
|
+
//# sourceMappingURL=useComboboxStyles.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../lib/components/Combobox/useComboboxStyles.styles.js"],"sourcesContent":["import { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { __styles, mergeClasses, shorthands } from '@griffel/react';\nimport { iconSizes } from '../../utils/internalTokens';\nexport const comboboxClassNames = {\n root: 'fui-Combobox',\n input: 'fui-Combobox__input',\n expandIcon: 'fui-Combobox__expandIcon',\n listbox: 'fui-Combobox__listbox'\n};\n// Matches internal heights for Select and Input, but there are no theme variables for these\n// field heights are 2px less than other controls, since the border is on the parent element.\nconst fieldHeights = {\n small: '22px',\n medium: '30px',\n large: '38px'\n};\n/**\n * Styles for Combobox\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 B7ck84d: \"f1ewtqcl\",\n i8kkvl: \"f14mj54c\",\n mc9l5x: \"fwk3njj\",\n Budl1dq: \"fz17x9o\",\n Brf1p80: \"f1869bpl\",\n Bf4jedk: \"f1exfvgq\",\n qhf8xq: \"f10pi13n\",\n Bbr2w1p: \"f14a1fxs\",\n Bduesf4: \"f3e99gv\",\n Bpq79vn: \"fhljsf7\",\n li1rpt: \"f1gw3sf2\",\n Bsft5z2: \"f13zj6fq\",\n E3zdtr: \"f1mdlcz9\",\n Eqx8gd: [\"f1a7op3\", \"f1cjjd47\"],\n By385i5: \"f1gboi2j\",\n B1piin3: [\"f1cjjd47\", \"f1a7op3\"],\n Dlnsje: \"f145g4dw\",\n d9w3h3: [\"f1kp91vd\", \"f1ibwz09\"],\n B3778ie: [\"f1ibwz09\", \"f1kp91vd\"],\n Bcgy8vk: \"f14pi962\",\n Bw17bha: \"f1lh990p\",\n B1q35kw: \"f1jc6hxc\",\n Gjdm7m: \"f13evtba\",\n b1kco5: \"f1yk9hq\",\n Ba2ppi3: \"fhwpy7i\",\n F2fol1: \"f14ee0xe\",\n lck23g: \"f1xhbsuh\",\n df92cz: \"fv8e3ye\",\n I188md: \"ftb5wc6\",\n umuwi5: \"fjw5xc1\",\n Blcqepd: \"f1xdyd5c\",\n nplu4u: \"fatpbeo\",\n Bioka5o: \"fb7uyps\",\n H713fs: \"f1cmft4k\",\n B9ooomg: \"f1x58t8o\",\n Bercvud: \"f1ibeo51\"\n },\n listbox: {\n E5pizo: \"f1hg901r\",\n Bbmb7ep: [\"f1aa9q02\", \"f16jpd5f\"],\n Beyfa6y: [\"f16jpd5f\", \"f1aa9q02\"],\n B7oj6ja: [\"f1jar5jt\", \"fyu767a\"],\n Btl43ni: [\"fyu767a\", \"f1jar5jt\"],\n Bxyxcbc: \"fmmk62d\"\n },\n listboxCollapsed: {\n mc9l5x: \"fjseox\"\n },\n small: {\n z189sj: [\"fdw0yi8\", \"fk8j09s\"]\n },\n medium: {\n z189sj: [\"f11gcy0p\", \"f1ng84yb\"]\n },\n large: {\n i8kkvl: \"f1rjii52\",\n z189sj: [\"fw5db7e\", \"f1uw59to\"]\n },\n outline: {\n De3pzq: \"fxugw4r\",\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: \"fj3muxo\",\n h3c5rm: [\"f1akhkt\", \"f1lxtadh\"],\n B9xav0g: \"f1c1zstj\",\n zhjwy3: [\"f1lxtadh\", \"f1akhkt\"]\n },\n outlineInteractive: {\n Bgoe8wy: \"fvcxoqz\",\n Bwzppfd: [\"f1ub3y4t\", \"f1m52nbi\"],\n oetu4i: \"flmw63s\",\n gg5e9n: [\"f1m52nbi\", \"f1ub3y4t\"],\n B6oc9vd: \"fvs00aa\",\n ak43y8: [\"f1assf6x\", \"f4ruux4\"],\n wmxk5l: \"fqhmt4z\",\n B50zh58: [\"f4ruux4\", \"f1assf6x\"]\n },\n underline: {\n De3pzq: \"f1c21dwh\",\n Bn0qgzm: \"f1vxd6vx\",\n oivjwe: \"fg706s2\",\n B9xav0g: \"f1c1zstj\",\n Bbmb7ep: [\"f1krrbdw\", \"f1deotkl\"],\n Beyfa6y: [\"f1deotkl\", \"f1krrbdw\"],\n B7oj6ja: [\"f10ostut\", \"f1ozlkrg\"],\n Btl43ni: [\"f1ozlkrg\", \"f10ostut\"]\n },\n \"filled-lighter\": {\n De3pzq: \"fxugw4r\",\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: \"fghlq4f\",\n h3c5rm: [\"f1gn591s\", \"fjscplz\"],\n B9xav0g: \"fb073pr\",\n zhjwy3: [\"fjscplz\", \"f1gn591s\"]\n },\n \"filled-darker\": {\n De3pzq: \"f16xq7d1\",\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: \"fghlq4f\",\n h3c5rm: [\"f1gn591s\", \"fjscplz\"],\n B9xav0g: \"fb073pr\",\n zhjwy3: [\"fjscplz\", \"f1gn591s\"]\n },\n invalid: {\n tvckwq: \"fs4k3qj\",\n gk2u95: [\"fcee079\", \"fmyw78r\"],\n hhx65j: \"f1fgmyf4\",\n Bxowmz0: [\"fmyw78r\", \"fcee079\"]\n },\n invalidUnderline: {\n hhx65j: \"f1fgmyf4\"\n },\n disabled: {\n Bceei9c: \"fdrzuqr\",\n De3pzq: \"f1c21dwh\",\n g2u3we: \"f1jj8ep1\",\n h3c5rm: [\"f15xbau\", \"fy0fskl\"],\n B9xav0g: \"f4ikngz\",\n zhjwy3: [\"fy0fskl\", \"f15xbau\"],\n Bjwas2f: \"fg455y9\",\n Bn1d65q: [\"f1rvyvqg\", \"f14g86mu\"],\n Bxeuatn: \"f1cwzwz\",\n n51gp8: [\"f14g86mu\", \"f1rvyvqg\"]\n }\n}, {\n d: [\".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;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);}\", \".f1ewtqcl{box-sizing:border-box;}\", \".f14mj54c{-webkit-column-gap:var(--spacingHorizontalXXS);column-gap:var(--spacingHorizontalXXS);}\", \".fwk3njj{display:inline-grid;}\", \".fz17x9o{grid-template-columns:1fr auto;}\", \".f1869bpl{-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;}\", \".f1exfvgq{min-width:250px;}\", \".f10pi13n{position:relative;}\", \".f1gw3sf2::after{box-sizing:border-box;}\", \".f13zj6fq::after{content:\\\"\\\";}\", \".f1mdlcz9::after{position:absolute;}\", \".f1a7op3::after{left:-1px;}\", \".f1cjjd47::after{right:-1px;}\", \".f1gboi2j::after{bottom:-1px;}\", \".f145g4dw::after{height:max(2px, var(--borderRadiusMedium));}\", \".f1kp91vd::after{border-bottom-left-radius:var(--borderRadiusMedium);}\", \".f1ibwz09::after{border-bottom-right-radius:var(--borderRadiusMedium);}\", \".f14pi962::after{border-bottom-width:var(--strokeWidthThick);}\", \".f1lh990p::after{border-bottom-style:solid;}\", \".f1jc6hxc::after{border-bottom-color:var(--colorCompoundBrandStroke);}\", \".f13evtba::after{-webkit-clip-path:inset(calc(100% - 2px) 0 0 0);clip-path:inset(calc(100% - 2px) 0 0 0);}\", \".f1yk9hq::after{-webkit-transform:scaleX(0);-moz-transform:scaleX(0);-ms-transform:scaleX(0);transform:scaleX(0);}\", \".fhwpy7i::after{transition-property:transform;}\", \".f14ee0xe::after{transition-duration:var(--durationUltraFast);}\", \".f1xhbsuh::after{transition-delay:var(--curveAccelerateMid);}\", \".f1hg901r{box-shadow:var(--shadow16);}\", \".fmmk62d{max-height:80vh;}\", \".fjseox{display:none;}\", \".fdw0yi8{padding-right:var(--spacingHorizontalSNudge);}\", \".fk8j09s{padding-left:var(--spacingHorizontalSNudge);}\", \".f11gcy0p{padding-right:var(--spacingHorizontalMNudge);}\", \".f1ng84yb{padding-left:var(--spacingHorizontalMNudge);}\", \".f1rjii52{-webkit-column-gap:var(--spacingHorizontalSNudge);column-gap:var(--spacingHorizontalSNudge);}\", \".fw5db7e{padding-right:var(--spacingHorizontalM);}\", \".f1uw59to{padding-left:var(--spacingHorizontalM);}\", \".fxugw4r{background-color:var(--colorNeutralBackground1);}\", \".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;}\", \".fj3muxo{border-top-color:var(--colorNeutralStroke1);}\", \".f1akhkt{border-right-color:var(--colorNeutralStroke1);}\", \".f1lxtadh{border-left-color:var(--colorNeutralStroke1);}\", \".f1c1zstj{border-bottom-color:var(--colorNeutralStrokeAccessible);}\", \".f1c21dwh{background-color:var(--colorTransparentBackground);}\", \".f1krrbdw{border-bottom-right-radius:0;}\", \".f1deotkl{border-bottom-left-radius:0;}\", \".f10ostut{border-top-right-radius:0;}\", \".f1ozlkrg{border-top-left-radius:0;}\", \".fghlq4f{border-top-color:var(--colorTransparentStroke);}\", \".f1gn591s{border-right-color:var(--colorTransparentStroke);}\", \".fjscplz{border-left-color:var(--colorTransparentStroke);}\", \".fb073pr{border-bottom-color:var(--colorTransparentStroke);}\", \".f16xq7d1{background-color:var(--colorNeutralBackground3);}\", \".fs4k3qj:not(:focus-within),.fs4k3qj:hover:not(:focus-within){border-top-color:var(--colorPaletteRedBorder2);}\", \".fcee079:not(:focus-within),.fcee079:hover:not(:focus-within){border-right-color:var(--colorPaletteRedBorder2);}\", \".fmyw78r:not(:focus-within),.fmyw78r:hover:not(:focus-within){border-left-color:var(--colorPaletteRedBorder2);}\", \".f1fgmyf4:not(:focus-within),.f1fgmyf4:hover:not(:focus-within){border-bottom-color:var(--colorPaletteRedBorder2);}\", \".fdrzuqr{cursor:not-allowed;}\", \".f1jj8ep1{border-top-color:var(--colorNeutralStrokeDisabled);}\", \".f15xbau{border-right-color:var(--colorNeutralStrokeDisabled);}\", \".fy0fskl{border-left-color:var(--colorNeutralStrokeDisabled);}\", \".f4ikngz{border-bottom-color:var(--colorNeutralStrokeDisabled);}\"],\n w: [\".f14a1fxs:focus-within{outline-width:2px;}\", \".f3e99gv:focus-within{outline-style:solid;}\", \".fhljsf7:focus-within{outline-color:transparent;}\", \".fjw5xc1:focus-within::after{-webkit-transform:scaleX(1);-moz-transform:scaleX(1);-ms-transform:scaleX(1);transform:scaleX(1);}\", \".f1xdyd5c:focus-within::after{transition-property:transform;}\", \".fatpbeo:focus-within::after{transition-duration:var(--durationNormal);}\", \".fb7uyps:focus-within::after{transition-delay:var(--curveDecelerateMid);}\", \".f1ibeo51:focus-within:active::after{border-bottom-color:var(--colorCompoundBrandStrokePressed);}\"],\n m: [[\"@media screen and (prefers-reduced-motion: reduce){.fv8e3ye::after{transition-duration:0.01ms;}}\", {\n m: \"screen and (prefers-reduced-motion: reduce)\"\n }], [\"@media screen and (prefers-reduced-motion: reduce){.ftb5wc6::after{transition-delay:0.01ms;}}\", {\n m: \"screen and (prefers-reduced-motion: reduce)\"\n }], [\"@media screen and (prefers-reduced-motion: reduce){.f1cmft4k:focus-within::after{transition-duration:0.01ms;}}\", {\n m: \"screen and (prefers-reduced-motion: reduce)\"\n }], [\"@media screen and (prefers-reduced-motion: reduce){.f1x58t8o:focus-within::after{transition-delay:0.01ms;}}\", {\n m: \"screen and (prefers-reduced-motion: reduce)\"\n }], [\"@media (forced-colors: active){.fg455y9{border-top-color:GrayText;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f1rvyvqg{border-right-color:GrayText;}.f14g86mu{border-left-color:GrayText;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f1cwzwz{border-bottom-color:GrayText;}}\", {\n m: \"(forced-colors: active)\"\n }], [\"@media (forced-colors: active){.f14g86mu{border-left-color:GrayText;}.f1rvyvqg{border-right-color:GrayText;}}\", {\n m: \"(forced-colors: active)\"\n }]],\n h: [\".fvcxoqz:hover{border-top-color:var(--colorNeutralStroke1Hover);}\", \".f1ub3y4t:hover{border-right-color:var(--colorNeutralStroke1Hover);}\", \".f1m52nbi:hover{border-left-color:var(--colorNeutralStroke1Hover);}\", \".flmw63s:hover{border-bottom-color:var(--colorNeutralStrokeAccessible);}\"],\n a: [\".fvs00aa:active{border-top-color:var(--colorNeutralStroke1Pressed);}\", \".f1assf6x:active{border-right-color:var(--colorNeutralStroke1Pressed);}\", \".f4ruux4:active{border-left-color:var(--colorNeutralStroke1Pressed);}\", \".fqhmt4z:active{border-bottom-color:var(--colorNeutralStrokeAccessible);}\"]\n});\nconst useInputStyles = /*#__PURE__*/__styles({\n input: {\n De3pzq: \"f1c21dwh\",\n B4j52fo: \"fre7gi1\",\n Bekrc4i: [\"f1358rze\", \"f1rvrf73\"],\n Bn0qgzm: \"fqdk4by\",\n ibv6hh: [\"f1rvrf73\", \"f1358rze\"],\n sj55zd: \"f19n0e5\",\n Bahqtrf: \"fk6fouc\",\n Brovlpu: \"ftqa4ok\",\n yvdlaj: \"fwyc1cq\",\n B3o7kgh: \"f13ta7ih\"\n },\n small: {\n Bqenvij: \"f50nw0v\",\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"fy9rknc\",\n Bhrd7zp: \"figsok6\",\n Bg96gwp: \"fwrc4pm\",\n z8tnut: \"f1g0x7ka\",\n z189sj: [\"fhxju0i\", \"f1cnd47f\"],\n Byoj8tv: \"f1qch9an\",\n uwmqm3: [\"f1xile11\", \"fqznh8f\"]\n },\n medium: {\n Bqenvij: \"f1tvdnth\",\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"fkhj508\",\n Bhrd7zp: \"figsok6\",\n Bg96gwp: \"f1i3iumi\",\n z8tnut: \"f1g0x7ka\",\n z189sj: [\"fhxju0i\", \"f1cnd47f\"],\n Byoj8tv: \"f1qch9an\",\n uwmqm3: [\"f1e60jzv\", \"f135dnwl\"]\n },\n large: {\n Bqenvij: \"f1ihhdec\",\n Bahqtrf: \"fk6fouc\",\n Be2twd7: \"fod5ikn\",\n Bhrd7zp: \"figsok6\",\n Bg96gwp: \"faaz57k\",\n z8tnut: \"f1g0x7ka\",\n z189sj: [\"fhxju0i\", \"f1cnd47f\"],\n Byoj8tv: \"f1qch9an\",\n uwmqm3: [\"fnphzt9\", \"flt1dlf\"]\n },\n disabled: {\n sj55zd: \"f1s2aq7o\",\n De3pzq: \"f1c21dwh\",\n Bceei9c: \"fdrzuqr\",\n yvdlaj: \"fahhnxm\"\n }\n}, {\n d: [\".f1c21dwh{background-color:var(--colorTransparentBackground);}\", \".fre7gi1{border-top-width:0;}\", \".f1358rze{border-right-width:0;}\", \".f1rvrf73{border-left-width:0;}\", \".fqdk4by{border-bottom-width:0;}\", \".f19n0e5{color:var(--colorNeutralForeground1);}\", \".fk6fouc{font-family:var(--fontFamilyBase);}\", \".fwyc1cq::-webkit-input-placeholder{color:var(--colorNeutralForeground4);}\", \".fwyc1cq::-moz-placeholder{color:var(--colorNeutralForeground4);}\", \".f13ta7ih::-webkit-input-placeholder{opacity:1;}\", \".f13ta7ih::-moz-placeholder{opacity:1;}\", \".f50nw0v{height:22px;}\", \".fy9rknc{font-size:var(--fontSizeBase200);}\", \".figsok6{font-weight:var(--fontWeightRegular);}\", \".fwrc4pm{line-height:var(--lineHeightBase200);}\", \".f1g0x7ka{padding-top:0;}\", \".fhxju0i{padding-right:0;}\", \".f1cnd47f{padding-left:0;}\", \".f1qch9an{padding-bottom:0;}\", \".f1xile11{padding-left:calc(var(--spacingHorizontalSNudge) + var(--spacingHorizontalXXS));}\", \".fqznh8f{padding-right:calc(var(--spacingHorizontalSNudge) + var(--spacingHorizontalXXS));}\", \".f1tvdnth{height:30px;}\", \".fkhj508{font-size:var(--fontSizeBase300);}\", \".f1i3iumi{line-height:var(--lineHeightBase300);}\", \".f1e60jzv{padding-left:calc(var(--spacingHorizontalMNudge) + var(--spacingHorizontalXXS));}\", \".f135dnwl{padding-right:calc(var(--spacingHorizontalMNudge) + var(--spacingHorizontalXXS));}\", \".f1ihhdec{height:38px;}\", \".fod5ikn{font-size:var(--fontSizeBase400);}\", \".faaz57k{line-height:var(--lineHeightBase400);}\", \".fnphzt9{padding-left:calc(var(--spacingHorizontalM) + var(--spacingHorizontalSNudge));}\", \".flt1dlf{padding-right:calc(var(--spacingHorizontalM) + var(--spacingHorizontalSNudge));}\", \".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}\", \".fdrzuqr{cursor:not-allowed;}\", \".fahhnxm::-webkit-input-placeholder{color:var(--colorNeutralForegroundDisabled);}\", \".fahhnxm::-moz-placeholder{color:var(--colorNeutralForegroundDisabled);}\"],\n f: [\".ftqa4ok:focus{outline-style:none;}\"]\n});\nconst useIconStyles = /*#__PURE__*/__styles({\n icon: {\n B7ck84d: \"f1ewtqcl\",\n sj55zd: \"fxkbij4\",\n Bceei9c: \"f1k6fduh\",\n mc9l5x: \"ftgm304\",\n Be2twd7: \"f1pp30po\",\n Bo70h7d: \"fvc9v3g\"\n },\n small: {\n Be2twd7: \"f4ybsrx\",\n Frg6f3: [\"f1h9en5y\", \"f1xk557c\"]\n },\n medium: {\n Be2twd7: \"fe5j1ua\",\n Frg6f3: [\"f1h9en5y\", \"f1xk557c\"]\n },\n large: {\n Be2twd7: \"f1rt2boy\",\n Frg6f3: [\"f1t5qyk5\", \"f1ikr372\"]\n },\n disabled: {\n sj55zd: \"f1s2aq7o\",\n Bceei9c: \"fdrzuqr\"\n }\n}, {\n d: [\".f1ewtqcl{box-sizing:border-box;}\", \".fxkbij4{color:var(--colorNeutralStrokeAccessible);}\", \".f1k6fduh{cursor:pointer;}\", \".ftgm304{display:block;}\", \".f1pp30po{font-size:var(--fontSizeBase500);}\", \".fvc9v3g svg{display:block;}\", \".f4ybsrx{font-size:16px;}\", \".f1h9en5y{margin-left:var(--spacingHorizontalXXS);}\", \".f1xk557c{margin-right:var(--spacingHorizontalXXS);}\", \".fe5j1ua{font-size:20px;}\", \".f1rt2boy{font-size:24px;}\", \".f1t5qyk5{margin-left:var(--spacingHorizontalSNudge);}\", \".f1ikr372{margin-right:var(--spacingHorizontalSNudge);}\", \".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}\", \".fdrzuqr{cursor:not-allowed;}\"]\n});\n/**\n * Apply styling to the Combobox slots based on the state\n */\nexport const useComboboxStyles_unstable = state => {\n const {\n appearance,\n open,\n size\n } = state;\n const invalid = `${state.input['aria-invalid']}` === 'true';\n const disabled = state.input.disabled;\n const styles = useStyles();\n const iconStyles = useIconStyles();\n const inputStyles = useInputStyles();\n state.root.className = mergeClasses(comboboxClassNames.root, styles.root, styles[appearance], styles[size], !disabled && appearance === 'outline' && styles.outlineInteractive, invalid && appearance !== 'underline' && styles.invalid, invalid && appearance === 'underline' && styles.invalidUnderline, disabled && styles.disabled, state.root.className);\n state.input.className = mergeClasses(comboboxClassNames.input, inputStyles.input, inputStyles[size], disabled && inputStyles.disabled, state.input.className);\n if (state.listbox) {\n state.listbox.className = mergeClasses(comboboxClassNames.listbox, styles.listbox, !open && styles.listboxCollapsed, state.listbox.className);\n }\n if (state.expandIcon) {\n state.expandIcon.className = mergeClasses(comboboxClassNames.expandIcon, iconStyles.icon, iconStyles[size], disabled && iconStyles.disabled, state.expandIcon.className);\n }\n return state;\n};\n//# sourceMappingURL=useComboboxStyles.styles.js.map"],"names":["comboboxClassNames","useComboboxStyles_unstable","root","input","expandIcon","listbox","fieldHeights","small","medium","large","useStyles","__styles","Bt984gj","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","B7ck84d","i8kkvl","mc9l5x","Budl1dq","Brf1p80","Bf4jedk","qhf8xq","Bbr2w1p","Bduesf4","Bpq79vn","li1rpt","Bsft5z2","E3zdtr","Eqx8gd","By385i5","B1piin3","Dlnsje","d9w3h3","B3778ie","Bcgy8vk","Bw17bha","B1q35kw","Gjdm7m","b1kco5","Ba2ppi3","F2fol1","lck23g","df92cz","I188md","umuwi5","Blcqepd","nplu4u","Bioka5o","H713fs","B9ooomg","Bercvud","E5pizo","Bxyxcbc","listboxCollapsed","z189sj","outline","De3pzq","B4j52fo","Bekrc4i","Bn0qgzm","ibv6hh","icvyot","vrafjx","oivjwe","wvpqe5","g2u3we","h3c5rm","B9xav0g","zhjwy3","outlineInteractive","Bgoe8wy","Bwzppfd","oetu4i","gg5e9n","B6oc9vd","ak43y8","wmxk5l","B50zh58","underline","invalid","tvckwq","gk2u95","hhx65j","Bxowmz0","invalidUnderline","disabled","Bceei9c","Bjwas2f","Bn1d65q","Bxeuatn","n51gp8","d","w","m","h","a","useInputStyles","sj55zd","Bahqtrf","Brovlpu","yvdlaj","B3o7kgh","Bqenvij","Be2twd7","Bhrd7zp","Bg96gwp","z8tnut","Byoj8tv","uwmqm3","f","useIconStyles","icon","Bo70h7d","Frg6f3","state","appearance","open","size","styles","iconStyles","inputStyles","className","mergeClasses"],"mappings":";;;;;;;;;;;IAGaA,kBAAkB,MAAlBA;IAqRAC,0BAA0B,MAA1BA;;uBAvRsC;AAE5C,MAAMD,qBAAqB;IAChCE,MAAM;IACNC,OAAO;IACPC,YAAY;IACZC,SAAS;AACX;AACA,4FAA4F;AAC5F,6FAA6F;AAC7F,MAAMC,eAAe;IACnBC,OAAO;IACPC,QAAQ;IACRC,OAAO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WAAWoC,eAAe,eAAeG,OAAOlC,gBAAgB,EAAEC,YAAYiC,OAAOjC,QAAQ,EAAE6B,MAAMlH,IAAI,CAACyH,SAAS;IAC5VP,MAAMjH,KAAK,CAACwH,SAAS,GAAGC,IAAAA,mBAAY,EAAC5H,mBAAmBG,KAAK,EAAEuH,YAAYvH,KAAK,EAAEuH,WAAW,CAACH,KAAK,EAAEhC,YAAYmC,YAAYnC,QAAQ,EAAE6B,MAAMjH,KAAK,CAACwH,SAAS;IAC5J,IAAIP,MAAM/G,OAAO,EAAE;QACjB+G,MAAM/G,OAAO,CAACsH,SAAS,GAAGC,IAAAA,mBAAY,EAAC5H,mBAAmBK,OAAO,EAAEmH,OAAOnH,OAAO,EAAE,CAACiH,QAAQE,OAAOjE,gBAAgB,EAAE6D,MAAM/G,OAAO,CAACsH,SAAS;IAC9I,CAAC;IACD,IAAIP,MAAMhH,UAAU,EAAE;QACpBgH,MAAMhH,UAAU,CAACuH,SAAS,GAAGC,IAAAA,mBAAY,EAAC5H,mBAAmBI,UAAU,EAAEqH,WAAWR,IAAI,EAAEQ,UAAU,CAACF,KAAK,EAAEhC,YAAYkC,WAAWlC,QAAQ,EAAE6B,MAAMhH,UAAU,CAACuH,SAAS;IACzK,CAAC;IACD,OAAOP;AACT,GACA,oDAAoD"}
|
|
@@ -10,15 +10,14 @@ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildc
|
|
|
10
10
|
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
|
11
11
|
const _useDropdown = require("./useDropdown");
|
|
12
12
|
const _renderDropdown = require("./renderDropdown");
|
|
13
|
-
const
|
|
13
|
+
const _useDropdownStylesStyles = require("./useDropdownStyles.styles");
|
|
14
14
|
const _useComboboxContextValues = require("../../contexts/useComboboxContextValues");
|
|
15
15
|
const _reactSharedContexts = require("@fluentui/react-shared-contexts");
|
|
16
16
|
const Dropdown = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
17
17
|
const state = (0, _useDropdown.useDropdown_unstable)(props, ref);
|
|
18
18
|
const contextValues = (0, _useComboboxContextValues.useComboboxContextValues)(state);
|
|
19
|
-
(0,
|
|
20
|
-
|
|
21
|
-
useCustomStyles(state);
|
|
19
|
+
(0, _useDropdownStylesStyles.useDropdownStyles_unstable)(state);
|
|
20
|
+
(0, _reactSharedContexts.useCustomStyleHook_unstable)('useDropdownStyles_unstable')(state);
|
|
22
21
|
return (0, _renderDropdown.renderDropdown_unstable)(state, contextValues);
|
|
23
22
|
});
|
|
24
23
|
Dropdown.displayName = 'Dropdown'; //# sourceMappingURL=Dropdown.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/Dropdown/Dropdown.js"],"sourcesContent":["import * as React from 'react';\nimport { useDropdown_unstable } from './useDropdown';\nimport { renderDropdown_unstable } from './renderDropdown';\nimport { useDropdownStyles_unstable } from './useDropdownStyles';\nimport { useComboboxContextValues } from '../../contexts/useComboboxContextValues';\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../lib/components/Dropdown/Dropdown.js"],"sourcesContent":["import * as React from 'react';\nimport { useDropdown_unstable } from './useDropdown';\nimport { renderDropdown_unstable } from './renderDropdown';\nimport { useDropdownStyles_unstable } from './useDropdownStyles.styles';\nimport { useComboboxContextValues } from '../../contexts/useComboboxContextValues';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n/**\n * Dropdown component: a selection control that allows users to choose from a set of possible options\n */\nexport const Dropdown = /*#__PURE__*/React.forwardRef((props, ref) => {\n const state = useDropdown_unstable(props, ref);\n const contextValues = useComboboxContextValues(state);\n useDropdownStyles_unstable(state);\n useCustomStyleHook_unstable('useDropdownStyles_unstable')(state);\n return renderDropdown_unstable(state, contextValues);\n});\nDropdown.displayName = 'Dropdown';\n//# sourceMappingURL=Dropdown.js.map"],"names":["Dropdown","React","forwardRef","props","ref","state","useDropdown_unstable","contextValues","useComboboxContextValues","useDropdownStyles_unstable","useCustomStyleHook_unstable","renderDropdown_unstable","displayName"],"mappings":";;;;+BASaA;;aAAAA;;;6DATU;6BACc;gCACG;yCACG;0CACF;qCACG;AAIrC,MAAMA,WAAW,WAAW,GAAEC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAQ;IACpE,MAAMC,QAAQC,IAAAA,iCAAoB,EAACH,OAAOC;IAC1C,MAAMG,gBAAgBC,IAAAA,kDAAwB,EAACH;IAC/CI,IAAAA,mDAA0B,EAACJ;IAC3BK,IAAAA,gDAA2B,EAAC,8BAA8BL;IAC1D,OAAOM,IAAAA,uCAAuB,EAACN,OAAOE;AACxC;AACAP,SAASY,WAAW,GAAG,YACvB,oCAAoC"}
|
|
@@ -7,7 +7,7 @@ _exportStar(require("./Dropdown"), exports);
|
|
|
7
7
|
_exportStar(require("./Dropdown.types"), exports);
|
|
8
8
|
_exportStar(require("./renderDropdown"), exports);
|
|
9
9
|
_exportStar(require("./useDropdown"), exports);
|
|
10
|
-
_exportStar(require("./useDropdownStyles"), exports);
|
|
10
|
+
_exportStar(require("./useDropdownStyles.styles"), exports);
|
|
11
11
|
//# sourceMappingURL=index.js.map
|
|
12
12
|
|
|
13
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../lib/components/Dropdown/index.js"],"sourcesContent":["export * from './Dropdown';\nexport * from './Dropdown.types';\nexport * from './renderDropdown';\nexport * from './useDropdown';\nexport * from './useDropdownStyles';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
|
|
1
|
+
{"version":3,"sources":["../../../lib/components/Dropdown/index.js"],"sourcesContent":["export * from './Dropdown';\nexport * from './Dropdown.types';\nexport * from './renderDropdown';\nexport * from './useDropdown';\nexport * from './useDropdownStyles.styles';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
|
package/lib-commonjs/components/Dropdown/{useDropdownStyles.js → useDropdownStyles.styles.js}
RENAMED
|
@@ -624,6 +624,6 @@ const useDropdownStyles_unstable = (state)=>{
|
|
|
624
624
|
state.expandIcon.className = (0, _react.mergeClasses)(dropdownClassNames.expandIcon, iconStyles.icon, iconStyles[size], disabled && iconStyles.disabled, state.expandIcon.className);
|
|
625
625
|
}
|
|
626
626
|
return state;
|
|
627
|
-
}; //# sourceMappingURL=useDropdownStyles.js.map
|
|
627
|
+
}; //# sourceMappingURL=useDropdownStyles.styles.js.map
|
|
628
628
|
|
|
629
|
-
//# sourceMappingURL=useDropdownStyles.js.map
|
|
629
|
+
//# sourceMappingURL=useDropdownStyles.styles.js.map
|