@fluentui/react-select 0.0.0-nightly-20230404-0419.1 → 0.0.0-nightly-20230406-0417.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 +34 -13
- package/CHANGELOG.md +19 -9
- package/lib/components/Select/useSelect.js +7 -0
- package/lib/components/Select/useSelect.js.map +1 -1
- package/lib-commonjs/components/Select/useSelect.js +7 -0
- package/lib-commonjs/components/Select/useSelect.js.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.json
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"name": "@fluentui/react-select",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
6
|
-
"tag": "@fluentui/react-select_v0.0.0-nightly-
|
|
7
|
-
"version": "0.0.0-nightly-
|
|
5
|
+
"date": "Thu, 06 Apr 2023 04:23:51 GMT",
|
|
6
|
+
"tag": "@fluentui/react-select_v0.0.0-nightly-20230406-0417.1",
|
|
7
|
+
"version": "0.0.0-nightly-20230406-0417.1",
|
|
8
8
|
"comments": {
|
|
9
9
|
"prerelease": [
|
|
10
10
|
{
|
|
@@ -16,32 +16,53 @@
|
|
|
16
16
|
{
|
|
17
17
|
"author": "beachball",
|
|
18
18
|
"package": "@fluentui/react-select",
|
|
19
|
-
"comment": "Bump @fluentui/react-field to v0.0.0-nightly-
|
|
20
|
-
"commit": "
|
|
19
|
+
"comment": "Bump @fluentui/react-field to v0.0.0-nightly-20230406-0417.1",
|
|
20
|
+
"commit": "6b7f70ea7424a1cdc3c140ad7ce9da2f04850be3"
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
"author": "beachball",
|
|
24
24
|
"package": "@fluentui/react-select",
|
|
25
|
-
"comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-
|
|
26
|
-
"commit": "
|
|
25
|
+
"comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230406-0417.1",
|
|
26
|
+
"commit": "6b7f70ea7424a1cdc3c140ad7ce9da2f04850be3"
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
"author": "beachball",
|
|
30
30
|
"package": "@fluentui/react-select",
|
|
31
|
-
"comment": "Bump @fluentui/react-theme to v0.0.0-nightly-
|
|
32
|
-
"commit": "
|
|
31
|
+
"comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20230406-0417.1",
|
|
32
|
+
"commit": "6b7f70ea7424a1cdc3c140ad7ce9da2f04850be3"
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
"author": "beachball",
|
|
36
36
|
"package": "@fluentui/react-select",
|
|
37
|
-
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-
|
|
38
|
-
"commit": "
|
|
37
|
+
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20230406-0417.1",
|
|
38
|
+
"commit": "6b7f70ea7424a1cdc3c140ad7ce9da2f04850be3"
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
"author": "beachball",
|
|
42
42
|
"package": "@fluentui/react-select",
|
|
43
|
-
"comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-
|
|
44
|
-
"commit": "
|
|
43
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230406-0417.1",
|
|
44
|
+
"commit": "6b7f70ea7424a1cdc3c140ad7ce9da2f04850be3"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"date": "Tue, 04 Apr 2023 18:44:50 GMT",
|
|
51
|
+
"tag": "@fluentui/react-select_v9.1.7",
|
|
52
|
+
"version": "9.1.7",
|
|
53
|
+
"comments": {
|
|
54
|
+
"patch": [
|
|
55
|
+
{
|
|
56
|
+
"author": "beachball",
|
|
57
|
+
"package": "@fluentui/react-select",
|
|
58
|
+
"comment": "Bump @fluentui/react-field to v9.0.0-alpha.29",
|
|
59
|
+
"commit": "6778d76bbbad7e1975c151c797f28c2708cde2ce"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"author": "beachball",
|
|
63
|
+
"package": "@fluentui/react-select",
|
|
64
|
+
"comment": "Bump @fluentui/react-utilities to v9.7.3",
|
|
65
|
+
"commit": "6778d76bbbad7e1975c151c797f28c2708cde2ce"
|
|
45
66
|
}
|
|
46
67
|
]
|
|
47
68
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,22 +1,32 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-select
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Thu, 06 Apr 2023 04:23:51 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## [0.0.0-nightly-
|
|
7
|
+
## [0.0.0-nightly-20230406-0417.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-select_v0.0.0-nightly-20230406-0417.1)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-select_v9.1.
|
|
9
|
+
Thu, 06 Apr 2023 04:23:51 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-select_v9.1.7..@fluentui/react-select_v0.0.0-nightly-20230406-0417.1)
|
|
11
11
|
|
|
12
12
|
### Changes
|
|
13
13
|
|
|
14
14
|
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by fluentui-internal@service.microsoft.com)
|
|
15
|
-
- Bump @fluentui/react-field to v0.0.0-nightly-
|
|
16
|
-
- Bump @fluentui/react-shared-contexts to v0.0.0-nightly-
|
|
17
|
-
- Bump @fluentui/react-theme to v0.0.0-nightly-
|
|
18
|
-
- Bump @fluentui/react-utilities to v0.0.0-nightly-
|
|
19
|
-
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-
|
|
15
|
+
- Bump @fluentui/react-field to v0.0.0-nightly-20230406-0417.1 ([commit](https://github.com/microsoft/fluentui/commit/6b7f70ea7424a1cdc3c140ad7ce9da2f04850be3) by beachball)
|
|
16
|
+
- Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230406-0417.1 ([commit](https://github.com/microsoft/fluentui/commit/6b7f70ea7424a1cdc3c140ad7ce9da2f04850be3) by beachball)
|
|
17
|
+
- Bump @fluentui/react-theme to v0.0.0-nightly-20230406-0417.1 ([commit](https://github.com/microsoft/fluentui/commit/6b7f70ea7424a1cdc3c140ad7ce9da2f04850be3) by beachball)
|
|
18
|
+
- Bump @fluentui/react-utilities to v0.0.0-nightly-20230406-0417.1 ([commit](https://github.com/microsoft/fluentui/commit/6b7f70ea7424a1cdc3c140ad7ce9da2f04850be3) by beachball)
|
|
19
|
+
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230406-0417.1 ([commit](https://github.com/microsoft/fluentui/commit/6b7f70ea7424a1cdc3c140ad7ce9da2f04850be3) by beachball)
|
|
20
|
+
|
|
21
|
+
## [9.1.7](https://github.com/microsoft/fluentui/tree/@fluentui/react-select_v9.1.7)
|
|
22
|
+
|
|
23
|
+
Tue, 04 Apr 2023 18:44:50 GMT
|
|
24
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-select_v9.1.6..@fluentui/react-select_v9.1.7)
|
|
25
|
+
|
|
26
|
+
### Patches
|
|
27
|
+
|
|
28
|
+
- Bump @fluentui/react-field to v9.0.0-alpha.29 ([PR #27434](https://github.com/microsoft/fluentui/pull/27434) by beachball)
|
|
29
|
+
- Bump @fluentui/react-utilities to v9.7.3 ([PR #27434](https://github.com/microsoft/fluentui/pull/27434) by beachball)
|
|
20
30
|
|
|
21
31
|
## [9.1.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-select_v9.1.5)
|
|
22
32
|
|
|
@@ -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,
|
|
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;IAAE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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":";;;;+
|
|
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,IA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|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-select",
|
|
3
|
-
"version": "0.0.0-nightly-
|
|
3
|
+
"version": "0.0.0-nightly-20230406-0417.1",
|
|
4
4
|
"description": "Fluent UI React Select component",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -27,16 +27,16 @@
|
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@fluentui/eslint-plugin": "*",
|
|
29
29
|
"@fluentui/react-conformance": "*",
|
|
30
|
-
"@fluentui/react-conformance-griffel": "0.0.0-nightly-
|
|
30
|
+
"@fluentui/react-conformance-griffel": "0.0.0-nightly-20230406-0417.1",
|
|
31
31
|
"@fluentui/scripts-api-extractor": "*",
|
|
32
32
|
"@fluentui/scripts-tasks": "*"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@fluentui/react-field": "0.0.0-nightly-
|
|
35
|
+
"@fluentui/react-field": "0.0.0-nightly-20230406-0417.1",
|
|
36
36
|
"@fluentui/react-icons": "^2.0.196",
|
|
37
|
-
"@fluentui/react-shared-contexts": "0.0.0-nightly-
|
|
38
|
-
"@fluentui/react-theme": "0.0.0-nightly-
|
|
39
|
-
"@fluentui/react-utilities": "0.0.0-nightly-
|
|
37
|
+
"@fluentui/react-shared-contexts": "0.0.0-nightly-20230406-0417.1",
|
|
38
|
+
"@fluentui/react-theme": "0.0.0-nightly-20230406-0417.1",
|
|
39
|
+
"@fluentui/react-utilities": "0.0.0-nightly-20230406-0417.1",
|
|
40
40
|
"@griffel/react": "^1.5.2",
|
|
41
41
|
"@swc/helpers": "^0.4.14"
|
|
42
42
|
},
|