@fluentui/react-migration-v8-v9 1.0.31 → 9.1.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 +20 -500
- package/CHANGELOG.md +12 -273
- package/lib/components/Button/ActionButtonShim.js.map +1 -1
- package/lib/components/Button/ButtonShim.js.map +1 -1
- package/lib/components/Button/CommandButtonShim.js.map +1 -1
- package/lib/components/Button/CompoundButtonShim.js.map +1 -1
- package/lib/components/Button/DefaultButtonShim.js.map +1 -1
- package/lib/components/Button/MenuButtonShim.js.map +1 -1
- package/lib/components/Button/PrimaryButtonShim.js.map +1 -1
- package/lib/components/Button/ToggleButtonShim.js.map +1 -1
- package/lib/components/Button/index.js.map +1 -1
- package/lib/components/Button/shimButtonProps.js.map +1 -1
- package/lib/components/Menu/MenuShim.js.map +1 -1
- package/lib/components/Menu/index.js.map +1 -1
- package/lib/components/Menu/shimMenuProps.js.map +1 -1
- package/lib/components/Stack/StackItemShim.js.map +1 -1
- package/lib/components/Stack/StackShim.js.map +1 -1
- package/lib/components/Stack/index.js.map +1 -1
- package/lib/components/Stack/stackUtils.js.map +1 -1
- package/lib/components/Theme/index.js.map +1 -1
- package/lib/components/Theme/themeDuplicates.js.map +1 -1
- package/lib/components/Theme/v8ThemeShim.js +2 -0
- package/lib/components/Theme/v8ThemeShim.js.map +1 -1
- package/lib/components/Theme/v9BrandVariantsShim.js.map +1 -1
- package/lib/components/Theme/v9ThemeShim.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/stories/ThemeShim/ThemePreviewV8.js +316 -0
- package/lib/stories/ThemeShim/ThemePreviewV8.js.map +1 -0
- package/lib/stories/ThemeShim/ThemePreviewV9.js +196 -0
- package/lib/stories/ThemeShim/ThemePreviewV9.js.map +1 -0
- package/lib-commonjs/components/Button/ActionButtonShim.js.map +1 -1
- package/lib-commonjs/components/Button/ButtonShim.js.map +1 -1
- package/lib-commonjs/components/Button/CommandButtonShim.js.map +1 -1
- package/lib-commonjs/components/Button/CompoundButtonShim.js.map +1 -1
- package/lib-commonjs/components/Button/DefaultButtonShim.js.map +1 -1
- package/lib-commonjs/components/Button/MenuButtonShim.js.map +1 -1
- package/lib-commonjs/components/Button/PrimaryButtonShim.js.map +1 -1
- package/lib-commonjs/components/Button/ToggleButtonShim.js.map +1 -1
- package/lib-commonjs/components/Button/index.js.map +1 -1
- package/lib-commonjs/components/Button/shimButtonProps.js.map +1 -1
- package/lib-commonjs/components/Menu/MenuShim.js.map +1 -1
- package/lib-commonjs/components/Menu/index.js.map +1 -1
- package/lib-commonjs/components/Menu/shimMenuProps.js.map +1 -1
- package/lib-commonjs/components/Stack/StackItemShim.js.map +1 -1
- package/lib-commonjs/components/Stack/StackShim.js.map +1 -1
- package/lib-commonjs/components/Stack/index.js.map +1 -1
- package/lib-commonjs/components/Stack/stackUtils.js.map +1 -1
- package/lib-commonjs/components/Theme/index.js.map +1 -1
- package/lib-commonjs/components/Theme/themeDuplicates.js.map +1 -1
- package/lib-commonjs/components/Theme/v8ThemeShim.js +2 -0
- package/lib-commonjs/components/Theme/v8ThemeShim.js.map +1 -1
- package/lib-commonjs/components/Theme/v9BrandVariantsShim.js.map +1 -1
- package/lib-commonjs/components/Theme/v9ThemeShim.js.map +1 -1
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/stories/ThemeShim/ThemePreviewV8.js +323 -0
- package/lib-commonjs/stories/ThemeShim/ThemePreviewV8.js.map +1 -0
- package/lib-commonjs/stories/ThemeShim/ThemePreviewV9.js +195 -0
- package/lib-commonjs/stories/ThemeShim/ThemePreviewV9.js.map +1 -0
- package/package.json +9 -6
- package/lib-amd/components/Button/ActionButtonShim.js +0 -14
- package/lib-amd/components/Button/ActionButtonShim.js.map +0 -1
- package/lib-amd/components/Button/ButtonShim.js +0 -17
- package/lib-amd/components/Button/ButtonShim.js.map +0 -1
- package/lib-amd/components/Button/CommandButtonShim.js +0 -7
- package/lib-amd/components/Button/CommandButtonShim.js.map +0 -1
- package/lib-amd/components/Button/CompoundButtonShim.js +0 -15
- package/lib-amd/components/Button/CompoundButtonShim.js.map +0 -1
- package/lib-amd/components/Button/DefaultButtonShim.js +0 -12
- package/lib-amd/components/Button/DefaultButtonShim.js.map +0 -1
- package/lib-amd/components/Button/MenuButtonShim.js +0 -20
- package/lib-amd/components/Button/MenuButtonShim.js.map +0 -1
- package/lib-amd/components/Button/PrimaryButtonShim.js +0 -12
- package/lib-amd/components/Button/PrimaryButtonShim.js.map +0 -1
- package/lib-amd/components/Button/ToggleButtonShim.js +0 -14
- package/lib-amd/components/Button/ToggleButtonShim.js.map +0 -1
- package/lib-amd/components/Button/index.js +0 -14
- package/lib-amd/components/Button/index.js.map +0 -1
- package/lib-amd/components/Button/shimButtonProps.js +0 -19
- package/lib-amd/components/Button/shimButtonProps.js.map +0 -1
- package/lib-amd/components/Menu/MenuShim.js +0 -42
- package/lib-amd/components/Menu/MenuShim.js.map +0 -1
- package/lib-amd/components/Menu/index.js +0 -7
- package/lib-amd/components/Menu/index.js.map +0 -1
- package/lib-amd/components/Menu/shimMenuProps.js +0 -30
- package/lib-amd/components/Menu/shimMenuProps.js.map +0 -1
- package/lib-amd/components/Stack/StackItemShim.js +0 -150
- package/lib-amd/components/Stack/StackItemShim.js.map +0 -1
- package/lib-amd/components/Stack/StackShim.js +0 -242
- package/lib-amd/components/Stack/StackShim.js.map +0 -1
- package/lib-amd/components/Stack/index.js +0 -7
- package/lib-amd/components/Stack/index.js.map +0 -1
- package/lib-amd/components/Stack/stackUtils.js +0 -168
- package/lib-amd/components/Stack/stackUtils.js.map +0 -1
- package/lib-amd/components/Theme/index.js +0 -9
- package/lib-amd/components/Theme/index.js.map +0 -1
- package/lib-amd/components/Theme/themeDuplicates.js +0 -864
- package/lib-amd/components/Theme/themeDuplicates.js.map +0 -1
- package/lib-amd/components/Theme/v8ThemeShim.js +0 -140
- package/lib-amd/components/Theme/v8ThemeShim.js.map +0 -1
- package/lib-amd/components/Theme/v9BrandVariantsShim.js +0 -75
- package/lib-amd/components/Theme/v9BrandVariantsShim.js.map +0 -1
- package/lib-amd/components/Theme/v9ThemeShim.js +0 -190
- package/lib-amd/components/Theme/v9ThemeShim.js.map +0 -1
- package/lib-amd/index.js +0 -38
- package/lib-amd/index.js.map +0 -1
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"mappings":"AAAA,SACEA,gBAAgB,EAChBC,UAAU,EACVC,iBAAiB,EACjBC,kBAAkB,EAClBC,iBAAiB,EACjBC,cAAc,EACdC,iBAAiB,EACjBC,eAAe,EACfC,gBAAgB,QACX,2BAA2B;AAElC,SAASC,YAAY,EAAEC,aAAa,QAAQ,yBAAyB;AAErE,SAASC,aAAa,EAAEC,SAAS,QAAQ,0BAA0B;AAEnE,SACEC,KAAK,EACLC,UAAU,EACVC,QAAQ,EACRC,mBAAmB,EACnBC,aAAa,EACbC,aAAa,EACbC,IAAI,EACJC,WAAW,EACXC,YAAY,EACZC,YAAY,EACZC,QAAQ,EACRC,YAAY,EACZC,UAAU,EACVC,WAAW,EACXC,eAAe,EACfC,WAAW,EACXC,YAAY,EACZC,KAAK,EACLC,UAAU,QACL,0BAA0B","names":["ActionButtonShim","ButtonShim","CommandButtonShim","CompoundButtonShim","DefaultButtonShim","MenuButtonShim","PrimaryButtonShim","shimButtonProps","ToggleButtonShim","MenuItemShim","shimMenuProps","StackItemShim","StackShim","black","blackAlpha","brandWeb","createBrandVariants","createV8Theme","createV9Theme","grey","grey14Alpha","hcButtonFace","hcButtonText","hcCanvas","hcCanvasText","hcDisabled","hcHighlight","hcHighlightText","hcHyperlink","sharedColors","white","whiteAlpha"],"sourceRoot":"../src/","sources":["packages/react-migration-v8-v9/src/index.ts"],"sourcesContent":["export {\n ActionButtonShim,\n ButtonShim,\n CommandButtonShim,\n CompoundButtonShim,\n DefaultButtonShim,\n MenuButtonShim,\n PrimaryButtonShim,\n shimButtonProps,\n ToggleButtonShim,\n} from './components/Button/index';\n\nexport { MenuItemShim, shimMenuProps } from './components/Menu/index';\n\nexport { StackItemShim, StackShim } from './components/Stack/index';\n\nexport {\n black,\n blackAlpha,\n brandWeb,\n createBrandVariants,\n createV8Theme,\n createV9Theme,\n grey,\n grey14Alpha,\n hcButtonFace,\n hcButtonText,\n hcCanvas,\n hcCanvasText,\n hcDisabled,\n hcHighlight,\n hcHighlightText,\n hcHyperlink,\n sharedColors,\n white,\n whiteAlpha,\n} from './components/Theme/index';\n\nexport type {\n AlphaColors,\n ColorVariants,\n GlobalSharedColors,\n Greys,\n TextAlignment,\n TextAlignments,\n} from './components/Theme/index';\n"]}
|
|
1
|
+
{"version":3,"mappings":"AAAA,SACEA,gBAAgB,EAChBC,UAAU,EACVC,iBAAiB,EACjBC,kBAAkB,EAClBC,iBAAiB,EACjBC,cAAc,EACdC,iBAAiB,EACjBC,eAAe,EACfC,gBAAgB,QACX,2BAA2B;AAElC,SAASC,YAAY,EAAEC,aAAa,QAAQ,yBAAyB;AAErE,SAASC,aAAa,EAAEC,SAAS,QAAQ,0BAA0B;AAEnE,SACEC,KAAK,EACLC,UAAU,EACVC,QAAQ,EACRC,mBAAmB,EACnBC,aAAa,EACbC,aAAa,EACbC,IAAI,EACJC,WAAW,EACXC,YAAY,EACZC,YAAY,EACZC,QAAQ,EACRC,YAAY,EACZC,UAAU,EACVC,WAAW,EACXC,eAAe,EACfC,WAAW,EACXC,YAAY,EACZC,KAAK,EACLC,UAAU,QACL,0BAA0B","names":["ActionButtonShim","ButtonShim","CommandButtonShim","CompoundButtonShim","DefaultButtonShim","MenuButtonShim","PrimaryButtonShim","shimButtonProps","ToggleButtonShim","MenuItemShim","shimMenuProps","StackItemShim","StackShim","black","blackAlpha","brandWeb","createBrandVariants","createV8Theme","createV9Theme","grey","grey14Alpha","hcButtonFace","hcButtonText","hcCanvas","hcCanvasText","hcDisabled","hcHighlight","hcHighlightText","hcHyperlink","sharedColors","white","whiteAlpha"],"sourceRoot":"../src/","sources":["packages/react-components/react-migration-v8-v9/src/index.ts"],"sourcesContent":["export {\n ActionButtonShim,\n ButtonShim,\n CommandButtonShim,\n CompoundButtonShim,\n DefaultButtonShim,\n MenuButtonShim,\n PrimaryButtonShim,\n shimButtonProps,\n ToggleButtonShim,\n} from './components/Button/index';\n\nexport { MenuItemShim, shimMenuProps } from './components/Menu/index';\n\nexport { StackItemShim, StackShim } from './components/Stack/index';\n\nexport {\n black,\n blackAlpha,\n brandWeb,\n createBrandVariants,\n createV8Theme,\n createV9Theme,\n grey,\n grey14Alpha,\n hcButtonFace,\n hcButtonText,\n hcCanvas,\n hcCanvasText,\n hcDisabled,\n hcHighlight,\n hcHighlightText,\n hcHyperlink,\n sharedColors,\n white,\n whiteAlpha,\n} from './components/Theme/index';\n\nexport type {\n AlphaColors,\n ColorVariants,\n GlobalSharedColors,\n Greys,\n TextAlignment,\n TextAlignments,\n} from './components/Theme/index';\n"]}
|
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
/* eslint-disable no-console */
|
|
2
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { Checkbox } from '@fluentui/react/lib/Checkbox';
|
|
5
|
+
import { ChoiceGroup } from '@fluentui/react/lib/ChoiceGroup';
|
|
6
|
+
import { CommandBar } from '@fluentui/react/lib/CommandBar';
|
|
7
|
+
import { DefaultButton, PrimaryButton, IconButton } from '@fluentui/react/lib/Button';
|
|
8
|
+
import { Dropdown } from '@fluentui/react/lib/Dropdown';
|
|
9
|
+
import { Icon } from '@fluentui/react/lib/Icon';
|
|
10
|
+
import { Link } from '@fluentui/react/lib/Link';
|
|
11
|
+
import { mergeStyles } from '@fluentui/react';
|
|
12
|
+
import { Persona, PersonaPresence } from '@fluentui/react/lib/Persona';
|
|
13
|
+
import { Pivot, PivotItem } from '@fluentui/react/lib/Pivot';
|
|
14
|
+
import { Slider } from '@fluentui/react/lib/Slider';
|
|
15
|
+
import { Stack } from '@fluentui/react/lib/Stack';
|
|
16
|
+
import { Text } from '@fluentui/react/lib/Text';
|
|
17
|
+
import { TextField } from '@fluentui/react/lib/TextField';
|
|
18
|
+
import { Toggle } from '@fluentui/react/lib/Toggle';
|
|
19
|
+
const iconButtonStyles = /*#__PURE__*/mergeStyles({
|
|
20
|
+
color: '#0078D4'
|
|
21
|
+
});
|
|
22
|
+
const commandBarItems = [{
|
|
23
|
+
key: 'newItem',
|
|
24
|
+
name: 'New',
|
|
25
|
+
cacheKey: 'myCacheKey',
|
|
26
|
+
iconProps: {
|
|
27
|
+
iconName: 'Add'
|
|
28
|
+
},
|
|
29
|
+
ariaLabel: 'New',
|
|
30
|
+
subMenuProps: {
|
|
31
|
+
items: [{
|
|
32
|
+
key: 'emailMessage',
|
|
33
|
+
name: 'Email message',
|
|
34
|
+
iconProps: {
|
|
35
|
+
iconName: 'Mail'
|
|
36
|
+
},
|
|
37
|
+
['data-automation-id']: 'newEmailButton'
|
|
38
|
+
}, {
|
|
39
|
+
key: 'calendarEvent',
|
|
40
|
+
name: 'Calendar event',
|
|
41
|
+
iconProps: {
|
|
42
|
+
iconName: 'Calendar'
|
|
43
|
+
}
|
|
44
|
+
}]
|
|
45
|
+
}
|
|
46
|
+
}, {
|
|
47
|
+
key: 'upload',
|
|
48
|
+
name: 'Upload',
|
|
49
|
+
iconProps: {
|
|
50
|
+
iconName: 'Upload'
|
|
51
|
+
},
|
|
52
|
+
onClick: () => console.log('Upload'),
|
|
53
|
+
['data-automation-id']: 'uploadButton'
|
|
54
|
+
}, {
|
|
55
|
+
key: 'share',
|
|
56
|
+
name: 'Share',
|
|
57
|
+
iconProps: {
|
|
58
|
+
iconName: 'Share'
|
|
59
|
+
},
|
|
60
|
+
onClick: () => console.log('Share')
|
|
61
|
+
}, {
|
|
62
|
+
key: 'download',
|
|
63
|
+
name: 'Download',
|
|
64
|
+
iconProps: {
|
|
65
|
+
iconName: 'Download'
|
|
66
|
+
},
|
|
67
|
+
onClick: () => console.log('Download')
|
|
68
|
+
}, {
|
|
69
|
+
key: 'more',
|
|
70
|
+
name: 'More',
|
|
71
|
+
iconProps: {
|
|
72
|
+
iconName: 'More'
|
|
73
|
+
},
|
|
74
|
+
onClick: () => console.log('More')
|
|
75
|
+
}];
|
|
76
|
+
const commandBarFarItems = [{
|
|
77
|
+
key: 'search',
|
|
78
|
+
ariaLabel: 'Search',
|
|
79
|
+
iconProps: {
|
|
80
|
+
iconName: 'Search'
|
|
81
|
+
},
|
|
82
|
+
onClick: () => console.log('Search')
|
|
83
|
+
}, {
|
|
84
|
+
key: 'filter',
|
|
85
|
+
name: 'Filter',
|
|
86
|
+
ariaLabel: 'Filter',
|
|
87
|
+
iconProps: {
|
|
88
|
+
iconName: 'Filter'
|
|
89
|
+
},
|
|
90
|
+
iconOnly: true,
|
|
91
|
+
onClick: () => console.log('Filter')
|
|
92
|
+
}, {
|
|
93
|
+
key: 'list',
|
|
94
|
+
name: 'List',
|
|
95
|
+
ariaLabel: 'List',
|
|
96
|
+
iconProps: {
|
|
97
|
+
iconName: 'List'
|
|
98
|
+
},
|
|
99
|
+
iconOnly: true,
|
|
100
|
+
onClick: () => console.log('List')
|
|
101
|
+
}];
|
|
102
|
+
const layoutStyles = {
|
|
103
|
+
root: /*#__PURE__*/mergeStyles({
|
|
104
|
+
display: 'grid',
|
|
105
|
+
gridTemplateColumns: '1fr 1fr 1fr',
|
|
106
|
+
gridTemplateRows: 'auto',
|
|
107
|
+
gridColumnGap: '32px',
|
|
108
|
+
gridRowGap: '32px',
|
|
109
|
+
padding: '16px'
|
|
110
|
+
}),
|
|
111
|
+
commandBar: /*#__PURE__*/mergeStyles({
|
|
112
|
+
gridColumnStart: '1',
|
|
113
|
+
gridColumnEnd: '4'
|
|
114
|
+
})
|
|
115
|
+
};
|
|
116
|
+
const stackXXXLGap = {
|
|
117
|
+
childrenGap: 32
|
|
118
|
+
};
|
|
119
|
+
const stackXLGap = {
|
|
120
|
+
childrenGap: 20
|
|
121
|
+
};
|
|
122
|
+
const stackLGap = {
|
|
123
|
+
childrenGap: 16
|
|
124
|
+
};
|
|
125
|
+
const stackMNudgeGap = {
|
|
126
|
+
childrenGap: 10
|
|
127
|
+
};
|
|
128
|
+
const checkboxStackTokens = {
|
|
129
|
+
childrenGap: 13
|
|
130
|
+
};
|
|
131
|
+
export class ThemePreviewV8 extends React.Component {
|
|
132
|
+
constructor(props) {
|
|
133
|
+
super(props);
|
|
134
|
+
this.state = {
|
|
135
|
+
learnMoreLinkDisabled: false,
|
|
136
|
+
selectOneDropdownDisabled: false,
|
|
137
|
+
textFieldDisabled: false,
|
|
138
|
+
checkboxOneDisabled: false,
|
|
139
|
+
checkboxTwoDisabled: false,
|
|
140
|
+
checkboxThreeDisabled: false,
|
|
141
|
+
choicegroupDisabled: false,
|
|
142
|
+
sliderDisabled: false,
|
|
143
|
+
likeIconButtonDisabled: false,
|
|
144
|
+
bookmarkIconButtonDisabled: false,
|
|
145
|
+
sunnyIconButtonDisabled: false,
|
|
146
|
+
primaryButtonDisabled: false,
|
|
147
|
+
defaultButtonDisabled: false
|
|
148
|
+
};
|
|
149
|
+
this._onToggleChange = this._onToggleChange.bind(this);
|
|
150
|
+
}
|
|
151
|
+
render() {
|
|
152
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
153
|
+
style: {
|
|
154
|
+
backgroundColor: this.props.backgroundColor,
|
|
155
|
+
color: this.props.textColor
|
|
156
|
+
}
|
|
157
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
158
|
+
className: layoutStyles.root
|
|
159
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
160
|
+
className: layoutStyles.commandBar
|
|
161
|
+
}, /*#__PURE__*/React.createElement(CommandBar, {
|
|
162
|
+
farItems: commandBarFarItems,
|
|
163
|
+
items: commandBarItems
|
|
164
|
+
})), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Stack, {
|
|
165
|
+
tokens: stackXXXLGap
|
|
166
|
+
}, /*#__PURE__*/React.createElement(Stack, {
|
|
167
|
+
tokens: stackXLGap
|
|
168
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
169
|
+
variant: "small",
|
|
170
|
+
styles: {
|
|
171
|
+
root: {
|
|
172
|
+
color: this.props.textColor
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}, "STORIES"), /*#__PURE__*/React.createElement(Text, {
|
|
176
|
+
variant: "xxLarge",
|
|
177
|
+
styles: {
|
|
178
|
+
root: {
|
|
179
|
+
color: this.props.textColor,
|
|
180
|
+
lineHeight: '1em'
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}, "Make an impression"), /*#__PURE__*/React.createElement(Text, {
|
|
184
|
+
variant: "medium",
|
|
185
|
+
styles: {
|
|
186
|
+
root: {
|
|
187
|
+
color: this.props.textColor
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}, "Make a big impression with this clean, modern, and mobile-friendly site. Use it to communicate information to people inside or outisde your team. Share your ideas, results, and more in this visually compelling format."), /*#__PURE__*/React.createElement(Link, {
|
|
191
|
+
disabled: this.state.learnMoreLinkDisabled
|
|
192
|
+
}, "Learn more ", /*#__PURE__*/React.createElement(Icon, {
|
|
193
|
+
iconName: "ChevronRight"
|
|
194
|
+
}))), /*#__PURE__*/React.createElement(Persona, {
|
|
195
|
+
text: "Cameron Evans",
|
|
196
|
+
secondaryText: "Senior Researcher at Contoso",
|
|
197
|
+
presence: PersonaPresence.online
|
|
198
|
+
}))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Stack, {
|
|
199
|
+
tokens: stackXXXLGap
|
|
200
|
+
}, /*#__PURE__*/React.createElement(Dropdown, {
|
|
201
|
+
selectedKey: "content",
|
|
202
|
+
label: "Select one",
|
|
203
|
+
options: [{
|
|
204
|
+
key: 'content',
|
|
205
|
+
text: 'Content'
|
|
206
|
+
}, {
|
|
207
|
+
key: 'morecontent',
|
|
208
|
+
text: 'More content'
|
|
209
|
+
}],
|
|
210
|
+
disabled: this.state.selectOneDropdownDisabled
|
|
211
|
+
}), /*#__PURE__*/React.createElement(TextField, {
|
|
212
|
+
disabled: this.state.textFieldDisabled,
|
|
213
|
+
label: "Enter text here",
|
|
214
|
+
placeholder: "Placeholder"
|
|
215
|
+
}), /*#__PURE__*/React.createElement(Stack, {
|
|
216
|
+
horizontal: true,
|
|
217
|
+
tokens: stackXLGap
|
|
218
|
+
}, /*#__PURE__*/React.createElement(Stack, {
|
|
219
|
+
tokens: checkboxStackTokens,
|
|
220
|
+
grow: 1
|
|
221
|
+
}, /*#__PURE__*/React.createElement("div", null), /*#__PURE__*/React.createElement(Checkbox, {
|
|
222
|
+
disabled: this.state.checkboxOneDisabled,
|
|
223
|
+
label: "Option 1"
|
|
224
|
+
}), /*#__PURE__*/React.createElement(Checkbox, {
|
|
225
|
+
disabled: this.state.checkboxTwoDisabled,
|
|
226
|
+
label: "Option 2",
|
|
227
|
+
defaultChecked: true
|
|
228
|
+
}), /*#__PURE__*/React.createElement(Checkbox, {
|
|
229
|
+
disabled: this.state.checkboxThreeDisabled,
|
|
230
|
+
label: "Option 3",
|
|
231
|
+
defaultChecked: true
|
|
232
|
+
})), /*#__PURE__*/React.createElement(Stack, {
|
|
233
|
+
tokens: stackMNudgeGap,
|
|
234
|
+
grow: 1
|
|
235
|
+
}, /*#__PURE__*/React.createElement(ChoiceGroup, {
|
|
236
|
+
defaultSelectedKey: "A",
|
|
237
|
+
options: [{
|
|
238
|
+
key: 'A',
|
|
239
|
+
text: 'Option 1'
|
|
240
|
+
}, {
|
|
241
|
+
key: 'B',
|
|
242
|
+
text: 'Option 2'
|
|
243
|
+
}, {
|
|
244
|
+
key: 'C',
|
|
245
|
+
text: 'Option 3'
|
|
246
|
+
}],
|
|
247
|
+
disabled: this.state.choicegroupDisabled
|
|
248
|
+
}))))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Stack, {
|
|
249
|
+
tokens: stackXXXLGap
|
|
250
|
+
}, /*#__PURE__*/React.createElement(Slider, {
|
|
251
|
+
disabled: this.state.sliderDisabled,
|
|
252
|
+
max: 11
|
|
253
|
+
}), /*#__PURE__*/React.createElement(Toggle, {
|
|
254
|
+
onText: "On",
|
|
255
|
+
offText: "Off",
|
|
256
|
+
inlineLabel: true,
|
|
257
|
+
label: "Toggle for disabled states",
|
|
258
|
+
onChange: this._onToggleChange
|
|
259
|
+
}), /*#__PURE__*/React.createElement(Pivot, null, /*#__PURE__*/React.createElement(PivotItem, {
|
|
260
|
+
headerText: "Home"
|
|
261
|
+
}), /*#__PURE__*/React.createElement(PivotItem, {
|
|
262
|
+
headerText: "Pages"
|
|
263
|
+
}), /*#__PURE__*/React.createElement(PivotItem, {
|
|
264
|
+
headerText: "Documents"
|
|
265
|
+
}), /*#__PURE__*/React.createElement(PivotItem, {
|
|
266
|
+
headerText: "Activity"
|
|
267
|
+
})), /*#__PURE__*/React.createElement(Stack, {
|
|
268
|
+
horizontal: true,
|
|
269
|
+
tokens: stackLGap
|
|
270
|
+
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
271
|
+
disabled: this.state.likeIconButtonDisabled,
|
|
272
|
+
iconProps: {
|
|
273
|
+
iconName: 'Like'
|
|
274
|
+
},
|
|
275
|
+
className: iconButtonStyles
|
|
276
|
+
}), /*#__PURE__*/React.createElement(IconButton, {
|
|
277
|
+
disabled: this.state.bookmarkIconButtonDisabled,
|
|
278
|
+
iconProps: {
|
|
279
|
+
iconName: 'SingleBookmark'
|
|
280
|
+
},
|
|
281
|
+
className: iconButtonStyles
|
|
282
|
+
}), /*#__PURE__*/React.createElement(IconButton, {
|
|
283
|
+
disabled: this.state.sunnyIconButtonDisabled,
|
|
284
|
+
iconProps: {
|
|
285
|
+
iconName: 'Sunny'
|
|
286
|
+
},
|
|
287
|
+
className: iconButtonStyles
|
|
288
|
+
})), /*#__PURE__*/React.createElement(Stack, {
|
|
289
|
+
horizontal: true,
|
|
290
|
+
tokens: stackMNudgeGap
|
|
291
|
+
}, /*#__PURE__*/React.createElement(PrimaryButton, {
|
|
292
|
+
disabled: this.state.primaryButtonDisabled,
|
|
293
|
+
text: "Primary button"
|
|
294
|
+
}), /*#__PURE__*/React.createElement(DefaultButton, {
|
|
295
|
+
disabled: this.state.defaultButtonDisabled,
|
|
296
|
+
text: "Default button"
|
|
297
|
+
}))))));
|
|
298
|
+
}
|
|
299
|
+
_onToggleChange() {
|
|
300
|
+
this.setState({
|
|
301
|
+
learnMoreLinkDisabled: !this.state.learnMoreLinkDisabled,
|
|
302
|
+
selectOneDropdownDisabled: !this.state.selectOneDropdownDisabled,
|
|
303
|
+
textFieldDisabled: !this.state.textFieldDisabled,
|
|
304
|
+
checkboxOneDisabled: !this.state.checkboxOneDisabled,
|
|
305
|
+
checkboxTwoDisabled: !this.state.checkboxTwoDisabled,
|
|
306
|
+
checkboxThreeDisabled: !this.state.checkboxThreeDisabled,
|
|
307
|
+
sliderDisabled: !this.state.sliderDisabled,
|
|
308
|
+
likeIconButtonDisabled: !this.state.likeIconButtonDisabled,
|
|
309
|
+
bookmarkIconButtonDisabled: !this.state.bookmarkIconButtonDisabled,
|
|
310
|
+
sunnyIconButtonDisabled: !this.state.sunnyIconButtonDisabled,
|
|
311
|
+
primaryButtonDisabled: !this.state.primaryButtonDisabled,
|
|
312
|
+
defaultButtonDisabled: !this.state.defaultButtonDisabled
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
//# sourceMappingURL=ThemePreviewV8.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"mappings":"AAAA;AACA;AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,8BAA8B;AACvD,SAASC,WAAW,QAAQ,iCAAiC;AAC7D,SAASC,UAAU,QAAQ,gCAAgC;AAC3D,SAASC,aAAa,EAAEC,aAAa,EAAEC,UAAU,QAAQ,4BAA4B;AACrF,SAASC,QAAQ,QAAQ,8BAA8B;AACvD,SAASC,IAAI,QAAQ,0BAA0B;AAC/C,SAASC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AAqB;MAAEc,IAAI,EAAC;IAAgB,EAAG,CAC7E,CACF,CACJ,CACF,CACF;EAEV;EAEQb,eAAe;IACrB,IAAI,CAAC+B,QAAQ,CAAC;MACZ5C,qBAAqB,EAAE,CAAC,IAAI,CAACD,KAAK,CAACC,qBAAqB;MACxDC,yBAAyB,EAAE,CAAC,IAAI,CAACF,KAAK,CAACE,yBAAyB;MAChEC,iBAAiB,EAAE,CAAC,IAAI,CAACH,KAAK,CAACG,iBAAiB;MAChDC,mBAAmB,EAAE,CAAC,IAAI,CAACJ,KAAK,CAACI,mBAAmB;MACpDC,mBAAmB,EAAE,CAAC,IAAI,CAACL,KAAK,CAACK,mBAAmB;MACpDC,qBAAqB,EAAE,CAAC,IAAI,CAACN,KAAK,CAACM,qBAAqB;MACxDE,cAAc,EAAE,CAAC,IAAI,CAACR,KAAK,CAACQ,cAAc;MAC1CC,sBAAsB,EAAE,CAAC,IAAI,CAACT,KAAK,CAACS,sBAAsB;MAC1DC,0BAA0B,EAAE,CAAC,IAAI,CAACV,KAAK,CAACU,0BAA0B;MAClEC,uBAAuB,EAAE,CAAC,IAAI,CAACX,KAAK,CAACW,uBAAuB;MAC5DC,qBAAqB,EAAE,CAAC,IAAI,CAACZ,KAAK,CAACY,qBAAqB;MACxDC,qBAAqB,EAAE,CAAC,IAAI,CAACb,KAAK,CAACa;KACpC,CAAC;EACJ","names":["React","Checkbox","ChoiceGroup","CommandBar","DefaultButton","PrimaryButton","IconButton","Dropdown","Icon","Link","mergeStyles","Persona","PersonaPresence","Pivot","PivotItem","Slider","Stack","Text","TextField","Toggle","iconButtonStyles","color","commandBarItems","key","name","cacheKey","iconProps","iconName","ariaLabel","subMenuProps","items","onClick","console","log","commandBarFarItems","iconOnly","layoutStyles","root","display","gridTemplateColumns","gridTemplateRows","gridColumnGap","gridRowGap","padding","commandBar","gridColumnStart","gridColumnEnd","stackXXXLGap","childrenGap","stackXLGap","stackLGap","stackMNudgeGap","checkboxStackTokens","ThemePreviewV8","Component","constructor","props","state","learnMoreLinkDisabled","selectOneDropdownDisabled","textFieldDisabled","checkboxOneDisabled","checkboxTwoDisabled","checkboxThreeDisabled","choicegroupDisabled","sliderDisabled","likeIconButtonDisabled","bookmarkIconButtonDisabled","sunnyIconButtonDisabled","primaryButtonDisabled","defaultButtonDisabled","_onToggleChange","bind","render","style","backgroundColor","textColor","className","farItems","tokens","variant","styles","lineHeight","disabled","text","secondaryText","presence","online","selectedKey","label","options","placeholder","horizontal","grow","defaultChecked","defaultSelectedKey","max","onText","offText","inlineLabel","onChange","headerText","setState"],"sourceRoot":"../src/","sources":["packages/react-components/react-migration-v8-v9/src/stories/ThemeShim/ThemePreviewV8.tsx"],"sourcesContent":["/* eslint-disable no-console */\n/* eslint-disable @typescript-eslint/naming-convention */\nimport * as React from 'react';\nimport { Checkbox } from '@fluentui/react/lib/Checkbox';\nimport { ChoiceGroup } from '@fluentui/react/lib/ChoiceGroup';\nimport { CommandBar } from '@fluentui/react/lib/CommandBar';\nimport { DefaultButton, PrimaryButton, IconButton } from '@fluentui/react/lib/Button';\nimport { Dropdown } from '@fluentui/react/lib/Dropdown';\nimport { Icon } from '@fluentui/react/lib/Icon';\nimport { Link } from '@fluentui/react/lib/Link';\nimport { mergeStyles } from '@fluentui/react';\nimport { Persona, PersonaPresence } from '@fluentui/react/lib/Persona';\nimport { Pivot, PivotItem } from '@fluentui/react/lib/Pivot';\nimport { Slider } from '@fluentui/react/lib/Slider';\nimport { IStackTokens, Stack } from '@fluentui/react/lib/Stack';\nimport { Text } from '@fluentui/react/lib/Text';\nimport { TextField } from '@fluentui/react/lib/TextField';\nimport { Toggle } from '@fluentui/react/lib/Toggle';\n\nexport interface ISamplesProps {\n backgroundColor: string;\n textColor: string;\n}\n\nexport interface ISamplesState {\n learnMoreLinkDisabled: boolean;\n selectOneDropdownDisabled: boolean;\n textFieldDisabled: boolean;\n checkboxOneDisabled: boolean;\n checkboxTwoDisabled: boolean;\n checkboxThreeDisabled: boolean;\n choicegroupDisabled: boolean;\n sliderDisabled: boolean;\n likeIconButtonDisabled: boolean;\n bookmarkIconButtonDisabled: boolean;\n sunnyIconButtonDisabled: boolean;\n primaryButtonDisabled: boolean;\n defaultButtonDisabled: boolean;\n}\n\nconst iconButtonStyles = mergeStyles({\n color: '#0078D4',\n});\n\nconst commandBarItems = [\n {\n key: 'newItem',\n name: 'New',\n cacheKey: 'myCacheKey', // changing this key will invalidate this item's cache\n iconProps: {\n iconName: 'Add',\n },\n ariaLabel: 'New',\n subMenuProps: {\n items: [\n {\n key: 'emailMessage',\n name: 'Email message',\n iconProps: {\n iconName: 'Mail',\n },\n ['data-automation-id']: 'newEmailButton',\n },\n {\n key: 'calendarEvent',\n name: 'Calendar event',\n iconProps: {\n iconName: 'Calendar',\n },\n },\n ],\n },\n },\n {\n key: 'upload',\n name: 'Upload',\n iconProps: {\n iconName: 'Upload',\n },\n onClick: () => console.log('Upload'),\n ['data-automation-id']: 'uploadButton',\n },\n {\n key: 'share',\n name: 'Share',\n iconProps: {\n iconName: 'Share',\n },\n onClick: () => console.log('Share'),\n },\n {\n key: 'download',\n name: 'Download',\n iconProps: {\n iconName: 'Download',\n },\n onClick: () => console.log('Download'),\n },\n {\n key: 'more',\n name: 'More',\n iconProps: {\n iconName: 'More',\n },\n onClick: () => console.log('More'),\n },\n];\n\nconst commandBarFarItems = [\n {\n key: 'search',\n ariaLabel: 'Search',\n iconProps: {\n iconName: 'Search',\n },\n onClick: () => console.log('Search'),\n },\n {\n key: 'filter',\n name: 'Filter',\n ariaLabel: 'Filter',\n iconProps: {\n iconName: 'Filter',\n },\n iconOnly: true,\n onClick: () => console.log('Filter'),\n },\n {\n key: 'list',\n name: 'List',\n ariaLabel: 'List',\n iconProps: {\n iconName: 'List',\n },\n iconOnly: true,\n onClick: () => console.log('List'),\n },\n];\n\nconst layoutStyles = {\n root: mergeStyles({\n display: 'grid',\n gridTemplateColumns: '1fr 1fr 1fr',\n gridTemplateRows: 'auto',\n gridColumnGap: '32px',\n gridRowGap: '32px',\n padding: '16px',\n }),\n commandBar: mergeStyles({\n gridColumnStart: '1',\n gridColumnEnd: '4',\n }),\n};\n\nconst stackXXXLGap: IStackTokens = { childrenGap: 32 };\nconst stackXLGap: IStackTokens = { childrenGap: 20 };\nconst stackLGap: IStackTokens = { childrenGap: 16 };\nconst stackMNudgeGap: IStackTokens = { childrenGap: 10 };\n\nconst checkboxStackTokens: IStackTokens = {\n childrenGap: 13,\n};\n\nexport class ThemePreviewV8 extends React.Component<ISamplesProps, ISamplesState> {\n constructor(props: ISamplesProps) {\n super(props);\n this.state = {\n learnMoreLinkDisabled: false,\n selectOneDropdownDisabled: false,\n textFieldDisabled: false,\n checkboxOneDisabled: false,\n checkboxTwoDisabled: false,\n checkboxThreeDisabled: false,\n choicegroupDisabled: false,\n sliderDisabled: false,\n likeIconButtonDisabled: false,\n bookmarkIconButtonDisabled: false,\n sunnyIconButtonDisabled: false,\n primaryButtonDisabled: false,\n defaultButtonDisabled: false,\n };\n this._onToggleChange = this._onToggleChange.bind(this);\n }\n public render() {\n return (\n <div style={{ backgroundColor: this.props.backgroundColor, color: this.props.textColor }}>\n <div className={layoutStyles.root}>\n <div className={layoutStyles.commandBar}>\n <CommandBar farItems={commandBarFarItems} items={commandBarItems} />\n </div>\n <div>\n <Stack tokens={stackXXXLGap}>\n <Stack tokens={stackXLGap}>\n <Text variant=\"small\" styles={{ root: { color: this.props.textColor } }}>\n STORIES\n </Text>\n <Text variant=\"xxLarge\" styles={{ root: { color: this.props.textColor, lineHeight: '1em' } }}>\n Make an impression\n </Text>\n <Text variant=\"medium\" styles={{ root: { color: this.props.textColor } }}>\n Make a big impression with this clean, modern, and mobile-friendly site. Use it to communicate\n information to people inside or outisde your team. Share your ideas, results, and more in this\n visually compelling format.\n </Text>\n <Link disabled={this.state.learnMoreLinkDisabled}>\n Learn more <Icon iconName=\"ChevronRight\" />\n </Link>\n </Stack>\n <Persona\n text=\"Cameron Evans\"\n secondaryText=\"Senior Researcher at Contoso\"\n presence={PersonaPresence.online}\n />\n </Stack>\n </div>\n <div>\n <Stack tokens={stackXXXLGap}>\n <Dropdown\n selectedKey=\"content\"\n label=\"Select one\"\n options={[\n { key: 'content', text: 'Content' },\n { key: 'morecontent', text: 'More content' },\n ]}\n disabled={this.state.selectOneDropdownDisabled}\n />\n <TextField disabled={this.state.textFieldDisabled} label=\"Enter text here\" placeholder=\"Placeholder\" />\n <Stack horizontal tokens={stackXLGap}>\n <Stack tokens={checkboxStackTokens} grow={1}>\n <div />\n <Checkbox disabled={this.state.checkboxOneDisabled} label=\"Option 1\" />\n <Checkbox disabled={this.state.checkboxTwoDisabled} label=\"Option 2\" defaultChecked />\n <Checkbox disabled={this.state.checkboxThreeDisabled} label=\"Option 3\" defaultChecked />\n </Stack>\n <Stack tokens={stackMNudgeGap} grow={1}>\n <ChoiceGroup\n defaultSelectedKey=\"A\"\n options={[\n { key: 'A', text: 'Option 1' },\n { key: 'B', text: 'Option 2' },\n { key: 'C', text: 'Option 3' },\n ]}\n disabled={this.state.choicegroupDisabled}\n />\n </Stack>\n </Stack>\n </Stack>\n </div>\n <div>\n <Stack tokens={stackXXXLGap}>\n <Slider disabled={this.state.sliderDisabled} max={11} />\n <Toggle\n onText=\"On\"\n offText=\"Off\"\n inlineLabel\n label=\"Toggle for disabled states\"\n onChange={this._onToggleChange}\n />\n <Pivot>\n <PivotItem headerText=\"Home\" />\n <PivotItem headerText=\"Pages\" />\n <PivotItem headerText=\"Documents\" />\n <PivotItem headerText=\"Activity\" />\n </Pivot>\n <Stack horizontal tokens={stackLGap}>\n <IconButton\n disabled={this.state.likeIconButtonDisabled}\n iconProps={{ iconName: 'Like' }}\n className={iconButtonStyles}\n />\n <IconButton\n disabled={this.state.bookmarkIconButtonDisabled}\n iconProps={{ iconName: 'SingleBookmark' }}\n className={iconButtonStyles}\n />\n <IconButton\n disabled={this.state.sunnyIconButtonDisabled}\n iconProps={{ iconName: 'Sunny' }}\n className={iconButtonStyles}\n />\n </Stack>\n <Stack horizontal tokens={stackMNudgeGap}>\n <PrimaryButton disabled={this.state.primaryButtonDisabled} text=\"Primary button\" />\n <DefaultButton disabled={this.state.defaultButtonDisabled} text=\"Default button\" />\n </Stack>\n </Stack>\n </div>\n </div>\n </div>\n );\n }\n\n private _onToggleChange() {\n this.setState({\n learnMoreLinkDisabled: !this.state.learnMoreLinkDisabled,\n selectOneDropdownDisabled: !this.state.selectOneDropdownDisabled,\n textFieldDisabled: !this.state.textFieldDisabled,\n checkboxOneDisabled: !this.state.checkboxOneDisabled,\n checkboxTwoDisabled: !this.state.checkboxTwoDisabled,\n checkboxThreeDisabled: !this.state.checkboxThreeDisabled,\n sliderDisabled: !this.state.sliderDisabled,\n likeIconButtonDisabled: !this.state.likeIconButtonDisabled,\n bookmarkIconButtonDisabled: !this.state.bookmarkIconButtonDisabled,\n sunnyIconButtonDisabled: !this.state.sunnyIconButtonDisabled,\n primaryButtonDisabled: !this.state.primaryButtonDisabled,\n defaultButtonDisabled: !this.state.defaultButtonDisabled,\n });\n }\n}\n"]}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { __styles, mergeClasses, shorthands } from '@griffel/react';
|
|
3
|
+
import { tokens, Body1, Title3, TabList, Tab, Input, Button, Caption1, Dropdown, Option, Slider, Badge, Switch, Radio, RadioGroup, Checkbox, Avatar, useId, Caption2 } from '@fluentui/react-components';
|
|
4
|
+
import { SearchRegular, bundleIcon, ChevronRightRegular, MeetNowRegular, MeetNowFilled, CalendarLtrFilled, CalendarLtrRegular } from '@fluentui/react-icons';
|
|
5
|
+
const useStyles = /*#__PURE__*/__styles({
|
|
6
|
+
root: {
|
|
7
|
+
z8tnut: "fqag9an",
|
|
8
|
+
z189sj: ["f1gbmcue", "f1rh9g5y"],
|
|
9
|
+
Byoj8tv: "fp67ikv",
|
|
10
|
+
uwmqm3: ["f1rh9g5y", "f1gbmcue"]
|
|
11
|
+
},
|
|
12
|
+
threeCol: {
|
|
13
|
+
mc9l5x: "f13qh94s",
|
|
14
|
+
Bt984gj: "f1s2louj",
|
|
15
|
+
Brf1p80: "f4d9j23",
|
|
16
|
+
Budl1dq: "f18eqifj",
|
|
17
|
+
wkccdc: "f1olsevy",
|
|
18
|
+
wvm1r4: "ftxeir9"
|
|
19
|
+
},
|
|
20
|
+
col1: {
|
|
21
|
+
mc9l5x: "f22iagw",
|
|
22
|
+
Brf1p80: "f1869bpl",
|
|
23
|
+
Beiy3e4: "f1vx9l62",
|
|
24
|
+
i8kkvl: "f1v0c5lh",
|
|
25
|
+
Belr9w4: "f13377fj"
|
|
26
|
+
},
|
|
27
|
+
col2: {
|
|
28
|
+
mc9l5x: "f22iagw",
|
|
29
|
+
Beiy3e4: "f1vx9l62",
|
|
30
|
+
Bt984gj: "f122n59",
|
|
31
|
+
i8kkvl: "f1v0c5lh",
|
|
32
|
+
Belr9w4: "f13377fj"
|
|
33
|
+
},
|
|
34
|
+
col3: {
|
|
35
|
+
mc9l5x: "f13qh94s",
|
|
36
|
+
Budl1dq: "ftow3ju",
|
|
37
|
+
wkccdc: "f1y77emp",
|
|
38
|
+
a6qtfi: "fzoc0u6",
|
|
39
|
+
wvm1r4: "f1ab651c",
|
|
40
|
+
Brf1p80: "f4d9j23",
|
|
41
|
+
Bt984gj: "f122n59"
|
|
42
|
+
},
|
|
43
|
+
twoCol: {
|
|
44
|
+
Br312pm: "fwpfdsa",
|
|
45
|
+
Bw0ie65: "fz1yyy6"
|
|
46
|
+
},
|
|
47
|
+
controls: {
|
|
48
|
+
mc9l5x: "f22iagw",
|
|
49
|
+
Beiy3e4: "f1vx9l62",
|
|
50
|
+
Bt984gj: "f122n59",
|
|
51
|
+
Brf1p80: "f4d9j23"
|
|
52
|
+
},
|
|
53
|
+
icons: {
|
|
54
|
+
mc9l5x: "f13qh94s",
|
|
55
|
+
Budl1dq: "f1ea4fvb",
|
|
56
|
+
wkccdc: "ffh4ag3",
|
|
57
|
+
a6qtfi: "fzoc0u6",
|
|
58
|
+
wvm1r4: "f1ab651c",
|
|
59
|
+
Brf1p80: "f4d9j23"
|
|
60
|
+
},
|
|
61
|
+
avatar: {
|
|
62
|
+
mc9l5x: "f22iagw",
|
|
63
|
+
i8kkvl: "f1v0c5lh",
|
|
64
|
+
Belr9w4: "f13377fj"
|
|
65
|
+
},
|
|
66
|
+
avatarText: {
|
|
67
|
+
mc9l5x: "f22iagw",
|
|
68
|
+
Beiy3e4: "f1vx9l62",
|
|
69
|
+
Brf1p80: ["fc7pyfw", "fgbriwd"]
|
|
70
|
+
}
|
|
71
|
+
}, {
|
|
72
|
+
d: [".fqag9an{padding-top:16px;}", ".f1gbmcue{padding-right:16px;}", ".f1rh9g5y{padding-left:16px;}", ".fp67ikv{padding-bottom:16px;}", ".f13qh94s{display:grid;}", ".f1s2louj{-webkit-align-items:start;-webkit-box-align:start;-ms-flex-align:start;align-items:start;}", ".f4d9j23{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}", ".f18eqifj{grid-template-columns:repeat(3, 1fr);}", ".f1olsevy{grid-template-rows:auto;}", ".ftxeir9{grid-column-gap:var(--spacingHorizontalXXXL);}", ".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f1869bpl{-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;}", ".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}", ".f1v0c5lh{-webkit-column-gap:var(--spacingVerticalL);column-gap:var(--spacingVerticalL);}", ".f13377fj{row-gap:var(--spacingVerticalL);}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".ftow3ju{grid-template-columns:1fr 1fr;}", ".f1y77emp{grid-template-rows:repeat(4, auto);}", ".fzoc0u6{grid-row-gap:var(--spacingVerticalS);}", ".f1ab651c{grid-column-gap:var(--spacingHorizontalS);}", ".fwpfdsa{grid-column-start:1;}", ".fz1yyy6{grid-column-end:3;}", ".f1ea4fvb{grid-template-columns:auto auto;}", ".ffh4ag3{grid-template-rows:auto auto;}", ".fc7pyfw{-webkit-box-pack:left;-ms-flex-pack:left;-webkit-justify-content:left;justify-content:left;}", ".fgbriwd{-webkit-box-pack:right;-ms-flex-pack:right;-webkit-justify-content:right;justify-content:right;}"]
|
|
73
|
+
});
|
|
74
|
+
const Column1 = () => {
|
|
75
|
+
const styles = useStyles();
|
|
76
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
77
|
+
className: styles.col1
|
|
78
|
+
}, /*#__PURE__*/React.createElement(Title3, {
|
|
79
|
+
block: true
|
|
80
|
+
}, "Make an impression"), /*#__PURE__*/React.createElement(Body1, {
|
|
81
|
+
block: true
|
|
82
|
+
}, "Make a big impression with this clean, modern, and mobile-friendly site. Use it to communicate information to people inside or outside your team. Share your ideas, results, and more in this visually compelling format."), /*#__PURE__*/React.createElement("div", {
|
|
83
|
+
className: styles.avatar
|
|
84
|
+
}, /*#__PURE__*/React.createElement(Avatar, {
|
|
85
|
+
color: "brand",
|
|
86
|
+
initials: "CE",
|
|
87
|
+
badge: {
|
|
88
|
+
status: 'available',
|
|
89
|
+
'aria-label': 'available'
|
|
90
|
+
}
|
|
91
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
92
|
+
className: styles.avatarText
|
|
93
|
+
}, "Cameron Evans", /*#__PURE__*/React.createElement(Caption2, null, "Senior Researcher at Contoso"))));
|
|
94
|
+
};
|
|
95
|
+
const Column2 = () => {
|
|
96
|
+
const styles = useStyles();
|
|
97
|
+
const dropdownId = useId('dropdown-default');
|
|
98
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
99
|
+
className: styles.col2
|
|
100
|
+
}, /*#__PURE__*/React.createElement(TabList, {
|
|
101
|
+
defaultSelectedValue: "tab1"
|
|
102
|
+
}, /*#__PURE__*/React.createElement(Tab, {
|
|
103
|
+
value: "tab1"
|
|
104
|
+
}, "Home"), /*#__PURE__*/React.createElement(Tab, {
|
|
105
|
+
value: "tab2"
|
|
106
|
+
}, "Pages"), /*#__PURE__*/React.createElement(Tab, {
|
|
107
|
+
value: "tab3"
|
|
108
|
+
}, "Documents")), /*#__PURE__*/React.createElement(Input, {
|
|
109
|
+
placeholder: "Find",
|
|
110
|
+
contentAfter: /*#__PURE__*/React.createElement(Button, {
|
|
111
|
+
"aria-label": "Find",
|
|
112
|
+
appearance: "transparent",
|
|
113
|
+
icon: /*#__PURE__*/React.createElement(SearchRegular, null),
|
|
114
|
+
size: "small"
|
|
115
|
+
})
|
|
116
|
+
}), /*#__PURE__*/React.createElement(Dropdown, {
|
|
117
|
+
"aria-labelledby": dropdownId,
|
|
118
|
+
placeholder: "Select",
|
|
119
|
+
inlinePopup: true
|
|
120
|
+
}, /*#__PURE__*/React.createElement(Option, {
|
|
121
|
+
value: "Action 1"
|
|
122
|
+
}, "Action 1"), /*#__PURE__*/React.createElement(Option, {
|
|
123
|
+
value: "Action 2"
|
|
124
|
+
}, "Action 2 "), /*#__PURE__*/React.createElement(Option, {
|
|
125
|
+
value: "Action 3"
|
|
126
|
+
}, "Action 3")));
|
|
127
|
+
};
|
|
128
|
+
const DemoIcons = () => {
|
|
129
|
+
const styles = useStyles();
|
|
130
|
+
const MeetNowIcon = bundleIcon(MeetNowFilled, MeetNowRegular);
|
|
131
|
+
const CalendarLtrIcon = bundleIcon(CalendarLtrFilled, CalendarLtrRegular);
|
|
132
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
133
|
+
className: styles.icons
|
|
134
|
+
}, /*#__PURE__*/React.createElement(Badge, {
|
|
135
|
+
size: "medium",
|
|
136
|
+
appearance: "filled",
|
|
137
|
+
icon: /*#__PURE__*/React.createElement(CalendarLtrIcon, null)
|
|
138
|
+
}), /*#__PURE__*/React.createElement(Badge, {
|
|
139
|
+
size: "medium",
|
|
140
|
+
appearance: "ghost",
|
|
141
|
+
icon: /*#__PURE__*/React.createElement(CalendarLtrIcon, null)
|
|
142
|
+
}), /*#__PURE__*/React.createElement(Badge, {
|
|
143
|
+
size: "medium",
|
|
144
|
+
appearance: "outline",
|
|
145
|
+
icon: /*#__PURE__*/React.createElement(MeetNowIcon, null)
|
|
146
|
+
}), /*#__PURE__*/React.createElement(Badge, {
|
|
147
|
+
size: "medium",
|
|
148
|
+
appearance: "tint",
|
|
149
|
+
icon: /*#__PURE__*/React.createElement(MeetNowIcon, null)
|
|
150
|
+
}));
|
|
151
|
+
};
|
|
152
|
+
const Column3 = () => {
|
|
153
|
+
const styles = useStyles();
|
|
154
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
155
|
+
className: styles.col3
|
|
156
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
157
|
+
appearance: "primary"
|
|
158
|
+
}, "Sign Up"), /*#__PURE__*/React.createElement(Button, {
|
|
159
|
+
appearance: "transparent",
|
|
160
|
+
icon: /*#__PURE__*/React.createElement(ChevronRightRegular, null),
|
|
161
|
+
iconPosition: "after"
|
|
162
|
+
}, "Learn More"), /*#__PURE__*/React.createElement(Slider, {
|
|
163
|
+
className: styles.twoCol,
|
|
164
|
+
defaultValue: 50
|
|
165
|
+
}), /*#__PURE__*/React.createElement(DemoIcons, null), /*#__PURE__*/React.createElement("div", {
|
|
166
|
+
className: styles.controls
|
|
167
|
+
}, /*#__PURE__*/React.createElement(Switch, {
|
|
168
|
+
defaultChecked: true,
|
|
169
|
+
label: "On"
|
|
170
|
+
}), /*#__PURE__*/React.createElement(Switch, {
|
|
171
|
+
label: "Off"
|
|
172
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
173
|
+
className: styles.controls
|
|
174
|
+
}, /*#__PURE__*/React.createElement(Checkbox, {
|
|
175
|
+
defaultChecked: true,
|
|
176
|
+
label: "Option 1"
|
|
177
|
+
}), /*#__PURE__*/React.createElement(Checkbox, {
|
|
178
|
+
label: "Option 2"
|
|
179
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
180
|
+
className: styles.controls
|
|
181
|
+
}, /*#__PURE__*/React.createElement(RadioGroup, null, /*#__PURE__*/React.createElement(Radio, {
|
|
182
|
+
defaultChecked: true,
|
|
183
|
+
label: "Option 1"
|
|
184
|
+
}), /*#__PURE__*/React.createElement(Radio, {
|
|
185
|
+
label: "Option 2"
|
|
186
|
+
}))));
|
|
187
|
+
};
|
|
188
|
+
export const ThemePreviewV9 = props => {
|
|
189
|
+
const styles = useStyles();
|
|
190
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
191
|
+
className: styles.root
|
|
192
|
+
}, /*#__PURE__*/React.createElement(Caption1, null, "Examples"), /*#__PURE__*/React.createElement("div", {
|
|
193
|
+
className: mergeClasses(styles.threeCol, props.className)
|
|
194
|
+
}, /*#__PURE__*/React.createElement(Column1, null), /*#__PURE__*/React.createElement(Column2, null), /*#__PURE__*/React.createElement(Column3, null)));
|
|
195
|
+
};
|
|
196
|
+
//# sourceMappingURL=ThemePreviewV9.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,mBAAqBC,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACrE,SACEC,MAAM,EACNC,KAAK,EACLC,MAAM,EACNC,OAAO,EACPC,GAAG,EACHC,KAAK,EACLC,MAAM,EACNC,QAAQ,EACRC,QAAQ,EACRC,MAAM,EACNC,MAAM,EACNC,KAAK,EACLC,MAAM,EACNC,KAAK,EACLC,UAAU,EACVC,QAAQ,EACRC,MAAM,EACNC,KAAK,EACLC,QAAQ,QACH,4BAA4B;AACnC,SACEC,aAAa,EACbC,UAAU,EACVC,mBAAmB,EACnBC,cAAc,EACdC,aAAa,EACbC,iBAAiB,EACjBC,kBAAkB,QACb,uBAAuB;AAM9B,MAAMC,SAAS,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EA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AM,CAACoC,QAAQ,EAAEF,KAAK,CAACjC,SAAS;EAAC,gBAC5DhC,oBAAC8B,OAAO,OAAG,eACX9B,oBAACyC,OAAO,OAAG,eACXzC,oBAACwD,OAAO,OAAG,CACP,CACF;AAEV,CAAC","names":["React","mergeClasses","shorthands","tokens","Body1","Title3","TabList","Tab","Input","Button","Caption1","Dropdown","Option","Slider","Badge","Switch","Radio","RadioGroup","Checkbox","Avatar","useId","Caption2","SearchRegular","bundleIcon","ChevronRightRegular","MeetNowRegular","MeetNowFilled","CalendarLtrFilled","CalendarLtrRegular","useStyles","Column1","styles","className","col1","block","avatar","color","initials","badge","status","avatarText","Column2","dropdownId","col2","defaultSelectedValue","value","placeholder","contentAfter","appearance","icon","size","inlinePopup","DemoIcons","MeetNowIcon","CalendarLtrIcon","icons","Column3","col3","iconPosition","twoCol","defaultValue","controls","defaultChecked","label","ThemePreviewV9","props","root","threeCol"],"sourceRoot":"../src/","sources":["packages/react-components/react-migration-v8-v9/src/stories/ThemeShim/ThemePreviewV9.tsx"],"sourcesContent":["import * as React from 'react';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport {\n tokens,\n Body1,\n Title3,\n TabList,\n Tab,\n Input,\n Button,\n Caption1,\n Dropdown,\n Option,\n Slider,\n Badge,\n Switch,\n Radio,\n RadioGroup,\n Checkbox,\n Avatar,\n useId,\n Caption2,\n} from '@fluentui/react-components';\nimport {\n SearchRegular,\n bundleIcon,\n ChevronRightRegular,\n MeetNowRegular,\n MeetNowFilled,\n CalendarLtrFilled,\n CalendarLtrRegular,\n} from '@fluentui/react-icons';\n\nexport interface ContentProps {\n className?: string;\n}\n\nconst useStyles = makeStyles({\n root: {\n ...shorthands.padding('16px'),\n },\n threeCol: {\n display: 'grid',\n alignItems: 'start',\n justifyContent: 'center',\n gridTemplateColumns: 'repeat(3, 1fr)',\n gridTemplateRows: 'auto',\n gridColumnGap: tokens.spacingHorizontalXXXL,\n },\n col1: {\n display: 'flex',\n justifyContent: 'space-between',\n flexDirection: 'column',\n ...shorthands.gap(tokens.spacingVerticalL),\n },\n col2: {\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n ...shorthands.gap(tokens.spacingVerticalL),\n },\n col3: {\n display: 'grid',\n gridTemplateColumns: '1fr 1fr',\n gridTemplateRows: 'repeat(4, auto)',\n gridRowGap: tokens.spacingVerticalS,\n gridColumnGap: tokens.spacingHorizontalS,\n justifyContent: 'center',\n alignItems: 'center',\n },\n twoCol: {\n gridColumnStart: 1,\n gridColumnEnd: 3,\n },\n controls: {\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n },\n icons: {\n display: 'grid',\n gridTemplateColumns: 'auto auto',\n gridTemplateRows: 'auto auto',\n gridRowGap: tokens.spacingVerticalS,\n gridColumnGap: tokens.spacingHorizontalS,\n justifyContent: 'center',\n },\n avatar: {\n display: 'flex',\n ...shorthands.gap(tokens.spacingVerticalL),\n },\n avatarText: {\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'left',\n },\n});\n\nconst Column1 = () => {\n const styles = useStyles();\n return (\n <div className={styles.col1}>\n <Title3 block>Make an impression</Title3>\n <Body1 block>\n Make a big impression with this clean, modern, and mobile-friendly site. Use it to communicate information to\n people inside or outside your team. Share your ideas, results, and more in this visually compelling format.\n </Body1>\n <div className={styles.avatar}>\n <Avatar\n color=\"brand\"\n initials=\"CE\"\n badge={{\n status: 'available',\n 'aria-label': 'available',\n }}\n />\n <div className={styles.avatarText}>\n Cameron Evans\n <Caption2>Senior Researcher at Contoso</Caption2>\n </div>\n </div>\n </div>\n );\n};\n\nconst Column2 = () => {\n const styles = useStyles();\n const dropdownId = useId('dropdown-default');\n return (\n <div className={styles.col2}>\n <TabList defaultSelectedValue=\"tab1\">\n <Tab value=\"tab1\">Home</Tab>\n <Tab value=\"tab2\">Pages</Tab>\n <Tab value=\"tab3\">Documents</Tab>\n </TabList>\n <Input\n placeholder=\"Find\"\n contentAfter={<Button aria-label=\"Find\" appearance=\"transparent\" icon={<SearchRegular />} size=\"small\" />}\n />\n <Dropdown aria-labelledby={dropdownId} placeholder=\"Select\" inlinePopup>\n <Option value=\"Action 1\">Action 1</Option>\n <Option value=\"Action 2\">Action 2 </Option>\n <Option value=\"Action 3\">Action 3</Option>\n </Dropdown>\n </div>\n );\n};\n\nconst DemoIcons = () => {\n const styles = useStyles();\n const MeetNowIcon = bundleIcon(MeetNowFilled, MeetNowRegular);\n const CalendarLtrIcon = bundleIcon(CalendarLtrFilled, CalendarLtrRegular);\n return (\n <div className={styles.icons}>\n <Badge size=\"medium\" appearance=\"filled\" icon={<CalendarLtrIcon />} />\n <Badge size=\"medium\" appearance=\"ghost\" icon={<CalendarLtrIcon />} />\n <Badge size=\"medium\" appearance=\"outline\" icon={<MeetNowIcon />} />\n <Badge size=\"medium\" appearance=\"tint\" icon={<MeetNowIcon />} />\n </div>\n );\n};\n\nconst Column3 = () => {\n const styles = useStyles();\n return (\n <div className={styles.col3}>\n <Button appearance=\"primary\">Sign Up</Button>\n <Button appearance=\"transparent\" icon={<ChevronRightRegular />} iconPosition=\"after\">\n Learn More\n </Button>\n <Slider className={styles.twoCol} defaultValue={50} />\n <DemoIcons />\n <div className={styles.controls}>\n <Switch defaultChecked={true} label=\"On\" />\n <Switch label=\"Off\" />\n </div>\n <div className={styles.controls}>\n <Checkbox defaultChecked={true} label=\"Option 1\" />\n <Checkbox label=\"Option 2\" />\n </div>\n <div className={styles.controls}>\n <RadioGroup>\n <Radio defaultChecked={true} label=\"Option 1\" />\n <Radio label=\"Option 2\" />\n </RadioGroup>\n </div>\n </div>\n );\n};\n\nexport const ThemePreviewV9: React.FC<ContentProps> = props => {\n const styles = useStyles();\n return (\n <div className={styles.root}>\n <Caption1>Examples</Caption1>\n <div className={mergeClasses(styles.threeCol, props.className)}>\n <Column1 />\n <Column2 />\n <Column3 />\n </div>\n </div>\n );\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"mappings":";;;;;;AAAA;AAIA;AAEA;AAEA;;;AAGaA,wBAAgB,gBAEzBC,KAAK,CAACC,UAAU,CAAC,CAACC,KAAK,EAAEC,IAAI,KAAI;EACnC,MAAMC,YAAY,GAAG;IACnB,GAAGF,KAAK;IACRG,gBAAgB,EAAE;GACnB;EAED,MAAMC,SAAS,GAAGC,iCAAe,CAACH,YAAY,CAAC;EAE/C,OAAOJ,oBAACQ,yBAAM;IAAA,GAAMN,KAAgD;IAAA,GAAMI,SAAS;IAAEG,UAAU,EAAC;EAAa,EAAG;AAClH,CAAC,CAAC","names":["exports","React","forwardRef","props","_ref","variantProps","variantClassName","shimProps","shimButtonProps_1","react_components_1","appearance"],"sourceRoot":"../src/","sources":["packages/react-migration-v8-v9/src/components/Button/ActionButtonShim.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport type { IButtonProps } from '@fluentui/react';\n\nimport { Button } from '@fluentui/react-components';\n\nimport { shimButtonProps } from './shimButtonProps';\n\n/**\n * Shims a v8 ActionButton to render a v9 Button\n */\nexport const ActionButtonShim: React.ForwardRefExoticComponent<\n IButtonProps & React.RefAttributes<HTMLButtonElement>\n> = React.forwardRef((props, _ref) => {\n const variantProps = {\n ...props,\n variantClassName: 'ms-Button--action ms-Button--command',\n };\n\n const shimProps = shimButtonProps(variantProps);\n\n return <Button {...(props as React.RefAttributes<HTMLButtonElement>)} {...shimProps} appearance=\"transparent\" />;\n});\n"]}
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AAIA;AAEA;AAEA;;;AAGaA,wBAAgB,gBAEzBC,KAAK,CAACC,UAAU,CAAC,CAACC,KAAK,EAAEC,IAAI,KAAI;EACnC,MAAMC,YAAY,GAAG;IACnB,GAAGF,KAAK;IACRG,gBAAgB,EAAE;GACnB;EAED,MAAMC,SAAS,GAAGC,iCAAe,CAACH,YAAY,CAAC;EAE/C,OAAOJ,oBAACQ,yBAAM;IAAA,GAAMN,KAAgD;IAAA,GAAMI,SAAS;IAAEG,UAAU,EAAC;EAAa,EAAG;AAClH,CAAC,CAAC","names":["exports","React","forwardRef","props","_ref","variantProps","variantClassName","shimProps","shimButtonProps_1","react_components_1","appearance"],"sourceRoot":"../src/","sources":["packages/react-components/react-migration-v8-v9/src/components/Button/ActionButtonShim.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport type { IButtonProps } from '@fluentui/react';\n\nimport { Button } from '@fluentui/react-components';\n\nimport { shimButtonProps } from './shimButtonProps';\n\n/**\n * Shims a v8 ActionButton to render a v9 Button\n */\nexport const ActionButtonShim: React.ForwardRefExoticComponent<\n IButtonProps & React.RefAttributes<HTMLButtonElement>\n> = React.forwardRef((props, _ref) => {\n const variantProps = {\n ...props,\n variantClassName: 'ms-Button--action ms-Button--command',\n };\n\n const shimProps = shimButtonProps(variantProps);\n\n return <Button {...(props as React.RefAttributes<HTMLButtonElement>)} {...shimProps} appearance=\"transparent\" />;\n});\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"mappings":";;;;;;AAAA;AAIA;AAEA;AACA;AACA;AAEaA,kBAAU,gBAEnBC,KAAK,CAACC,UAAU,CAAC,CAACC,KAAK,EAAEC,IAAI,KAAI;;EACnC,MAAMC,SAAS,GAAGC,iCAAe,CAACH,KAAK,CAAC;EAExC,IAAIA,KAAK,CAACI,MAAM,EAAE;IAChB,OAAON,oBAACO,mCAAgB;MAAA,GAAKL;IAAK,GAAGA,KAAK,CAACM,QAAQ,CAAoB;;EAEzE,IAAIN,KAAK,CAACO,aAAa,KAAI,WAAK,CAACC,mBAAmB,+CAAzBR,KAAK,EAAuBA,KAAK,CAAC,GAAE;IAC7D,OAAOF,oBAACW,uCAAkB;MAAA,GAAKT;IAAK,EAAI;;EAG1C,OAAOF,oBAACY,yBAAM;IAAA,GAAMV,KAAgD;IAAA,GAAME;EAAS,EAAI;AACzF,CAAC,CAAC","names":["exports","React","forwardRef","props","_ref","shimProps","shimButtonProps_1","toggle","ToggleButtonShim_1","children","secondaryText","onRenderDescription","CompoundButtonShim_1","react_components_1"],"sourceRoot":"../src/","sources":["packages/react-migration-v8-v9/src/components/Button/ButtonShim.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport type { IBaseButtonProps } from '@fluentui/react';\n\nimport { Button } from '@fluentui/react-components';\n\nimport { shimButtonProps } from './shimButtonProps';\nimport { ToggleButtonShim } from './ToggleButtonShim';\nimport { CompoundButtonShim } from './CompoundButtonShim';\n\nexport const ButtonShim: React.ForwardRefExoticComponent<\n IBaseButtonProps & React.RefAttributes<HTMLButtonElement>\n> = React.forwardRef((props, _ref) => {\n const shimProps = shimButtonProps(props);\n\n if (props.toggle) {\n return <ToggleButtonShim {...props}>{props.children}</ToggleButtonShim>;\n }\n if (props.secondaryText || props.onRenderDescription?.(props)) {\n return <CompoundButtonShim {...props} />;\n }\n\n return <Button {...(props as React.RefAttributes<HTMLButtonElement>)} {...shimProps} />;\n});\n"]}
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AAIA;AAEA;AACA;AACA;AAEaA,kBAAU,gBAEnBC,KAAK,CAACC,UAAU,CAAC,CAACC,KAAK,EAAEC,IAAI,KAAI;;EACnC,MAAMC,SAAS,GAAGC,iCAAe,CAACH,KAAK,CAAC;EAExC,IAAIA,KAAK,CAACI,MAAM,EAAE;IAChB,OAAON,oBAACO,mCAAgB;MAAA,GAAKL;IAAK,GAAGA,KAAK,CAACM,QAAQ,CAAoB;;EAEzE,IAAIN,KAAK,CAACO,aAAa,KAAI,WAAK,CAACC,mBAAmB,+CAAzBR,KAAK,EAAuBA,KAAK,CAAC,GAAE;IAC7D,OAAOF,oBAACW,uCAAkB;MAAA,GAAKT;IAAK,EAAI;;EAG1C,OAAOF,oBAACY,yBAAM;IAAA,GAAMV,KAAgD;IAAA,GAAME;EAAS,EAAI;AACzF,CAAC,CAAC","names":["exports","React","forwardRef","props","_ref","shimProps","shimButtonProps_1","toggle","ToggleButtonShim_1","children","secondaryText","onRenderDescription","CompoundButtonShim_1","react_components_1"],"sourceRoot":"../src/","sources":["packages/react-components/react-migration-v8-v9/src/components/Button/ButtonShim.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport type { IBaseButtonProps } from '@fluentui/react';\n\nimport { Button } from '@fluentui/react-components';\n\nimport { shimButtonProps } from './shimButtonProps';\nimport { ToggleButtonShim } from './ToggleButtonShim';\nimport { CompoundButtonShim } from './CompoundButtonShim';\n\nexport const ButtonShim: React.ForwardRefExoticComponent<\n IBaseButtonProps & React.RefAttributes<HTMLButtonElement>\n> = React.forwardRef((props, _ref) => {\n const shimProps = shimButtonProps(props);\n\n if (props.toggle) {\n return <ToggleButtonShim {...props}>{props.children}</ToggleButtonShim>;\n }\n if (props.secondaryText || props.onRenderDescription?.(props)) {\n return <CompoundButtonShim {...props} />;\n }\n\n return <Button {...(props as React.RefAttributes<HTMLButtonElement>)} {...shimProps} />;\n});\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"mappings":";;;;;;AAAA;;;AAGA;AAASA;EAAAC;EAAAC;IAAA,0CAAgB;EAAA;AAAA","names":["Object","enumerable","get"],"sourceRoot":"../src/","sources":["packages/react-migration-v8-v9/src/components/Button/CommandButtonShim.tsx"],"sourcesContent":["/**\n * Shims v8 CommandButtonShim to render a v9 Button\n */\nexport { ActionButtonShim as CommandButtonShim } from './ActionButtonShim';\n"]}
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;;;AAGA;AAASA;EAAAC;EAAAC;IAAA,0CAAgB;EAAA;AAAA","names":["Object","enumerable","get"],"sourceRoot":"../src/","sources":["packages/react-components/react-migration-v8-v9/src/components/Button/CommandButtonShim.tsx"],"sourcesContent":["/**\n * Shims v8 CommandButtonShim to render a v9 Button\n */\nexport { ActionButtonShim as CommandButtonShim } from './ActionButtonShim';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"mappings":";;;;;;AAAA;AAIA;AAGA;AAEA;;;AAGaA,0BAAkB,gBAE3BC,KAAK,CAACC,UAAU,CAAC,CAACC,KAAK,EAAEC,IAAI,KAAI;;EACnC,MAAMC,YAAY,GAAG;IACnB,GAAGF,KAAK;IACRG,gBAAgB,EAAEH,KAAK,CAACI,OAAO,GAAG,4BAA4B,GAAG;GAClE;EAED,MAAMC,SAAS,GAAwB;IACrC,GAAGC,iCAAe,CAACJ,YAAY,CAAC;IAChCK,gBAAgB,EAAEP,KAAK,CAACQ,aAAa,KAAI,WAAK,CAACC,mBAAmB,+CAAzBT,KAAK,EAAuBA,KAAK,CAAC;GAC5E;EAED,OAAOF,oBAACY,iCAAc;IAAA,GAAMV,KAAgD;IAAA,GAAMK;EAAS,EAAI;AACjG,CAAC,CAAC","names":["exports","React","forwardRef","props","_ref","variantProps","variantClassName","primary","shimProps","shimButtonProps_1","secondaryContent","secondaryText","onRenderDescription","react_components_1"],"sourceRoot":"../src/","sources":["packages/react-migration-v8-v9/src/components/Button/CompoundButtonShim.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport type { IButtonProps } from '@fluentui/react';\n\nimport { CompoundButton } from '@fluentui/react-components';\nimport type { CompoundButtonProps } from '@fluentui/react-components';\n\nimport { shimButtonProps } from './shimButtonProps';\n\n/**\n * Shims v8 CompoundButton to render a v9 CompoundButton\n */\nexport const CompoundButtonShim: React.ForwardRefExoticComponent<\n IButtonProps & React.RefAttributes<HTMLButtonElement>\n> = React.forwardRef((props, _ref) => {\n const variantProps = {\n ...props,\n variantClassName: props.primary ? 'ms-Button--compoundPrimary' : 'ms-Button--compound',\n };\n\n const shimProps: CompoundButtonProps = {\n ...shimButtonProps(variantProps),\n secondaryContent: props.secondaryText || props.onRenderDescription?.(props),\n };\n\n return <CompoundButton {...(props as React.RefAttributes<HTMLButtonElement>)} {...shimProps} />;\n});\n"]}
|
|
1
|
+
{"version":3,"mappings":";;;;;;AAAA;AAIA;AAGA;AAEA;;;AAGaA,0BAAkB,gBAE3BC,KAAK,CAACC,UAAU,CAAC,CAACC,KAAK,EAAEC,IAAI,KAAI;;EACnC,MAAMC,YAAY,GAAG;IACnB,GAAGF,KAAK;IACRG,gBAAgB,EAAEH,KAAK,CAACI,OAAO,GAAG,4BAA4B,GAAG;GAClE;EAED,MAAMC,SAAS,GAAwB;IACrC,GAAGC,iCAAe,CAACJ,YAAY,CAAC;IAChCK,gBAAgB,EAAEP,KAAK,CAACQ,aAAa,KAAI,WAAK,CAACC,mBAAmB,+CAAzBT,KAAK,EAAuBA,KAAK,CAAC;GAC5E;EAED,OAAOF,oBAACY,iCAAc;IAAA,GAAMV,KAAgD;IAAA,GAAMK;EAAS,EAAI;AACjG,CAAC,CAAC","names":["exports","React","forwardRef","props","_ref","variantProps","variantClassName","primary","shimProps","shimButtonProps_1","secondaryContent","secondaryText","onRenderDescription","react_components_1"],"sourceRoot":"../src/","sources":["packages/react-components/react-migration-v8-v9/src/components/Button/CompoundButtonShim.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport type { IButtonProps } from '@fluentui/react';\n\nimport { CompoundButton } from '@fluentui/react-components';\nimport type { CompoundButtonProps } from '@fluentui/react-components';\n\nimport { shimButtonProps } from './shimButtonProps';\n\n/**\n * Shims v8 CompoundButton to render a v9 CompoundButton\n */\nexport const CompoundButtonShim: React.ForwardRefExoticComponent<\n IButtonProps & React.RefAttributes<HTMLButtonElement>\n> = React.forwardRef((props, _ref) => {\n const variantProps = {\n ...props,\n variantClassName: props.primary ? 'ms-Button--compoundPrimary' : 'ms-Button--compound',\n };\n\n const shimProps: CompoundButtonProps = {\n ...shimButtonProps(variantProps),\n secondaryContent: props.secondaryText || props.onRenderDescription?.(props),\n };\n\n return <CompoundButton {...(props as React.RefAttributes<HTMLButtonElement>)} {...shimProps} />;\n});\n"]}
|