@fluentui/react-jsx-runtime 0.0.0-nightly-20230816-0414.1 → 0.0.0-nightly-20230818-0413.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 +39 -9
- package/CHANGELOG.md +25 -7
- package/README.md +46 -2
- package/package.json +5 -5
package/CHANGELOG.json
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"name": "@fluentui/react-jsx-runtime",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
6
|
-
"tag": "@fluentui/react-jsx-runtime_v0.0.0-nightly-
|
|
7
|
-
"version": "0.0.0-nightly-
|
|
5
|
+
"date": "Fri, 18 Aug 2023 04:20:12 GMT",
|
|
6
|
+
"tag": "@fluentui/react-jsx-runtime_v0.0.0-nightly-20230818-0413.1",
|
|
7
|
+
"version": "0.0.0-nightly-20230818-0413.1",
|
|
8
8
|
"comments": {
|
|
9
9
|
"prerelease": [
|
|
10
10
|
{
|
|
@@ -16,20 +16,50 @@
|
|
|
16
16
|
{
|
|
17
17
|
"author": "beachball",
|
|
18
18
|
"package": "@fluentui/react-jsx-runtime",
|
|
19
|
-
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-
|
|
20
|
-
"commit": "
|
|
19
|
+
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20230818-0413.1",
|
|
20
|
+
"commit": "e7dd11acc0a4c01003ac7502fb3ec24fe1830d72"
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
"author": "beachball",
|
|
24
24
|
"package": "@fluentui/react-jsx-runtime",
|
|
25
|
-
"comment": "Bump @fluentui/react-conformance to v0.0.0-nightly-
|
|
26
|
-
"commit": "
|
|
25
|
+
"comment": "Bump @fluentui/react-conformance to v0.0.0-nightly-20230818-0413.1",
|
|
26
|
+
"commit": "e7dd11acc0a4c01003ac7502fb3ec24fe1830d72"
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
"author": "beachball",
|
|
30
30
|
"package": "@fluentui/react-jsx-runtime",
|
|
31
|
-
"comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-
|
|
32
|
-
"commit": "
|
|
31
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230818-0413.1",
|
|
32
|
+
"commit": "e7dd11acc0a4c01003ac7502fb3ec24fe1830d72"
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"date": "Wed, 16 Aug 2023 17:41:07 GMT",
|
|
39
|
+
"tag": "@fluentui/react-jsx-runtime_v9.0.0",
|
|
40
|
+
"version": "9.0.0",
|
|
41
|
+
"comments": {
|
|
42
|
+
"patch": [
|
|
43
|
+
{
|
|
44
|
+
"author": "bernardo.sunderhus@gmail.com",
|
|
45
|
+
"package": "@fluentui/react-jsx-runtime",
|
|
46
|
+
"commit": "7e2ba9c3e9e9e426e18bc5861fd84211400780ac",
|
|
47
|
+
"comment": "chore: release stable version"
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"date": "Wed, 16 Aug 2023 11:38:33 GMT",
|
|
54
|
+
"tag": "@fluentui/react-jsx-runtime_v9.0.0-alpha.16",
|
|
55
|
+
"version": "9.0.0-alpha.16",
|
|
56
|
+
"comments": {
|
|
57
|
+
"prerelease": [
|
|
58
|
+
{
|
|
59
|
+
"author": "bernardo.sunderhus@gmail.com",
|
|
60
|
+
"package": "@fluentui/react-jsx-runtime",
|
|
61
|
+
"commit": "d40ea6e1d43cd21d1404d9c71018d822958c6644",
|
|
62
|
+
"comment": "feat: supports new automatic JSX runtime"
|
|
33
63
|
}
|
|
34
64
|
]
|
|
35
65
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,20 +1,38 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-jsx-runtime
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Fri, 18 Aug 2023 04:20:12 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## [0.0.0-nightly-
|
|
7
|
+
## [0.0.0-nightly-20230818-0413.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-jsx-runtime_v0.0.0-nightly-20230818-0413.1)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-jsx-runtime_v9.0.0
|
|
9
|
+
Fri, 18 Aug 2023 04:20:12 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-jsx-runtime_v9.0.0..@fluentui/react-jsx-runtime_v0.0.0-nightly-20230818-0413.1)
|
|
11
11
|
|
|
12
12
|
### Changes
|
|
13
13
|
|
|
14
14
|
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by fluentui-internal@service.microsoft.com)
|
|
15
|
-
- Bump @fluentui/react-utilities to v0.0.0-nightly-
|
|
16
|
-
- Bump @fluentui/react-conformance to v0.0.0-nightly-
|
|
17
|
-
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-
|
|
15
|
+
- Bump @fluentui/react-utilities to v0.0.0-nightly-20230818-0413.1 ([commit](https://github.com/microsoft/fluentui/commit/e7dd11acc0a4c01003ac7502fb3ec24fe1830d72) by beachball)
|
|
16
|
+
- Bump @fluentui/react-conformance to v0.0.0-nightly-20230818-0413.1 ([commit](https://github.com/microsoft/fluentui/commit/e7dd11acc0a4c01003ac7502fb3ec24fe1830d72) by beachball)
|
|
17
|
+
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230818-0413.1 ([commit](https://github.com/microsoft/fluentui/commit/e7dd11acc0a4c01003ac7502fb3ec24fe1830d72) by beachball)
|
|
18
|
+
|
|
19
|
+
## [9.0.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-jsx-runtime_v9.0.0)
|
|
20
|
+
|
|
21
|
+
Wed, 16 Aug 2023 17:41:07 GMT
|
|
22
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-jsx-runtime_v9.0.0-alpha.16..@fluentui/react-jsx-runtime_v9.0.0)
|
|
23
|
+
|
|
24
|
+
### Patches
|
|
25
|
+
|
|
26
|
+
- chore: release stable version ([PR #28880](https://github.com/microsoft/fluentui/pull/28880) by bernardo.sunderhus@gmail.com)
|
|
27
|
+
|
|
28
|
+
## [9.0.0-alpha.16](https://github.com/microsoft/fluentui/tree/@fluentui/react-jsx-runtime_v9.0.0-alpha.16)
|
|
29
|
+
|
|
30
|
+
Wed, 16 Aug 2023 11:38:33 GMT
|
|
31
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-jsx-runtime_v9.0.0-alpha.15..@fluentui/react-jsx-runtime_v9.0.0-alpha.16)
|
|
32
|
+
|
|
33
|
+
### Changes
|
|
34
|
+
|
|
35
|
+
- feat: supports new automatic JSX runtime ([PR #28810](https://github.com/microsoft/fluentui/pull/28810) by bernardo.sunderhus@gmail.com)
|
|
18
36
|
|
|
19
37
|
## [9.0.0-alpha.15](https://github.com/microsoft/fluentui/tree/@fluentui/react-jsx-runtime_v9.0.0-alpha.15)
|
|
20
38
|
|
package/README.md
CHANGED
|
@@ -1,5 +1,49 @@
|
|
|
1
1
|
# @fluentui/react-jsx-runtime
|
|
2
2
|
|
|
3
|
-
**React
|
|
3
|
+
**React JSX runtime for [Fluent UI React](https://react.fluentui.dev/)**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[Fluent UI React](https://react.fluentui.dev/) requires the usage of a custom JSX runtime to support the [slots API](https://react.fluentui.dev/?path=/docs/concepts-developer-customizing-components-with-slots--page)
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
This library should only be used in the case where you are trying to use the internal slot API of Fluent UI React. If you are not using the internal slot API, you should not need to use this library.
|
|
10
|
+
|
|
11
|
+
In case you want to re-compose a component and redeclare its render method then this API will be necessary, here's our documentation on [Rendering a component with slots](https://react.fluentui.dev/?path=/docs/concepts-developer-customizing-components-with-slots--page#rendering-components-with-slots)
|
|
12
|
+
|
|
13
|
+
To properly render a component with slots the `createElement` method of `@fluentui/react-jsx-runtime` can be used as a replacement for `React.createElement`:
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
/** @jsxRuntime classic */
|
|
17
|
+
/** @jsx createElement */
|
|
18
|
+
|
|
19
|
+
// createElement custom JSX pragma is required to support slot creation
|
|
20
|
+
import { createElement } from '@fluentui/react-jsx-runtime';
|
|
21
|
+
import { assertSlots } from '@fluentui/react-utilities';
|
|
22
|
+
|
|
23
|
+
const renderButton_unstable = (state: ButtonState) => {
|
|
24
|
+
const { iconOnly, iconPosition } = state;
|
|
25
|
+
|
|
26
|
+
assertSlots<ButtonSlots>(state);
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<state.root>
|
|
30
|
+
{iconPosition !== 'after' && state.icon && <state.icon />}
|
|
31
|
+
{!iconOnly && state.root.children}
|
|
32
|
+
{iconPosition === 'after' && state.icon && <state.icon />}
|
|
33
|
+
</state.root>
|
|
34
|
+
);
|
|
35
|
+
};
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
In case you're using typescript or any modern javascript transpiler, you can use [JSX import source](https://www.typescriptlang.org/tsconfig#jsxImportSource) feature instead of depending on declaring the runtime on every file
|
|
39
|
+
|
|
40
|
+
In TSC case you can simply add this do `tsconfig.json` file:
|
|
41
|
+
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"compilerOptions": {
|
|
45
|
+
"jsx": "react-jsx",
|
|
46
|
+
"jsxImportSource": "@fluentui/react-jsx-runtime"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
```
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-jsx-runtime",
|
|
3
|
-
"version": "0.0.0-nightly-
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.0.0-nightly-20230818-0413.1",
|
|
4
|
+
"description": "Custom JSX runtime for @fluentui/react-components",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
7
7
|
"typings": "./dist/index.d.ts",
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@fluentui/eslint-plugin": "*",
|
|
27
|
-
"@fluentui/react-conformance": "0.0.0-nightly-
|
|
28
|
-
"@fluentui/react-conformance-griffel": "0.0.0-nightly-
|
|
27
|
+
"@fluentui/react-conformance": "0.0.0-nightly-20230818-0413.1",
|
|
28
|
+
"@fluentui/react-conformance-griffel": "0.0.0-nightly-20230818-0413.1",
|
|
29
29
|
"@fluentui/scripts-api-extractor": "*",
|
|
30
30
|
"@fluentui/scripts-tasks": "*"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@fluentui/react-utilities": "0.0.0-nightly-
|
|
33
|
+
"@fluentui/react-utilities": "0.0.0-nightly-20230818-0413.1",
|
|
34
34
|
"@swc/helpers": "^0.4.14"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|