@fluentui/react-combobox 9.7.5 → 9.8.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.md +26 -5
- package/dist/index.d.ts +54 -11
- package/lib/components/Combobox/Combobox.types.js.map +1 -1
- package/lib/components/Combobox/renderCombobox.js +15 -11
- package/lib/components/Combobox/renderCombobox.js.map +1 -1
- package/lib/components/Combobox/useCombobox.js +12 -4
- package/lib/components/Combobox/useCombobox.js.map +1 -1
- package/lib/components/Combobox/useInputTriggerSlot.js +14 -12
- package/lib/components/Combobox/useInputTriggerSlot.js.map +1 -1
- package/lib/components/Dropdown/Dropdown.types.js.map +1 -1
- package/lib/components/Dropdown/renderDropdown.js +19 -15
- package/lib/components/Dropdown/renderDropdown.js.map +1 -1
- package/lib/components/Dropdown/useButtonTriggerSlot.js +51 -31
- package/lib/components/Dropdown/useButtonTriggerSlot.js.map +1 -1
- package/lib/components/Dropdown/useDropdown.js +14 -4
- package/lib/components/Dropdown/useDropdown.js.map +1 -1
- package/lib/components/Listbox/Listbox.types.js.map +1 -1
- package/lib/components/Listbox/renderListbox.js +7 -3
- package/lib/components/Listbox/renderListbox.js.map +1 -1
- package/lib/components/Listbox/useListbox.js +43 -35
- package/lib/components/Listbox/useListbox.js.map +1 -1
- package/lib/components/Option/Option.types.js.map +1 -1
- package/lib/components/Option/useOption.js +7 -11
- package/lib/components/Option/useOption.js.map +1 -1
- package/lib/components/Option/useOptionStyles.styles.js +27 -28
- package/lib/components/Option/useOptionStyles.styles.js.map +1 -1
- package/lib/contexts/useComboboxContextValues.js +14 -5
- package/lib/contexts/useComboboxContextValues.js.map +1 -1
- package/lib/contexts/useListboxContextValues.js +12 -5
- package/lib/contexts/useListboxContextValues.js.map +1 -1
- package/lib/utils/ComboboxBase.types.js.map +1 -1
- package/lib/utils/OptionCollection.types.js.map +1 -1
- package/lib/utils/Selection.types.js.map +1 -1
- package/lib/utils/dropdownKeyActions.js +0 -21
- package/lib/utils/dropdownKeyActions.js.map +1 -1
- package/lib/utils/useComboboxBaseState.js +52 -14
- package/lib/utils/useComboboxBaseState.js.map +1 -1
- package/lib/utils/useOptionCollection.js +18 -45
- package/lib/utils/useOptionCollection.js.map +1 -1
- package/lib/utils/useTriggerSlot.js +86 -33
- package/lib/utils/useTriggerSlot.js.map +1 -1
- package/lib-commonjs/components/Combobox/renderCombobox.js +15 -11
- package/lib-commonjs/components/Combobox/renderCombobox.js.map +1 -1
- package/lib-commonjs/components/Combobox/useCombobox.js +12 -4
- package/lib-commonjs/components/Combobox/useCombobox.js.map +1 -1
- package/lib-commonjs/components/Combobox/useInputTriggerSlot.js +14 -12
- package/lib-commonjs/components/Combobox/useInputTriggerSlot.js.map +1 -1
- package/lib-commonjs/components/Dropdown/renderDropdown.js +19 -15
- package/lib-commonjs/components/Dropdown/renderDropdown.js.map +1 -1
- package/lib-commonjs/components/Dropdown/useButtonTriggerSlot.js +51 -31
- package/lib-commonjs/components/Dropdown/useButtonTriggerSlot.js.map +1 -1
- package/lib-commonjs/components/Dropdown/useDropdown.js +14 -4
- package/lib-commonjs/components/Dropdown/useDropdown.js.map +1 -1
- package/lib-commonjs/components/Listbox/renderListbox.js +7 -3
- package/lib-commonjs/components/Listbox/renderListbox.js.map +1 -1
- package/lib-commonjs/components/Listbox/useListbox.js +42 -34
- package/lib-commonjs/components/Listbox/useListbox.js.map +1 -1
- package/lib-commonjs/components/Option/useOption.js +7 -11
- package/lib-commonjs/components/Option/useOption.js.map +1 -1
- package/lib-commonjs/components/Option/useOptionStyles.styles.js +85 -85
- package/lib-commonjs/components/Option/useOptionStyles.styles.js.map +1 -1
- package/lib-commonjs/contexts/useComboboxContextValues.js +13 -5
- package/lib-commonjs/contexts/useComboboxContextValues.js.map +1 -1
- package/lib-commonjs/contexts/useListboxContextValues.js +13 -5
- package/lib-commonjs/contexts/useListboxContextValues.js.map +1 -1
- package/lib-commonjs/utils/dropdownKeyActions.js +3 -30
- package/lib-commonjs/utils/dropdownKeyActions.js.map +1 -1
- package/lib-commonjs/utils/useComboboxBaseState.js +52 -14
- package/lib-commonjs/utils/useComboboxBaseState.js.map +1 -1
- package/lib-commonjs/utils/useOptionCollection.js +18 -45
- package/lib-commonjs/utils/useOptionCollection.js.map +1 -1
- package/lib-commonjs/utils/useTriggerSlot.js +84 -31
- package/lib-commonjs/utils/useTriggerSlot.js.map +1 -1
- package/package.json +9 -8
- package/lib/utils/useScrollOptionsIntoView.js +0 -29
- package/lib/utils/useScrollOptionsIntoView.js.map +0 -1
- package/lib-commonjs/utils/useScrollOptionsIntoView.js +0 -40
- package/lib-commonjs/utils/useScrollOptionsIntoView.js.map +0 -1
|
@@ -12,6 +12,7 @@ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildc
|
|
|
12
12
|
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
13
|
const _reactutilities = require("@fluentui/react-utilities");
|
|
14
14
|
const _reactcontextselector = require("@fluentui/react-context-selector");
|
|
15
|
+
const _reactaria = require("@fluentui/react-aria");
|
|
15
16
|
const _reacticons = require("@fluentui/react-icons");
|
|
16
17
|
const _ComboboxContext = require("../../contexts/ComboboxContext");
|
|
17
18
|
const _ListboxContext = require("../../contexts/ListboxContext");
|
|
@@ -54,8 +55,8 @@ const useOption_unstable = (props, ref)=>{
|
|
|
54
55
|
optionText,
|
|
55
56
|
optionValue
|
|
56
57
|
]);
|
|
58
|
+
const { controller: activeDescendantController } = (0, _reactaria.useActiveDescendantContext)();
|
|
57
59
|
// context values
|
|
58
|
-
const focusVisible = (0, _reactcontextselector.useContextSelector)(_ListboxContext.ListboxContext, (ctx)=>ctx.focusVisible);
|
|
59
60
|
const multiselect = (0, _reactcontextselector.useContextSelector)(_ListboxContext.ListboxContext, (ctx)=>ctx.multiselect);
|
|
60
61
|
const registerOption = (0, _reactcontextselector.useContextSelector)(_ListboxContext.ListboxContext, (ctx)=>ctx.registerOption);
|
|
61
62
|
const selected = (0, _reactcontextselector.useContextSelector)(_ListboxContext.ListboxContext, (ctx)=>{
|
|
@@ -63,13 +64,7 @@ const useOption_unstable = (props, ref)=>{
|
|
|
63
64
|
return !!optionValue && !!selectedOptions.find((o)=>o === optionValue);
|
|
64
65
|
});
|
|
65
66
|
const selectOption = (0, _reactcontextselector.useContextSelector)(_ListboxContext.ListboxContext, (ctx)=>ctx.selectOption);
|
|
66
|
-
const setActiveOption = (0, _reactcontextselector.useContextSelector)(_ListboxContext.ListboxContext, (ctx)=>ctx.setActiveOption);
|
|
67
67
|
const setOpen = (0, _reactcontextselector.useContextSelector)(_ComboboxContext.ComboboxContext, (ctx)=>ctx.setOpen);
|
|
68
|
-
// current active option?
|
|
69
|
-
const active = (0, _reactcontextselector.useContextSelector)(_ListboxContext.ListboxContext, (ctx)=>{
|
|
70
|
-
var _ctx_activeOption, _ctx_activeOption1;
|
|
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;
|
|
72
|
-
});
|
|
73
68
|
// check icon
|
|
74
69
|
let CheckIcon = /*#__PURE__*/ _react.createElement(_reacticons.CheckmarkFilled, null);
|
|
75
70
|
if (multiselect) {
|
|
@@ -82,7 +77,7 @@ const useOption_unstable = (props, ref)=>{
|
|
|
82
77
|
return;
|
|
83
78
|
}
|
|
84
79
|
// clicked option should always become active option
|
|
85
|
-
|
|
80
|
+
activeDescendantController.focus(id);
|
|
86
81
|
// close on option click for single-select options in a combobox
|
|
87
82
|
if (!multiselect) {
|
|
88
83
|
setOpen === null || setOpen === void 0 ? void 0 : setOpen(event, false);
|
|
@@ -134,10 +129,11 @@ const useOption_unstable = (props, ref)=>{
|
|
|
134
129
|
},
|
|
135
130
|
elementType: 'span'
|
|
136
131
|
}),
|
|
137
|
-
active,
|
|
138
132
|
disabled,
|
|
139
|
-
focusVisible,
|
|
140
133
|
multiselect,
|
|
141
|
-
selected
|
|
134
|
+
selected,
|
|
135
|
+
// no longer used
|
|
136
|
+
focusVisible: false,
|
|
137
|
+
active: false
|
|
142
138
|
};
|
|
143
139
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useOption.js"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, 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
|
|
1
|
+
{"version":3,"sources":["useOption.js"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, useId, useMergedRefs, slot } from '@fluentui/react-utilities';\nimport { useContextSelector } from '@fluentui/react-context-selector';\nimport { useActiveDescendantContext } from '@fluentui/react-aria';\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 const { controller: activeDescendantController } = useActiveDescendantContext();\n // context values\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 setOpen = useContextSelector(ComboboxContext, (ctx)=>ctx.setOpen);\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 activeDescendantController.focus(id);\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(getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\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 disabled,\n multiselect,\n selected,\n // no longer used\n focusVisible: false,\n active: false\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","controller","activeDescendantController","useActiveDescendantContext","multiselect","useContextSelector","ListboxContext","ctx","registerOption","selected","selectedOptions","find","o","selectOption","setOpen","ComboboxContext","CheckIcon","createElement","CheckmarkFilled","Checkmark12Filled","onClick","event","_props_onClick","preventDefault","focus","call","useEffect","current","semanticProps","role","components","root","checkIcon","slot","always","getIntrinsicElementProps","useMergedRefs","elementType","optional","renderByDefault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NC,WAAW;QACf;QACAD,MAAME,oBAAI,CAACC,MAAM,CAACC,IAAAA,wCAAwB,EAAC,OAAO;YAC9C,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5F7C,KAAK8C,IAAAA,6BAAa,EAAC9C,KAAKG;YACxB,iBAAiBF,WAAW,SAASX;YACrCiB;YACA,GAAG+B,aAAa;YAChB,GAAGvC,KAAK;YACR+B;QACJ,IAAI;YACAiB,aAAa;QACjB;QACAL,WAAWC,oBAAI,CAACK,QAAQ,CAACjD,MAAM2C,SAAS,EAAE;YACtCO,iBAAiB;YACjBC,cAAc;gBACV,eAAe;gBACf7D,UAAUqC;YACd;YACAqB,aAAa;QACjB;QACA9C;QACAa;QACAK;QACA,iBAAiB;QACjBgC,cAAc;QACdC,QAAQ;IACZ;AACJ"}
|
|
@@ -86,65 +86,65 @@ const optionClassNames = {
|
|
|
86
86
|
]
|
|
87
87
|
},
|
|
88
88
|
active: {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
],
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
],
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
"
|
|
106
|
-
"
|
|
107
|
-
],
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
"
|
|
111
|
-
"
|
|
112
|
-
],
|
|
113
|
-
|
|
114
|
-
"
|
|
115
|
-
"
|
|
116
|
-
],
|
|
117
|
-
|
|
118
|
-
"
|
|
119
|
-
"
|
|
120
|
-
],
|
|
121
|
-
|
|
122
|
-
"
|
|
123
|
-
"
|
|
124
|
-
],
|
|
125
|
-
|
|
126
|
-
"
|
|
127
|
-
"
|
|
128
|
-
],
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
"
|
|
132
|
-
"
|
|
133
|
-
],
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
"
|
|
137
|
-
"
|
|
138
|
-
],
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
"
|
|
143
|
-
"
|
|
144
|
-
],
|
|
145
|
-
|
|
146
|
-
"
|
|
147
|
-
"
|
|
89
|
+
Bowz1zl: "f11vrvdw",
|
|
90
|
+
oxogb1: "f17hxjb7",
|
|
91
|
+
Ix2sn8: "f1dha69c",
|
|
92
|
+
q7v32p: "f1lm7500",
|
|
93
|
+
Btq9bd3: "fuyp35s",
|
|
94
|
+
Bertapg: [
|
|
95
|
+
"f1a9nstl",
|
|
96
|
+
"fhk0hgg"
|
|
97
|
+
],
|
|
98
|
+
b50fsz: "f1rdp6f1",
|
|
99
|
+
avt0cx: [
|
|
100
|
+
"fhk0hgg",
|
|
101
|
+
"f1a9nstl"
|
|
102
|
+
],
|
|
103
|
+
Bqfxd14: "f1tj24la",
|
|
104
|
+
B53xpsf: [
|
|
105
|
+
"f1td3xda",
|
|
106
|
+
"f73totv"
|
|
107
|
+
],
|
|
108
|
+
B1wzb3v: "f2ge7d1",
|
|
109
|
+
f0sref: [
|
|
110
|
+
"f73totv",
|
|
111
|
+
"f1td3xda"
|
|
112
|
+
],
|
|
113
|
+
Bttcd12: [
|
|
114
|
+
"ftb4b3e",
|
|
115
|
+
"f1scq65d"
|
|
116
|
+
],
|
|
117
|
+
Fffuxt: [
|
|
118
|
+
"f1scq65d",
|
|
119
|
+
"ftb4b3e"
|
|
120
|
+
],
|
|
121
|
+
Bqougee: [
|
|
122
|
+
"f2me9eq",
|
|
123
|
+
"fgk4qqi"
|
|
124
|
+
],
|
|
125
|
+
Beitzug: [
|
|
126
|
+
"fgk4qqi",
|
|
127
|
+
"f2me9eq"
|
|
128
|
+
],
|
|
129
|
+
B39dzdd: "ffd7rjx",
|
|
130
|
+
Be3o27t: [
|
|
131
|
+
"fobu5kn",
|
|
132
|
+
"f1dbet5w"
|
|
133
|
+
],
|
|
134
|
+
Bewtojm: "f1ap9jj5",
|
|
135
|
+
B37u8z8: [
|
|
136
|
+
"f1dbet5w",
|
|
137
|
+
"fobu5kn"
|
|
138
|
+
],
|
|
139
|
+
Bhijsxg: "fwq15dy",
|
|
140
|
+
kktds4: "f1pb3wry",
|
|
141
|
+
Bmau3bo: [
|
|
142
|
+
"ftjv2f4",
|
|
143
|
+
"f1flhb1f"
|
|
144
|
+
],
|
|
145
|
+
npektv: [
|
|
146
|
+
"f1flhb1f",
|
|
147
|
+
"ftjv2f4"
|
|
148
148
|
]
|
|
149
149
|
},
|
|
150
150
|
disabled: {
|
|
@@ -298,30 +298,30 @@ const optionClassNames = {
|
|
|
298
298
|
".f1f5gg8d{padding-left:var(--spacingHorizontalS);}",
|
|
299
299
|
".f1tdddsa{padding-bottom:var(--spacingVerticalSNudge);}",
|
|
300
300
|
".f10pi13n{position:relative;}",
|
|
301
|
-
".
|
|
302
|
-
".
|
|
303
|
-
".
|
|
304
|
-
".
|
|
305
|
-
".
|
|
306
|
-
".
|
|
307
|
-
".
|
|
308
|
-
".
|
|
309
|
-
".
|
|
310
|
-
".
|
|
311
|
-
".
|
|
312
|
-
".
|
|
313
|
-
".
|
|
314
|
-
".
|
|
315
|
-
".
|
|
316
|
-
".
|
|
317
|
-
".
|
|
318
|
-
".
|
|
319
|
-
".
|
|
320
|
-
".
|
|
321
|
-
".
|
|
322
|
-
".
|
|
323
|
-
".
|
|
324
|
-
".
|
|
301
|
+
".f11vrvdw[data-activedescendant-focusvisible]::after{content:\"\";}",
|
|
302
|
+
".f17hxjb7[data-activedescendant-focusvisible]::after{position:absolute;}",
|
|
303
|
+
".f1dha69c[data-activedescendant-focusvisible]::after{pointer-events:none;}",
|
|
304
|
+
".f1lm7500[data-activedescendant-focusvisible]::after{z-index:1;}",
|
|
305
|
+
".fuyp35s[data-activedescendant-focusvisible]::after{border-top-style:solid;}",
|
|
306
|
+
".f1a9nstl[data-activedescendant-focusvisible]::after{border-right-style:solid;}",
|
|
307
|
+
".fhk0hgg[data-activedescendant-focusvisible]::after{border-left-style:solid;}",
|
|
308
|
+
".f1rdp6f1[data-activedescendant-focusvisible]::after{border-bottom-style:solid;}",
|
|
309
|
+
".f1tj24la[data-activedescendant-focusvisible]::after{border-top-width:2px;}",
|
|
310
|
+
".f1td3xda[data-activedescendant-focusvisible]::after{border-right-width:2px;}",
|
|
311
|
+
".f73totv[data-activedescendant-focusvisible]::after{border-left-width:2px;}",
|
|
312
|
+
".f2ge7d1[data-activedescendant-focusvisible]::after{border-bottom-width:2px;}",
|
|
313
|
+
".ftb4b3e[data-activedescendant-focusvisible]::after{border-bottom-right-radius:var(--borderRadiusMedium);}",
|
|
314
|
+
".f1scq65d[data-activedescendant-focusvisible]::after{border-bottom-left-radius:var(--borderRadiusMedium);}",
|
|
315
|
+
".f2me9eq[data-activedescendant-focusvisible]::after{border-top-right-radius:var(--borderRadiusMedium);}",
|
|
316
|
+
".fgk4qqi[data-activedescendant-focusvisible]::after{border-top-left-radius:var(--borderRadiusMedium);}",
|
|
317
|
+
".ffd7rjx[data-activedescendant-focusvisible]::after{border-top-color:var(--colorStrokeFocus2);}",
|
|
318
|
+
".fobu5kn[data-activedescendant-focusvisible]::after{border-right-color:var(--colorStrokeFocus2);}",
|
|
319
|
+
".f1dbet5w[data-activedescendant-focusvisible]::after{border-left-color:var(--colorStrokeFocus2);}",
|
|
320
|
+
".f1ap9jj5[data-activedescendant-focusvisible]::after{border-bottom-color:var(--colorStrokeFocus2);}",
|
|
321
|
+
".fwq15dy[data-activedescendant-focusvisible]::after{top:-2px;}",
|
|
322
|
+
".f1pb3wry[data-activedescendant-focusvisible]::after{bottom:-2px;}",
|
|
323
|
+
".ftjv2f4[data-activedescendant-focusvisible]::after{left:-2px;}",
|
|
324
|
+
".f1flhb1f[data-activedescendant-focusvisible]::after{right:-2px;}",
|
|
325
325
|
".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}",
|
|
326
326
|
".fod5ikn{font-size:var(--fontSizeBase400);}",
|
|
327
327
|
".f18b9hdq{margin-left:calc(var(--spacingHorizontalXXS) * -1);}",
|
|
@@ -402,9 +402,9 @@ const optionClassNames = {
|
|
|
402
402
|
]
|
|
403
403
|
});
|
|
404
404
|
const useOptionStyles_unstable = (state)=>{
|
|
405
|
-
const {
|
|
405
|
+
const { disabled, multiselect, selected } = state;
|
|
406
406
|
const styles = useStyles();
|
|
407
|
-
state.root.className = (0, _react.mergeClasses)(optionClassNames.root, styles.root,
|
|
407
|
+
state.root.className = (0, _react.mergeClasses)(optionClassNames.root, styles.root, styles.active, disabled && styles.disabled, selected && styles.selected, state.root.className);
|
|
408
408
|
if (state.checkIcon) {
|
|
409
409
|
state.checkIcon.className = (0, _react.mergeClasses)(optionClassNames.checkIcon, styles.checkIcon, multiselect && styles.multiselectCheck, selected && styles.selectedCheck, selected && multiselect && styles.selectedMultiselectCheck, disabled && styles.checkDisabled, disabled && multiselect && styles.multiselectCheckDisabled, state.checkIcon.className);
|
|
410
410
|
}
|
|
@@ -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 Bi91k9c: \"feu1g3u\",\n zqbkvg: \"fo79ri9\",\n h82x05: [\"f1osiabc\", \"f1e8le25\"],\n cqj998: \"f1yusjty\",\n j3hlsh: [\"f1e8le25\", \"f1osiabc\"],\n ecr2s2: \"fb40n2d\",\n lj723h: \"f1g4hkjv\",\n Btxx2vb: \"f1lnr2zp\",\n sltcwy: [\"f1ogfk9z\", \"f1g7j8ec\"],\n dnwvvm: \"fiuf46r\",\n Blyvkvs: [\"f1g7j8ec\", \"f1ogfk9z\"]\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 Bi91k9c: \"fvgxktp\",\n zqbkvg: \"f185j3qj\",\n h82x05: [\"f1dligi3\", \"f1vydzie\"],\n cqj998: \"fjw1di3\",\n j3hlsh: [\"f1vydzie\", \"f1dligi3\"],\n ecr2s2: \"fgj9um3\",\n lj723h: \"f19wldhg\",\n Btxx2vb: \"f1ss0kt2\",\n sltcwy: [\"f1t6oli3\", \"fjy9ci8\"],\n dnwvvm: \"fresaxk\",\n Blyvkvs: [\"fjy9ci8\", \"f1t6oli3\"],\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 multiselectCheckDisabled: {\n g2u3we: \"f1r1t4y1\",\n h3c5rm: [\"fmj8ijw\", \"figx54m\"],\n B9xav0g: \"f360ss8\",\n zhjwy3: [\"figx54m\", \"fmj8ijw\"]\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);}\", \".f1r1t4y1{border-top-color:var(--colorNeutralForegroundDisabled);}\", \".fmj8ijw{border-right-color:var(--colorNeutralForegroundDisabled);}\", \".figx54m{border-left-color:var(--colorNeutralForegroundDisabled);}\", \".f360ss8{border-bottom-color:var(--colorNeutralForegroundDisabled);}\"],\n h: [\".f1knas48:hover{background-color:var(--colorNeutralBackground1Hover);}\", \".feu1g3u:hover{color:var(--colorNeutralForeground1Hover);}\", \".fo79ri9:hover .fui-Option__checkIcon{border-top-color:var(--colorNeutralForeground1Hover);}\", \".f1osiabc:hover .fui-Option__checkIcon{border-right-color:var(--colorNeutralForeground1Hover);}\", \".f1e8le25:hover .fui-Option__checkIcon{border-left-color:var(--colorNeutralForeground1Hover);}\", \".f1yusjty:hover .fui-Option__checkIcon{border-bottom-color:var(--colorNeutralForeground1Hover);}\", \".f9ql6rf:hover{background-color:var(--colorTransparentBackground);}\", \".fvgxktp:hover{color:var(--colorNeutralForegroundDisabled);}\", \".f185j3qj:hover .fui-Option__checkIcon{border-top-color:var(--colorNeutralForegroundDisabled);}\", \".f1dligi3:hover .fui-Option__checkIcon{border-right-color:var(--colorNeutralForegroundDisabled);}\", \".f1vydzie:hover .fui-Option__checkIcon{border-left-color:var(--colorNeutralForegroundDisabled);}\", \".fjw1di3:hover .fui-Option__checkIcon{border-bottom-color:var(--colorNeutralForegroundDisabled);}\"],\n a: [\".fb40n2d:active{background-color:var(--colorNeutralBackground1Pressed);}\", \".f1g4hkjv:active{color:var(--colorNeutralForeground1Pressed);}\", \".f1lnr2zp:active .fui-Option__checkIcon{border-top-color:var(--colorNeutralForeground1Hover);}\", \".f1ogfk9z:active .fui-Option__checkIcon{border-right-color:var(--colorNeutralForeground1Hover);}\", \".f1g7j8ec:active .fui-Option__checkIcon{border-left-color:var(--colorNeutralForeground1Hover);}\", \".fiuf46r:active .fui-Option__checkIcon{border-bottom-color:var(--colorNeutralForeground1Hover);}\", \".fgj9um3:active{background-color:var(--colorTransparentBackground);}\", \".f19wldhg:active{color:var(--colorNeutralForegroundDisabled);}\", \".f1ss0kt2:active .fui-Option__checkIcon{border-top-color:var(--colorNeutralForegroundDisabled);}\", \".f1t6oli3:active .fui-Option__checkIcon{border-right-color:var(--colorNeutralForegroundDisabled);}\", \".fjy9ci8:active .fui-Option__checkIcon{border-left-color:var(--colorNeutralForegroundDisabled);}\", \".fresaxk:active .fui-Option__checkIcon{border-bottom-color:var(--colorNeutralForegroundDisabled);}\"],\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, disabled && multiselect && styles.multiselectCheckDisabled, 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","Bi91k9c","zqbkvg","h82x05","cqj998","j3hlsh","ecr2s2","lj723h","Btxx2vb","sltcwy","dnwvvm","Blyvkvs","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","multiselectCheckDisabled","d","h","a","m","state","focusVisible","multiselect","styles","className","mergeClasses"],"mappings":";;;;;;;;;;;IAEaA,gBAAgB;eAAhBA;;IAoJAC,wBAAwB;eAAxBA;;;uBArJsC;AAC5C,MAAMD,mBAAmB;IAC9BE,MAAM;IACNC,WAAW;AACb;AACA;;CAEC,GACD,MAAMC,YAAY,WAAW,GAAEC,IAAAA,eAAQ,EAA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F,IAAI,CAACgG,SAAS;IAC/L,IAAIJ,MAAM3F,SAAS,EAAE;QACnB2F,MAAM3F,SAAS,CAAC+F,SAAS,GAAGC,IAAAA,mBAAY,EAACnG,iBAAiBG,SAAS,EAAE8F,OAAO9F,SAAS,EAAE6F,eAAeC,OAAO7B,gBAAgB,EAAEN,YAAYmC,OAAO9B,aAAa,EAAEL,YAAYkC,eAAeC,OAAOX,wBAAwB,EAAE1B,YAAYqC,OAAOT,aAAa,EAAE5B,YAAYoC,eAAeC,OAAOR,wBAAwB,EAAEK,MAAM3F,SAAS,CAAC+F,SAAS;IACtV;IACA,OAAOJ;AACT,GACA,kDAAkD"}
|
|
1
|
+
{"version":3,"sources":["useOptionStyles.styles.js"],"sourcesContent":["import { tokens } from '@fluentui/react-theme';\nimport { ACTIVEDESCENDANT_FOCUSVISIBLE_ATTRIBUTE } from '@fluentui/react-aria';\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 Bi91k9c: \"feu1g3u\",\n zqbkvg: \"fo79ri9\",\n h82x05: [\"f1osiabc\", \"f1e8le25\"],\n cqj998: \"f1yusjty\",\n j3hlsh: [\"f1e8le25\", \"f1osiabc\"],\n ecr2s2: \"fb40n2d\",\n lj723h: \"f1g4hkjv\",\n Btxx2vb: \"f1lnr2zp\",\n sltcwy: [\"f1ogfk9z\", \"f1g7j8ec\"],\n dnwvvm: \"fiuf46r\",\n Blyvkvs: [\"f1g7j8ec\", \"f1ogfk9z\"]\n },\n active: {\n Bowz1zl: \"f11vrvdw\",\n oxogb1: \"f17hxjb7\",\n Ix2sn8: \"f1dha69c\",\n q7v32p: \"f1lm7500\",\n Btq9bd3: \"fuyp35s\",\n Bertapg: [\"f1a9nstl\", \"fhk0hgg\"],\n b50fsz: \"f1rdp6f1\",\n avt0cx: [\"fhk0hgg\", \"f1a9nstl\"],\n Bqfxd14: \"f1tj24la\",\n B53xpsf: [\"f1td3xda\", \"f73totv\"],\n B1wzb3v: \"f2ge7d1\",\n f0sref: [\"f73totv\", \"f1td3xda\"],\n Bttcd12: [\"ftb4b3e\", \"f1scq65d\"],\n Fffuxt: [\"f1scq65d\", \"ftb4b3e\"],\n Bqougee: [\"f2me9eq\", \"fgk4qqi\"],\n Beitzug: [\"fgk4qqi\", \"f2me9eq\"],\n B39dzdd: \"ffd7rjx\",\n Be3o27t: [\"fobu5kn\", \"f1dbet5w\"],\n Bewtojm: \"f1ap9jj5\",\n B37u8z8: [\"f1dbet5w\", \"fobu5kn\"],\n Bhijsxg: \"fwq15dy\",\n kktds4: \"f1pb3wry\",\n Bmau3bo: [\"ftjv2f4\", \"f1flhb1f\"],\n npektv: [\"f1flhb1f\", \"ftjv2f4\"]\n },\n disabled: {\n sj55zd: \"f1s2aq7o\",\n Jwef8y: \"f9ql6rf\",\n Bi91k9c: \"fvgxktp\",\n zqbkvg: \"f185j3qj\",\n h82x05: [\"f1dligi3\", \"f1vydzie\"],\n cqj998: \"fjw1di3\",\n j3hlsh: [\"f1vydzie\", \"f1dligi3\"],\n ecr2s2: \"fgj9um3\",\n lj723h: \"f19wldhg\",\n Btxx2vb: \"f1ss0kt2\",\n sltcwy: [\"f1t6oli3\", \"fjy9ci8\"],\n dnwvvm: \"fresaxk\",\n Blyvkvs: [\"fjy9ci8\", \"f1t6oli3\"],\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 multiselectCheckDisabled: {\n g2u3we: \"f1r1t4y1\",\n h3c5rm: [\"fmj8ijw\", \"figx54m\"],\n B9xav0g: \"f360ss8\",\n zhjwy3: [\"figx54m\", \"fmj8ijw\"]\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;}\", \".f11vrvdw[data-activedescendant-focusvisible]::after{content:\\\"\\\";}\", \".f17hxjb7[data-activedescendant-focusvisible]::after{position:absolute;}\", \".f1dha69c[data-activedescendant-focusvisible]::after{pointer-events:none;}\", \".f1lm7500[data-activedescendant-focusvisible]::after{z-index:1;}\", \".fuyp35s[data-activedescendant-focusvisible]::after{border-top-style:solid;}\", \".f1a9nstl[data-activedescendant-focusvisible]::after{border-right-style:solid;}\", \".fhk0hgg[data-activedescendant-focusvisible]::after{border-left-style:solid;}\", \".f1rdp6f1[data-activedescendant-focusvisible]::after{border-bottom-style:solid;}\", \".f1tj24la[data-activedescendant-focusvisible]::after{border-top-width:2px;}\", \".f1td3xda[data-activedescendant-focusvisible]::after{border-right-width:2px;}\", \".f73totv[data-activedescendant-focusvisible]::after{border-left-width:2px;}\", \".f2ge7d1[data-activedescendant-focusvisible]::after{border-bottom-width:2px;}\", \".ftb4b3e[data-activedescendant-focusvisible]::after{border-bottom-right-radius:var(--borderRadiusMedium);}\", \".f1scq65d[data-activedescendant-focusvisible]::after{border-bottom-left-radius:var(--borderRadiusMedium);}\", \".f2me9eq[data-activedescendant-focusvisible]::after{border-top-right-radius:var(--borderRadiusMedium);}\", \".fgk4qqi[data-activedescendant-focusvisible]::after{border-top-left-radius:var(--borderRadiusMedium);}\", \".ffd7rjx[data-activedescendant-focusvisible]::after{border-top-color:var(--colorStrokeFocus2);}\", \".fobu5kn[data-activedescendant-focusvisible]::after{border-right-color:var(--colorStrokeFocus2);}\", \".f1dbet5w[data-activedescendant-focusvisible]::after{border-left-color:var(--colorStrokeFocus2);}\", \".f1ap9jj5[data-activedescendant-focusvisible]::after{border-bottom-color:var(--colorStrokeFocus2);}\", \".fwq15dy[data-activedescendant-focusvisible]::after{top:-2px;}\", \".f1pb3wry[data-activedescendant-focusvisible]::after{bottom:-2px;}\", \".ftjv2f4[data-activedescendant-focusvisible]::after{left:-2px;}\", \".f1flhb1f[data-activedescendant-focusvisible]::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);}\", \".f1r1t4y1{border-top-color:var(--colorNeutralForegroundDisabled);}\", \".fmj8ijw{border-right-color:var(--colorNeutralForegroundDisabled);}\", \".figx54m{border-left-color:var(--colorNeutralForegroundDisabled);}\", \".f360ss8{border-bottom-color:var(--colorNeutralForegroundDisabled);}\"],\n h: [\".f1knas48:hover{background-color:var(--colorNeutralBackground1Hover);}\", \".feu1g3u:hover{color:var(--colorNeutralForeground1Hover);}\", \".fo79ri9:hover .fui-Option__checkIcon{border-top-color:var(--colorNeutralForeground1Hover);}\", \".f1osiabc:hover .fui-Option__checkIcon{border-right-color:var(--colorNeutralForeground1Hover);}\", \".f1e8le25:hover .fui-Option__checkIcon{border-left-color:var(--colorNeutralForeground1Hover);}\", \".f1yusjty:hover .fui-Option__checkIcon{border-bottom-color:var(--colorNeutralForeground1Hover);}\", \".f9ql6rf:hover{background-color:var(--colorTransparentBackground);}\", \".fvgxktp:hover{color:var(--colorNeutralForegroundDisabled);}\", \".f185j3qj:hover .fui-Option__checkIcon{border-top-color:var(--colorNeutralForegroundDisabled);}\", \".f1dligi3:hover .fui-Option__checkIcon{border-right-color:var(--colorNeutralForegroundDisabled);}\", \".f1vydzie:hover .fui-Option__checkIcon{border-left-color:var(--colorNeutralForegroundDisabled);}\", \".fjw1di3:hover .fui-Option__checkIcon{border-bottom-color:var(--colorNeutralForegroundDisabled);}\"],\n a: [\".fb40n2d:active{background-color:var(--colorNeutralBackground1Pressed);}\", \".f1g4hkjv:active{color:var(--colorNeutralForeground1Pressed);}\", \".f1lnr2zp:active .fui-Option__checkIcon{border-top-color:var(--colorNeutralForeground1Hover);}\", \".f1ogfk9z:active .fui-Option__checkIcon{border-right-color:var(--colorNeutralForeground1Hover);}\", \".f1g7j8ec:active .fui-Option__checkIcon{border-left-color:var(--colorNeutralForeground1Hover);}\", \".fiuf46r:active .fui-Option__checkIcon{border-bottom-color:var(--colorNeutralForeground1Hover);}\", \".fgj9um3:active{background-color:var(--colorTransparentBackground);}\", \".f19wldhg:active{color:var(--colorNeutralForegroundDisabled);}\", \".f1ss0kt2:active .fui-Option__checkIcon{border-top-color:var(--colorNeutralForegroundDisabled);}\", \".f1t6oli3:active .fui-Option__checkIcon{border-right-color:var(--colorNeutralForegroundDisabled);}\", \".fjy9ci8:active .fui-Option__checkIcon{border-left-color:var(--colorNeutralForegroundDisabled);}\", \".fresaxk:active .fui-Option__checkIcon{border-bottom-color:var(--colorNeutralForegroundDisabled);}\"],\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 disabled,\n multiselect,\n selected\n } = state;\n const styles = useStyles();\n state.root.className = mergeClasses(optionClassNames.root, styles.root, 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, disabled && multiselect && styles.multiselectCheckDisabled, 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","Bi91k9c","zqbkvg","h82x05","cqj998","j3hlsh","ecr2s2","lj723h","Btxx2vb","sltcwy","dnwvvm","Blyvkvs","active","Bowz1zl","oxogb1","Ix2sn8","q7v32p","Btq9bd3","Bertapg","b50fsz","avt0cx","Bqfxd14","B53xpsf","B1wzb3v","f0sref","Bttcd12","Fffuxt","Bqougee","Beitzug","B39dzdd","Be3o27t","Bewtojm","B37u8z8","Bhijsxg","kktds4","Bmau3bo","npektv","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","multiselectCheckDisabled","d","h","a","m","state","multiselect","styles","className","mergeClasses"],"mappings":";;;;;;;;;;;IAGaA,gBAAgB;eAAhBA;;IAoJAC,wBAAwB;eAAxBA;;;uBArJsC;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,SAAS;QACTC,QAAQ;QACRC,QAAQ;YAAC;YAAY;SAAW;QAChCC,QAAQ;QACRC,QAAQ;YAAC;YAAY;SAAW;QAChCC,QAAQ;QACRC,QAAQ;QACRC,SAAS;QACTC,QAAQ;YAAC;YAAY;SAAW;QAChCC,QAAQ;QACRC,SAAS;YAAC;YAAY;SAAW;IACnC;IACAC,QAAQ;QACNC,SAAS;QACTC,QAAQ;QACRC,QAAQ;QACRC,QAAQ;QACRC,SAAS;QACTC,SAAS;YAAC;YAAY;SAAU;QAChCC,QAAQ;QACRC,QAAQ;YAAC;YAAW;SAAW;QAC/BC,SAAS;QACTC,SAAS;YAAC;YAAY;SAAU;QAChCC,SAAS;QACTC,QAAQ;YAAC;YAAW;SAAW;QAC/BC,SAAS;YAAC;YAAW;SAAW;QAChCC,QAAQ;YAAC;YAAY;SAAU;QAC/BC,SAAS;YAAC;YAAW;SAAU;QAC/BC,SAAS;YAAC;YAAW;SAAU;QAC/BC,SAAS;QAC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,MAAME,SAAS5F;IACf0F,MAAM5F,IAAI,CAAC+F,SAAS,GAAGC,IAAAA,mBAAY,EAAClG,iBAAiBE,IAAI,EAAE8F,OAAO9F,IAAI,EAAE8F,OAAO7D,MAAM,EAAEyB,YAAYoC,OAAOpC,QAAQ,EAAEE,YAAYkC,OAAOlC,QAAQ,EAAEgC,MAAM5F,IAAI,CAAC+F,SAAS;IACrK,IAAIH,MAAM3F,SAAS,EAAE;QACnB2F,MAAM3F,SAAS,CAAC8F,SAAS,GAAGC,IAAAA,mBAAY,EAAClG,iBAAiBG,SAAS,EAAE6F,OAAO7F,SAAS,EAAE4F,eAAeC,OAAO5B,gBAAgB,EAAEN,YAAYkC,OAAO7B,aAAa,EAAEL,YAAYiC,eAAeC,OAAOV,wBAAwB,EAAE1B,YAAYoC,OAAOR,aAAa,EAAE5B,YAAYmC,eAAeC,OAAOP,wBAAwB,EAAEK,MAAM3F,SAAS,CAAC8F,SAAS;IACtV;IACA,OAAOH;AACT,GACA,kDAAkD"}
|
|
@@ -8,21 +8,29 @@ Object.defineProperty(exports, "useComboboxContextValues", {
|
|
|
8
8
|
return useComboboxContextValues;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
11
13
|
function useComboboxContextValues(state) {
|
|
12
|
-
const {
|
|
14
|
+
const { appearance, open, registerOption, selectedOptions, selectOption, setOpen, size, activeDescendantController, activeOption: UNSAFE_activeOption, setActiveOption: UNSAFE_setActiveOption } = state;
|
|
13
15
|
const combobox = {
|
|
14
|
-
activeOption,
|
|
16
|
+
activeOption: UNSAFE_activeOption,
|
|
15
17
|
appearance,
|
|
16
|
-
focusVisible,
|
|
18
|
+
focusVisible: false,
|
|
17
19
|
open,
|
|
18
20
|
registerOption,
|
|
19
21
|
selectedOptions,
|
|
20
22
|
selectOption,
|
|
21
|
-
setActiveOption,
|
|
23
|
+
setActiveOption: UNSAFE_setActiveOption,
|
|
22
24
|
setOpen,
|
|
23
25
|
size
|
|
24
26
|
};
|
|
27
|
+
const activeDescendant = _react.useMemo(()=>({
|
|
28
|
+
controller: activeDescendantController
|
|
29
|
+
}), [
|
|
30
|
+
activeDescendantController
|
|
31
|
+
]);
|
|
25
32
|
return {
|
|
26
|
-
combobox
|
|
33
|
+
combobox,
|
|
34
|
+
activeDescendant
|
|
27
35
|
};
|
|
28
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useComboboxContextValues.js"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["useComboboxContextValues.js"],"sourcesContent":["import * as React from 'react';\nexport function useComboboxContextValues(state) {\n const { appearance, open, registerOption, selectedOptions, selectOption, setOpen, size, activeDescendantController, // eslint-disable-next-line @typescript-eslint/naming-convention, deprecation/deprecation\n activeOption: UNSAFE_activeOption, // eslint-disable-next-line @typescript-eslint/naming-convention, deprecation/deprecation\n setActiveOption: UNSAFE_setActiveOption } = state;\n const combobox = {\n activeOption: UNSAFE_activeOption,\n appearance,\n focusVisible: false,\n open,\n registerOption,\n selectedOptions,\n selectOption,\n setActiveOption: UNSAFE_setActiveOption,\n setOpen,\n size\n };\n const activeDescendant = React.useMemo(()=>({\n controller: activeDescendantController\n }), [\n activeDescendantController\n ]);\n return {\n combobox,\n activeDescendant\n };\n}\n"],"names":["useComboboxContextValues","state","appearance","open","registerOption","selectedOptions","selectOption","setOpen","size","activeDescendantController","activeOption","UNSAFE_activeOption","setActiveOption","UNSAFE_setActiveOption","combobox","focusVisible","activeDescendant","React","useMemo","controller"],"mappings":";;;;+BACgBA;;;eAAAA;;;;iEADO;AAChB,SAASA,yBAAyBC,KAAK;IAC1C,MAAM,EAAEC,UAAU,EAAEC,IAAI,EAAEC,cAAc,EAAEC,eAAe,EAAEC,YAAY,EAAEC,OAAO,EAAEC,IAAI,EAAEC,0BAA0B,EAClHC,cAAcC,mBAAmB,EACjCC,iBAAiBC,sBAAsB,EAAE,GAAGZ;IAC5C,MAAMa,WAAW;QACbJ,cAAcC;QACdT;QACAa,cAAc;QACdZ;QACAC;QACAC;QACAC;QACAM,iBAAiBC;QACjBN;QACAC;IACJ;IACA,MAAMQ,mBAAmBC,OAAMC,OAAO,CAAC,IAAK,CAAA;YACpCC,YAAYV;QAChB,CAAA,GAAI;QACJA;KACH;IACD,OAAO;QACHK;QACAE;IACJ;AACJ"}
|
|
@@ -8,24 +8,32 @@ Object.defineProperty(exports, "useListboxContextValues", {
|
|
|
8
8
|
return useListboxContextValues;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
11
13
|
const _reactcontextselector = require("@fluentui/react-context-selector");
|
|
12
14
|
const _ComboboxContext = require("./ComboboxContext");
|
|
13
15
|
function useListboxContextValues(state) {
|
|
14
16
|
const hasComboboxContext = (0, _reactcontextselector.useHasParentContext)(_ComboboxContext.ComboboxContext);
|
|
15
|
-
const {
|
|
17
|
+
const { multiselect, registerOption, selectedOptions, selectOption, activeDescendantController } = state;
|
|
16
18
|
// get register/unregister functions from parent combobox context
|
|
17
19
|
const comboboxRegisterOption = (0, _reactcontextselector.useContextSelector)(_ComboboxContext.ComboboxContext, (ctx)=>ctx.registerOption);
|
|
18
20
|
const registerOptionValue = hasComboboxContext ? comboboxRegisterOption : registerOption;
|
|
19
21
|
const listbox = {
|
|
20
|
-
activeOption,
|
|
21
|
-
focusVisible,
|
|
22
|
+
activeOption: undefined,
|
|
23
|
+
focusVisible: false,
|
|
22
24
|
multiselect,
|
|
23
25
|
registerOption: registerOptionValue,
|
|
24
26
|
selectedOptions,
|
|
25
27
|
selectOption,
|
|
26
|
-
setActiveOption
|
|
28
|
+
setActiveOption: ()=>undefined
|
|
27
29
|
};
|
|
30
|
+
const activeDescendant = _react.useMemo(()=>({
|
|
31
|
+
controller: activeDescendantController
|
|
32
|
+
}), [
|
|
33
|
+
activeDescendantController
|
|
34
|
+
]);
|
|
28
35
|
return {
|
|
29
|
-
listbox
|
|
36
|
+
listbox,
|
|
37
|
+
activeDescendant
|
|
30
38
|
};
|
|
31
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useListboxContextValues.js"],"sourcesContent":["import { useContextSelector, useHasParentContext } from '@fluentui/react-context-selector';\nimport { ComboboxContext } from './ComboboxContext';\nexport function useListboxContextValues(state) {\n const hasComboboxContext = useHasParentContext(ComboboxContext);\n const {
|
|
1
|
+
{"version":3,"sources":["useListboxContextValues.js"],"sourcesContent":["import * as React from 'react';\nimport { useContextSelector, useHasParentContext } from '@fluentui/react-context-selector';\nimport { ComboboxContext } from './ComboboxContext';\nexport function useListboxContextValues(state) {\n const hasComboboxContext = useHasParentContext(ComboboxContext);\n const { multiselect, registerOption, selectedOptions, selectOption, activeDescendantController } = state;\n // get register/unregister functions from parent combobox context\n const comboboxRegisterOption = useContextSelector(ComboboxContext, (ctx)=>ctx.registerOption);\n const registerOptionValue = hasComboboxContext ? comboboxRegisterOption : registerOption;\n const listbox = {\n activeOption: undefined,\n focusVisible: false,\n multiselect,\n registerOption: registerOptionValue,\n selectedOptions,\n selectOption,\n setActiveOption: ()=>undefined\n };\n const activeDescendant = React.useMemo(()=>({\n controller: activeDescendantController\n }), [\n activeDescendantController\n ]);\n return {\n listbox,\n activeDescendant\n };\n}\n"],"names":["useListboxContextValues","state","hasComboboxContext","useHasParentContext","ComboboxContext","multiselect","registerOption","selectedOptions","selectOption","activeDescendantController","comboboxRegisterOption","useContextSelector","ctx","registerOptionValue","listbox","activeOption","undefined","focusVisible","setActiveOption","activeDescendant","React","useMemo","controller"],"mappings":";;;;+BAGgBA;;;eAAAA;;;;iEAHO;sCACiC;iCACxB;AACzB,SAASA,wBAAwBC,KAAK;IACzC,MAAMC,qBAAqBC,IAAAA,yCAAmB,EAACC,gCAAe;IAC9D,MAAM,EAAEC,WAAW,EAAEC,cAAc,EAAEC,eAAe,EAAEC,YAAY,EAAEC,0BAA0B,EAAE,GAAGR;IACnG,iEAAiE;IACjE,MAAMS,yBAAyBC,IAAAA,wCAAkB,EAACP,gCAAe,EAAE,CAACQ,MAAMA,IAAIN,cAAc;IAC5F,MAAMO,sBAAsBX,qBAAqBQ,yBAAyBJ;IAC1E,MAAMQ,UAAU;QACZC,cAAcC;QACdC,cAAc;QACdZ;QACAC,gBAAgBO;QAChBN;QACAC;QACAU,iBAAiB,IAAIF;IACzB;IACA,MAAMG,mBAAmBC,OAAMC,OAAO,CAAC,IAAK,CAAA;YACpCC,YAAYb;QAChB,CAAA,GAAI;QACJA;KACH;IACD,OAAO;QACHK;QACAK;IACJ;AACJ"}
|
|
@@ -2,18 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
get: all[name]
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
_export(exports, {
|
|
12
|
-
getDropdownActionFromKey: function() {
|
|
5
|
+
Object.defineProperty(exports, "getDropdownActionFromKey", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
13
8
|
return getDropdownActionFromKey;
|
|
14
|
-
},
|
|
15
|
-
getIndexFromAction: function() {
|
|
16
|
-
return getIndexFromAction;
|
|
17
9
|
}
|
|
18
10
|
});
|
|
19
11
|
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
@@ -70,22 +62,3 @@ function getDropdownActionFromKey(e, options = {}) {
|
|
|
70
62
|
// if nothing matched, return none
|
|
71
63
|
return 'None';
|
|
72
64
|
}
|
|
73
|
-
function getIndexFromAction(action, currentIndex, maxIndex) {
|
|
74
|
-
switch(action){
|
|
75
|
-
case 'Next':
|
|
76
|
-
return Math.min(maxIndex, currentIndex + 1);
|
|
77
|
-
break;
|
|
78
|
-
case 'Previous':
|
|
79
|
-
return Math.max(0, currentIndex - 1);
|
|
80
|
-
case 'First':
|
|
81
|
-
return 0;
|
|
82
|
-
case 'Last':
|
|
83
|
-
return maxIndex;
|
|
84
|
-
case 'PageDown':
|
|
85
|
-
return Math.min(maxIndex, currentIndex + 10);
|
|
86
|
-
case 'PageUp':
|
|
87
|
-
return Math.max(0, currentIndex - 10);
|
|
88
|
-
default:
|
|
89
|
-
return currentIndex;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["dropdownKeyActions.js"],"sourcesContent":["import * as keys from '@fluentui/keyboard-keys';\nimport * as React from 'react';\n/**\n * Converts a keyboard interaction into a defined action\n */ export function getDropdownActionFromKey(e, options = {}) {\n const { open = true, multiselect = false } = options;\n const code = e.key;\n const { altKey, ctrlKey, key, metaKey } = e;\n // typing action occurs whether open or closed\n if (key.length === 1 && code !== keys.Space && !altKey && !ctrlKey && !metaKey) {\n return 'Type';\n }\n // handle opening the dropdown if closed\n if (!open) {\n if (code === keys.ArrowDown || code === keys.ArrowUp || code === keys.Enter || code === keys.Space) {\n return 'Open';\n }\n // if the dropdown is closed and an action did not match the above, do nothing\n return 'None';\n }\n // select or close actions\n if (code === keys.ArrowUp && altKey || code === keys.Enter || !multiselect && code === keys.Space) {\n return 'CloseSelect';\n }\n if (multiselect && code === keys.Space) {\n return 'Select';\n }\n if (code === keys.Escape) {\n return 'Close';\n }\n // navigation interactions\n if (code === keys.ArrowDown) {\n return 'Next';\n }\n if (code === keys.ArrowUp) {\n return 'Previous';\n }\n if (code === keys.Home) {\n return 'First';\n }\n if (code === keys.End) {\n return 'Last';\n }\n if (code === keys.PageUp) {\n return 'PageUp';\n }\n if (code === keys.PageDown) {\n return 'PageDown';\n }\n if (code === keys.Tab) {\n return 'Tab';\n }\n // if nothing matched, return none\n return 'None';\n}\n
|
|
1
|
+
{"version":3,"sources":["dropdownKeyActions.js"],"sourcesContent":["import * as keys from '@fluentui/keyboard-keys';\nimport * as React from 'react';\n/**\n * Converts a keyboard interaction into a defined action\n */ export function getDropdownActionFromKey(e, options = {}) {\n const { open = true, multiselect = false } = options;\n const code = e.key;\n const { altKey, ctrlKey, key, metaKey } = e;\n // typing action occurs whether open or closed\n if (key.length === 1 && code !== keys.Space && !altKey && !ctrlKey && !metaKey) {\n return 'Type';\n }\n // handle opening the dropdown if closed\n if (!open) {\n if (code === keys.ArrowDown || code === keys.ArrowUp || code === keys.Enter || code === keys.Space) {\n return 'Open';\n }\n // if the dropdown is closed and an action did not match the above, do nothing\n return 'None';\n }\n // select or close actions\n if (code === keys.ArrowUp && altKey || code === keys.Enter || !multiselect && code === keys.Space) {\n return 'CloseSelect';\n }\n if (multiselect && code === keys.Space) {\n return 'Select';\n }\n if (code === keys.Escape) {\n return 'Close';\n }\n // navigation interactions\n if (code === keys.ArrowDown) {\n return 'Next';\n }\n if (code === keys.ArrowUp) {\n return 'Previous';\n }\n if (code === keys.Home) {\n return 'First';\n }\n if (code === keys.End) {\n return 'Last';\n }\n if (code === keys.PageUp) {\n return 'PageUp';\n }\n if (code === keys.PageDown) {\n return 'PageDown';\n }\n if (code === keys.Tab) {\n return 'Tab';\n }\n // if nothing matched, return none\n return 'None';\n}\n"],"names":["getDropdownActionFromKey","e","options","open","multiselect","code","key","altKey","ctrlKey","metaKey","length","keys","Space","ArrowDown","ArrowUp","Enter","Escape","Home","End","PageUp","PageDown","Tab"],"mappings":";;;;+BAIoBA;;;eAAAA;;;;wEAJE;iEACC;AAGZ,SAASA,yBAAyBC,CAAC,EAAEC,UAAU,CAAC,CAAC;IACxD,MAAM,EAAEC,OAAO,IAAI,EAAEC,cAAc,KAAK,EAAE,GAAGF;IAC7C,MAAMG,OAAOJ,EAAEK,GAAG;IAClB,MAAM,EAAEC,MAAM,EAAEC,OAAO,EAAEF,GAAG,EAAEG,OAAO,EAAE,GAAGR;IAC1C,8CAA8C;IAC9C,IAAIK,IAAII,MA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