Skip to content

Commit 04fb45a

Browse files
committed
feat: add @fluentui/react to ui-components
1 parent 1b111e1 commit 04fb45a

File tree

5 files changed

+456
-93
lines changed

5 files changed

+456
-93
lines changed

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -133,23 +133,23 @@ CASE=ui-components pnpm benchmark
133133

134134
| Name | Prod build |
135135
| --------------------------- | ---------- |
136-
| Rspack CLI 1.4.6 | 1129ms |
137-
| Rsbuild 1.4.6 | 1181ms |
138-
| Vite (Rollup + SWC) 7.0.4 | 5443ms |
139-
| Vite (Rolldown + Oxc) 7.0.7 | 636ms |
140-
| Rolldown 1.0.0-beta.25 | 528ms |
141-
| webpack (SWC) 5.100.0 | 11202ms |
136+
| Rspack CLI 1.4.6 | 1640ms |
137+
| Rsbuild 1.4.6 | 1536ms |
138+
| Vite (Rollup + SWC) 7.0.4 | 6286ms |
139+
| Vite (Rolldown + Oxc) 7.0.7 | 672ms |
140+
| Rolldown 1.0.0-beta.25 | 567ms |
141+
| webpack (SWC) 5.100.0 | 15943ms |
142142

143143
#### Bundle size
144144

145145
| Name | Total size | Gzipped size |
146146
| --------------------------- | ---------- | ------------ |
147-
| Rspack CLI 1.4.6 | 1493.9kB | 406.5kB |
148-
| Rsbuild 1.4.6 | 1310.5kB | 400.8kB |
149-
| Vite (Rollup + SWC) 7.0.4 | 1315.4kB | 412.4kB |
150-
| Vite (Rolldown + Oxc) 7.0.7 | 1342.3kB | 416.9kB |
151-
| Rolldown 1.0.0-beta.25 | 1358.2kB | 417.8kB |
152-
| webpack (SWC) 5.100.0 | 1349.6kB | 407.6kB |
147+
| Rspack CLI 1.4.6 | 2210.3kB | 621.7kB |
148+
| Rsbuild 1.4.6 | 2021.9kB | 615.9kB |
149+
| Vite (Rollup + SWC) 7.0.4 | 2037.5kB | 638.2kB |
150+
| Vite (Rolldown + Oxc) 7.0.7 | 2054.4kB | 636.3kB |
151+
| Rolldown 1.0.0-beta.25 | 2071.2kB | 637.3kB |
152+
| webpack (SWC) 5.100.0 | 2072.9kB | 624.9kB |
153153

154154
### rome
155155

benchmark.mjs

