diff --git a/README.md b/README.md index ef62e2a..5fd9edb 100644 --- a/README.md +++ b/README.md @@ -43,10 +43,11 @@ To prevent TailwindCSS from purging your styles, add the following line to your ```ts import type { Config } from "tailwindcss"; +import daisyui from "daisyui"; const config: Config = { content: ["node_modules/rsc-daisyui/dist/**/*.js"], - plugins: [require("daisyui")], + plugins: [daisyui], }; export default config; ``` diff --git a/apps/web/next-env.d.ts b/apps/web/next-env.d.ts index 4f11a03..1b3be08 100644 --- a/apps/web/next-env.d.ts +++ b/apps/web/next-env.d.ts @@ -2,4 +2,4 @@ /// // NOTE: This file should not be edited -// see https://nextjs.org/docs/basic-features/typescript for more information. +// see https://nextjs.org/docs/app/api-reference/config/typescript for more information. diff --git a/apps/web/package.json b/apps/web/package.json index 4449ad4..5cc030b 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -3,31 +3,37 @@ "version": "1.0.0", "private": true, "scripts": { - "dev": "next dev", + "dev": "next dev --turbopack", "build": "next build", "start": "next start", "lint": "next lint" }, "dependencies": { - "next": "^14.0.4", - "react": "^18.2.0", - "react-dom": "^18.2.0", + "next": "15.1.3", + "react": "19.0.0", + "react-dom": "19.0.0", "react-github-btn": "^1.4.0", - "rsc-daisyui": "^1.0.3" + "rsc-daisyui": "^1.0.4" }, "devDependencies": { - "@next/eslint-plugin-next": "^13.5.6", - "@tailwindcss/typography": "^0.5.10", - "@types/node": "^18.19.3", - "@types/react": "^18.2.45", - "@types/react-dom": "^18.2.18", - "autoprefixer": "^10.4.16", - "daisyui": "^4.4.23", + "@next/eslint-plugin-next": "15.1.3", + "@tailwindcss/typography": "^0.5.15", + "@types/node": "^18.19.68", + "@types/react": "19.0.2", + "@types/react-dom": "19.0.2", + "autoprefixer": "^10.4.20", + "daisyui": "^4.12.23", "eslint-config-custom": "workspace:*", - "postcss": "^8.4.32", + "postcss": "^8.4.49", "tailwind-config": "workspace:*", - "tailwindcss": "^3.4.0", + "tailwindcss": "^3.4.17", "tsconfig": "workspace:*", - "typescript": "^5.3.3" + "typescript": "^5.7.2" + }, + "pnpm": { + "overrides": { + "@types/react": "19.0.2", + "@types/react-dom": "19.0.2" + } } } diff --git a/apps/web/src/app/dialog.tsx b/apps/web/src/app/dialog.tsx index 2b05463..1a1e250 100644 --- a/apps/web/src/app/dialog.tsx +++ b/apps/web/src/app/dialog.tsx @@ -1,5 +1,5 @@ "use client"; -import { useRef, useCallback } from "react"; +import { useRef, useCallback, type JSX } from "react"; import { Button, Modal } from "rsc-daisyui"; export function Dialog(): JSX.Element { @@ -15,9 +15,9 @@ export function Dialog(): JSX.Element { -

+

Press ESC key or click the button below to close -

