Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/brave-laws-enjoy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@heroui/number-input": patch
---

allow inheriting labelPlacement from HeroUIProvider (#5845)
6 changes: 6 additions & 0 deletions .changeset/famous-panthers-rush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@heroui/tabs": patch
"@heroui/theme": patch
---

fix tab cursor (#5790, #5809)
5 changes: 5 additions & 0 deletions .changeset/four-candles-applaud.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@heroui/autocomplete": patch
---

fix close button display in autocomplete on mobile (#5826)
6 changes: 6 additions & 0 deletions .changeset/large-wasps-decide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@heroui/spinner": patch
"@heroui/theme": patch
---

Fix spinner animation (#5794)
5 changes: 5 additions & 0 deletions .changeset/odd-jobs-vanish.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@heroui/ripple": patch
---

fix resolve misalignment in RTL layouts by using transform translate (#5858)
8 changes: 8 additions & 0 deletions .changeset/popular-fishes-camp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@heroui/button": patch
"@heroui/select": patch
"@heroui/input": patch
"@heroui/theme": patch
---

Fix bordered focus styles overridden by hover styles (#5585)
14 changes: 4 additions & 10 deletions apps/docs/components/docs/components/codeblock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,16 +124,10 @@ const CodeBlockHighlight = ({
preRef.current = element;
}
}}
className={clsx(
className,
classNameProp,
`language-${codeLang}`,
"max-w-full contents",
{
"flex-col": isMultiLine,
"overflow-x-scroll scrollbar-hide": hideScrollBar,
},
)}
className={clsx(className, classNameProp, `language-${codeLang}`, "max-w-full", {
"flex-col": isMultiLine,
"overflow-x-scroll scrollbar-hide": hideScrollBar,
})}
data-language={language}
style={style}
>
Expand Down
3 changes: 2 additions & 1 deletion apps/docs/components/docs/toc.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,10 @@ export const DocsToc: FC<DocsTocProps> = ({headings}) => {
<li
key={i}
className={clsx(
"relative",
"transition-colors",
"font-normal",
"flex items-center text-tiny font-normal text-default-500 dark:text-default-300",
"flex items-center text-tiny font-normal text-default-500",
"data-[active=true]:text-foreground",
"dark:data-[active=true]:text-foreground",
"before:content-['']",
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/components/themes/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const initialLightTheme: ConfigColors = {
foreground: colors.black,
background: colors.white,
focus: colors.blue[500],
overlay: colors.black,
overlay: colors.white,
},
contentColor: {
content1: colors.white,
Expand All @@ -64,7 +64,7 @@ export const initialDarkTheme: ConfigColors = {
foreground: colors.white,
background: colors.black,
focus: colors.blue[500],
overlay: colors.white,
overlay: colors.black,
},
contentColor: {
content1: colors.zinc[900],
Expand Down
8 changes: 3 additions & 5 deletions apps/docs/components/themes/templates/coffee.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import type {Config} from "../types";

import {colors} from "@heroui/theme";

import {initialLayout} from "../constants";
import {initialDarkTheme, initialLayout, initialLightTheme} from "../constants";

export const coffee: Config = {
name: "coffee",
Expand All @@ -20,7 +18,7 @@ export const coffee: Config = {
layoutColor: {
foreground: "#a27225",
background: "#fffbf6",
overlay: colors.black,
overlay: initialLightTheme.layoutColor.overlay,
focus: "#db924b",
},
contentColor: {
Expand All @@ -45,7 +43,7 @@ export const coffee: Config = {
foreground: "#c59f60",
background: "#20161F",
focus: "#db924b",
overlay: colors.white,
overlay: initialDarkTheme.layoutColor.overlay,
},
contentColor: {
content1: "#2c1f2b",
Expand Down
8 changes: 3 additions & 5 deletions apps/docs/components/themes/templates/elegant.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import type {Config} from "../types";

import {colors} from "@heroui/theme";

import {initialLayout} from "../constants";
import {initialDarkTheme, initialLayout, initialLightTheme} from "../constants";

export const elegant: Config = {
name: "elegant",
Expand All @@ -20,7 +18,7 @@ export const elegant: Config = {
layoutColor: {
foreground: "#4a4a4a",
background: "#ffffff",
overlay: colors.black,
overlay: initialLightTheme.layoutColor.overlay,
focus: "#db924b",
},
contentColor: {
Expand All @@ -44,7 +42,7 @@ export const elegant: Config = {
layoutColor: {
foreground: "#b0b0b0",
background: "#000000",
overlay: colors.white,
overlay: initialDarkTheme.layoutColor.overlay,
focus: "#000000",
},
contentColor: {
Expand Down
8 changes: 3 additions & 5 deletions apps/docs/components/themes/templates/modern.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import type {Config} from "../types";

import {colors} from "@heroui/theme";

import {initialLayout} from "../constants";
import {initialDarkTheme, initialLayout, initialLightTheme} from "../constants";

export const modern: Config = {
name: "modern",
Expand All @@ -20,7 +18,7 @@ export const modern: Config = {
layoutColor: {
foreground: "#4a3d77",
background: "#f9f7fd",
overlay: colors.black,
overlay: initialLightTheme.layoutColor.overlay,
focus: "#7828c8",
},
contentColor: {
Expand All @@ -44,7 +42,7 @@ export const modern: Config = {
layoutColor: {
foreground: "#d0aaff",
background: "#1b1526",
overlay: colors.white,
overlay: initialDarkTheme.layoutColor.overlay,
focus: "#9353d3",
},
contentColor: {
Expand Down
8 changes: 3 additions & 5 deletions apps/docs/components/themes/templates/retro.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import type {Config} from "../types";

import {colors} from "@heroui/theme";

import {initialLayout} from "../constants";
import {initialDarkTheme, initialLayout, initialLightTheme} from "../constants";

export const retro: Config = {
name: "retro",
Expand All @@ -20,7 +18,7 @@ export const retro: Config = {
layoutColor: {
foreground: "#5A4A42",
background: "#F4E8D1",
overlay: colors.black,
overlay: initialLightTheme.layoutColor.overlay,
focus: "#FFD34E",
},
contentColor: {
Expand All @@ -44,7 +42,7 @@ export const retro: Config = {
layoutColor: {
foreground: "#000000",
background: "#E1CA9E",
overlay: colors.white,
overlay: initialDarkTheme.layoutColor.overlay,
focus: "#FFD34E",
},
contentColor: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Table, TableBody, TableCell, TableColumn, TableHeader, TableRow} from "@nextui-org/react";
import {Table, TableBody, TableCell, TableColumn, TableHeader, TableRow} from "@heroui/react";

function generateRows(count) {
return Array.from({length: count}, (_, index) => ({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Table, TableBody, TableCell, TableColumn, TableHeader, TableRow} from "@nextui-org/react";
import {Table, TableBody, TableCell, TableColumn, TableHeader, TableRow} from "@heroui/react";

function generateRows(count) {
return Array.from({length: count}, (_, index) => ({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Table, TableBody, TableCell, TableColumn, TableHeader, TableRow} from "@nextui-org/react";
import {Table, TableBody, TableCell, TableColumn, TableHeader, TableRow} from "@heroui/react";

function generateRows(count) {
return Array.from({length: count}, (_, index) => ({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Table, TableBody, TableCell, TableColumn, TableHeader, TableRow} from "@nextui-org/react";
import {Table, TableBody, TableCell, TableColumn, TableHeader, TableRow} from "@heroui/react";

function generateRows(count) {
return Array.from({length: count}, (_, index) => ({
Expand Down
6 changes: 4 additions & 2 deletions packages/components/autocomplete/src/use-autocomplete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,11 @@ export function useAutocomplete<T extends object>(originalProps: UseAutocomplete
const isClearable =
originalProps.disableClearable !== undefined
? !originalProps.disableClearable
: originalProps.isReadOnly
: originalProps.isDisabled
? false
: originalProps.isClearable;
: originalProps.isReadOnly
? false
: originalProps.isClearable;

const {
ref,
Expand Down
2 changes: 1 addition & 1 deletion packages/components/input/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"peerDependencies": {
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0",
"@heroui/theme": ">=2.4.19",
"@heroui/theme": ">=2.4.23",
"@heroui/system": ">=2.4.18"
},
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {render, fireEvent, act} from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import {useForm} from "react-hook-form";
import {Form} from "@heroui/form";
import {HeroUIProvider} from "@heroui/system";

import {NumberInput} from "../src";

Expand Down Expand Up @@ -680,4 +681,32 @@ describe("NumberInput with React Hook Form", () => {
});
});
});

describe("NumberInput with HeroUIProvider context", () => {
it("should inherit labelPlacement from HeroUIProvider", () => {
const {container} = render(
<HeroUIProvider labelPlacement="outside">
<NumberInput label="Test number input" />
</HeroUIProvider>,
);

const label = container.querySelector("label");

expect(label).toBeTruthy();
expect(label?.className).toMatch(/translate-y.*100%/);
});

it("should prioritize labelPlacement prop over HeroUIProvider context", () => {
const {container} = render(
<HeroUIProvider labelPlacement="outside">
<NumberInput label="Test number input" labelPlacement="inside" />
</HeroUIProvider>,
);

const label = container.querySelector("label");

expect(label).toBeTruthy();
expect(label?.className).not.toMatch(/translate-y.*100%/);
});
});
});
2 changes: 1 addition & 1 deletion packages/components/number-input/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0",
"@heroui/system": ">=2.4.18",
"@heroui/theme": ">=2.4.19"
"@heroui/theme": ">=2.4.23"
},
"dependencies": {
"@heroui/form": "workspace:*",
Expand Down
10 changes: 9 additions & 1 deletion packages/components/number-input/src/use-number-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,18 @@ export function useNumberInput(originalProps: UseNumberInputProps) {
numberInput({
...variantProps,
isInvalid,
labelPlacement,
isClearable,
disableAnimation,
}),
[objectToDeps(variantProps), isInvalid, isClearable, hasStartContent, disableAnimation],
[
objectToDeps(variantProps),
isInvalid,
labelPlacement,
isClearable,
hasStartContent,
disableAnimation,
],
);

const handleKeyDown = useCallback(
Expand Down
12 changes: 8 additions & 4 deletions packages/components/ripple/src/ripple.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,16 @@ const Ripple: FC<RippleProps> = (props) => {
<LazyMotion key={ripple.key} features={domAnimation}>
<AnimatePresence mode="popLayout">
<m.span
animate={{transform: "scale(2)", opacity: 0}}
animate={{
transform: `translate(${ripple.x}px, ${ripple.y}px) scale(2)`,
opacity: 0,
}}
className="heroui-ripple"
exit={{opacity: 0}}
initial={{transform: "scale(0)", opacity: 0.35}}
initial={{
transform: `translate(${ripple.x}px, ${ripple.y}px) scale(0)`,
opacity: 0.35,
}}
style={{
position: "absolute",
backgroundColor: color,
Expand All @@ -41,8 +47,6 @@ const Ripple: FC<RippleProps> = (props) => {
overflow: "hidden",
inset: 0,
zIndex: 0,
top: ripple.y,
left: ripple.x,
width: `${ripple.size}px`,
height: `${ripple.size}px`,
...style,
Expand Down
2 changes: 1 addition & 1 deletion packages/components/select/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
},
"peerDependencies": {
"@heroui/system": ">=2.4.18",
"@heroui/theme": ">=2.4.17",
"@heroui/theme": ">=2.4.23",
"framer-motion": ">=11.5.6 || >=12.0.0-alpha.1",
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/components/spinner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"peerDependencies": {
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0",
"@heroui/theme": ">=2.4.17"
"@heroui/theme": ">=2.4.23"
},
"dependencies": {
"@heroui/system-rsc": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/components/tabs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0",
"framer-motion": ">=11.5.6 || >=12.0.0-alpha.1",
"@heroui/theme": ">=2.4.22",
"@heroui/theme": ">=2.4.23",
"@heroui/system": ">=2.4.18"
},
"dependencies": {
Expand Down
Loading