@fluentui/react-select 0.0.0-nightly-20230317-1454.1 → 0.0.0-nightly-20230321-0440.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.
Files changed (48) hide show
  1. package/CHANGELOG.json +13 -13
  2. package/CHANGELOG.md +9 -9
  3. package/lib/Select.js +1 -1
  4. package/lib/Select.js.map +1 -1
  5. package/lib/SelectField.js +1 -1
  6. package/lib/SelectField.js.map +1 -1
  7. package/lib/components/Select/Select.js +6 -6
  8. package/lib/components/Select/Select.js.map +1 -1
  9. package/lib/components/Select/Select.types.js +1 -1
  10. package/lib/components/Select/Select.types.js.map +1 -1
  11. package/lib/components/Select/index.js +5 -5
  12. package/lib/components/Select/index.js.map +1 -1
  13. package/lib/components/Select/renderSelect.js +9 -3
  14. package/lib/components/Select/renderSelect.js.map +1 -1
  15. package/lib/components/Select/useSelect.js +13 -12
  16. package/lib/components/Select/useSelect.js.map +1 -1
  17. package/lib/components/Select/useSelectStyles.js +13 -13
  18. package/lib/components/Select/useSelectStyles.js.map +1 -1
  19. package/lib/components/SelectField/SelectField.js +3 -2
  20. package/lib/components/SelectField/SelectField.js.map +1 -1
  21. package/lib/components/SelectField/index.js +1 -1
  22. package/lib/components/SelectField/index.js.map +1 -1
  23. package/lib/index.js +2 -2
  24. package/lib/index.js.map +1 -1
  25. package/lib-commonjs/Select.js +4 -5
  26. package/lib-commonjs/Select.js.map +1 -1
  27. package/lib-commonjs/SelectField.js +4 -5
  28. package/lib-commonjs/SelectField.js.map +1 -1
  29. package/lib-commonjs/components/Select/Select.js +20 -19
  30. package/lib-commonjs/components/Select/Select.js.map +1 -1
  31. package/lib-commonjs/components/Select/Select.types.js +2 -5
  32. package/lib-commonjs/components/Select/Select.types.js.map +1 -1
  33. package/lib-commonjs/components/Select/index.js +8 -9
  34. package/lib-commonjs/components/Select/index.js.map +1 -1
  35. package/lib-commonjs/components/Select/renderSelect.js +22 -13
  36. package/lib-commonjs/components/Select/renderSelect.js.map +1 -1
  37. package/lib-commonjs/components/Select/useSelect.js +69 -59
  38. package/lib-commonjs/components/Select/useSelect.js.map +1 -1
  39. package/lib-commonjs/components/Select/useSelectStyles.js +272 -589
  40. package/lib-commonjs/components/Select/useSelectStyles.js.map +1 -1
  41. package/lib-commonjs/components/SelectField/SelectField.js +11 -17
  42. package/lib-commonjs/components/SelectField/SelectField.js.map +1 -1
  43. package/lib-commonjs/components/SelectField/index.js +4 -5
  44. package/lib-commonjs/components/SelectField/index.js.map +1 -1
  45. package/lib-commonjs/index.js +49 -21
  46. package/lib-commonjs/index.js.map +1 -1
  47. package/package.json +10 -9
  48. package/.swcrc +0 -39
@@ -1,9 +1,6 @@
1
1
  "use strict";
2
+
2
3
  Object.defineProperty(exports, "__esModule", {
3
- value: true
4
+ value: true
4
5
  });
5
- const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
6
- const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
7
- //# sourceMappingURL=Select.types.js.map
8
-
9
6
  //# sourceMappingURL=Select.types.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/Select/Select.types.js"],"sourcesContent":["import * as React from \"react\";\n//# sourceMappingURL=Select.types.js.map"],"names":[],"mappings":";;;;;6DAAuB;CACvB,wCAAwC"}
