@fluentui/react-select 0.0.0-nightly-20221228-0425.1 → 0.0.0-nightly-20221230-0421.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 +11 -11
- package/CHANGELOG.md +8 -8
- package/lib/components/Select/Select.js +0 -1
- package/lib/components/Select/Select.js.map +1 -1
- package/lib/components/Select/renderSelect.js +6 -4
- package/lib/components/Select/renderSelect.js.map +1 -1
- package/lib/components/Select/useSelect.js +0 -1
- package/lib/components/Select/useSelect.js.map +1 -1
- package/lib/components/Select/useSelectStyles.js +2 -11
- package/lib/components/Select/useSelectStyles.js.map +1 -1
- package/lib/components/SelectField/SelectField.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib-commonjs/Select.js +0 -2
- package/lib-commonjs/Select.js.map +1 -1
- package/lib-commonjs/SelectField.js +0 -2
- package/lib-commonjs/SelectField.js.map +1 -1
- package/lib-commonjs/components/Select/Select.js +0 -6
- package/lib-commonjs/components/Select/Select.js.map +1 -1
- package/lib-commonjs/components/Select/Select.types.js.map +1 -1
- package/lib-commonjs/components/Select/index.js +0 -6
- package/lib-commonjs/components/Select/index.js.map +1 -1
- package/lib-commonjs/components/Select/renderSelect.js +6 -8
- package/lib-commonjs/components/Select/renderSelect.js.map +1 -1
- package/lib-commonjs/components/Select/useSelect.js +0 -6
- package/lib-commonjs/components/Select/useSelect.js.map +1 -1
- package/lib-commonjs/components/Select/useSelectStyles.js +2 -15
- package/lib-commonjs/components/Select/useSelectStyles.js.map +1 -1
- package/lib-commonjs/components/SelectField/SelectField.js +0 -4
- package/lib-commonjs/components/SelectField/SelectField.js.map +1 -1
- package/lib-commonjs/components/SelectField/index.js +0 -2
- package/lib-commonjs/components/SelectField/index.js.map +1 -1
- package/lib-commonjs/index.js +0 -4
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.json
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"name": "@fluentui/react-select",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
6
|
-
"tag": "@fluentui/react-select_v0.0.0-nightly-
|
|
7
|
-
"version": "0.0.0-nightly-
|
|
5
|
+
"date": "Fri, 30 Dec 2022 04:28:26 GMT",
|
|
6
|
+
"tag": "@fluentui/react-select_v0.0.0-nightly-20221230-0421.1",
|
|
7
|
+
"version": "0.0.0-nightly-20221230-0421.1",
|
|
8
8
|
"comments": {
|
|
9
9
|
"prerelease": [
|
|
10
10
|
{
|
|
@@ -16,26 +16,26 @@
|
|
|
16
16
|
{
|
|
17
17
|
"author": "beachball",
|
|
18
18
|
"package": "@fluentui/react-select",
|
|
19
|
-
"comment": "Bump @fluentui/react-field to v0.0.0-nightly-
|
|
20
|
-
"commit": "
|
|
19
|
+
"comment": "Bump @fluentui/react-field to v0.0.0-nightly-20221230-0421.1",
|
|
20
|
+
"commit": "a38762f3d85d92ff20fe07b067fe74c91defe343"
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
"author": "beachball",
|
|
24
24
|
"package": "@fluentui/react-select",
|
|
25
|
-
"comment": "Bump @fluentui/react-theme to v0.0.0-nightly-
|
|
26
|
-
"commit": "
|
|
25
|
+
"comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20221230-0421.1",
|
|
26
|
+
"commit": "a38762f3d85d92ff20fe07b067fe74c91defe343"
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
"author": "beachball",
|
|
30
30
|
"package": "@fluentui/react-select",
|
|
31
|
-
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-
|
|
32
|
-
"commit": "
|
|
31
|
+
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20221230-0421.1",
|
|
32
|
+
"commit": "a38762f3d85d92ff20fe07b067fe74c91defe343"
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
"author": "beachball",
|
|
36
36
|
"package": "@fluentui/react-select",
|
|
37
|
-
"comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-
|
|
38
|
-
"commit": "
|
|
37
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20221230-0421.1",
|
|
38
|
+
"commit": "a38762f3d85d92ff20fe07b067fe74c91defe343"
|
|
39
39
|
}
|
|
40
40
|
]
|
|
41
41
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-select
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Fri, 30 Dec 2022 04:28:26 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## [0.0.0-nightly-
|
|
7
|
+
## [0.0.0-nightly-20221230-0421.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-select_v0.0.0-nightly-20221230-0421.1)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-select_v9.0.0-beta.18..@fluentui/react-select_v0.0.0-nightly-
|
|
9
|
+
Fri, 30 Dec 2022 04:28:26 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-select_v9.0.0-beta.18..@fluentui/react-select_v0.0.0-nightly-20221230-0421.1)
|
|
11
11
|
|
|
12
12
|
### Changes
|
|
13
13
|
|
|
14
14
|
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by fluentui-internal@service.microsoft.com)
|
|
15
|
-
- Bump @fluentui/react-field to v0.0.0-nightly-
|
|
16
|
-
- Bump @fluentui/react-theme to v0.0.0-nightly-
|
|
17
|
-
- Bump @fluentui/react-utilities to v0.0.0-nightly-
|
|
18
|
-
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-
|
|
15
|
+
- Bump @fluentui/react-field to v0.0.0-nightly-20221230-0421.1 ([commit](https://github.com/microsoft/fluentui/commit/a38762f3d85d92ff20fe07b067fe74c91defe343) by beachball)
|
|
16
|
+
- Bump @fluentui/react-theme to v0.0.0-nightly-20221230-0421.1 ([commit](https://github.com/microsoft/fluentui/commit/a38762f3d85d92ff20fe07b067fe74c91defe343) by beachball)
|
|
17
|
+
- Bump @fluentui/react-utilities to v0.0.0-nightly-20221230-0421.1 ([commit](https://github.com/microsoft/fluentui/commit/a38762f3d85d92ff20fe07b067fe74c91defe343) by beachball)
|
|
18
|
+
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20221230-0421.1 ([commit](https://github.com/microsoft/fluentui/commit/a38762f3d85d92ff20fe07b067fe74c91defe343) by beachball)
|
|
19
19
|
|
|
20
20
|
## [9.0.0-beta.18](https://github.com/microsoft/fluentui/tree/@fluentui/react-select_v9.0.0-beta.18)
|
|
21
21
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
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":"","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, {
|
|
13
|
-
|
|
14
|
-
},
|
|
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,"
|
|
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":"","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,"
|
|
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":"","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"]}
|
|
@@ -9,8 +9,8 @@ const iconSizes = {
|
|
|
9
9
|
small: '16px',
|
|
10
10
|
medium: '20px',
|
|
11
11
|
large: '24px'
|
|
12
|
-
};
|
|
13
|
-
|
|
12
|
+
};
|
|
13
|
+
//TODO: Should fieldHeights be a set of global design tokens or constants?
|
|
14
14
|
const fieldHeights = {
|
|
15
15
|
small: '24px',
|
|
16
16
|
medium: '32px',
|
|
@@ -23,7 +23,6 @@ const fieldHeights = {
|
|
|
23
23
|
* 3. Content-icon spacing
|
|
24
24
|
* 4. Content inner padding
|
|
25
25
|
*/
|
|
26
|
-
|
|
27
26
|
const paddingRight = {
|
|
28
27
|
small: `calc(${tokens.spacingHorizontalSNudge}
|
|
29
28
|
+ ${iconSizes.small}
|
|
@@ -40,14 +39,12 @@ const paddingRight = {
|
|
|
40
39
|
};
|
|
41
40
|
/* Left padding is calculated from the outer padding + inner content padding values
|
|
42
41
|
* since <select> can't have additional child content or custom inner layout */
|
|
43
|
-
|
|
44
42
|
const paddingLeft = {
|
|
45
43
|
small: `calc(${tokens.spacingHorizontalSNudge} + ${tokens.spacingHorizontalXXS})`,
|
|
46
44
|
medium: `calc(${tokens.spacingHorizontalMNudge} + ${tokens.spacingHorizontalXXS})`,
|
|
47
45
|
large: `calc(${tokens.spacingHorizontalM} + ${tokens.spacingHorizontalSNudge})`
|
|
48
46
|
};
|
|
49
47
|
/* end of shared values */
|
|
50
|
-
|
|
51
48
|
const useRootStyles = /*#__PURE__*/__styles({
|
|
52
49
|
"base": {
|
|
53
50
|
"Bt984gj": "f122n59",
|
|
@@ -94,7 +91,6 @@ const useRootStyles = /*#__PURE__*/__styles({
|
|
|
94
91
|
}]],
|
|
95
92
|
"w": [".fjw5xc1:focus-within::after{-webkit-transform:scaleX(1);-moz-transform:scaleX(1);-ms-transform:scaleX(1);transform:scaleX(1);}", ".f1xdyd5c:focus-within::after{transition-property:transform;}", ".fatpbeo:focus-within::after{transition-duration:var(--durationNormal);}", ".fb7uyps:focus-within::after{transition-delay:var(--curveDecelerateMid);}"]
|
|
96
93
|
});
|
|
97
|
-
|
|
98
94
|
const useSelectStyles = /*#__PURE__*/__styles({
|
|
99
95
|
"base": {
|
|
100
96
|
"Bowrso0": "fqrijq1",
|
|
@@ -235,7 +231,6 @@ const useSelectStyles = /*#__PURE__*/__styles({
|
|
|
235
231
|
"h": [".fvcxoqz:hover{border-top-color:var(--colorNeutralStroke1Hover);}", ".f1ub3y4t:hover{border-right-color:var(--colorNeutralStroke1Hover);}", ".f1m52nbi:hover{border-left-color:var(--colorNeutralStroke1Hover);}", ".flmw63s:hover{border-bottom-color:var(--colorNeutralStrokeAccessible);}"],
|
|
236
232
|
"a": [".fvs00aa:active{border-top-color:var(--colorNeutralStroke1Pressed);}", ".f1assf6x:active{border-right-color:var(--colorNeutralStroke1Pressed);}", ".f4ruux4:active{border-left-color:var(--colorNeutralStroke1Pressed);}", ".fqhmt4z:active{border-bottom-color:var(--colorNeutralStrokeAccessible);}"]
|
|
237
233
|
});
|
|
238
|
-
|
|
239
234
|
const useIconStyles = /*#__PURE__*/__styles({
|
|
240
235
|
"icon": {
|
|
241
236
|
"B7ck84d": "f1ewtqcl",
|
|
@@ -276,8 +271,6 @@ const useIconStyles = /*#__PURE__*/__styles({
|
|
|
276
271
|
/**
|
|
277
272
|
* Apply styling to the Select slots based on the state
|
|
278
273
|
*/
|
|
279
|
-
|
|
280
|
-
|
|
281
274
|
export const useSelectStyles_unstable = state => {
|
|
282
275
|
const {
|
|
283
276
|
size,
|
|
@@ -290,11 +283,9 @@ export const useSelectStyles_unstable = state => {
|
|
|
290
283
|
const selectStyles = useSelectStyles();
|
|
291
284
|
state.root.className = mergeClasses(selectClassNames.root, rootStyles.base, state.root.className);
|
|
292
285
|
state.select.className = mergeClasses(selectClassNames.select, selectStyles.base, selectStyles[size], selectStyles[appearance], !disabled && invalid && appearance !== 'underline' && selectStyles.invalid, !disabled && invalid && appearance === 'underline' && selectStyles.invalidUnderline, disabled && selectStyles.disabled, disabled && appearance === 'underline' && selectStyles.disabledUnderline, state.select.className);
|
|
293
|
-
|
|
294
286
|
if (state.icon) {
|
|
295
287
|
state.icon.className = mergeClasses(selectClassNames.icon, iconStyles.icon, disabled && iconStyles.disabled, iconStyles[size], state.icon.className);
|
|
296
288
|
}
|
|
297
|
-
|
|
298
289
|
return state;
|
|
299
290
|
};
|
|
300
291
|
//# sourceMappingURL=useSelectStyles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../../packages/react-components/react-select/src/components/Select/useSelectStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,EAAmC,UAAnC,QAAqD,gBAArD;AACA,SAAS,MAAT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,EAIjC,UAAU,CAAC,IAAD,CAJuB,EAKjC,KAAK,CAAC,IAAN,CAAW,SALsB,CAAnC;EAOD;;EAED,OAAO,KAAP;AACD,CAlCM","sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { SlotClassNames } from '@fluentui/react-utilities';\nimport type { SelectSlots, SelectState } from './Select.types';\n\nexport const selectClassNames: SlotClassNames<SelectSlots> = {\n root: 'fui-Select',\n select: 'fui-Select__select',\n icon: 'fui-Select__icon',\n};\n\nconst iconSizes = {\n small: '16px',\n medium: '20px',\n large: '24px',\n};\n\n//TODO: Should fieldHeights be a set of global design tokens or constants?\nconst fieldHeights = {\n small: '24px',\n medium: '32px',\n large: '40px',\n};\n\n/* Since the <select> element must span the full width and cannot have children,\n * the right padding needs to be calculated from the sum of the following:\n * 1. Field padding-right\n * 2. Icon width\n * 3. Content-icon spacing\n * 4. Content inner padding\n */\nconst paddingRight = {\n small: `calc(${tokens.spacingHorizontalSNudge}\n + ${iconSizes.small}\n + ${tokens.spacingHorizontalXXS}\n + ${tokens.spacingHorizontalXXS})`,\n medium: `calc(${tokens.spacingHorizontalMNudge}\n + ${iconSizes.medium}\n + ${tokens.spacingHorizontalXXS}\n + ${tokens.spacingHorizontalXXS})`,\n large: `calc(${tokens.spacingHorizontalM}\n + ${iconSizes.large}\n + ${tokens.spacingHorizontalSNudge}\n + ${tokens.spacingHorizontalSNudge})`,\n};\n\n/* Left padding is calculated from the outer padding + inner content padding values\n * since <select> can't have additional child content or custom inner layout */\nconst paddingLeft = {\n small: `calc(${tokens.spacingHorizontalSNudge} + ${tokens.spacingHorizontalXXS})`,\n medium: `calc(${tokens.spacingHorizontalMNudge} + ${tokens.spacingHorizontalXXS})`,\n large: `calc(${tokens.spacingHorizontalM} + ${tokens.spacingHorizontalSNudge})`,\n};\n\n/* end of shared values */\n\nconst useRootStyles = makeStyles({\n base: {\n alignItems: 'center',\n boxSizing: 'border-box',\n display: 'flex',\n flexWrap: 'nowrap',\n fontFamily: tokens.fontFamilyBase,\n position: 'relative',\n\n '&::after': {\n backgroundImage: `linear-gradient(\n 0deg,\n ${tokens.colorCompoundBrandStroke} 0%,\n ${tokens.colorCompoundBrandStroke} 50%,\n transparent 50%,\n transparent 100%\n )`,\n ...shorthands.borderRadius(0, 0, tokens.borderRadiusMedium, tokens.borderRadiusMedium),\n boxSizing: 'border-box',\n content: '\"\"',\n height: tokens.borderRadiusMedium,\n position: 'absolute',\n bottom: '0',\n left: '0',\n right: '0',\n transform: 'scaleX(0)',\n transitionProperty: 'transform',\n transitionDuration: tokens.durationUltraFast,\n transitionDelay: tokens.curveAccelerateMid,\n\n '@media screen and (prefers-reduced-motion: reduce)': {\n transitionDuration: '0.01ms',\n transitionDelay: '0.01ms',\n },\n },\n\n '&:focus-within::after': {\n transform: 'scaleX(1)',\n transitionProperty: 'transform',\n transitionDuration: tokens.durationNormal,\n transitionDelay: tokens.curveDecelerateMid,\n\n '@media screen and (prefers-reduced-motion: reduce)': {\n transitionDuration: '0.01ms',\n transitionDelay: '0.01ms',\n },\n },\n },\n});\n\nconst useSelectStyles = makeStyles({\n base: {\n appearance: 'none',\n ...shorthands.border('1px', 'solid', 'transparent'),\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n boxShadow: 'none',\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground1,\n cursor: 'pointer',\n flexGrow: 1,\n maxWidth: '100%',\n paddingBottom: 0,\n paddingTop: 0,\n\n ':focus': {\n outlineWidth: '2px',\n outlineStyle: 'solid',\n outlineColor: 'transparent',\n },\n },\n disabled: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n color: tokens.colorNeutralForegroundDisabled,\n cursor: 'not-allowed',\n '@media (forced-colors: active)': {\n ...shorthands.borderColor('GrayText'),\n },\n },\n disabledUnderline: {\n ...shorthands.borderColor(\n tokens.colorTransparentStrokeDisabled,\n tokens.colorTransparentStrokeDisabled,\n tokens.colorNeutralStrokeDisabled,\n ),\n },\n\n small: {\n height: fieldHeights.small,\n paddingLeft: paddingLeft.small,\n paddingRight: paddingRight.small,\n ...typographyStyles.caption1,\n },\n medium: {\n height: fieldHeights.medium,\n paddingLeft: paddingLeft.medium,\n paddingRight: paddingRight.medium,\n ...typographyStyles.body1,\n },\n large: {\n height: fieldHeights.large,\n paddingLeft: paddingLeft.large,\n paddingRight: paddingRight.large,\n ...typographyStyles.body2,\n },\n outline: {\n backgroundColor: tokens.colorNeutralBackground1,\n ...shorthands.border('1px', 'solid', tokens.colorNeutralStroke1),\n borderBottomColor: tokens.colorNeutralStrokeAccessible,\n\n '&:hover': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Hover),\n borderBottomColor: tokens.colorNeutralStrokeAccessible,\n },\n\n '&:active': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Pressed),\n borderBottomColor: tokens.colorNeutralStrokeAccessible,\n },\n },\n underline: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderBottom('1px', 'solid', tokens.colorNeutralStrokeAccessible),\n ...shorthands.borderRadius(0),\n },\n 'filled-lighter': {\n backgroundColor: tokens.colorNeutralBackground1,\n },\n 'filled-darker': {\n backgroundColor: tokens.colorNeutralBackground3,\n },\n invalid: {\n ':not(:focus-within),:hover:not(:focus-within)': {\n ...shorthands.borderColor(tokens.colorPaletteRedBorder2),\n },\n },\n invalidUnderline: {\n ':not(:focus-within),:hover:not(:focus-within)': {\n borderBottomColor: tokens.colorPaletteRedBorder2,\n },\n },\n});\n\nconst useIconStyles = makeStyles({\n icon: {\n boxSizing: 'border-box',\n color: tokens.colorNeutralStrokeAccessible,\n display: 'block',\n position: 'absolute',\n pointerEvents: 'none',\n\n // the SVG must have display: block for accurate positioning\n // otherwise an extra inline space is inserted after the svg element\n '& svg': {\n display: 'block',\n },\n },\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n '@media (forced-colors: active)': {\n color: 'GrayText',\n },\n },\n small: {\n fontSize: iconSizes.small,\n height: iconSizes.small,\n right: tokens.spacingHorizontalSNudge,\n width: iconSizes.small,\n },\n medium: {\n fontSize: iconSizes.medium,\n height: iconSizes.medium,\n right: tokens.spacingHorizontalMNudge,\n width: iconSizes.medium,\n },\n large: {\n fontSize: iconSizes.large,\n height: iconSizes.large,\n right: tokens.spacingHorizontalM,\n width: iconSizes.large,\n },\n});\n\n/**\n * Apply styling to the Select slots based on the state\n */\nexport const useSelectStyles_unstable = (state: SelectState): SelectState => {\n const { size, appearance } = state;\n const disabled = state.select.disabled;\n const invalid = `${state.select['aria-invalid']}` === 'true';\n\n const iconStyles = useIconStyles();\n const rootStyles = useRootStyles();\n const selectStyles = useSelectStyles();\n\n state.root.className = mergeClasses(selectClassNames.root, rootStyles.base, state.root.className);\n\n state.select.className = mergeClasses(\n selectClassNames.select,\n selectStyles.base,\n selectStyles[size],\n selectStyles[appearance],\n !disabled && invalid && appearance !== 'underline' && selectStyles.invalid,\n !disabled && invalid && appearance === 'underline' && selectStyles.invalidUnderline,\n disabled && selectStyles.disabled,\n disabled && appearance === 'underline' && selectStyles.disabledUnderline,\n state.select.className,\n );\n\n if (state.icon) {\n state.icon.className = mergeClasses(\n selectClassNames.icon,\n iconStyles.icon,\n disabled && iconStyles.disabled,\n iconStyles[size],\n state.icon.className,\n );\n }\n\n return state;\n};\n"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"mappings":"AAAA,mBAAqBA,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACrE,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,uBAAuB;AAIhE,OAAO,MAAMC,gBAAgB,GAAgC;EAC3DC,IAAI,EAAE,YAAY;EAClBC,MAAM,EAAE,oBAAoB;EAC5BC,IAAI,EAAE;CACP;AAED,MAAMC,SAAS,GAAG;EAChBC,KAAK,EAAE,MAAM;EACbC,MAAM,EAAE,MAAM;EACdC,KAAK,EAAE;CACR;AAED;AACA,MAAMC,YA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M,CAAC,cAAc,CAAC,EAAE,KAAK,MAAM;EAE5D,MAAMsB,UAAU,GAAGP,aAAa,EAAE;EAClC,MAAMQ,UAAU,GAAGV,aAAa,EAAE;EAClC,MAAMW,YAAY,GAAGV,eAAe,EAAE;EAEtCG,KAAK,CAAClB,IAAI,CAAC0B,SAAS,GAAG/B,YAAY,CAACI,gBAAgB,CAACC,IAAI,EAAEwB,UAAU,CAACG,IAAI,EAAET,KAAK,CAAClB,IAAI,CAAC0B,SAAS,CAAC;EAEjGR,KAAK,CAACjB,MAAM,CAACyB,SAAS,GAAG/B,YAAY,CACnCI,gBAAgB,CAACE,MAAM,EACvBwB,YAAY,CAACE,IAAI,EACjBF,YAAY,CAACN,IAAI,CAAC,EAClBM,YAAY,CAACL,UAAU,CAAC,EACxB,CAACC,QAAQ,IAAIC,OAAO,IAAIF,UAAU,KAAK,WAAW,IAAIK,YAAY,CAACH,OAAO,EAC1E,CAACD,QAAQ,IAAIC,OAAO,IAAIF,UAAU,KAAK,WAAW,IAAIK,YAAY,CAACG,gBAAgB,EACnFP,QAAQ,IAAII,YAAY,CAACJ,QAAQ,EACjCA,QAAQ,IAAID,UAAU,KAAK,WAAW,IAAIK,YAAY,CAACI,iBAAiB,EACxEX,KAAK,CAACjB,MAAM,CAACyB,SAAS,CACvB;EAED,IAAIR,KAAK,CAAChB,IAAI,EAAE;IACdgB,KAAK,CAAChB,IAAI,CAACwB,SAAS,GAAG/B,YAAY,CACjCI,gBAAgB,CAACG,IAAI,EACrBqB,UAAU,CAACrB,IAAI,EACfmB,QAAQ,IAAIE,UAAU,CAACF,QAAQ,EAC/BE,UAAU,CAACJ,IAAI,CAAC,EAChBD,KAAK,CAAChB,IAAI,CAACwB,SAAS,CACrB;;EAGH,OAAOR,KAAK;AACd,CAAC","names":["mergeClasses","shorthands","tokens","typographyStyles","selectClassNames","root","select","icon","iconSizes","small","medium","large","fieldHeights","paddingRight","spacingHorizontalSNudge","spacingHorizontalXXS","spacingHorizontalMNudge","spacingHorizontalM","paddingLeft","useRootStyles","useSelectStyles","useIconStyles","useSelectStyles_unstable","state","size","appearance","disabled","invalid","iconStyles","rootStyles","selectStyles","className","base","invalidUnderline","disabledUnderline"],"sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-select/src/components/Select/useSelectStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { SlotClassNames } from '@fluentui/react-utilities';\nimport type { SelectSlots, SelectState } from './Select.types';\n\nexport const selectClassNames: SlotClassNames<SelectSlots> = {\n root: 'fui-Select',\n select: 'fui-Select__select',\n icon: 'fui-Select__icon',\n};\n\nconst iconSizes = {\n small: '16px',\n medium: '20px',\n large: '24px',\n};\n\n//TODO: Should fieldHeights be a set of global design tokens or constants?\nconst fieldHeights = {\n small: '24px',\n medium: '32px',\n large: '40px',\n};\n\n/* Since the <select> element must span the full width and cannot have children,\n * the right padding needs to be calculated from the sum of the following:\n * 1. Field padding-right\n * 2. Icon width\n * 3. Content-icon spacing\n * 4. Content inner padding\n */\nconst paddingRight = {\n small: `calc(${tokens.spacingHorizontalSNudge}\n + ${iconSizes.small}\n + ${tokens.spacingHorizontalXXS}\n + ${tokens.spacingHorizontalXXS})`,\n medium: `calc(${tokens.spacingHorizontalMNudge}\n + ${iconSizes.medium}\n + ${tokens.spacingHorizontalXXS}\n + ${tokens.spacingHorizontalXXS})`,\n large: `calc(${tokens.spacingHorizontalM}\n + ${iconSizes.large}\n + ${tokens.spacingHorizontalSNudge}\n + ${tokens.spacingHorizontalSNudge})`,\n};\n\n/* Left padding is calculated from the outer padding + inner content padding values\n * since <select> can't have additional child content or custom inner layout */\nconst paddingLeft = {\n small: `calc(${tokens.spacingHorizontalSNudge} + ${tokens.spacingHorizontalXXS})`,\n medium: `calc(${tokens.spacingHorizontalMNudge} + ${tokens.spacingHorizontalXXS})`,\n large: `calc(${tokens.spacingHorizontalM} + ${tokens.spacingHorizontalSNudge})`,\n};\n\n/* end of shared values */\n\nconst useRootStyles = makeStyles({\n base: {\n alignItems: 'center',\n boxSizing: 'border-box',\n display: 'flex',\n flexWrap: 'nowrap',\n fontFamily: tokens.fontFamilyBase,\n position: 'relative',\n\n '&::after': {\n backgroundImage: `linear-gradient(\n 0deg,\n ${tokens.colorCompoundBrandStroke} 0%,\n ${tokens.colorCompoundBrandStroke} 50%,\n transparent 50%,\n transparent 100%\n )`,\n ...shorthands.borderRadius(0, 0, tokens.borderRadiusMedium, tokens.borderRadiusMedium),\n boxSizing: 'border-box',\n content: '\"\"',\n height: tokens.borderRadiusMedium,\n position: 'absolute',\n bottom: '0',\n left: '0',\n right: '0',\n transform: 'scaleX(0)',\n transitionProperty: 'transform',\n transitionDuration: tokens.durationUltraFast,\n transitionDelay: tokens.curveAccelerateMid,\n\n '@media screen and (prefers-reduced-motion: reduce)': {\n transitionDuration: '0.01ms',\n transitionDelay: '0.01ms',\n },\n },\n\n '&:focus-within::after': {\n transform: 'scaleX(1)',\n transitionProperty: 'transform',\n transitionDuration: tokens.durationNormal,\n transitionDelay: tokens.curveDecelerateMid,\n\n '@media screen and (prefers-reduced-motion: reduce)': {\n transitionDuration: '0.01ms',\n transitionDelay: '0.01ms',\n },\n },\n },\n});\n\nconst useSelectStyles = makeStyles({\n base: {\n appearance: 'none',\n ...shorthands.border('1px', 'solid', 'transparent'),\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n boxShadow: 'none',\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground1,\n cursor: 'pointer',\n flexGrow: 1,\n maxWidth: '100%',\n paddingBottom: 0,\n paddingTop: 0,\n\n ':focus': {\n outlineWidth: '2px',\n outlineStyle: 'solid',\n outlineColor: 'transparent',\n },\n },\n disabled: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n color: tokens.colorNeutralForegroundDisabled,\n cursor: 'not-allowed',\n '@media (forced-colors: active)': {\n ...shorthands.borderColor('GrayText'),\n },\n },\n disabledUnderline: {\n ...shorthands.borderColor(\n tokens.colorTransparentStrokeDisabled,\n tokens.colorTransparentStrokeDisabled,\n tokens.colorNeutralStrokeDisabled,\n ),\n },\n\n small: {\n height: fieldHeights.small,\n paddingLeft: paddingLeft.small,\n paddingRight: paddingRight.small,\n ...typographyStyles.caption1,\n },\n medium: {\n height: fieldHeights.medium,\n paddingLeft: paddingLeft.medium,\n paddingRight: paddingRight.medium,\n ...typographyStyles.body1,\n },\n large: {\n height: fieldHeights.large,\n paddingLeft: paddingLeft.large,\n paddingRight: paddingRight.large,\n ...typographyStyles.body2,\n },\n outline: {\n backgroundColor: tokens.colorNeutralBackground1,\n ...shorthands.border('1px', 'solid', tokens.colorNeutralStroke1),\n borderBottomColor: tokens.colorNeutralStrokeAccessible,\n\n '&:hover': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Hover),\n borderBottomColor: tokens.colorNeutralStrokeAccessible,\n },\n\n '&:active': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Pressed),\n borderBottomColor: tokens.colorNeutralStrokeAccessible,\n },\n },\n underline: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderBottom('1px', 'solid', tokens.colorNeutralStrokeAccessible),\n ...shorthands.borderRadius(0),\n },\n 'filled-lighter': {\n backgroundColor: tokens.colorNeutralBackground1,\n },\n 'filled-darker': {\n backgroundColor: tokens.colorNeutralBackground3,\n },\n invalid: {\n ':not(:focus-within),:hover:not(:focus-within)': {\n ...shorthands.borderColor(tokens.colorPaletteRedBorder2),\n },\n },\n invalidUnderline: {\n ':not(:focus-within),:hover:not(:focus-within)': {\n borderBottomColor: tokens.colorPaletteRedBorder2,\n },\n },\n});\n\nconst useIconStyles = makeStyles({\n icon: {\n boxSizing: 'border-box',\n color: tokens.colorNeutralStrokeAccessible,\n display: 'block',\n position: 'absolute',\n pointerEvents: 'none',\n\n // the SVG must have display: block for accurate positioning\n // otherwise an extra inline space is inserted after the svg element\n '& svg': {\n display: 'block',\n },\n },\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n '@media (forced-colors: active)': {\n color: 'GrayText',\n },\n },\n small: {\n fontSize: iconSizes.small,\n height: iconSizes.small,\n right: tokens.spacingHorizontalSNudge,\n width: iconSizes.small,\n },\n medium: {\n fontSize: iconSizes.medium,\n height: iconSizes.medium,\n right: tokens.spacingHorizontalMNudge,\n width: iconSizes.medium,\n },\n large: {\n fontSize: iconSizes.large,\n height: iconSizes.large,\n right: tokens.spacingHorizontalM,\n width: iconSizes.large,\n },\n});\n\n/**\n * Apply styling to the Select slots based on the state\n */\nexport const useSelectStyles_unstable = (state: SelectState): SelectState => {\n const { size, appearance } = state;\n const disabled = state.select.disabled;\n const invalid = `${state.select['aria-invalid']}` === 'true';\n\n const iconStyles = useIconStyles();\n const rootStyles = useRootStyles();\n const selectStyles = useSelectStyles();\n\n state.root.className = mergeClasses(selectClassNames.root, rootStyles.base, state.root.className);\n\n state.select.className = mergeClasses(\n selectClassNames.select,\n selectStyles.base,\n selectStyles[size],\n selectStyles[appearance],\n !disabled && invalid && appearance !== 'underline' && selectStyles.invalid,\n !disabled && invalid && appearance === 'underline' && selectStyles.invalidUnderline,\n disabled && selectStyles.disabled,\n disabled && appearance === 'underline' && selectStyles.disabledUnderline,\n state.select.className,\n );\n\n if (state.icon) {\n state.icon.className = mergeClasses(\n selectClassNames.icon,\n iconStyles.icon,\n disabled && iconStyles.disabled,\n iconStyles[size],\n state.icon.className,\n );\n }\n\n return state;\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,SACEC,kBAAkB,EAClBC,oBAAoB,EACpBC,uBAAuB,EACvBC,iBAAiB,QACZ,uBAAuB;AAE9B,SAASC,MAAM,QAAQ,cAAc;AAIrC,OAAO,MAAMC,qBAAqB,gBAAGL,kBAAkB,CAAC,aAAa,CAAC;AAEtE,OAAO,MAAMM,WAAW,gBAA0CP,KAAK,CAACQ,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAChG,MAAMC,KAAK,GAAGP,iBAAiB,CAACK,KAAK,EAAEC,GAAG,EAAE;IAAEE,SAAS,EAAEP,MAAM;IAAEQ,UAAU,EAAEP;EAAqB,CAAE,CAAC;EACrGH,uBAAuB,CAACQ,KAAK,CAAC;EAC9B,OAAOT,oBAAoB,CAACS,KAAK,CAAC;AACpC,CAAC,CAAC;AAEFJ,WAAW,CAACO,WAAW,GAAG,aAAa","names":["React","getFieldClassNames","renderField_unstable","useFieldStyles_unstable","useField_unstable","Select","selectFieldClassNames","SelectField","forwardRef","props","ref","state","component","classNames","displayName"],"sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-select/src/components/SelectField/SelectField.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { FieldProps } from '@fluentui/react-field';\nimport {\n getFieldClassNames,\n renderField_unstable,\n useFieldStyles_unstable,\n useField_unstable,\n} from '@fluentui/react-field';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { Select } from '../../Select';\n\nexport type SelectFieldProps = FieldProps<typeof Select>;\n\nexport const selectFieldClassNames = getFieldClassNames('SelectField');\n\nexport const SelectField: ForwardRefComponent<SelectFieldProps> = React.forwardRef((props, ref) => {\n const state = useField_unstable(props, ref, { component: Select, classNames: selectFieldClassNames });\n useFieldStyles_unstable(state);\n return renderField_unstable(state);\n});\n\nSelectField.displayName = 'SelectField';\n"]}
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
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":"","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"]}
|
package/lib-commonjs/Select.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../packages/react-components/react-select/src/Select.ts"],"
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAAA","names":["tslib_1"],"sourceRoot":"","sources":["../../../../../../../packages/react-components/react-select/src/Select.ts"],"sourcesContent":["export * from './components/Select/index';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../packages/react-components/react-select/src/SelectField.ts"],"
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAAA","names":["tslib_1"],"sourceRoot":"","sources":["../../../../../../../packages/react-components/react-select/src/SelectField.ts"],"sourcesContent":["export * from './components/SelectField/index';\n"]}
|
|
@@ -4,19 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.Select = void 0;
|
|
7
|
-
|
|
8
7
|
const React = /*#__PURE__*/require("react");
|
|
9
|
-
|
|
10
8
|
const useSelect_1 = /*#__PURE__*/require("./useSelect");
|
|
11
|
-
|
|
12
9
|
const renderSelect_1 = /*#__PURE__*/require("./renderSelect");
|
|
13
|
-
|
|
14
10
|
const useSelectStyles_1 = /*#__PURE__*/require("./useSelectStyles");
|
|
15
11
|
/**
|
|
16
12
|
* Select component
|
|
17
13
|
*/
|
|
18
|
-
|
|
19
|
-
|
|
20
14
|
exports.Select = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
21
15
|
const state = useSelect_1.useSelect_unstable(props, ref);
|
|
22
16
|
useSelectStyles_1.useSelectStyles_unstable(state);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AACA;AACA;AACA;AAIA;;;AAGaA,cAAM,gBAAqCC,KAAK,CAACC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EACtF,MAAMC,KAAK,GAAGC,8BAAkB,CAACH,KAAK,EAAEC,GAAG,CAAC;EAE5CG,0CAAwB,CAACF,KAAK,CAAC;EAC/B,OAAOG,oCAAqB,CAACH,KAAK,CAAC;AACrC,CAAC,CAAC;AAEFL,cAAM,CAACS,WAAW,GAAG,QAAQ","names":["exports","React","forwardRef","props","ref","state","useSelect_1","useSelectStyles_1","renderSelect_1","displayName"],"sourceRoot":"","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"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"mappings":"","names":[],"sourceRoot":"","sources":[],"sourcesContent":[]}
|
|
@@ -3,16 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
6
|
const tslib_1 = /*#__PURE__*/require("tslib");
|
|
8
|
-
|
|
9
7
|
tslib_1.__exportStar(require("./Select"), exports);
|
|
10
|
-
|
|
11
8
|
tslib_1.__exportStar(require("./Select.types"), exports);
|
|
12
|
-
|
|
13
9
|
tslib_1.__exportStar(require("./renderSelect"), exports);
|
|
14
|
-
|
|
15
10
|
tslib_1.__exportStar(require("./useSelect"), exports);
|
|
16
|
-
|
|
17
11
|
tslib_1.__exportStar(require("./useSelectStyles"), exports);
|
|
18
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../../packages/react-components/react-select/src/components/Select/index.ts"],"
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAAA;AACAA;AACAA;AACAA;AACAA","names":["tslib_1"],"sourceRoot":"","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"]}
|
|
@@ -4,25 +4,23 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.renderSelect_unstable = void 0;
|
|
7
|
-
|
|
8
7
|
const React = /*#__PURE__*/require("react");
|
|
9
|
-
|
|
10
8
|
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
|
11
9
|
/**
|
|
12
10
|
* Render the final JSX of Select
|
|
13
11
|
*/
|
|
14
|
-
|
|
15
|
-
|
|
16
12
|
const renderSelect_unstable = state => {
|
|
17
13
|
const {
|
|
18
14
|
slots,
|
|
19
15
|
slotProps
|
|
20
16
|
} = react_utilities_1.getSlots(state);
|
|
21
|
-
return React.createElement(slots.root, {
|
|
22
|
-
|
|
23
|
-
},
|
|
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
|
|
24
23
|
}));
|
|
25
24
|
};
|
|
26
|
-
|
|
27
25
|
exports.renderSelect_unstable = renderSelect_unstable;
|
|
28
26
|
//# sourceMappingURL=renderSelect.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AACA;AAGA;;;AAGO,MAAMA,qBAAqB,GAAIC,KAAkB,IAAI;EAC1D,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGC,0BAAQ,CAAcH,KAAK,CAAC;EACzD,OACEI,oBAACH,KAAK,CAACI,IAAI;IAAA,GAAKH,SAAS,CAACG;EAAI,GAC5BD,oBAACH,KAAK,CAACK,MAAM;IAAA,GAAKJ,SAAS,CAACI;EAAM,GAAGJ,SAAS,CAACI,MAAM,CAACC,QAAQ,CAAgB,EAC9EH,oBAACH,KAAK,CAACO,IAAI;IAAA,GAAKN,SAAS,CAACM;EAAI,EAAI,CACvB;AAEjB,CAAC;AARYC,6BAAqB","names":["renderSelect_unstable","state","slots","slotProps","react_utilities_1","React","root","select","children","icon","exports"],"sourceRoot":"","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"]}
|
|
@@ -4,11 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.useSelect_unstable = void 0;
|
|
7
|
-
|
|
8
7
|
const React = /*#__PURE__*/require("react");
|
|
9
|
-
|
|
10
8
|
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
|
11
|
-
|
|
12
9
|
const react_icons_1 = /*#__PURE__*/require("@fluentui/react-icons");
|
|
13
10
|
/**
|
|
14
11
|
* Create the state required to render Select.
|
|
@@ -19,8 +16,6 @@ const react_icons_1 = /*#__PURE__*/require("@fluentui/react-icons");
|
|
|
19
16
|
* @param props - props from this instance of Select
|
|
20
17
|
* @param ref - reference to the `<select>` element in Select
|
|
21
18
|
*/
|
|
22
|
-
|
|
23
|
-
|
|
24
19
|
const useSelect_unstable = (props, ref) => {
|
|
25
20
|
const {
|
|
26
21
|
defaultValue,
|
|
@@ -72,6 +67,5 @@ const useSelect_unstable = (props, ref) => {
|
|
|
72
67
|
});
|
|
73
68
|
return state;
|
|
74
69
|
};
|
|
75
|
-
|
|
76
70
|
exports.useSelect_unstable = useSelect_unstable;
|
|
77
71
|
//# sourceMappingURL=useSelect.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AACA;AACA;AAGA;;;;;;;;;AASO,MAAMA,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,GAAGC,2CAAyB,CAAC;IAC5CX,KAAK;IACLY,kBAAkB,EAAE,QAAQ;IAC5BC,iBAAiB,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO;GAC9E,CAAC;EAEF,MAAMC,KAAK,GAAgB;IACzBL,IAAI;IACJF,UAAU;IACVQ,UAAU,EAAE;MACVT,IAAI,EAAE,MAAM;MACZF,MAAM,EAAE,QAAQ;MAChBC,IAAI,EAAE;KACP;IACDD,MAAM,EAAEO,kCAAgB,CAACP,MAAM,EAAE;MAC/BY,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAE;QACZf,YAAY;QACZC,KAAK;QACLF,GAAG;QACH,GAAGS,WAAW,CAACQ;;KAElB,CAAC;IACFb,IAAI,EAAEM,kCAAgB,CAACN,IAAI,EAAE;MAC3BW,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAE;QAAEE,QAAQ,EAAEC,oBAACC,gCAAkB;MAAG;KACjD,CAAC;IACFf,IAAI,EAAEK,kCAAgB,CAACL,IAAI,EAAE;MAC3BU,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAEP,WAAW,CAACJ;KAC3B;GACF;EAEDQ,KAAK,CAACV,MAAM,CAACI,QAAQ,GAAGG,kCAAgB,CAACW,KAAK,IAAG;IAC/Cd,QAAQ,aAARA,QAAQ,uBAARA,QAAQ,CAAGc,KAAK,EAAE;MAAEnB,KAAK,EAAGmB,KAAK,CAACC,MAA4B,CAACpB;IAAK,CAAE,CAAC;EACzE,CAAC,CAAC;EAEF,OAAOW,KAAK;AACd,CAAC;AAnDYU,0BAAkB","names":["useSelect_unstable","props","ref","defaultValue","value","select","icon","root","appearance","onChange","size","nativeProps","react_utilities_1","primarySlotTagName","excludedPropNames","state","components","required","defaultProps","primary","children","React","react_icons_1","event","target","exports"],"sourceRoot":"","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"]}
|
|
@@ -4,11 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.useSelectStyles_unstable = exports.selectClassNames = void 0;
|
|
7
|
-
|
|
8
7
|
const react_1 = /*#__PURE__*/require("@griffel/react");
|
|
9
|
-
|
|
10
8
|
const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
|
|
11
|
-
|
|
12
9
|
exports.selectClassNames = {
|
|
13
10
|
root: 'fui-Select',
|
|
14
11
|
select: 'fui-Select__select',
|
|
@@ -18,8 +15,8 @@ const iconSizes = {
|
|
|
18
15
|
small: '16px',
|
|
19
16
|
medium: '20px',
|
|
20
17
|
large: '24px'
|
|
21
|
-
};
|
|
22
|
-
|
|
18
|
+
};
|
|
19
|
+
//TODO: Should fieldHeights be a set of global design tokens or constants?
|
|
23
20
|
const fieldHeights = {
|
|
24
21
|
small: '24px',
|
|
25
22
|
medium: '32px',
|
|
@@ -32,7 +29,6 @@ const fieldHeights = {
|
|
|
32
29
|
* 3. Content-icon spacing
|
|
33
30
|
* 4. Content inner padding
|
|
34
31
|
*/
|
|
35
|
-
|
|
36
32
|
const paddingRight = {
|
|
37
33
|
small: `calc(${react_theme_1.tokens.spacingHorizontalSNudge}
|
|
38
34
|
+ ${iconSizes.small}
|
|
@@ -49,14 +45,12 @@ const paddingRight = {
|
|
|
49
45
|
};
|
|
50
46
|
/* Left padding is calculated from the outer padding + inner content padding values
|
|
51
47
|
* since <select> can't have additional child content or custom inner layout */
|
|
52
|
-
|
|
53
48
|
const paddingLeft = {
|
|
54
49
|
small: `calc(${react_theme_1.tokens.spacingHorizontalSNudge} + ${react_theme_1.tokens.spacingHorizontalXXS})`,
|
|
55
50
|
medium: `calc(${react_theme_1.tokens.spacingHorizontalMNudge} + ${react_theme_1.tokens.spacingHorizontalXXS})`,
|
|
56
51
|
large: `calc(${react_theme_1.tokens.spacingHorizontalM} + ${react_theme_1.tokens.spacingHorizontalSNudge})`
|
|
57
52
|
};
|
|
58
53
|
/* end of shared values */
|
|
59
|
-
|
|
60
54
|
const useRootStyles = /*#__PURE__*/react_1.__styles({
|
|
61
55
|
"base": {
|
|
62
56
|
"Bt984gj": "f122n59",
|
|
@@ -103,7 +97,6 @@ const useRootStyles = /*#__PURE__*/react_1.__styles({
|
|
|
103
97
|
}]],
|
|
104
98
|
"w": [".fjw5xc1:focus-within::after{-webkit-transform:scaleX(1);-moz-transform:scaleX(1);-ms-transform:scaleX(1);transform:scaleX(1);}", ".f1xdyd5c:focus-within::after{transition-property:transform;}", ".fatpbeo:focus-within::after{transition-duration:var(--durationNormal);}", ".fb7uyps:focus-within::after{transition-delay:var(--curveDecelerateMid);}"]
|
|
105
99
|
});
|
|
106
|
-
|
|
107
100
|
const useSelectStyles = /*#__PURE__*/react_1.__styles({
|
|
108
101
|
"base": {
|
|
109
102
|
"Bowrso0": "fqrijq1",
|
|
@@ -244,7 +237,6 @@ const useSelectStyles = /*#__PURE__*/react_1.__styles({
|
|
|
244
237
|
"h": [".fvcxoqz:hover{border-top-color:var(--colorNeutralStroke1Hover);}", ".f1ub3y4t:hover{border-right-color:var(--colorNeutralStroke1Hover);}", ".f1m52nbi:hover{border-left-color:var(--colorNeutralStroke1Hover);}", ".flmw63s:hover{border-bottom-color:var(--colorNeutralStrokeAccessible);}"],
|
|
245
238
|
"a": [".fvs00aa:active{border-top-color:var(--colorNeutralStroke1Pressed);}", ".f1assf6x:active{border-right-color:var(--colorNeutralStroke1Pressed);}", ".f4ruux4:active{border-left-color:var(--colorNeutralStroke1Pressed);}", ".fqhmt4z:active{border-bottom-color:var(--colorNeutralStrokeAccessible);}"]
|
|
246
239
|
});
|
|
247
|
-
|
|
248
240
|
const useIconStyles = /*#__PURE__*/react_1.__styles({
|
|
249
241
|
"icon": {
|
|
250
242
|
"B7ck84d": "f1ewtqcl",
|
|
@@ -285,8 +277,6 @@ const useIconStyles = /*#__PURE__*/react_1.__styles({
|
|
|
285
277
|
/**
|
|
286
278
|
* Apply styling to the Select slots based on the state
|
|
287
279
|
*/
|
|
288
|
-
|
|
289
|
-
|
|
290
280
|
const useSelectStyles_unstable = state => {
|
|
291
281
|
const {
|
|
292
282
|
size,
|
|
@@ -299,13 +289,10 @@ const useSelectStyles_unstable = state => {
|
|
|
299
289
|
const selectStyles = useSelectStyles();
|
|
300
290
|
state.root.className = react_1.mergeClasses(exports.selectClassNames.root, rootStyles.base, state.root.className);
|
|
301
291
|
state.select.className = react_1.mergeClasses(exports.selectClassNames.select, selectStyles.base, selectStyles[size], selectStyles[appearance], !disabled && invalid && appearance !== 'underline' && selectStyles.invalid, !disabled && invalid && appearance === 'underline' && selectStyles.invalidUnderline, disabled && selectStyles.disabled, disabled && appearance === 'underline' && selectStyles.disabledUnderline, state.select.className);
|
|
302
|
-
|
|
303
292
|
if (state.icon) {
|
|
304
293
|
state.icon.className = react_1.mergeClasses(exports.selectClassNames.icon, iconStyles.icon, disabled && iconStyles.disabled, iconStyles[size], state.icon.className);
|
|
305
294
|
}
|
|
306
|
-
|
|
307
295
|
return state;
|
|
308
296
|
};
|
|
309
|
-
|
|
310
297
|
exports.useSelectStyles_unstable = useSelectStyles_unstable;
|
|
311
298
|
//# sourceMappingURL=useSelectStyles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../../packages/react-components/react-select/src/components/Select/useSelectStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAIa,OAAA,CAAA,gBAAA,GAAgD;EAC3D,IAAI,EAAE,YADqD;EAE3D,MAAM,EAAE,oBAFmD;EAG3D,IAAI,EAAE;AAHqD,CAAhD;AAMb,MAAM,SAAS,GAAG;EAChB,KAAK,EAAE,MADS;EAEhB,MAAM,EAAE,MAFQ;EAGhB,KAAK,EAAE;AAHS,CAAlB,C,CAMA;;AACA,MAAM,YAAY,GAAG;EACnB,KAAK,EAAE,MADY;EAEnB,MAAM,EAAE,MAFW;EAGnB,KAAK,EAAE;AAHY,CAArB;AAMA;;;;;;AAMG;;AACH,MAAM,YAAY,GAAG;EACnB,KAAK,EAAE,QAAQ,aAAA,CAAA,MAAA,CAAO,uBAAuB;QACvC,SAAS,CAAC,KAAK;QACf,aAAA,CAAA,MAAA,CAAO,oBAAoB;QAC3B,aAAA,CAAA,MAAA,CAAO,oBAAoB,GAJd;EAKnB,MAAM,EAAE,QAAQ,aAAA,CAAA,MAAA,CAAO,uBAAuB;QACxC,SAAS,CAAC,MAAM;QAChB,aAAA,CAAA,MAAA,CAAO,oBAAoB;QAC3B,aAAA,CAAA,MAAA,CAAO,oBAAoB,GARd;EASnB,KAAK,EAAE,QAAQ,aAAA,CAAA,MAAA,CAAO,kBAAkB;QAClC,SAAS,CAAC,KAAK;QACf,aAAA,CAAA,MAAA,CAAO,uBAAuB;QAC9B,aAAA,CAAA,MAAA,CAAO,uBAAuB;AAZjB,CAArB;AAeA;AAC+E;;AAC/E,MAAM,WAAW,GAAG;EAClB,KAAK,EAAE,QAAQ,aAAA,CAAA,MAAA,CAAO,uBAAuB,MAAM,aAAA,CAAA,MAAA,CAAO,oBAAoB,GAD5D;EAElB,MAAM,EAAE,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L5C,EAMvB,CAAC,QAAD,IAAa,OAAb,IAAwB,UAAU,KAAK,WAAvC,IAAsD,YAAY,CAAC,gBAN5C,EAOvB,QAAQ,IAAI,YAAY,CAAC,QAPF,EAQvB,QAAQ,IAAI,UAAU,KAAK,WAA3B,IAA0C,YAAY,CAAC,iBARhC,EASvB,KAAK,CAAC,MAAN,CAAa,SATU,CAAzB;;EAYA,IAAI,KAAK,CAAC,IAAV,EAAgB;IACd,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CACrB,OAAA,CAAA,gBAAA,CAAiB,IADI,EAErB,UAAU,CAAC,IAFU,EAGrB,QAAQ,IAAI,UAAU,CAAC,QAHF,EAIrB,UAAU,CAAC,IAAD,CAJW,EAKrB,KAAK,CAAC,IAAN,CAAW,SALU,CAAvB;EAOD;;EAED,OAAO,KAAP;AACD,CAlCM;;AAAM,OAAA,CAAA,wBAAA,GAAwB,wBAAxB","sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { SlotClassNames } from '@fluentui/react-utilities';\nimport type { SelectSlots, SelectState } from './Select.types';\n\nexport const selectClassNames: SlotClassNames<SelectSlots> = {\n root: 'fui-Select',\n select: 'fui-Select__select',\n icon: 'fui-Select__icon',\n};\n\nconst iconSizes = {\n small: '16px',\n medium: '20px',\n large: '24px',\n};\n\n//TODO: Should fieldHeights be a set of global design tokens or constants?\nconst fieldHeights = {\n small: '24px',\n medium: '32px',\n large: '40px',\n};\n\n/* Since the <select> element must span the full width and cannot have children,\n * the right padding needs to be calculated from the sum of the following:\n * 1. Field padding-right\n * 2. Icon width\n * 3. Content-icon spacing\n * 4. Content inner padding\n */\nconst paddingRight = {\n small: `calc(${tokens.spacingHorizontalSNudge}\n + ${iconSizes.small}\n + ${tokens.spacingHorizontalXXS}\n + ${tokens.spacingHorizontalXXS})`,\n medium: `calc(${tokens.spacingHorizontalMNudge}\n + ${iconSizes.medium}\n + ${tokens.spacingHorizontalXXS}\n + ${tokens.spacingHorizontalXXS})`,\n large: `calc(${tokens.spacingHorizontalM}\n + ${iconSizes.large}\n + ${tokens.spacingHorizontalSNudge}\n + ${tokens.spacingHorizontalSNudge})`,\n};\n\n/* Left padding is calculated from the outer padding + inner content padding values\n * since <select> can't have additional child content or custom inner layout */\nconst paddingLeft = {\n small: `calc(${tokens.spacingHorizontalSNudge} + ${tokens.spacingHorizontalXXS})`,\n medium: `calc(${tokens.spacingHorizontalMNudge} + ${tokens.spacingHorizontalXXS})`,\n large: `calc(${tokens.spacingHorizontalM} + ${tokens.spacingHorizontalSNudge})`,\n};\n\n/* end of shared values */\n\nconst useRootStyles = makeStyles({\n base: {\n alignItems: 'center',\n boxSizing: 'border-box',\n display: 'flex',\n flexWrap: 'nowrap',\n fontFamily: tokens.fontFamilyBase,\n position: 'relative',\n\n '&::after': {\n backgroundImage: `linear-gradient(\n 0deg,\n ${tokens.colorCompoundBrandStroke} 0%,\n ${tokens.colorCompoundBrandStroke} 50%,\n transparent 50%,\n transparent 100%\n )`,\n ...shorthands.borderRadius(0, 0, tokens.borderRadiusMedium, tokens.borderRadiusMedium),\n boxSizing: 'border-box',\n content: '\"\"',\n height: tokens.borderRadiusMedium,\n position: 'absolute',\n bottom: '0',\n left: '0',\n right: '0',\n transform: 'scaleX(0)',\n transitionProperty: 'transform',\n transitionDuration: tokens.durationUltraFast,\n transitionDelay: tokens.curveAccelerateMid,\n\n '@media screen and (prefers-reduced-motion: reduce)': {\n transitionDuration: '0.01ms',\n transitionDelay: '0.01ms',\n },\n },\n\n '&:focus-within::after': {\n transform: 'scaleX(1)',\n transitionProperty: 'transform',\n transitionDuration: tokens.durationNormal,\n transitionDelay: tokens.curveDecelerateMid,\n\n '@media screen and (prefers-reduced-motion: reduce)': {\n transitionDuration: '0.01ms',\n transitionDelay: '0.01ms',\n },\n },\n },\n});\n\nconst useSelectStyles = makeStyles({\n base: {\n appearance: 'none',\n ...shorthands.border('1px', 'solid', 'transparent'),\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n boxShadow: 'none',\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground1,\n cursor: 'pointer',\n flexGrow: 1,\n maxWidth: '100%',\n paddingBottom: 0,\n paddingTop: 0,\n\n ':focus': {\n outlineWidth: '2px',\n outlineStyle: 'solid',\n outlineColor: 'transparent',\n },\n },\n disabled: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n color: tokens.colorNeutralForegroundDisabled,\n cursor: 'not-allowed',\n '@media (forced-colors: active)': {\n ...shorthands.borderColor('GrayText'),\n },\n },\n disabledUnderline: {\n ...shorthands.borderColor(\n tokens.colorTransparentStrokeDisabled,\n tokens.colorTransparentStrokeDisabled,\n tokens.colorNeutralStrokeDisabled,\n ),\n },\n\n small: {\n height: fieldHeights.small,\n paddingLeft: paddingLeft.small,\n paddingRight: paddingRight.small,\n ...typographyStyles.caption1,\n },\n medium: {\n height: fieldHeights.medium,\n paddingLeft: paddingLeft.medium,\n paddingRight: paddingRight.medium,\n ...typographyStyles.body1,\n },\n large: {\n height: fieldHeights.large,\n paddingLeft: paddingLeft.large,\n paddingRight: paddingRight.large,\n ...typographyStyles.body2,\n },\n outline: {\n backgroundColor: tokens.colorNeutralBackground1,\n ...shorthands.border('1px', 'solid', tokens.colorNeutralStroke1),\n borderBottomColor: tokens.colorNeutralStrokeAccessible,\n\n '&:hover': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Hover),\n borderBottomColor: tokens.colorNeutralStrokeAccessible,\n },\n\n '&:active': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Pressed),\n borderBottomColor: tokens.colorNeutralStrokeAccessible,\n },\n },\n underline: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderBottom('1px', 'solid', tokens.colorNeutralStrokeAccessible),\n ...shorthands.borderRadius(0),\n },\n 'filled-lighter': {\n backgroundColor: tokens.colorNeutralBackground1,\n },\n 'filled-darker': {\n backgroundColor: tokens.colorNeutralBackground3,\n },\n invalid: {\n ':not(:focus-within),:hover:not(:focus-within)': {\n ...shorthands.borderColor(tokens.colorPaletteRedBorder2),\n },\n },\n invalidUnderline: {\n ':not(:focus-within),:hover:not(:focus-within)': {\n borderBottomColor: tokens.colorPaletteRedBorder2,\n },\n },\n});\n\nconst useIconStyles = makeStyles({\n icon: {\n boxSizing: 'border-box',\n color: tokens.colorNeutralStrokeAccessible,\n display: 'block',\n position: 'absolute',\n pointerEvents: 'none',\n\n // the SVG must have display: block for accurate positioning\n // otherwise an extra inline space is inserted after the svg element\n '& svg': {\n display: 'block',\n },\n },\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n '@media (forced-colors: active)': {\n color: 'GrayText',\n },\n },\n small: {\n fontSize: iconSizes.small,\n height: iconSizes.small,\n right: tokens.spacingHorizontalSNudge,\n width: iconSizes.small,\n },\n medium: {\n fontSize: iconSizes.medium,\n height: iconSizes.medium,\n right: tokens.spacingHorizontalMNudge,\n width: iconSizes.medium,\n },\n large: {\n fontSize: iconSizes.large,\n height: iconSizes.large,\n right: tokens.spacingHorizontalM,\n width: iconSizes.large,\n },\n});\n\n/**\n * Apply styling to the Select slots based on the state\n */\nexport const useSelectStyles_unstable = (state: SelectState): SelectState => {\n const { size, appearance } = state;\n const disabled = state.select.disabled;\n const invalid = `${state.select['aria-invalid']}` === 'true';\n\n const iconStyles = useIconStyles();\n const rootStyles = useRootStyles();\n const selectStyles = useSelectStyles();\n\n state.root.className = mergeClasses(selectClassNames.root, rootStyles.base, state.root.className);\n\n state.select.className = mergeClasses(\n selectClassNames.select,\n selectStyles.base,\n selectStyles[size],\n selectStyles[appearance],\n !disabled && invalid && appearance !== 'underline' && selectStyles.invalid,\n !disabled && invalid && appearance === 'underline' && selectStyles.invalidUnderline,\n disabled && selectStyles.disabled,\n disabled && appearance === 'underline' && selectStyles.disabledUnderline,\n state.select.className,\n );\n\n if (state.icon) {\n state.icon.className = mergeClasses(\n selectClassNames.icon,\n iconStyles.icon,\n disabled && iconStyles.disabled,\n iconStyles[size],\n state.icon.className,\n );\n }\n\n return state;\n};\n"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AACA;AAIaA,wBAAgB,GAAgC;EAC3DC,IAAI,EAAE,YAAY;EAClBC,MAAM,EAAE,oBAAoB;EAC5BC,IAAI,EAAE;CACP;AAED,MAAMC,SAAS,GAAG;EAChBC,KAAK,EAAE,MAAM;EACbC,MAAM,EAAE,MAAM;EACdC,KAAK,EAAE;CACR;AAED;AACA,MAAMC,YAAY,GAAG;EACnBH,KAAK,EAAE,MAAM;EACbC,MAAM,EAAE,MAAM;EACdC,KAAK,EAAE;CACR;AAED;;;;;;;AAOA,MAAME,YAAY,GAAG;EACnBJ,KAAK,EAAE,QAAQK,oBAAM,CAACC,uBAAuB;QACvCP,SAAS,CAACC,KAAK;QACfK,oBAAM,CAACE,oBAAoB;QAC3BF,oBAAM,CAACE,oBAAoB,GAAG;EACpCN,MAAM,EAAE,QAAQI,oBAAM,CAACG,uBAAuB;QACxCT,SAAS,CAACE,MAAM;QAChBI,oBAAM,CAACE,oBAAoB;QAC3BF,oBAAM,CAACE,oBAAoB,GAAG;EACpCL,KAAK,EAAE,QAAQG,oBAAM,CAACI,kBAAkB;QAClCV,SAAS,CAACG,KAAK;QACfG,oBAAM,CAACC,uBAAuB;QAC9BD,oBAAM,CAACC,uBAAuB;CACrC;AAED;;AAEA,MAAMI,WAAW,GAAG;EAClBV,KAAK,EAAE,QAAQK,oBAAM,CAACC,uBAAuB,MAAMD,oBAAM,CAACE,oBAAoB,GAAG;EACjFN,MAAM,EAAE,QAAQI,oBAAM,CAACG,uBAAuB,MAAMH,oBAAM,CAACE,oBAAoB,GAAG;EAClFL,KAAK,EAAE,QAAQG,oBAAM,CAACI,kBAAkB,MAAMJ,oBAAM,CAACC,uBAAuB;CAC7E;AAED;AAEA,MAAMK,aAAa,gBAAGC,gBAAU;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R,KAAK,CAAClB,IAAI,EAAE;IACdkB,KAAK,CAAClB,IAAI,CAAC0B,SAAS,GAAGZ,oBAAY,CACjCjB,wBAAgB,CAACG,IAAI,EACrBuB,UAAU,CAACvB,IAAI,EACfqB,QAAQ,IAAIE,UAAU,CAACF,QAAQ,EAC/BE,UAAU,CAACJ,IAAI,CAAC,EAChBD,KAAK,CAAClB,IAAI,CAAC0B,SAAS,CACrB;;EAGH,OAAOR,KAAK;AACd,CAAC;AAlCYrB,gCAAwB","names":["exports","root","select","icon","iconSizes","small","medium","large","fieldHeights","paddingRight","react_theme_1","spacingHorizontalSNudge","spacingHorizontalXXS","spacingHorizontalMNudge","spacingHorizontalM","paddingLeft","useRootStyles","react_1","useSelectStyles","useIconStyles","useSelectStyles_unstable","state","size","appearance","disabled","invalid","iconStyles","rootStyles","selectStyles","className","base","invalidUnderline","disabledUnderline"],"sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-select/src/components/Select/useSelectStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { SlotClassNames } from '@fluentui/react-utilities';\nimport type { SelectSlots, SelectState } from './Select.types';\n\nexport const selectClassNames: SlotClassNames<SelectSlots> = {\n root: 'fui-Select',\n select: 'fui-Select__select',\n icon: 'fui-Select__icon',\n};\n\nconst iconSizes = {\n small: '16px',\n medium: '20px',\n large: '24px',\n};\n\n//TODO: Should fieldHeights be a set of global design tokens or constants?\nconst fieldHeights = {\n small: '24px',\n medium: '32px',\n large: '40px',\n};\n\n/* Since the <select> element must span the full width and cannot have children,\n * the right padding needs to be calculated from the sum of the following:\n * 1. Field padding-right\n * 2. Icon width\n * 3. Content-icon spacing\n * 4. Content inner padding\n */\nconst paddingRight = {\n small: `calc(${tokens.spacingHorizontalSNudge}\n + ${iconSizes.small}\n + ${tokens.spacingHorizontalXXS}\n + ${tokens.spacingHorizontalXXS})`,\n medium: `calc(${tokens.spacingHorizontalMNudge}\n + ${iconSizes.medium}\n + ${tokens.spacingHorizontalXXS}\n + ${tokens.spacingHorizontalXXS})`,\n large: `calc(${tokens.spacingHorizontalM}\n + ${iconSizes.large}\n + ${tokens.spacingHorizontalSNudge}\n + ${tokens.spacingHorizontalSNudge})`,\n};\n\n/* Left padding is calculated from the outer padding + inner content padding values\n * since <select> can't have additional child content or custom inner layout */\nconst paddingLeft = {\n small: `calc(${tokens.spacingHorizontalSNudge} + ${tokens.spacingHorizontalXXS})`,\n medium: `calc(${tokens.spacingHorizontalMNudge} + ${tokens.spacingHorizontalXXS})`,\n large: `calc(${tokens.spacingHorizontalM} + ${tokens.spacingHorizontalSNudge})`,\n};\n\n/* end of shared values */\n\nconst useRootStyles = makeStyles({\n base: {\n alignItems: 'center',\n boxSizing: 'border-box',\n display: 'flex',\n flexWrap: 'nowrap',\n fontFamily: tokens.fontFamilyBase,\n position: 'relative',\n\n '&::after': {\n backgroundImage: `linear-gradient(\n 0deg,\n ${tokens.colorCompoundBrandStroke} 0%,\n ${tokens.colorCompoundBrandStroke} 50%,\n transparent 50%,\n transparent 100%\n )`,\n ...shorthands.borderRadius(0, 0, tokens.borderRadiusMedium, tokens.borderRadiusMedium),\n boxSizing: 'border-box',\n content: '\"\"',\n height: tokens.borderRadiusMedium,\n position: 'absolute',\n bottom: '0',\n left: '0',\n right: '0',\n transform: 'scaleX(0)',\n transitionProperty: 'transform',\n transitionDuration: tokens.durationUltraFast,\n transitionDelay: tokens.curveAccelerateMid,\n\n '@media screen and (prefers-reduced-motion: reduce)': {\n transitionDuration: '0.01ms',\n transitionDelay: '0.01ms',\n },\n },\n\n '&:focus-within::after': {\n transform: 'scaleX(1)',\n transitionProperty: 'transform',\n transitionDuration: tokens.durationNormal,\n transitionDelay: tokens.curveDecelerateMid,\n\n '@media screen and (prefers-reduced-motion: reduce)': {\n transitionDuration: '0.01ms',\n transitionDelay: '0.01ms',\n },\n },\n },\n});\n\nconst useSelectStyles = makeStyles({\n base: {\n appearance: 'none',\n ...shorthands.border('1px', 'solid', 'transparent'),\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n boxShadow: 'none',\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground1,\n cursor: 'pointer',\n flexGrow: 1,\n maxWidth: '100%',\n paddingBottom: 0,\n paddingTop: 0,\n\n ':focus': {\n outlineWidth: '2px',\n outlineStyle: 'solid',\n outlineColor: 'transparent',\n },\n },\n disabled: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n color: tokens.colorNeutralForegroundDisabled,\n cursor: 'not-allowed',\n '@media (forced-colors: active)': {\n ...shorthands.borderColor('GrayText'),\n },\n },\n disabledUnderline: {\n ...shorthands.borderColor(\n tokens.colorTransparentStrokeDisabled,\n tokens.colorTransparentStrokeDisabled,\n tokens.colorNeutralStrokeDisabled,\n ),\n },\n\n small: {\n height: fieldHeights.small,\n paddingLeft: paddingLeft.small,\n paddingRight: paddingRight.small,\n ...typographyStyles.caption1,\n },\n medium: {\n height: fieldHeights.medium,\n paddingLeft: paddingLeft.medium,\n paddingRight: paddingRight.medium,\n ...typographyStyles.body1,\n },\n large: {\n height: fieldHeights.large,\n paddingLeft: paddingLeft.large,\n paddingRight: paddingRight.large,\n ...typographyStyles.body2,\n },\n outline: {\n backgroundColor: tokens.colorNeutralBackground1,\n ...shorthands.border('1px', 'solid', tokens.colorNeutralStroke1),\n borderBottomColor: tokens.colorNeutralStrokeAccessible,\n\n '&:hover': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Hover),\n borderBottomColor: tokens.colorNeutralStrokeAccessible,\n },\n\n '&:active': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Pressed),\n borderBottomColor: tokens.colorNeutralStrokeAccessible,\n },\n },\n underline: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderBottom('1px', 'solid', tokens.colorNeutralStrokeAccessible),\n ...shorthands.borderRadius(0),\n },\n 'filled-lighter': {\n backgroundColor: tokens.colorNeutralBackground1,\n },\n 'filled-darker': {\n backgroundColor: tokens.colorNeutralBackground3,\n },\n invalid: {\n ':not(:focus-within),:hover:not(:focus-within)': {\n ...shorthands.borderColor(tokens.colorPaletteRedBorder2),\n },\n },\n invalidUnderline: {\n ':not(:focus-within),:hover:not(:focus-within)': {\n borderBottomColor: tokens.colorPaletteRedBorder2,\n },\n },\n});\n\nconst useIconStyles = makeStyles({\n icon: {\n boxSizing: 'border-box',\n color: tokens.colorNeutralStrokeAccessible,\n display: 'block',\n position: 'absolute',\n pointerEvents: 'none',\n\n // the SVG must have display: block for accurate positioning\n // otherwise an extra inline space is inserted after the svg element\n '& svg': {\n display: 'block',\n },\n },\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n '@media (forced-colors: active)': {\n color: 'GrayText',\n },\n },\n small: {\n fontSize: iconSizes.small,\n height: iconSizes.small,\n right: tokens.spacingHorizontalSNudge,\n width: iconSizes.small,\n },\n medium: {\n fontSize: iconSizes.medium,\n height: iconSizes.medium,\n right: tokens.spacingHorizontalMNudge,\n width: iconSizes.medium,\n },\n large: {\n fontSize: iconSizes.large,\n height: iconSizes.large,\n right: tokens.spacingHorizontalM,\n width: iconSizes.large,\n },\n});\n\n/**\n * Apply styling to the Select slots based on the state\n */\nexport const useSelectStyles_unstable = (state: SelectState): SelectState => {\n const { size, appearance } = state;\n const disabled = state.select.disabled;\n const invalid = `${state.select['aria-invalid']}` === 'true';\n\n const iconStyles = useIconStyles();\n const rootStyles = useRootStyles();\n const selectStyles = useSelectStyles();\n\n state.root.className = mergeClasses(selectClassNames.root, rootStyles.base, state.root.className);\n\n state.select.className = mergeClasses(\n selectClassNames.select,\n selectStyles.base,\n selectStyles[size],\n selectStyles[appearance],\n !disabled && invalid && appearance !== 'underline' && selectStyles.invalid,\n !disabled && invalid && appearance === 'underline' && selectStyles.invalidUnderline,\n disabled && selectStyles.disabled,\n disabled && appearance === 'underline' && selectStyles.disabledUnderline,\n state.select.className,\n );\n\n if (state.icon) {\n state.icon.className = mergeClasses(\n selectClassNames.icon,\n iconStyles.icon,\n disabled && iconStyles.disabled,\n iconStyles[size],\n state.icon.className,\n );\n }\n\n return state;\n};\n"]}
|
|
@@ -4,13 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.SelectField = exports.selectFieldClassNames = void 0;
|
|
7
|
-
|
|
8
7
|
const React = /*#__PURE__*/require("react");
|
|
9
|
-
|
|
10
8
|
const react_field_1 = /*#__PURE__*/require("@fluentui/react-field");
|
|
11
|
-
|
|
12
9
|
const Select_1 = /*#__PURE__*/require("../../Select");
|
|
13
|
-
|
|
14
10
|
exports.selectFieldClassNames = /*#__PURE__*/react_field_1.getFieldClassNames('SelectField');
|
|
15
11
|
exports.SelectField = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
16
12
|
const state = react_field_1.useField_unstable(props, ref, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AAEA;AAOA;AAIaA,6BAAqB,gBAAGC,gCAAkB,CAAC,aAAa,CAAC;AAEzDD,mBAAW,gBAA0CE,KAAK,CAACC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAChG,MAAMC,KAAK,GAAGL,+BAAiB,CAACG,KAAK,EAAEC,GAAG,EAAE;IAAEE,SAAS,EAAEC,eAAM;IAAEC,UAAU,EAAET;EAAqB,CAAE,CAAC;EACrGC,qCAAuB,CAACK,KAAK,CAAC;EAC9B,OAAOL,kCAAoB,CAACK,KAAK,CAAC;AACpC,CAAC,CAAC;AAEFN,mBAAW,CAACU,WAAW,GAAG,aAAa","names":["exports","react_field_1","React","forwardRef","props","ref","state","component","Select_1","classNames","displayName"],"sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-select/src/components/SelectField/SelectField.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { FieldProps } from '@fluentui/react-field';\nimport {\n getFieldClassNames,\n renderField_unstable,\n useFieldStyles_unstable,\n useField_unstable,\n} from '@fluentui/react-field';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { Select } from '../../Select';\n\nexport type SelectFieldProps = FieldProps<typeof Select>;\n\nexport const selectFieldClassNames = getFieldClassNames('SelectField');\n\nexport const SelectField: ForwardRefComponent<SelectFieldProps> = React.forwardRef((props, ref) => {\n const state = useField_unstable(props, ref, { component: Select, classNames: selectFieldClassNames });\n useFieldStyles_unstable(state);\n return renderField_unstable(state);\n});\n\nSelectField.displayName = 'SelectField';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../../packages/react-components/react-select/src/components/SelectField/index.ts"],"
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAAA","names":["tslib_1"],"sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-select/src/components/SelectField/index.ts"],"sourcesContent":["export * from './SelectField';\n"]}
|
package/lib-commonjs/index.js
CHANGED
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.selectFieldClassNames = exports.SelectField_unstable = exports.useSelect_unstable = exports.useSelectStyles_unstable = exports.renderSelect_unstable = exports.selectClassNames = exports.Select = void 0;
|
|
7
|
-
|
|
8
7
|
var Select_1 = /*#__PURE__*/require("./Select");
|
|
9
|
-
|
|
10
8
|
Object.defineProperty(exports, "Select", {
|
|
11
9
|
enumerable: true,
|
|
12
10
|
get: function () {
|
|
@@ -37,9 +35,7 @@ Object.defineProperty(exports, "useSelect_unstable", {
|
|
|
37
35
|
return Select_1.useSelect_unstable;
|
|
38
36
|
}
|
|
39
37
|
});
|
|
40
|
-
|
|
41
38
|
var SelectField_1 = /*#__PURE__*/require("./SelectField");
|
|
42
|
-
|
|
43
39
|
Object.defineProperty(exports, "SelectField_unstable", {
|
|
44
40
|
enumerable: true,
|
|
45
41
|
get: function () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
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":"","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"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-select",
|
|
3
|
-
"version": "0.0.0-nightly-
|
|
3
|
+
"version": "0.0.0-nightly-20221230-0421.1",
|
|
4
4
|
"description": "Fluent UI React Select component",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@fluentui/eslint-plugin": "*",
|
|
29
29
|
"@fluentui/react-conformance": "*",
|
|
30
|
-
"@fluentui/react-conformance-griffel": "0.0.0-nightly-
|
|
30
|
+
"@fluentui/react-conformance-griffel": "0.0.0-nightly-20221230-0421.1"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@fluentui/react-field": "0.0.0-nightly-
|
|
33
|
+
"@fluentui/react-field": "0.0.0-nightly-20221230-0421.1",
|
|
34
34
|
"@fluentui/react-icons": "^2.0.175",
|
|
35
|
-
"@fluentui/react-theme": "0.0.0-nightly-
|
|
36
|
-
"@fluentui/react-utilities": "0.0.0-nightly-
|
|
35
|
+
"@fluentui/react-theme": "0.0.0-nightly-20221230-0421.1",
|
|
36
|
+
"@fluentui/react-utilities": "0.0.0-nightly-20221230-0421.1",
|
|
37
37
|
"@griffel/react": "^1.4.2",
|
|
38
38
|
"tslib": "^2.1.0"
|
|
39
39
|
},
|