From 54793bf86a6e7fc124e681604762b6412e721e52 Mon Sep 17 00:00:00 2001 From: Junior Garcia Date: Sun, 1 Dec 2024 09:39:02 -0300 Subject: [PATCH 01/15] Fix/react core pkg (#4204) * fix: double use client tag import in react core package * fix: double use client * chore: restore postbuild script --- .changeset/soft-gorillas-push.md | 5 +++++ packages/core/react/package.json | 3 ++- packages/core/react/src/scripts/postbuild.js | 19 +++++++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 .changeset/soft-gorillas-push.md diff --git a/.changeset/soft-gorillas-push.md b/.changeset/soft-gorillas-push.md new file mode 100644 index 0000000000..55733fb73e --- /dev/null +++ b/.changeset/soft-gorillas-push.md @@ -0,0 +1,5 @@ +--- +"@nextui-org/react": patch +--- + +Fix double 'use client' diff --git a/packages/core/react/package.json b/packages/core/react/package.json index 30d3792884..ab4e7b3cfa 100644 --- a/packages/core/react/package.json +++ b/packages/core/react/package.json @@ -31,12 +31,13 @@ }, "scripts": { "build": "tsup --dts", - "postbuild": "node src/scripts/postbuild.js", "dev": "pnpm build:fast --watch", "clean": "rimraf dist .turbo", "typecheck": "tsc --noEmit", "build:fast": "tsup", "prepack": "clean-package", + "postbuild": "node src/scripts/postbuild.js", + "prebuild": "node src/scripts/prebuild.js", "postpack": "clean-package restore" }, "dependencies": { diff --git a/packages/core/react/src/scripts/postbuild.js b/packages/core/react/src/scripts/postbuild.js index b5c46f8fef..e8f7a0c060 100644 --- a/packages/core/react/src/scripts/postbuild.js +++ b/packages/core/react/src/scripts/postbuild.js @@ -18,6 +18,9 @@ const docsComponentsDir = path.resolve(rootDir, 'apps/docs/content/docs/componen const themeDir = path.resolve(packagesDir, 'core/theme'); // Theme directory path const baseDocs = 'https://nextui.org/docs/components'; +const filePath = './src/index.ts'; // Updated file path +const backupFilePath = filePath + '.backup.ts'; // Backup file + const EXCLUDE_LIST = ['.DS_Store']; @@ -70,6 +73,22 @@ function generateComponents() { function main() { // Generate the components meta data try { + // Restore the original file from the backup + fs.copyFile(backupFilePath, filePath, (err) => { + if (err) { + return console.log(err); + } + console.log('The original file has been restored.'); + + // Delete the backup file + fs.unlink(backupFilePath, (err) => { + if (err) { + return console.log(err); + } + console.log('The backup file has been deleted.'); + }); + }); + generateComponents() } catch (error) { console.error(chalk.red(`Generate the components Error: ${error}`)) From 7599c33061c883432151d82c276ee0403b89b501 Mon Sep 17 00:00:00 2001 From: winches <329487092@qq.com> Date: Sun, 1 Dec 2024 20:40:47 +0800 Subject: [PATCH 02/15] docs: optimize code fold (#4202) * docs: optimize code fold * fix: code review --- .../docs/components/docs/components/helper.ts | 236 ++++++++++-------- 1 file changed, 128 insertions(+), 108 deletions(-) diff --git a/apps/docs/components/docs/components/helper.ts b/apps/docs/components/docs/components/helper.ts index f9c46f0db2..862e39a490 100644 --- a/apps/docs/components/docs/components/helper.ts +++ b/apps/docs/components/docs/components/helper.ts @@ -12,10 +12,8 @@ export type TransformTokensTypes = TransformTokens[0][0] & { const startFlag = ["{", "["]; const endFlag = ["}", "]"]; -const specialStartFlag = ["("]; -const specialEndFlag = [")"]; -const defaultFoldFlagList = ["cn", "HTMLAttributes"]; -const defaultShowFlagList = ["Component", "forwardRef", "App", "Example", "AddForm", "SignupForm"]; +const isElementStartRegex = /^\s* { if (index < lastIndex) { return; } + token.forEach((t) => { + (t as TransformTokensTypes).index = index; + }); + result.push(token); - let startToken: TransformTokens[0][0] = null as any; - let mergedStartFlagList = [...startFlag]; + const lineContent = getLineContent(token); + const {isStartTag, isEndTag} = checkIsElement(lineContent); - token.forEach((t) => { - if (defaultFoldFlagList.some((text) => t.content.includes(text))) { - // If cn then need to judge whether it is import token - if (t.content.includes("cn") && token.some((t) => t.content === "import")) { - return; - } + // If it has startElementName means it is within the element range + if (startElementName) { + if (isEndTag) { + // Judge whether it is the end tag of the element then reset startElementName + const {endElementName} = getElementName(lineContent); - // If HTMLAttributes then need to judge whether it have start flag - if ( - t.content.includes("HTMLAttributes") && - !token.some((t) => startFlag.includes(t.content)) - ) { - return; + if (endElementName === startElementName) { + startElementName = ""; } - - fold = true; - mergedStartFlagList.push(...specialStartFlag); } - if (mergedStartFlagList.includes(t.content)) { - startToken = t; + return; + } else if (isStartTag) { + const {startElementName: elementName, endElementName} = getElementName(lineContent); + + if (!endElementName) { + startElementName = elementName; + + return; } + } - if (defaultShowFlagList.some((text) => t.content.includes(text))) { - isShowFolder = true; + let startToken: TransformTokens[0][0] = null as any; + + token.forEach((t) => { + if (startFlag.includes(t.content)) { + startToken = t; } }); - const mergedOptions = fold - ? { - specialEndFlag, - specialStartFlag, - } - : undefined; - const isFolder = checkIsFolder(token, mergedOptions); + const isFolder = checkIsFolder(token); if (isFolder && startToken) { - const endIndex = findEndIndex(tokens, index + 1, mergedOptions); - - // Greater than or equal to folderLine then will folder otherwise it will show directly - if (endIndex !== -1 && (endIndex - index >= folderLine || isShowFolder || fold)) { - lastIndex = endIndex; - const folder = tokens.slice(index + 1, endIndex); - const endToken = tokens[endIndex]; - const ellipsisToken: TransformTokensTypes = { - types: ["ellipsis"], - content: "", - class: "custom-folder ellipsis-token", - }; - const copyContent: TransformTokensTypes = { - types: ["copy"], - content: "", - folderContent: folder, - class: "custom-folder copy-token", - }; - - endToken.forEach((t, _, arr) => { - let className = ""; - - className += "custom-folder"; - if (t.content.trim() === "" && (arr.length === 3 || arr.length === 4)) { - // Add length check to sure it's added to } token - className += " empty-token"; - } - (t as TransformTokensTypes).class = className; - }); - - startToken.types = ["folderStart"]; - (startToken as TransformTokensTypes).folderContent = folder; - (startToken as TransformTokensTypes).summaryContent = [ - ...token, - ellipsisToken, - copyContent, - ...endToken, - ]; - (startToken as TransformTokensTypes).index = index; - if (isShowFolder && !fold) { - (startToken as TransformTokensTypes).open = true; - } - - result.push([startToken]); - - isShowFolder = false; - fold = false; + const nextLineContent = tokens.slice(index + 1, index + 2).reduce((acc, line) => { + return acc + getLineContent(line); + }, ""); + const isNextLineObjectFolder = checkIsObjectContent(nextLineContent); + const isArrayFolder = lineContent.trim().endsWith("["); + + if (isNextLineObjectFolder || isArrayFolder) { + const endIndex = findEndIndex(tokens, index + 1); + + // Greater than or equal to folderLine then will folder otherwise it will show directly + if (endIndex !== -1 && endIndex - index >= folderLine) { + lastIndex = endIndex; + const folder = tokens.slice(index + 1, endIndex); + const endToken = tokens[endIndex]; + + (endToken[0] as TransformTokensTypes).class = "first-custom-folder"; + + const ellipsisToken: TransformTokensTypes = { + types: ["ellipsis"], + content: "", + class: "custom-folder ellipsis-token", + }; + const copyContent: TransformTokensTypes = { + types: ["copy"], + content: "", + folderContent: folder, + class: "custom-folder copy-token", + }; + + endToken.forEach((t, _, arr) => { + let className = (t as TransformTokensTypes).class || ""; + + className += " custom-folder"; + if (t.content.trim() === "" && (arr.length === 3 || arr.length === 4)) { + // Add length check to sure it's added to } token + className += " empty-token"; + } + (t as TransformTokensTypes).class = className; + }); + + startToken.types = ["folderStart"]; + (startToken as TransformTokensTypes).folderContent = folder; + (startToken as TransformTokensTypes).summaryContent = [ + ...token, + ellipsisToken, + copyContent, + ...endToken, + ]; + (startToken as TransformTokensTypes).index = index; + // isShowFolder && ((startToken as TransformTokensTypes).open = true); + + result.splice(result.length - 1, 1, [startToken]); - return; + return; + } } } - token.forEach((t) => { - (t as TransformTokensTypes).index = index; - }); - result.push(token); }); return result; } -interface SpecialOptions { - specialStartFlag?: string[]; - specialEndFlag?: string[]; -} - -function checkIsFolder( - token: TransformTokens[0], - {specialStartFlag, specialEndFlag}: SpecialOptions = {}, -) { +function checkIsFolder(token: TransformTokens[0]) { const stack: string[] = []; - const mergedStartFlagList = specialStartFlag ? [...startFlag, ...specialStartFlag] : startFlag; - const mergedEndFlagList = specialEndFlag ? [...endFlag, ...specialEndFlag] : endFlag; for (const t of token) { - if (mergedStartFlagList.includes(t.content)) { + if (startFlag.includes(t.content)) { stack.push(t.content); - } else if (mergedEndFlagList.includes(t.content)) { + } else if (endFlag.includes(t.content)) { stack.pop(); } } @@ -158,14 +147,8 @@ function checkIsFolder( return stack.length !== 0; } -function findEndIndex( - tokens: TransformTokens, - startIndex: number, - {specialStartFlag, specialEndFlag}: SpecialOptions = {}, -) { +function findEndIndex(tokens: TransformTokens, startIndex: number) { const stack: string[] = ["flag"]; - const mergedStartFlagList = specialStartFlag ? [...startFlag, ...specialStartFlag] : startFlag; - const mergedEndFlagList = specialEndFlag ? [...endFlag, ...specialEndFlag] : endFlag; for (let i = startIndex; i < tokens.length; i++) { const token = tokens[i]; @@ -173,9 +156,9 @@ function findEndIndex( for (const line of token) { const transformLine = line.content.replace(/\$/g, ""); - if (mergedStartFlagList.includes(transformLine)) { + if (startFlag.includes(transformLine)) { stack.push("flag"); - } else if (mergedEndFlagList.includes(transformLine)) { + } else if (endFlag.includes(transformLine)) { stack.pop(); } @@ -187,3 +170,40 @@ function findEndIndex( return -1; } + +function checkIsElement(lineContent: string) { + return { + isStartTag: isElementStartRegex.test(lineContent), + isEndTag: isElementEndRegex.test(lineContent), + }; +} + +function getElementName(lineContent: string) { + const startElementName = lineContent.match(/^\s*<([a-zA-Z.]+)/); + const endElementName = lineContent.match(/^\s*<\/([a-zA-Z.]+)>/); + + return { + startElementName: startElementName?.[1] || (lineContent.includes("<>") ? "<>" : ""), + endElementName: endElementName?.[1] || (lineContent.includes("") ? "" : ""), + }; +} + +function getLineContent(token: TransformTokens[0]) { + return token.reduce((acc, t) => acc + t.content, ""); +} + +function checkIsObjectContent(lineContent: string) { + lineContent = lineContent.trim(); + // first: match { a } + // second: match { a: b } + // third: match { a (b) } + // fourth: match /** */ + const isObjectContent = /^([\w]+,?$)|([\w\[.\]]+:)|([\w]+\s?\(.*?\)$)|(^\/\*\*)/.test( + lineContent, + ); + const hasEqual = /\s=\s/.test(lineContent); + const hasFunction = lineContent.includes("function"); + const hasVariable = /var|let|const/.test(lineContent); + + return isObjectContent && !hasEqual && !hasFunction && !hasVariable; +} From cbe4cb1e857694a237cd052825af4af05f8f1bdf Mon Sep 17 00:00:00 2001 From: Peterl561 <76144929+Peterl561@users.noreply.github.com> Date: Sun, 1 Dec 2024 04:55:15 -0800 Subject: [PATCH 03/15] fix(input): teaxtarea label squish (#4197) * fix(input): teaxtarea label squish * chore(changeset): add changeset for textarea label fix --- .changeset/gorgeous-impalas-move.md | 5 +++++ packages/core/theme/src/components/input.ts | 1 + 2 files changed, 6 insertions(+) create mode 100644 .changeset/gorgeous-impalas-move.md diff --git a/.changeset/gorgeous-impalas-move.md b/.changeset/gorgeous-impalas-move.md new file mode 100644 index 0000000000..2ed35301fb --- /dev/null +++ b/.changeset/gorgeous-impalas-move.md @@ -0,0 +1,5 @@ +--- +"@nextui-org/input": patch +--- + +fixed textarea label squish diff --git a/packages/core/theme/src/components/input.ts b/packages/core/theme/src/components/input.ts index 3957f4d3d0..5cb6ef14a5 100644 --- a/packages/core/theme/src/components/input.ts +++ b/packages/core/theme/src/components/input.ts @@ -29,6 +29,7 @@ const input = tv({ "z-10", "pointer-events-none", "origin-top-left", + "flex-shrink-0", // Using RTL here as Tailwind CSS doesn't support `start` and `end` logical properties for transforms yet. "rtl:origin-top-right", "subpixel-antialiased", From 2c33b8a331e593a6eae4f3e204a9fdf841304dd5 Mon Sep 17 00:00:00 2001 From: Junior Garcia Date: Sun, 1 Dec 2024 10:17:25 -0300 Subject: [PATCH 04/15] chore: remove customer runner --- .github/workflows/QA.yaml | 10 +++++----- .github/workflows/enter-pre-release-mode.yaml | 2 +- .github/workflows/exit-pre-release-mode.yaml | 2 +- .github/workflows/pre-release.yaml | 2 +- .github/workflows/release.yaml | 2 +- .github/workflows/update-stats.yml | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/QA.yaml b/.github/workflows/QA.yaml index ddb98f5c80..6763deec1e 100644 --- a/.github/workflows/QA.yaml +++ b/.github/workflows/QA.yaml @@ -8,7 +8,7 @@ on: jobs: build: name: Build - runs-on: ubuntu-latest-m + runs-on: ubuntu-latest steps: - name: Checkout branch uses: actions/checkout@v4 @@ -21,7 +21,7 @@ jobs: tests: name: Tests - runs-on: ubuntu-latest-m + runs-on: ubuntu-latest steps: - name: Checkout branch uses: actions/checkout@v4 @@ -34,7 +34,7 @@ jobs: eslint: name: ESLint - runs-on: ubuntu-latest-m + runs-on: ubuntu-latest steps: - name: Checkout branch uses: actions/checkout@v4 @@ -47,7 +47,7 @@ jobs: types: name: TypeScript - runs-on: ubuntu-latest-m + runs-on: ubuntu-latest steps: - name: Checkout branch uses: actions/checkout@v4 @@ -60,7 +60,7 @@ jobs: prettier: name: Prettier - runs-on: ubuntu-latest-m + runs-on: ubuntu-latest steps: - name: Checkout branch uses: actions/checkout@v4 diff --git a/.github/workflows/enter-pre-release-mode.yaml b/.github/workflows/enter-pre-release-mode.yaml index 3a8d8a0454..77e8ef273c 100644 --- a/.github/workflows/enter-pre-release-mode.yaml +++ b/.github/workflows/enter-pre-release-mode.yaml @@ -4,7 +4,7 @@ on: workflow_dispatch jobs: enter-pre-release-mode: if: ${{ github.ref == 'refs/heads/beta/release-next' || github.ref == 'refs/heads/canary' }} - runs-on: ubuntu-latest-m + runs-on: ubuntu-latest permissions: contents: write pull-requests: write diff --git a/.github/workflows/exit-pre-release-mode.yaml b/.github/workflows/exit-pre-release-mode.yaml index 078e0a0582..d8cf71a470 100644 --- a/.github/workflows/exit-pre-release-mode.yaml +++ b/.github/workflows/exit-pre-release-mode.yaml @@ -5,7 +5,7 @@ jobs: exit-pre-release-mode: if: ${{ github.ref == 'refs/heads/beta/release-next' || github.ref == 'refs/heads/canary' }} name: exit pre-release mode - runs-on: ubuntu-latest-m + runs-on: ubuntu-latest permissions: contents: write pull-requests: write diff --git a/.github/workflows/pre-release.yaml b/.github/workflows/pre-release.yaml index 4b1d57ff77..78839925b4 100644 --- a/.github/workflows/pre-release.yaml +++ b/.github/workflows/pre-release.yaml @@ -13,7 +13,7 @@ concurrency: ${{ github.workflow }}-${{ github.ref }} jobs: prerelease: name: changesets pre-release - runs-on: ubuntu-latest-m + runs-on: ubuntu-latest permissions: contents: write pull-requests: write diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 578de54cbf..4a3f7ebc98 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -14,7 +14,7 @@ concurrency: jobs: release: name: Release - runs-on: ubuntu-latest-m + runs-on: ubuntu-latest steps: - name: Checkout branch uses: actions/checkout@v4 diff --git a/.github/workflows/update-stats.yml b/.github/workflows/update-stats.yml index e30e5835f9..3ea0fd4819 100644 --- a/.github/workflows/update-stats.yml +++ b/.github/workflows/update-stats.yml @@ -10,7 +10,7 @@ on: jobs: update-stats: name: Update Stats - runs-on: ubuntu-latest-m + runs-on: ubuntu-latest steps: - name: Checkout branch uses: actions/checkout@v4 From a3c25294e3369e483f463fda4b9d3127ad980e0a Mon Sep 17 00:00:00 2001 From: Junior Garcia Date: Sun, 1 Dec 2024 10:19:47 -0300 Subject: [PATCH 05/15] chore: rename changeset --- .changeset/soft-gorillas-push.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/soft-gorillas-push.md b/.changeset/soft-gorillas-push.md index 55733fb73e..52e47221bf 100644 --- a/.changeset/soft-gorillas-push.md +++ b/.changeset/soft-gorillas-push.md @@ -2,4 +2,4 @@ "@nextui-org/react": patch --- -Fix double 'use client' +Fix double 'use client' tag in core/react From d8e73330abc8f3615117f630b900d19ac50da424 Mon Sep 17 00:00:00 2001 From: Junior Garcia Date: Sun, 1 Dec 2024 10:51:39 -0300 Subject: [PATCH 06/15] chore: increase timeout --- .changeset/soft-gorillas-push.md | 2 +- .github/workflows/pre-release.yaml | 1 + .github/workflows/release.yaml | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.changeset/soft-gorillas-push.md b/.changeset/soft-gorillas-push.md index 52e47221bf..4148cc27c4 100644 --- a/.changeset/soft-gorillas-push.md +++ b/.changeset/soft-gorillas-push.md @@ -2,4 +2,4 @@ "@nextui-org/react": patch --- -Fix double 'use client' tag in core/react +Fix double 'use client' tag in core/react. diff --git a/.github/workflows/pre-release.yaml b/.github/workflows/pre-release.yaml index 78839925b4..729f055cd5 100644 --- a/.github/workflows/pre-release.yaml +++ b/.github/workflows/pre-release.yaml @@ -14,6 +14,7 @@ jobs: prerelease: name: changesets pre-release runs-on: ubuntu-latest + timeout-minutes: 30 permissions: contents: write pull-requests: write diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 4a3f7ebc98..576ffe1288 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -15,6 +15,7 @@ jobs: release: name: Release runs-on: ubuntu-latest + timeout-minutes: 30 steps: - name: Checkout branch uses: actions/checkout@v4 From 0fac6662063bd921d50ca44f467c2f675ce825df Mon Sep 17 00:00:00 2001 From: Junior Garcia Date: Sun, 1 Dec 2024 11:02:37 -0300 Subject: [PATCH 07/15] chore: change get info pkg version --- .changeset/soft-gorillas-push.md | 2 +- package.json | 4 +++- pnpm-lock.yaml | 4 ++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.changeset/soft-gorillas-push.md b/.changeset/soft-gorillas-push.md index 4148cc27c4..52e47221bf 100644 --- a/.changeset/soft-gorillas-push.md +++ b/.changeset/soft-gorillas-push.md @@ -2,4 +2,4 @@ "@nextui-org/react": patch --- -Fix double 'use client' tag in core/react. +Fix double 'use client' tag in core/react diff --git a/package.json b/package.json index b8a21e59f1..7e14700043 100644 --- a/package.json +++ b/package.json @@ -65,6 +65,7 @@ "@changesets/cli": "2.27.10", "@changesets/changelog-github": "0.5.0", "@changesets/get-release-plan": "4.0.5", + "@changesets/get-github-info": "0.6.0", "@changesets/types": "6.0.0", "@commitlint/cli": "^17.2.0", "@commitlint/config-conventional": "^17.2.0", @@ -142,7 +143,8 @@ "pnpm": { "overrides": { "react": "^18.2.0", - "react-dom": "^18.2.0" + "react-dom": "^18.2.0", + "@changesets/get-github-info": "0.6.0" } }, "engines": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1774817bec..c65136c311 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,6 +7,7 @@ settings: overrides: react: ^18.2.0 react-dom: ^18.2.0 + '@changesets/get-github-info': 0.6.0 importers: @@ -39,6 +40,9 @@ importers: '@changesets/cli': specifier: 2.27.10 version: 2.27.10 + '@changesets/get-github-info': + specifier: 0.6.0 + version: 0.6.0 '@changesets/get-release-plan': specifier: 4.0.5 version: 4.0.5 From a75134cd1e2eb5502df7d3e98e4b1f29de1ea3fd Mon Sep 17 00:00:00 2001 From: Junior Garcia Date: Sun, 1 Dec 2024 11:11:04 -0300 Subject: [PATCH 08/15] chore: new changeset --- .changeset/itchy-balloons-do.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/itchy-balloons-do.md diff --git a/.changeset/itchy-balloons-do.md b/.changeset/itchy-balloons-do.md new file mode 100644 index 0000000000..1e1c3d88b2 --- /dev/null +++ b/.changeset/itchy-balloons-do.md @@ -0,0 +1,5 @@ +--- +"@nextui-org/react": patch +--- + +Remove double use client tag From 5786897b9950d95c12351dacd2fb41bb1e298201 Mon Sep 17 00:00:00 2001 From: Junior Garcia Date: Sun, 1 Dec 2024 11:23:21 -0300 Subject: [PATCH 09/15] chore: single chnageset --- .changeset/angry-maps-serve.md | 5 -- .changeset/brave-trains-wave.md | 6 --- .changeset/calm-trees-serve.md | 5 -- .changeset/calm-weeks-tie.md | 10 ---- .changeset/cold-dolls-vanish.md | 6 --- .changeset/curly-rules-warn.md | 5 -- .changeset/curly-zoos-thank.md | 5 -- .changeset/dirty-moles-refuse.md | 5 -- .changeset/dull-bags-divide.md | 5 -- .changeset/empty-helper-wrapper-div.md | 6 --- .changeset/fast-horses-explode.md | 5 -- .changeset/few-ants-breathe.md | 5 -- .changeset/five-adults-protect.md | 7 --- .changeset/flat-pants-accept.md | 5 -- .changeset/fluffy-icons-refuse.md | 5 -- .changeset/forty-doors-flash.md | 5 -- .changeset/fuzzy-lies-brush.md | 5 -- .changeset/gentle-needles-rescue.md | 5 -- .changeset/giant-worms-hammer.md | 5 -- .changeset/gorgeous-impalas-move.md | 5 -- .changeset/grumpy-mayflies-rhyme.md | 5 -- .changeset/happy-parrots-search.md | 5 -- .changeset/itchy-balloons-do.md | 5 -- .changeset/kind-cobras-travel.md | 6 --- .changeset/kind-insects-end.md | 5 -- .changeset/lazy-buttons-exercise.md | 7 --- .changeset/light-needles-behave.md | 5 -- .changeset/many-starfishes-refuse.md | 5 -- .changeset/mean-mangos-occur.md | 8 --- .changeset/mighty-birds-deny.md | 5 -- .changeset/moody-rabbits-shop.md | 7 --- .changeset/nasty-bees-sniff.md | 7 --- .changeset/neat-donkeys-accept.md | 6 --- .changeset/new-cougars-collect.md | 6 --- .changeset/pink-beans-sit.md | 6 --- .changeset/pink-days-yawn.md | 49 ----------------- .changeset/poor-moose-double.md | 5 -- .changeset/poor-sheep-repair.md | 6 --- .changeset/popular-pigs-begin.md | 5 -- .changeset/pretty-parrots-guess.md | 5 -- .changeset/proud-chicken-impress.md | 7 --- .changeset/purple-berries-play.md | 5 -- .changeset/quick-geckos-punch.md | 5 -- .changeset/selfish-baboons-know.md | 7 --- .changeset/sharp-pianos-pump.md | 9 ---- .changeset/shy-mails-live.md | 5 -- .../{few-jars-flow.md => silly-mugs-marry.md} | 53 +++++++++++++------ .changeset/sixty-ties-knock.md | 6 --- .changeset/slimy-cats-brush.md | 4 -- .changeset/slow-paws-punch.md | 5 -- .changeset/smooth-mayflies-wonder.md | 5 -- .changeset/soft-apricots-sleep.md | 6 --- .changeset/soft-gorillas-push.md | 5 -- .changeset/sour-seas-buy.md | 5 -- .changeset/spotty-flies-jump.md | 7 --- .changeset/spotty-spies-call.md | 5 -- .changeset/swift-news-complain.md | 15 ------ .changeset/ten-paws-relate.md | 5 -- .changeset/thirty-cheetahs-guess.md | 20 ------- .changeset/tiny-laws-cheer.md | 5 -- .changeset/tough-brooms-hunt.md | 5 -- .changeset/tricky-fans-draw.md | 5 -- .changeset/twelve-papayas-clean.md | 5 -- .changeset/twelve-trains-smile.md | 5 -- .changeset/two-waves-own.md | 5 -- .changeset/wild-jobs-explain.md | 5 -- .changeset/witty-socks-bathe.md | 5 -- 67 files changed, 38 insertions(+), 449 deletions(-) delete mode 100644 .changeset/angry-maps-serve.md delete mode 100644 .changeset/brave-trains-wave.md delete mode 100644 .changeset/calm-trees-serve.md delete mode 100644 .changeset/calm-weeks-tie.md delete mode 100644 .changeset/cold-dolls-vanish.md delete mode 100644 .changeset/curly-rules-warn.md delete mode 100644 .changeset/curly-zoos-thank.md delete mode 100644 .changeset/dirty-moles-refuse.md delete mode 100644 .changeset/dull-bags-divide.md delete mode 100644 .changeset/empty-helper-wrapper-div.md delete mode 100644 .changeset/fast-horses-explode.md delete mode 100644 .changeset/few-ants-breathe.md delete mode 100644 .changeset/five-adults-protect.md delete mode 100644 .changeset/flat-pants-accept.md delete mode 100644 .changeset/fluffy-icons-refuse.md delete mode 100644 .changeset/forty-doors-flash.md delete mode 100644 .changeset/fuzzy-lies-brush.md delete mode 100644 .changeset/gentle-needles-rescue.md delete mode 100644 .changeset/giant-worms-hammer.md delete mode 100644 .changeset/gorgeous-impalas-move.md delete mode 100644 .changeset/grumpy-mayflies-rhyme.md delete mode 100644 .changeset/happy-parrots-search.md delete mode 100644 .changeset/itchy-balloons-do.md delete mode 100644 .changeset/kind-cobras-travel.md delete mode 100644 .changeset/kind-insects-end.md delete mode 100644 .changeset/lazy-buttons-exercise.md delete mode 100644 .changeset/light-needles-behave.md delete mode 100644 .changeset/many-starfishes-refuse.md delete mode 100644 .changeset/mean-mangos-occur.md delete mode 100644 .changeset/mighty-birds-deny.md delete mode 100644 .changeset/moody-rabbits-shop.md delete mode 100644 .changeset/nasty-bees-sniff.md delete mode 100644 .changeset/neat-donkeys-accept.md delete mode 100644 .changeset/new-cougars-collect.md delete mode 100644 .changeset/pink-beans-sit.md delete mode 100644 .changeset/pink-days-yawn.md delete mode 100644 .changeset/poor-moose-double.md delete mode 100644 .changeset/poor-sheep-repair.md delete mode 100644 .changeset/popular-pigs-begin.md delete mode 100644 .changeset/pretty-parrots-guess.md delete mode 100644 .changeset/proud-chicken-impress.md delete mode 100644 .changeset/purple-berries-play.md delete mode 100644 .changeset/quick-geckos-punch.md delete mode 100644 .changeset/selfish-baboons-know.md delete mode 100644 .changeset/sharp-pianos-pump.md delete mode 100644 .changeset/shy-mails-live.md rename .changeset/{few-jars-flow.md => silly-mugs-marry.md} (62%) delete mode 100644 .changeset/sixty-ties-knock.md delete mode 100644 .changeset/slimy-cats-brush.md delete mode 100644 .changeset/slow-paws-punch.md delete mode 100644 .changeset/smooth-mayflies-wonder.md delete mode 100644 .changeset/soft-apricots-sleep.md delete mode 100644 .changeset/soft-gorillas-push.md delete mode 100644 .changeset/sour-seas-buy.md delete mode 100644 .changeset/spotty-flies-jump.md delete mode 100644 .changeset/spotty-spies-call.md delete mode 100644 .changeset/swift-news-complain.md delete mode 100644 .changeset/ten-paws-relate.md delete mode 100644 .changeset/thirty-cheetahs-guess.md delete mode 100644 .changeset/tiny-laws-cheer.md delete mode 100644 .changeset/tough-brooms-hunt.md delete mode 100644 .changeset/tricky-fans-draw.md delete mode 100644 .changeset/twelve-papayas-clean.md delete mode 100644 .changeset/twelve-trains-smile.md delete mode 100644 .changeset/two-waves-own.md delete mode 100644 .changeset/wild-jobs-explain.md delete mode 100644 .changeset/witty-socks-bathe.md diff --git a/.changeset/angry-maps-serve.md b/.changeset/angry-maps-serve.md deleted file mode 100644 index 2bfc7db03c..0000000000 --- a/.changeset/angry-maps-serve.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@nextui-org/theme": patch ---- - -move circular-progress tv to progress diff --git a/.changeset/brave-trains-wave.md b/.changeset/brave-trains-wave.md deleted file mode 100644 index c81facf5b1..0000000000 --- a/.changeset/brave-trains-wave.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@nextui-org/menu": patch -"@nextui-org/theme": patch ---- - -Fix menu item classNames not work (#4119) diff --git a/.changeset/calm-trees-serve.md b/.changeset/calm-trees-serve.md deleted file mode 100644 index c5dd228d82..0000000000 --- a/.changeset/calm-trees-serve.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@nextui-org/theme": patch ---- - -fix label placement in input and select diff --git a/.changeset/calm-weeks-tie.md b/.changeset/calm-weeks-tie.md deleted file mode 100644 index de3f6b04e1..0000000000 --- a/.changeset/calm-weeks-tie.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"@nextui-org/accordion": patch -"@nextui-org/button": patch -"@nextui-org/card": patch -"@nextui-org/date-picker": patch -"@nextui-org/navbar": patch -"@nextui-org/snippet": patch ---- - -fix missing peer / dev dependency for framer-motion diff --git a/.changeset/cold-dolls-vanish.md b/.changeset/cold-dolls-vanish.md deleted file mode 100644 index eba5f406b5..0000000000 --- a/.changeset/cold-dolls-vanish.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@nextui-org/drawer": patch -"@nextui-org/modal": patch ---- - -Drawer styles and transition improved diff --git a/.changeset/curly-rules-warn.md b/.changeset/curly-rules-warn.md deleted file mode 100644 index b86fd4c1ea..0000000000 --- a/.changeset/curly-rules-warn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@nextui-org/calendar": patch ---- - -add missing `framer-motion` in `peerDependencies` diff --git a/.changeset/curly-zoos-thank.md b/.changeset/curly-zoos-thank.md deleted file mode 100644 index 39f532bfcd..0000000000 --- a/.changeset/curly-zoos-thank.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@nextui-org/listbox": patch ---- - -change ListboxItem key to optional (#3880) diff --git a/.changeset/dirty-moles-refuse.md b/.changeset/dirty-moles-refuse.md deleted file mode 100644 index 5a73d0c78f..0000000000 --- a/.changeset/dirty-moles-refuse.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@nextui-org/autocomplete": patch ---- - -Clicking the clear button clears the selected value without closing the dropdown. (#3788) \ No newline at end of file diff --git a/.changeset/dull-bags-divide.md b/.changeset/dull-bags-divide.md deleted file mode 100644 index 25e4ee0d56..0000000000 --- a/.changeset/dull-bags-divide.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@nextui-org/select": patch ---- - -update label placement in Select to use `shouldLabelBeOutside` instead of `isOutsideLeft`, resolving multiline label placement issues (#3841). diff --git a/.changeset/empty-helper-wrapper-div.md b/.changeset/empty-helper-wrapper-div.md deleted file mode 100644 index ca62626cd4..0000000000 --- a/.changeset/empty-helper-wrapper-div.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@nextui-org/select": patch -"@nextui-org/input": patch ---- - -- Fixed a UI sliding issue caused by the helper wrapper being rendered when `isInvalid` was false but `errorMessage` was present diff --git a/.changeset/fast-horses-explode.md b/.changeset/fast-horses-explode.md deleted file mode 100644 index bf5c56177b..0000000000 --- a/.changeset/fast-horses-explode.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@nextui-org/theme": patch ---- - -fix the fullWidth variant in input and select component. (#3745) diff --git a/.changeset/few-ants-breathe.md b/.changeset/few-ants-breathe.md deleted file mode 100644 index e99ed1c5fb..0000000000 --- a/.changeset/few-ants-breathe.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@nextui-org/input-otp": patch ---- - -Fix input-otp peer deps diff --git a/.changeset/five-adults-protect.md b/.changeset/five-adults-protect.md deleted file mode 100644 index b0c5aac843..0000000000 --- a/.changeset/five-adults-protect.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@nextui-org/input": patch -"@nextui-org/shared-icons": patch -"@nextui-org/theme": patch ---- - -introduce `isClearable` to Textarea component (#2348, #2112) diff --git a/.changeset/flat-pants-accept.md b/.changeset/flat-pants-accept.md deleted file mode 100644 index 8c71441e13..0000000000 --- a/.changeset/flat-pants-accept.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@nextui-org/date-picker": patch ---- - -Fixes getCalendarProps to propagate the classNames in the calendarProps. (#3769) diff --git a/.changeset/fluffy-icons-refuse.md b/.changeset/fluffy-icons-refuse.md deleted file mode 100644 index bfde0510a8..0000000000 --- a/.changeset/fluffy-icons-refuse.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@nextui-org/table": patch ---- - -Currently, whenever any arrow-key keypress is triggered it navigates the focus to other cell/row. This creates an issue when the table cell contains a component which requires this keys for specific purpose (eg. if a table cell contains input component, it might need arrow keys for editing. But it is not possible because whenever the keypress triggers navigation). The PR adds an `isKeyboardNavigationDisabled` prop to disable the navigation. diff --git a/.changeset/forty-doors-flash.md b/.changeset/forty-doors-flash.md deleted file mode 100644 index 232dd037ee..0000000000 --- a/.changeset/forty-doors-flash.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@nextui-org/theme": patch ---- - -remove the pseudo cancel btn from input (#3907) diff --git a/.changeset/fuzzy-lies-brush.md b/.changeset/fuzzy-lies-brush.md deleted file mode 100644 index f06b5c2678..0000000000 --- a/.changeset/fuzzy-lies-brush.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@nextui-org/table": patch ---- - -The `layoutNode` prop has been removed due to the update to react-aria. diff --git a/.changeset/gentle-needles-rescue.md b/.changeset/gentle-needles-rescue.md deleted file mode 100644 index 7c51ef52b4..0000000000 --- a/.changeset/gentle-needles-rescue.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@nextui-org/use-image": patch ---- - -use-image hook logic restore to the previous one to avoid nextjs hydration issues diff --git a/.changeset/giant-worms-hammer.md b/.changeset/giant-worms-hammer.md deleted file mode 100644 index f11a1ec96e..0000000000 --- a/.changeset/giant-worms-hammer.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@nextui-org/theme": patch ---- - -replace the use of RTL-specific styles with logical properties. diff --git a/.changeset/gorgeous-impalas-move.md b/.changeset/gorgeous-impalas-move.md deleted file mode 100644 index 2ed35301fb..0000000000 --- a/.changeset/gorgeous-impalas-move.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@nextui-org/input": patch ---- - -fixed textarea label squish diff --git a/.changeset/grumpy-mayflies-rhyme.md b/.changeset/grumpy-mayflies-rhyme.md deleted file mode 100644 index e8ede41448..0000000000 --- a/.changeset/grumpy-mayflies-rhyme.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@nextui-org/theme": patch ---- - -bump `tailwind-merge` version (#3614) diff --git a/.changeset/happy-parrots-search.md b/.changeset/happy-parrots-search.md deleted file mode 100644 index 61a3594010..0000000000 --- a/.changeset/happy-parrots-search.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@nextui-org/theme": patch ---- - -apply tw nested group (#3544, #2324, #2959) diff --git a/.changeset/itchy-balloons-do.md b/.changeset/itchy-balloons-do.md deleted file mode 100644 index 1e1c3d88b2..0000000000 --- a/.changeset/itchy-balloons-do.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@nextui-org/react": patch ---- - -Remove double use client tag diff --git a/.changeset/kind-cobras-travel.md b/.changeset/kind-cobras-travel.md deleted file mode 100644 index 75b552cfe7..0000000000 --- a/.changeset/kind-cobras-travel.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@nextui-org/calendar": patch -"@nextui-org/date-picker": patch ---- - -Add month and year picker to DateRangePicker and RangeCalendar (#3089, #3090) diff --git a/.changeset/kind-insects-end.md b/.changeset/kind-insects-end.md deleted file mode 100644 index 71e7bedb09..0000000000 --- a/.changeset/kind-insects-end.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@nextui-org/use-image": patch ---- - -server validation added to the use-image hook diff --git a/.changeset/lazy-buttons-exercise.md b/.changeset/lazy-buttons-exercise.md deleted file mode 100644 index 5cdc25373d..0000000000 --- a/.changeset/lazy-buttons-exercise.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@nextui-org/listbox": patch -"@nextui-org/menu": patch -"@nextui-org/theme": patch ---- - -Add truncate class to the list item to avoid overflow the wrapper diff --git a/.changeset/light-needles-behave.md b/.changeset/light-needles-behave.md deleted file mode 100644 index 7fbe059519..0000000000 --- a/.changeset/light-needles-behave.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@nextui-org/use-theme": patch ---- - -introduce `use-theme` hook diff --git a/.changeset/many-starfishes-refuse.md b/.changeset/many-starfishes-refuse.md deleted file mode 100644 index 9319f29e4d..0000000000 --- a/.changeset/many-starfishes-refuse.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@nextui-org/theme": patch ---- - -revise label font size for lg (#3073) diff --git a/.changeset/mean-mangos-occur.md b/.changeset/mean-mangos-occur.md deleted file mode 100644 index aa971e188a..0000000000 --- a/.changeset/mean-mangos-occur.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@nextui-org/calendar": patch -"@nextui-org/theme": patch -"@nextui-org/use-infinite-scroll": patch -"@nextui-org/shared-utils": patch ---- - -replaced lodash with native approaches diff --git a/.changeset/mighty-birds-deny.md b/.changeset/mighty-birds-deny.md deleted file mode 100644 index b991ace2ff..0000000000 --- a/.changeset/mighty-birds-deny.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@nextui-org/autocomplete": patch ---- - -Return null if there are items for exit animation on popover close to work diff --git a/.changeset/moody-rabbits-shop.md b/.changeset/moody-rabbits-shop.md deleted file mode 100644 index 8fec710f2e..0000000000 --- a/.changeset/moody-rabbits-shop.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@nextui-org/calendar": patch -"@nextui-org/tabs": patch -"@nextui-org/shared-utils": patch ---- - -support inert value with boolean type for react 19 (#4038) diff --git a/.changeset/nasty-bees-sniff.md b/.changeset/nasty-bees-sniff.md deleted file mode 100644 index 3f129edff2..0000000000 --- a/.changeset/nasty-bees-sniff.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@nextui-org/listbox": patch -"@nextui-org/menu": patch -"@nextui-org/pagination": patch ---- - -Fixes missing `
  • ` wrapper when `href` prop is passed in `ListboxItem`, `MenuItem`, and `PaginationItem` (#4147) \ No newline at end of file diff --git a/.changeset/neat-donkeys-accept.md b/.changeset/neat-donkeys-accept.md deleted file mode 100644 index 4b5ab5f29e..0000000000 --- a/.changeset/neat-donkeys-accept.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@nextui-org/date-picker": patch -"@nextui-org/theme": patch ---- - -Add support for selectorButtonPlacement property (#3015) diff --git a/.changeset/new-cougars-collect.md b/.changeset/new-cougars-collect.md deleted file mode 100644 index 292c420571..0000000000 --- a/.changeset/new-cougars-collect.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@nextui-org/alert": patch -"@nextui-org/theme": patch ---- - -Alert styles improved diff --git a/.changeset/pink-beans-sit.md b/.changeset/pink-beans-sit.md deleted file mode 100644 index c9458b74fb..0000000000 --- a/.changeset/pink-beans-sit.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@nextui-org/use-image": patch -"@nextui-org/test-utils": patch ---- - -fix cached image flashing due to use-image always returning pending initially. The fix was to check if the image is loaded instantly through HTMLImageElement.complete attribute and use that to initialize the state. diff --git a/.changeset/pink-days-yawn.md b/.changeset/pink-days-yawn.md deleted file mode 100644 index e522676c82..0000000000 --- a/.changeset/pink-days-yawn.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -"@nextui-org/scroll-shadow": patch -"@nextui-org/autocomplete": patch -"@nextui-org/breadcrumbs": patch -"@nextui-org/date-picker": patch -"@nextui-org/date-input": patch -"@nextui-org/pagination": patch -"@nextui-org/accordion": patch -"@nextui-org/input-otp": patch -"@nextui-org/calendar": patch -"@nextui-org/checkbox": patch -"@nextui-org/dropdown": patch -"@nextui-org/progress": patch -"@nextui-org/skeleton": patch -"@nextui-org/divider": patch -"@nextui-org/listbox": patch -"@nextui-org/popover": patch -"@nextui-org/snippet": patch -"@nextui-org/spinner": patch -"@nextui-org/tooltip": patch -"@nextui-org/avatar": patch -"@nextui-org/button": patch -"@nextui-org/drawer": patch -"@nextui-org/navbar": patch -"@nextui-org/ripple": patch -"@nextui-org/select": patch -"@nextui-org/slider": patch -"@nextui-org/spacer": patch -"@nextui-org/switch": patch -"@nextui-org/alert": patch -"@nextui-org/badge": patch -"@nextui-org/image": patch -"@nextui-org/input": patch -"@nextui-org/modal": patch -"@nextui-org/radio": patch -"@nextui-org/table": patch -"@nextui-org/card": patch -"@nextui-org/chip": patch -"@nextui-org/code": patch -"@nextui-org/form": patch -"@nextui-org/link": patch -"@nextui-org/menu": patch -"@nextui-org/tabs": patch -"@nextui-org/user": patch -"@nextui-org/system-rsc": patch -"@nextui-org/kbd": patch ---- - -Fix peer deps diff --git a/.changeset/poor-moose-double.md b/.changeset/poor-moose-double.md deleted file mode 100644 index 90acf179ed..0000000000 --- a/.changeset/poor-moose-double.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@nextui-org/theme": patch ---- - -added stripe color gradients for progress (#1933) diff --git a/.changeset/poor-sheep-repair.md b/.changeset/poor-sheep-repair.md deleted file mode 100644 index 44e3ad034f..0000000000 --- a/.changeset/poor-sheep-repair.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@nextui-org/alert": patch -"@nextui-org/theme": patch ---- - -introduced Alert component (#2250) diff --git a/.changeset/popular-pigs-begin.md b/.changeset/popular-pigs-begin.md deleted file mode 100644 index f5d0a05413..0000000000 --- a/.changeset/popular-pigs-begin.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@nextui-org/autocomplete": patch ---- - -automatically focus first non-disabled item diff --git a/.changeset/pretty-parrots-guess.md b/.changeset/pretty-parrots-guess.md deleted file mode 100644 index 444998fd5b..0000000000 --- a/.changeset/pretty-parrots-guess.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@nextui-org/system": patch ---- - -Add reducedMotion setting to Provider (#3395) diff --git a/.changeset/proud-chicken-impress.md b/.changeset/proud-chicken-impress.md deleted file mode 100644 index 123e5647ab..0000000000 --- a/.changeset/proud-chicken-impress.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@nextui-org/autocomplete": patch -"@nextui-org/listbox": patch -"@nextui-org/theme": patch ---- - -Virtualization support added to Listbox & Autocomplete diff --git a/.changeset/purple-berries-play.md b/.changeset/purple-berries-play.md deleted file mode 100644 index cd3773e8b4..0000000000 --- a/.changeset/purple-berries-play.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@nextui-org/form": patch ---- - -add form component diff --git a/.changeset/quick-geckos-punch.md b/.changeset/quick-geckos-punch.md deleted file mode 100644 index d858b07d93..0000000000 --- a/.changeset/quick-geckos-punch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@nextui-org/theme": patch ---- - -separator icon RTL support in Breadcrumbs component (#2486) diff --git a/.changeset/selfish-baboons-know.md b/.changeset/selfish-baboons-know.md deleted file mode 100644 index 38ceb57b9c..0000000000 --- a/.changeset/selfish-baboons-know.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@nextui-org/alert": patch -"@nextui-org/theme": patch -"@nextui-org/shared-icons": patch ---- - -Alert design improved diff --git a/.changeset/sharp-pianos-pump.md b/.changeset/sharp-pianos-pump.md deleted file mode 100644 index 4a8c5c6d8c..0000000000 --- a/.changeset/sharp-pianos-pump.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"@nextui-org/autocomplete": patch -"@nextui-org/checkbox": patch -"@nextui-org/date-picker": patch -"@nextui-org/input": patch -"@nextui-org/radio": patch ---- - -support server validation with form diff --git a/.changeset/shy-mails-live.md b/.changeset/shy-mails-live.md deleted file mode 100644 index 1244e99a1b..0000000000 --- a/.changeset/shy-mails-live.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@nextui-org/image": patch ---- - -add missing `w` to `getWrapperProps` dependency (#3801) diff --git a/.changeset/few-jars-flow.md b/.changeset/silly-mugs-marry.md similarity index 62% rename from .changeset/few-jars-flow.md rename to .changeset/silly-mugs-marry.md index 96d7e301e3..1bec0f413d 100644 --- a/.changeset/few-jars-flow.md +++ b/.changeset/silly-mugs-marry.md @@ -1,5 +1,4 @@ --- -"@nextui-org/table": minor "@nextui-org/accordion": minor "@nextui-org/alert": minor "@nextui-org/autocomplete": minor @@ -11,14 +10,15 @@ "@nextui-org/card": minor "@nextui-org/checkbox": minor "@nextui-org/chip": minor +"@nextui-org/code": minor "@nextui-org/date-input": minor "@nextui-org/date-picker": minor -"@nextui-org/dropdown": minor -"@nextui-org/input": minor -"@nextui-org/code": minor "@nextui-org/divider": minor -"@nextui-org/image": minor "@nextui-org/drawer": minor +"@nextui-org/dropdown": minor +"@nextui-org/image": minor +"@nextui-org/input": minor +"@nextui-org/input-otp": patch "@nextui-org/kbd": minor "@nextui-org/link": minor "@nextui-org/listbox": minor @@ -29,22 +29,23 @@ "@nextui-org/popover": minor "@nextui-org/progress": minor "@nextui-org/radio": minor -"@nextui-org/scroll-shadow": minor +"@nextui-org/react": minor "@nextui-org/ripple": minor +"@nextui-org/scroll-shadow": minor "@nextui-org/select": minor -"@nextui-org/slider": minor +"@nextui-org/shared-icons": patch "@nextui-org/skeleton": minor +"@nextui-org/slider": minor +"@nextui-org/snippet": minor "@nextui-org/spacer": minor "@nextui-org/spinner": minor -"@nextui-org/snippet": minor "@nextui-org/switch": minor -"@nextui-org/tabs": minor -"@nextui-org/tooltip": minor -"@nextui-org/user": minor -"@nextui-org/react": minor "@nextui-org/system": minor -"@nextui-org/theme": minor "@nextui-org/system-rsc": minor +"@nextui-org/table": minor +"@nextui-org/tabs": minor +"@nextui-org/theme": minor +"@nextui-org/tooltip": minor "@nextui-org/use-aria-accordion": minor "@nextui-org/use-aria-accordion-item": minor "@nextui-org/use-aria-button": minor @@ -54,12 +55,34 @@ "@nextui-org/use-aria-multiselect": minor "@nextui-org/use-aria-toggle-button": minor "@nextui-org/use-disclosure": minor +"@nextui-org/use-image": patch "@nextui-org/use-intersection-observer": minor "@nextui-org/use-is-mobile": minor "@nextui-org/use-pagination": minor -"@nextui-org/aria-utils": minor "@nextui-org/use-ssr": minor "@nextui-org/use-theme": minor +"@nextui-org/user": minor --- -update react-aria version +This release includes several improvements and bug fixes: + +- Updated react-aria version across all components +- Improved Drawer styles and transitions +- Fixed missing peer dependencies for framer-motion +- Fixed menu item classNames functionality +- Added isClearable prop to Textarea component +- Fixed label placement issues in Input and Select components +- Improved table keyboard navigation with new isKeyboardNavigationDisabled prop +- Fixed UI sliding issues with helper wrapper in Input and Select +- Updated use-image hook to avoid Next.js hydration issues +- Replaced RTL-specific styles with logical properties +- Fixed textarea label squish issue +- Bumped tailwind-merge version +- Applied tw nested group fixes +- Fixed fullWidth variant in input and select components +- Moved circular-progress tv to progress +- Changed ListboxItem key to optional +- Fixed autocomplete clear button behavior +- Updated Select label placement logic +- Added missing framer-motion peer dependencies +- Removed layoutNode prop from Table due to react-aria update \ No newline at end of file diff --git a/.changeset/sixty-ties-knock.md b/.changeset/sixty-ties-knock.md deleted file mode 100644 index e8046181a1..0000000000 --- a/.changeset/sixty-ties-knock.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@nextui-org/alert": patch -"@nextui-org/theme": patch ---- - -Alert compoentn styles improved diff --git a/.changeset/slimy-cats-brush.md b/.changeset/slimy-cats-brush.md deleted file mode 100644 index 60de3bc696..0000000000 --- a/.changeset/slimy-cats-brush.md +++ /dev/null @@ -1,4 +0,0 @@ ---- ---- - -Update Twitter logo, links, and named references to X. Removed Twitter logo from social based on review feedback. diff --git a/.changeset/slow-paws-punch.md b/.changeset/slow-paws-punch.md deleted file mode 100644 index bbfe4c146c..0000000000 --- a/.changeset/slow-paws-punch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@nextui-org/popover": patch ---- - -added `shouldCloseOnScroll` to control the popover closing on scroll (#3594) diff --git a/.changeset/smooth-mayflies-wonder.md b/.changeset/smooth-mayflies-wonder.md deleted file mode 100644 index 41d4ed5fcd..0000000000 --- a/.changeset/smooth-mayflies-wonder.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@nextui-org/tabs": patch ---- - -Add tab ref diff --git a/.changeset/soft-apricots-sleep.md b/.changeset/soft-apricots-sleep.md deleted file mode 100644 index 958f75ffac..0000000000 --- a/.changeset/soft-apricots-sleep.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@nextui-org/modal": patch -"@nextui-org/use-draggable": patch ---- - -Add draggable modal (#2647) diff --git a/.changeset/soft-gorillas-push.md b/.changeset/soft-gorillas-push.md deleted file mode 100644 index 52e47221bf..0000000000 --- a/.changeset/soft-gorillas-push.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@nextui-org/react": patch ---- - -Fix double 'use client' tag in core/react diff --git a/.changeset/sour-seas-buy.md b/.changeset/sour-seas-buy.md deleted file mode 100644 index 9ef6472839..0000000000 --- a/.changeset/sour-seas-buy.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@nextui-org/menu": patch ---- - -Use `useMenu` and `useMenuItem` from `@react-aria` instead of custom hooks diff --git a/.changeset/spotty-flies-jump.md b/.changeset/spotty-flies-jump.md deleted file mode 100644 index 07cb523953..0000000000 --- a/.changeset/spotty-flies-jump.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@nextui-org/input-otp": patch -"@nextui-org/theme": patch -"@nextui-org/react": patch ---- - -Adding new input-otp component. diff --git a/.changeset/spotty-spies-call.md b/.changeset/spotty-spies-call.md deleted file mode 100644 index d7d7ae3f3f..0000000000 --- a/.changeset/spotty-spies-call.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@nextui-org/select": patch ---- - -Fix Controlled IsInvalid Prop In Select diff --git a/.changeset/swift-news-complain.md b/.changeset/swift-news-complain.md deleted file mode 100644 index 71d470661f..0000000000 --- a/.changeset/swift-news-complain.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -"@nextui-org/accordion": patch -"@nextui-org/calendar": patch -"@nextui-org/modal": patch -"@nextui-org/navbar": patch -"@nextui-org/popover": patch -"@nextui-org/ripple": patch -"@nextui-org/tooltip": patch -"@nextui-org/theme": patch -"@nextui-org/use-infinite-scroll": patch -"@nextui-org/dom-animation": patch -"@nextui-org/shared-utils": patch ---- - -framer motion optimization (#3340) diff --git a/.changeset/ten-paws-relate.md b/.changeset/ten-paws-relate.md deleted file mode 100644 index 45bc71353c..0000000000 --- a/.changeset/ten-paws-relate.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@nextui-org/popover": patch ---- - -Fix: element.ref was removed in React 19 diff --git a/.changeset/thirty-cheetahs-guess.md b/.changeset/thirty-cheetahs-guess.md deleted file mode 100644 index c9cb866725..0000000000 --- a/.changeset/thirty-cheetahs-guess.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -"@nextui-org/accordion": patch -"@nextui-org/autocomplete": patch -"@nextui-org/button": patch -"@nextui-org/calendar": patch -"@nextui-org/card": patch -"@nextui-org/dropdown": patch -"@nextui-org/modal": patch -"@nextui-org/navbar": patch -"@nextui-org/popover": patch -"@nextui-org/ripple": patch -"@nextui-org/select": patch -"@nextui-org/snippet": patch -"@nextui-org/tabs": patch -"@nextui-org/tooltip": patch -"@nextui-org/system": patch -"@nextui-org/framer-utils": patch ---- - -update `framer-motion` versions diff --git a/.changeset/tiny-laws-cheer.md b/.changeset/tiny-laws-cheer.md deleted file mode 100644 index 9c8bae4547..0000000000 --- a/.changeset/tiny-laws-cheer.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@nextui-org/system": patch ---- - -align `navigate` function parameters with `@react-aria` diff --git a/.changeset/tough-brooms-hunt.md b/.changeset/tough-brooms-hunt.md deleted file mode 100644 index 3fc6077312..0000000000 --- a/.changeset/tough-brooms-hunt.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@nextui-org/select": patch ---- - -Fix the label placement when the `Select` has a `placeholder` or `description`. diff --git a/.changeset/tricky-fans-draw.md b/.changeset/tricky-fans-draw.md deleted file mode 100644 index b0e1a5d121..0000000000 --- a/.changeset/tricky-fans-draw.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@nextui-org/theme": patch ---- - -show margin only with label in Switch component (#3791) diff --git a/.changeset/twelve-papayas-clean.md b/.changeset/twelve-papayas-clean.md deleted file mode 100644 index d3bd38dd0e..0000000000 --- a/.changeset/twelve-papayas-clean.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@nextui-org/tabs": patch ---- - -revise the inert attribute in `TabPanel` (#3972) diff --git a/.changeset/twelve-trains-smile.md b/.changeset/twelve-trains-smile.md deleted file mode 100644 index 68359994dc..0000000000 --- a/.changeset/twelve-trains-smile.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@nextui-org/theme": patch ---- - -making input and select styling consistent(#3876) diff --git a/.changeset/two-waves-own.md b/.changeset/two-waves-own.md deleted file mode 100644 index 8c534e7b7f..0000000000 --- a/.changeset/two-waves-own.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@nextui-org/input": patch ---- - -clear button should not receive focus when input is disabled. diff --git a/.changeset/wild-jobs-explain.md b/.changeset/wild-jobs-explain.md deleted file mode 100644 index 452efb9b26..0000000000 --- a/.changeset/wild-jobs-explain.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@nextui-org/use-image": patch ---- - -fix Image ReferenceError in SSR diff --git a/.changeset/witty-socks-bathe.md b/.changeset/witty-socks-bathe.md deleted file mode 100644 index ff37b1abd8..0000000000 --- a/.changeset/witty-socks-bathe.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@nextui-org/theme": patch ---- - -add missing `data-[hover=true]:` for ghost button with danger color From baec4741432e2e0babafdbf022e5e1e24529be9b Mon Sep 17 00:00:00 2001 From: Junior Garcia Date: Sun, 1 Dec 2024 11:31:17 -0300 Subject: [PATCH 10/15] chore: consolidated changeset --- .changeset/silly-mugs-marry.md | 38 +++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/.changeset/silly-mugs-marry.md b/.changeset/silly-mugs-marry.md index 1bec0f413d..eae3323c0b 100644 --- a/.changeset/silly-mugs-marry.md +++ b/.changeset/silly-mugs-marry.md @@ -16,9 +16,10 @@ "@nextui-org/divider": minor "@nextui-org/drawer": minor "@nextui-org/dropdown": minor +"@nextui-org/form": minor "@nextui-org/image": minor "@nextui-org/input": minor -"@nextui-org/input-otp": patch +"@nextui-org/input-otp": minor "@nextui-org/kbd": minor "@nextui-org/link": minor "@nextui-org/listbox": minor @@ -29,23 +30,23 @@ "@nextui-org/popover": minor "@nextui-org/progress": minor "@nextui-org/radio": minor -"@nextui-org/react": minor "@nextui-org/ripple": minor "@nextui-org/scroll-shadow": minor "@nextui-org/select": minor -"@nextui-org/shared-icons": patch "@nextui-org/skeleton": minor "@nextui-org/slider": minor "@nextui-org/snippet": minor "@nextui-org/spacer": minor "@nextui-org/spinner": minor "@nextui-org/switch": minor -"@nextui-org/system": minor -"@nextui-org/system-rsc": minor "@nextui-org/table": minor "@nextui-org/tabs": minor -"@nextui-org/theme": minor "@nextui-org/tooltip": minor +"@nextui-org/user": minor +"@nextui-org/react": minor +"@nextui-org/system": minor +"@nextui-org/system-rsc": minor +"@nextui-org/theme": minor "@nextui-org/use-aria-accordion": minor "@nextui-org/use-aria-accordion-item": minor "@nextui-org/use-aria-button": minor @@ -54,14 +55,35 @@ "@nextui-org/use-aria-modal-overlay": minor "@nextui-org/use-aria-multiselect": minor "@nextui-org/use-aria-toggle-button": minor +"@nextui-org/use-callback-ref": minor +"@nextui-org/use-clipboard": minor +"@nextui-org/use-data-scroll-overflow": minor "@nextui-org/use-disclosure": minor -"@nextui-org/use-image": patch +"@nextui-org/use-draggable": minor +"@nextui-org/use-image": minor +"@nextui-org/use-infinite-scroll": minor "@nextui-org/use-intersection-observer": minor "@nextui-org/use-is-mobile": minor +"@nextui-org/use-is-mounted": minor +"@nextui-org/use-measure": minor "@nextui-org/use-pagination": minor +"@nextui-org/use-real-shape": minor +"@nextui-org/use-ref-state": minor +"@nextui-org/use-resize": minor +"@nextui-org/use-safe-layout-effect": minor +"@nextui-org/use-scroll-position": minor "@nextui-org/use-ssr": minor "@nextui-org/use-theme": minor -"@nextui-org/user": minor +"@nextui-org/use-update-effect": minor +"@nextui-org/aria-utils": minor +"@nextui-org/dom-animation": minor +"@nextui-org/framer-utils": minor +"@nextui-org/react-rsc-utils": minor +"@nextui-org/react-utils": minor +"@nextui-org/shared-icons": minor +"@nextui-org/shared-utils": minor +"@nextui-org/stories-utils": minor +"@nextui-org/test-utils": minor --- This release includes several improvements and bug fixes: From 2608f83beb23677de3c30b98942ef6695078e09f Mon Sep 17 00:00:00 2001 From: Junior Garcia Date: Sun, 1 Dec 2024 11:31:26 -0300 Subject: [PATCH 11/15] chore: consolidated changeset --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 576ffe1288..4229cea8ed 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -14,7 +14,7 @@ concurrency: jobs: release: name: Release - runs-on: ubuntu-latest + runs-on: ubuntu-latest-m timeout-minutes: 30 steps: - name: Checkout branch From ff94c122c54f093e28462d0cf4df4c964546bb18 Mon Sep 17 00:00:00 2001 From: Junior Garcia Date: Sun, 1 Dec 2024 11:37:51 -0300 Subject: [PATCH 12/15] Update release.yaml (#4205) --- .github/workflows/release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 4229cea8ed..9da665a574 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -14,7 +14,7 @@ concurrency: jobs: release: name: Release - runs-on: ubuntu-latest-m + runs-on: ubuntu-latest timeout-minutes: 30 steps: - name: Checkout branch @@ -51,4 +51,4 @@ jobs: pnpm release:canary env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 17300882340caabce90a7c2ee5c9a923665374b1 Mon Sep 17 00:00:00 2001 From: Junior Garcia Date: Sun, 1 Dec 2024 11:38:41 -0300 Subject: [PATCH 13/15] chore: consolidated changeset --- .changeset/silly-mugs-marry.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.changeset/silly-mugs-marry.md b/.changeset/silly-mugs-marry.md index eae3323c0b..277bdf3cee 100644 --- a/.changeset/silly-mugs-marry.md +++ b/.changeset/silly-mugs-marry.md @@ -107,4 +107,5 @@ This release includes several improvements and bug fixes: - Fixed autocomplete clear button behavior - Updated Select label placement logic - Added missing framer-motion peer dependencies -- Removed layoutNode prop from Table due to react-aria update \ No newline at end of file +- Removed layoutNode prop from Table due to react-aria update +- Virtualization added to Autocomplete \ No newline at end of file From ffb1e554f7d6b5b1ede66d0838b3b1edeeccdf6b Mon Sep 17 00:00:00 2001 From: winches <329487092@qq.com> Date: Mon, 2 Dec 2024 03:45:47 +0800 Subject: [PATCH 14/15] fix: forwardRef render functions not using ref (#4198) * fix: forwardRef render functions not using ref * fix: changelog * fix: review * fix: forwardRef render functions not using ref * docs: update changeset --- .changeset/sharp-years-raise.md | 9 +++++++++ packages/components/dropdown/src/dropdown-trigger.tsx | 5 ++--- packages/components/listbox/src/listbox-item.tsx | 5 ++--- packages/components/menu/src/menu-item.tsx | 6 ++---- packages/components/modal/src/modal-content.tsx | 5 ++--- packages/components/popover/src/popover-content.tsx | 5 ++--- packages/components/popover/src/popover-trigger.tsx | 5 ++--- 7 files changed, 21 insertions(+), 19 deletions(-) create mode 100644 .changeset/sharp-years-raise.md diff --git a/.changeset/sharp-years-raise.md b/.changeset/sharp-years-raise.md new file mode 100644 index 0000000000..5db5d5e71c --- /dev/null +++ b/.changeset/sharp-years-raise.md @@ -0,0 +1,9 @@ +--- +"@nextui-org/dropdown": patch +"@nextui-org/listbox": patch +"@nextui-org/menu": patch +"@nextui-org/modal": patch +"@nextui-org/popover": patch +--- + +Fix forwardRef render functions not using ref diff --git a/packages/components/dropdown/src/dropdown-trigger.tsx b/packages/components/dropdown/src/dropdown-trigger.tsx index 5217e188d3..467270085f 100644 --- a/packages/components/dropdown/src/dropdown-trigger.tsx +++ b/packages/components/dropdown/src/dropdown-trigger.tsx @@ -1,4 +1,3 @@ -import {forwardRef} from "@nextui-org/system"; import {PopoverTrigger} from "@nextui-org/popover"; import {useDropdownContext} from "./dropdown-context"; @@ -11,13 +10,13 @@ export interface DropdownTriggerProps { * DropdownTrigger opens the popover's content. It must be an interactive element * such as `button` or `a`. */ -const DropdownTrigger = forwardRef<"button", DropdownTriggerProps>((props, _) => { +const DropdownTrigger = (props: DropdownTriggerProps) => { const {getMenuTriggerProps} = useDropdownContext(); const {children, ...otherProps} = props; return {children}; -}); +}; DropdownTrigger.displayName = "NextUI.DropdownTrigger"; diff --git a/packages/components/listbox/src/listbox-item.tsx b/packages/components/listbox/src/listbox-item.tsx index bf624a9e3b..8e9dc351e2 100644 --- a/packages/components/listbox/src/listbox-item.tsx +++ b/packages/components/listbox/src/listbox-item.tsx @@ -1,5 +1,4 @@ import {useMemo, ReactNode} from "react"; -import {forwardRef} from "@nextui-org/system"; import {UseListboxItemProps, useListboxItem} from "./use-listbox-item"; import {ListboxSelectedIcon} from "./listbox-selected-icon"; @@ -9,7 +8,7 @@ export interface ListboxItemProps extends UseListboxI /** * @internal */ -const ListboxItem = forwardRef<"li", ListboxItemProps>((props, _) => { +const ListboxItem = (props: ListboxItemProps) => { const { Component, FragmentWrapper, @@ -64,7 +63,7 @@ const ListboxItem = forwardRef<"li", ListboxItemProps>((props, _) => { ); -}); +}; ListboxItem.displayName = "NextUI.ListboxItem"; diff --git a/packages/components/menu/src/menu-item.tsx b/packages/components/menu/src/menu-item.tsx index ac05b98aa9..fa5a6f2c19 100644 --- a/packages/components/menu/src/menu-item.tsx +++ b/packages/components/menu/src/menu-item.tsx @@ -1,6 +1,4 @@ import {useMemo, ReactNode} from "react"; -import {forwardRef} from "@nextui-org/system"; -import * as React from "react"; import {UseMenuItemProps, useMenuItem} from "./use-menu-item"; import {MenuSelectedIcon} from "./menu-selected-icon"; @@ -10,7 +8,7 @@ export interface MenuItemProps extends UseMenuItemPro /** * @internal */ -const MenuItem = forwardRef<"li", MenuItemProps>((props, _) => { +const MenuItem = (props: MenuItemProps) => { const { Component, FragmentWrapper, @@ -69,7 +67,7 @@ const MenuItem = forwardRef<"li", MenuItemProps>((props, _) => { ); -}); +}; MenuItem.displayName = "NextUI.MenuItem"; diff --git a/packages/components/modal/src/modal-content.tsx b/packages/components/modal/src/modal-content.tsx index 9940e62d42..42239327fd 100644 --- a/packages/components/modal/src/modal-content.tsx +++ b/packages/components/modal/src/modal-content.tsx @@ -2,7 +2,6 @@ import type {AriaDialogProps} from "@react-aria/dialog"; import type {HTMLMotionProps} from "framer-motion"; import {cloneElement, isValidElement, ReactNode, useMemo, useCallback} from "react"; -import {forwardRef} from "@nextui-org/system"; import {DismissButton} from "@react-aria/overlays"; import {TRANSITION_VARIANTS} from "@nextui-org/framer-utils"; import {CloseIcon} from "@nextui-org/shared-icons"; @@ -23,7 +22,7 @@ export interface ModalContentProps extends AriaDialogProps, HTMLNextUIProps<"div const domAnimation = () => import("@nextui-org/dom-animation").then((res) => res.default); -const ModalContent = forwardRef<"div", ModalContentProps, KeysToOmit>((props, _) => { +const ModalContent = (props: ModalContentProps) => { const {as, children, role = "dialog", ...otherProps} = props; const { @@ -139,7 +138,7 @@ const ModalContent = forwardRef<"div", ModalContentProps, KeysToOmit>((props, _) {contents} ); -}); +}; ModalContent.displayName = "NextUI.ModalContent"; diff --git a/packages/components/popover/src/popover-content.tsx b/packages/components/popover/src/popover-content.tsx index 91a660e50b..7f36c6fb78 100644 --- a/packages/components/popover/src/popover-content.tsx +++ b/packages/components/popover/src/popover-content.tsx @@ -2,7 +2,6 @@ import type {AriaDialogProps} from "@react-aria/dialog"; import type {HTMLMotionProps} from "framer-motion"; import {DOMAttributes, ReactNode, useMemo, useRef} from "react"; -import {forwardRef} from "@nextui-org/system"; import {RemoveScroll} from "react-remove-scroll"; import {DismissButton} from "@react-aria/overlays"; import {TRANSITION_VARIANTS} from "@nextui-org/framer-utils"; @@ -21,7 +20,7 @@ export interface PopoverContentProps const domAnimation = () => import("@nextui-org/dom-animation").then((res) => res.default); -const PopoverContent = forwardRef<"div", PopoverContentProps>((props, _) => { +const PopoverContent = (props: PopoverContentProps) => { const {as, children, className, ...otherProps} = props; const { @@ -113,7 +112,7 @@ const PopoverContent = forwardRef<"div", PopoverContentProps>((props, _) => { {contents} ); -}); +}; PopoverContent.displayName = "NextUI.PopoverContent"; diff --git a/packages/components/popover/src/popover-trigger.tsx b/packages/components/popover/src/popover-trigger.tsx index 8c78d3de06..16c6fe0b43 100644 --- a/packages/components/popover/src/popover-trigger.tsx +++ b/packages/components/popover/src/popover-trigger.tsx @@ -1,5 +1,4 @@ import React, {Children, cloneElement, useMemo} from "react"; -import {forwardRef} from "@nextui-org/system"; import {pickChildren} from "@nextui-org/react-utils"; import {useAriaButton} from "@nextui-org/use-aria-button"; import {Button} from "@nextui-org/button"; @@ -15,7 +14,7 @@ export interface PopoverTriggerProps { * PopoverTrigger opens the popover's content. It must be an interactive element * such as `button` or `a`. */ -const PopoverTrigger = forwardRef<"button", PopoverTriggerProps>((props, _) => { +const PopoverTrigger = (props: PopoverTriggerProps) => { const {triggerRef, getTriggerProps} = usePopoverContext(); const {children, ...otherProps} = props; @@ -50,7 +49,7 @@ const PopoverTrigger = forwardRef<"button", PopoverTriggerProps>((props, _) => { child, mergeProps(restProps, hasNextUIButton ? {onPress, isDisabled} : buttonProps), ); -}); +}; PopoverTrigger.displayName = "NextUI.PopoverTrigger"; From 44958bf91a1677becd5e9f3c420b7956cf0244d8 Mon Sep 17 00:00:00 2001 From: Vincentius Roger Kuswara Date: Mon, 2 Dec 2024 04:19:22 +0800 Subject: [PATCH 15/15] feat(listbox): virtualization (#4206) * fix: should not export list item internal variables type * feat: changeset * fix: type error * fix: code block type error * feat: virtualization feature, docs for listbox * chore: update routes.json * fix: fix code-demo for typecheck * chore: rollback for files * chore: props omitted in the component itself * fix: menu item types * fix: tupecheck --------- Co-authored-by: winches <329487092@qq.com> Co-authored-by: Junior Garcia --- .changeset/dull-coats-crash.md | 9 ++ .changeset/ninety-mails-yell.md | 6 + .changeset/ten-experts-happen.md | 7 ++ .../components/code-demo/react-live-demo.tsx | 5 +- apps/docs/config/routes.json | 3 +- apps/docs/content/components/listbox/index.ts | 4 + .../virtualization-ten-thousand.raw.jsx | 57 ++++++++++ .../listbox/virtualization-ten-thousand.ts | 9 ++ .../components/listbox/virtualization.raw.jsx | 56 ++++++++++ .../components/listbox/virtualization.ts | 9 ++ apps/docs/content/docs/components/listbox.mdx | 28 +++++ .../dropdown/src/dropdown-trigger.tsx | 2 + .../listbox/src/base/listbox-item-base.tsx | 2 +- .../components/listbox/src/listbox-item.tsx | 3 +- .../listbox/src/use-listbox-item.ts | 4 +- .../listbox/stories/listbox.stories.tsx | 105 ++++++++++++++++++ .../menu/src/base/menu-item-base.tsx | 2 +- packages/components/menu/src/menu-item.tsx | 3 +- packages/components/menu/src/menu.tsx | 5 +- packages/components/menu/src/use-menu-item.ts | 4 +- .../popover/src/popover-trigger.tsx | 2 + pnpm-lock.yaml | 2 +- 22 files changed, 313 insertions(+), 14 deletions(-) create mode 100644 .changeset/dull-coats-crash.md create mode 100644 .changeset/ninety-mails-yell.md create mode 100644 .changeset/ten-experts-happen.md create mode 100644 apps/docs/content/components/listbox/virtualization-ten-thousand.raw.jsx create mode 100644 apps/docs/content/components/listbox/virtualization-ten-thousand.ts create mode 100644 apps/docs/content/components/listbox/virtualization.raw.jsx create mode 100644 apps/docs/content/components/listbox/virtualization.ts diff --git a/.changeset/dull-coats-crash.md b/.changeset/dull-coats-crash.md new file mode 100644 index 0000000000..ea1827a871 --- /dev/null +++ b/.changeset/dull-coats-crash.md @@ -0,0 +1,9 @@ +--- +"@nextui-org/dropdown": patch +"@nextui-org/listbox": patch +"@nextui-org/popover": patch +"@nextui-org/modal": patch +"@nextui-org/menu": patch +--- + +Fix typecheck diff --git a/.changeset/ninety-mails-yell.md b/.changeset/ninety-mails-yell.md new file mode 100644 index 0000000000..ab7d6e5c84 --- /dev/null +++ b/.changeset/ninety-mails-yell.md @@ -0,0 +1,6 @@ +--- +"@nextui-org/menu": patch +"@nextui-org/theme": patch +--- + +Fix should not export list item internal variables type diff --git a/.changeset/ten-experts-happen.md b/.changeset/ten-experts-happen.md new file mode 100644 index 0000000000..844749c01d --- /dev/null +++ b/.changeset/ten-experts-happen.md @@ -0,0 +1,7 @@ +--- +"@nextui-org/listbox": patch +"@nextui-org/menu": patch +"@nextui-org/theme": patch +--- + +Virtualization support added to Listbox and Menu diff --git a/apps/docs/components/docs/components/code-demo/react-live-demo.tsx b/apps/docs/components/docs/components/code-demo/react-live-demo.tsx index 48e74a5aaa..527728e6ef 100644 --- a/apps/docs/components/docs/components/code-demo/react-live-demo.tsx +++ b/apps/docs/components/docs/components/code-demo/react-live-demo.tsx @@ -5,6 +5,7 @@ import * as Components from "@nextui-org/react"; import * as intlDateUtils from "@internationalized/date"; import * as reactAriaI18n from "@react-aria/i18n"; import * as reactHookForm from "react-hook-form"; +import {SandpackFiles} from "@codesandbox/sandpack-react/types"; import {BgGridContainer} from "@/components/bg-grid-container"; import {GradientBox, GradientBoxProps} from "@/components/gradient-box"; @@ -12,7 +13,7 @@ import {CopyButton} from "@/components/copy-button"; export interface ReactLiveDemoProps { code: string; - files: string[]; + files: SandpackFiles; noInline?: boolean; height?: string | number; isCentered?: boolean; @@ -47,7 +48,7 @@ export const ReactLiveDemo: React.FC = ({
    )} diff --git a/apps/docs/config/routes.json b/apps/docs/config/routes.json index 5cc00218ca..4356cba05a 100644 --- a/apps/docs/config/routes.json +++ b/apps/docs/config/routes.json @@ -302,7 +302,8 @@ "key": "listbox", "title": "Listbox", "keywords": "listbox, selection, option list, multiple choice", - "path": "/docs/components/listbox.mdx" + "path": "/docs/components/listbox.mdx", + "updated": true }, { "key": "modal", diff --git a/apps/docs/content/components/listbox/index.ts b/apps/docs/content/components/listbox/index.ts index 35c8dcd9c4..2f83ec0bd9 100644 --- a/apps/docs/content/components/listbox/index.ts +++ b/apps/docs/content/components/listbox/index.ts @@ -9,6 +9,8 @@ import description from "./description"; import sections from "./sections"; import customStyles from "./custom-styles"; import topContent from "./top-content"; +import virtualization from "./virtualization"; +import virtualizationTenThousand from "./virtualization-ten-thousand"; export const listboxContent = { usage, @@ -22,4 +24,6 @@ export const listboxContent = { sections, customStyles, topContent, + virtualization, + virtualizationTenThousand, }; diff --git a/apps/docs/content/components/listbox/virtualization-ten-thousand.raw.jsx b/apps/docs/content/components/listbox/virtualization-ten-thousand.raw.jsx new file mode 100644 index 0000000000..f569bea6cc --- /dev/null +++ b/apps/docs/content/components/listbox/virtualization-ten-thousand.raw.jsx @@ -0,0 +1,57 @@ +import {Listbox, ListboxItem} from "@nextui-org/react"; + +const generateItems = (n) => { + const items = [ + "Cat", + "Dog", + "Elephant", + "Lion", + "Tiger", + "Giraffe", + "Dolphin", + "Penguin", + "Zebra", + "Shark", + "Whale", + "Otter", + "Crocodile", + ]; + + const dataset = []; + + for (let i = 0; i < n; i++) { + const item = items[i % items.length]; + + dataset.push({ + label: `${item}${i}`, + value: `${item.toLowerCase()}${i}`, + description: "Sample description", + }); + } + + return dataset; +}; + +export default function App() { + const items = generateItems(1000); + + return ( +
    + + {items.map((item, index) => ( + + {item.label} + + ))} + +
    + ); +} diff --git a/apps/docs/content/components/listbox/virtualization-ten-thousand.ts b/apps/docs/content/components/listbox/virtualization-ten-thousand.ts new file mode 100644 index 0000000000..1b8e486cb5 --- /dev/null +++ b/apps/docs/content/components/listbox/virtualization-ten-thousand.ts @@ -0,0 +1,9 @@ +import App from "./virtualization-ten-thousand.raw.jsx?raw"; + +const react = { + "/App.jsx": App, +}; + +export default { + ...react, +}; diff --git a/apps/docs/content/components/listbox/virtualization.raw.jsx b/apps/docs/content/components/listbox/virtualization.raw.jsx new file mode 100644 index 0000000000..96ec2011b8 --- /dev/null +++ b/apps/docs/content/components/listbox/virtualization.raw.jsx @@ -0,0 +1,56 @@ +import {Listbox, ListboxItem} from "@nextui-org/react"; +const generateItems = (n) => { + const items = [ + "Cat", + "Dog", + "Elephant", + "Lion", + "Tiger", + "Giraffe", + "Dolphin", + "Penguin", + "Zebra", + "Shark", + "Whale", + "Otter", + "Crocodile", + ]; + + const dataset = []; + + for (let i = 0; i < n; i++) { + const item = items[i % items.length]; + + dataset.push({ + label: `${item}${i}`, + value: `${item.toLowerCase()}${i}`, + description: "Sample description", + }); + } + + return dataset; +}; + +export default function App() { + const items = generateItems(1000); + + return ( +
    + + {items.map((item, index) => ( + + {item.label} + + ))} + +
    + ); +} diff --git a/apps/docs/content/components/listbox/virtualization.ts b/apps/docs/content/components/listbox/virtualization.ts new file mode 100644 index 0000000000..e40cbd641f --- /dev/null +++ b/apps/docs/content/components/listbox/virtualization.ts @@ -0,0 +1,9 @@ +import App from "./virtualization.raw.jsx?raw"; + +const react = { + "/App.jsx": App, +}; + +export default { + ...react, +}; diff --git a/apps/docs/content/docs/components/listbox.mdx b/apps/docs/content/docs/components/listbox.mdx index 2c8eb66fc1..52f9b92575 100644 --- a/apps/docs/content/docs/components/listbox.mdx +++ b/apps/docs/content/docs/components/listbox.mdx @@ -151,6 +151,22 @@ function App() { } ``` +### Virtualization + +Select supports virtualization, which allows efficient rendering of large lists by only rendering items that are visible in the viewport. You can enable virtualization by setting the `isVirtualized` prop to `true`. + + + +> **Note**: The virtualization strategy is based on the [@tanstack/react-virtual](https://tanstack.com/virtual/latest) package, which provides efficient rendering of large lists by only rendering items that are visible in the viewport. +#### Ten Thousand Items + +Here's an example of using virtualization with 10,000 items. + + + ## Slots Listbox has 3 components with slots the base one `Listbox`, `ListboxItem` and `ListboxSection` components. @@ -328,6 +344,18 @@ You can customize the `Listbox` items style by using the `itemClasses` prop and type: "boolean", description: "Whether keyboard navigation is circular.", default: "false" + }, + { + attribute: "isVirtualized", + type: "boolean", + description: "Whether to enable virtualization.", + default: "false" + }, + { + attribute: "virtualization", + type: "Record<\"maxListboxHeight\" & \"itemHeight\", number>", + description: "Configuration for virtualization, optimizing rendering for large datasets. Required if isVirtualized is set to true.", + default: "-", }, { attribute: "hideEmptyContent", diff --git a/packages/components/dropdown/src/dropdown-trigger.tsx b/packages/components/dropdown/src/dropdown-trigger.tsx index 467270085f..0157d2e25f 100644 --- a/packages/components/dropdown/src/dropdown-trigger.tsx +++ b/packages/components/dropdown/src/dropdown-trigger.tsx @@ -4,6 +4,8 @@ import {useDropdownContext} from "./dropdown-context"; export interface DropdownTriggerProps { children?: React.ReactNode; + className?: string; + [key: string]: any; } /** diff --git a/packages/components/listbox/src/base/listbox-item-base.tsx b/packages/components/listbox/src/base/listbox-item-base.tsx index 41af3b3e58..e5283f3ff1 100644 --- a/packages/components/listbox/src/base/listbox-item-base.tsx +++ b/packages/components/listbox/src/base/listbox-item-base.tsx @@ -90,7 +90,7 @@ interface Props extends Omit, "childre } export type ListboxItemBaseProps = Props & - ListboxItemVariantProps & + Omit & Omit & FocusableProps & PressEvents; diff --git a/packages/components/listbox/src/listbox-item.tsx b/packages/components/listbox/src/listbox-item.tsx index 8e9dc351e2..8a3f248de1 100644 --- a/packages/components/listbox/src/listbox-item.tsx +++ b/packages/components/listbox/src/listbox-item.tsx @@ -3,7 +3,8 @@ import {useMemo, ReactNode} from "react"; import {UseListboxItemProps, useListboxItem} from "./use-listbox-item"; import {ListboxSelectedIcon} from "./listbox-selected-icon"; -export interface ListboxItemProps extends UseListboxItemProps {} +export interface ListboxItemProps + extends Omit, "hasDescriptionTextChild" | "hasTitleTextChild"> {} /** * @internal diff --git a/packages/components/listbox/src/use-listbox-item.ts b/packages/components/listbox/src/use-listbox-item.ts index 43be909f3c..820b32637f 100644 --- a/packages/components/listbox/src/use-listbox-item.ts +++ b/packages/components/listbox/src/use-listbox-item.ts @@ -1,4 +1,5 @@ import type {ListboxItemBaseProps} from "./base/listbox-item-base"; +import type {MenuItemVariantProps} from "@nextui-org/theme"; import {useMemo, useRef, useCallback, Fragment} from "react"; import {listboxItem} from "@nextui-org/theme"; @@ -24,7 +25,8 @@ interface Props extends ListboxItemBaseProps { } export type UseListboxItemProps = Props & - Omit, keyof Props>; + Omit, keyof Props> & + MenuItemVariantProps; export function useListboxItem(originalProps: UseListboxItemProps) { const globalContext = useProviderContext(); diff --git a/packages/components/listbox/stories/listbox.stories.tsx b/packages/components/listbox/stories/listbox.stories.tsx index 9f24e947a6..c670e57621 100644 --- a/packages/components/listbox/stories/listbox.stories.tsx +++ b/packages/components/listbox/stories/listbox.stories.tsx @@ -679,6 +679,59 @@ const CustomWithClassNamesTemplate = ({color, variant, disableAnimation, ...args ); }; +interface LargeDatasetSchema { + label: string; + value: string; + description: string; +} + +function generateLargeDataset(n: number): LargeDatasetSchema[] { + const dataset: LargeDatasetSchema[] = []; + const items = [ + "Cat", + "Dog", + "Elephant", + "Lion", + "Tiger", + "Giraffe", + "Dolphin", + "Penguin", + "Zebra", + "Shark", + "Whale", + "Otter", + "Crocodile", + ]; + + for (let i = 0; i < n; i++) { + const item = items[i % items.length]; + + dataset.push({ + label: `${item}${i}`, + value: `${item.toLowerCase()}${i}`, + description: "Sample description", + }); + } + + return dataset; +} + +const LargeDatasetTemplate = (args: ListboxProps & {numItems: number}) => { + const largeDataset = generateLargeDataset(args.numItems); + + return ( +
    + + {largeDataset.map((item, index) => ( + + {item.label} + + ))} + +
    + ); +}; + export const Default = { render: Template, args: { @@ -782,3 +835,55 @@ export const CustomWithClassNames = { ...defaultProps, }, }; + +export const OneThousandList = { + render: LargeDatasetTemplate, + args: { + ...defaultProps, + numItems: 1000, + isVirtualized: true, + virtualization: { + maxListboxHeight: 400, + itemHeight: 20, + }, + }, +}; + +export const TenThousandList = { + render: LargeDatasetTemplate, + args: { + ...defaultProps, + numItems: 10000, + isVirtualized: true, + virtualization: { + maxListboxHeight: 400, + itemHeight: 20, + }, + }, +}; + +export const CustomMaxListboxHeight = { + render: LargeDatasetTemplate, + args: { + ...defaultProps, + numItems: 1000, + isVirtualized: true, + virtualization: { + maxListboxHeight: 600, + itemHeight: 20, + }, + }, +}; + +export const CustomItemHeight = { + render: LargeDatasetTemplate, + args: { + ...defaultProps, + numItems: 1000, + isVirtualized: true, + virtualization: { + itemHeight: 40, + maxListboxHeight: 600, + }, + }, +}; diff --git a/packages/components/menu/src/base/menu-item-base.tsx b/packages/components/menu/src/base/menu-item-base.tsx index e1228b0e09..693ab6d53f 100644 --- a/packages/components/menu/src/base/menu-item-base.tsx +++ b/packages/components/menu/src/base/menu-item-base.tsx @@ -89,7 +89,7 @@ interface Props extends Omit, "childre } export type MenuItemBaseProps = Props & - MenuItemVariantProps & + Omit & AriaMenuItemProps & FocusableProps & PressEvents; diff --git a/packages/components/menu/src/menu-item.tsx b/packages/components/menu/src/menu-item.tsx index fa5a6f2c19..5e22e495a3 100644 --- a/packages/components/menu/src/menu-item.tsx +++ b/packages/components/menu/src/menu-item.tsx @@ -3,7 +3,8 @@ import {useMemo, ReactNode} from "react"; import {UseMenuItemProps, useMenuItem} from "./use-menu-item"; import {MenuSelectedIcon} from "./menu-selected-icon"; -export interface MenuItemProps extends UseMenuItemProps {} +export interface MenuItemProps + extends Omit, "hasDescriptionTextChild" | "hasTitleTextChild"> {} /** * @internal diff --git a/packages/components/menu/src/menu.tsx b/packages/components/menu/src/menu.tsx index bff90fb8d1..3a74d2e23c 100644 --- a/packages/components/menu/src/menu.tsx +++ b/packages/components/menu/src/menu.tsx @@ -74,10 +74,7 @@ function Menu(props: Props, ref: ForwardedRef = Omit< - Props, - "hasChildItems" | "hasTitleTextChild" | "hasDescriptionTextChild" -> & {ref?: Ref}; +export type MenuProps = Props & {ref?: Ref}; // forwardRef doesn't support generic parameters, so cast the result to the correct type export default forwardRef(Menu) as (props: MenuProps) => ReactElement; diff --git a/packages/components/menu/src/use-menu-item.ts b/packages/components/menu/src/use-menu-item.ts index 9ed4e31253..a150e8def2 100644 --- a/packages/components/menu/src/use-menu-item.ts +++ b/packages/components/menu/src/use-menu-item.ts @@ -1,4 +1,5 @@ import type {MenuItemBaseProps} from "./base/menu-item-base"; +import type {MenuItemVariantProps} from "@nextui-org/theme"; import type {Node} from "@react-types/shared"; import {useMemo, useRef, useCallback, Fragment} from "react"; @@ -24,7 +25,8 @@ interface Props extends MenuItemBaseProps { } export type UseMenuItemProps = Props & - Omit, keyof Props>; + Omit, keyof Props> & + MenuItemVariantProps; export function useMenuItem(originalProps: UseMenuItemProps) { const globalContext = useProviderContext(); diff --git a/packages/components/popover/src/popover-trigger.tsx b/packages/components/popover/src/popover-trigger.tsx index 16c6fe0b43..2a19f0ebf3 100644 --- a/packages/components/popover/src/popover-trigger.tsx +++ b/packages/components/popover/src/popover-trigger.tsx @@ -8,6 +8,8 @@ import {usePopoverContext} from "./popover-context"; export interface PopoverTriggerProps { children?: React.ReactNode; + className?: string; + [key: string]: any; } /** diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c65136c311..781634e8c3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -22124,7 +22124,7 @@ snapshots: doctrine: 2.1.0 eslint: 7.32.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@4.9.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@2.7.1(eslint-plugin-import@2.31.0)(eslint@7.32.0))(eslint@7.32.0) + eslint-module-utils: 2.12.0(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@5.62.0(eslint@7.32.0)(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.31.0)(eslint@7.32.0))(eslint@7.32.0) hasown: 2.0.2 is-core-module: 2.15.1 is-glob: 4.0.3