1
+ {"version":3,"names":[],"sources":["../../../../../../../../../packages/react-components/react-select/src/components/Select/Select.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type SelectSlots = {\n /*\n * Wrapper for both the select and icon, renders as a `<span>`.\n * The `className` and `style` props on `<Select>` are applied to this slot;\n * All other top-level props are applied to the primary slot, `select`.\n */\n root: NonNullable<Slot<'span'>>;\n\n /** Primary slot: the actual `<select>` element */\n select: NonNullable<Slot<'select'>>;\n\n /** the icon, typically a down arrow */\n icon: Slot<'span'>;\n};\n\nexport type SelectProps = Omit<ComponentProps<Partial<SelectSlots>, 'select'>, 'size' | 'onChange'> & {\n /**\n * Controls the colors and borders of the Select.\n *\n * @default 'outline'\n */\n appearance?: 'outline' | 'underline' | 'filled-darker' | 'filled-lighter';\n\n /**\n * Called when the user changes the select element's value by selecting an option.\n */\n onChange?: (ev: React.ChangeEvent<HTMLSelectElement>, data: SelectOnChangeData) => void;\n\n /**\n * Matches the Input sizes\n *\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n};\n\nexport type SelectState = ComponentState<SelectSlots> & Required<Pick<SelectProps, 'appearance' | 'size'>>;\n\n/**\n * Data passed to the `onChange` callback when a new option is selected.\n */\nexport type SelectOnChangeData = {\n /**\n * Updated `<select>` value, taken from either the selected option's value prop or inner text.\n */\n value: string;\n};\n"],"mappings":""}
@@ -1,13 +1,12 @@
1
1
  "use strict";
2
+
2
3
  Object.defineProperty(exports, "__esModule", {
3
- value: true
4
+ value: true
4
5
  });
5
- const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
- _exportStar(require("./Select"), exports);
7
- _exportStar(require("./Select.types"), exports);
8
- _exportStar(require("./renderSelect"), exports);
9
- _exportStar(require("./useSelect"), exports);
10
- _exportStar(require("./useSelectStyles"), exports);
11
- //# sourceMappingURL=index.js.map
12
-
6
+ const tslib_1 = /*#__PURE__*/require("tslib");
7
+ tslib_1.__exportStar(require("./Select"), exports);
8
+ tslib_1.__exportStar(require("./Select.types"), exports);
9
+ tslib_1.__exportStar(require("./renderSelect"), exports);
10
+ tslib_1.__exportStar(require("./useSelect"), exports);
11
+ tslib_1.__exportStar(require("./useSelectStyles"), exports);
13
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/Select/index.js"],"sourcesContent":["export * from \"./Select\";\nexport * from \"./Select.types\";\nexport * from \"./renderSelect\";\nexport * from \"./useSelect\";\nexport * from \"./useSelectStyles\";\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;CACd,iCAAiC"}
1
+ {"version":3,"names":["tslib_1","__exportStar","require","exports"],"sources":["../../../../../../../../../packages/react-components/react-select/src/components/Select/index.ts"],"sourcesContent":["export * from './Select';\nexport * from './Select.types';\nexport * from './renderSelect';\nexport * from './useSelect';\nexport * from './useSelectStyles';\n"],"mappings":";;;;;;AAAAA,OAAA,CAAAC,YAAA,CAAAC,OAAA,cAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,oBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,oBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,iBAAAC,OAAA;AACAH,OAAA,CAAAC,YAAA,CAAAC,OAAA,uBAAAC,OAAA"}
@@ -1,17 +1,26 @@
1
1
  "use strict";
2
+
2
3
  Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "renderSelect_unstable", {
6
- enumerable: true,
7
- get: ()=>renderSelect_unstable
4
+ value: true
8
5
  });
9
- const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
- const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
- const _reactUtilities = require("@fluentui/react-utilities");
12
- const renderSelect_unstable = (state)=>{
13
- const { slots , slotProps } = (0, _reactUtilities.getSlots)(state);
14
- return /*#__PURE__*/ _react.createElement(slots.root, slotProps.root, /*#__PURE__*/ _react.createElement(slots.select, slotProps.select, slotProps.select.children), /*#__PURE__*/ _react.createElement(slots.icon, slotProps.icon));
15
- }; //# sourceMappingURL=renderSelect.js.map
16
-
6
+ exports.renderSelect_unstable = void 0;
7
+ const React = /*#__PURE__*/require("react");
8
+ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
9
+ /**
10
+ * Render the final JSX of Select
11
+ */
12
+ const renderSelect_unstable = state => {
13
+ const {
14
+ slots,
15
+ slotProps
16
+ } = react_utilities_1.getSlots(state);
17
+ return React.createElement(slots.root, {
18
+ ...slotProps.root
19
+ }, React.createElement(slots.select, {
20
+ ...slotProps.select
21
+ }, slotProps.select.children), React.createElement(slots.icon, {
22
+ ...slotProps.icon
23
+ }));
24
+ };
25
+ exports.renderSelect_unstable = renderSelect_unstable;
17
26
  //# sourceMappingURL=renderSelect.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lib/components/Select/renderSelect.js"],"sourcesContent":["import * as React from \"react\";\nimport { getSlots } from \"@fluentui/react-utilities\";\n/**\n * Render the final JSX of Select\n */\nexport const renderSelect_unstable = state => {\n const {\n slots,\n slotProps\n } = getSlots(state);\n return /*#__PURE__*/React.createElement(slots.root, slotProps.root, /*#__PURE__*/React.createElement(slots.select, slotProps.select, slotProps.select.children), /*#__PURE__*/React.createElement(slots.icon, slotProps.icon));\n};\n//# sourceMappingURL=renderSelect.js.map"],"names":["renderSelect_unstable","state","slots","slotProps","getSlots","React","createElement","root","select","children","icon"],"mappings":";;;;+BAKaA;;aAAAA;;;6DALU;gCACE;AAIlB,MAAMA,wBAAwBC,CAAAA,QAAS;IAC5C,MAAM,EACJC,MAAK,EACLC,UAAS,EACV,GAAGC,IAAAA,wBAAQ,EAACH;IACb,OAAO,WAAW,GAAEI,OAAMC,aAAa,CAACJ,MAAMK,IAAI,EAAEJ,UAAUI,IAAI,EAAE,WAAW,GAAEF,OAAMC,aAAa,CAACJ,MAAMM,MAAM,EAAEL,UAAUK,MAAM,EAAEL,UAAUK,MAAM,CAACC,QAAQ,GAAG,WAAW,GAAEJ,OAAMC,aAAa,CAACJ,MAAMQ,IAAI,EAAEP,UAAUO,IAAI;AAC9N,GACA,wCAAwC"}
