@fluentui/react-select 9.1.4 → 9.1.6
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/.swcrc +30 -0
- package/CHANGELOG.json +79 -1
- package/CHANGELOG.md +28 -2
- package/lib/Select.js.map +1 -1
- package/lib/SelectField.js.map +1 -1
- package/lib/components/Select/Select.js.map +1 -1
- package/lib/components/Select/Select.types.js +1 -1
- package/lib/components/Select/Select.types.js.map +1 -1
- package/lib/components/Select/index.js.map +1 -1
- package/lib/components/Select/renderSelect.js +1 -7
- package/lib/components/Select/renderSelect.js.map +1 -1
- package/lib/components/Select/useSelect.js +2 -2
- package/lib/components/Select/useSelect.js.map +1 -1
- package/lib/components/Select/useSelectStyles.js.map +1 -1
- package/lib/components/SelectField/SelectField.js +1 -2
- package/lib/components/SelectField/SelectField.js.map +1 -1
- package/lib/components/SelectField/index.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib-commonjs/Select.js +5 -4
- package/lib-commonjs/Select.js.map +1 -1
- package/lib-commonjs/SelectField.js +5 -4
- package/lib-commonjs/SelectField.js.map +1 -1
- package/lib-commonjs/components/Select/Select.js +19 -20
- package/lib-commonjs/components/Select/Select.js.map +1 -1
- package/lib-commonjs/components/Select/Select.types.js +5 -2
- package/lib-commonjs/components/Select/Select.types.js.map +1 -1
- package/lib-commonjs/components/Select/index.js +9 -8
- package/lib-commonjs/components/Select/index.js.map +1 -1
- package/lib-commonjs/components/Select/renderSelect.js +13 -22
- package/lib-commonjs/components/Select/renderSelect.js.map +1 -1
- package/lib-commonjs/components/Select/useSelect.js +60 -69
- package/lib-commonjs/components/Select/useSelect.js.map +1 -1
- package/lib-commonjs/components/Select/useSelectStyles.js +589 -272
- package/lib-commonjs/components/Select/useSelectStyles.js.map +1 -1
- package/lib-commonjs/components/SelectField/SelectField.js +17 -11
- package/lib-commonjs/components/SelectField/SelectField.js.map +1 -1
- package/lib-commonjs/components/SelectField/index.js +5 -4
- package/lib-commonjs/components/SelectField/index.js.map +1 -1
- package/lib-commonjs/index.js +21 -49
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +10 -9
- package/lib-amd/Select.js +0 -6
- package/lib-amd/Select.js.map +0 -1
- package/lib-amd/SelectField.js +0 -6
- package/lib-amd/SelectField.js.map +0 -1
- package/lib-amd/components/Select/Select.js +0 -17
- package/lib-amd/components/Select/Select.js.map +0 -1
- package/lib-amd/components/Select/Select.types.js +0 -5
- package/lib-amd/components/Select/Select.types.js.map +0 -1
- package/lib-amd/components/Select/index.js +0 -10
- package/lib-amd/components/Select/index.js.map +0 -1
- package/lib-amd/components/Select/renderSelect.js +0 -16
- package/lib-amd/components/Select/renderSelect.js.map +0 -1
- package/lib-amd/components/Select/useSelect.js +0 -51
- package/lib-amd/components/Select/useSelect.js.map +0 -1
- package/lib-amd/components/Select/useSelectStyles.js +0 -154
- package/lib-amd/components/Select/useSelectStyles.js.map +0 -1
- package/lib-amd/components/SelectField/SelectField.js +0 -10
- package/lib-amd/components/SelectField/SelectField.js.map +0 -1
- package/lib-amd/components/SelectField/index.js +0 -6
- package/lib-amd/components/SelectField/index.js.map +0 -1
- package/lib-amd/index.js +0 -13
- package/lib-amd/index.js.map +0 -1
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
define(["require", "exports", "tslib", "@griffel/react", "@fluentui/react-theme"], function (require, exports, tslib_1, react_1, react_theme_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.useSelectStyles_unstable = exports.selectClassNames = void 0;
|
|
5
|
-
exports.selectClassNames = {
|
|
6
|
-
root: 'fui-Select',
|
|
7
|
-
select: 'fui-Select__select',
|
|
8
|
-
icon: 'fui-Select__icon',
|
|
9
|
-
};
|
|
10
|
-
var iconSizes = {
|
|
11
|
-
small: '16px',
|
|
12
|
-
medium: '20px',
|
|
13
|
-
large: '24px',
|
|
14
|
-
};
|
|
15
|
-
//TODO: Should fieldHeights be a set of global design tokens or constants?
|
|
16
|
-
var fieldHeights = {
|
|
17
|
-
small: '24px',
|
|
18
|
-
medium: '32px',
|
|
19
|
-
large: '40px',
|
|
20
|
-
};
|
|
21
|
-
/* Since the <select> element must span the full width and cannot have children,
|
|
22
|
-
* the right padding needs to be calculated from the sum of the following:
|
|
23
|
-
* 1. Field padding-right
|
|
24
|
-
* 2. Icon width
|
|
25
|
-
* 3. Content-icon spacing
|
|
26
|
-
* 4. Content inner padding
|
|
27
|
-
*/
|
|
28
|
-
var paddingRight = {
|
|
29
|
-
small: "calc(" + react_theme_1.tokens.spacingHorizontalSNudge + "\n + " + iconSizes.small + "\n + " + react_theme_1.tokens.spacingHorizontalXXS + "\n + " + react_theme_1.tokens.spacingHorizontalXXS + ")",
|
|
30
|
-
medium: "calc(" + react_theme_1.tokens.spacingHorizontalMNudge + "\n + " + iconSizes.medium + "\n + " + react_theme_1.tokens.spacingHorizontalXXS + "\n + " + react_theme_1.tokens.spacingHorizontalXXS + ")",
|
|
31
|
-
large: "calc(" + react_theme_1.tokens.spacingHorizontalM + "\n + " + iconSizes.large + "\n + " + react_theme_1.tokens.spacingHorizontalSNudge + "\n + " + react_theme_1.tokens.spacingHorizontalSNudge + ")",
|
|
32
|
-
};
|
|
33
|
-
/* Left padding is calculated from the outer padding + inner content padding values
|
|
34
|
-
* since <select> can't have additional child content or custom inner layout */
|
|
35
|
-
var paddingLeft = {
|
|
36
|
-
small: "calc(" + react_theme_1.tokens.spacingHorizontalSNudge + " + " + react_theme_1.tokens.spacingHorizontalXXS + ")",
|
|
37
|
-
medium: "calc(" + react_theme_1.tokens.spacingHorizontalMNudge + " + " + react_theme_1.tokens.spacingHorizontalXXS + ")",
|
|
38
|
-
large: "calc(" + react_theme_1.tokens.spacingHorizontalM + " + " + react_theme_1.tokens.spacingHorizontalSNudge + ")",
|
|
39
|
-
};
|
|
40
|
-
/* end of shared values */
|
|
41
|
-
var useRootStyles = react_1.makeStyles({
|
|
42
|
-
base: {
|
|
43
|
-
alignItems: 'center',
|
|
44
|
-
boxSizing: 'border-box',
|
|
45
|
-
display: 'flex',
|
|
46
|
-
flexWrap: 'nowrap',
|
|
47
|
-
fontFamily: react_theme_1.tokens.fontFamilyBase,
|
|
48
|
-
position: 'relative',
|
|
49
|
-
'&::after': tslib_1.__assign(tslib_1.__assign({ backgroundImage: "linear-gradient(\n 0deg,\n " + react_theme_1.tokens.colorCompoundBrandStroke + " 0%,\n " + react_theme_1.tokens.colorCompoundBrandStroke + " 50%,\n transparent 50%,\n transparent 100%\n )" }, react_1.shorthands.borderRadius(0, 0, react_theme_1.tokens.borderRadiusMedium, react_theme_1.tokens.borderRadiusMedium)), { boxSizing: 'border-box', content: '""', height: react_theme_1.tokens.borderRadiusMedium, position: 'absolute', bottom: '0', left: '0', right: '0', transform: 'scaleX(0)', transitionProperty: 'transform', transitionDuration: react_theme_1.tokens.durationUltraFast, transitionDelay: react_theme_1.tokens.curveAccelerateMid, '@media screen and (prefers-reduced-motion: reduce)': {
|
|
50
|
-
transitionDuration: '0.01ms',
|
|
51
|
-
transitionDelay: '0.01ms',
|
|
52
|
-
} }),
|
|
53
|
-
'&:focus-within::after': {
|
|
54
|
-
transform: 'scaleX(1)',
|
|
55
|
-
transitionProperty: 'transform',
|
|
56
|
-
transitionDuration: react_theme_1.tokens.durationNormal,
|
|
57
|
-
transitionDelay: react_theme_1.tokens.curveDecelerateMid,
|
|
58
|
-
'@media screen and (prefers-reduced-motion: reduce)': {
|
|
59
|
-
transitionDuration: '0.01ms',
|
|
60
|
-
transitionDelay: '0.01ms',
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
});
|
|
65
|
-
var useSelectStyles = react_1.makeStyles({
|
|
66
|
-
base: tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ appearance: 'none' }, react_1.shorthands.border('1px', 'solid', 'transparent')), react_1.shorthands.borderRadius(react_theme_1.tokens.borderRadiusMedium)), { boxShadow: 'none', boxSizing: 'border-box', color: react_theme_1.tokens.colorNeutralForeground1, cursor: 'pointer', flexGrow: 1, maxWidth: '100%', paddingBottom: 0, paddingTop: 0, ':focus': {
|
|
67
|
-
outlineWidth: '2px',
|
|
68
|
-
outlineStyle: 'solid',
|
|
69
|
-
outlineColor: 'transparent',
|
|
70
|
-
} }),
|
|
71
|
-
disabled: tslib_1.__assign(tslib_1.__assign({ backgroundColor: react_theme_1.tokens.colorTransparentBackground }, react_1.shorthands.borderColor(react_theme_1.tokens.colorNeutralStrokeDisabled)), { color: react_theme_1.tokens.colorNeutralForegroundDisabled, cursor: 'not-allowed', '@media (forced-colors: active)': tslib_1.__assign({}, react_1.shorthands.borderColor('GrayText')) }),
|
|
72
|
-
disabledUnderline: tslib_1.__assign({}, react_1.shorthands.borderColor(react_theme_1.tokens.colorTransparentStrokeDisabled, react_theme_1.tokens.colorTransparentStrokeDisabled, react_theme_1.tokens.colorNeutralStrokeDisabled)),
|
|
73
|
-
small: tslib_1.__assign({ height: fieldHeights.small, paddingLeft: paddingLeft.small, paddingRight: paddingRight.small }, react_theme_1.typographyStyles.caption1),
|
|
74
|
-
medium: tslib_1.__assign({ height: fieldHeights.medium, paddingLeft: paddingLeft.medium, paddingRight: paddingRight.medium }, react_theme_1.typographyStyles.body1),
|
|
75
|
-
large: tslib_1.__assign({ height: fieldHeights.large, paddingLeft: paddingLeft.large, paddingRight: paddingRight.large }, react_theme_1.typographyStyles.body2),
|
|
76
|
-
outline: tslib_1.__assign(tslib_1.__assign({ backgroundColor: react_theme_1.tokens.colorNeutralBackground1 }, react_1.shorthands.border('1px', 'solid', react_theme_1.tokens.colorNeutralStroke1)), { borderBottomColor: react_theme_1.tokens.colorNeutralStrokeAccessible }),
|
|
77
|
-
outlineInteractive: {
|
|
78
|
-
'&:hover': tslib_1.__assign(tslib_1.__assign({}, react_1.shorthands.borderColor(react_theme_1.tokens.colorNeutralStroke1Hover)), { borderBottomColor: react_theme_1.tokens.colorNeutralStrokeAccessible }),
|
|
79
|
-
'&:active': tslib_1.__assign(tslib_1.__assign({}, react_1.shorthands.borderColor(react_theme_1.tokens.colorNeutralStroke1Pressed)), { borderBottomColor: react_theme_1.tokens.colorNeutralStrokeAccessible }),
|
|
80
|
-
},
|
|
81
|
-
underline: tslib_1.__assign(tslib_1.__assign({ backgroundColor: react_theme_1.tokens.colorTransparentBackground }, react_1.shorthands.borderBottom('1px', 'solid', react_theme_1.tokens.colorNeutralStrokeAccessible)), react_1.shorthands.borderRadius(0)),
|
|
82
|
-
'filled-lighter': {
|
|
83
|
-
backgroundColor: react_theme_1.tokens.colorNeutralBackground1,
|
|
84
|
-
},
|
|
85
|
-
'filled-darker': {
|
|
86
|
-
backgroundColor: react_theme_1.tokens.colorNeutralBackground3,
|
|
87
|
-
},
|
|
88
|
-
invalid: {
|
|
89
|
-
':not(:focus-within),:hover:not(:focus-within)': tslib_1.__assign({}, react_1.shorthands.borderColor(react_theme_1.tokens.colorPaletteRedBorder2)),
|
|
90
|
-
},
|
|
91
|
-
invalidUnderline: {
|
|
92
|
-
':not(:focus-within),:hover:not(:focus-within)': {
|
|
93
|
-
borderBottomColor: react_theme_1.tokens.colorPaletteRedBorder2,
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
});
|
|
97
|
-
var useIconStyles = react_1.makeStyles({
|
|
98
|
-
icon: {
|
|
99
|
-
boxSizing: 'border-box',
|
|
100
|
-
color: react_theme_1.tokens.colorNeutralStrokeAccessible,
|
|
101
|
-
display: 'block',
|
|
102
|
-
position: 'absolute',
|
|
103
|
-
pointerEvents: 'none',
|
|
104
|
-
// the SVG must have display: block for accurate positioning
|
|
105
|
-
// otherwise an extra inline space is inserted after the svg element
|
|
106
|
-
'& svg': {
|
|
107
|
-
display: 'block',
|
|
108
|
-
},
|
|
109
|
-
},
|
|
110
|
-
disabled: {
|
|
111
|
-
color: react_theme_1.tokens.colorNeutralForegroundDisabled,
|
|
112
|
-
'@media (forced-colors: active)': {
|
|
113
|
-
color: 'GrayText',
|
|
114
|
-
},
|
|
115
|
-
},
|
|
116
|
-
small: {
|
|
117
|
-
fontSize: iconSizes.small,
|
|
118
|
-
height: iconSizes.small,
|
|
119
|
-
right: react_theme_1.tokens.spacingHorizontalSNudge,
|
|
120
|
-
width: iconSizes.small,
|
|
121
|
-
},
|
|
122
|
-
medium: {
|
|
123
|
-
fontSize: iconSizes.medium,
|
|
124
|
-
height: iconSizes.medium,
|
|
125
|
-
right: react_theme_1.tokens.spacingHorizontalMNudge,
|
|
126
|
-
width: iconSizes.medium,
|
|
127
|
-
},
|
|
128
|
-
large: {
|
|
129
|
-
fontSize: iconSizes.large,
|
|
130
|
-
height: iconSizes.large,
|
|
131
|
-
right: react_theme_1.tokens.spacingHorizontalM,
|
|
132
|
-
width: iconSizes.large,
|
|
133
|
-
},
|
|
134
|
-
});
|
|
135
|
-
/**
|
|
136
|
-
* Apply styling to the Select slots based on the state
|
|
137
|
-
*/
|
|
138
|
-
var useSelectStyles_unstable = function (state) {
|
|
139
|
-
var size = state.size, appearance = state.appearance;
|
|
140
|
-
var disabled = state.select.disabled;
|
|
141
|
-
var invalid = "" + state.select['aria-invalid'] === 'true';
|
|
142
|
-
var iconStyles = useIconStyles();
|
|
143
|
-
var rootStyles = useRootStyles();
|
|
144
|
-
var selectStyles = useSelectStyles();
|
|
145
|
-
state.root.className = react_1.mergeClasses(exports.selectClassNames.root, rootStyles.base, state.root.className);
|
|
146
|
-
state.select.className = react_1.mergeClasses(exports.selectClassNames.select, selectStyles.base, selectStyles[size], selectStyles[appearance], !disabled && appearance === 'outline' && selectStyles.outlineInteractive, !disabled && invalid && appearance !== 'underline' && selectStyles.invalid, !disabled && invalid && appearance === 'underline' && selectStyles.invalidUnderline, disabled && selectStyles.disabled, disabled && appearance === 'underline' && selectStyles.disabledUnderline, state.select.className);
|
|
147
|
-
if (state.icon) {
|
|
148
|
-
state.icon.className = react_1.mergeClasses(exports.selectClassNames.icon, iconStyles.icon, disabled && iconStyles.disabled, iconStyles[size], state.icon.className);
|
|
149
|
-
}
|
|
150
|
-
return state;
|
|
151
|
-
};
|
|
152
|
-
exports.useSelectStyles_unstable = useSelectStyles_unstable;
|
|
153
|
-
});
|
|
154
|
-
//# sourceMappingURL=useSelectStyles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useSelectStyles.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-select/src/components/Select/useSelectStyles.ts"],"names":[],"mappings":";;;;IAKa,QAAA,gBAAgB,GAAgC;QAC3D,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,oBAAoB;QAC5B,IAAI,EAAE,kBAAkB;KACzB,CAAC;IAEF,IAAM,SAAS,GAAG;QAChB,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,MAAM;QACd,KAAK,EAAE,MAAM;KACd,CAAC;IAEF,0EAA0E;IAC1E,IAAM,YAAY,GAAG;QACnB,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,MAAM;QACd,KAAK,EAAE,MAAM;KACd,CAAC;IAEF;;;;;;OAMG;IACH,IAAM,YAAY,GAAG;QACnB,KAAK,EAAE,UAAQ,oBAAM,CAAC,uBAAuB,gBACvC,SAAS,CAAC,KAAK,gBACf,oBAAM,CAAC,oBAAoB,gBAC3B,oBAAM,CAAC,oBAAoB,MAAG;QACpC,MAAM,EAAE,UAAQ,oBAAM,CAAC,uBAAuB,gBACxC,SAAS,CAAC,MAAM,gBAChB,oBAAM,CAAC,oBAAoB,gBAC3B,oBAAM,CAAC,oBAAoB,MAAG;QACpC,KAAK,EAAE,UAAQ,oBAAM,CAAC,kBAAkB,gBAClC,SAAS,CAAC,KAAK,gBACf,oBAAM,CAAC,uBAAuB,gBAC9B,oBAAM,CAAC,uBAAuB,MAAG;KACxC,CAAC;IAEF;mFAC+E;IAC/E,IAAM,WAAW,GAAG;QAClB,KAAK,EAAE,UAAQ,oBAAM,CAAC,uBAAuB,WAAM,oBAAM,CAAC,oBAAoB,MAAG;QACjF,MAAM,EAAE,UAAQ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;QAEvC,KAAK,CAAC,IAAI,CAAC,SAAS,GAAG,oBAAY,CAAC,wBAAgB,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAElG,KAAK,CAAC,MAAM,CAAC,SAAS,GAAG,oBAAY,CACnC,wBAAgB,CAAC,MAAM,EACvB,YAAY,CAAC,IAAI,EACjB,YAAY,CAAC,IAAI,CAAC,EAClB,YAAY,CAAC,UAAU,CAAC,EACxB,CAAC,QAAQ,IAAI,UAAU,KAAK,SAAS,IAAI,YAAY,CAAC,kBAAkB,EACxE,CAAC,QAAQ,IAAI,OAAO,IAAI,UAAU,KAAK,WAAW,IAAI,YAAY,CAAC,OAAO,EAC1E,CAAC,QAAQ,IAAI,OAAO,IAAI,UAAU,KAAK,WAAW,IAAI,YAAY,CAAC,gBAAgB,EACnF,QAAQ,IAAI,YAAY,CAAC,QAAQ,EACjC,QAAQ,IAAI,UAAU,KAAK,WAAW,IAAI,YAAY,CAAC,iBAAiB,EACxE,KAAK,CAAC,MAAM,CAAC,SAAS,CACvB,CAAC;QAEF,IAAI,KAAK,CAAC,IAAI,EAAE;YACd,KAAK,CAAC,IAAI,CAAC,SAAS,GAAG,oBAAY,CACjC,wBAAgB,CAAC,IAAI,EACrB,UAAU,CAAC,IAAI,EACf,QAAQ,IAAI,UAAU,CAAC,QAAQ,EAC/B,UAAU,CAAC,IAAI,CAAC,EAChB,KAAK,CAAC,IAAI,CAAC,SAAS,CACrB,CAAC;SACH;QAED,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;IAnCW,QAAA,wBAAwB,4BAmCnC","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 outlineInteractive: {\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 && appearance === 'outline' && selectStyles.outlineInteractive,\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,10 +0,0 @@
|
|
|
1
|
-
define(["require", "exports", "@fluentui/react-field", "../../Select"], function (require, exports, react_field_1, Select_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.SelectField = exports.selectFieldClassNames = void 0;
|
|
5
|
-
/** @deprecated Use Field with Select: `<Field><Select /></Field>` */
|
|
6
|
-
exports.selectFieldClassNames = react_field_1.getDeprecatedFieldClassNames(Select_1.selectClassNames.root);
|
|
7
|
-
/** @deprecated Use Field with Select: `<Field><Select /></Field>` */
|
|
8
|
-
exports.SelectField = react_field_1.makeDeprecatedField(Select_1.Select);
|
|
9
|
-
});
|
|
10
|
-
//# sourceMappingURL=SelectField.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SelectField.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-select/src/components/SelectField/SelectField.tsx"],"names":[],"mappings":";;;;IAOA,qEAAqE;IACxD,QAAA,qBAAqB,GAAG,0CAA4B,CAAC,yBAAgB,CAAC,IAAI,CAAC,CAAC;IACzF,qEAAqE;IACxD,QAAA,WAAW,GAA0C,iCAAmB,CAAC,eAAM,CAAC,CAAC","sourcesContent":["/* eslint-disable deprecation/deprecation */\nimport { DeprecatedFieldProps, getDeprecatedFieldClassNames, makeDeprecatedField } from '@fluentui/react-field';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { Select, selectClassNames, SelectProps } from '../../Select';\n\n/** @deprecated Use Field with Select: `<Field><Select /></Field>` */\nexport type SelectFieldProps = DeprecatedFieldProps<SelectProps>;\n/** @deprecated Use Field with Select: `<Field><Select /></Field>` */\nexport const selectFieldClassNames = getDeprecatedFieldClassNames(selectClassNames.root);\n/** @deprecated Use Field with Select: `<Field><Select /></Field>` */\nexport const SelectField: ForwardRefComponent<SelectFieldProps> = makeDeprecatedField(Select);\n"]}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
define(["require", "exports", "tslib", "./SelectField"], function (require, exports, tslib_1, SelectField_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
tslib_1.__exportStar(SelectField_1, exports);
|
|
5
|
-
});
|
|
6
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-select/src/components/SelectField/index.ts"],"names":[],"mappings":";;;IAAA,6CAA8B","sourcesContent":["export * from './SelectField';\n"]}
|
package/lib-amd/index.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
define(["require", "exports", "./Select", "./SelectField"], function (require, exports, Select_1, SelectField_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.selectFieldClassNames = exports.SelectField_unstable = exports.useSelect_unstable = exports.useSelectStyles_unstable = exports.renderSelect_unstable = exports.selectClassNames = exports.Select = void 0;
|
|
5
|
-
Object.defineProperty(exports, "Select", { enumerable: true, get: function () { return Select_1.Select; } });
|
|
6
|
-
Object.defineProperty(exports, "selectClassNames", { enumerable: true, get: function () { return Select_1.selectClassNames; } });
|
|
7
|
-
Object.defineProperty(exports, "renderSelect_unstable", { enumerable: true, get: function () { return Select_1.renderSelect_unstable; } });
|
|
8
|
-
Object.defineProperty(exports, "useSelectStyles_unstable", { enumerable: true, get: function () { return Select_1.useSelectStyles_unstable; } });
|
|
9
|
-
Object.defineProperty(exports, "useSelect_unstable", { enumerable: true, get: function () { return Select_1.useSelect_unstable; } });
|
|
10
|
-
Object.defineProperty(exports, "SelectField_unstable", { enumerable: true, get: function () { return SelectField_1.SelectField; } });
|
|
11
|
-
Object.defineProperty(exports, "selectFieldClassNames", { enumerable: true, get: function () { return SelectField_1.selectFieldClassNames; } });
|
|
12
|
-
});
|
|
13
|
-
//# sourceMappingURL=index.js.map
|
package/lib-amd/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-select/src/index.ts"],"names":[],"mappings":";;;;IACE,gGAAA,MAAM,OAAA;IACN,0GAAA,gBAAgB,OAAA;IAChB,+GAAA,qBAAqB,OAAA;IACrB,kHAAA,wBAAwB,OAAA;IACxB,4GAAA,kBAAkB,OAAA;IAKX,mHAAA,WAAW,OAAwB;IAAE,oHAAA,qBAAqB,OAAA","sourcesContent":["export {\n Select,\n selectClassNames,\n renderSelect_unstable,\n useSelectStyles_unstable,\n useSelect_unstable,\n} from './Select';\nexport type { SelectOnChangeData, SelectProps, SelectSlots, SelectState } from './Select';\n\n// eslint-disable-next-line deprecation/deprecation\nexport { SelectField as SelectField_unstable, selectFieldClassNames } from './SelectField';\n// eslint-disable-next-line deprecation/deprecation\nexport type { SelectFieldProps as SelectFieldProps_unstable } from './SelectField';\n"]}
|