Merge branch 'main' of github.com:heroui-inc/heroui into canary

This commit is contained in:
Junior Garcia 2025-07-22 14:46:25 -03:00
commit a3245cefa0
6 changed files with 23 additions and 18 deletions

View File

@ -197,7 +197,7 @@ and add the following code to your main css file:
@plugin './hero.ts'; @plugin './hero.ts';
/* Note: You may need to change the path to fit your project structure */ /* Note: You may need to change the path to fit your project structure */
@source '../../node_modules/@heroui/theme/dist/**/*.{js,ts,jsx,tsx}'; @source '../../node_modules/@heroui/theme/dist/**/*.{js,ts,jsx,tsx}';
@custom-variant dark (&:is(.dark *)) @custom-variant dark (&:is(.dark *));
``` ```
### Setup Provider ### Setup Provider
@ -437,7 +437,7 @@ and add the following code to your main css file:
@plugin './hero.ts'; @plugin './hero.ts';
/* Note: You may need to change the path to fit your project structure */ /* Note: You may need to change the path to fit your project structure */
@source '../../node_modules/@heroui/theme/dist/**/*.{js,ts,jsx,tsx}'; @source '../../node_modules/@heroui/theme/dist/**/*.{js,ts,jsx,tsx}';
@custom-variant dark (&:is(.dark *)) @custom-variant dark (&:is(.dark *));
``` ```
### Setup Provider ### Setup Provider

View File

@ -170,7 +170,7 @@ and add the following code to your main css file:
@plugin './hero.ts'; @plugin './hero.ts';
/* Note: You may need to change the path to fit your project structure */ /* Note: You may need to change the path to fit your project structure */
@source '../../node_modules/@heroui/theme/dist/**/*.{js,ts,jsx,tsx}'; @source '../../node_modules/@heroui/theme/dist/**/*.{js,ts,jsx,tsx}';
@custom-variant dark (&:is(.dark *)) @custom-variant dark (&:is(.dark *));
``` ```
### Provider Setup ### Provider Setup

View File

@ -184,7 +184,7 @@ and add the following code to your main css file:
@plugin './hero.ts'; @plugin './hero.ts';
/* Note: You may need to change the path to fit your project structure */ /* Note: You may need to change the path to fit your project structure */
@source '../../node_modules/@heroui/theme/dist/**/*.{js,ts,jsx,tsx}'; @source '../../node_modules/@heroui/theme/dist/**/*.{js,ts,jsx,tsx}';
@custom-variant dark (&:is(.dark *)) @custom-variant dark (&:is(.dark *));
``` ```
### Provider Setup ### Provider Setup

View File

@ -174,11 +174,11 @@ export default heroui();
and add the following code to your main css file: and add the following code to your main css file:
```css ```css
@import "tailwindcss"; @import "tailwindcss";
@plugin './hero.ts'; @plugin './hero.ts';
// Note: You may need to change the path to fit your project structure /* Note: You may need to change the path to fit your project structure */
@source '../../node_modules/@heroui/theme/dist/**/*.{js,ts,jsx,tsx}'; @source '../../node_modules/@heroui/theme/dist/**/*.{js,ts,jsx,tsx}';
@custom-variant dark (&:is(.dark *)) @custom-variant dark (&:is(.dark *));
``` ```
#### Provider Setup #### Provider Setup

View File

@ -34,25 +34,27 @@ TailwindCSS v4 is now available since 2.8.0! This guide will help you migrate yo
Since Tailwind v4 favors a CSS-first approach, `tailwind.config.js` will not be required. Since Tailwind v4 favors a CSS-first approach, `tailwind.config.js` will not be required.
Create `hero.ts` file Create `hero.ts` file to export `heroui` plugin.
```tsx ```tsx
// hero.ts // hero.ts
import { heroui } from "@heroui/react"; import { heroui } from "@heroui/react";
// or import from theme package if you are using individual packages.
// import { heroui } from "@heroui/theme";
export default heroui(); export default heroui();
``` ```
Update your main css file Update your main css file as below
```diff-js ```diff-css
// your main css file /* your main css file */
- @tailwind base; - @tailwind base;
- @tailwind components; - @tailwind components;
- @tailwind utilities; - @tailwind utilities;
+ @import "tailwindcss"; + @import "tailwindcss";
+ @plugin './hero.ts'; + @plugin './hero.ts';
// Note: You may need to change the path to fit your project structure /* Note: You may need to change the path to fit your project structure */
+ @source '../../node_modules/@heroui/theme/dist/**/*.{js,ts,jsx,tsx}'; + @source '../../node_modules/@heroui/theme/dist/**/*.{js,ts,jsx,tsx}';
+ @custom-variant dark (&:is(.dark *)); + @custom-variant dark (&:is(.dark *));
``` ```
@ -61,19 +63,22 @@ Update your main css file
In Tailwind v4, `tailwind.config.js` is still supported for backward compatibility. If you still need to use it, you can load it explicity as below. In Tailwind v4, `tailwind.config.js` is still supported for backward compatibility. If you still need to use it, you can load it explicity as below.
```diff-js ```diff-css
// your main css file /* your main css file */
- @tailwind base; - @tailwind base;
- @tailwind components; - @tailwind components;
- @tailwind utilities; - @tailwind utilities;
+ @import "tailwindcss"; + @import "tailwindcss";
// Note: You may need to change the path to fit your project structure /* Note: You may need to change the path to fit your project structure */
+ @config "../../tailwind.config.js"; + @config "../../tailwind.config.js";
``` ```
### Update PostCSS Configuration ### Update PostCSS Configuration
- `tailwindcss` was a PostCSS plugin in v3 and now it is in `@tailwindcss/postcss` package.
- `autoprefixer` is no longer required as prefixing is handled automatically.
```diff-js ```diff-js
// postcss.config.js // postcss.config.js
- export default { - export default {

View File

@ -108,7 +108,7 @@ module.exports = {
}, },
"h2 small": { "h2 small": {
fontSize: 'var(--text-lg);', fontSize: 'var(--text-lg);',
lineHeight: 'var(--text-lg--line-height););', lineHeight: 'var(--text-lg--line-height);',
}, },
"h3 small": { "h3 small": {
fontSize: 'var(--text-base); ', fontSize: 'var(--text-base); ',