1
+ {"version":3,"names":["React","require","react_utilities_1","renderSelect_unstable","state","slots","slotProps","getSlots","createElement","root","select","children","icon","exports"],"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"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,iBAAA,gBAAAD,OAAA;AAGA;;;AAGO,MAAME,qBAAqB,GAAIC,KAAkB,IAAI;EAC1D,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,iBAAA,CAAAK,QAAQ,CAAcH,KAAK,CAAC;EACzD,OACEJ,KAAA,CAAAQ,aAAA,CAACH,KAAK,CAACI,IAAI;IAAA,GAAKH,SAAS,CAACG;EAAI,GAC5BT,KAAA,CAAAQ,aAAA,CAACH,KAAK,CAACK,MAAM;IAAA,GAAKJ,SAAS,CAACI;EAAM,GAAGJ,SAAS,CAACI,MAAM,CAACC,QAAQ,CAAgB,EAC9EX,KAAA,CAAAQ,aAAA,CAACH,KAAK,CAACO,IAAI;IAAA,GAAKN,SAAS,CAACM;EAAI,EAAI,CACvB;AAEjB,CAAC;AARYC,OAAA,CAAAV,qBAAqB,GAAAA,qBAAA"}
@@ -1,64 +1,74 @@
1
1
  "use strict";
2
+
2
3
  Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "useSelect_unstable", {
6
- enumerable: true,
7
- get: ()=>useSelect_unstable
4
+ value: true
8
5
  });
