@fluentui/react-select 9.1.7 → 9.1.9

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 CHANGED
@@ -2,7 +2,55 @@
2
2
  "name": "@fluentui/react-select",
3
3
  "entries": [
4
4
  {
5
- "date": "Tue, 04 Apr 2023 18:42:19 GMT",
5
+ "date": "Wed, 12 Apr 2023 09:28:17 GMT",
6
+ "tag": "@fluentui/react-select_v9.1.9",
7
+ "version": "9.1.9",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "beachball",
12
+ "package": "@fluentui/react-select",
13
+ "comment": "Bump @fluentui/react-field to v9.0.0-beta.2",
14
+ "commit": "b48890859f5ce28fe12fd40f6bda26ed486c5e47"
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@fluentui/react-select",
19
+ "comment": "Bump @fluentui/react-utilities to v9.7.4",
20
+ "commit": "b48890859f5ce28fe12fd40f6bda26ed486c5e47"
21
+ }
22
+ ]
23
+ }
24
+ },
25
+ {
26
+ "date": "Fri, 07 Apr 2023 00:01:41 GMT",
27
+ "tag": "@fluentui/react-select_v9.1.8",
28
+ "version": "9.1.8",
29
+ "comments": {
30
+ "patch": [
31
+ {
32
+ "author": "behowell@microsoft.com",
33
+ "package": "@fluentui/react-select",
34
+ "commit": "5a8d7a29645b3b500eb7145d2e42ac34fcafc4c6",
35
+ "comment": "chore: Hook up FieldContext for use inside a Field"
36
+ },
37
+ {
38
+ "author": "behowell@microsoft.com",
39
+ "package": "@fluentui/react-select",
40
+ "commit": "eee5716e76dc6a5bef9316546a352694bbe5750a",
41
+ "comment": "chore: Update package version of react-field"
42
+ },
43
+ {
44
+ "author": "beachball",
45
+ "package": "@fluentui/react-select",
46
+ "comment": "Bump @fluentui/react-field to v9.0.0-beta.1",
47
+ "commit": "7a46cab3d31a233b89b7188e994b24712af5393c"
48
+ }
49
+ ]
50
+ }
51
+ },
52
+ {
53
+ "date": "Tue, 04 Apr 2023 18:44:50 GMT",
6
54
  "tag": "@fluentui/react-select_v9.1.7",
7
55
  "version": "9.1.7",
8
56
  "comments": {
@@ -11,13 +59,13 @@
11
59
  "author": "beachball",
12
60
  "package": "@fluentui/react-select",
13
61
  "comment": "Bump @fluentui/react-field to v9.0.0-alpha.29",
14
- "commit": "37a3a6eda1fd41086edd99a0b1560a8740f8c6c5"
62
+ "commit": "6778d76bbbad7e1975c151c797f28c2708cde2ce"
15
63
  },
16
64
  {
17
65
  "author": "beachball",
18
66
  "package": "@fluentui/react-select",
19
67
  "comment": "Bump @fluentui/react-utilities to v9.7.3",
20
- "commit": "37a3a6eda1fd41086edd99a0b1560a8740f8c6c5"
68
+ "commit": "6778d76bbbad7e1975c151c797f28c2708cde2ce"
21
69
  }
22
70
  ]
23
71
  }
package/CHANGELOG.md CHANGED
@@ -1,18 +1,39 @@
1
1
  # Change Log - @fluentui/react-select
2
2
 
