@fluentui/react-select 0.0.0-nightly-20230807-0415.1 → 0.0.0-nightly-20230808-0415.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,9 +2,9 @@
2
2
  "name": "@fluentui/react-select",
3
3
  "entries": [
4
4
  {
5
- "date": "Mon, 07 Aug 2023 04:22:36 GMT",
6
- "tag": "@fluentui/react-select_v0.0.0-nightly-20230807-0415.1",
7
- "version": "0.0.0-nightly-20230807-0415.1",
5
+ "date": "Tue, 08 Aug 2023 04:22:11 GMT",
6
+ "tag": "@fluentui/react-select_v0.0.0-nightly-20230808-0415.1",
7
+ "version": "0.0.0-nightly-20230808-0415.1",
8
8
  "comments": {
9
9
  "prerelease": [
10
10
  {
@@ -16,44 +16,44 @@
16
16
  {
17
17
  "author": "beachball",
18
18
  "package": "@fluentui/react-select",
19
- "comment": "Bump @fluentui/react-field to v0.0.0-nightly-20230807-0415.1",
20
- "commit": "272d9efb55a09fdcdf1014ff7075d14e312e31e7"
19
+ "comment": "Bump @fluentui/react-field to v0.0.0-nightly-20230808-0415.1",
20
+ "commit": "307bdb0a82868b26dbcb9a7aa2318bda66c1cd64"
21
21
  },
22
22
  {
23
23
  "author": "beachball",
24
24
  "package": "@fluentui/react-select",
25
- "comment": "Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20230807-0415.1",
26
- "commit": "272d9efb55a09fdcdf1014ff7075d14e312e31e7"
25
+ "comment": "Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20230808-0415.1",
26
+ "commit": "307bdb0a82868b26dbcb9a7aa2318bda66c1cd64"
27
27
  },
28
28
  {
29
29
  "author": "beachball",
30
30
  "package": "@fluentui/react-select",
31
- "comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230807-0415.1",
32
- "commit": "272d9efb55a09fdcdf1014ff7075d14e312e31e7"
31
+ "comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230808-0415.1",
32
+ "commit": "307bdb0a82868b26dbcb9a7aa2318bda66c1cd64"
33
33
  },
34
34
  {
35
35
  "author": "beachball",
36
36
  "package": "@fluentui/react-select",
37
- "comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20230807-0415.1",
38
- "commit": "272d9efb55a09fdcdf1014ff7075d14e312e31e7"
37
+ "comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20230808-0415.1",
38
+ "commit": "307bdb0a82868b26dbcb9a7aa2318bda66c1cd64"
39
39
  },
40
40
  {
41
41
  "author": "beachball",
42
42
  "package": "@fluentui/react-select",
43
- "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20230807-0415.1",
44
- "commit": "272d9efb55a09fdcdf1014ff7075d14e312e31e7"
43
+ "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20230808-0415.1",
44
+ "commit": "307bdb0a82868b26dbcb9a7aa2318bda66c1cd64"
45
45
  },
46
46
  {
47
47
  "author": "beachball",
48
48
  "package": "@fluentui/react-select",
49
- "comment": "Bump @fluentui/react-conformance to v0.0.0-nightly-20230807-0415.1",
50
- "commit": "272d9efb55a09fdcdf1014ff7075d14e312e31e7"
49
+ "comment": "Bump @fluentui/react-conformance to v0.0.0-nightly-20230808-0415.1",
50
+ "commit": "307bdb0a82868b26dbcb9a7aa2318bda66c1cd64"
51
51
  },
52
52
  {
53
53
  "author": "beachball",
54
54
  "package": "@fluentui/react-select",
55
- "comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230807-0415.1",
56
- "commit": "272d9efb55a09fdcdf1014ff7075d14e312e31e7"
55
+ "comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230808-0415.1",
56
+ "commit": "307bdb0a82868b26dbcb9a7aa2318bda66c1cd64"
57
57
  }
58
58
  ]
59
59
  }
package/CHANGELOG.md CHANGED
@@ -1,24 +1,24 @@
1
1
  # Change Log - @fluentui/react-select
2
2
 
3
- This log was last generated on Mon, 07 Aug 2023 04:22:36 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 08 Aug 2023 04:22:11 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## [0.0.0-nightly-20230807-0415.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-select_v0.0.0-nightly-20230807-0415.1)
7
+ ## [0.0.0-nightly-20230808-0415.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-select_v0.0.0-nightly-20230808-0415.1)
8
8
 
9
- Mon, 07 Aug 2023 04:22:36 GMT
10
- [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-select_v9.1.25..@fluentui/react-select_v0.0.0-nightly-20230807-0415.1)
9
+ Tue, 08 Aug 2023 04:22:11 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-select_v9.1.25..@fluentui/react-select_v0.0.0-nightly-20230808-0415.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-20230807-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/272d9efb55a09fdcdf1014ff7075d14e312e31e7) by beachball)
16
- - Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20230807-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/272d9efb55a09fdcdf1014ff7075d14e312e31e7) by beachball)
17
- - Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230807-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/272d9efb55a09fdcdf1014ff7075d14e312e31e7) by beachball)
18
- - Bump @fluentui/react-theme to v0.0.0-nightly-20230807-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/272d9efb55a09fdcdf1014ff7075d14e312e31e7) by beachball)
19
- - Bump @fluentui/react-utilities to v0.0.0-nightly-20230807-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/272d9efb55a09fdcdf1014ff7075d14e312e31e7) by beachball)
20
- - Bump @fluentui/react-conformance to v0.0.0-nightly-20230807-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/272d9efb55a09fdcdf1014ff7075d14e312e31e7) by beachball)
21
- - Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230807-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/272d9efb55a09fdcdf1014ff7075d14e312e31e7) by beachball)
15
+ - Bump @fluentui/react-field to v0.0.0-nightly-20230808-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/307bdb0a82868b26dbcb9a7aa2318bda66c1cd64) by beachball)
16
+ - Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20230808-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/307bdb0a82868b26dbcb9a7aa2318bda66c1cd64) by beachball)
17
+ - Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230808-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/307bdb0a82868b26dbcb9a7aa2318bda66c1cd64) by beachball)
18
+ - Bump @fluentui/react-theme to v0.0.0-nightly-20230808-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/307bdb0a82868b26dbcb9a7aa2318bda66c1cd64) by beachball)
19
+ - Bump @fluentui/react-utilities to v0.0.0-nightly-20230808-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/307bdb0a82868b26dbcb9a7aa2318bda66c1cd64) by beachball)
20
+ - Bump @fluentui/react-conformance to v0.0.0-nightly-20230808-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/307bdb0a82868b26dbcb9a7aa2318bda66c1cd64) by beachball)
21
+ - Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230808-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/307bdb0a82868b26dbcb9a7aa2318bda66c1cd64) by beachball)
22
22
 