Lines changed: 27 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -262,9 +262,7 @@ toolNames.forEach((name) => {
262262
case 'rolldown':
263263
buildTools.push(
264264
new BuildTool({
265-
name:
266-
'Rolldown ' +
267-
require('rolldown/package.json').version,
265+
name: 'Rolldown ' + require('rolldown/package.json').version,
268266
port: 5173,
269267
startScript: 'start:rolldown',
270268
startedRegex: /Finished in (\d+) (s|ms)/,
@@ -461,7 +459,6 @@ async function runDevBenchmark(buildTool, perfResult) {
461459

462460
await coolDown();
463461
logger.success(color.dim(buildTool.name) + ' dev server closed');
464-
465462
}
466463

467464
async function runBuildBenchmark(buildTool, perfResult) {
@@ -577,41 +574,38 @@ for (const [name, values] of Object.entries(averageResults)) {
577574
logger.log('');
578575
logger.success('Benchmark finished!\n');
579576

580-
logger.info('Build performance:\n');
577+
let markdownLogs = '';
578+
579+
markdownLogs += '#### Build performance\n\n';
581580

582581
if (runDev) {
583-
console.log(
584-
markdownTable([
585-
['Name', 'Dev cold start', 'Root HMR', 'Leaf HMR', 'Prod build'],
586-
...buildTools.map(({ name }) => [
587-
name,
588-
`${averageResults[name].devColdStart} (${averageResults[name].serverStart} + ${averageResults[name].onLoad})`,
589-
averageResults[name].rootHmr,
590-
averageResults[name].leafHmr,
591-
averageResults[name].prodBuild,
592-
]),
582+
markdownLogs += markdownTable([
583+
['Name', 'Dev cold start', 'Root HMR', 'Leaf HMR', 'Prod build'],
584+
...buildTools.map(({ name }) => [
585+
name,
586+
`${averageResults[name].devColdStart} (${averageResults[name].serverStart} + ${averageResults[name].onLoad})`,
587+
averageResults[name].rootHmr,
588+
averageResults[name].leafHmr,
589+
averageResults[name].prodBuild,
593590
]),
594-
);
591+
]);
595592
} else {
596-
console.log(
597-
markdownTable([
598-
['Name', 'Prod build'],
599-
...buildTools.map(({ name }) => [name, averageResults[name].prodBuild]),
600-
]),
601-
);
593+
markdownLogs += markdownTable([
594+
['Name', 'Prod build'],
595+
...buildTools.map(({ name }) => [name, averageResults[name].prodBuild]),
596+
]);
602597
}
603598

604-
logger.log('');
605-
logger.info('Bundle sizes:\n');
606-
console.log(
607-
markdownTable([
608-
['Name', 'Total size', 'Gzipped size'],
609-
...buildTools.map(({ name }) => [
610-
name,
611-
sizeResults[name].totalSize,
612-
sizeResults[name].totalGzipSize,
613-
]),
599+
markdownLogs += '\n\n#### Bundle sizes\n\n';
600+
markdownLogs += markdownTable([
601+
['Name', 'Total size', 'Gzipped size'],
602+
...buildTools.map(({ name }) => [
603+
name,
604+
sizeResults[name].totalSize,
605+
sizeResults[name].totalGzipSize,
614606
]),
615-
);
607+
]);
608+
609+
console.log(markdownLogs);
616610

617611
process.exit(0);

cases/ui-components/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"@chakra-ui/react": "^3.22.0",
1414
"@emotion/react": "^11.14.0",
1515
"@emotion/styled": "^11.14.1",
16+
"@fluentui/react": "^8.123.1",
1617
"@headlessui/react": "^2.2.4",
1718
"@mantine/core": "^8.1.3",
1819
"@mui/material": "^7.2.0",

cases/ui-components/src/index.js

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,45 @@
1+
// @ts-check
12
import {
23
Button as MuiButton,
34
TextField as MuiTextField,
45
Select as MuiSelect,
6+
FormControl as MuiFormControl,
7+
Table as MuiTable,
58
} from '@mui/material';
69
import {
710
Button as BootstrapButton,
811
Form as BootstrapForm,
912
Card as BootstrapCard,
13+
FormControl as BootstrapFormControl,
14+
Table as BootstrapTable,
1015
} from 'react-bootstrap';
1116
import {
1217
Button as ChakraButton,
1318
Input as ChakraInput,
1419
Select as ChakraSelect,
20+
Table as ChakraTable,
1521
} from '@chakra-ui/react';
1622
import {
1723
Button as AntdButton,
1824
Input as AntdInput,
1925
Select as AntdSelect,
26+
Table as AntdTable,
27+
Form as AntdForm,
2028
} from 'antd';
21-
import { ElButton, ElInput, ElSelect } from 'element-plus';
29+
import { ElButton, ElInput, ElSelect, ElTable, ElForm } from 'element-plus';
2230
import {
2331
VBtn as VuetifyButton,
2432
VTextField as VuetifyTextField,
2533
VSelect as VuetifySelect,
34+
VTable as VuetifyTable,
35+
VForm as VuetifyForm,
2636
} from 'vuetify/components';
2737
import {
2838
Button as VantButton,
2939
Field as VantField,
3040
Picker as VantPicker,
41+
Calendar as VantCalendar,
42+
Form as VantForm,
3143
} from 'vant';
3244
import {
3345
Dialog as HeadlessDialog,
@@ -38,14 +50,32 @@ import {
3850
Button as MantineButton,
3951
TextInput as MantineTextInput,
4052
Select as MantineSelect,
53+
Table as MantineTable,
4154
} from '@mantine/core';
55+
import {
56+
ButtonGrid as FluentUIButtonGrid,
57+
Dialog as FluentUIDialog,
58+
} from '@fluentui/react';
4259

43-
console.log(MuiButton, MuiTextField, MuiSelect);
44-
console.log(BootstrapButton, BootstrapForm, BootstrapCard);
45-
console.log(ChakraButton, ChakraInput, ChakraSelect);
46-
console.log(AntdButton, AntdInput, AntdSelect);
47-
console.log(ElButton, ElInput, ElSelect);
48-
console.log(VuetifyButton, VuetifyTextField, VuetifySelect);
49-
console.log(VantButton, VantField, VantPicker);
60+
console.log(MuiButton, MuiTextField, MuiSelect, MuiFormControl, MuiTable);
61+
console.log(
62+
BootstrapButton,
63+
BootstrapForm,
64+
BootstrapCard,
65+
BootstrapFormControl,
66+
BootstrapTable,
67+
);
68+
console.log(ChakraButton, ChakraInput, ChakraSelect, ChakraTable);
69+
console.log(AntdButton, AntdInput, AntdSelect, AntdTable, AntdForm);
70+
console.log(ElButton, ElInput, ElSelect, ElTable, ElForm);
71+
console.log(
72+
VuetifyButton,
73+
VuetifyTextField,
74+
VuetifySelect,
75+
VuetifyTable,
76+
VuetifyForm,
77+
);
78+
console.log(VantButton, VantField, VantPicker, VantCalendar, VantForm);
5079
console.log(HeadlessDialog, HeadlessListbox, HeadlessMenu);
51-
console.log(MantineButton, MantineTextInput, MantineSelect);
80+
console.log(MantineButton, MantineTextInput, MantineSelect, MantineTable);
81+
console.log(FluentUIButtonGrid, FluentUIDialog);

0 commit comments

Comments
 (0)