@fluentui/react-combobox 9.13.12 → 9.13.14
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 +32 -2
- package/lib/Combobox.js +1 -1
- package/lib/Combobox.js.map +1 -1
- package/lib/Dropdown.js +1 -1
- package/lib/Dropdown.js.map +1 -1
- package/lib/Listbox.js +1 -1
- package/lib/Listbox.js.map +1 -1
- package/lib/Option.js +1 -1
- package/lib/Option.js.map +1 -1
- package/lib/OptionGroup.js +1 -1
- package/lib/OptionGroup.js.map +1 -1
- package/lib/Selection.js +1 -1
- package/lib/Selection.js.map +1 -1
- package/lib/components/Combobox/index.js +4 -5
- package/lib/components/Combobox/index.js.map +1 -1
- package/lib/components/Dropdown/index.js +4 -5
- package/lib/components/Dropdown/index.js.map +1 -1
- package/lib/components/Listbox/index.js +4 -5
- package/lib/components/Listbox/index.js.map +1 -1
- package/lib/components/Option/index.js +4 -5
- package/lib/components/Option/index.js.map +1 -1
- package/lib/components/OptionGroup/index.js +4 -5
- package/lib/components/OptionGroup/index.js.map +1 -1
- package/lib/utils/useSelection.js +2 -2
- package/lib/utils/useSelection.js.map +1 -1
- package/lib-commonjs/Combobox.js +24 -2
- package/lib-commonjs/Combobox.js.map +1 -1
- package/lib-commonjs/Dropdown.js +24 -2
- package/lib-commonjs/Dropdown.js.map +1 -1
- package/lib-commonjs/Listbox.js +24 -2
- package/lib-commonjs/Listbox.js.map +1 -1
- package/lib-commonjs/Option.js +24 -2
- package/lib-commonjs/Option.js.map +1 -1
- package/lib-commonjs/OptionGroup.js +24 -2
- package/lib-commonjs/OptionGroup.js.map +1 -1
- package/lib-commonjs/Selection.js +0 -2
- package/lib-commonjs/Selection.js.map +1 -1
- package/lib-commonjs/components/Combobox/index.js +27 -6
- package/lib-commonjs/components/Combobox/index.js.map +1 -1
- package/lib-commonjs/components/Dropdown/index.js +27 -6
- package/lib-commonjs/components/Dropdown/index.js.map +1 -1
- package/lib-commonjs/components/Listbox/index.js +27 -6
- package/lib-commonjs/components/Listbox/index.js.map +1 -1
- package/lib-commonjs/components/Option/index.js +27 -6
- package/lib-commonjs/components/Option/index.js.map +1 -1
- package/lib-commonjs/components/OptionGroup/index.js +27 -6
- package/lib-commonjs/components/OptionGroup/index.js.map +1 -1
- package/lib-commonjs/utils/useSelection.js +3 -2
- package/lib-commonjs/utils/useSelection.js.map +1 -1
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,42 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-combobox
|
|
2
2
|
|
|
3
|
-
This log was last generated on Mon,
|
|
3
|
+
This log was last generated on Mon, 09 Dec 2024 17:34:04 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.13.14](https://github.com/microsoft/fluentui/tree/@fluentui/react-combobox_v9.13.14)
|
|
8
|
+
|
|
9
|
+
Mon, 09 Dec 2024 17:34:04 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-combobox_v9.13.13..@fluentui/react-combobox_v9.13.14)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- chore: remove usage of "export *" ([PR #33384](https://github.com/microsoft/fluentui/pull/33384) by olfedias@microsoft.com)
|
|
15
|
+
- Bump @fluentui/react-aria to v9.13.11 ([PR #33431](https://github.com/microsoft/fluentui/pull/33431) by beachball)
|
|
16
|
+
- Bump @fluentui/react-field to v9.1.82 ([PR #33431](https://github.com/microsoft/fluentui/pull/33431) by beachball)
|
|
17
|
+
- Bump @fluentui/react-positioning to v9.15.14 ([PR #33431](https://github.com/microsoft/fluentui/pull/33431) by beachball)
|
|
18
|
+
|
|
19
|
+
## [9.13.13](https://github.com/microsoft/fluentui/tree/@fluentui/react-combobox_v9.13.13)
|
|
20
|
+
|
|
21
|
+
Fri, 06 Dec 2024 12:53:46 GMT
|
|
22
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-combobox_v9.13.12..@fluentui/react-combobox_v9.13.13)
|
|
23
|
+
|
|
24
|
+
### Patches
|
|
25
|
+
|
|
26
|
+
- Bump @fluentui/react-aria to v9.13.10 ([PR #33372](https://github.com/microsoft/fluentui/pull/33372) by beachball)
|
|
27
|
+
- Bump @fluentui/react-context-selector to v9.1.70 ([PR #33372](https://github.com/microsoft/fluentui/pull/33372) by beachball)
|
|
28
|
+
- Bump @fluentui/react-field to v9.1.81 ([PR #33372](https://github.com/microsoft/fluentui/pull/33372) by beachball)
|
|
29
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.47 ([PR #33372](https://github.com/microsoft/fluentui/pull/33372) by beachball)
|
|
30
|
+
- Bump @fluentui/react-portal to v9.4.39 ([PR #33372](https://github.com/microsoft/fluentui/pull/33372) by beachball)
|
|
31
|
+
- Bump @fluentui/react-positioning to v9.15.13 ([PR #33372](https://github.com/microsoft/fluentui/pull/33372) by beachball)
|
|
32
|
+
- Bump @fluentui/react-shared-contexts to v9.21.1 ([PR #33372](https://github.com/microsoft/fluentui/pull/33372) by beachball)
|
|
33
|
+
- Bump @fluentui/react-tabster to v9.23.1 ([PR #33372](https://github.com/microsoft/fluentui/pull/33372) by beachball)
|
|
34
|
+
- Bump @fluentui/react-theme to v9.1.23 ([PR #33372](https://github.com/microsoft/fluentui/pull/33372) by beachball)
|
|
35
|
+
- Bump @fluentui/react-utilities to v9.18.18 ([PR #33372](https://github.com/microsoft/fluentui/pull/33372) by beachball)
|
|
36
|
+
|
|
7
37
|
## [9.13.12](https://github.com/microsoft/fluentui/tree/@fluentui/react-combobox_v9.13.12)
|
|
8
38
|
|
|
9
|
-
Mon, 18 Nov 2024 09:
|
|
39
|
+
Mon, 18 Nov 2024 09:44:38 GMT
|
|
10
40
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-combobox_v9.13.11..@fluentui/react-combobox_v9.13.12)
|
|
11
41
|
|
|
12
42
|
### Patches
|
package/lib/Combobox.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { Combobox, comboboxClassNames, renderCombobox_unstable, useComboboxStyles_unstable, useCombobox_unstable } from './components/Combobox/index';
|
package/lib/Combobox.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Combobox.ts"],"sourcesContent":["export
|
|
1
|
+
{"version":3,"sources":["../src/Combobox.ts"],"sourcesContent":["export type {\n ActiveOptionChangeData,\n ComboboxContextValues,\n ComboboxOpenChangeData,\n ComboboxOpenEvents,\n ComboboxProps,\n ComboboxSlots,\n ComboboxState,\n} from './components/Combobox/index';\nexport {\n Combobox,\n comboboxClassNames,\n renderCombobox_unstable,\n useComboboxStyles_unstable,\n useCombobox_unstable,\n} from './components/Combobox/index';\n"],"names":["Combobox","comboboxClassNames","renderCombobox_unstable","useComboboxStyles_unstable","useCombobox_unstable"],"rangeMappings":"","mappings":"AASA,SACEA,QAAQ,EACRC,kBAAkB,EAClBC,uBAAuB,EACvBC,0BAA0B,EAC1BC,oBAAoB,QACf,8BAA8B"}
|
package/lib/Dropdown.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { Dropdown, dropdownClassNames, renderDropdown_unstable, useDropdownStyles_unstable, useDropdown_unstable } from './components/Dropdown/index';
|
package/lib/Dropdown.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Dropdown.ts"],"sourcesContent":["export
|
|
1
|
+
{"version":3,"sources":["../src/Dropdown.ts"],"sourcesContent":["export type {\n ActiveOptionChangeData,\n DropdownContextValues,\n DropdownOpenChangeData,\n DropdownOpenEvents,\n DropdownProps,\n DropdownSlots,\n DropdownState,\n} from './components/Dropdown/index';\nexport {\n Dropdown,\n dropdownClassNames,\n renderDropdown_unstable,\n useDropdownStyles_unstable,\n useDropdown_unstable,\n} from './components/Dropdown/index';\n"],"names":["Dropdown","dropdownClassNames","renderDropdown_unstable","useDropdownStyles_unstable","useDropdown_unstable"],"rangeMappings":"","mappings":"AASA,SACEA,QAAQ,EACRC,kBAAkB,EAClBC,uBAAuB,EACvBC,0BAA0B,EAC1BC,oBAAoB,QACf,8BAA8B"}
|
package/lib/Listbox.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { Listbox, listboxClassNames, renderListbox_unstable, useListboxStyles_unstable, useListbox_unstable } from './components/Listbox/index';
|
package/lib/Listbox.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Listbox.ts"],"sourcesContent":["export
|
|
1
|
+
{"version":3,"sources":["../src/Listbox.ts"],"sourcesContent":["export type { ListboxContextValues, ListboxProps, ListboxSlots, ListboxState } from './components/Listbox/index';\nexport {\n Listbox,\n listboxClassNames,\n renderListbox_unstable,\n useListboxStyles_unstable,\n useListbox_unstable,\n} from './components/Listbox/index';\n"],"names":["Listbox","listboxClassNames","renderListbox_unstable","useListboxStyles_unstable","useListbox_unstable"],"rangeMappings":"","mappings":"AACA,SACEA,OAAO,EACPC,iBAAiB,EACjBC,sBAAsB,EACtBC,yBAAyB,EACzBC,mBAAmB,QACd,6BAA6B"}
|
package/lib/Option.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { Option, optionClassNames, renderOption_unstable, useOptionStyles_unstable, useOption_unstable } from './components/Option/index';
|
package/lib/Option.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Option.ts"],"sourcesContent":["export
|
|
1
|
+
{"version":3,"sources":["../src/Option.ts"],"sourcesContent":["export type { OptionProps, OptionSlots, OptionState } from './components/Option/index';\nexport {\n Option,\n optionClassNames,\n renderOption_unstable,\n useOptionStyles_unstable,\n useOption_unstable,\n} from './components/Option/index';\n"],"names":["Option","optionClassNames","renderOption_unstable","useOptionStyles_unstable","useOption_unstable"],"rangeMappings":"","mappings":"AACA,SACEA,MAAM,EACNC,gBAAgB,EAChBC,qBAAqB,EACrBC,wBAAwB,EACxBC,kBAAkB,QACb,4BAA4B"}
|
package/lib/OptionGroup.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { OptionGroup, optionGroupClassNames, renderOptionGroup_unstable, useOptionGroupStyles_unstable, useOptionGroup_unstable } from './components/OptionGroup/index';
|
package/lib/OptionGroup.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/OptionGroup.ts"],"sourcesContent":["export
|
|
1
|
+
{"version":3,"sources":["../src/OptionGroup.ts"],"sourcesContent":["export type { OptionGroupProps, OptionGroupSlots, OptionGroupState } from './components/OptionGroup/index';\nexport {\n OptionGroup,\n optionGroupClassNames,\n renderOptionGroup_unstable,\n useOptionGroupStyles_unstable,\n useOptionGroup_unstable,\n} from './components/OptionGroup/index';\n"],"names":["OptionGroup","optionGroupClassNames","renderOptionGroup_unstable","useOptionGroupStyles_unstable","useOptionGroup_unstable"],"rangeMappings":"","mappings":"AACA,SACEA,WAAW,EACXC,qBAAqB,EACrBC,0BAA0B,EAC1BC,6BAA6B,EAC7BC,uBAAuB,QAClB,iCAAiC"}
|
package/lib/Selection.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { };
|
package/lib/Selection.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Selection.ts"],"sourcesContent":["export
|
|
1
|
+
{"version":3,"sources":["../src/Selection.ts"],"sourcesContent":["export type { OptionOnSelectData, SelectionEvents, SelectionProps, SelectionState } from './utils/Selection.types';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,WAAmH"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export * from './useComboboxStyles.styles';
|
|
1
|
+
export { Combobox } from './Combobox';
|
|
2
|
+
export { renderCombobox_unstable } from './renderCombobox';
|
|
3
|
+
export { useCombobox_unstable } from './useCombobox';
|
|
4
|
+
export { comboboxClassNames, useComboboxStyles_unstable } from './useComboboxStyles.styles';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Combobox/index.ts"],"sourcesContent":["export
|
|
1
|
+
{"version":3,"sources":["../src/components/Combobox/index.ts"],"sourcesContent":["export { Combobox } from './Combobox';\nexport type {\n ActiveOptionChangeData,\n ComboboxContextValues,\n ComboboxOpenChangeData,\n ComboboxOpenEvents,\n ComboboxProps,\n ComboboxSlots,\n ComboboxState,\n} from './Combobox.types';\nexport { renderCombobox_unstable } from './renderCombobox';\nexport { useCombobox_unstable } from './useCombobox';\nexport { comboboxClassNames, useComboboxStyles_unstable } from './useComboboxStyles.styles';\n"],"names":["Combobox","renderCombobox_unstable","useCombobox_unstable","comboboxClassNames","useComboboxStyles_unstable"],"rangeMappings":";;;","mappings":"AAAA,SAASA,QAAQ,QAAQ,aAAa;AAUtC,SAASC,uBAAuB,QAAQ,mBAAmB;AAC3D,SAASC,oBAAoB,QAAQ,gBAAgB;AACrD,SAASC,kBAAkB,EAAEC,0BAA0B,QAAQ,6BAA6B"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export * from './useDropdownStyles.styles';
|
|
1
|
+
export { Dropdown } from './Dropdown';
|
|
2
|
+
export { renderDropdown_unstable } from './renderDropdown';
|
|
3
|
+
export { useDropdown_unstable } from './useDropdown';
|
|
4
|
+
export { dropdownClassNames, useDropdownStyles_unstable } from './useDropdownStyles.styles';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Dropdown/index.ts"],"sourcesContent":["export
|
|
1
|
+
{"version":3,"sources":["../src/components/Dropdown/index.ts"],"sourcesContent":["export { Dropdown } from './Dropdown';\nexport type {\n ActiveOptionChangeData,\n DropdownContextValues,\n DropdownOpenChangeData,\n DropdownOpenEvents,\n DropdownProps,\n DropdownSlots,\n DropdownState,\n} from './Dropdown.types';\nexport { renderDropdown_unstable } from './renderDropdown';\nexport { useDropdown_unstable } from './useDropdown';\nexport { dropdownClassNames, useDropdownStyles_unstable } from './useDropdownStyles.styles';\n"],"names":["Dropdown","renderDropdown_unstable","useDropdown_unstable","dropdownClassNames","useDropdownStyles_unstable"],"rangeMappings":";;;","mappings":"AAAA,SAASA,QAAQ,QAAQ,aAAa;AAUtC,SAASC,uBAAuB,QAAQ,mBAAmB;AAC3D,SAASC,oBAAoB,QAAQ,gBAAgB;AACrD,SAASC,kBAAkB,EAAEC,0BAA0B,QAAQ,6BAA6B"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export * from './useListboxStyles.styles';
|
|
1
|
+
export { Listbox } from './Listbox';
|
|
2
|
+
export { renderListbox_unstable } from './renderListbox';
|
|
3
|
+
export { useListbox_unstable } from './useListbox';
|
|
4
|
+
export { listboxClassNames, useListboxStyles_unstable } from './useListboxStyles.styles';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Listbox/index.ts"],"sourcesContent":["export
|
|
1
|
+
{"version":3,"sources":["../src/components/Listbox/index.ts"],"sourcesContent":["export { Listbox } from './Listbox';\nexport type { ListboxContextValues, ListboxProps, ListboxSlots, ListboxState } from './Listbox.types';\nexport { renderListbox_unstable } from './renderListbox';\nexport { useListbox_unstable } from './useListbox';\nexport { listboxClassNames, useListboxStyles_unstable } from './useListboxStyles.styles';\n"],"names":["Listbox","renderListbox_unstable","useListbox_unstable","listboxClassNames","useListboxStyles_unstable"],"rangeMappings":";;;","mappings":"AAAA,SAASA,OAAO,QAAQ,YAAY;AAEpC,SAASC,sBAAsB,QAAQ,kBAAkB;AACzD,SAASC,mBAAmB,QAAQ,eAAe;AACnD,SAASC,iBAAiB,EAAEC,yBAAyB,QAAQ,4BAA4B"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export * from './useOptionStyles.styles';
|
|
1
|
+
export { Option } from './Option';
|
|
2
|
+
export { renderOption_unstable } from './renderOption';
|
|
3
|
+
export { useOption_unstable } from './useOption';
|
|
4
|
+
export { optionClassNames, useOptionStyles_unstable } from './useOptionStyles.styles';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Option/index.ts"],"sourcesContent":["export
|
|
1
|
+
{"version":3,"sources":["../src/components/Option/index.ts"],"sourcesContent":["export { Option } from './Option';\nexport type { OptionProps, OptionSlots, OptionState } from './Option.types';\nexport { renderOption_unstable } from './renderOption';\nexport { useOption_unstable } from './useOption';\nexport { optionClassNames, useOptionStyles_unstable } from './useOptionStyles.styles';\n"],"names":["Option","renderOption_unstable","useOption_unstable","optionClassNames","useOptionStyles_unstable"],"rangeMappings":";;;","mappings":"AAAA,SAASA,MAAM,QAAQ,WAAW;AAElC,SAASC,qBAAqB,QAAQ,iBAAiB;AACvD,SAASC,kBAAkB,QAAQ,cAAc;AACjD,SAASC,gBAAgB,EAAEC,wBAAwB,QAAQ,2BAA2B"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export * from './useOptionGroupStyles.styles';
|
|
1
|
+
export { OptionGroup } from './OptionGroup';
|
|
2
|
+
export { renderOptionGroup_unstable } from './renderOptionGroup';
|
|
3
|
+
export { useOptionGroup_unstable } from './useOptionGroup';
|
|
4
|
+
export { optionGroupClassNames, useOptionGroupStyles_unstable } from './useOptionGroupStyles.styles';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/OptionGroup/index.ts"],"sourcesContent":["export
|
|
1
|
+
{"version":3,"sources":["../src/components/OptionGroup/index.ts"],"sourcesContent":["export { OptionGroup } from './OptionGroup';\nexport type { OptionGroupProps, OptionGroupSlots, OptionGroupState } from './OptionGroup.types';\nexport { renderOptionGroup_unstable } from './renderOptionGroup';\nexport { useOptionGroup_unstable } from './useOptionGroup';\nexport { optionGroupClassNames, useOptionGroupStyles_unstable } from './useOptionGroupStyles.styles';\n"],"names":["OptionGroup","renderOptionGroup_unstable","useOptionGroup_unstable","optionGroupClassNames","useOptionGroupStyles_unstable"],"rangeMappings":";;;","mappings":"AAAA,SAASA,WAAW,QAAQ,gBAAgB;AAE5C,SAASC,0BAA0B,QAAQ,sBAAsB;AACjE,SAASC,uBAAuB,QAAQ,mBAAmB;AAC3D,SAASC,qBAAqB,EAAEC,6BAA6B,QAAQ,gCAAgC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { useControllableState } from '@fluentui/react-utilities';
|
|
3
3
|
export const useSelection = (props)=>{
|
|
4
4
|
const { defaultSelectedOptions, multiselect, onOptionSelect } = props;
|
|
@@ -7,7 +7,7 @@ export const useSelection = (props)=>{
|
|
|
7
7
|
defaultState: defaultSelectedOptions,
|
|
8
8
|
initialState: []
|
|
9
9
|
});
|
|
10
|
-
const selectOption = useCallback((event, option)=>{
|
|
10
|
+
const selectOption = React.useCallback((event, option)=>{
|
|
11
11
|
// if the option is disabled, do nothing
|
|
12
12
|
if (option.disabled) {
|
|
13
13
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/utils/useSelection.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"sources":["../src/utils/useSelection.ts"],"sourcesContent":["import * as React from 'react';\nimport { useControllableState } from '@fluentui/react-utilities';\nimport { OptionValue } from './OptionCollection.types';\nimport { SelectionEvents, SelectionProps, SelectionState } from './Selection.types';\n\nexport const useSelection = (props: SelectionProps): SelectionState => {\n const { defaultSelectedOptions, multiselect, onOptionSelect } = props;\n\n const [selectedOptions, setSelectedOptions] = useControllableState({\n state: props.selectedOptions,\n defaultState: defaultSelectedOptions,\n initialState: [],\n });\n\n const selectOption = React.useCallback(\n (event: SelectionEvents, option: OptionValue) => {\n // if the option is disabled, do nothing\n if (option.disabled) {\n return;\n }\n\n // for single-select, always return the selected option\n let newSelection = [option.value];\n\n // toggle selected state of the option for multiselect\n if (multiselect) {\n const selectedIndex = selectedOptions.findIndex(o => o === option.value);\n if (selectedIndex > -1) {\n // deselect option\n newSelection = [...selectedOptions.slice(0, selectedIndex), ...selectedOptions.slice(selectedIndex + 1)];\n } else {\n // select option\n newSelection = [...selectedOptions, option.value];\n }\n }\n\n setSelectedOptions(newSelection);\n onOptionSelect?.(event, { optionValue: option.value, optionText: option.text, selectedOptions: newSelection });\n },\n [onOptionSelect, multiselect, selectedOptions, setSelectedOptions],\n );\n\n const clearSelection = (event: SelectionEvents) => {\n setSelectedOptions([]);\n onOptionSelect?.(event, { optionValue: undefined, optionText: undefined, selectedOptions: [] });\n };\n\n return { clearSelection, selectOption, selectedOptions };\n};\n"],"names":["React","useControllableState","useSelection","props","defaultSelectedOptions","multiselect","onOptionSelect","selectedOptions","setSelectedOptions","state","defaultState","initialState","selectOption","useCallback","event","option","disabled","newSelection","value","selectedIndex","findIndex","o","slice","optionValue","optionText","text","clearSelection","undefined"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,oBAAoB,QAAQ,4BAA4B;AAIjE,OAAO,MAAMC,eAAe,CAACC;IAC3B,MAAM,EAAEC,sBAAsB,EAAEC,WAAW,EAAEC,cAAc,EAAE,GAAGH;IAEhE,MAAM,CAACI,iBAAiBC,mBAAmB,GAAGP,qBAAqB;QACjEQ,OAAON,MAAMI,eAAe;QAC5BG,cAAcN;QACdO,cAAc,EAAE;IAClB;IAEA,MAAMC,eAAeZ,MAAMa,WAAW,CACpC,CAACC,OAAwBC;QACvB,wCAAwC;QACxC,IAAIA,OAAOC,QAAQ,EAAE;YACnB;QACF;QAEA,uDAAuD;QACvD,IAAIC,eAAe;YAACF,OAAOG,KAAK;SAAC;QAEjC,sDAAsD;QACtD,IAAIb,aAAa;YACf,MAAMc,gBAAgBZ,gBAAgBa,SAAS,CAACC,CAAAA,IAAKA,MAAMN,OAAOG,KAAK;YACvE,IAAIC,gBAAgB,CAAC,GAAG;gBACtB,kBAAkB;gBAClBF,eAAe;uBAAIV,gBAAgBe,KAAK,CAAC,GAAGH;uBAAmBZ,gBAAgBe,KAAK,CAACH,gBAAgB;iBAAG;YAC1G,OAAO;gBACL,gBAAgB;gBAChBF,eAAe;uBAAIV;oBAAiBQ,OAAOG,KAAK;iBAAC;YACnD;QACF;QAEAV,mBAAmBS;QACnBX,2BAAAA,qCAAAA,eAAiBQ,OAAO;YAAES,aAAaR,OAAOG,KAAK;YAAEM,YAAYT,OAAOU,IAAI;YAAElB,iBAAiBU;QAAa;IAC9G,GACA;QAACX;QAAgBD;QAAaE;QAAiBC;KAAmB;IAGpE,MAAMkB,iBAAiB,CAACZ;QACtBN,mBAAmB,EAAE;QACrBF,2BAAAA,qCAAAA,eAAiBQ,OAAO;YAAES,aAAaI;YAAWH,YAAYG;YAAWpB,iBAAiB,EAAE;QAAC;IAC/F;IAEA,OAAO;QAAEmB;QAAgBd;QAAcL;IAAgB;AACzD,EAAE"}
|
package/lib-commonjs/Combobox.js
CHANGED
|
@@ -2,5 +2,27 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
Combobox: function() {
|
|
13
|
+
return _index.Combobox;
|
|
14
|
+
},
|
|
15
|
+
comboboxClassNames: function() {
|
|
16
|
+
return _index.comboboxClassNames;
|
|
17
|
+
},
|
|
18
|
+
renderCombobox_unstable: function() {
|
|
19
|
+
return _index.renderCombobox_unstable;
|
|
20
|
+
},
|
|
21
|
+
useComboboxStyles_unstable: function() {
|
|
22
|
+
return _index.useComboboxStyles_unstable;
|
|
23
|
+
},
|
|
24
|
+
useCombobox_unstable: function() {
|
|
25
|
+
return _index.useCombobox_unstable;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
const _index = require("./components/Combobox/index");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Combobox.ts"],"sourcesContent":["export
|
|
1
|
+
{"version":3,"sources":["../src/Combobox.ts"],"sourcesContent":["export type {\n ActiveOptionChangeData,\n ComboboxContextValues,\n ComboboxOpenChangeData,\n ComboboxOpenEvents,\n ComboboxProps,\n ComboboxSlots,\n ComboboxState,\n} from './components/Combobox/index';\nexport {\n Combobox,\n comboboxClassNames,\n renderCombobox_unstable,\n useComboboxStyles_unstable,\n useCombobox_unstable,\n} from './components/Combobox/index';\n"],"names":["Combobox","comboboxClassNames","renderCombobox_unstable","useComboboxStyles_unstable","useCombobox_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAUEA,QAAQ;eAARA,eAAQ;;IACRC,kBAAkB;eAAlBA,yBAAkB;;IAClBC,uBAAuB;eAAvBA,8BAAuB;;IACvBC,0BAA0B;eAA1BA,iCAA0B;;IAC1BC,oBAAoB;eAApBA,2BAAoB;;;uBACf"}
|
package/lib-commonjs/Dropdown.js
CHANGED
|
@@ -2,5 +2,27 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
Dropdown: function() {
|
|
13
|
+
return _index.Dropdown;
|
|
14
|
+
},
|
|
15
|
+
dropdownClassNames: function() {
|
|
16
|
+
return _index.dropdownClassNames;
|
|
17
|
+
},
|
|
18
|
+
renderDropdown_unstable: function() {
|
|
19
|
+
return _index.renderDropdown_unstable;
|
|
20
|
+
},
|
|
21
|
+
useDropdownStyles_unstable: function() {
|
|
22
|
+
return _index.useDropdownStyles_unstable;
|
|
23
|
+
},
|
|
24
|
+
useDropdown_unstable: function() {
|
|
25
|
+
return _index.useDropdown_unstable;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
const _index = require("./components/Dropdown/index");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Dropdown.ts"],"sourcesContent":["export
|
|
1
|
+
{"version":3,"sources":["../src/Dropdown.ts"],"sourcesContent":["export type {\n ActiveOptionChangeData,\n DropdownContextValues,\n DropdownOpenChangeData,\n DropdownOpenEvents,\n DropdownProps,\n DropdownSlots,\n DropdownState,\n} from './components/Dropdown/index';\nexport {\n Dropdown,\n dropdownClassNames,\n renderDropdown_unstable,\n useDropdownStyles_unstable,\n useDropdown_unstable,\n} from './components/Dropdown/index';\n"],"names":["Dropdown","dropdownClassNames","renderDropdown_unstable","useDropdownStyles_unstable","useDropdown_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAUEA,QAAQ;eAARA,eAAQ;;IACRC,kBAAkB;eAAlBA,yBAAkB;;IAClBC,uBAAuB;eAAvBA,8BAAuB;;IACvBC,0BAA0B;eAA1BA,iCAA0B;;IAC1BC,oBAAoB;eAApBA,2BAAoB;;;uBACf"}
|
package/lib-commonjs/Listbox.js
CHANGED
|
@@ -2,5 +2,27 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
Listbox: function() {
|
|
13
|
+
return _index.Listbox;
|
|
14
|
+
},
|
|
15
|
+
listboxClassNames: function() {
|
|
16
|
+
return _index.listboxClassNames;
|
|
17
|
+
},
|
|
18
|
+
renderListbox_unstable: function() {
|
|
19
|
+
return _index.renderListbox_unstable;
|
|
20
|
+
},
|
|
21
|
+
useListboxStyles_unstable: function() {
|
|
22
|
+
return _index.useListboxStyles_unstable;
|
|
23
|
+
},
|
|
24
|
+
useListbox_unstable: function() {
|
|
25
|
+
return _index.useListbox_unstable;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
const _index = require("./components/Listbox/index");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Listbox.ts"],"sourcesContent":["export
|
|
1
|
+
{"version":3,"sources":["../src/Listbox.ts"],"sourcesContent":["export type { ListboxContextValues, ListboxProps, ListboxSlots, ListboxState } from './components/Listbox/index';\nexport {\n Listbox,\n listboxClassNames,\n renderListbox_unstable,\n useListboxStyles_unstable,\n useListbox_unstable,\n} from './components/Listbox/index';\n"],"names":["Listbox","listboxClassNames","renderListbox_unstable","useListboxStyles_unstable","useListbox_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAEEA,OAAO;eAAPA,cAAO;;IACPC,iBAAiB;eAAjBA,wBAAiB;;IACjBC,sBAAsB;eAAtBA,6BAAsB;;IACtBC,yBAAyB;eAAzBA,gCAAyB;;IACzBC,mBAAmB;eAAnBA,0BAAmB;;;uBACd"}
|
package/lib-commonjs/Option.js
CHANGED
|
@@ -2,5 +2,27 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
Option: function() {
|
|
13
|
+
return _index.Option;
|
|
14
|
+
},
|
|
15
|
+
optionClassNames: function() {
|
|
16
|
+
return _index.optionClassNames;
|
|
17
|
+
},
|
|
18
|
+
renderOption_unstable: function() {
|
|
19
|
+
return _index.renderOption_unstable;
|
|
20
|
+
},
|
|
21
|
+
useOptionStyles_unstable: function() {
|
|
22
|
+
return _index.useOptionStyles_unstable;
|
|
23
|
+
},
|
|
24
|
+
useOption_unstable: function() {
|
|
25
|
+
return _index.useOption_unstable;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
const _index = require("./components/Option/index");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Option.ts"],"sourcesContent":["export
|
|
1
|
+
{"version":3,"sources":["../src/Option.ts"],"sourcesContent":["export type { OptionProps, OptionSlots, OptionState } from './components/Option/index';\nexport {\n Option,\n optionClassNames,\n renderOption_unstable,\n useOptionStyles_unstable,\n useOption_unstable,\n} from './components/Option/index';\n"],"names":["Option","optionClassNames","renderOption_unstable","useOptionStyles_unstable","useOption_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAEEA,MAAM;eAANA,aAAM;;IACNC,gBAAgB;eAAhBA,uBAAgB;;IAChBC,qBAAqB;eAArBA,4BAAqB;;IACrBC,wBAAwB;eAAxBA,+BAAwB;;IACxBC,kBAAkB;eAAlBA,yBAAkB;;;uBACb"}
|
|
@@ -2,5 +2,27 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
OptionGroup: function() {
|
|
13
|
+
return _index.OptionGroup;
|
|
14
|
+
},
|
|
15
|
+
optionGroupClassNames: function() {
|
|
16
|
+
return _index.optionGroupClassNames;
|
|
17
|
+
},
|
|
18
|
+
renderOptionGroup_unstable: function() {
|
|
19
|
+
return _index.renderOptionGroup_unstable;
|
|
20
|
+
},
|
|
21
|
+
useOptionGroupStyles_unstable: function() {
|
|
22
|
+
return _index.useOptionGroupStyles_unstable;
|
|
23
|
+
},
|
|
24
|
+
useOptionGroup_unstable: function() {
|
|
25
|
+
return _index.useOptionGroup_unstable;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
const _index = require("./components/OptionGroup/index");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/OptionGroup.ts"],"sourcesContent":["export
|
|
1
|
+
{"version":3,"sources":["../src/OptionGroup.ts"],"sourcesContent":["export type { OptionGroupProps, OptionGroupSlots, OptionGroupState } from './components/OptionGroup/index';\nexport {\n OptionGroup,\n optionGroupClassNames,\n renderOptionGroup_unstable,\n useOptionGroupStyles_unstable,\n useOptionGroup_unstable,\n} from './components/OptionGroup/index';\n"],"names":["OptionGroup","optionGroupClassNames","renderOptionGroup_unstable","useOptionGroupStyles_unstable","useOptionGroup_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAEEA,WAAW;eAAXA,kBAAW;;IACXC,qBAAqB;eAArBA,4BAAqB;;IACrBC,0BAA0B;eAA1BA,iCAA0B;;IAC1BC,6BAA6B;eAA7BA,oCAA6B;;IAC7BC,uBAAuB;eAAvBA,8BAAuB;;;uBAClB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Selection.ts"],"sourcesContent":["export
|
|
1
|
+
{"version":3,"sources":["../src/Selection.ts"],"sourcesContent":["export type { OptionOnSelectData, SelectionEvents, SelectionProps, SelectionState } from './utils/Selection.types';\n"],"names":[],"rangeMappings":"","mappings":""}
|
|
@@ -2,9 +2,30 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
Combobox: function() {
|
|
13
|
+
return _Combobox.Combobox;
|
|
14
|
+
},
|
|
15
|
+
comboboxClassNames: function() {
|
|
16
|
+
return _useComboboxStylesstyles.comboboxClassNames;
|
|
17
|
+
},
|
|
18
|
+
renderCombobox_unstable: function() {
|
|
19
|
+
return _renderCombobox.renderCombobox_unstable;
|
|
20
|
+
},
|
|
21
|
+
useComboboxStyles_unstable: function() {
|
|
22
|
+
return _useComboboxStylesstyles.useComboboxStyles_unstable;
|
|
23
|
+
},
|
|
24
|
+
useCombobox_unstable: function() {
|
|
25
|
+
return _useCombobox.useCombobox_unstable;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
const _Combobox = require("./Combobox");
|
|
29
|
+
const _renderCombobox = require("./renderCombobox");
|
|
30
|
+
const _useCombobox = require("./useCombobox");
|
|
31
|
+
const _useComboboxStylesstyles = require("./useComboboxStyles.styles");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Combobox/index.ts"],"sourcesContent":["export
|
|
1
|
+
{"version":3,"sources":["../src/components/Combobox/index.ts"],"sourcesContent":["export { Combobox } from './Combobox';\nexport type {\n ActiveOptionChangeData,\n ComboboxContextValues,\n ComboboxOpenChangeData,\n ComboboxOpenEvents,\n ComboboxProps,\n ComboboxSlots,\n ComboboxState,\n} from './Combobox.types';\nexport { renderCombobox_unstable } from './renderCombobox';\nexport { useCombobox_unstable } from './useCombobox';\nexport { comboboxClassNames, useComboboxStyles_unstable } from './useComboboxStyles.styles';\n"],"names":["Combobox","comboboxClassNames","renderCombobox_unstable","useComboboxStyles_unstable","useCombobox_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,QAAQ;eAARA,kBAAQ;;IAYRC,kBAAkB;eAAlBA,2CAAkB;;IAFlBC,uBAAuB;eAAvBA,uCAAuB;;IAEHC,0BAA0B;eAA1BA,mDAA0B;;IAD9CC,oBAAoB;eAApBA,iCAAoB;;;0BAXJ;gCAUe;6BACH;yCAC0B"}
|
|
@@ -2,9 +2,30 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
Dropdown: function() {
|
|
13
|
+
return _Dropdown.Dropdown;
|
|
14
|
+
},
|
|
15
|
+
dropdownClassNames: function() {
|
|
16
|
+
return _useDropdownStylesstyles.dropdownClassNames;
|
|
17
|
+
},
|
|
18
|
+
renderDropdown_unstable: function() {
|
|
19
|
+
return _renderDropdown.renderDropdown_unstable;
|
|
20
|
+
},
|
|
21
|
+
useDropdownStyles_unstable: function() {
|
|
22
|
+
return _useDropdownStylesstyles.useDropdownStyles_unstable;
|
|
23
|
+
},
|
|
24
|
+
useDropdown_unstable: function() {
|
|
25
|
+
return _useDropdown.useDropdown_unstable;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
const _Dropdown = require("./Dropdown");
|
|
29
|
+
const _renderDropdown = require("./renderDropdown");
|
|
30
|
+
const _useDropdown = require("./useDropdown");
|
|
31
|
+
const _useDropdownStylesstyles = require("./useDropdownStyles.styles");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Dropdown/index.ts"],"sourcesContent":["export
|
|
1
|
+
{"version":3,"sources":["../src/components/Dropdown/index.ts"],"sourcesContent":["export { Dropdown } from './Dropdown';\nexport type {\n ActiveOptionChangeData,\n DropdownContextValues,\n DropdownOpenChangeData,\n DropdownOpenEvents,\n DropdownProps,\n DropdownSlots,\n DropdownState,\n} from './Dropdown.types';\nexport { renderDropdown_unstable } from './renderDropdown';\nexport { useDropdown_unstable } from './useDropdown';\nexport { dropdownClassNames, useDropdownStyles_unstable } from './useDropdownStyles.styles';\n"],"names":["Dropdown","dropdownClassNames","renderDropdown_unstable","useDropdownStyles_unstable","useDropdown_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,QAAQ;eAARA,kBAAQ;;IAYRC,kBAAkB;eAAlBA,2CAAkB;;IAFlBC,uBAAuB;eAAvBA,uCAAuB;;IAEHC,0BAA0B;eAA1BA,mDAA0B;;IAD9CC,oBAAoB;eAApBA,iCAAoB;;;0BAXJ;gCAUe;6BACH;yCAC0B"}
|
|
@@ -2,9 +2,30 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
Listbox: function() {
|
|
13
|
+
return _Listbox.Listbox;
|
|
14
|
+
},
|
|
15
|
+
listboxClassNames: function() {
|
|
16
|
+
return _useListboxStylesstyles.listboxClassNames;
|
|
17
|
+
},
|
|
18
|
+
renderListbox_unstable: function() {
|
|
19
|
+
return _renderListbox.renderListbox_unstable;
|
|
20
|
+
},
|
|
21
|
+
useListboxStyles_unstable: function() {
|
|
22
|
+
return _useListboxStylesstyles.useListboxStyles_unstable;
|
|
23
|
+
},
|
|
24
|
+
useListbox_unstable: function() {
|
|
25
|
+
return _useListbox.useListbox_unstable;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
const _Listbox = require("./Listbox");
|
|
29
|
+
const _renderListbox = require("./renderListbox");
|
|
30
|
+
const _useListbox = require("./useListbox");
|
|
31
|
+
const _useListboxStylesstyles = require("./useListboxStyles.styles");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Listbox/index.ts"],"sourcesContent":["export
|
|
1
|
+
{"version":3,"sources":["../src/components/Listbox/index.ts"],"sourcesContent":["export { Listbox } from './Listbox';\nexport type { ListboxContextValues, ListboxProps, ListboxSlots, ListboxState } from './Listbox.types';\nexport { renderListbox_unstable } from './renderListbox';\nexport { useListbox_unstable } from './useListbox';\nexport { listboxClassNames, useListboxStyles_unstable } from './useListboxStyles.styles';\n"],"names":["Listbox","listboxClassNames","renderListbox_unstable","useListboxStyles_unstable","useListbox_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,OAAO;eAAPA,gBAAO;;IAIPC,iBAAiB;eAAjBA,yCAAiB;;IAFjBC,sBAAsB;eAAtBA,qCAAsB;;IAEHC,yBAAyB;eAAzBA,iDAAyB;;IAD5CC,mBAAmB;eAAnBA,+BAAmB;;;yBAHJ;+BAEe;4BACH;wCACyB"}
|
|
@@ -2,9 +2,30 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
Option: function() {
|
|
13
|
+
return _Option.Option;
|
|
14
|
+
},
|
|
15
|
+
optionClassNames: function() {
|
|
16
|
+
return _useOptionStylesstyles.optionClassNames;
|
|
17
|
+
},
|
|
18
|
+
renderOption_unstable: function() {
|
|
19
|
+
return _renderOption.renderOption_unstable;
|
|
20
|
+
},
|
|
21
|
+
useOptionStyles_unstable: function() {
|
|
22
|
+
return _useOptionStylesstyles.useOptionStyles_unstable;
|
|
23
|
+
},
|
|
24
|
+
useOption_unstable: function() {
|
|
25
|
+
return _useOption.useOption_unstable;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
const _Option = require("./Option");
|
|
29
|
+
const _renderOption = require("./renderOption");
|
|
30
|
+
const _useOption = require("./useOption");
|
|
31
|
+
const _useOptionStylesstyles = require("./useOptionStyles.styles");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Option/index.ts"],"sourcesContent":["export
|
|
1
|
+
{"version":3,"sources":["../src/components/Option/index.ts"],"sourcesContent":["export { Option } from './Option';\nexport type { OptionProps, OptionSlots, OptionState } from './Option.types';\nexport { renderOption_unstable } from './renderOption';\nexport { useOption_unstable } from './useOption';\nexport { optionClassNames, useOptionStyles_unstable } from './useOptionStyles.styles';\n"],"names":["Option","optionClassNames","renderOption_unstable","useOptionStyles_unstable","useOption_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,MAAM;eAANA,cAAM;;IAINC,gBAAgB;eAAhBA,uCAAgB;;IAFhBC,qBAAqB;eAArBA,mCAAqB;;IAEHC,wBAAwB;eAAxBA,+CAAwB;;IAD1CC,kBAAkB;eAAlBA,6BAAkB;;;wBAHJ;8BAEe;2BACH;uCACwB"}
|
|
@@ -2,9 +2,30 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
OptionGroup: function() {
|
|
13
|
+
return _OptionGroup.OptionGroup;
|
|
14
|
+
},
|
|
15
|
+
optionGroupClassNames: function() {
|
|
16
|
+
return _useOptionGroupStylesstyles.optionGroupClassNames;
|
|
17
|
+
},
|
|
18
|
+
renderOptionGroup_unstable: function() {
|
|
19
|
+
return _renderOptionGroup.renderOptionGroup_unstable;
|
|
20
|
+
},
|
|
21
|
+
useOptionGroupStyles_unstable: function() {
|
|
22
|
+
return _useOptionGroupStylesstyles.useOptionGroupStyles_unstable;
|
|
23
|
+
},
|
|
24
|
+
useOptionGroup_unstable: function() {
|
|
25
|
+
return _useOptionGroup.useOptionGroup_unstable;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
const _OptionGroup = require("./OptionGroup");
|
|
29
|
+
const _renderOptionGroup = require("./renderOptionGroup");
|
|
30
|
+
const _useOptionGroup = require("./useOptionGroup");
|
|
31
|
+
const _useOptionGroupStylesstyles = require("./useOptionGroupStyles.styles");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/OptionGroup/index.ts"],"sourcesContent":["export
|
|
1
|
+
{"version":3,"sources":["../src/components/OptionGroup/index.ts"],"sourcesContent":["export { OptionGroup } from './OptionGroup';\nexport type { OptionGroupProps, OptionGroupSlots, OptionGroupState } from './OptionGroup.types';\nexport { renderOptionGroup_unstable } from './renderOptionGroup';\nexport { useOptionGroup_unstable } from './useOptionGroup';\nexport { optionGroupClassNames, useOptionGroupStyles_unstable } from './useOptionGroupStyles.styles';\n"],"names":["OptionGroup","optionGroupClassNames","renderOptionGroup_unstable","useOptionGroupStyles_unstable","useOptionGroup_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,WAAW;eAAXA,wBAAW;;IAIXC,qBAAqB;eAArBA,iDAAqB;;IAFrBC,0BAA0B;eAA1BA,6CAA0B;;IAEHC,6BAA6B;eAA7BA,yDAA6B;;IADpDC,uBAAuB;eAAvBA,uCAAuB;;;6BAHJ;mCAEe;gCACH;4CAC6B"}
|
|
@@ -8,7 +8,8 @@ Object.defineProperty(exports, "useSelection", {
|
|
|
8
8
|
return useSelection;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
const
|
|
11
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
12
13
|
const _reactutilities = require("@fluentui/react-utilities");
|
|
13
14
|
const useSelection = (props)=>{
|
|
14
15
|
const { defaultSelectedOptions, multiselect, onOptionSelect } = props;
|
|
@@ -17,7 +18,7 @@ const useSelection = (props)=>{
|
|
|
17
18
|
defaultState: defaultSelectedOptions,
|
|
18
19
|
initialState: []
|
|
19
20
|
});
|
|
20
|
-
const selectOption =
|
|
21
|
+
const selectOption = _react.useCallback((event, option)=>{
|
|
21
22
|
// if the option is disabled, do nothing
|
|
22
23
|
if (option.disabled) {
|
|
23
24
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/utils/useSelection.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"sources":["../src/utils/useSelection.ts"],"sourcesContent":["import * as React from 'react';\nimport { useControllableState } from '@fluentui/react-utilities';\nimport { OptionValue } from './OptionCollection.types';\nimport { SelectionEvents, SelectionProps, SelectionState } from './Selection.types';\n\nexport const useSelection = (props: SelectionProps): SelectionState => {\n const { defaultSelectedOptions, multiselect, onOptionSelect } = props;\n\n const [selectedOptions, setSelectedOptions] = useControllableState({\n state: props.selectedOptions,\n defaultState: defaultSelectedOptions,\n initialState: [],\n });\n\n const selectOption = React.useCallback(\n (event: SelectionEvents, option: OptionValue) => {\n // if the option is disabled, do nothing\n if (option.disabled) {\n return;\n }\n\n // for single-select, always return the selected option\n let newSelection = [option.value];\n\n // toggle selected state of the option for multiselect\n if (multiselect) {\n const selectedIndex = selectedOptions.findIndex(o => o === option.value);\n if (selectedIndex > -1) {\n // deselect option\n newSelection = [...selectedOptions.slice(0, selectedIndex), ...selectedOptions.slice(selectedIndex + 1)];\n } else {\n // select option\n newSelection = [...selectedOptions, option.value];\n }\n }\n\n setSelectedOptions(newSelection);\n onOptionSelect?.(event, { optionValue: option.value, optionText: option.text, selectedOptions: newSelection });\n },\n [onOptionSelect, multiselect, selectedOptions, setSelectedOptions],\n );\n\n const clearSelection = (event: SelectionEvents) => {\n setSelectedOptions([]);\n onOptionSelect?.(event, { optionValue: undefined, optionText: undefined, selectedOptions: [] });\n };\n\n return { clearSelection, selectOption, selectedOptions };\n};\n"],"names":["useSelection","props","defaultSelectedOptions","multiselect","onOptionSelect","selectedOptions","setSelectedOptions","useControllableState","state","defaultState","initialState","selectOption","React","useCallback","event","option","disabled","newSelection","value","selectedIndex","findIndex","o","slice","optionValue","optionText","text","clearSelection","undefined"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAKaA;;;eAAAA;;;;iEALU;gCACc;AAI9B,MAAMA,eAAe,CAACC;IAC3B,MAAM,EAAEC,sBAAsB,EAAEC,WAAW,EAAEC,cAAc,EAAE,GAAGH;IAEhE,MAAM,CAACI,iBAAiBC,mBAAmB,GAAGC,IAAAA,oCAAAA,EAAqB;QACjEC,OAAOP,MAAMI,eAAe;QAC5BI,cAAcP;QACdQ,cAAc,EAAE;IAClB;IAEA,MAAMC,eAAeC,OAAMC,WAAW,CACpC,CAACC,OAAwBC;QACvB,wCAAwC;QACxC,IAAIA,OAAOC,QAAQ,EAAE;YACnB;QACF;QAEA,uDAAuD;QACvD,IAAIC,eAAe;YAACF,OAAOG,KAAK;SAAC;QAEjC,sDAAsD;QACtD,IAAIf,aAAa;YACf,MAAMgB,gBAAgBd,gBAAgBe,SAAS,CAACC,CAAAA,IAAKA,MAAMN,OAAOG,KAAK;YACvE,IAAIC,gBAAgB,CAAC,GAAG;gBACtB,kBAAkB;gBAClBF,eAAe;uBAAIZ,gBAAgBiB,KAAK,CAAC,GAAGH;uBAAmBd,gBAAgBiB,KAAK,CAACH,gBAAgB;iBAAG;YAC1G,OAAO;gBACL,gBAAgB;gBAChBF,eAAe;uBAAIZ;oBAAiBU,OAAOG,KAAK;iBAAC;YACnD;QACF;QAEAZ,mBAAmBW;QACnBb,mBAAAA,QAAAA,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAiBU,OAAO;YAAES,aAAaR,OAAOG,KAAK;YAAEM,YAAYT,OAAOU,IAAI;YAAEpB,iBAAiBY;QAAa;IAC9G,GACA;QAACb;QAAgBD;QAAaE;QAAiBC;KAAmB;IAGpE,MAAMoB,iBAAiB,CAACZ;QACtBR,mBAAmB,EAAE;QACrBF,mBAAAA,QAAAA,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAiBU,OAAO;YAAES,aAAaI;YAAWH,YAAYG;YAAWtB,iBAAiB,EAAE;QAAC;IAC/F;IAEA,OAAO;QAAEqB;QAAgBf;QAAcN;IAAgB;AACzD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-combobox",
|
|
3
|
-
"version": "9.13.
|
|
3
|
+
"version": "9.13.14",
|
|
4
4
|
"description": "Fluent UI React Combobox component",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -19,18 +19,18 @@
|
|
|
19
19
|
"@fluentui/scripts-cypress": "*"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluentui/react-aria": "^9.13.
|
|
22
|
+
"@fluentui/react-aria": "^9.13.11",
|
|
23
23
|
"@fluentui/keyboard-keys": "^9.0.8",
|
|
24
|
-
"@fluentui/react-context-selector": "^9.1.
|
|
25
|
-
"@fluentui/react-field": "^9.1.
|
|
24
|
+
"@fluentui/react-context-selector": "^9.1.70",
|
|
25
|
+
"@fluentui/react-field": "^9.1.82",
|
|
26
26
|
"@fluentui/react-icons": "^2.0.245",
|
|
27
|
-
"@fluentui/react-jsx-runtime": "^9.0.
|
|
28
|
-
"@fluentui/react-portal": "^9.4.
|
|
29
|
-
"@fluentui/react-positioning": "^9.15.
|
|
30
|
-
"@fluentui/react-shared-contexts": "^9.21.
|
|
31
|
-
"@fluentui/react-tabster": "^9.23.
|
|
32
|
-
"@fluentui/react-theme": "^9.1.
|
|
33
|
-
"@fluentui/react-utilities": "^9.18.
|
|
27
|
+
"@fluentui/react-jsx-runtime": "^9.0.47",
|
|
28
|
+
"@fluentui/react-portal": "^9.4.39",
|
|
29
|
+
"@fluentui/react-positioning": "^9.15.14",
|
|
30
|
+
"@fluentui/react-shared-contexts": "^9.21.1",
|
|
31
|
+
"@fluentui/react-tabster": "^9.23.1",
|
|
32
|
+
"@fluentui/react-theme": "^9.1.23",
|
|
33
|
+
"@fluentui/react-utilities": "^9.18.18",
|
|
34
34
|
"@griffel/react": "^1.5.22",
|
|
35
35
|
"@swc/helpers": "^0.5.1"
|
|
36
36
|
},
|