@charcoal-ui/react 3.13.0-beta.0 → 3.13.0
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/README.md +1 -1
- package/dist/core/SSRProvider.d.ts +3 -1
- package/dist/core/SSRProvider.d.ts.map +1 -1
- package/dist/index.cjs.js +106 -100
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +7 -1
- package/dist/index.esm.js.map +1 -1
- package/package.json +8 -8
- package/src/core/SSRProvider.tsx +12 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@charcoal-ui/react",
|
|
3
|
-
"version": "3.13.0
|
|
3
|
+
"version": "3.13.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index.cjs.js",
|
|
6
6
|
"module": "./dist/index.esm.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"clean": "rimraf dist .tsbuildinfo"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@charcoal-ui/esbuild-plugin-styled-components": "^3.13.0
|
|
23
|
+
"@charcoal-ui/esbuild-plugin-styled-components": "^3.13.0",
|
|
24
24
|
"@react-types/dialog": "^3.5.8",
|
|
25
25
|
"@react-types/switch": "^3.1.2",
|
|
26
26
|
"@storybook/addon-actions": "^8.0.5",
|
|
@@ -48,11 +48,11 @@
|
|
|
48
48
|
"typescript": "^4.9.5"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@charcoal-ui/foundation": "^3.13.0
|
|
52
|
-
"@charcoal-ui/icons": "^3.13.0
|
|
53
|
-
"@charcoal-ui/styled": "^3.13.0
|
|
54
|
-
"@charcoal-ui/theme": "^3.13.0
|
|
55
|
-
"@charcoal-ui/utils": "^3.13.0
|
|
51
|
+
"@charcoal-ui/foundation": "^3.13.0",
|
|
52
|
+
"@charcoal-ui/icons": "^3.13.0",
|
|
53
|
+
"@charcoal-ui/styled": "^3.13.0",
|
|
54
|
+
"@charcoal-ui/theme": "^3.13.0",
|
|
55
|
+
"@charcoal-ui/utils": "^3.13.0",
|
|
56
56
|
"@react-aria/button": "^3.9.1",
|
|
57
57
|
"@react-aria/checkbox": "^3.13.0",
|
|
58
58
|
"@react-aria/dialog": "^3.5.10",
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"url": "https://github.com/pixiv/charcoal.git",
|
|
87
87
|
"directory": "packages/react"
|
|
88
88
|
},
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "f0267a5894ade5fd8f378a5f77dddf8ba27bd320"
|
|
90
90
|
}
|
package/src/core/SSRProvider.tsx
CHANGED
|
@@ -1 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import { SSRProvider as OriginSSRProvider } from '@react-aria/ssr'
|
|
2
|
+
import { version, Fragment } from 'react'
|
|
3
|
+
|
|
4
|
+
export function isReactVersionOver(minVersion: number): boolean {
|
|
5
|
+
// version history on the react side: https://github.com/facebook/react/commits/main/packages/shared/ReactVersion.js
|
|
6
|
+
const reactMajorVersion = parseInt(version.split('.')[0], 10)
|
|
7
|
+
return Number.isFinite(reactMajorVersion)
|
|
8
|
+
? reactMajorVersion >= minVersion
|
|
9
|
+
: false
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const SSRProvider = isReactVersionOver(18) ? Fragment : OriginSSRProvider
|