-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
80 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@nextui-org/shared-utils": patch | ||
--- | ||
|
||
Tabs with prop destroyInactiveTabPanel error in nextjs15(#4344) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
const { switchVersion, loadModule } = require('./utils') | ||
|
||
const Vue = loadModule('vue') | ||
|
||
if (!Vue || typeof Vue.version !== 'string') { | ||
console.warn('[vue-demi] Vue is not found. Please run "npm install vue" to install.') | ||
} | ||
else if (Vue.version.startsWith('2.7.')) { | ||
switchVersion(2.7) | ||
} | ||
else if (Vue.version.startsWith('2.')) { | ||
switchVersion(2) | ||
} | ||
else if (Vue.version.startsWith('3.')) { | ||
switchVersion(3) | ||
} | ||
else { | ||
console.warn(`[vue-demi] Vue version v${Vue.version} is not supported.`) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** | ||
* Returns an appropriate value for the `inert` attribute based on the React version. | ||
* | ||
* In React 19, the attribute `inert` is a boolean. In versions prior to 19, the attribute | ||
* behaves differently: setting `inert=""` will make it `true`, and `inert=undefined` will make it `false`. | ||
* | ||
* @param {boolean} v - The desired boolean state for the `inert` attribute. | ||
* @returns {boolean | string | undefined} - Depending on the React version: | ||
* - Returns `boolean` if React version is 19 (the input value `v` directly). | ||
* - Returns `string` (empty string) if `v` is `true` in older React versions. | ||
* - Returns `undefined` if `v` is `false` in older React versions. | ||
* | ||
* @see {@link https://github.com/facebook/react/issues/17157} for more details on the behavior in older React versions. | ||
*/ | ||
export declare function getInertValue(v: boolean): boolean | string | undefined; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from "./react19"; | ||
export * from "./react18"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* Returns an appropriate value for the `inert` attribute based on the React version. | ||
* | ||
* In React 19, the attribute `inert` is a boolean. In versions prior to 19, the attribute | ||
* behaves differently: setting `inert=""` will make it `true`, and `inert=undefined` will make it `false`. | ||
* | ||
* @param {boolean} v - The desired boolean state for the `inert` attribute. | ||
* @returns {boolean | string | undefined} - Depending on the React version: | ||
* - Returns `boolean` if React version is 19 (the input value `v` directly). | ||
* - Returns `string` (empty string) if `v` is `true` in older React versions. | ||
* - Returns `undefined` if `v` is `false` in older React versions. | ||
* | ||
* @see {@link https://github.com/facebook/react/issues/17157} for more details on the behavior in older React versions. | ||
*/ | ||
export const getInertValueReact18 = (v: boolean): boolean | string | undefined => { | ||
return v ? "" : undefined; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* Returns an appropriate value for the `inert` attribute based on the React version. | ||
* | ||
* In React 19, the attribute `inert` is a boolean. In versions prior to 19, the attribute | ||
* behaves differently: setting `inert=""` will make it `true`, and `inert=undefined` will make it `false`. | ||
* | ||
* @param {boolean} v - The desired boolean state for the `inert` attribute. | ||
* @returns {boolean | string | undefined} - Depending on the React version: | ||
* - Returns `boolean` if React version is 19 (the input value `v` directly). | ||
* - Returns `string` (empty string) if `v` is `true` in older React versions. | ||
* - Returns `undefined` if `v` is `false` in older React versions. | ||
* | ||
* @see {@link https://github.com/facebook/react/issues/17157} for more details on the behavior in older React versions. | ||
*/ | ||
export const getInertValueReact19 = (v: boolean): boolean | string | undefined => { | ||
return v; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters