@fluentui/react-select 9.1.39 → 9.1.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +97 -1
- package/CHANGELOG.md +31 -2
- package/lib/components/Select/useSelect.js +1 -2
- package/lib/components/Select/useSelect.js.map +1 -1
- package/lib-commonjs/components/Select/useSelect.js +1 -2
- package/lib-commonjs/components/Select/useSelect.js.map +1 -1
- package/package.json +7 -7
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,103 @@
|
|
|
2
2
|
"name": "@fluentui/react-select",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Tue, 26 Sep 2023 17:44:16 GMT",
|
|
6
|
+
"tag": "@fluentui/react-select_v9.1.41",
|
|
7
|
+
"version": "9.1.41",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "yuanboxue@microsoft.com",
|
|
12
|
+
"package": "@fluentui/react-select",
|
|
13
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d",
|
|
14
|
+
"comment": "chore: trigger manual version bump after broken release"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "beachball",
|
|
18
|
+
"package": "@fluentui/react-select",
|
|
19
|
+
"comment": "Bump @fluentui/react-field to v9.1.31",
|
|
20
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "beachball",
|
|
24
|
+
"package": "@fluentui/react-select",
|
|
25
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v9.0.12",
|
|
26
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"author": "beachball",
|
|
30
|
+
"package": "@fluentui/react-select",
|
|
31
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.9.1",
|
|
32
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"author": "beachball",
|
|
36
|
+
"package": "@fluentui/react-select",
|
|
37
|
+
"comment": "Bump @fluentui/react-theme to v9.1.14",
|
|
38
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"author": "beachball",
|
|
42
|
+
"package": "@fluentui/react-select",
|
|
43
|
+
"comment": "Bump @fluentui/react-utilities to v9.13.5",
|
|
44
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"date": "Tue, 26 Sep 2023 15:31:51 GMT",
|
|
51
|
+
"tag": "@fluentui/react-select_v9.1.40",
|
|
52
|
+
"version": "9.1.40",
|
|
53
|
+
"comments": {
|
|
54
|
+
"patch": [
|
|
55
|
+
{
|
|
56
|
+
"author": "martinhochel@microsoft.com",
|
|
57
|
+
"package": "@fluentui/react-select",
|
|
58
|
+
"commit": "e61473fa10195f6ebf2308205c1e72e91b711831",
|
|
59
|
+
"comment": "fix: bump swc core to mitigate transpilation memory leaks"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"author": "ololubek@microsoft.com",
|
|
63
|
+
"package": "@fluentui/react-select",
|
|
64
|
+
"commit": "a31e7394d9f169bc5aa55430a22cdc65425a1b49",
|
|
65
|
+
"comment": "chore: Update react-icons version to pick up IconDirectionContextProvider updated export"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"author": "beachball",
|
|
69
|
+
"package": "@fluentui/react-select",
|
|
70
|
+
"comment": "Bump @fluentui/react-field to v9.1.30",
|
|
71
|
+
"commit": "e16520437e10cd824ac254dd797e32762b5de72d"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"author": "beachball",
|
|
75
|
+
"package": "@fluentui/react-select",
|
|
76
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v9.0.11",
|
|
77
|
+
"commit": "e16520437e10cd824ac254dd797e32762b5de72d"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"author": "beachball",
|
|
81
|
+
"package": "@fluentui/react-select",
|
|
82
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.9.0",
|
|
83
|
+
"commit": "e16520437e10cd824ac254dd797e32762b5de72d"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"author": "beachball",
|
|
87
|
+
"package": "@fluentui/react-select",
|
|
88
|
+
"comment": "Bump @fluentui/react-theme to v9.1.13",
|
|
89
|
+
"commit": "e16520437e10cd824ac254dd797e32762b5de72d"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"author": "beachball",
|
|
93
|
+
"package": "@fluentui/react-select",
|
|
94
|
+
"comment": "Bump @fluentui/react-utilities to v9.13.4",
|
|
95
|
+
"commit": "e16520437e10cd824ac254dd797e32762b5de72d"
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"date": "Wed, 20 Sep 2023 17:47:42 GMT",
|
|
6
102
|
"tag": "@fluentui/react-select_v9.1.39",
|
|
7
103
|
"version": "9.1.39",
|
|
8
104
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,41 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-select
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Tue, 26 Sep 2023 17:44:16 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.1.41](https://github.com/microsoft/fluentui/tree/@fluentui/react-select_v9.1.41)
|
|
8
|
+
|
|
9
|
+
Tue, 26 Sep 2023 17:44:16 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-select_v9.1.40..@fluentui/react-select_v9.1.41)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- chore: trigger manual version bump after broken release ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by yuanboxue@microsoft.com)
|
|
15
|
+
- Bump @fluentui/react-field to v9.1.31 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
|
|
16
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.12 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
|
|
17
|
+
- Bump @fluentui/react-shared-contexts to v9.9.1 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
|
|
18
|
+
- Bump @fluentui/react-theme to v9.1.14 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
|
|
19
|
+
- Bump @fluentui/react-utilities to v9.13.5 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
|
|
20
|
+
|
|
21
|
+
## [9.1.40](https://github.com/microsoft/fluentui/tree/@fluentui/react-select_v9.1.40)
|
|
22
|
+
|
|
23
|
+
Tue, 26 Sep 2023 15:31:51 GMT
|
|
24
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-select_v9.1.39..@fluentui/react-select_v9.1.40)
|
|
25
|
+
|
|
26
|
+
### Patches
|
|
27
|
+
|
|
28
|
+
- fix: bump swc core to mitigate transpilation memory leaks ([PR #29253](https://github.com/microsoft/fluentui/pull/29253) by martinhochel@microsoft.com)
|
|
29
|
+
- chore: Update react-icons version to pick up IconDirectionContextProvider updated export ([PR #29151](https://github.com/microsoft/fluentui/pull/29151) by ololubek@microsoft.com)
|
|
30
|
+
- Bump @fluentui/react-field to v9.1.30 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
|
|
31
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.11 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
|
|
32
|
+
- Bump @fluentui/react-shared-contexts to v9.9.0 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
|
|
33
|
+
- Bump @fluentui/react-theme to v9.1.13 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
|
|
34
|
+
- Bump @fluentui/react-utilities to v9.13.4 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
|
|
35
|
+
|
|
7
36
|
## [9.1.39](https://github.com/microsoft/fluentui/tree/@fluentui/react-select_v9.1.39)
|
|
8
37
|
|
|
9
|
-
Wed, 20 Sep 2023 17:
|
|
38
|
+
Wed, 20 Sep 2023 17:47:42 GMT
|
|
10
39
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-select_v9.1.38..@fluentui/react-select_v9.1.39)
|
|
11
40
|
|
|
12
41
|
### Patches
|
|
@@ -62,8 +62,7 @@ import { useOverrides_unstable as useOverrides } from '@fluentui/react-shared-co
|
|
|
62
62
|
})
|
|
63
63
|
};
|
|
64
64
|
state.select.onChange = useEventCallback((event)=>{
|
|
65
|
-
|
|
66
|
-
(_onChange = onChange) === null || _onChange === void 0 ? void 0 : _onChange(event, {
|
|
65
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(event, {
|
|
67
66
|
value: event.target.value
|
|
68
67
|
});
|
|
69
68
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useSelect.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useFieldControlProps_unstable } from '@fluentui/react-field';\nimport { getPartitionedNativeProps, useEventCallback, slot } from '@fluentui/react-utilities';\nimport { ChevronDownRegular } from '@fluentui/react-icons';\nimport type { SelectProps, SelectState } from './Select.types';\nimport { useOverrides_unstable as useOverrides } from '@fluentui/react-shared-contexts';\n\n/**\n * Create the state required to render Select.\n *\n * The returned state can be modified with hooks such as useSelectStyles,\n * before being passed to renderSelect.\n *\n * @param props - props from this instance of Select\n * @param ref - reference to the `<select>` element in Select\n */\nexport const useSelect_unstable = (props: SelectProps, ref: React.Ref<HTMLSelectElement>): SelectState => {\n // Merge props from surrounding <Field>, if any\n props = useFieldControlProps_unstable(props, { supportsLabelFor: true, supportsRequired: true, supportsSize: true });\n\n const overrides = useOverrides();\n\n const {\n defaultValue,\n value,\n select,\n icon,\n root,\n appearance = overrides.inputDefaultAppearance ?? 'outline',\n\n onChange,\n size = 'medium',\n } = props;\n\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'select',\n excludedPropNames: ['appearance', 'defaultValue', 'onChange', 'size', 'value'],\n });\n\n const state: SelectState = {\n size,\n appearance,\n components: {\n root: 'span',\n select: 'select',\n icon: 'span',\n },\n select: slot.always(select, {\n defaultProps: {\n defaultValue,\n value,\n ref,\n ...nativeProps.primary,\n },\n elementType: 'select',\n }),\n icon: slot.optional(icon, {\n renderByDefault: true,\n defaultProps: { children: <ChevronDownRegular /> },\n elementType: 'span',\n }),\n root: slot.always(root, {\n defaultProps: nativeProps.root,\n elementType: 'span',\n }),\n };\n\n state.select.onChange = useEventCallback(event => {\n onChange?.(event, { value: (event.target as HTMLSelectElement).value });\n });\n\n return state;\n};\n"],"names":["React","useFieldControlProps_unstable","getPartitionedNativeProps","useEventCallback","slot","ChevronDownRegular","useOverrides_unstable","useOverrides","useSelect_unstable","props","ref","supportsLabelFor","supportsRequired","supportsSize","overrides","defaultValue","value","select","icon","root","appearance","inputDefaultAppearance","onChange","size","nativeProps","primarySlotTagName","excludedPropNames","state","components","always","defaultProps","primary","elementType","optional","renderByDefault","children","event","target"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,6BAA6B,QAAQ,wBAAwB;AACtE,SAASC,yBAAyB,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,4BAA4B;AAC9F,SAASC,kBAAkB,QAAQ,wBAAwB;AAE3D,SAASC,yBAAyBC,YAAY,QAAQ,kCAAkC;AAExF;;;;;;;;CAQC,GACD,OAAO,MAAMC,qBAAqB,CAACC,OAAoBC;IACrD,+CAA+C;IAC/CD,QAAQR,8BAA8BQ,OAAO;QAAEE,kBAAkB;QAAMC,kBAAkB;QAAMC,cAAc;IAAK;IAElH,MAAMC,YAAYP;QAQHO;IANf,MAAM,EACJC,YAAY,EACZC,KAAK,EACLC,MAAM,EACNC,IAAI,EACJC,IAAI,EACJC,aAAaN,CAAAA,oCAAAA,UAAUO,sBAAsB,cAAhCP,+CAAAA,oCAAoC,SAAS,EAE1DQ,QAAQ,EACRC,OAAO,QAAQ,EAChB,GAAGd;IAEJ,MAAMe,cAActB,0BAA0B;QAC5CO;QACAgB,oBAAoB;QACpBC,mBAAmB;YAAC;YAAc;YAAgB;YAAY;YAAQ;SAAQ;IAChF;IAEA,MAAMC,QAAqB;QACzBJ;QACAH;QACAQ,YAAY;YACVT,MAAM;YACNF,QAAQ;YACRC,MAAM;QACR;QACAD,QAAQb,KAAKyB,MAAM,CAACZ,QAAQ;YAC1Ba,cAAc;gBACZf;gBACAC;gBACAN;gBACA,GAAGc,YAAYO,OAAO;YACxB;YACAC,aAAa;QACf;QACAd,MAAMd,KAAK6B,QAAQ,CAACf,MAAM;YACxBgB,iBAAiB;YACjBJ,cAAc;gBAAEK,wBAAU,oBAAC9B;YAAsB;YACjD2B,aAAa;QACf;QACAb,MAAMf,KAAKyB,MAAM,CAACV,MAAM;YACtBW,cAAcN,YAAYL,IAAI;YAC9Ba,aAAa;QACf;IACF;IAEAL,MAAMV,MAAM,CAACK,QAAQ,GAAGnB,iBAAiBiC,CAAAA;
|
|
1
|
+
{"version":3,"sources":["useSelect.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useFieldControlProps_unstable } from '@fluentui/react-field';\nimport { getPartitionedNativeProps, useEventCallback, slot } from '@fluentui/react-utilities';\nimport { ChevronDownRegular } from '@fluentui/react-icons';\nimport type { SelectProps, SelectState } from './Select.types';\nimport { useOverrides_unstable as useOverrides } from '@fluentui/react-shared-contexts';\n\n/**\n * Create the state required to render Select.\n *\n * The returned state can be modified with hooks such as useSelectStyles,\n * before being passed to renderSelect.\n *\n * @param props - props from this instance of Select\n * @param ref - reference to the `<select>` element in Select\n */\nexport const useSelect_unstable = (props: SelectProps, ref: React.Ref<HTMLSelectElement>): SelectState => {\n // Merge props from surrounding <Field>, if any\n props = useFieldControlProps_unstable(props, { supportsLabelFor: true, supportsRequired: true, supportsSize: true });\n\n const overrides = useOverrides();\n\n const {\n defaultValue,\n value,\n select,\n icon,\n root,\n appearance = overrides.inputDefaultAppearance ?? 'outline',\n\n onChange,\n size = 'medium',\n } = props;\n\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'select',\n excludedPropNames: ['appearance', 'defaultValue', 'onChange', 'size', 'value'],\n });\n\n const state: SelectState = {\n size,\n appearance,\n components: {\n root: 'span',\n select: 'select',\n icon: 'span',\n },\n select: slot.always(select, {\n defaultProps: {\n defaultValue,\n value,\n ref,\n ...nativeProps.primary,\n },\n elementType: 'select',\n }),\n icon: slot.optional(icon, {\n renderByDefault: true,\n defaultProps: { children: <ChevronDownRegular /> },\n elementType: 'span',\n }),\n root: slot.always(root, {\n defaultProps: nativeProps.root,\n elementType: 'span',\n }),\n };\n\n state.select.onChange = useEventCallback(event => {\n onChange?.(event, { value: (event.target as HTMLSelectElement).value });\n });\n\n return state;\n};\n"],"names":["React","useFieldControlProps_unstable","getPartitionedNativeProps","useEventCallback","slot","ChevronDownRegular","useOverrides_unstable","useOverrides","useSelect_unstable","props","ref","supportsLabelFor","supportsRequired","supportsSize","overrides","defaultValue","value","select","icon","root","appearance","inputDefaultAppearance","onChange","size","nativeProps","primarySlotTagName","excludedPropNames","state","components","always","defaultProps","primary","elementType","optional","renderByDefault","children","event","target"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,6BAA6B,QAAQ,wBAAwB;AACtE,SAASC,yBAAyB,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,4BAA4B;AAC9F,SAASC,kBAAkB,QAAQ,wBAAwB;AAE3D,SAASC,yBAAyBC,YAAY,QAAQ,kCAAkC;AAExF;;;;;;;;CAQC,GACD,OAAO,MAAMC,qBAAqB,CAACC,OAAoBC;IACrD,+CAA+C;IAC/CD,QAAQR,8BAA8BQ,OAAO;QAAEE,kBAAkB;QAAMC,kBAAkB;QAAMC,cAAc;IAAK;IAElH,MAAMC,YAAYP;QAQHO;IANf,MAAM,EACJC,YAAY,EACZC,KAAK,EACLC,MAAM,EACNC,IAAI,EACJC,IAAI,EACJC,aAAaN,CAAAA,oCAAAA,UAAUO,sBAAsB,cAAhCP,+CAAAA,oCAAoC,SAAS,EAE1DQ,QAAQ,EACRC,OAAO,QAAQ,EAChB,GAAGd;IAEJ,MAAMe,cAActB,0BAA0B;QAC5CO;QACAgB,oBAAoB;QACpBC,mBAAmB;YAAC;YAAc;YAAgB;YAAY;YAAQ;SAAQ;IAChF;IAEA,MAAMC,QAAqB;QACzBJ;QACAH;QACAQ,YAAY;YACVT,MAAM;YACNF,QAAQ;YACRC,MAAM;QACR;QACAD,QAAQb,KAAKyB,MAAM,CAACZ,QAAQ;YAC1Ba,cAAc;gBACZf;gBACAC;gBACAN;gBACA,GAAGc,YAAYO,OAAO;YACxB;YACAC,aAAa;QACf;QACAd,MAAMd,KAAK6B,QAAQ,CAACf,MAAM;YACxBgB,iBAAiB;YACjBJ,cAAc;gBAAEK,wBAAU,oBAAC9B;YAAsB;YACjD2B,aAAa;QACf;QACAb,MAAMf,KAAKyB,MAAM,CAACV,MAAM;YACtBW,cAAcN,YAAYL,IAAI;YAC9Ba,aAAa;QACf;IACF;IAEAL,MAAMV,MAAM,CAACK,QAAQ,GAAGnB,iBAAiBiC,CAAAA;QACvCd,qBAAAA,+BAAAA,SAAWc,OAAO;YAAEpB,OAAO,AAACoB,MAAMC,MAAM,CAAuBrB,KAAK;QAAC;IACvE;IAEA,OAAOW;AACT,EAAE"}
|
|
@@ -65,8 +65,7 @@ const useSelect_unstable = (props, ref)=>{
|
|
|
65
65
|
})
|
|
66
66
|
};
|
|
67
67
|
state.select.onChange = (0, _reactutilities.useEventCallback)((event)=>{
|
|
68
|
-
|
|
69
|
-
(_onChange = onChange) === null || _onChange === void 0 ? void 0 : _onChange(event, {
|
|
68
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(event, {
|
|
70
69
|
value: event.target.value
|
|
71
70
|
});
|
|
72
71
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useSelect.js"],"sourcesContent":["import * as React from 'react';\nimport { useFieldControlProps_unstable } from '@fluentui/react-field';\nimport { getPartitionedNativeProps, useEventCallback, slot } from '@fluentui/react-utilities';\nimport { ChevronDownRegular } from '@fluentui/react-icons';\nimport { useOverrides_unstable as useOverrides } from '@fluentui/react-shared-contexts';\n/**\n * Create the state required to render Select.\n *\n * The returned state can be modified with hooks such as useSelectStyles,\n * before being passed to renderSelect.\n *\n * @param props - props from this instance of Select\n * @param ref - reference to the `<select>` element in Select\n */ export const useSelect_unstable = (props, ref)=>{\n // Merge props from surrounding <Field>, if any\n props = useFieldControlProps_unstable(props, {\n supportsLabelFor: true,\n supportsRequired: true,\n supportsSize: true\n });\n const overrides = useOverrides();\n var _overrides_inputDefaultAppearance;\n const { defaultValue, value, select, icon, root, appearance = (_overrides_inputDefaultAppearance = overrides.inputDefaultAppearance) !== null && _overrides_inputDefaultAppearance !== void 0 ? _overrides_inputDefaultAppearance : 'outline', onChange, size = 'medium' } = props;\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'select',\n excludedPropNames: [\n 'appearance',\n 'defaultValue',\n 'onChange',\n 'size',\n 'value'\n ]\n });\n const state = {\n size,\n appearance,\n components: {\n root: 'span',\n select: 'select',\n icon: 'span'\n },\n select: slot.always(select, {\n defaultProps: {\n defaultValue,\n value,\n ref,\n ...nativeProps.primary\n },\n elementType: 'select'\n }),\n icon: slot.optional(icon, {\n renderByDefault: true,\n defaultProps: {\n children: /*#__PURE__*/ React.createElement(ChevronDownRegular, null)\n },\n elementType: 'span'\n }),\n root: slot.always(root, {\n defaultProps: nativeProps.root,\n elementType: 'span'\n })\n };\n state.select.onChange = useEventCallback((event)=>{\n
|
|
1
|
+
{"version":3,"sources":["useSelect.js"],"sourcesContent":["import * as React from 'react';\nimport { useFieldControlProps_unstable } from '@fluentui/react-field';\nimport { getPartitionedNativeProps, useEventCallback, slot } from '@fluentui/react-utilities';\nimport { ChevronDownRegular } from '@fluentui/react-icons';\nimport { useOverrides_unstable as useOverrides } from '@fluentui/react-shared-contexts';\n/**\n * Create the state required to render Select.\n *\n * The returned state can be modified with hooks such as useSelectStyles,\n * before being passed to renderSelect.\n *\n * @param props - props from this instance of Select\n * @param ref - reference to the `<select>` element in Select\n */ export const useSelect_unstable = (props, ref)=>{\n // Merge props from surrounding <Field>, if any\n props = useFieldControlProps_unstable(props, {\n supportsLabelFor: true,\n supportsRequired: true,\n supportsSize: true\n });\n const overrides = useOverrides();\n var _overrides_inputDefaultAppearance;\n const { defaultValue, value, select, icon, root, appearance = (_overrides_inputDefaultAppearance = overrides.inputDefaultAppearance) !== null && _overrides_inputDefaultAppearance !== void 0 ? _overrides_inputDefaultAppearance : 'outline', onChange, size = 'medium' } = props;\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'select',\n excludedPropNames: [\n 'appearance',\n 'defaultValue',\n 'onChange',\n 'size',\n 'value'\n ]\n });\n const state = {\n size,\n appearance,\n components: {\n root: 'span',\n select: 'select',\n icon: 'span'\n },\n select: slot.always(select, {\n defaultProps: {\n defaultValue,\n value,\n ref,\n ...nativeProps.primary\n },\n elementType: 'select'\n }),\n icon: slot.optional(icon, {\n renderByDefault: true,\n defaultProps: {\n children: /*#__PURE__*/ React.createElement(ChevronDownRegular, null)\n },\n elementType: 'span'\n }),\n root: slot.always(root, {\n defaultProps: nativeProps.root,\n elementType: 'span'\n })\n };\n state.select.onChange = useEventCallback((event)=>{\n onChange === null || onChange === void 0 ? void 0 : onChange(event, {\n value: event.target.value\n });\n });\n return state;\n};\n"],"names":["useSelect_unstable","props","ref","useFieldControlProps_unstable","supportsLabelFor","supportsRequired","supportsSize","overrides","useOverrides","_overrides_inputDefaultAppearance","defaultValue","value","select","icon","root","appearance","inputDefaultAppearance","onChange","size","nativeProps","getPartitionedNativeProps","primarySlotTagName","excludedPropNames","state","components","slot","always","defaultProps","primary","elementType","optional","renderByDefault","children","React","createElement","ChevronDownRegular","useEventCallback","event","target"],"mappings":";;;;+BAaiBA;;;eAAAA;;;;iEAbM;4BACuB;gCACoB;4BAC/B;qCACmB;AAS3C,MAAMA,qBAAqB,CAACC,OAAOC;IAC1C,+CAA+C;IAC/CD,QAAQE,IAAAA,yCAA6B,EAACF,OAAO;QACzCG,kBAAkB;QAClBC,kBAAkB;QAClBC,cAAc;IAClB;IACA,MAAMC,YAAYC,IAAAA,0CAAY;IAC9B,IAAIC;IACJ,MAAM,EAAEC,YAAY,EAAEC,KAAK,EAAEC,MAAM,EAAEC,IAAI,EAAEC,IAAI,EAAEC,aAAa,AAACN,CAAAA,oCAAoCF,UAAUS,sBAAsB,AAAD,MAAO,QAAQP,sCAAsC,KAAK,IAAIA,oCAAoC,SAAS,EAAEQ,QAAQ,EAAEC,OAAO,QAAQ,EAAE,GAAGjB;IAC7Q,MAAMkB,cAAcC,IAAAA,yCAAyB,EAAC;QAC1CnB;QACAoB,oBAAoB;QACpBC,mBAAmB;YACf;YACA;YACA;YACA;YACA;SACH;IACL;IACA,MAAMC,QAAQ;QACVL;QACAH;QACAS,YAAY;YACRV,MAAM;YACNF,QAAQ;YACRC,MAAM;QACV;QACAD,QAAQa,oBAAI,CAACC,MAAM,CAACd,QAAQ;YACxBe,cAAc;gBACVjB;gBACAC;gBACAT;gBACA,GAAGiB,YAAYS,OAAO;YAC1B;YACAC,aAAa;QACjB;QACAhB,MAAMY,oBAAI,CAACK,QAAQ,CAACjB,MAAM;YACtBkB,iBAAiB;YACjBJ,cAAc;gBACVK,UAAU,WAAW,GAAGC,OAAMC,aAAa,CAACC,8BAAkB,EAAE;YACpE;YACAN,aAAa;QACjB;QACAf,MAAMW,oBAAI,CAACC,MAAM,CAACZ,MAAM;YACpBa,cAAcR,YAAYL,IAAI;YAC9Be,aAAa;QACjB;IACJ;IACAN,MAAMX,MAAM,CAACK,QAAQ,GAAGmB,IAAAA,gCAAgB,EAAC,CAACC;QACtCpB,aAAa,QAAQA,aAAa,KAAK,IAAI,KAAK,IAAIA,SAASoB,OAAO;YAChE1B,OAAO0B,MAAMC,MAAM,CAAC3B,KAAK;QAC7B;IACJ;IACA,OAAOY;AACX"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-select",
|
|
3
|
-
"version": "9.1.
|
|
3
|
+
"version": "9.1.41",
|
|
4
4
|
"description": "Fluent UI React Select component",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
"@fluentui/scripts-tasks": "*"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@fluentui/react-field": "^9.1.
|
|
37
|
-
"@fluentui/react-icons": "^2.0.
|
|
38
|
-
"@fluentui/react-jsx-runtime": "^9.0.
|
|
39
|
-
"@fluentui/react-shared-contexts": "^9.
|
|
40
|
-
"@fluentui/react-theme": "^9.1.
|
|
41
|
-
"@fluentui/react-utilities": "^9.13.
|
|
36
|
+
"@fluentui/react-field": "^9.1.31",
|
|
37
|
+
"@fluentui/react-icons": "^2.0.217",
|
|
38
|
+
"@fluentui/react-jsx-runtime": "^9.0.12",
|
|
39
|
+
"@fluentui/react-shared-contexts": "^9.9.1",
|
|
40
|
+
"@fluentui/react-theme": "^9.1.14",
|
|
41
|
+
"@fluentui/react-utilities": "^9.13.5",
|
|
42
42
|
"@griffel/react": "^1.5.14",
|
|
43
43
|
"@swc/helpers": "^0.5.1"
|
|
44
44
|
},
|