@fluentui/react-select 9.0.0-beta.23 → 9.0.0-beta.24
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 +41 -2
- package/CHANGELOG.md +16 -3
- package/dist/index.d.ts +13 -5
- package/lib/components/Select/useSelect.js +4 -1
- package/lib/components/Select/useSelect.js.map +1 -1
- package/lib/components/SelectField/SelectField.js +7 -13
- package/lib/components/SelectField/SelectField.js.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib-commonjs/components/Select/useSelect.js +4 -1
- package/lib-commonjs/components/Select/useSelect.js.map +1 -1
- package/lib-commonjs/components/SelectField/SelectField.js +5 -11
- package/lib-commonjs/components/SelectField/SelectField.js.map +1 -1
- package/lib-commonjs/index.js +1 -0
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +4 -3
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,46 @@
|
|
|
2
2
|
"name": "@fluentui/react-select",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Thu, 26 Jan 2023 13:27:49 GMT",
|
|
6
|
+
"tag": "@fluentui/react-select_v9.0.0-beta.24",
|
|
7
|
+
"version": "9.0.0-beta.24",
|
|
8
|
+
"comments": {
|
|
9
|
+
"prerelease": [
|
|
10
|
+
{
|
|
11
|
+
"author": "miroslav.stastny@microsoft.com",
|
|
12
|
+
"package": "@fluentui/react-select",
|
|
13
|
+
"commit": "6f29c8f65b2db6125efbd2a7ec2d7abdd0f44601",
|
|
14
|
+
"comment": "feat: Allow default appearance override"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "behowell@microsoft.com",
|
|
18
|
+
"package": "@fluentui/react-select",
|
|
19
|
+
"commit": "d6e98c0b5390c5c7e03601537b2026307e01a8d4",
|
|
20
|
+
"comment": "Deprecate SelectField_unstable in favor of Field with Select as its child."
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "beachball",
|
|
24
|
+
"package": "@fluentui/react-select",
|
|
25
|
+
"comment": "Bump @fluentui/react-field to v9.0.0-alpha.17",
|
|
26
|
+
"commit": "403e1370f1effca7d3db131eda381abf31cf66b1"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"author": "beachball",
|
|
30
|
+
"package": "@fluentui/react-select",
|
|
31
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.2.0",
|
|
32
|
+
"commit": "403e1370f1effca7d3db131eda381abf31cf66b1"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"author": "beachball",
|
|
36
|
+
"package": "@fluentui/react-select",
|
|
37
|
+
"comment": "Bump @fluentui/react-utilities to v9.5.0",
|
|
38
|
+
"commit": "403e1370f1effca7d3db131eda381abf31cf66b1"
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"date": "Mon, 23 Jan 2023 16:43:12 GMT",
|
|
6
45
|
"tag": "@fluentui/react-select_v9.0.0-beta.23",
|
|
7
46
|
"version": "9.0.0-beta.23",
|
|
8
47
|
"comments": {
|
|
@@ -11,7 +50,7 @@
|
|
|
11
50
|
"author": "beachball",
|
|
12
51
|
"package": "@fluentui/react-select",
|
|
13
52
|
"comment": "Bump @fluentui/react-field to v9.0.0-alpha.16",
|
|
14
|
-
"commit": "
|
|
53
|
+
"commit": "828c4260edc4fba07c9ccc8e94f15051c7fd25d3"
|
|
15
54
|
}
|
|
16
55
|
]
|
|
17
56
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,17 +1,30 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-select
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Thu, 26 Jan 2023 13:27:49 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.0.0-beta.24](https://github.com/microsoft/fluentui/tree/@fluentui/react-select_v9.0.0-beta.24)
|
|
8
|
+
|
|
9
|
+
Thu, 26 Jan 2023 13:27:49 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-select_v9.0.0-beta.23..@fluentui/react-select_v9.0.0-beta.24)
|
|
11
|
+
|
|
12
|
+
### Changes
|
|
13
|
+
|
|
14
|
+
- feat: Allow default appearance override ([PR #25262](https://github.com/microsoft/fluentui/pull/25262) by miroslav.stastny@microsoft.com)
|
|
15
|
+
- Deprecate SelectField_unstable in favor of Field with Select as its child. ([PR #26430](https://github.com/microsoft/fluentui/pull/26430) by behowell@microsoft.com)
|
|
16
|
+
- Bump @fluentui/react-field to v9.0.0-alpha.17 ([PR #26496](https://github.com/microsoft/fluentui/pull/26496) by beachball)
|
|
17
|
+
- Bump @fluentui/react-shared-contexts to v9.2.0 ([PR #26496](https://github.com/microsoft/fluentui/pull/26496) by beachball)
|
|
18
|
+
- Bump @fluentui/react-utilities to v9.5.0 ([PR #26496](https://github.com/microsoft/fluentui/pull/26496) by beachball)
|
|
19
|
+
|
|
7
20
|
## [9.0.0-beta.23](https://github.com/microsoft/fluentui/tree/@fluentui/react-select_v9.0.0-beta.23)
|
|
8
21
|
|
|
9
|
-
Mon, 23 Jan 2023 16:
|
|
22
|
+
Mon, 23 Jan 2023 16:43:12 GMT
|
|
10
23
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-select_v9.0.0-beta.22..@fluentui/react-select_v9.0.0-beta.23)
|
|
11
24
|
|
|
12
25
|
### Changes
|
|
13
26
|
|
|
14
|
-
- Bump @fluentui/react-field to v9.0.0-alpha.16 ([PR #
|
|
27
|
+
- Bump @fluentui/react-field to v9.0.0-alpha.16 ([PR #26434](https://github.com/microsoft/fluentui/pull/26434) by beachball)
|
|
15
28
|
|
|
16
29
|
## [9.0.0-beta.22](https://github.com/microsoft/fluentui/tree/@fluentui/react-select_v9.0.0-beta.22)
|
|
17
30
|
|
package/dist/index.d.ts
CHANGED
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import type { ComponentProps } from '@fluentui/react-utilities';
|
|
4
4
|
import type { ComponentState } from '@fluentui/react-utilities';
|
|
5
|
-
import {
|
|
6
|
-
import type { FieldProps } from '@fluentui/react-field';
|
|
7
|
-
import { FieldSlots } from '@fluentui/react-field';
|
|
5
|
+
import { DeprecatedFieldProps } from '@fluentui/react-field';
|
|
8
6
|
import type { ForwardRefComponent } from '@fluentui/react-utilities';
|
|
9
7
|
import * as React_2 from 'react';
|
|
10
8
|
import type { Slot } from '@fluentui/react-utilities';
|
|
@@ -22,11 +20,21 @@ export declare const Select: ForwardRefComponent<SelectProps>;
|
|
|
22
20
|
|
|
23
21
|
export declare const selectClassNames: SlotClassNames<SelectSlots>;
|
|
24
22
|
|
|
23
|
+
/** @deprecated Use Field with Select: `<Field><Select /></Field>` */
|
|
25
24
|
export declare const SelectField_unstable: ForwardRefComponent<SelectFieldProps_unstable>;
|
|
26
25
|
|
|
27
|
-
|
|
26
|
+
/** @deprecated Use Field with Select: `<Field><Select /></Field>` */
|
|
27
|
+
export declare const selectFieldClassNames: {
|
|
28
|
+
control: string;
|
|
29
|
+
root: string;
|
|
30
|
+
label: string;
|
|
31
|
+
validationMessage: string;
|
|
32
|
+
validationMessageIcon: string;
|
|
33
|
+
hint: string;
|
|
34
|
+
};
|
|
28
35
|
|
|
29
|
-
|
|
36
|
+
/** @deprecated Use Field with Select: `<Field><Select /></Field>` */
|
|
37
|
+
export declare type SelectFieldProps_unstable = DeprecatedFieldProps<SelectProps>;
|
|
30
38
|
|
|
31
39
|
/**
|
|
32
40
|
* Data passed to the `onChange` callback when a new option is selected.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { getPartitionedNativeProps, resolveShorthand, useEventCallback } from '@fluentui/react-utilities';
|
|
3
3
|
import { ChevronDownRegular } from '@fluentui/react-icons';
|
|
4
|
+
import { useOverrides_unstable as useOverrides } from '@fluentui/react-shared-contexts';
|
|
4
5
|
/**
|
|
5
6
|
* Create the state required to render Select.
|
|
6
7
|
*
|
|
@@ -11,13 +12,15 @@ import { ChevronDownRegular } from '@fluentui/react-icons';
|
|
|
11
12
|
* @param ref - reference to the `<select>` element in Select
|
|
12
13
|
*/
|
|
13
14
|
export const useSelect_unstable = (props, ref) => {
|
|
15
|
+
var _a;
|
|
16
|
+
const overrides = useOverrides();
|
|
14
17
|
const {
|
|
15
18
|
defaultValue,
|
|
16
19
|
value,
|
|
17
20
|
select,
|
|
18
21
|
icon,
|
|
19
22
|
root,
|
|
20
|
-
appearance = 'outline',
|
|
23
|
+
appearance = (_a = overrides.inputDefaultAppearance) !== null && _a !== void 0 ? _a : 'outline',
|
|
21
24
|
onChange,
|
|
22
25
|
size = 'medium'
|
|
23
26
|
} = props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,yBAAyB,EAAEC,gBAAgB,EAAEC,gBAAgB,QAAQ,2BAA2B;AACzG,SAASC,kBAAkB,QAAQ,uBAAuB;
|
|
1
|
+
{"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,yBAAyB,EAAEC,gBAAgB,EAAEC,gBAAgB,QAAQ,2BAA2B;AACzG,SAASC,kBAAkB,QAAQ,uBAAuB;AAE1D,SAASC,qBAAqB,IAAIC,YAAY,QAAQ,iCAAiC;AAEvF;;;;;;;;;AASA,OAAO,MAAMC,kBAAkB,GAAG,CAACC,KAAkB,EAAEC,GAAiC,KAAiB;;EACvG,MAAMC,SAAS,GAAGJ,YAAY,EAAE;EAEhC,MAAM;IACJK,YAAY;IACZC,KAAK;IACLC,MAAM;IACNC,IAAI;IACJC,IAAI;IACJC,UAAU,GAAG,eAAS,CAACC,sBAAsB,mCAAI,SAAS;IAE1DC,QAAQ;IACRC,IAAI,GAAG;EAAQ,CAChB,GAAGX,KAAK;EAET,MAAMY,WAAW,GAAGnB,yBAAyB,CAAC;IAC5CO,KAAK;IACLa,kBAAkB,EAAE,QAAQ;IAC5BC,iBAAiB,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO;GAC9E,CAAC;EAEF,MAAMC,KAAK,GAAgB;IACzBJ,IAAI;IACJH,UAAU;IACVQ,UAAU,EAAE;MACVT,IAAI,EAAE,MAAM;MACZF,MAAM,EAAE,QAAQ;MAChBC,IAAI,EAAE;KACP;IACDD,MAAM,EAAEX,gBAAgB,CAACW,MAAM,EAAE;MAC/BY,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAE;QACZf,YAAY;QACZC,KAAK;QACLH,GAAG;QACH,GAAGW,WAAW,CAACO;;KAElB,CAAC;IACFb,IAAI,EAAEZ,gBAAgB,CAACY,IAAI,EAAE;MAC3BW,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAE;QAAEE,QAAQ,eAAE5B,oBAACI,kBAAkB;MAAG;KACjD,CAAC;IACFW,IAAI,EAAEb,gBAAgB,CAACa,IAAI,EAAE;MAC3BU,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAEN,WAAW,CAACL;KAC3B;GACF;EAEDQ,KAAK,CAACV,MAAM,CAACK,QAAQ,GAAGf,gBAAgB,CAAC0B,KAAK,IAAG;IAC/CX,QAAQ,aAARA,QAAQ,uBAARA,QAAQ,CAAGW,KAAK,EAAE;MAAEjB,KAAK,EAAGiB,KAAK,CAACC,MAA4B,CAAClB;IAAK,CAAE,CAAC;EACzE,CAAC,CAAC;EAEF,OAAOW,KAAK;AACd,CAAC","names":["React","getPartitionedNativeProps","resolveShorthand","useEventCallback","ChevronDownRegular","useOverrides_unstable","useOverrides","useSelect_unstable","props","ref","overrides","defaultValue","value","select","icon","root","appearance","inputDefaultAppearance","onChange","size","nativeProps","primarySlotTagName","excludedPropNames","state","components","required","defaultProps","primary","children","event","target"],"sourceRoot":"../src/","sources":["packages/react-components/react-select/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"]}
|
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import { Select } from '../../Select';
|
|
4
|
-
|
|
5
|
-
export const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
classNames: selectFieldClassNames
|
|
9
|
-
});
|
|
10
|
-
useFieldStyles_unstable(state);
|
|
11
|
-
return renderField_unstable(state);
|
|
12
|
-
});
|
|
13
|
-
SelectField.displayName = 'SelectField';
|
|
1
|
+
/* eslint-disable deprecation/deprecation */
|
|
2
|
+
import { getDeprecatedFieldClassNames, makeDeprecatedField } from '@fluentui/react-field';
|
|
3
|
+
import { Select, selectClassNames } from '../../Select';
|
|
4
|
+
/** @deprecated Use Field with Select: `<Field><Select /></Field>` */
|
|
5
|
+
export const selectFieldClassNames = /*#__PURE__*/getDeprecatedFieldClassNames(selectClassNames.root);
|
|
6
|
+
/** @deprecated Use Field with Select: `<Field><Select /></Field>` */
|
|
7
|
+
export const SelectField = /*#__PURE__*/makeDeprecatedField(Select);
|
|
14
8
|
//# sourceMappingURL=SelectField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"mappings":"AAAA
|
|
1
|
+
{"version":3,"mappings":"AAAA;AACA,SAA+BA,4BAA4B,EAAEC,mBAAmB,QAAQ,uBAAuB;AAE/G,SAASC,MAAM,EAAEC,gBAAgB,QAAqB,cAAc;AAIpE;AACA,OAAO,MAAMC,qBAAqB,gBAAGJ,4BAA4B,CAACG,gBAAgB,CAACE,IAAI,CAAC;AACxF;AACA,OAAO,MAAMC,WAAW,gBAA0CL,mBAAmB,CAACC,MAAM,CAAC","names":["getDeprecatedFieldClassNames","makeDeprecatedField","Select","selectClassNames","selectFieldClassNames","root","SelectField"],"sourceRoot":"../src/","sources":["packages/react-components/react-select/src/components/SelectField/SelectField.tsx"],"sourcesContent":["/* eslint-disable deprecation/deprecation */\nimport { DeprecatedFieldProps, getDeprecatedFieldClassNames, makeDeprecatedField } from '@fluentui/react-field';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { Select, selectClassNames, SelectProps } from '../../Select';\n\n/** @deprecated Use Field with Select: `<Field><Select /></Field>` */\nexport type SelectFieldProps = DeprecatedFieldProps<SelectProps>;\n/** @deprecated Use Field with Select: `<Field><Select /></Field>` */\nexport const selectFieldClassNames = getDeprecatedFieldClassNames(selectClassNames.root);\n/** @deprecated Use Field with Select: `<Field><Select /></Field>` */\nexport const SelectField: ForwardRefComponent<SelectFieldProps> = makeDeprecatedField(Select);\n"]}
|
package/lib/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { Select, selectClassNames, renderSelect_unstable, useSelectStyles_unstable, useSelect_unstable } from './Select';
|
|
2
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
2
3
|
export { SelectField as SelectField_unstable, selectFieldClassNames } from './SelectField';
|
|
3
4
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"mappings":"AAAA,SACEA,MAAM,EACNC,gBAAgB,EAChBC,qBAAqB,EACrBC,wBAAwB,EACxBC,kBAAkB,QACb,UAAU;AAGjB,SAASC,WAAW,IAAIC,oBAAoB,EAAEC,qBAAqB,QAAQ,eAAe","names":["Select","selectClassNames","renderSelect_unstable","useSelectStyles_unstable","useSelect_unstable","SelectField","SelectField_unstable","selectFieldClassNames"],"sourceRoot":"../src/","sources":["packages/react-components/react-select/src/index.ts"],"sourcesContent":["export {\n Select,\n selectClassNames,\n renderSelect_unstable,\n useSelectStyles_unstable,\n useSelect_unstable,\n} from './Select';\nexport type { SelectOnChangeData, SelectProps, SelectSlots, SelectState } from './Select';\n\nexport { SelectField as SelectField_unstable, selectFieldClassNames } from './SelectField';\nexport type { SelectFieldProps as SelectFieldProps_unstable } from './SelectField';\n"]}
|
|
1
|
+
{"version":3,"mappings":"AAAA,SACEA,MAAM,EACNC,gBAAgB,EAChBC,qBAAqB,EACrBC,wBAAwB,EACxBC,kBAAkB,QACb,UAAU;AAGjB;AACA,SAASC,WAAW,IAAIC,oBAAoB,EAAEC,qBAAqB,QAAQ,eAAe","names":["Select","selectClassNames","renderSelect_unstable","useSelectStyles_unstable","useSelect_unstable","SelectField","SelectField_unstable","selectFieldClassNames"],"sourceRoot":"../src/","sources":["packages/react-components/react-select/src/index.ts"],"sourcesContent":["export {\n Select,\n selectClassNames,\n renderSelect_unstable,\n useSelectStyles_unstable,\n useSelect_unstable,\n} from './Select';\nexport type { SelectOnChangeData, SelectProps, SelectSlots, SelectState } from './Select';\n\n// eslint-disable-next-line deprecation/deprecation\nexport { SelectField as SelectField_unstable, selectFieldClassNames } from './SelectField';\n// eslint-disable-next-line deprecation/deprecation\nexport type { SelectFieldProps as SelectFieldProps_unstable } from './SelectField';\n"]}
|
|
@@ -7,6 +7,7 @@ exports.useSelect_unstable = void 0;
|
|
|
7
7
|
const React = /*#__PURE__*/require("react");
|
|
8
8
|
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
|
9
9
|
const react_icons_1 = /*#__PURE__*/require("@fluentui/react-icons");
|
|
10
|
+
const react_shared_contexts_1 = /*#__PURE__*/require("@fluentui/react-shared-contexts");
|
|
10
11
|
/**
|
|
11
12
|
* Create the state required to render Select.
|
|
12
13
|
*
|
|
@@ -17,13 +18,15 @@ const react_icons_1 = /*#__PURE__*/require("@fluentui/react-icons");
|
|
|
17
18
|
* @param ref - reference to the `<select>` element in Select
|
|
18
19
|
*/
|
|
19
20
|
const useSelect_unstable = (props, ref) => {
|
|
21
|
+
var _a;
|
|
22
|
+
const overrides = react_shared_contexts_1.useOverrides_unstable();
|
|
20
23
|
const {
|
|
21
24
|
defaultValue,
|
|
22
25
|
value,
|
|
23
26
|
select,
|
|
24
27
|
icon,
|
|
25
28
|
root,
|
|
26
|
-
appearance = 'outline',
|
|
29
|
+
appearance = (_a = overrides.inputDefaultAppearance) !== null && _a !== void 0 ? _a : 'outline',
|
|
27
30
|
onChange,
|
|
28
31
|
size = 'medium'
|
|
29
32
|
} = props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"mappings":";;;;;;AAAA;AACA;AACA;
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AACA;AACA;AAEA;AAEA;;;;;;;;;AASO,MAAMA,kBAAkB,GAAG,CAACC,KAAkB,EAAEC,GAAiC,KAAiB;;EACvG,MAAMC,SAAS,GAAGC,6CAAY,EAAE;EAEhC,MAAM;IACJC,YAAY;IACZC,KAAK;IACLC,MAAM;IACNC,IAAI;IACJC,IAAI;IACJC,UAAU,GAAG,eAAS,CAACC,sBAAsB,mCAAI,SAAS;IAE1DC,QAAQ;IACRC,IAAI,GAAG;EAAQ,CAChB,GAAGZ,KAAK;EAET,MAAMa,WAAW,GAAGC,2CAAyB,CAAC;IAC5Cd,KAAK;IACLe,kBAAkB,EAAE,QAAQ;IAC5BC,iBAAiB,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO;GAC9E,CAAC;EAEF,MAAMC,KAAK,GAAgB;IACzBL,IAAI;IACJH,UAAU;IACVS,UAAU,EAAE;MACVV,IAAI,EAAE,MAAM;MACZF,MAAM,EAAE,QAAQ;MAChBC,IAAI,EAAE;KACP;IACDD,MAAM,EAAEQ,kCAAgB,CAACR,MAAM,EAAE;MAC/Ba,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAE;QACZhB,YAAY;QACZC,KAAK;QACLJ,GAAG;QACH,GAAGY,WAAW,CAACQ;;KAElB,CAAC;IACFd,IAAI,EAAEO,kCAAgB,CAACP,IAAI,EAAE;MAC3BY,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAE;QAAEE,QAAQ,EAAEC,oBAACC,gCAAkB;MAAG;KACjD,CAAC;IACFhB,IAAI,EAAEM,kCAAgB,CAACN,IAAI,EAAE;MAC3BW,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAEP,WAAW,CAACL;KAC3B;GACF;EAEDS,KAAK,CAACX,MAAM,CAACK,QAAQ,GAAGG,kCAAgB,CAACW,KAAK,IAAG;IAC/Cd,QAAQ,aAARA,QAAQ,uBAARA,QAAQ,CAAGc,KAAK,EAAE;MAAEpB,KAAK,EAAGoB,KAAK,CAACC,MAA4B,CAACrB;IAAK,CAAE,CAAC;EACzE,CAAC,CAAC;EAEF,OAAOY,KAAK;AACd,CAAC;AArDYU,0BAAkB","names":["useSelect_unstable","props","ref","overrides","react_shared_contexts_1","defaultValue","value","select","icon","root","appearance","inputDefaultAppearance","onChange","size","nativeProps","react_utilities_1","primarySlotTagName","excludedPropNames","state","components","required","defaultProps","primary","children","React","react_icons_1","event","target","exports"],"sourceRoot":"../src/","sources":["packages/react-components/react-select/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"]}
|
|
@@ -4,17 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.SelectField = exports.selectFieldClassNames = void 0;
|
|
7
|
-
|
|
7
|
+
/* eslint-disable deprecation/deprecation */
|
|
8
8
|
const react_field_1 = /*#__PURE__*/require("@fluentui/react-field");
|
|
9
9
|
const Select_1 = /*#__PURE__*/require("../../Select");
|
|
10
|
-
|
|
11
|
-
exports.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
classNames: exports.selectFieldClassNames
|
|
15
|
-
});
|
|
16
|
-
react_field_1.useFieldStyles_unstable(state);
|
|
17
|
-
return react_field_1.renderField_unstable(state);
|
|
18
|
-
});
|
|
19
|
-
exports.SelectField.displayName = 'SelectField';
|
|
10
|
+
/** @deprecated Use Field with Select: `<Field><Select /></Field>` */
|
|
11
|
+
exports.selectFieldClassNames = /*#__PURE__*/react_field_1.getDeprecatedFieldClassNames(Select_1.selectClassNames.root);
|
|
12
|
+
/** @deprecated Use Field with Select: `<Field><Select /></Field>` */
|
|
13
|
+
exports.SelectField = /*#__PURE__*/react_field_1.makeDeprecatedField(Select_1.Select);
|
|
20
14
|
//# sourceMappingURL=SelectField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"mappings":";;;;;;AAAA;AAEA;
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AACA;AAEA;AAIA;AACaA,6BAAqB,gBAAGC,0CAA4B,CAACC,yBAAgB,CAACC,IAAI,CAAC;AACxF;AACaH,mBAAW,gBAA0CC,iCAAmB,CAACC,eAAM,CAAC","names":["exports","react_field_1","Select_1","root"],"sourceRoot":"../src/","sources":["packages/react-components/react-select/src/components/SelectField/SelectField.tsx"],"sourcesContent":["/* eslint-disable deprecation/deprecation */\nimport { DeprecatedFieldProps, getDeprecatedFieldClassNames, makeDeprecatedField } from '@fluentui/react-field';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { Select, selectClassNames, SelectProps } from '../../Select';\n\n/** @deprecated Use Field with Select: `<Field><Select /></Field>` */\nexport type SelectFieldProps = DeprecatedFieldProps<SelectProps>;\n/** @deprecated Use Field with Select: `<Field><Select /></Field>` */\nexport const selectFieldClassNames = getDeprecatedFieldClassNames(selectClassNames.root);\n/** @deprecated Use Field with Select: `<Field><Select /></Field>` */\nexport const SelectField: ForwardRefComponent<SelectFieldProps> = makeDeprecatedField(Select);\n"]}
|
package/lib-commonjs/index.js
CHANGED
|
@@ -35,6 +35,7 @@ Object.defineProperty(exports, "useSelect_unstable", {
|
|
|
35
35
|
return Select_1.useSelect_unstable;
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
38
39
|
var SelectField_1 = /*#__PURE__*/require("./SelectField");
|
|
39
40
|
Object.defineProperty(exports, "SelectField_unstable", {
|
|
40
41
|
enumerable: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"mappings":";;;;;;AAAA;AACEA;EAAAC;EAAAC;IAAA,sBAAM;EAAA;AAAA;AACNF;EAAAC;EAAAC;IAAA,gCAAgB;EAAA;AAAA;AAChBF;EAAAC;EAAAC;IAAA,qCAAqB;EAAA;AAAA;AACrBF;EAAAC;EAAAC;IAAA,wCAAwB;EAAA;AAAA;AACxBF;EAAAC;EAAAC;IAAA,kCAAkB;EAAA;AAAA;AAIpB;AAASF;EAAAC;EAAAC;IAAA,gCAAW;EAAA;AAAA;AAA0BF;EAAAC;EAAAC;IAAA,0CAAqB;EAAA;AAAA","names":["Object","enumerable","get"],"sourceRoot":"../src/","sources":["packages/react-components/react-select/src/index.ts"],"sourcesContent":["export {\n Select,\n selectClassNames,\n renderSelect_unstable,\n useSelectStyles_unstable,\n useSelect_unstable,\n} from './Select';\nexport type { SelectOnChangeData, SelectProps, SelectSlots, SelectState } from './Select';\n\nexport { SelectField as SelectField_unstable, selectFieldClassNames } from './SelectField';\nexport type { SelectFieldProps as SelectFieldProps_unstable } from './SelectField';\n"]}
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AACEA;EAAAC;EAAAC;IAAA,sBAAM;EAAA;AAAA;AACNF;EAAAC;EAAAC;IAAA,gCAAgB;EAAA;AAAA;AAChBF;EAAAC;EAAAC;IAAA,qCAAqB;EAAA;AAAA;AACrBF;EAAAC;EAAAC;IAAA,wCAAwB;EAAA;AAAA;AACxBF;EAAAC;EAAAC;IAAA,kCAAkB;EAAA;AAAA;AAIpB;AACA;AAASF;EAAAC;EAAAC;IAAA,gCAAW;EAAA;AAAA;AAA0BF;EAAAC;EAAAC;IAAA,0CAAqB;EAAA;AAAA","names":["Object","enumerable","get"],"sourceRoot":"../src/","sources":["packages/react-components/react-select/src/index.ts"],"sourcesContent":["export {\n Select,\n selectClassNames,\n renderSelect_unstable,\n useSelectStyles_unstable,\n useSelect_unstable,\n} from './Select';\nexport type { SelectOnChangeData, SelectProps, SelectSlots, SelectState } from './Select';\n\n// eslint-disable-next-line deprecation/deprecation\nexport { SelectField as SelectField_unstable, selectFieldClassNames } from './SelectField';\n// eslint-disable-next-line deprecation/deprecation\nexport type { SelectFieldProps as SelectFieldProps_unstable } from './SelectField';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-select",
|
|
3
|
-
"version": "9.0.0-beta.
|
|
3
|
+
"version": "9.0.0-beta.24",
|
|
4
4
|
"description": "Fluent UI React Select component",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -32,10 +32,11 @@
|
|
|
32
32
|
"@fluentui/scripts-tasks": "*"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@fluentui/react-field": "9.0.0-alpha.
|
|
35
|
+
"@fluentui/react-field": "9.0.0-alpha.17",
|
|
36
36
|
"@fluentui/react-icons": "^2.0.175",
|
|
37
|
+
"@fluentui/react-shared-contexts": "^9.2.0",
|
|
37
38
|
"@fluentui/react-theme": "^9.1.5",
|
|
38
|
-
"@fluentui/react-utilities": "^9.
|
|
39
|
+
"@fluentui/react-utilities": "^9.5.0",
|
|
39
40
|
"@griffel/react": "^1.5.2",
|
|
40
41
|
"tslib": "^2.1.0"
|
|
41
42
|
},
|