23
23
  ## [9.1.25](https://github.com/microsoft/fluentui/tree/@fluentui/react-select_v9.1.25)
24
24
 
@@ -1,8 +1,8 @@
1
1
  /** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';
2
- import { getSlotsNext } from '@fluentui/react-utilities';
2
+ import { assertSlots } from '@fluentui/react-utilities';
3
3
  /**
4
4
  * Render the final JSX of Select
5
5
  */ export const renderSelect_unstable = (state)=>{
6
- const { slots , slotProps } = getSlotsNext(state);
7
- return /*#__PURE__*/ createElement(slots.root, slotProps.root, /*#__PURE__*/ createElement(slots.select, slotProps.select, slotProps.select.children), /*#__PURE__*/ createElement(slots.icon, slotProps.icon));
6
+ assertSlots(state);
7
+ return /*#__PURE__*/ createElement(state.root, null, /*#__PURE__*/ createElement(state.select, null, state.select.children), /*#__PURE__*/ createElement(state.icon, null));
8
8
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderSelect.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\n\nimport { getSlotsNext } from '@fluentui/react-utilities';\nimport type { SelectSlots, SelectState } from './Select.types';\n\n/**\n * Render the final JSX of Select\n */\nexport const renderSelect_unstable = (state: SelectState) => {\n const { slots, slotProps } = getSlotsNext<SelectSlots>(state);\n return (\n <slots.root {...slotProps.root}>\n <slots.select {...slotProps.select}>{slotProps.select.children}</slots.select>\n <slots.icon {...slotProps.icon} />\n </slots.root>\n );\n};\n"],"names":["createElement","getSlotsNext","renderSelect_unstable","state","slots","slotProps","root","select","children","icon"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAE5D,SAASC,YAAY,QAAQ,4BAA4B;AAGzD;;CAEC,GACD,OAAO,MAAMC,wBAAwB,CAACC,QAAuB;IAC3D,MAAM,EAAEC,MAAK,EAAEC,UAAS,EAAE,GAAGJ,aAA0BE;IACvD,qBACE,AAbJ,cAaKC,MAAME,IAAI,EAAKD,UAAUC,IAAI,gBAC5B,AAdN,cAcOF,MAAMG,MAAM,EAAKF,UAAUE,MAAM,EAAGF,UAAUE,MAAM,CAACC,QAAQ,iBAC9D,AAfN,cAeOJ,MAAMK,IAAI,EAAKJ,UAAUI,IAAI;AAGpC,EAAE"}
1
+ {"version":3,"sources":["renderSelect.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { SelectSlots, SelectState } from './Select.types';\n\n/**\n * Render the final JSX of Select\n */\nexport const renderSelect_unstable = (state: SelectState) => {\n assertSlots<SelectSlots>(state);\n return (\n <state.root>\n <state.select>{state.select.children}</state.select>\n <state.icon />\n </state.root>\n );\n};\n"],"names":["createElement","assertSlots","renderSelect_unstable","state","root","select","children","icon"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAE5D,SAASC,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,wBAAwB,CAACC,QAAuB;IAC3DF,YAAyBE;IACzB,qBACE,AAbJ,cAaKA,MAAMC,IAAI,sBACT,AAdN,cAcOD,MAAME,MAAM,QAAEF,MAAME,MAAM,CAACC,QAAQ,iBACpC,AAfN,cAeOH,MAAMI,IAAI;AAGjB,EAAE"}
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { useFieldControlProps_unstable } from '@fluentui/react-field';
3
- import { getPartitionedNativeProps, resolveShorthand, useEventCallback } from '@fluentui/react-utilities';
3
+ import { getPartitionedNativeProps, useEventCallback, slot } from '@fluentui/react-utilities';
4
4
  import { ChevronDownRegular } from '@fluentui/react-icons';
5
5
  import { useOverrides_unstable as useOverrides } from '@fluentui/react-shared-contexts';
6
6
  /**
@@ -40,24 +40,25 @@ import { useOverrides_unstable as useOverrides } from '@fluentui/react-shared-co
40
40
  select: 'select',
41
41
  icon: 'span'
42
42
  },
43
- select: resolveShorthand(select, {
44
- required: true,
43
+ select: slot.always(select, {
45
44
  defaultProps: {
46
45
  defaultValue,
47
46
  value,
48
47
  ref,
49
48
  ...nativeProps.primary
50
- }
49
+ },
50
+ elementType: 'select'
51
51
  }),
52
- icon: resolveShorthand(icon, {
53
- required: true,
52
+ icon: slot.optional(icon, {
53
+ renderByDefault: true,
54
54
  defaultProps: {
55
55
  children: /*#__PURE__*/ React.createElement(ChevronDownRegular, null)
56
- }
56
+ },
57
+ elementType: 'span'
57
58
  }),
