@fluentui/react-button 0.0.0-nightly-20250702-0405.1 → 0.0.0-nightly-20250703-1103.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.md +13 -13
- package/lib/components/Button/useButtonStyles.styles.raw.js +488 -0
- package/lib/components/Button/useButtonStyles.styles.raw.js.map +1 -0
- package/lib/components/CompoundButton/useCompoundButtonStyles.styles.raw.js +241 -0
- package/lib/components/CompoundButton/useCompoundButtonStyles.styles.raw.js.map +1 -0
- package/lib/components/MenuButton/useMenuButtonStyles.styles.raw.js +112 -0
- package/lib/components/MenuButton/useMenuButtonStyles.styles.raw.js.map +1 -0
- package/lib/components/SplitButton/useSplitButtonStyles.styles.raw.js +158 -0
- package/lib/components/SplitButton/useSplitButtonStyles.styles.raw.js.map +1 -0
- package/lib/components/ToggleButton/useToggleButtonStyles.styles.raw.js +226 -0
- package/lib/components/ToggleButton/useToggleButtonStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/Button/useButtonStyles.styles.raw.js +495 -0
- package/lib-commonjs/components/Button/useButtonStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.styles.raw.js +253 -0
- package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/MenuButton/useMenuButtonStyles.styles.raw.js +129 -0
- package/lib-commonjs/components/MenuButton/useMenuButtonStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/SplitButton/useSplitButtonStyles.styles.raw.js +174 -0
- package/lib-commonjs/components/SplitButton/useSplitButtonStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.styles.raw.js +237 -0
- package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.styles.raw.js.map +1 -0
- package/package.json +10 -10
@@ -0,0 +1,253 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
3
|
+
value: true
|
4
|
+
});
|
5
|
+
function _export(target, all) {
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
7
|
+
enumerable: true,
|
8
|
+
get: all[name]
|
9
|
+
});
|
10
|
+
}
|
11
|
+
_export(exports, {
|
12
|
+
compoundButtonClassNames: function() {
|
13
|
+
return compoundButtonClassNames;
|
14
|
+
},
|
15
|
+
useCompoundButtonStyles_unstable: function() {
|
16
|
+
return useCompoundButtonStyles_unstable;
|
17
|
+
}
|
18
|
+
});
|
19
|
+
const _reacttheme = require("@fluentui/react-theme");
|
20
|
+
const _react = require("@griffel/react");
|
21
|
+
const _useButtonStylesstyles = require("../Button/useButtonStyles.styles");
|
22
|
+
const compoundButtonClassNames = {
|
23
|
+
root: 'fui-CompoundButton',
|
24
|
+
icon: 'fui-CompoundButton__icon',
|
25
|
+
contentContainer: 'fui-CompoundButton__contentContainer',
|
26
|
+
secondaryContent: 'fui-CompoundButton__secondaryContent'
|
27
|
+
};
|
28
|
+
const useRootStyles = (0, _react.makeStyles)({
|
29
|
+
// Base styles
|
30
|
+
base: {
|
31
|
+
height: 'auto',
|
32
|
+
[`& .${compoundButtonClassNames.secondaryContent}`]: {
|
33
|
+
color: _reacttheme.tokens.colorNeutralForeground2
|
34
|
+
},
|
35
|
+
':hover': {
|
36
|
+
[`& .${compoundButtonClassNames.secondaryContent}`]: {
|
37
|
+
color: _reacttheme.tokens.colorNeutralForeground2Hover
|
38
|
+
}
|
39
|
+
},
|
40
|
+
':hover:active': {
|
41
|
+
[`& .${compoundButtonClassNames.secondaryContent}`]: {
|
42
|
+
color: _reacttheme.tokens.colorNeutralForeground2Pressed
|
43
|
+
}
|
44
|
+
}
|
45
|
+
},
|
46
|
+
// High contrast styles
|
47
|
+
highContrast: {
|
48
|
+
'@media (forced-colors: active)': {
|
49
|
+
':hover': {
|
50
|
+
[`& .${compoundButtonClassNames.secondaryContent}`]: {
|
51
|
+
color: 'Highlight'
|
52
|
+
}
|
53
|
+
},
|
54
|
+
':hover:active': {
|
55
|
+
[`& .${compoundButtonClassNames.secondaryContent}`]: {
|
56
|
+
color: 'Highlight'
|
57
|
+
}
|
58
|
+
}
|
59
|
+
}
|
60
|
+
},
|
61
|
+
// Appearance variations
|
62
|
+
outline: {},
|
63
|
+
primary: {
|
64
|
+
[`& .${compoundButtonClassNames.secondaryContent}`]: {
|
65
|
+
color: _reacttheme.tokens.colorNeutralForegroundOnBrand
|
66
|
+
},
|
67
|
+
':hover': {
|
68
|
+
[`& .${compoundButtonClassNames.secondaryContent}`]: {
|
69
|
+
color: _reacttheme.tokens.colorNeutralForegroundOnBrand
|
70
|
+
}
|
71
|
+
},
|
72
|
+
':hover:active': {
|
73
|
+
[`& .${compoundButtonClassNames.secondaryContent}`]: {
|
74
|
+
color: _reacttheme.tokens.colorNeutralForegroundOnBrand
|
75
|
+
}
|
76
|
+
},
|
77
|
+
'@media (forced-colors: active)': {
|
78
|
+
[`& .${compoundButtonClassNames.secondaryContent}`]: {
|
79
|
+
color: 'HighlightText'
|
80
|
+
}
|
81
|
+
}
|
82
|
+
},
|
83
|
+
secondary: {},
|
84
|
+
subtle: {
|
85
|
+
[`& .${compoundButtonClassNames.secondaryContent}`]: {
|
86
|
+
color: _reacttheme.tokens.colorNeutralForeground2
|
87
|
+
},
|
88
|
+
':hover': {
|
89
|
+
[`& .${compoundButtonClassNames.secondaryContent}`]: {
|
90
|
+
color: _reacttheme.tokens.colorNeutralForeground2Hover
|
91
|
+
}
|
92
|
+
},
|
93
|
+
':hover:active': {
|
94
|
+
[`& .${compoundButtonClassNames.secondaryContent}`]: {
|
95
|
+
color: _reacttheme.tokens.colorNeutralForeground2Pressed
|
96
|
+
}
|
97
|
+
},
|
98
|
+
'@media (forced-colors: active)': {
|
99
|
+
':hover': {
|
100
|
+
[`& .${compoundButtonClassNames.secondaryContent}`]: {
|
101
|
+
color: 'Canvas'
|
102
|
+
}
|
103
|
+
},
|
104
|
+
':hover:active': {
|
105
|
+
[`& .${compoundButtonClassNames.secondaryContent}`]: {
|
106
|
+
color: 'Canvas'
|
107
|
+
}
|
108
|
+
}
|
109
|
+
}
|
110
|
+
},
|
111
|
+
transparent: {
|
112
|
+
[`& .${compoundButtonClassNames.secondaryContent}`]: {
|
113
|
+
color: _reacttheme.tokens.colorNeutralForeground2
|
114
|
+
},
|
115
|
+
':hover': {
|
116
|
+
[`& .${compoundButtonClassNames.secondaryContent}`]: {
|
117
|
+
color: _reacttheme.tokens.colorNeutralForeground2BrandHover
|
118
|
+
}
|
119
|
+
},
|
120
|
+
':hover:active': {
|
121
|
+
[`& .${compoundButtonClassNames.secondaryContent}`]: {
|
122
|
+
color: _reacttheme.tokens.colorNeutralForeground2BrandPressed
|
123
|
+
}
|
124
|
+
}
|
125
|
+
},
|
126
|
+
// Size variations
|
127
|
+
small: {
|
128
|
+
padding: `${_reacttheme.tokens.spacingHorizontalS} ${_reacttheme.tokens.spacingHorizontalS} ${_reacttheme.tokens.spacingHorizontalMNudge} ${_reacttheme.tokens.spacingHorizontalS}`,
|
129
|
+
fontSize: _reacttheme.tokens.fontSizeBase300,
|
130
|
+
lineHeight: _reacttheme.tokens.lineHeightBase300
|
131
|
+
},
|
132
|
+
medium: {
|
133
|
+
padding: `14px ${_reacttheme.tokens.spacingHorizontalM} ${_reacttheme.tokens.spacingHorizontalL} ${_reacttheme.tokens.spacingHorizontalM}`,
|
134
|
+
fontSize: _reacttheme.tokens.fontSizeBase300,
|
135
|
+
lineHeight: _reacttheme.tokens.lineHeightBase300
|
136
|
+
},
|
137
|
+
large: {
|
138
|
+
padding: `18px ${_reacttheme.tokens.spacingHorizontalL} ${_reacttheme.tokens.spacingHorizontalXL} ${_reacttheme.tokens.spacingHorizontalL}`,
|
139
|
+
fontSize: _reacttheme.tokens.fontSizeBase400,
|
140
|
+
lineHeight: _reacttheme.tokens.lineHeightBase400
|
141
|
+
},
|
142
|
+
// Disabled styles
|
143
|
+
disabled: {
|
144
|
+
[`& .${compoundButtonClassNames.secondaryContent}`]: {
|
145
|
+
color: _reacttheme.tokens.colorNeutralForegroundDisabled
|
146
|
+
},
|
147
|
+
':hover': {
|
148
|
+
[`& .${compoundButtonClassNames.secondaryContent}`]: {
|
149
|
+
color: _reacttheme.tokens.colorNeutralForegroundDisabled
|
150
|
+
}
|
151
|
+
},
|
152
|
+
':hover:active': {
|
153
|
+
[`& .${compoundButtonClassNames.secondaryContent}`]: {
|
154
|
+
color: _reacttheme.tokens.colorNeutralForegroundDisabled
|
155
|
+
}
|
156
|
+
}
|
157
|
+
},
|
158
|
+
// Disabled high contrast styles
|
159
|
+
disabledHighContrast: {
|
160
|
+
'@media (forced-colors: active)': {
|
161
|
+
[`& .${compoundButtonClassNames.secondaryContent}`]: {
|
162
|
+
color: 'GrayText'
|
163
|
+
},
|
164
|
+
':hover': {
|
165
|
+
[`& .${compoundButtonClassNames.secondaryContent}`]: {
|
166
|
+
color: 'GrayText'
|
167
|
+
}
|
168
|
+
},
|
169
|
+
':hover:active': {
|
170
|
+
[`& .${compoundButtonClassNames.secondaryContent}`]: {
|
171
|
+
color: 'GrayText'
|
172
|
+
}
|
173
|
+
}
|
174
|
+
}
|
175
|
+
}
|
176
|
+
});
|
177
|
+
const useRootIconOnlyStyles = (0, _react.makeStyles)({
|
178
|
+
// Size variations
|
179
|
+
small: {
|
180
|
+
padding: _reacttheme.tokens.spacingHorizontalXS,
|
181
|
+
maxWidth: '48px',
|
182
|
+
minWidth: '48px'
|
183
|
+
},
|
184
|
+
medium: {
|
185
|
+
padding: _reacttheme.tokens.spacingHorizontalSNudge,
|
186
|
+
maxWidth: '52px',
|
187
|
+
minWidth: '52px'
|
188
|
+
},
|
189
|
+
large: {
|
190
|
+
padding: _reacttheme.tokens.spacingHorizontalS,
|
191
|
+
maxWidth: '56px',
|
192
|
+
minWidth: '56px'
|
193
|
+
}
|
194
|
+
});
|
195
|
+
const useIconStyles = (0, _react.makeStyles)({
|
196
|
+
// Base styles
|
197
|
+
base: {
|
198
|
+
fontSize: '40px',
|
199
|
+
height: '40px',
|
200
|
+
width: '40px'
|
201
|
+
},
|
202
|
+
// Icon position variations
|
203
|
+
before: {
|
204
|
+
marginRight: _reacttheme.tokens.spacingHorizontalM
|
205
|
+
},
|
206
|
+
after: {
|
207
|
+
marginLeft: _reacttheme.tokens.spacingHorizontalM
|
208
|
+
}
|
209
|
+
});
|
210
|
+
const useContentContainerStyles = (0, _react.makeStyles)({
|
211
|
+
// Base styles
|
212
|
+
base: {
|
213
|
+
display: 'flex',
|
214
|
+
flexDirection: 'column',
|
215
|
+
textAlign: 'left'
|
216
|
+
}
|
217
|
+
});
|
218
|
+
const useSecondaryContentStyles = (0, _react.makeStyles)({
|
219
|
+
// Base styles
|
220
|
+
base: {
|
221
|
+
lineHeight: '100%',
|
222
|
+
fontWeight: _reacttheme.tokens.fontWeightRegular
|
223
|
+
},
|
224
|
+
// Size variations
|
225
|
+
small: {
|
226
|
+
fontSize: _reacttheme.tokens.fontSizeBase200
|
227
|
+
},
|
228
|
+
medium: {
|
229
|
+
fontSize: _reacttheme.tokens.fontSizeBase200
|
230
|
+
},
|
231
|
+
large: {
|
232
|
+
fontSize: _reacttheme.tokens.fontSizeBase300
|
233
|
+
}
|
234
|
+
});
|
235
|
+
const useCompoundButtonStyles_unstable = (state)=>{
|
236
|
+
'use no memo';
|
237
|
+
const rootStyles = useRootStyles();
|
238
|
+
const rootIconOnlyStyles = useRootIconOnlyStyles();
|
239
|
+
const iconStyles = useIconStyles();
|
240
|
+
const contentContainerStyles = useContentContainerStyles();
|
241
|
+
const secondaryContentStyles = useSecondaryContentStyles();
|
242
|
+
const { appearance, disabled, disabledFocusable, iconOnly, iconPosition, size } = state;
|
243
|
+
state.root.className = (0, _react.mergeClasses)(compoundButtonClassNames.root, rootStyles.base, rootStyles.highContrast, appearance && rootStyles[appearance], rootStyles[size], (disabled || disabledFocusable) && rootStyles.disabled, (disabled || disabledFocusable) && rootStyles.disabledHighContrast, iconOnly && rootIconOnlyStyles[size], state.root.className);
|
244
|
+
state.contentContainer.className = (0, _react.mergeClasses)(compoundButtonClassNames.contentContainer, contentContainerStyles.base, state.contentContainer.className);
|
245
|
+
if (state.icon) {
|
246
|
+
state.icon.className = (0, _react.mergeClasses)(compoundButtonClassNames.icon, iconStyles.base, state.root.children !== undefined && state.root.children !== null && iconStyles[iconPosition], state.icon.className);
|
247
|
+
}
|
248
|
+
if (state.secondaryContent) {
|
249
|
+
state.secondaryContent.className = (0, _react.mergeClasses)(compoundButtonClassNames.secondaryContent, secondaryContentStyles.base, secondaryContentStyles[size], state.secondaryContent.className);
|
250
|
+
}
|
251
|
+
(0, _useButtonStylesstyles.useButtonStyles_unstable)(state);
|
252
|
+
return state;
|
253
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../src/components/CompoundButton/useCompoundButtonStyles.styles.ts"],"sourcesContent":["import { tokens } from '@fluentui/react-theme';\nimport { mergeClasses, makeStyles } from '@griffel/react';\nimport { useButtonStyles_unstable } from '../Button/useButtonStyles.styles';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { CompoundButtonSlots, CompoundButtonState } from './CompoundButton.types';\n\nexport const compoundButtonClassNames: SlotClassNames<CompoundButtonSlots> = {\n root: 'fui-CompoundButton',\n icon: 'fui-CompoundButton__icon',\n contentContainer: 'fui-CompoundButton__contentContainer',\n secondaryContent: 'fui-CompoundButton__secondaryContent',\n};\n\nconst useRootStyles = makeStyles({\n // Base styles\n base: {\n height: 'auto',\n\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2,\n },\n\n ':hover': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2Hover,\n },\n },\n\n ':hover:active': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2Pressed,\n },\n },\n },\n\n // High contrast styles\n highContrast: {\n '@media (forced-colors: active)': {\n ':hover': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: 'Highlight',\n },\n },\n\n ':hover:active': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: 'Highlight',\n },\n },\n },\n },\n\n // Appearance variations\n outline: {\n /* No styles */\n },\n primary: {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForegroundOnBrand,\n },\n\n ':hover': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForegroundOnBrand,\n },\n },\n\n ':hover:active': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForegroundOnBrand,\n },\n },\n\n '@media (forced-colors: active)': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: 'HighlightText',\n },\n },\n },\n secondary: {\n /* The secondary styles are exactly the same as the base styles. */\n },\n subtle: {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2,\n },\n\n ':hover': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2Hover,\n },\n },\n\n ':hover:active': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2Pressed,\n },\n },\n\n '@media (forced-colors: active)': {\n ':hover': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: 'Canvas',\n },\n },\n ':hover:active': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: 'Canvas',\n },\n },\n },\n },\n transparent: {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2,\n },\n\n ':hover': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2BrandHover,\n },\n },\n\n ':hover:active': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2BrandPressed,\n },\n },\n },\n\n // Size variations\n small: {\n padding: `${tokens.spacingHorizontalS} ${tokens.spacingHorizontalS} ${tokens.spacingHorizontalMNudge} ${tokens.spacingHorizontalS}`,\n\n fontSize: tokens.fontSizeBase300,\n lineHeight: tokens.lineHeightBase300,\n },\n medium: {\n padding: `14px ${tokens.spacingHorizontalM} ${tokens.spacingHorizontalL} ${tokens.spacingHorizontalM}`,\n\n fontSize: tokens.fontSizeBase300,\n lineHeight: tokens.lineHeightBase300,\n },\n large: {\n padding: `18px ${tokens.spacingHorizontalL} ${tokens.spacingHorizontalXL} ${tokens.spacingHorizontalL}`,\n\n fontSize: tokens.fontSizeBase400,\n lineHeight: tokens.lineHeightBase400,\n },\n\n // Disabled styles\n disabled: {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n\n ':hover': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n\n ':hover:active': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n },\n\n // Disabled high contrast styles\n disabledHighContrast: {\n '@media (forced-colors: active)': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: 'GrayText',\n },\n\n ':hover': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: 'GrayText',\n },\n },\n\n ':hover:active': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: 'GrayText',\n },\n },\n },\n },\n});\n\nconst useRootIconOnlyStyles = makeStyles({\n // Size variations\n small: {\n padding: tokens.spacingHorizontalXS,\n\n maxWidth: '48px',\n minWidth: '48px',\n },\n medium: {\n padding: tokens.spacingHorizontalSNudge,\n\n maxWidth: '52px',\n minWidth: '52px',\n },\n large: {\n padding: tokens.spacingHorizontalS,\n\n maxWidth: '56px',\n minWidth: '56px',\n },\n});\n\nconst useIconStyles = makeStyles({\n // Base styles\n base: {\n fontSize: '40px',\n height: '40px',\n width: '40px',\n },\n\n // Icon position variations\n before: {\n marginRight: tokens.spacingHorizontalM,\n },\n after: {\n marginLeft: tokens.spacingHorizontalM,\n },\n});\n\nconst useContentContainerStyles = makeStyles({\n // Base styles\n base: {\n display: 'flex',\n flexDirection: 'column',\n textAlign: 'left',\n },\n});\n\nconst useSecondaryContentStyles = makeStyles({\n // Base styles\n base: {\n lineHeight: '100%',\n fontWeight: tokens.fontWeightRegular,\n },\n\n // Size variations\n small: {\n fontSize: tokens.fontSizeBase200,\n },\n medium: {\n fontSize: tokens.fontSizeBase200,\n },\n large: {\n fontSize: tokens.fontSizeBase300,\n },\n});\n\nexport const useCompoundButtonStyles_unstable = (state: CompoundButtonState): CompoundButtonState => {\n 'use no memo';\n\n const rootStyles = useRootStyles();\n const rootIconOnlyStyles = useRootIconOnlyStyles();\n const iconStyles = useIconStyles();\n const contentContainerStyles = useContentContainerStyles();\n const secondaryContentStyles = useSecondaryContentStyles();\n\n const { appearance, disabled, disabledFocusable, iconOnly, iconPosition, size } = state;\n\n state.root.className = mergeClasses(\n compoundButtonClassNames.root,\n\n // Root styles\n rootStyles.base,\n rootStyles.highContrast,\n appearance && rootStyles[appearance],\n rootStyles[size],\n\n // Disabled styles\n (disabled || disabledFocusable) && rootStyles.disabled,\n (disabled || disabledFocusable) && rootStyles.disabledHighContrast,\n\n // Icon-only styles\n iconOnly && rootIconOnlyStyles[size],\n\n // User provided class name\n state.root.className,\n );\n\n state.contentContainer.className = mergeClasses(\n compoundButtonClassNames.contentContainer,\n contentContainerStyles.base,\n state.contentContainer.className,\n );\n\n if (state.icon) {\n state.icon.className = mergeClasses(\n compoundButtonClassNames.icon,\n iconStyles.base,\n state.root.children !== undefined && state.root.children !== null && iconStyles[iconPosition],\n state.icon.className,\n );\n }\n\n if (state.secondaryContent) {\n state.secondaryContent.className = mergeClasses(\n compoundButtonClassNames.secondaryContent,\n secondaryContentStyles.base,\n secondaryContentStyles[size],\n state.secondaryContent.className,\n );\n }\n\n useButtonStyles_unstable(state);\n\n return state;\n};\n"],"names":["compoundButtonClassNames","useCompoundButtonStyles_unstable","root","icon","contentContainer","secondaryContent","useRootStyles","makeStyles","base","height","color","tokens","colorNeutralForeground2","colorNeutralForeground2Hover","colorNeutralForeground2Pressed","highContrast","outline","primary","colorNeutralForegroundOnBrand","secondary","subtle","transparent","colorNeutralForeground2BrandHover","colorNeutralForeground2BrandPressed","small","padding","spacingHorizontalS","spacingHorizontalMNudge","fontSize","fontSizeBase300","lineHeight","lineHeightBase300","medium","spacingHorizontalM","spacingHorizontalL","large","spacingHorizontalXL","fontSizeBase400","lineHeightBase400","disabled","colorNeutralForegroundDisabled","disabledHighContrast","useRootIconOnlyStyles","spacingHorizontalXS","maxWidth","minWidth","spacingHorizontalSNudge","useIconStyles","width","before","marginRight","after","marginLeft","useContentContainerStyles","display","flexDirection","textAlign","useSecondaryContentStyles","fontWeight","fontWeightRegular","fontSizeBase200","state","rootStyles","rootIconOnlyStyles","iconStyles","contentContainerStyles","secondaryContentStyles","appearance","disabledFocusable","iconOnly","iconPosition","size","className","mergeClasses","children","undefined","useButtonStyles_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAMaA,wBAAAA;eAAAA;;IA4PAC,gCAAAA;eAAAA;;;4BAlQU;uBACkB;uCACA;AAIlC,MAAMD,2BAAgE;IAC3EE,MAAM;IACNC,MAAM;IACNC,kBAAkB;IAClBC,kBAAkB;AACpB;AAEA,MAAMC,gBAAgBC,IAAAA,iBAAAA,EAAW;IAC/B,cAAc;IACdC,MAAM;QACJC,QAAQ;QAER,CAAC,CAAC,GAAG,EAAET,yBAAyBK,gBAAgB,CAAC,CAAC,CAAC,EA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AC5BV,MAAMxD,gBAAgB,CAACmE,SAAS;IAEpC;IAEAI,IAAAA,+CAAAA,EAAyBf;IAEzB,OAAOA;AACT"}
|
@@ -0,0 +1,129 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
3
|
+
value: true
|
4
|
+
});
|
5
|
+
function _export(target, all) {
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
7
|
+
enumerable: true,
|
8
|
+
get: all[name]
|
9
|
+
});
|
10
|
+
}
|
11
|
+
_export(exports, {
|
12
|
+
menuButtonClassNames: function() {
|
13
|
+
return menuButtonClassNames;
|
14
|
+
},
|
15
|
+
useMenuButtonStyles_unstable: function() {
|
16
|
+
return useMenuButtonStyles_unstable;
|
17
|
+
}
|
18
|
+
});
|
19
|
+
const _reacticons = require("@fluentui/react-icons");
|
20
|
+
const _reacttheme = require("@fluentui/react-theme");
|
21
|
+
const _react = require("@griffel/react");
|
22
|
+
const _useButtonStylesstyles = require("../Button/useButtonStyles.styles");
|
23
|
+
const menuButtonClassNames = {
|
24
|
+
root: 'fui-MenuButton',
|
25
|
+
icon: 'fui-MenuButton__icon',
|
26
|
+
menuIcon: 'fui-MenuButton__menuIcon'
|
27
|
+
};
|
28
|
+
const useRootExpandedStyles = (0, _react.makeStyles)({
|
29
|
+
base: {
|
30
|
+
[`& .${_reacticons.iconFilledClassName}`]: {
|
31
|
+
display: 'inline'
|
32
|
+
},
|
33
|
+
[`& .${_reacticons.iconRegularClassName}`]: {
|
34
|
+
display: 'none'
|
35
|
+
}
|
36
|
+
},
|
37
|
+
// Appearance variations
|
38
|
+
outline: {
|
39
|
+
..._react.shorthands.borderColor(_reacttheme.tokens.colorNeutralStroke1Selected),
|
40
|
+
..._react.shorthands.borderWidth(_reacttheme.tokens.strokeWidthThicker),
|
41
|
+
color: _reacttheme.tokens.colorNeutralForeground1Selected
|
42
|
+
},
|
43
|
+
primary: {
|
44
|
+
backgroundColor: _reacttheme.tokens.colorBrandBackgroundSelected
|
45
|
+
},
|
46
|
+
secondary: {
|
47
|
+
backgroundColor: _reacttheme.tokens.colorNeutralBackground1Selected,
|
48
|
+
..._react.shorthands.borderColor(_reacttheme.tokens.colorNeutralStroke1Selected),
|
49
|
+
color: _reacttheme.tokens.colorNeutralForeground1Selected
|
50
|
+
},
|
51
|
+
subtle: {
|
52
|
+
backgroundColor: _reacttheme.tokens.colorSubtleBackgroundSelected,
|
53
|
+
color: _reacttheme.tokens.colorNeutralForeground2Selected
|
54
|
+
},
|
55
|
+
transparent: {
|
56
|
+
backgroundColor: _reacttheme.tokens.colorTransparentBackgroundSelected,
|
57
|
+
color: _reacttheme.tokens.colorNeutralForeground2BrandSelected
|
58
|
+
}
|
59
|
+
});
|
60
|
+
const useIconExpandedStyles = (0, _react.makeStyles)({
|
61
|
+
// Appearance variations
|
62
|
+
outline: {
|
63
|
+
color: _reacttheme.tokens.colorNeutralForeground1Selected
|
64
|
+
},
|
65
|
+
primary: {},
|
66
|
+
secondary: {
|
67
|
+
color: _reacttheme.tokens.colorNeutralForeground1Selected
|
68
|
+
},
|
69
|
+
subtle: {
|
70
|
+
color: _reacttheme.tokens.colorNeutralForeground2BrandSelected
|
71
|
+
},
|
72
|
+
transparent: {
|
73
|
+
color: _reacttheme.tokens.colorNeutralForeground2BrandSelected
|
74
|
+
},
|
75
|
+
highContrast: {
|
76
|
+
// High contrast styles
|
77
|
+
'@media (forced-colors: active)': {
|
78
|
+
':hover': {
|
79
|
+
color: 'Highlight'
|
80
|
+
}
|
81
|
+
}
|
82
|
+
}
|
83
|
+
});
|
84
|
+
const useMenuIconStyles = (0, _react.makeStyles)({
|
85
|
+
base: {
|
86
|
+
lineHeight: 0
|
87
|
+
},
|
88
|
+
// Size appearance
|
89
|
+
small: {
|
90
|
+
fontSize: '12px',
|
91
|
+
height: '12px',
|
92
|
+
lineHeight: _reacttheme.tokens.lineHeightBase200,
|
93
|
+
width: '12px'
|
94
|
+
},
|
95
|
+
medium: {
|
96
|
+
fontSize: '12px',
|
97
|
+
height: '12px',
|
98
|
+
lineHeight: _reacttheme.tokens.lineHeightBase200,
|
99
|
+
width: '12px'
|
100
|
+
},
|
101
|
+
large: {
|
102
|
+
fontSize: '16px',
|
103
|
+
height: '16px',
|
104
|
+
lineHeight: _reacttheme.tokens.lineHeightBase400,
|
105
|
+
width: '16px'
|
106
|
+
},
|
107
|
+
// Not-icon only
|
108
|
+
notIconOnly: {
|
109
|
+
marginLeft: _reacttheme.tokens.spacingHorizontalXS
|
110
|
+
}
|
111
|
+
});
|
112
|
+
const useMenuButtonStyles_unstable = (state)=>{
|
113
|
+
'use no memo';
|
114
|
+
const rootExpandedStyles = useRootExpandedStyles();
|
115
|
+
const iconExpandedStyles = useIconExpandedStyles();
|
116
|
+
const menuIconStyles = useMenuIconStyles();
|
117
|
+
state.root.className = (0, _react.mergeClasses)(menuButtonClassNames.root, state.root['aria-expanded'] && rootExpandedStyles.base, state.root['aria-expanded'] && rootExpandedStyles[state.appearance], state.root.className);
|
118
|
+
if (state.icon) {
|
119
|
+
state.icon.className = (0, _react.mergeClasses)(menuButtonClassNames.icon, state.root['aria-expanded'] && iconExpandedStyles[state.appearance] && iconExpandedStyles.highContrast, state.icon.className);
|
120
|
+
}
|
121
|
+
if (state.menuIcon) {
|
122
|
+
state.menuIcon.className = (0, _react.mergeClasses)(menuButtonClassNames.menuIcon, menuIconStyles.base, menuIconStyles[state.size], !state.iconOnly && menuIconStyles.notIconOnly, state.menuIcon.className);
|
123
|
+
}
|
124
|
+
(0, _useButtonStylesstyles.useButtonStyles_unstable)({
|
125
|
+
...state,
|
126
|
+
iconPosition: 'before'
|
127
|
+
});
|
128
|
+
return state;
|
129
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../src/components/MenuButton/useMenuButtonStyles.styles.ts"],"sourcesContent":["import { iconFilledClassName, iconRegularClassName } from '@fluentui/react-icons';\nimport { tokens } from '@fluentui/react-theme';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { mergeClasses, makeStyles, shorthands } from '@griffel/react';\nimport { useButtonStyles_unstable } from '../Button/useButtonStyles.styles';\nimport type { MenuButtonSlots, MenuButtonState } from './MenuButton.types';\n\nexport const menuButtonClassNames: SlotClassNames<MenuButtonSlots> = {\n root: 'fui-MenuButton',\n icon: 'fui-MenuButton__icon',\n menuIcon: 'fui-MenuButton__menuIcon',\n};\n\nconst useRootExpandedStyles = makeStyles({\n base: {\n [`& .${iconFilledClassName}`]: {\n display: 'inline',\n },\n [`& .${iconRegularClassName}`]: {\n display: 'none',\n },\n },\n\n // Appearance variations\n outline: {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Selected),\n ...shorthands.borderWidth(tokens.strokeWidthThicker),\n color: tokens.colorNeutralForeground1Selected,\n },\n primary: {\n backgroundColor: tokens.colorBrandBackgroundSelected,\n },\n secondary: {\n backgroundColor: tokens.colorNeutralBackground1Selected,\n ...shorthands.borderColor(tokens.colorNeutralStroke1Selected),\n color: tokens.colorNeutralForeground1Selected,\n },\n subtle: {\n backgroundColor: tokens.colorSubtleBackgroundSelected,\n color: tokens.colorNeutralForeground2Selected,\n },\n transparent: {\n backgroundColor: tokens.colorTransparentBackgroundSelected,\n color: tokens.colorNeutralForeground2BrandSelected,\n },\n});\n\nconst useIconExpandedStyles = makeStyles({\n // Appearance variations\n outline: {\n color: tokens.colorNeutralForeground1Selected,\n },\n primary: {\n /* The primary styles are exactly the same as the base styles. */\n },\n secondary: {\n color: tokens.colorNeutralForeground1Selected,\n },\n subtle: {\n color: tokens.colorNeutralForeground2BrandSelected,\n },\n transparent: {\n color: tokens.colorNeutralForeground2BrandSelected,\n },\n highContrast: {\n // High contrast styles\n '@media (forced-colors: active)': {\n ':hover': {\n color: 'Highlight',\n },\n },\n },\n});\n\nconst useMenuIconStyles = makeStyles({\n base: {\n lineHeight: 0,\n },\n\n // Size appearance\n small: {\n fontSize: '12px',\n height: '12px',\n lineHeight: tokens.lineHeightBase200,\n width: '12px',\n },\n medium: {\n fontSize: '12px',\n height: '12px',\n lineHeight: tokens.lineHeightBase200,\n width: '12px',\n },\n large: {\n fontSize: '16px',\n height: '16px',\n lineHeight: tokens.lineHeightBase400,\n width: '16px',\n },\n\n // Not-icon only\n notIconOnly: {\n marginLeft: tokens.spacingHorizontalXS,\n },\n});\n\nexport const useMenuButtonStyles_unstable = (state: MenuButtonState): MenuButtonState => {\n 'use no memo';\n\n const rootExpandedStyles = useRootExpandedStyles();\n const iconExpandedStyles = useIconExpandedStyles();\n const menuIconStyles = useMenuIconStyles();\n\n state.root.className = mergeClasses(\n menuButtonClassNames.root,\n state.root['aria-expanded'] && rootExpandedStyles.base,\n state.root['aria-expanded'] && rootExpandedStyles[state.appearance],\n state.root.className,\n );\n\n if (state.icon) {\n state.icon.className = mergeClasses(\n menuButtonClassNames.icon,\n state.root['aria-expanded'] && iconExpandedStyles[state.appearance] && iconExpandedStyles.highContrast,\n state.icon.className,\n );\n }\n\n if (state.menuIcon) {\n state.menuIcon.className = mergeClasses(\n menuButtonClassNames.menuIcon,\n menuIconStyles.base,\n menuIconStyles[state.size],\n !state.iconOnly && menuIconStyles.notIconOnly,\n state.menuIcon.className,\n );\n }\n\n useButtonStyles_unstable({ ...state, iconPosition: 'before' });\n\n return state;\n};\n"],"names":["menuButtonClassNames","useMenuButtonStyles_unstable","root","icon","menuIcon","useRootExpandedStyles","makeStyles","base","iconFilledClassName","display","iconRegularClassName","outline","shorthands","borderColor","tokens","colorNeutralStroke1Selected","borderWidth","strokeWidthThicker","color","colorNeutralForeground1Selected","primary","backgroundColor","colorBrandBackgroundSelected","secondary","colorNeutralBackground1Selected","subtle","colorSubtleBackgroundSelected","colorNeutralForeground2Selected","transparent","colorTransparentBackgroundSelected","colorNeutralForeground2BrandSelected","useIconExpandedStyles","highContrast","useMenuIconStyles","lineHeight","small","fontSize","height","lineHeightBase200","width","medium","large","lineHeightBase400","notIconOnly","marginLeft","spacingHorizontalXS","state","rootExpandedStyles","iconExpandedStyles","menuIconSt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ACnEN,MAAM5C,IAAI,CAACgD,SAAS;IAGtB,IAAIJ,MAAM3C,IAAI,EAAE;QACd2C,MAAM3C,IAAI,CAAC+C,SAAS,GAAGC,IAAAA,mBAAAA,EACrBnD,qBAAqBG,IAAI,EACzB2C,MAAM5C,IAAI,CAAC,gBAAgB,IAAI8C,kBAAkB,CAACF,MAAMM,UAAU,CAAC,IAAIJ,mBAAmBhB,YAAY,EACtGc,MAAM3C,IAAI,CAAC+C,SAAS;IAExB;IAEA,IAAIJ,MAAM1C,QAAQ,EAAE;QAClB0C,MAAM1C,QAAQ,CAAC8C,SAAS,GAAGC,IAAAA,mBAAAA,EACzBnD,qBAAqBI,QAAQ,EAC7B6C,eAAe1C,IAAI,EACnB0C,cAAc,CAACH,MAAMO,IAAI,CAAC,EAC1B,CAACP,MAAMQ,QAAQ,IAAIL,eAAeN,WAAW,EAC7CG,MAAM1C,QAAQ,CAAC8C,SAAS;IAE5B;IAEAK,IAAAA,+CAAAA,EAAyB;QAAE,GAAGT,KAAK;QAAEU,cAAc;IAAS;IAE5D,OAAOV;AACT"}
|
@@ -0,0 +1,174 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
3
|
+
value: true
|
4
|
+
});
|
5
|
+
function _export(target, all) {
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
7
|
+
enumerable: true,
|
8
|
+
get: all[name]
|
9
|
+
});
|
10
|
+
}
|
11
|
+
_export(exports, {
|
12
|
+
splitButtonClassNames: function() {
|
13
|
+
return splitButtonClassNames;
|
14
|
+
},
|
15
|
+
useSplitButtonStyles_unstable: function() {
|
16
|
+
return useSplitButtonStyles_unstable;
|
17
|
+
}
|
18
|
+
});
|
19
|
+
const _react = require("@griffel/react");
|
20
|
+
const _reacttabster = require("@fluentui/react-tabster");
|
21
|
+
const _reacttheme = require("@fluentui/react-theme");
|
22
|
+
const splitButtonClassNames = {
|
23
|
+
root: 'fui-SplitButton',
|
24
|
+
menuButton: 'fui-SplitButton__menuButton',
|
25
|
+
primaryActionButton: 'fui-SplitButton__primaryActionButton'
|
26
|
+
};
|
27
|
+
// WCAG minimum target size for pointer targets that are immediately adjacent to other targets:
|
28
|
+
// https://w3c.github.io/wcag/guidelines/22/#target-size-minimum
|
29
|
+
const MIN_TARGET_SIZE = '24px';
|
30
|
+
const useFocusStyles = (0, _react.makeStyles)({
|
31
|
+
primaryActionButton: (0, _reacttabster.createCustomFocusIndicatorStyle)({
|
32
|
+
borderTopRightRadius: 0,
|
33
|
+
borderBottomRightRadius: 0
|
34
|
+
}),
|
35
|
+
menuButton: (0, _reacttabster.createCustomFocusIndicatorStyle)({
|
36
|
+
borderLeftWidth: 0,
|
37
|
+
borderTopLeftRadius: 0,
|
38
|
+
borderBottomLeftRadius: 0
|
39
|
+
})
|
40
|
+
});
|
41
|
+
const useRootStyles = (0, _react.makeStyles)({
|
42
|
+
// Base styles
|
43
|
+
base: {
|
44
|
+
display: 'inline-flex',
|
45
|
+
justifyContent: 'stretch',
|
46
|
+
position: 'relative',
|
47
|
+
verticalAlign: 'middle',
|
48
|
+
[`& .${splitButtonClassNames.primaryActionButton}`]: {
|
49
|
+
borderTopRightRadius: 0,
|
50
|
+
borderBottomRightRadius: 0
|
51
|
+
},
|
52
|
+
[`& .${splitButtonClassNames.menuButton}`]: {
|
53
|
+
borderLeftWidth: 0,
|
54
|
+
borderTopLeftRadius: 0,
|
55
|
+
borderBottomLeftRadius: 0,
|
56
|
+
minWidth: MIN_TARGET_SIZE
|
57
|
+
}
|
58
|
+
},
|
59
|
+
// Appearance variations
|
60
|
+
outline: {},
|
61
|
+
primary: {
|
62
|
+
[`& .${splitButtonClassNames.primaryActionButton}`]: {
|
63
|
+
borderRightColor: _reacttheme.tokens.colorNeutralStrokeOnBrand
|
64
|
+
},
|
65
|
+
':hover': {
|
66
|
+
[`& .${splitButtonClassNames.primaryActionButton}`]: {
|
67
|
+
borderRightColor: _reacttheme.tokens.colorNeutralStrokeOnBrand
|
68
|
+
}
|
69
|
+
},
|
70
|
+
':hover:active': {
|
71
|
+
[`& .${splitButtonClassNames.primaryActionButton}`]: {
|
72
|
+
borderRightColor: _reacttheme.tokens.colorNeutralStrokeOnBrand
|
73
|
+
}
|
74
|
+
},
|
75
|
+
'@media (forced-colors: active)': {
|
76
|
+
[`& .${splitButtonClassNames.primaryActionButton}`]: {
|
77
|
+
borderRightColor: 'HighlightText'
|
78
|
+
},
|
79
|
+
':hover': {
|
80
|
+
[`& .${splitButtonClassNames.primaryActionButton}`]: {
|
81
|
+
borderRightColor: 'Highlight'
|
82
|
+
}
|
83
|
+
},
|
84
|
+
':hover:active': {
|
85
|
+
[`& .${splitButtonClassNames.primaryActionButton}`]: {
|
86
|
+
borderRightColor: 'Highlight'
|
87
|
+
}
|
88
|
+
}
|
89
|
+
}
|
90
|
+
},
|
91
|
+
secondary: {},
|
92
|
+
subtle: {
|
93
|
+
[`& .${splitButtonClassNames.primaryActionButton}`]: {
|
94
|
+
borderRightColor: _reacttheme.tokens.colorTransparentBackground
|
95
|
+
},
|
96
|
+
':hover': {
|
97
|
+
[`& .${splitButtonClassNames.primaryActionButton}`]: {
|
98
|
+
borderRightColor: _reacttheme.tokens.colorTransparentBackgroundHover
|
99
|
+
}
|
100
|
+
},
|
101
|
+
':hover:active': {
|
102
|
+
[`& .${splitButtonClassNames.primaryActionButton}`]: {
|
103
|
+
borderRightColor: _reacttheme.tokens.colorTransparentBackgroundPressed
|
104
|
+
}
|
105
|
+
}
|
106
|
+
},
|
107
|
+
transparent: {
|
108
|
+
[`& .${splitButtonClassNames.primaryActionButton}`]: {
|
109
|
+
borderRightColor: _reacttheme.tokens.colorTransparentBackground
|
110
|
+
},
|
111
|
+
':hover': {
|
112
|
+
[`& .${splitButtonClassNames.primaryActionButton}`]: {
|
113
|
+
borderRightColor: _reacttheme.tokens.colorTransparentBackgroundHover
|
114
|
+
}
|
115
|
+
},
|
116
|
+
':hover:active': {
|
117
|
+
[`& .${splitButtonClassNames.primaryActionButton}`]: {
|
118
|
+
borderRightColor: _reacttheme.tokens.colorTransparentBackgroundPressed
|
119
|
+
}
|
120
|
+
}
|
121
|
+
},
|
122
|
+
// Shape variations
|
123
|
+
circular: {},
|
124
|
+
rounded: {},
|
125
|
+
square: {},
|
126
|
+
// Disabled styles
|
127
|
+
disabled: {
|
128
|
+
[`& .${splitButtonClassNames.primaryActionButton}`]: {
|
129
|
+
borderRightColor: _reacttheme.tokens.colorNeutralStrokeDisabled
|
130
|
+
},
|
131
|
+
':hover': {
|
132
|
+
[`& .${splitButtonClassNames.primaryActionButton}`]: {
|
133
|
+
borderRightColor: _reacttheme.tokens.colorNeutralStrokeDisabled
|
134
|
+
}
|
135
|
+
},
|
136
|
+
':hover:active': {
|
137
|
+
[`& .${splitButtonClassNames.primaryActionButton}`]: {
|
138
|
+
borderRightColor: _reacttheme.tokens.colorNeutralStrokeDisabled
|
139
|
+
}
|
140
|
+
}
|
141
|
+
},
|
142
|
+
// Disabled high contrast styles
|
143
|
+
disabledHighContrast: {
|
144
|
+
'@media (forced-colors: active)': {
|
145
|
+
[`& .${splitButtonClassNames.primaryActionButton}`]: {
|
146
|
+
borderRightColor: 'GrayText'
|
147
|
+
},
|
148
|
+
':hover': {
|
149
|
+
[`& .${splitButtonClassNames.primaryActionButton}`]: {
|
150
|
+
borderRightColor: 'GrayText'
|
151
|
+
}
|
152
|
+
},
|
153
|
+
':hover:active': {
|
154
|
+
[`& .${splitButtonClassNames.primaryActionButton}`]: {
|
155
|
+
borderRightColor: 'GrayText'
|
156
|
+
}
|
157
|
+
}
|
158
|
+
}
|
159
|
+
}
|
160
|
+
});
|
161
|
+
const useSplitButtonStyles_unstable = (state)=>{
|
162
|
+
'use no memo';
|
163
|
+
const rootStyles = useRootStyles();
|
164
|
+
const focusStyles = useFocusStyles();
|
165
|
+
const { appearance, disabled, disabledFocusable } = state;
|
166
|
+
state.root.className = (0, _react.mergeClasses)(splitButtonClassNames.root, rootStyles.base, appearance && rootStyles[appearance], (disabled || disabledFocusable) && rootStyles.disabled, (disabled || disabledFocusable) && rootStyles.disabledHighContrast, state.root.className);
|
167
|
+
if (state.menuButton) {
|
168
|
+
state.menuButton.className = (0, _react.mergeClasses)(splitButtonClassNames.menuButton, focusStyles.menuButton, state.menuButton.className);
|
169
|
+
}
|
170
|
+
if (state.primaryActionButton) {
|
171
|
+
state.primaryActionButton.className = (0, _react.mergeClasses)(splitButtonClassNames.primaryActionButton, focusStyles.primaryActionButton, state.primaryActionButton.className);
|
172
|
+
}
|
173
|
+
return state;
|
174
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../src/components/SplitButton/useSplitButtonStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { SplitButtonSlots, SplitButtonState } from './SplitButton.types';\n\nexport const splitButtonClassNames: SlotClassNames<SplitButtonSlots> = {\n root: 'fui-SplitButton',\n menuButton: 'fui-SplitButton__menuButton',\n primaryActionButton: 'fui-SplitButton__primaryActionButton',\n};\n\n// WCAG minimum target size for pointer targets that are immediately adjacent to other targets:\n// https://w3c.github.io/wcag/guidelines/22/#target-size-minimum\nconst MIN_TARGET_SIZE = '24px';\n\nconst useFocusStyles = makeStyles({\n primaryActionButton: createCustomFocusIndicatorStyle({\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n }),\n\n menuButton: createCustomFocusIndicatorStyle({\n borderLeftWidth: 0,\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n }),\n});\n\nconst useRootStyles = makeStyles({\n // Base styles\n base: {\n display: 'inline-flex',\n justifyContent: 'stretch',\n position: 'relative',\n verticalAlign: 'middle',\n\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n },\n\n [`& .${splitButtonClassNames.menuButton}`]: {\n borderLeftWidth: 0,\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n minWidth: MIN_TARGET_SIZE,\n },\n },\n\n // Appearance variations\n outline: {\n /* No styles */\n },\n primary: {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralStrokeOnBrand,\n },\n\n ':hover': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralStrokeOnBrand,\n },\n },\n\n ':hover:active': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralStrokeOnBrand,\n },\n },\n\n '@media (forced-colors: active)': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: 'HighlightText',\n },\n\n ':hover': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: 'Highlight',\n },\n },\n\n ':hover:active': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: 'Highlight',\n },\n },\n },\n },\n secondary: {\n /* The secondary styles are exactly the same as the base styles. */\n },\n subtle: {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorTransparentBackground,\n },\n\n ':hover': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorTransparentBackgroundHover,\n },\n },\n\n ':hover:active': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorTransparentBackgroundPressed,\n },\n },\n },\n transparent: {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorTransparentBackground,\n },\n\n ':hover': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorTransparentBackgroundHover,\n },\n },\n\n ':hover:active': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorTransparentBackgroundPressed,\n },\n },\n },\n\n // Shape variations\n circular: {},\n rounded: {},\n square: {},\n\n // Disabled styles\n disabled: {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralStrokeDisabled,\n },\n\n ':hover': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralStrokeDisabled,\n },\n },\n\n ':hover:active': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralStrokeDisabled,\n },\n },\n },\n\n // Disabled high contrast styles\n disabledHighContrast: {\n '@media (forced-colors: active)': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: 'GrayText',\n },\n\n ':hover': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: 'GrayText',\n },\n },\n\n ':hover:active': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: 'GrayText',\n },\n },\n },\n },\n});\n\nexport const useSplitButtonStyles_unstable = (state: SplitButtonState): SplitButtonState => {\n 'use no memo';\n\n const rootStyles = useRootStyles();\n const focusStyles = useFocusStyles();\n\n const { appearance, disabled, disabledFocusable } = state;\n\n state.root.className = mergeClasses(\n splitButtonClassNames.root,\n rootStyles.base,\n appearance && rootStyles[appearance],\n (disabled || disabledFocusable) && rootStyles.disabled,\n (disabled || disabledFocusable) && rootStyles.disabledHighContrast,\n state.root.className,\n );\n\n if (state.menuButton) {\n state.menuButton.className = mergeClasses(\n splitButtonClassNames.menuButton,\n focusStyles.menuButton,\n state.menuButton.className,\n );\n }\n\n if (state.primaryActionButton) {\n state.primaryActionButton.className = mergeClasses(\n splitButtonClassNames.primaryActionButton,\n focusStyles.primaryActionButton,\n state.primaryActionButton.className,\n );\n }\n\n return state;\n};\n"],"names":["splitButtonClassNames","useSplitButtonStyles_unstable","root","menuButton","primaryActionButton","MIN_TARGET_SIZE","useFocusStyles","makeStyles","createCustomFocusIndicatorStyle","borderTopRightRadius","borderBottomRightRadius","borderLeftWidth","borderTopLeftRadius","borderBottomLeftRadius","useRootStyles","base","display","justifyContent","position","verticalAlign","minWidth","outline","primary","borderRightColor","tokens","colorNeutralStrokeOnBrand","secondary","subtle","colorTransparentBackground","colorTransparentBackgroundHover","colorTransparentBackgroundPressed","transparent","circular","rounded","square","disabled","colorNeutralStrokeDisabled","disabledHighContrast","state","rootStyles","focusStyles","appearance","disabledFocusable","className","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAMaA,qBAAAA;eAAAA;;IAuKAC,6BAAAA;eAAAA;;;uBA7K4B;8BACO;4BACzB;AAIhB,MAAMD,wBAA0D;IACrEE,MAAM;IACNC,YAAY;IACZC,qBAAqB;AACvB;AAEA,+FAA+F;AAC/F,gEAAgE;AAChE,MAAMC,kBAAkB;AAExB,MAAMC,iBAAiBC,IAAAA,iBAAAA,EAAW;IAChCH,qBAAqBI,IAAAA,6CAAAA,EAAgC;QACnDC,sBAAsB;QACtBC,yBAAyB;IAC3B;IAEAP,YAAYK,IAAAA,6CAAAA,EAAgC;QAC1CG,iBAAiB;QACjBC,qBAAqB;QACrBC,wBAAwB;IAC1B;AACF;AAEA,MAAMC,gBAAgBP,IAAAA,iBAAAA,EAAW;IAC/B,cAAc;IACdQ,MAAM;QACJC,SAAS;QACTC,gBAAgB;QAChBC,UAAU;QACVC,eAAe;QAEf,CAAC,CAAC,GAAG,EAAEnB,sBAAsBI,mBAAmB,CAAC,CAAC,CAAC,EAAE;YACnDK,sBAAsB;YACtBC,yBAAyB;QAC3B;QAEA,CAAC,CAAC,GAAG,EAAEV,sBAAsBG,UAAU,CAAC,CAAC,CAAC,EAAE;YAC1CQ,iBAAiB;YACjBC,qBAAqB;YACrBC,wBAAwB;YACxBO,UAAUf;QACZ;IACF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