9
- const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
- const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
- const _reactUtilities = require("@fluentui/react-utilities");
12
- const _reactIcons = require("@fluentui/react-icons");
13
- const _reactSharedContexts = require("@fluentui/react-shared-contexts");
14
- const useSelect_unstable = (props, ref)=>{
15
- const overrides = (0, _reactSharedContexts.useOverrides_unstable)();
16
- const { defaultValue , value , select , icon , root , appearance =overrides.inputDefaultAppearance ?? "outline" , onChange , size ="medium" } = props;
17
- const nativeProps = (0, _reactUtilities.getPartitionedNativeProps)({
18
- props,
19
- primarySlotTagName: "select",
20
- excludedPropNames: [
21
- "appearance",
22
- "defaultValue",
23
- "onChange",
24
- "size",
25
- "value"
26
- ]
6
+ exports.useSelect_unstable = void 0;
7
+ const React = /*#__PURE__*/require("react");
8
+ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
9
+ const react_icons_1 = /*#__PURE__*/require("@fluentui/react-icons");
10
+ const react_shared_contexts_1 = /*#__PURE__*/require("@fluentui/react-shared-contexts");
11
+ /**
12
+ * Create the state required to render Select.
13
+ *
14
+ * The returned state can be modified with hooks such as useSelectStyles,
15
+ * before being passed to renderSelect.
16
+ *
17
+ * @param props - props from this instance of Select
18
+ * @param ref - reference to the `<select>` element in Select
19
+ */
20
+ const useSelect_unstable = (props, ref) => {
21
+ var _a;
22
+ const overrides = react_shared_contexts_1.useOverrides_unstable();
23
+ const {
24
+ defaultValue,
25
+ value,
26
+ select,
27
+ icon,
28
+ root,
29
+ appearance = (_a = overrides.inputDefaultAppearance) !== null && _a !== void 0 ? _a : 'outline',
30
+ onChange,
31
+ size = 'medium'
32
+ } = props;
33
+ const nativeProps = react_utilities_1.getPartitionedNativeProps({
34
+ props,
35
+ primarySlotTagName: 'select',
36
+ excludedPropNames: ['appearance', 'defaultValue', 'onChange', 'size', 'value']
37
+ });
38
+ const state = {
39
+ size,
40
+ appearance,
41
+ components: {
42
+ root: 'span',
43
+ select: 'select',
44
+ icon: 'span'
45
+ },
46
+ select: react_utilities_1.resolveShorthand(select, {
47
+ required: true,
48
+ defaultProps: {
49
+ defaultValue,
50
+ value,
51
+ ref,
52
+ ...nativeProps.primary
53
+ }
54
+ }),
55
+ icon: react_utilities_1.resolveShorthand(icon, {
56
+ required: true,
57
+ defaultProps: {
58
+ children: React.createElement(react_icons_1.ChevronDownRegular, null)
59
+ }
60
+ }),
61
+ root: react_utilities_1.resolveShorthand(root, {
62
+ required: true,
63
+ defaultProps: nativeProps.root
64
+ })
65
+ };
66
+ state.select.onChange = react_utilities_1.useEventCallback(event => {
67
+ onChange === null || onChange === void 0 ? void 0 : onChange(event, {
68
+ value: event.target.value
27
69
  });
28
- const state = {
29
- size,
30
- appearance,
31
- components: {
32
- root: "span",
33
- select: "select",
34
- icon: "span"
35
- },
36
- select: (0, _reactUtilities.resolveShorthand)(select, {
37
- required: true,
38
- defaultProps: {
39
- defaultValue,
40
- value,
41
- ref,
42
- ...nativeProps.primary
43
- }
44
- }),
45
- icon: (0, _reactUtilities.resolveShorthand)(icon, {
46
- required: true,
47
- defaultProps: {
48
- children: /*#__PURE__*/ _react.createElement(_reactIcons.ChevronDownRegular, null)
49
- }
50
- }),
51
- root: (0, _reactUtilities.resolveShorthand)(root, {
52
- required: true,
53
- defaultProps: nativeProps.root
54
- })
55
- };
56
- state.select.onChange = (0, _reactUtilities.useEventCallback)((event)=>{
57
- onChange?.(event, {
58
- value: event.target.value
59
- });
60
- });
61
- return state;
62
- }; //# sourceMappingURL=useSelect.js.map
63
-
70
+ });
71
+ return state;
72
+ };
73
+ exports.useSelect_unstable = useSelect_unstable;
64
74
  //# sourceMappingURL=useSelect.js.map
@@ -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 const {\n defaultValue,\n value,\n select,\n icon,\n root,\n appearance = 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?.(event, {\n value: event.target.value\n });\n });\n return state;\n};\n//# sourceMappingURL=useSelect.js.map"],"names":["useSelect_unstable","props","ref","overrides","useOverrides","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":";;;;+BAaaA;;aAAAA;;;6DAbU;gCACuD;4BAC3C;qCACmB;AAU/C,MAAMA,qBAAqB,CAACC,OAAOC,MAAQ;IAChD,MAAMC,YAAYC,IAAAA,0CAAY;IAC9B,MAAM,EACJC,aAAY,EACZC,MAAK,EACLC,OAAM,EACNC,KAAI,EACJC,KAAI,EACJC,YAAaP,UAAUQ,sBAAsB,IAAI,UAAS,EAC1DC,SAAQ,EACRC,MAAO,SAAQ,EAChB,GAAGZ;IACJ,MAAMa,cAAcC,IAAAA,yCAAyB,EAAC;QAC5Cd;QACAe,oBAAoB;QACpBC,mBAAmB;YAAC;YAAc;YAAgB;YAAY;YAAQ;SAAQ;IAChF;IACA,MAAMC,QAAQ;QACZL;QACAH;QACAS,YAAY;YACVV,MAAM;YACNF,QAAQ;YACRC,MAAM;QACR;QACAD,QAAQa,IAAAA,gCAAgB,EAACb,QAAQ;YAC/Bc,UAAU,IAAI;YACdC,cAAc;gBACZjB;gBACAC;gBACAJ;gBACA,GAAGY,YAAYS,OAAO;YACxB;QACF;QACAf,MAAMY,IAAAA,gCAAgB,EAACZ,MAAM;YAC3Ba,UAAU,IAAI;YACdC,cAAc;gBACZE,UAAU,WAAW,GAAEC,OAAMC,aAAa,CAACC,8BAAkB,EAAE,IAAI;YACrE;QACF;QACAlB,MAAMW,IAAAA,gCAAgB,EAACX,MAAM;YAC3BY,UAAU,IAAI;YACdC,cAAcR,YAAYL,IAAI;QAChC;IACF;IACAS,MAAMX,MAAM,CAACK,QAAQ,GAAGgB,IAAAA,gCAAgB,EAACC,CAAAA,QAAS;QAChDjB,WAAWiB,OAAO;YAChBvB,OAAOuB,MAAMC,MAAM,CAACxB,KAAK;QAC3B;IACF;IACA,OAAOY;AACT,GACA,qCAAqC"}
1
+ {"version":3,"names":["React","require","react_utilities_1","react_icons_1","react_shared_contexts_1","useSelect_unstable","props","ref","overrides","useOverrides_unstable","defaultValue","value","select","icon","root","appearance","_a","inputDefaultAppearance","onChange","size","nativeProps","getPartitionedNativeProps","primarySlotTagName","excludedPropNames","state","components","resolveShorthand","required","defaultProps","primary","children","createElement","ChevronDownRegular","useEventCallback","event","target","exports"],"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"],"mappings":";;;;;;AAAA,MAAAA,KAAA,gBAAAC,OAAA;AACA,MAAAC,iBAAA,gBAAAD,OAAA;AACA,MAAAE,aAAA,gBAAAF,OAAA;AAEA,MAAAG,uBAAA,gBAAAH,OAAA;AAEA;;;;;;;;;AASO,MAAMI,kBAAkB,GAAGA,CAACC,KAAkB,EAAEC,GAAiC,KAAiB;;EACvG,MAAMC,SAAS,GAAGJ,uBAAA,CAAAK,qBAAY,EAAE;EAEhC,MAAM;IACJC,YAAY;IACZC,KAAK;IACLC,MAAM;IACNC,IAAI;IACJC,IAAI;IACJC,UAAU,GAAG,CAAAC,EAAA,GAAAR,SAAS,CAACS,sBAAsB,cAAAD,EAAA,cAAAA,EAAA,GAAI,SAAS;IAE1DE,QAAQ;IACRC,IAAI,GAAG;EAAQ,CAChB,GAAGb,KAAK;EAET,MAAMc,WAAW,GAAGlB,iBAAA,CAAAmB,yBAAyB,CAAC;IAC5Cf,KAAK;IACLgB,kBAAkB,EAAE,QAAQ;IAC5BC,iBAAiB,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO;GAC9E,CAAC;EAEF,MAAMC,KAAK,GAAgB;IACzBL,IAAI;IACJJ,UAAU;IACVU,UAAU,EAAE;MACVX,IAAI,EAAE,MAAM;MACZF,MAAM,EAAE,QAAQ;MAChBC,IAAI,EAAE;KACP;IACDD,MAAM,EAAEV,iBAAA,CAAAwB,gBAAgB,CAACd,MAAM,EAAE;MAC/Be,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAE;QACZlB,YAAY;QACZC,KAAK;QACLJ,GAAG;QACH,GAAGa,WAAW,CAACS;;KAElB,CAAC;IACFhB,IAAI,EAAEX,iBAAA,CAAAwB,gBAAgB,CAACb,IAAI,EAAE;MAC3Bc,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAE;QAAEE,QAAQ,EAAE9B,KAAA,CAAA+B,aAAA,CAAC5B,aAAA,CAAA6B,kBAAkB;MAAG;KACjD,CAAC;IACFlB,IAAI,EAAEZ,iBAAA,CAAAwB,gBAAgB,CAACZ,IAAI,EAAE;MAC3Ba,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAER,WAAW,CAACN;KAC3B;GACF;EAEDU,KAAK,CAACZ,MAAM,CAACM,QAAQ,GAAGhB,iBAAA,CAAA+B,gBAAgB,CAACC,KAAK,IAAG;IAC/ChB,QAAQ,aAARA,QAAQ,uBAARA,QAAQ,CAAGgB,KAAK,EAAE;MAAEvB,KAAK,EAAGuB,KAAK,CAACC,MAA4B,CAACxB;IAAK,CAAE,CAAC;EACzE,CAAC,CAAC;EAEF,OAAOa,KAAK;AACd,CAAC;AArDYY,OAAA,CAAA/B,kBAAkB,GAAAA,kBAAA"}