58
- root: resolveShorthand(root, {
59
- required: true,
60
- defaultProps: nativeProps.root
59
+ root: slot.always(root, {
60
+ defaultProps: nativeProps.root,
61
+ elementType: 'span'
61
62
  })
62
63
  };
63
64
  state.select.onChange = useEventCallback((event)=>{
@@ -1 +1 @@
1
- {"version":3,"sources":["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"],"names":["React","useFieldControlProps_unstable","getPartitionedNativeProps","resolveShorthand","useEventCallback","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","required","defaultProps","primary","children","event","target"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,6BAA6B,QAAQ,wBAAwB;AACtE,SAASC,yBAAyB,EAAEC,gBAAgB,EAAEC,gBAAgB,QAAQ,4BAA4B;AAC1G,SAASC,kBAAkB,QAAQ,wBAAwB;AAE3D,SAASC,yBAAyBC,YAAY,QAAQ,kCAAkC;AAExF;;;;;;;;CAQC,GACD,OAAO,MAAMC,qBAAqB,CAACC,OAAoBC,MAAmD;IACxG,+CAA+C;IAC/CD,QAAQR,8BAA8BQ,OAAO;QAAEE,kBAAkB,IAAI;QAAEC,kBAAkB,IAAI;QAAEC,cAAc,IAAI;IAAC;IAElH,MAAMC,YAAYP;QAQHO;IANf,MAAM,EACJC,aAAY,EACZC,MAAK,EACLC,OAAM,EACNC,KAAI,EACJC,KAAI,EACJC,YAAaN,CAAAA,oCAAAA,UAAUO,sBAAsB,cAAhCP,+CAAAA,oCAAoC,SAAS,CAAA,EAE1DQ,SAAQ,EACRC,MAAO,SAAQ,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,QAAQd,iBAAiBc,QAAQ;YAC/BY,UAAU,IAAI;YACdC,cAAc;gBACZf;gBACAC;gBACAN;gBACA,GAAGc,YAAYO,OAAO;YACxB;QACF;QACAb,MAAMf,iBAAiBe,MAAM;YAC3BW,UAAU,IAAI;YACdC,cAAc;gBAAEE,wBAAU,oBAAC3B;YAAsB;QACnD;QACAc,MAAMhB,iBAAiBgB,MAAM;YAC3BU,UAAU,IAAI;YACdC,cAAcN,YAAYL,IAAI;QAChC;IACF;IAEAQ,MAAMV,MAAM,CAACK,QAAQ,GAAGlB,iBAAiB6B,CAAAA,QAAS;QAChDX,qBAAAA,sBAAAA,KAAAA,IAAAA,SAAWW,OAAO;YAAEjB,OAAO,AAACiB,MAAMC,MAAM,CAAuBlB,KAAK;QAAC;IACvE;IAEA,OAAOW;AACT,EAAE"}
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,MAAmD;IACxG,+CAA+C;IAC/CD,QAAQR,8BAA8BQ,OAAO;QAAEE,kBAAkB,IAAI;QAAEC,kBAAkB,IAAI;QAAEC,cAAc,IAAI;IAAC;IAElH,MAAMC,YAAYP;QAQHO;IANf,MAAM,EACJC,aAAY,EACZC,MAAK,EACLC,OAAM,EACNC,KAAI,EACJC,KAAI,EACJC,YAAaN,CAAAA,oCAAAA,UAAUO,sBAAsB,cAAhCP,+CAAAA,oCAAoC,SAAS,CAAA,EAE1DQ,SAAQ,EACRC,MAAO,SAAQ,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,IAAI;YACrBJ,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,QAAS;QAChDd,qBAAAA,sBAAAA,KAAAA,IAAAA,SAAWc,OAAO;YAAEpB,OAAO,AAACoB,MAAMC,MAAM,CAAuBrB,KAAK;QAAC;IACvE;IAEA,OAAOW;AACT,EAAE"}
@@ -9,6 +9,6 @@ Object.defineProperty(exports, "renderSelect_unstable", {
9
9
  const _reactJsxRuntime = require("@fluentui/react-jsx-runtime");
10
10
  const _reactUtilities = require("@fluentui/react-utilities");
11
11
  const renderSelect_unstable = (state)=>{
12
- const { slots , slotProps } = (0, _reactUtilities.getSlotsNext)(state);
13
- return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.root, slotProps.root, /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.select, slotProps.select, slotProps.select.children), /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.icon, slotProps.icon));
12
+ (0, _reactUtilities.assertSlots)(state);
13
+ return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.root, null, /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.select, null, state.select.children), /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.icon, null));
14
14
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderSelect.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of Select\n */ export const renderSelect_unstable = (state)=>{\n const { slots , slotProps } = getSlotsNext(state);\n return /*#__PURE__*/ createElement(slots.root, slotProps.root, /*#__PURE__*/ createElement(slots.select, slotProps.select, slotProps.select.children), /*#__PURE__*/ createElement(slots.icon, slotProps.icon));\n};\n"],"names":["renderSelect_unstable","state","slots","slotProps","getSlotsNext","createElement","root","select","children","icon"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAIjCA;;aAAAA;;iCAJkE;gCACtD;AAGlB,MAAMA,wBAAwB,CAACC,QAAQ;IAC9C,MAAM,EAAEC,MAAK,EAAGC,UAAS,EAAG,GAAGC,IAAAA,4BAAY,EAACH;IAC5C,OAAO,WAAW,GAAGI,IAAAA,8BAAa,EAACH,MAAMI,IAAI,EAAEH,UAAUG,IAAI,EAAE,WAAW,GAAGD,IAAAA,8BAAa,EAACH,MAAMK,MAAM,EAAEJ,UAAUI,MAAM,EAAEJ,UAAUI,MAAM,CAACC,QAAQ,GAAG,WAAW,GAAGH,IAAAA,8BAAa,EAACH,MAAMO,IAAI,EAAEN,UAAUM,IAAI;AACjN"}
1
+ {"version":3,"sources":["renderSelect.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { assertSlots } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of Select\n */ export const renderSelect_unstable = (state)=>{\n assertSlots(state);\n return /*#__PURE__*/ createElement(state.root, null, /*#__PURE__*/ createElement(state.select, null, state.select.children), /*#__PURE__*/ createElement(state.icon, null));\n};\n"],"names":["renderSelect_unstable","state","assertSlots","createElement","root","select","children","icon"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAIjCA;;aAAAA;;iCAJkE;gCACvD;AAGjB,MAAMA,wBAAwB,CAACC,QAAQ;IAC9CC,IAAAA,2BAAW,EAACD;IACZ,OAAO,WAAW,GAAGE,IAAAA,8BAAa,EAACF,MAAMG,IAAI,EAAE,IAAI,EAAE,WAAW,GAAGD,IAAAA,8BAAa,EAACF,MAAMI,MAAM,EAAE,IAAI,EAAEJ,MAAMI,MAAM,CAACC,QAAQ,GAAG,WAAW,GAAGH,IAAAA,8BAAa,EAACF,MAAMM,IAAI,EAAE,IAAI;AAC7K"}
@@ -41,24 +41,25 @@ const useSelect_unstable = (props, ref)=>{
41
41
  select: 'select',
42
42
  icon: 'span'
43
43
  },
44
- select: (0, _reactUtilities.resolveShorthand)(select, {
45
- required: true,
44
+ select: _reactUtilities.slot.always(select, {
46
45
  defaultProps: {
47
46
  defaultValue,
48
47
  value,
49
48
  ref,
50
49
  ...nativeProps.primary
51
- }
50
+ },
51
+ elementType: 'select'
52
52
  }),
53
- icon: (0, _reactUtilities.resolveShorthand)(icon, {
54
- required: true,
53
+ icon: _reactUtilities.slot.optional(icon, {
54
+ renderByDefault: true,
55
55
  defaultProps: {
56
56
  children: /*#__PURE__*/ _react.createElement(_reactIcons.ChevronDownRegular, null)
57
- }
57
+ },
58
+ elementType: 'span'
58
59
  }),
59
- root: (0, _reactUtilities.resolveShorthand)(root, {
60
- required: true,
61
- defaultProps: nativeProps.root
60
+ root: _reactUtilities.slot.always(root, {
61
+ defaultProps: nativeProps.root,
62
+ elementType: 'span'
62
63
  })
63
64
  };
64
65
  state.select.onChange = (0, _reactUtilities.useEventCallback)((event)=>{
@@ -1 +1 @@
1
- {"version":3,"sources":["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 */ 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: 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"],"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":";;;;+BAaiBA;;aAAAA;;;6DAbM;4BACuB;gCACgC;4BAC3C;qCACmB;AAS3C,MAAMA,qBAAqB,CAACC,OAAOC,MAAM;IAChD,+CAA+C;IAC/CD,QAAQE,IAAAA,yCAA6B,EAACF,OAAO;QACzCG,kBAAkB,IAAI;QACtBC,kBAAkB,IAAI;QACtBC,cAAc,IAAI;IACtB;IACA,MAAMC,YAAYC,IAAAA,0CAAY;IAC9B,IAAIC;IACJ,MAAM,EAAEC,aAAY,EAAGC,MAAK,EAAGC,OAAM,EAAGC,KAAI,EAAGC,KAAI,EAAGC,YAAY,AAACN,CAAAA,oCAAoCF,UAAUS,sBAAsB,AAAD,MAAO,IAAI,IAAIP,sCAAsC,KAAK,IAAIA,oCAAoC,SAAS,CAAA,EAAGQ,SAAQ,EAAGC,MAAM,SAAQ,EAAG,GAAGjB;IACnR,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,IAAAA,gCAAgB,EAACb,QAAQ;YAC7Bc,UAAU,IAAI;YACdC,cAAc;gBACVjB;gBACAC;gBACAT;gBACA,GAAGiB,YAAYS,OAAO;YAC1B;QACJ;QACAf,MAAMY,IAAAA,gCAAgB,EAACZ,MAAM;YACzBa,UAAU,IAAI;YACdC,cAAc;gBACVE,UAAU,WAAW,GAAGC,OAAMC,aAAa,CAACC,8BAAkB,EAAE,IAAI;YACxE;QACJ;QACAlB,MAAMW,IAAAA,gCAAgB,EAACX,MAAM;YACzBY,UAAU,IAAI;YACdC,cAAcR,YAAYL,IAAI;QAClC;IACJ;IACAS,MAAMX,MAAM,CAACK,QAAQ,GAAGgB,IAAAA,gCAAgB,EAAC,CAACC,QAAQ;QAC9CjB,aAAa,IAAI,IAAIA,aAAa,KAAK,IAAI,KAAK,IAAIA,SAASiB,OAAO;YAChEvB,OAAOuB,MAAMC,MAAM,CAACxB,KAAK;QAC7B,EAAE;IACN;IACA,OAAOY;AACX"}
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;;aAAAA;;;6DAbM;4BACuB;gCACoB;4BAC/B;qCACmB;AAS3C,MAAMA,qBAAqB,CAACC,OAAOC,MAAM;IAChD,+CAA+C;IAC/CD,QAAQE,IAAAA,yCAA6B,EAACF,OAAO;QACzCG,kBAAkB,IAAI;QACtBC,kBAAkB,IAAI;QACtBC,cAAc,IAAI;IACtB;IACA,MAAMC,YAAYC,IAAAA,0CAAY;IAC9B,IAAIC;IACJ,MAAM,EAAEC,aAAY,EAAGC,MAAK,EAAGC,OAAM,EAAGC,KAAI,EAAGC,KAAI,EAAGC,YAAY,AAACN,CAAAA,oCAAoCF,UAAUS,sBAAsB,AAAD,MAAO,IAAI,IAAIP,sCAAsC,KAAK,IAAIA,oCAAoC,SAAS,CAAA,EAAGQ,SAAQ,EAAGC,MAAM,SAAQ,EAAG,GAAGjB;IACnR,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,IAAI;YACrBJ,cAAc;gBACVK,UAAU,WAAW,GAAGC,OAAMC,aAAa,CAACC,8BAAkB,EAAE,IAAI;YACxE;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,QAAQ;QAC9CpB,aAAa,IAAI,IAAIA,aAAa,KAAK,IAAI,KAAK,IAAIA,SAASoB,OAAO;YAChE1B,OAAO0B,MAAMC,MAAM,CAAC3B,KAAK;QAC7B,EAAE;IACN;IACA,OAAOY;AACX"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-select",
3
- "version": "0.0.0-nightly-20230807-0415.1",
3
+ "version": "0.0.0-nightly-20230808-0415.1",
4
4
  "description": "Fluent UI React Select component",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -27,18 +27,18 @@
27
27
  },
28
28
  "devDependencies": {
29
29
  "@fluentui/eslint-plugin": "*",
30
- "@fluentui/react-conformance": "0.0.0-nightly-20230807-0415.1",
31
- "@fluentui/react-conformance-griffel": "0.0.0-nightly-20230807-0415.1",
30
+ "@fluentui/react-conformance": "0.0.0-nightly-20230808-0415.1",
31
+ "@fluentui/react-conformance-griffel": "0.0.0-nightly-20230808-0415.1",
32
32
  "@fluentui/scripts-api-extractor": "*",
33
33
  "@fluentui/scripts-tasks": "*"
34
34
  },
35
35
  "dependencies": {
36
- "@fluentui/react-field": "0.0.0-nightly-20230807-0415.1",
36
+ "@fluentui/react-field": "0.0.0-nightly-20230808-0415.1",
37
37
  "@fluentui/react-icons": "^2.0.207",
38
- "@fluentui/react-jsx-runtime": "0.0.0-nightly-20230807-0415.1",
39
- "@fluentui/react-shared-contexts": "0.0.0-nightly-20230807-0415.1",
40
- "@fluentui/react-theme": "0.0.0-nightly-20230807-0415.1",
41
- "@fluentui/react-utilities": "0.0.0-nightly-20230807-0415.1",
38
+ "@fluentui/react-jsx-runtime": "0.0.0-nightly-20230808-0415.1",
39
+ "@fluentui/react-shared-contexts": "0.0.0-nightly-20230808-0415.1",
40
+ "@fluentui/react-theme": "0.0.0-nightly-20230808-0415.1",
41
+ "@fluentui/react-utilities": "0.0.0-nightly-20230808-0415.1",
42
42
  "@griffel/react": "^1.5.7",
43
43
  "@swc/helpers": "^0.4.14"
44
44
  },