@fluentui/react-select 9.0.0-beta.18 → 9.0.0-beta.19

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.
Files changed (34) hide show
  1. package/CHANGELOG.json +42 -1
  2. package/CHANGELOG.md +14 -2
  3. package/lib/components/Select/Select.js +0 -1
  4. package/lib/components/Select/Select.js.map +1 -1
  5. package/lib/components/Select/renderSelect.js +6 -4
  6. package/lib/components/Select/renderSelect.js.map +1 -1
  7. package/lib/components/Select/useSelect.js +0 -1
  8. package/lib/components/Select/useSelect.js.map +1 -1
  9. package/lib/components/Select/useSelectStyles.js +187 -196
  10. package/lib/components/Select/useSelectStyles.js.map +1 -1
  11. package/lib/components/SelectField/SelectField.js.map +1 -1
  12. package/lib/index.js.map +1 -1
  13. package/lib-commonjs/Select.js +0 -2
  14. package/lib-commonjs/Select.js.map +1 -1
  15. package/lib-commonjs/SelectField.js +0 -2
  16. package/lib-commonjs/SelectField.js.map +1 -1
  17. package/lib-commonjs/components/Select/Select.js +0 -6
  18. package/lib-commonjs/components/Select/Select.js.map +1 -1
  19. package/lib-commonjs/components/Select/Select.types.js.map +1 -1
  20. package/lib-commonjs/components/Select/index.js +0 -6
  21. package/lib-commonjs/components/Select/index.js.map +1 -1
  22. package/lib-commonjs/components/Select/renderSelect.js +6 -8
  23. package/lib-commonjs/components/Select/renderSelect.js.map +1 -1
  24. package/lib-commonjs/components/Select/useSelect.js +0 -6
  25. package/lib-commonjs/components/Select/useSelect.js.map +1 -1
  26. package/lib-commonjs/components/Select/useSelectStyles.js +187 -200
  27. package/lib-commonjs/components/Select/useSelectStyles.js.map +1 -1
  28. package/lib-commonjs/components/SelectField/SelectField.js +0 -4
  29. package/lib-commonjs/components/SelectField/SelectField.js.map +1 -1
  30. package/lib-commonjs/components/SelectField/index.js +0 -2
  31. package/lib-commonjs/components/SelectField/index.js.map +1 -1
  32. package/lib-commonjs/index.js +0 -4
  33. package/lib-commonjs/index.js.map +1 -1
  34. package/package.json +5 -5
package/CHANGELOG.json CHANGED
@@ -2,7 +2,48 @@
2
2
  "name": "@fluentui/react-select",