3
- This log was last generated on Tue, 04 Apr 2023 18:42:19 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 12 Apr 2023 09:28:17 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.1.9](https://github.com/microsoft/fluentui/tree/@fluentui/react-select_v9.1.9)
8
+
9
+ Wed, 12 Apr 2023 09:28:17 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-select_v9.1.8..@fluentui/react-select_v9.1.9)
11
+
12
+ ### Patches
13
+
14
+ - Bump @fluentui/react-field to v9.0.0-beta.2 ([commit](https://github.com/microsoft/fluentui/commit/b48890859f5ce28fe12fd40f6bda26ed486c5e47) by beachball)
15
+ - Bump @fluentui/react-utilities to v9.7.4 ([commit](https://github.com/microsoft/fluentui/commit/b48890859f5ce28fe12fd40f6bda26ed486c5e47) by beachball)
16
+
17
+ ## [9.1.8](https://github.com/microsoft/fluentui/tree/@fluentui/react-select_v9.1.8)
18
+
19
+ Fri, 07 Apr 2023 00:01:41 GMT
20
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-select_v9.1.7..@fluentui/react-select_v9.1.8)
21
+
22
+ ### Patches
23
+
24
+ - chore: Hook up FieldContext for use inside a Field ([PR #27399](https://github.com/microsoft/fluentui/pull/27399) by behowell@microsoft.com)
25
+ - chore: Update package version of react-field ([PR #27458](https://github.com/microsoft/fluentui/pull/27458) by behowell@microsoft.com)
26
+ - Bump @fluentui/react-field to v9.0.0-beta.1 ([PR #27420](https://github.com/microsoft/fluentui/pull/27420) by beachball)
27
+
7
28
  ## [9.1.7](https://github.com/microsoft/fluentui/tree/@fluentui/react-select_v9.1.7)
8
29
 
9
- Tue, 04 Apr 2023 18:42:19 GMT
30
+ Tue, 04 Apr 2023 18:44:50 GMT
10
31
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-select_v9.1.6..@fluentui/react-select_v9.1.7)
11
32
 
12
33
  ### Patches
13
34
 
14
- - Bump @fluentui/react-field to v9.0.0-alpha.29 ([PR #27430](https://github.com/microsoft/fluentui/pull/27430) by beachball)
15
- - Bump @fluentui/react-utilities to v9.7.3 ([PR #27430](https://github.com/microsoft/fluentui/pull/27430) by beachball)
35
+ - Bump @fluentui/react-field to v9.0.0-alpha.29 ([PR #27434](https://github.com/microsoft/fluentui/pull/27434) by beachball)
36
+ - Bump @fluentui/react-utilities to v9.7.3 ([PR #27434](https://github.com/microsoft/fluentui/pull/27434) by beachball)
16
37
 
17
38
  ## [9.1.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-select_v9.1.5)
18
39
 
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import { useFieldControlProps_unstable } from '@fluentui/react-field';
2
3
  import { getPartitionedNativeProps, resolveShorthand, useEventCallback } from '@fluentui/react-utilities';
3
4
  import { ChevronDownRegular } from '@fluentui/react-icons';
4
5
  import { useOverrides_unstable as useOverrides } from '@fluentui/react-shared-contexts';
@@ -12,6 +13,12 @@ import { useOverrides_unstable as useOverrides } from '@fluentui/react-shared-co
12
13
  * @param ref - reference to the `<select>` element in Select
13
14
  */
14
15
  export const useSelect_unstable = (props, ref) => {
16
+ // Merge props from surrounding <Field>, if any
17
+ props = useFieldControlProps_unstable(props, {
18
+ supportsLabelFor: true,
19
+ supportsRequired: true,
20
+ supportsSize: true
21
+ });
15
22
  const overrides = useOverrides();
16
23
  var _overrides_inputDefaultAppearance;
17
24
  const {
@@ -1 +1 @@
1
- {"version":3,"names":["React","getPartitionedNativeProps","resolveShorthand","useEventCallback","ChevronDownRegular","useOverrides_unstable","useOverrides","useSelect_unstable","props","ref","overrides","_overrides_inputDefaultAppearance","defaultValue","value","select","icon","root","appearance","inputDefaultAppearance","onChange","size","nativeProps","primarySlotTagName","excludedPropNames","state","components","required","defaultProps","primary","children","createElement","event","target"],"sources":["../../../src/components/Select/useSelect.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getPartitionedNativeProps, resolveShorthand, useEventCallback } 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 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: resolveShorthand(select, {\n required: true,\n defaultProps: {\n defaultValue,\n value,\n ref,\n ...nativeProps.primary,\n },\n }),\n icon: resolveShorthand(icon, {\n required: true,\n defaultProps: { children: <ChevronDownRegular /> },\n }),\n root: resolveShorthand(root, {\n required: true,\n defaultProps: nativeProps.root,\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"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,yBAAyB,EAAEC,gBAAgB,EAAEC,gBAAgB,QAAQ;AAC9E,SAASC,kBAAkB,QAAQ;AAEnC,SAASC,qBAAA,IAAyBC,YAAY,QAAQ;AAEtD;;;;;;;;;AASA,OAAO,MAAMC,kBAAA,GAAqBA,CAACC,KAAA,EAAoBC,GAAA,KAAmD;EACxG,MAAMC,SAAA,GAAYJ,YAAA;MAQHK,iCAAA;EANf,MAAM;IACJC,YAAA;IACAC,KAAA;IACAC,MAAA;IACAC,IAAA;IACAC,IAAA;IACAC,UAAA,GAAa,CAAAN,iCAAA,GAAAD,SAAA,CAAUQ,sBAAsB,cAAhCP,iCAAA,cAAAA,iCAAA,GAAoC,SAAS;IAE1DQ,QAAA;IACAC,IAAA,GAAO;EAAQ,CAChB,GAAGZ,KAAA;EAEJ,MAAMa,WAAA,GAAcpB,yBAAA,CAA0B;IAC5CO,KAAA;IACAc,kBAAA,EAAoB;IACpBC,iBAAA,EAAmB,CAAC,cAAc,gBAAgB,YAAY,QAAQ;EACxE;EAEA,MAAMC,KAAA,GAAqB;IACzBJ,IAAA;IACAH,UAAA;IACAQ,UAAA,EAAY;MACVT,IAAA,EAAM;MACNF,MAAA,EAAQ;MACRC,IAAA,EAAM;IACR;IACAD,MAAA,EAAQZ,gBAAA,CAAiBY,MAAA,EAAQ;MAC/BY,QAAA,EAAU,IAAI;MACdC,YAAA,EAAc;QACZf,YAAA;QACAC,KAAA;QACAJ,GAAA;QACA,GAAGY,WAAA,CAAYO;MACjB;IACF;IACAb,IAAA,EAAMb,gBAAA,CAAiBa,IAAA,EAAM;MAC3BW,QAAA,EAAU,IAAI;MACdC,YAAA,EAAc;QAAEE,QAAA,eAAU7B,KAAA,CAAA8B,aAAA,CAAC1B,kBAAA;MAAsB;IACnD;IACAY,IAAA,EAAMd,gBAAA,CAAiBc,IAAA,EAAM;MAC3BU,QAAA,EAAU,IAAI;MACdC,YAAA,EAAcN,WAAA,CAAYL;IAC5B;EACF;EAEAQ,KAAA,CAAMV,MAAM,CAACK,QAAQ,GAAGhB,gBAAA,CAAiB4B,KAAA,IAAS;IAChDZ,QAAA,aAAAA,QAAA,uBAAAA,QAAA,CAAWY,KAAA,EAAO;MAAElB,KAAA,EAAOkB,KAAC,CAAMC,MAAM,CAAuBnB;IAAM;EACvE;EAEA,OAAOW,KAAA;AACT"}
1
+ {"version":3,"names":["React","useFieldControlProps_unstable","getPartitionedNativeProps","resolveShorthand","useEventCallback","ChevronDownRegular","useOverrides_unstable","useOverrides","useSelect_unstable","props","ref","supportsLabelFor","supportsRequired","supportsSize","overrides","_overrides_inputDefaultAppearance","defaultValue","value","select","icon","root","appearance","inputDefaultAppearance","onChange","size","nativeProps","primarySlotTagName","excludedPropNames","state","components","required","defaultProps","primary","children","createElement","event","target"],"sources":["../../../src/components/Select/useSelect.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useFieldControlProps_unstable } from '@fluentui/react-field';\nimport { getPartitionedNativeProps, resolveShorthand, useEventCallback } 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: resolveShorthand(select, {\n required: true,\n defaultProps: {\n defaultValue,\n value,\n ref,\n ...nativeProps.primary,\n },\n }),\n icon: resolveShorthand(icon, {\n required: true,\n defaultProps: { children: <ChevronDownRegular /> },\n }),\n root: resolveShorthand(root, {\n required: true,\n defaultProps: nativeProps.root,\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"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,6BAA6B,QAAQ;AAC9C,SAASC,yBAAyB,EAAEC,gBAAgB,EAAEC,gBAAgB,QAAQ;AAC9E,SAASC,kBAAkB,QAAQ;AAEnC,SAASC,qBAAA,IAAyBC,YAAY,QAAQ;AAEtD;;;;;;;;;AASA,OAAO,MAAMC,kBAAA,GAAqBA,CAACC,KAAA,EAAoBC,GAAA,KAAmD;EACxG;EACAD,KAAA,GAAQR,6BAAA,CAA8BQ,KAAA,EAAO;IAAEE,gBAAA,EAAkB,IAAI;IAAEC,gBAAA,EAAkB,IAAI;IAAEC,YAAA,EAAc;EAAK;EAElH,MAAMC,SAAA,GAAYP,YAAA;MAQHQ,iCAAA;EANf,MAAM;IACJC,YAAA;IACAC,KAAA;IACAC,MAAA;IACAC,IAAA;IACAC,IAAA;IACAC,UAAA,GAAa,CAAAN,iCAAA,GAAAD,SAAA,CAAUQ,sBAAsB,cAAhCP,iCAAA,cAAAA,iCAAA,GAAoC,SAAS;IAE1DQ,QAAA;IACAC,IAAA,GAAO;EAAQ,CAChB,GAAGf,KAAA;EAEJ,MAAMgB,WAAA,GAAcvB,yBAAA,CAA0B;IAC5CO,KAAA;IACAiB,kBAAA,EAAoB;IACpBC,iBAAA,EAAmB,CAAC,cAAc,gBAAgB,YAAY,QAAQ;EACxE;EAEA,MAAMC,KAAA,GAAqB;IACzBJ,IAAA;IACAH,UAAA;IACAQ,UAAA,EAAY;MACVT,IAAA,EAAM;MACNF,MAAA,EAAQ;MACRC,IAAA,EAAM;IACR;IACAD,MAAA,EAAQf,gBAAA,CAAiBe,MAAA,EAAQ;MAC/BY,QAAA,EAAU,IAAI;MACdC,YAAA,EAAc;QACZf,YAAA;QACAC,KAAA;QACAP,GAAA;QACA,GAAGe,WAAA,CAAYO;MACjB;IACF;IACAb,IAAA,EAAMhB,gBAAA,CAAiBgB,IAAA,EAAM;MAC3BW,QAAA,EAAU,IAAI;MACdC,YAAA,EAAc;QAAEE,QAAA,eAAUjC,KAAA,CAAAkC,aAAA,CAAC7B,kBAAA;MAAsB;IACnD;IACAe,IAAA,EAAMjB,gBAAA,CAAiBiB,IAAA,EAAM;MAC3BU,QAAA,EAAU,IAAI;MACdC,YAAA,EAAcN,WAAA,CAAYL;IAC5B;EACF;EAEAQ,KAAA,CAAMV,MAAM,CAACK,QAAQ,GAAGnB,gBAAA,CAAiB+B,KAAA,IAAS;IAChDZ,QAAA,aAAAA,QAAA,uBAAAA,QAAA,CAAWY,KAAA,EAAO;MAAElB,KAAA,EAAOkB,KAAC,CAAMC,MAAM,CAAuBnB;IAAM;EACvE;EAEA,OAAOW,KAAA;AACT"}
@@ -8,10 +8,17 @@ Object.defineProperty(exports, "useSelect_unstable", {
8
8
  });
9
9
  const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
10
  const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _reactField = require("@fluentui/react-field");
11
12
  const _reactUtilities = require("@fluentui/react-utilities");
12
13
  const _reactIcons = require("@fluentui/react-icons");
13
14
  const _reactSharedContexts = require("@fluentui/react-shared-contexts");
14
15
  const useSelect_unstable = (props, ref)=>{
16
+ // Merge props from surrounding <Field>, if any
17
+ props = (0, _reactField.useFieldControlProps_unstable)(props, {
18
+ supportsLabelFor: true,
19
+ supportsRequired: true,
20
+ supportsSize: true
21
+ });
15
22
  const overrides = (0, _reactSharedContexts.useOverrides_unstable)();
16
23
  var _overrides_inputDefaultAppearance;
17
24
  const { defaultValue , value , select , icon , root , appearance =(_overrides_inputDefaultAppearance = overrides.inputDefaultAppearance) !== null && _overrides_inputDefaultAppearance !== void 0 ? _overrides_inputDefaultAppearance : 'outline' , onChange , size ='medium' } = props;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/Select/useSelect.js"],"sourcesContent":["import * as React from 'react';\nimport { getPartitionedNativeProps, resolveShorthand, useEventCallback } 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 */\nexport const useSelect_unstable = (props, ref) => {\n const overrides = useOverrides();\n var _overrides_inputDefaultAppearance;\n const {\n defaultValue,\n value,\n select,\n icon,\n root,\n appearance = (_overrides_inputDefaultAppearance = overrides.inputDefaultAppearance) !== null && _overrides_inputDefaultAppearance !== void 0 ? _overrides_inputDefaultAppearance : 'outline',\n onChange,\n size = 'medium'\n } = props;\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'select',\n excludedPropNames: ['appearance', 'defaultValue', 'onChange', 'size', 'value']\n });\n const state = {\n size,\n appearance,\n components: {\n root: 'span',\n select: 'select',\n icon: 'span'\n },\n select: resolveShorthand(select, {\n required: true,\n defaultProps: {\n defaultValue,\n value,\n ref,\n ...nativeProps.primary\n }\n }),\n icon: resolveShorthand(icon, {\n required: true,\n defaultProps: {\n children: /*#__PURE__*/React.createElement(ChevronDownRegular, null)\n }\n }),\n root: resolveShorthand(root, {\n required: true,\n defaultProps: nativeProps.root\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//# sourceMappingURL=useSelect.js.map"],"names":["useSelect_unstable","props","ref","overrides","useOverrides","_overrides_inputDefaultAppearance","defaultValue","value","select","icon","root","appearance","inputDefaultAppearance","onChange","size","nativeProps","getPartitionedNativeProps","primarySlotTagName","excludedPropNames","state","components","resolveShorthand","required","defaultProps","primary","children","React","createElement","ChevronDownRegular","useEventCallback","event","target"],"mappings":";;;;+BAaaA;;aAAAA;;;6DAbU;gCACuD;4BAC3C;qCACmB;AAU/C,MAAMA,qBAAqB,CAACC,OAAOC,MAAQ;IAChD,MAAMC,YAAYC,IAAAA,0CAAY;IAC9B,IAAIC;IACJ,MAAM,EACJC,aAAY,EACZC,MAAK,EACLC,OAAM,EACNC,KAAI,EACJC,KAAI,EACJC,YAAa,AAACN,CAAAA,oCAAoCF,UAAUS,sBAAsB,AAAD,MAAO,IAAI,IAAIP,sCAAsC,KAAK,IAAIA,oCAAoC,SAAS,CAAA,EAC5LQ,SAAQ,EACRC,MAAO,SAAQ,EAChB,GAAGb;IACJ,MAAMc,cAAcC,IAAAA,yCAAyB,EAAC;QAC5Cf;QACAgB,oBAAoB;QACpBC,mBAAmB;YAAC;YAAc;YAAgB;YAAY;YAAQ;SAAQ;IAChF;IACA,MAAMC,QAAQ;QACZL;QACAH;QACAS,YAAY;YACVV,MAAM;YACNF,QAAQ;YACRC,MAAM;QACR;QACAD,QAAQa,IAAAA,gCAAgB,EAACb,QAAQ;YAC/Bc,UAAU,IAAI;YACdC,cAAc;gBACZjB;gBACAC;gBACAL;gBACA,GAAGa,YAAYS,OAAO;YACxB;QACF;QACAf,MAAMY,IAAAA,gCAAgB,EAACZ,MAAM;YAC3Ba,UAAU,IAAI;YACdC,cAAc;gBACZE,UAAU,WAAW,GAAEC,OAAMC,aAAa,CAACC,8BAAkB,EAAE,IAAI;YACrE;QACF;QACAlB,MAAMW,IAAAA,gCAAgB,EAACX,MAAM;YAC3BY,UAAU,IAAI;YACdC,cAAcR,YAAYL,IAAI;QAChC;IACF;IACAS,MAAMX,MAAM,CAACK,QAAQ,GAAGgB,IAAAA,gCAAgB,EAACC,CAAAA,QAAS;QAChDjB,aAAa,IAAI,IAAIA,aAAa,KAAK,IAAI,KAAK,IAAIA,SAASiB,OAAO;YAClEvB,OAAOuB,MAAMC,MAAM,CAACxB,KAAK;QAC3B,EAAE;IACJ;IACA,OAAOY;AACT,GACA,qCAAqC"}
1
+ {"version":3,"sources":["../../../lib/components/Select/useSelect.js"],"sourcesContent":["import * as React from 'react';\nimport { useFieldControlProps_unstable } from '@fluentui/react-field';\nimport { getPartitionedNativeProps, resolveShorthand, useEventCallback } 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 */\nexport 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 {\n defaultValue,\n value,\n select,\n icon,\n root,\n appearance = (_overrides_inputDefaultAppearance = overrides.inputDefaultAppearance) !== null && _overrides_inputDefaultAppearance !== void 0 ? _overrides_inputDefaultAppearance : 'outline',\n onChange,\n size = 'medium'\n } = props;\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'select',\n excludedPropNames: ['appearance', 'defaultValue', 'onChange', 'size', 'value']\n });\n const state = {\n size,\n appearance,\n components: {\n root: 'span',\n select: 'select',\n icon: 'span'\n },\n select: resolveShorthand(select, {\n required: true,\n defaultProps: {\n defaultValue,\n value,\n ref,\n ...nativeProps.primary\n }\n }),\n icon: resolveShorthand(icon, {\n required: true,\n defaultProps: {\n children: /*#__PURE__*/React.createElement(ChevronDownRegular, null)\n }\n }),\n root: resolveShorthand(root, {\n required: true,\n defaultProps: nativeProps.root\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//# sourceMappingURL=useSelect.js.map"],"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","resolveShorthand","required","defaultProps","primary","children","React","createElement","ChevronDownRegular","useEventCallback","event","target"],"mappings":";;;;+BAcaA;;aAAAA;;;6DAdU;4BACuB;gCACgC;4BAC3C;qCACmB;AAU/C,MAAMA,qBAAqB,CAACC,OAAOC,MAAQ;IAChD,+CAA+C;IAC/CD,QAAQE,IAAAA,yCAA6B,EAACF,OAAO;QAC3CG,kBAAkB,IAAI;QACtBC,kBAAkB,IAAI;QACtBC,cAAc,IAAI;IACpB;IACA,MAAMC,YAAYC,IAAAA,0CAAY;IAC9B,IAAIC;IACJ,MAAM,EACJC,aAAY,EACZC,MAAK,EACLC,OAAM,EACNC,KAAI,EACJC,KAAI,EACJC,YAAa,AAACN,CAAAA,oCAAoCF,UAAUS,sBAAsB,AAAD,MAAO,IAAI,IAAIP,sCAAsC,KAAK,IAAIA,oCAAoC,SAAS,CAAA,EAC5LQ,SAAQ,EACRC,MAAO,SAAQ,EAChB,GAAGjB;IACJ,MAAMkB,cAAcC,IAAAA,yCAAyB,EAAC;QAC5CnB;QACAoB,oBAAoB;QACpBC,mBAAmB;YAAC;YAAc;YAAgB;YAAY;YAAQ;SAAQ;IAChF;IACA,MAAMC,QAAQ;QACZL;QACAH;QACAS,YAAY;YACVV,MAAM;YACNF,QAAQ;YACRC,MAAM;QACR;QACAD,QAAQa,IAAAA,gCAAgB,EAACb,QAAQ;YAC/Bc,UAAU,IAAI;YACdC,cAAc;gBACZjB;gBACAC;gBACAT;gBACA,GAAGiB,YAAYS,OAAO;YACxB;QACF;QACAf,MAAMY,IAAAA,gCAAgB,EAACZ,MAAM;YAC3Ba,UAAU,IAAI;YACdC,cAAc;gBACZE,UAAU,WAAW,GAAEC,OAAMC,aAAa,CAACC,8BAAkB,EAAE,IAAI;YACrE;QACF;QACAlB,MAAMW,IAAAA,gCAAgB,EAACX,MAAM;YAC3BY,UAAU,IAAI;YACdC,cAAcR,YAAYL,IAAI;QAChC;IACF;IACAS,MAAMX,MAAM,CAACK,QAAQ,GAAGgB,IAAAA,gCAAgB,EAACC,CAAAA,QAAS;QAChDjB,aAAa,IAAI,IAAIA,aAAa,KAAK,IAAI,KAAK,IAAIA,SAASiB,OAAO;YAClEvB,OAAOuB,MAAMC,MAAM,CAACxB,KAAK;QAC3B,EAAE;IACJ;IACA,OAAOY;AACT,GACA,qCAAqC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-select",
3
- "version": "9.1.7",
3
+ "version": "9.1.9",
4
4
  "description": "Fluent UI React Select component",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -32,11 +32,11 @@
32
32
  "@fluentui/scripts-tasks": "*"
33
33
  },
34
34
  "dependencies": {
35
- "@fluentui/react-field": "9.0.0-alpha.29",
35
+ "@fluentui/react-field": "9.0.0-beta.2",
36
36
  "@fluentui/react-icons": "^2.0.196",
37
37
  "@fluentui/react-shared-contexts": "^9.3.3",
38
38
  "@fluentui/react-theme": "^9.1.7",
39
- "@fluentui/react-utilities": "^9.7.3",
39
+ "@fluentui/react-utilities": "^9.7.4",
40
40
  "@griffel/react": "^1.5.2",
41
41
  "@swc/helpers": "^0.4.14"
42
42
  },