@fluentui/react-select 0.0.0-nightly-20220616-0419.1 → 0.0.0-nightly-20220621-0418.1

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,11 +2,17 @@
2
2
  "name": "@fluentui/react-select",
3
3
  "entries": [
4
4
  {
5
- "date": "Thu, 16 Jun 2022 04:33:51 GMT",
6
- "tag": "@fluentui/react-select_v0.0.0-nightly-20220616-0419.1",
7
- "version": "0.0.0-nightly-20220616-0419.1",
5
+ "date": "Tue, 21 Jun 2022 04:30:11 GMT",
6
+ "tag": "@fluentui/react-select_v0.0.0-nightly-20220621-0418.1",
7
+ "version": "0.0.0-nightly-20220621-0418.1",
8
8
  "comments": {
9
9
  "prerelease": [
10
+ {
11
+ "author": "olfedias@microsoft.com",
12
+ "package": "@fluentui/react-select",
13
+ "commit": "aa6ff59c3664e5e29402debcc1a4d4a65a8e65c1",
14
+ "comment": "fix: handle \"defaultValue\""
15
+ },
10
16
  {
11
17
  "author": "olfedias@microsoft.com",
12
18
  "package": "@fluentui/react-select",
@@ -34,8 +40,8 @@
34
40
  {
35
41
  "author": "beachball",
36
42
  "package": "@fluentui/react-select",
37
- "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20220616-0419.1",
38
- "commit": "7df7f4212738a33683eca9068e0ddb3aec5fda16"
43
+ "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20220621-0418.1",
44
+ "commit": "20a6af73552945512cd13938d9f74b329961711c"
39
45
  }
40
46
  ]
41
47
  }
package/CHANGELOG.md CHANGED
@@ -1,21 +1,22 @@
1
1
  # Change Log - @fluentui/react-select
2
2
 
3
- This log was last generated on Thu, 16 Jun 2022 04:33:51 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 21 Jun 2022 04:30:11 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## [0.0.0-nightly-20220616-0419.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-select_v0.0.0-nightly-20220616-0419.1)
7
+ ## [0.0.0-nightly-20220621-0418.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-select_v0.0.0-nightly-20220621-0418.1)
8
8
 
9
- Thu, 16 Jun 2022 04:33:51 GMT
10
- [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-select_v9.0.0-beta.2..@fluentui/react-select_v0.0.0-nightly-20220616-0419.1)
9
+ Tue, 21 Jun 2022 04:30:11 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-select_v9.0.0-beta.2..@fluentui/react-select_v0.0.0-nightly-20220621-0418.1)
11
11
 
12
12
  ### Changes
13
13
 
14
+ - fix: handle "defaultValue" ([PR #23463](https://github.com/microsoft/fluentui/pull/23463) by olfedias@microsoft.com)
14
15
  - chore: Update @fluentui/react-icons to latest version ([PR #23459](https://github.com/microsoft/fluentui/pull/23459) by olfedias@microsoft.com)
15
16
  - chore: Using ::before and ::after instead of :before and :after. ([PR #23469](https://github.com/microsoft/fluentui/pull/23469) by Humberto.Morimoto@microsoft.com)
16
17
  - add custom onChange with value data to react-select ([PR #23399](https://github.com/microsoft/fluentui/pull/23399) by sarah.higley@microsoft.com)
17
18
  - Remove inline prop from Select ([PR #23416](https://github.com/microsoft/fluentui/pull/23416) by sarah.higley@microsoft.com)
18
- - Bump @fluentui/react-utilities to v0.0.0-nightly-20220616-0419.1 ([commit](https://github.com/microsoft/fluentui/commit/7df7f4212738a33683eca9068e0ddb3aec5fda16) by beachball)
19
+ - Bump @fluentui/react-utilities to v0.0.0-nightly-20220621-0418.1 ([commit](https://github.com/microsoft/fluentui/commit/20a6af73552945512cd13938d9f74b329961711c) by beachball)
19
20
 
20
21
  ## [9.0.0-beta.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-select_v9.0.0-beta.2)
21
22
 
@@ -13,6 +13,8 @@ import { ChevronDownRegular } from '@fluentui/react-icons';
13
13
 
14
14
  export const useSelect_unstable = (props, ref) => {
15
15
  const {
16
+ defaultValue,
17
+ value,
16
18
  select,
17
19
  icon,
18
20
  root,
@@ -23,7 +25,7 @@ export const useSelect_unstable = (props, ref) => {
23
25
  const nativeProps = getPartitionedNativeProps({
24
26
  props,
25
27
  primarySlotTagName: 'select',
26
- excludedPropNames: ['appearance', 'onChange', 'size']
28
+ excludedPropNames: ['appearance', 'defaultValue', 'onChange', 'size', 'value']
27
29
  });
28
30
  const state = {
29
31
  size,
@@ -36,6 +38,8 @@ export const useSelect_unstable = (props, ref) => {
36
38
  select: resolveShorthand(select, {
37
39
  required: true,
38
40
  defaultProps: {
41
+ defaultValue,
42
+ value,
39
43
  ref,
40
44
  ...nativeProps.primary
41
45
  }
@@ -52,9 +56,8 @@ export const useSelect_unstable = (props, ref) => {
52
56
  })
53
57
  };
54
58
  state.select.onChange = useEventCallback(event => {
55
- const value = event.target.value;
56
59
  onChange === null || onChange === void 0 ? void 0 : onChange(event, {
57
- value
60
+ value: event.target.value
58
61
  });
59
62
  });
60
63
  return state;
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Select/useSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,yBAAT,EAAoC,gBAApC,EAAsD,gBAAtD,QAA8E,2BAA9E;AACA,SAAS,kBAAT,QAAmC,uBAAnC;AAGA;;;;;;;;AAQG;;AACH,OAAO,MAAM,kBAAkB,GAAG,CAAC,KAAD,EAAqB,GAArB,KAAuE;EACvG,MAAM;IAAE,MAAF;IAAU,IAAV;IAAgB,IAAhB;IAAsB,UAAU,GAAG,SAAnC;IAA8C,QAA9C;IAAwD,IAAI,GAAG;EAA/D,IAA4E,KAAlF;EAEA,MAAM,WAAW,GAAG,yBAAyB,CAAC;IAC5C,KAD4C;IAE5C,kBAAkB,EAAE,QAFwB;IAG5C,iBAAiB,EAAE,CAAC,YAAD,EAAe,UAAf,EAA2B,MAA3B;EAHyB,CAAD,CAA7C;EAMA,MAAM,KAAK,GAAgB;IACzB,IADyB;IAEzB,UAFyB;IAGzB,UAAU,EAAE;MACV,IAAI,EAAE,MADI;MAEV,MAAM,EAAE,QAFE;MAGV,IAAI,EAAE;IAHI,CAHa;IAQzB,MAAM,EAAE,gBAAgB,CAAC,MAAD,EAAS;MAC/B,QAAQ,EAAE,IADqB;MAE/B,YAAY,EAAE;QACZ,GADY;QAEZ,GAAG,WAAW,CAAC;MAFH;IAFiB,CAAT,CARC;IAezB,IAAI,EAAE,gBAAgB,CAAC,IAAD,EAAO;MAC3B,QAAQ,EAAE,IADiB;MAE3B,YAAY,EAAE;QAAE,QAAQ,eAAE,KAAA,CAAA,aAAA,CAAC,kBAAD,EAAmB,IAAnB;MAAZ;IAFa,CAAP,CAfG;IAmBzB,IAAI,EAAE,gBAAgB,CAAC,IAAD,EAAO;MAC3B,QAAQ,EAAE,IADiB;MAE3B,YAAY,EAAE,WAAW,CAAC;IAFC,CAAP;EAnBG,CAA3B;EAyBA,KAAK,CAAC,MAAN,CAAa,QAAb,GAAwB,gBAAgB,CAAC,KAAK,IAAG;IAC/C,MAAM,KAAK,GAAI,KAAK,CAAC,MAAN,CAAmC,KAAlD;IACA,QAAQ,KAAA,IAAR,IAAA,QAAQ,KAAA,KAAA,CAAR,GAAQ,KAAA,CAAR,GAAA,QAAQ,CAAG,KAAH,EAAU;MAAE;IAAF,CAAV,CAAR;EACD,CAHuC,CAAxC;EAKA,OAAO,KAAP;AACD,CAxCM","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';\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 { select, icon, root, appearance = 'outline', onChange, size = 'medium' } = props;\n\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'select',\n excludedPropNames: ['appearance', 'onChange', 'size'],\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 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 const value = (event.target as HTMLSelectElement).value;\n onChange?.(event, { value });\n });\n\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["components/Select/useSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,yBAAT,EAAoC,gBAApC,EAAsD,gBAAtD,QAA8E,2BAA9E;AACA,SAAS,kBAAT,QAAmC,uBAAnC;AAGA;;;;;;;;AAQG;;AACH,OAAO,MAAM,kBAAkB,GAAG,CAAC,KAAD,EAAqB,GAArB,KAAuE;EACvG,MAAM;IACJ,YADI;IAEJ,KAFI;IAGJ,MAHI;IAIJ,IAJI;IAKJ,IALI;IAMJ,UAAU,GAAG,SANT;IAQJ,QARI;IASJ,IAAI,GAAG;EATH,IAUF,KAVJ;EAYA,MAAM,WAAW,GAAG,yBAAyB,CAAC;IAC5C,KAD4C;IAE5C,kBAAkB,EAAE,QAFwB;IAG5C,iBAAiB,EAAE,CAAC,YAAD,EAAe,cAAf,EAA+B,UAA/B,EAA2C,MAA3C,EAAmD,OAAnD;EAHyB,CAAD,CAA7C;EAMA,MAAM,KAAK,GAAgB;IACzB,IADyB;IAEzB,UAFyB;IAGzB,UAAU,EAAE;MACV,IAAI,EAAE,MADI;MAEV,MAAM,EAAE,QAFE;MAGV,IAAI,EAAE;IAHI,CAHa;IAQzB,MAAM,EAAE,gBAAgB,CAAC,MAAD,EAAS;MAC/B,QAAQ,EAAE,IADqB;MAE/B,YAAY,EAAE;QACZ,YADY;QAEZ,KAFY;QAGZ,GAHY;QAIZ,GAAG,WAAW,CAAC;MAJH;IAFiB,CAAT,CARC;IAiBzB,IAAI,EAAE,gBAAgB,CAAC,IAAD,EAAO;MAC3B,QAAQ,EAAE,IADiB;MAE3B,YAAY,EAAE;QAAE,QAAQ,eAAE,KAAA,CAAA,aAAA,CAAC,kBAAD,EAAmB,IAAnB;MAAZ;IAFa,CAAP,CAjBG;IAqBzB,IAAI,EAAE,gBAAgB,CAAC,IAAD,EAAO;MAC3B,QAAQ,EAAE,IADiB;MAE3B,YAAY,EAAE,WAAW,CAAC;IAFC,CAAP;EArBG,CAA3B;EA2BA,KAAK,CAAC,MAAN,CAAa,QAAb,GAAwB,gBAAgB,CAAC,KAAK,IAAG;IAC/C,QAAQ,KAAA,IAAR,IAAA,QAAQ,KAAA,KAAA,CAAR,GAAQ,KAAA,CAAR,GAAA,QAAQ,CAAG,KAAH,EAAU;MAAE,KAAK,EAAG,KAAK,CAAC,MAAN,CAAmC;IAA7C,CAAV,CAAR;EACD,CAFuC,CAAxC;EAIA,OAAO,KAAP;AACD,CAnDM","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';\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 {\n defaultValue,\n value,\n select,\n icon,\n root,\n appearance = '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"],"sourceRoot":"../src/"}
@@ -23,6 +23,8 @@ const react_icons_1 = /*#__PURE__*/require("@fluentui/react-icons");
23
23
 
24
24
  const useSelect_unstable = (props, ref) => {
25
25
  const {
26
+ defaultValue,
27
+ value,
26
28
  select,
27
29
  icon,
28
30
  root,
@@ -33,7 +35,7 @@ const useSelect_unstable = (props, ref) => {
33
35
  const nativeProps = react_utilities_1.getPartitionedNativeProps({
34
36
  props,
35
37
  primarySlotTagName: 'select',
36
- excludedPropNames: ['appearance', 'onChange', 'size']
38
+ excludedPropNames: ['appearance', 'defaultValue', 'onChange', 'size', 'value']
37
39
  });
38
40
  const state = {
39
41
  size,
@@ -46,6 +48,8 @@ const useSelect_unstable = (props, ref) => {
46
48
  select: react_utilities_1.resolveShorthand(select, {
47
49
  required: true,
48
50
  defaultProps: {
51
+ defaultValue,
52
+ value,
49
53
  ref,
50
54
  ...nativeProps.primary
51
55
  }
@@ -62,9 +66,8 @@ const useSelect_unstable = (props, ref) => {
62
66
  })
63
67
  };
64
68
  state.select.onChange = react_utilities_1.useEventCallback(event => {
65
- const value = event.target.value;
66
69
  onChange === null || onChange === void 0 ? void 0 : onChange(event, {
67
- value
70
+ value: event.target.value
68
71
  });
69
72
  });
70
73
  return state;
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Select/useSelect.tsx"],"names":[],"mappings":";;;;;;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AAC,MAAN,CAAa,QAAb,GAAwB,iBAAA,CAAA,gBAAA,CAAiB,KAAK,IAAG;IAC/C,MAAM,KAAK,GAAI,KAAK,CAAC,MAAN,CAAmC,KAAlD;IACA,QAAQ,KAAA,IAAR,IAAA,QAAQ,KAAA,KAAA,CAAR,GAAQ,KAAA,CAAR,GAAA,QAAQ,CAAG,KAAH,EAAU;MAAE;IAAF,CAAV,CAAR;EACD,CAHuB,CAAxB;EAKA,OAAO,KAAP;AACD,CAxCM;;AAAM,OAAA,CAAA,kBAAA,GAAkB,kBAAlB","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';\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 { select, icon, root, appearance = 'outline', onChange, size = 'medium' } = props;\n\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'select',\n excludedPropNames: ['appearance', 'onChange', 'size'],\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 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 const value = (event.target as HTMLSelectElement).value;\n onChange?.(event, { value });\n });\n\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["components/Select/useSelect.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBA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,CAAC;IAFC,CAAvB;EArBmB,CAA3B;EA2BA,KAAK,CAAC,MAAN,CAAa,QAAb,GAAwB,iBAAA,CAAA,gBAAA,CAAiB,KAAK,IAAG;IAC/C,QAAQ,KAAA,IAAR,IAAA,QAAQ,KAAA,KAAA,CAAR,GAAQ,KAAA,CAAR,GAAA,QAAQ,CAAG,KAAH,EAAU;MAAE,KAAK,EAAG,KAAK,CAAC,MAAN,CAAmC;IAA7C,CAAV,CAAR;EACD,CAFuB,CAAxB;EAIA,OAAO,KAAP;AACD,CAnDM;;AAAM,OAAA,CAAA,kBAAA,GAAkB,kBAAlB","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';\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 {\n defaultValue,\n value,\n select,\n icon,\n root,\n appearance = '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"],"sourceRoot":"../src/"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-select",
3
- "version": "0.0.0-nightly-20220616-0419.1",
3
+ "version": "0.0.0-nightly-20220621-0418.1",
4
4
  "description": "Fluent UI React Select component",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -28,12 +28,12 @@
28
28
  "devDependencies": {
29
29
  "@fluentui/eslint-plugin": "*",
30
30
  "@fluentui/react-conformance": "*",
31
- "@fluentui/react-conformance-griffel": "0.0.0-nightly-20220616-0419.0"
31
+ "@fluentui/react-conformance-griffel": "0.0.0-nightly-20220621-0418.0"
32
32
  },
33
33
  "dependencies": {
34
34
  "@fluentui/react-icons": "^2.0.172-rc.8",
35
- "@fluentui/react-theme": "0.0.0-nightly-20220616-0419.0",
36
- "@fluentui/react-utilities": "0.0.0-nightly-20220616-0419.1",
35
+ "@fluentui/react-theme": "0.0.0-nightly-20220621-0418.0",
36
+ "@fluentui/react-utilities": "0.0.0-nightly-20220621-0418.1",
37
37
  "@griffel/react": "1.1.0",
38
38
  "tslib": "^2.1.0"
39
39
  },