3
3
  "entries": [
4
4
  {
5
- "date": "Wed, 21 Dec 2022 10:17:13 GMT",
5
+ "date": "Wed, 04 Jan 2023 01:35:47 GMT",
6
+ "tag": "@fluentui/react-select_v9.0.0-beta.19",
7
+ "version": "9.0.0-beta.19",
8
+ "comments": {
9
+ "none": [
10
+ {
11
+ "author": "martinhochel@microsoft.com",
12
+ "package": "@fluentui/react-select",
13
+ "commit": "4ec2b998b294d6d9c3196d3d82893bdd97d0c105",
14
+ "comment": "chore(scripts): move index.ts to to follow sub-folder domain packaging"
15
+ }
16
+ ],
17
+ "prerelease": [
18
+ {
19
+ "author": "olfedias@microsoft.com",
20
+ "package": "@fluentui/react-select",
21
+ "commit": "2c38f1e4ae07b2b60df596efe11015a68f166dbf",
22
+ "comment": "chore: Update Griffel to latest version"
23
+ },
24
+ {
25
+ "author": "beachball",
26
+ "package": "@fluentui/react-select",
27
+ "comment": "Bump @fluentui/react-field to v9.0.0-alpha.13",
28
+ "commit": "3e322d15529451be153e97298873253e21af4082"
29
+ },
30
+ {
31
+ "author": "beachball",
32
+ "package": "@fluentui/react-select",
33
+ "comment": "Bump @fluentui/react-utilities to v9.3.1",
34
+ "commit": "3e322d15529451be153e97298873253e21af4082"
35
+ },
36
+ {
37
+ "author": "beachball",
38
+ "package": "@fluentui/react-select",
39
+ "comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.19",
40
+ "commit": "3e322d15529451be153e97298873253e21af4082"
41
+ }
42
+ ]
43
+ }
44
+ },
45
+ {
46
+ "date": "Wed, 21 Dec 2022 10:20:30 GMT",
6
47
  "tag": "@fluentui/react-select_v9.0.0-beta.18",
7
48
  "version": "9.0.0-beta.18",
8
49
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,24 @@
1
1
  # Change Log - @fluentui/react-select
2
2
 
3
- This log was last generated on Wed, 21 Dec 2022 10:17:13 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 04 Jan 2023 01:35:47 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.0.0-beta.19](https://github.com/microsoft/fluentui/tree/@fluentui/react-select_v9.0.0-beta.19)
8
+
9
+ Wed, 04 Jan 2023 01:35:47 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-select_v9.0.0-beta.18..@fluentui/react-select_v9.0.0-beta.19)
11
+
12
+ ### Changes
13
+
14
+ - chore: Update Griffel to latest version ([PR #26045](https://github.com/microsoft/fluentui/pull/26045) by olfedias@microsoft.com)
15
+ - Bump @fluentui/react-field to v9.0.0-alpha.13 ([PR #26114](https://github.com/microsoft/fluentui/pull/26114) by beachball)
16
+ - Bump @fluentui/react-utilities to v9.3.1 ([PR #26114](https://github.com/microsoft/fluentui/pull/26114) by beachball)
17
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.19 ([PR #26114](https://github.com/microsoft/fluentui/pull/26114) by beachball)
18
+
7
19
  ## [9.0.0-beta.18](https://github.com/microsoft/fluentui/tree/@fluentui/react-select_v9.0.0-beta.18)
8
20
 
9
- Wed, 21 Dec 2022 10:17:13 GMT
21
+ Wed, 21 Dec 2022 10:20:30 GMT
10
22
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-select_v9.0.0-beta.17..@fluentui/react-select_v9.0.0-beta.18)
11
23
 
12
24
  ### Changes
@@ -5,7 +5,6 @@ import { useSelectStyles_unstable } from './useSelectStyles';
5
5
  /**
6
6
  * Select component
7
7
  */
8
-
9
8
  export const Select = /*#__PURE__*/React.forwardRef((props, ref) => {
10
9
  const state = useSelect_unstable(props, ref);
11
10
  useSelectStyles_unstable(state);
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-select/src/components/Select/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,kBAAT,QAAmC,aAAnC;AACA,SAAS,qBAAT,QAAsC,gBAAtC;AACA,SAAS,wBAAT,QAAyC,mBAAzC;AAIA;;AAEG;;AACH,OAAO,MAAM,MAAM,gBAAqC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EACtF,MAAM,KAAK,GAAG,kBAAkB,CAAC,KAAD,EAAQ,GAAR,CAAhC;EAEA,wBAAwB,CAAC,KAAD,CAAxB;EACA,OAAO,qBAAqB,CAAC,KAAD,CAA5B;AACD,CALuD,CAAjD;AAOP,MAAM,CAAC,WAAP,GAAqB,QAArB","sourcesContent":["import * as React from 'react';\nimport { useSelect_unstable } from './useSelect';\nimport { renderSelect_unstable } from './renderSelect';\nimport { useSelectStyles_unstable } from './useSelectStyles';\nimport type { SelectProps } from './Select.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * Select component\n */\nexport const Select: ForwardRefComponent<SelectProps> = React.forwardRef((props, ref) => {\n const state = useSelect_unstable(props, ref);\n\n useSelectStyles_unstable(state);\n return renderSelect_unstable(state);\n});\n\nSelect.displayName = 'Select';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,kBAAkB,QAAQ,aAAa;AAChD,SAASC,qBAAqB,QAAQ,gBAAgB;AACtD,SAASC,wBAAwB,QAAQ,mBAAmB;AAI5D;;;AAGA,OAAO,MAAMC,MAAM,gBAAqCJ,KAAK,CAACK,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EACtF,MAAMC,KAAK,GAAGP,kBAAkB,CAACK,KAAK,EAAEC,GAAG,CAAC;EAE5CJ,wBAAwB,CAACK,KAAK,CAAC;EAC/B,OAAON,qBAAqB,CAACM,KAAK,CAAC;AACrC,CAAC,CAAC;AAEFJ,MAAM,CAACK,WAAW,GAAG,QAAQ","names":["React","useSelect_unstable","renderSelect_unstable","useSelectStyles_unstable","Select","forwardRef","props","ref","state","displayName"],"sourceRoot":"../src/","sources":["packages/react-components/react-select/src/components/Select/Select.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useSelect_unstable } from './useSelect';\nimport { renderSelect_unstable } from './renderSelect';\nimport { useSelectStyles_unstable } from './useSelectStyles';\nimport type { SelectProps } from './Select.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * Select component\n */\nexport const Select: ForwardRefComponent<SelectProps> = React.forwardRef((props, ref) => {\n const state = useSelect_unstable(props, ref);\n\n useSelectStyles_unstable(state);\n return renderSelect_unstable(state);\n});\n\nSelect.displayName = 'Select';\n"]}
@@ -3,15 +3,17 @@ import { getSlots } from '@fluentui/react-utilities';
3
3
  /**
4
4
  * Render the final JSX of Select
5
5
  */
6
-
7
6
  export const renderSelect_unstable = state => {
8
7
  const {
9
8
  slots,
10
9
  slotProps
11
10
  } = getSlots(state);
12
- return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
13
- }, /*#__PURE__*/React.createElement(slots.select, { ...slotProps.select
14
- }, slotProps.select.children), /*#__PURE__*/React.createElement(slots.icon, { ...slotProps.icon
11
+ return /*#__PURE__*/React.createElement(slots.root, {
12
+ ...slotProps.root
13
+ }, /*#__PURE__*/React.createElement(slots.select, {
14
+ ...slotProps.select
15
+ }, slotProps.select.children), /*#__PURE__*/React.createElement(slots.icon, {
16
+ ...slotProps.icon
15
17
  }));
16
18
  };
17
19
  //# sourceMappingURL=renderSelect.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-select/src/components/Select/renderSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,qBAAqB,GAAI,KAAD,IAAuB;EAC1D,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAc,KAAd,CAArC;EACA,oBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,eACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,MAAP,EAAa,EAAA,GAAK,SAAS,CAAC;EAAf,CAAb,EAAqC,SAAS,CAAC,MAAV,CAAiB,QAAtD,CADF,eAEE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CAFF,CADF;AAMD,CARM","sourcesContent":["import * as React from 'react';\nimport { getSlots } 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 } = getSlots<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"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,2BAA2B;AAGpD;;;AAGA,OAAO,MAAMC,qBAAqB,GAAIC,KAAkB,IAAI;EAC1D,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,QAAQ,CAAcE,KAAK,CAAC;EACzD,oBACEH,oBAACI,KAAK,CAACE,IAAI;IAAA,GAAKD,SAAS,CAACC;EAAI,gBAC5BN,oBAACI,KAAK,CAACG,MAAM;IAAA,GAAKF,SAAS,CAACE;EAAM,GAAGF,SAAS,CAACE,MAAM,CAACC,QAAQ,CAAgB,eAC9ER,oBAACI,KAAK,CAACK,IAAI;IAAA,GAAKJ,SAAS,CAACI;EAAI,EAAI,CACvB;AAEjB,CAAC","names":["React","getSlots","renderSelect_unstable","state","slots","slotProps","root","select","children","icon"],"sourceRoot":"../src/","sources":["packages/react-components/react-select/src/components/Select/renderSelect.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } 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 } = getSlots<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"]}
@@ -10,7 +10,6 @@ import { ChevronDownRegular } from '@fluentui/react-icons';
10
10
  * @param props - props from this instance of Select
11
11
  * @param ref - reference to the `<select>` element in Select
12
12
  */
13
-
14
13
  export const useSelect_unstable = (props, ref) => {
15
14
  const {
16
15
  defaultValue,
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-select/src/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/"}
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,yBAAyB,EAAEC,gBAAgB,EAAEC,gBAAgB,QAAQ,2BAA2B;AACzG,SAASC,kBAAkB,QAAQ,uBAAuB;AAG1D;;;;;;;;;AASA,OAAO,MAAMC,kBAAkB,GAAG,CAACC,KAAkB,EAAEC,GAAiC,KAAiB;EACvG,MAAM;IACJC,YAAY;IACZC,KAAK;IACLC,MAAM;IACNC,IAAI;IACJC,IAAI;IACJC,UAAU,GAAG,SAAS;IAEtBC,QAAQ;IACRC,IAAI,GAAG;EAAQ,CAChB,GAAGT,KAAK;EAET,MAAMU,WAAW,GAAGf,yBAAyB,CAAC;IAC5CK,KAAK;IACLW,kBAAkB,EAAE,QAAQ;IAC5BC,iBAAiB,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO;GAC9E,CAAC;EAEF,MAAMC,KAAK,GAAgB;IACzBJ,IAAI;IACJF,UAAU;IACVO,UAAU,EAAE;MACVR,IAAI,EAAE,MAAM;MACZF,MAAM,EAAE,QAAQ;MAChBC,IAAI,EAAE;KACP;IACDD,MAAM,EAAER,gBAAgB,CAACQ,MAAM,EAAE;MAC/BW,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAE;QACZd,YAAY;QACZC,KAAK;QACLF,GAAG;QACH,GAAGS,WAAW,CAACO;;KAElB,CAAC;IACFZ,IAAI,EAAET,gBAAgB,CAACS,IAAI,EAAE;MAC3BU,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAE;QAAEE,QAAQ,eAAExB,oBAACI,kBAAkB;MAAG;KACjD,CAAC;IACFQ,IAAI,EAAEV,gBAAgB,CAACU,IAAI,EAAE;MAC3BS,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAEN,WAAW,CAACJ;KAC3B;GACF;EAEDO,KAAK,CAACT,MAAM,CAACI,QAAQ,GAAGX,gBAAgB,CAACsB,KAAK,IAAG;IAC/CX,QAAQ,aAARA,QAAQ,uBAARA,QAAQ,CAAGW,KAAK,EAAE;MAAEhB,KAAK,EAAGgB,KAAK,CAACC,MAA4B,CAACjB;IAAK,CAAE,CAAC;EACzE,CAAC,CAAC;EAEF,OAAOU,KAAK;AACd,CAAC","names":["React","getPartitionedNativeProps","resolveShorthand","useEventCallback","ChevronDownRegular","useSelect_unstable","props","ref","defaultValue","value","select","icon","root","appearance","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';\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"]}