+
diff --git a/apps/web/src/app/info.tsx b/apps/web/src/app/info.tsx index e5c5394..4774c0f 100644 --- a/apps/web/src/app/info.tsx +++ b/apps/web/src/app/info.tsx @@ -1,6 +1,8 @@ -"use client"; +"use client";; import GitHubButton from "react-github-btn"; +import type { JSX } from "react"; + export function Info(): JSX.Element { return (
diff --git a/apps/web/src/app/layout.tsx b/apps/web/src/app/layout.tsx index 377bed2..11ada54 100644 --- a/apps/web/src/app/layout.tsx +++ b/apps/web/src/app/layout.tsx @@ -2,6 +2,8 @@ import "./globals.css"; import type { Metadata } from "next"; import { Inter } from "next/font/google"; +import type { JSX } from "react"; + const inter = Inter({ subsets: ["latin"] }); export const metadata: Metadata = { diff --git a/apps/web/src/app/page.tsx b/apps/web/src/app/page.tsx index d44aee9..d4b5476 100644 --- a/apps/web/src/app/page.tsx +++ b/apps/web/src/app/page.tsx @@ -15,6 +15,8 @@ import { import { Dialog } from "./dialog"; import { Info } from "./info"; +import type { JSX } from "react"; + export default function Page(): JSX.Element { return (
@@ -66,10 +68,10 @@ export default function Page(): JSX.Element { DaisyUI Card -

+

Rerum reiciendis beatae tenetur excepturi aut pariatur est eos. Sit sit necessitatibus. -

+
diff --git a/package.json b/package.json index 1ccfe31..30d2b36 100644 --- a/package.json +++ b/package.json @@ -11,12 +11,12 @@ "build-storybook": "cd packages/rsc-daisyui && pnpm build-storybook" }, "devDependencies": { - "@changesets/cli": "^2.27.1", - "eslint": "^8.56.0", - "prettier": "^3.1.1", - "prettier-plugin-tailwindcss": "^0.5.9", + "@changesets/cli": "^2.27.11", + "eslint": "^8.57.1", + "prettier": "^3.4.2", + "prettier-plugin-tailwindcss": "^0.5.14", "tsconfig": "workspace:*", - "turbo": "^2.0.14" + "turbo": "^2.3.3" }, "packageManager": "pnpm@9.2.0", "name": "rsc-daisyui" diff --git a/packages/eslint-config-custom/package.json b/packages/eslint-config-custom/package.json index 3f9f453..ef7d1cc 100644 --- a/packages/eslint-config-custom/package.json +++ b/packages/eslint-config-custom/package.json @@ -4,7 +4,7 @@ "version": "0.0.0", "private": true, "devDependencies": { - "@vercel/style-guide": "^5.0.0", - "eslint-config-turbo": "^1.10.12" + "@vercel/style-guide": "^5.2.0", + "eslint-config-turbo": "^1.13.4" } } diff --git a/packages/eslint-config-custom/react.js b/packages/eslint-config-custom/react.js index 2888eb8..db45aef 100644 --- a/packages/eslint-config-custom/react.js +++ b/packages/eslint-config-custom/react.js @@ -41,5 +41,6 @@ module.exports = { "react-hooks/rules-of-hooks": "off", "@typescript-eslint/consistent-type-definitions": "off", "react/no-array-index-key": "off", + "@typescript-eslint/explicit-function-return-type": "off", }, }; diff --git a/packages/rsc-daisyui/package.json b/packages/rsc-daisyui/package.json index c56fead..833c873 100644 --- a/packages/rsc-daisyui/package.json +++ b/packages/rsc-daisyui/package.json @@ -1,7 +1,7 @@ { "name": "rsc-daisyui", "main": "./dist/index.js", - "version": "1.0.3", + "version": "1.0.4", "description": "daisyUI for React Server Component", "homepage": "https://yoshi6jp.github.io/rsc-daisyui/", "keywords": [ @@ -44,40 +44,41 @@ "build-storybook": "storybook build" }, "peerDependencies": { - "react": "^18.2.0" + "react": ">=16.8.0" }, "devDependencies": { - "@changesets/cli": "^2.27.7", - "@chromatic-com/storybook": "^1", - "@storybook/addon-essentials": "^8.2.9", - "@storybook/addon-interactions": "^8.2.9", - "@storybook/addon-links": "^8.2.9", - "@storybook/addon-onboarding": "^8.2.9", - "@storybook/addon-storysource": "^8.2.9", - "@storybook/blocks": "^8.2.9", - "@storybook/react": "^8.2.9", - "@storybook/react-vite": "^8.2.9", - "@storybook/test": "^8.2.9", - "@tailwindcss/typography": "^0.5.14", + "@changesets/cli": "^2.27.11", + "@chromatic-com/storybook": "^1.9.0", + "@storybook/addon-essentials": "^8.4.7", + "@storybook/addon-interactions": "^8.4.7", + "@storybook/addon-links": "^8.4.7", + "@storybook/addon-onboarding": "^8.4.7", + "@storybook/addon-storysource": "^8.4.7", + "@storybook/blocks": "^8.4.7", + "@storybook/react": "^8.4.7", + "@storybook/react-vite": "^8.4.7", + "@storybook/test": "^8.4.7", + "@tailwindcss/typography": "^0.5.15", "@tw-classed/core": "^1.7.0", - "@types/react": "^18.3.3", + "@types/react": "^19.0.2", "autoprefixer": "^10.4.20", - "daisyui": "^4.12.10", + "daisyui": "^4.12.23", + "eslint": "^8.57.1", "eslint-config-custom": "workspace:*", - "eslint-plugin-storybook": "^0.8.0", - "postcss": "^8.4.41", - "react": "^18.3.1", - "react-dom": "^18.3.1", + "eslint-plugin-storybook": "^0.11.1", + "postcss": "^8.4.49", + "react": "^19.0.0", + "react-dom": "^19.0.0", "react-github-btn": "^1.4.0", - "storybook": "^8.2.9", + "storybook": "^8.4.7", "tailwind-config": "workspace:*", - "tailwindcss": "^3.4.10", + "tailwindcss": "^3.4.17", "tsconfig": "workspace:*", - "tsup": "^8.2.4", - "typescript": "^5.5.4" + "tsup": "^8.3.5", + "typescript": "^5.7.2" }, "dependencies": { - "@tw-classed/react": "^1.7.0", - "tailwind-merge": "^2.5.2" + "@tw-classed/react": "^1.8.0", + "tailwind-merge": "^2.6.0" } } diff --git a/packages/rsc-daisyui/src/countdown/countdown-item.tsx b/packages/rsc-daisyui/src/countdown/countdown-item.tsx index cc7513a..5a7c9f6 100644 --- a/packages/rsc-daisyui/src/countdown/countdown-item.tsx +++ b/packages/rsc-daisyui/src/countdown/countdown-item.tsx @@ -14,7 +14,7 @@ export const CountdownItem = deriveClassed< >(({ value, ...rest }, ref) => { const countdownValue = Math.min(99, Math.max(0, value)); const countdownStyle: Record = { - ["--value"]: countdownValue, + "--value": countdownValue, }; return ; }); diff --git a/packages/rsc-daisyui/src/radial-progress/radial-progress.tsx b/packages/rsc-daisyui/src/radial-progress/radial-progress.tsx index 037a0b0..51cc377 100644 --- a/packages/rsc-daisyui/src/radial-progress/radial-progress.tsx +++ b/packages/rsc-daisyui/src/radial-progress/radial-progress.tsx @@ -19,9 +19,9 @@ export const RadialProgress = deriveClassed< RadialProgressProps >(({ children, value, size, thickness, ...rest }, ref) => { const radialProgressStyle: Record = { - ["--value"]: Math.min(100, Math.max(0, value || 0)), - ["--size"]: size, - ["--thickness"]: thickness, + "--value": Math.min(100, Math.max(0, value || 0)), + "--size": size, + "--thickness": thickness, }; return ( [key, itemToArgTypes(item)] as const ); - const propsArgs = Object.entries(props || {}).map(([key, type]) => { - return [key, propToArgTypes(type)] as const; - }); + const propsArgs = Array.from(Object.entries(props || {})).flatMap( + ([key, type]) => { + return type ? [[key, propToArgTypes(type)] as const] : []; + } + ); const args = [...configArgs, ...propsArgs]; return Object.fromEntries(args); } diff --git a/packages/rsc-daisyui/src/storybook-helpers/preview-layout.tsx b/packages/rsc-daisyui/src/storybook-helpers/preview-layout.tsx index 2482991..68d94d7 100644 --- a/packages/rsc-daisyui/src/storybook-helpers/preview-layout.tsx +++ b/packages/rsc-daisyui/src/storybook-helpers/preview-layout.tsx @@ -1,4 +1,4 @@ -import type { ReactNode } from "react"; +import type { ReactNode, JSX } from "react"; export function PreviewLayout({ children, diff --git a/packages/rsc-daisyui/src/textarea/textarea.stories.tsx b/packages/rsc-daisyui/src/textarea/textarea.stories.tsx index 0775542..b3e414f 100644 --- a/packages/rsc-daisyui/src/textarea/textarea.stories.tsx +++ b/packages/rsc-daisyui/src/textarea/textarea.stories.tsx @@ -46,7 +46,7 @@ export const FormControlAndLabels: Story = { }, render: (args) => { return ( - +