Skip to content

Commit

Permalink
v2.6.13 (#4578)
Browse files Browse the repository at this point in the history
* docs: optimize route higtlight (#4520)

* docs: optimize home display (#4519)

* docs: optimize home display and route highlight

* docs: optimize home display

* fix(alert): propagate className (#4535)

* fix(alert): propagate className

* chore(alert): remove className from alert theme

* fix(avatar): title type in Avatar (#4529)

* fix(avatar): title type in Avatar

* fix(alert): apply isEmpty check on title

* fix(alert): alert interface props type

* refactor: remove unnecessary props types (#4530)

* refactor(docs): remove string type as it is included in ReactNode

* refactor: remove unnecessary types

* feat(changeset): add changeset

* chore: remove changeset

* refactor: remove null since ReactNode unions it already

* fix(input): use onPress for wrapper click focus (#4483)

* fix(input): use onPress for wrapper click focus

* test(input): wrapper click focus test

* chore(changeset): input onPress for wrapper click focus

* chore(changeset): minor wording

* Refactor/rebrand (#4532)

* chore: rebrand in progress

* chore: update docs to use heroui

* chore: components renbranded

* chore: figma moved to the docs files

* fix: posthog config

* fix(docs): extra classname in form example (#4465)

* chore: clean git

* chore: make heroui private

* chore: new logo

* chore: node env var renamed

* chore: public robots txt deleted

* chore: wrangler installed

* chore: wrangler renamed

* chore: cloudlfare workers removed

* chore: force vercel deploy

* refactor: first migration and provider

* refactor: rename nextui plugin

* refactor: rename github site

* refactor: rename CONTRIBUTING

* refactor: rename package name

* refactor: nextjs image hostname

* refactor: mdx repo nextui-org rename frontio-ai

* refactor: nextui.org rename heroui.com

* refactor: add heroui to missing places

* fix: heroui plugin name

* fix: update docs

* docs: nextui to heroui add npmrc pnpm migratation

* chore: rename all packages with new org name

* chore: replace frontio-ai by frontioai

* chore: revert previous changes

* chore: small adjustment

* chore: doc updated

* feat: blog

* chore: avatar updated

* fix: url

* chore: add new ogimage

* fix: ogimage command

* fix: heroui name and storybook welcome page

* fix: og image url

* feat: favicon and icon changed

---------

Co-authored-by: աӄա <wingkwong.code@gmail.com>
Co-authored-by: winches <329487092@qq.com>

* fix: postbuild script

* chore: core package updates

* ci(changesets): version packages (#4569)

Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>

* feat: contributors added to the blog

* Revert "fix(input): use onPress for wrapper click focus (#4483)" (#4576)

This reverts commit 992220a.

* fix: input spaces

* ci(changesets): version packages (#4577)

Co-authored-by: Junior Garcia <jrgarciadev@gmail.com>

---------

Co-authored-by: winches <329487092@qq.com>
Co-authored-by: աӄա <wingkwong.code@gmail.com>
Co-authored-by: Peterl561 <76144929+Peterl561@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
5 people authored Jan 17, 2025
1 parent 86d5d69 commit bdb22b3
Show file tree
Hide file tree
Showing 13 changed files with 706 additions and 261 deletions.
Binary file modified apps/docs/public/storybook-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions packages/components/autocomplete/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @heroui/autocomplete

## 2.3.10

### Patch Changes

- Updated dependencies [[`45b1d82`](https://github.com/frontio-ai/heroui/commit/45b1d82c391dac7f39609d492010164b6c2d6d38)]:
- @heroui/input@2.4.9
- @heroui/popover@2.3.9

## 2.3.9

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/components/autocomplete/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@heroui/autocomplete",
"version": "2.3.9",
"version": "2.3.10",
"description": "An autocomplete combines a text input with a listbox, allowing users to filter a list of options to items matching a query.",
"keywords": [
"autocomplete"
Expand Down
6 changes: 6 additions & 0 deletions packages/components/input/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @heroui/input

## 2.4.9

### Patch Changes

- [`45b1d82`](https://github.com/frontio-ai/heroui/commit/45b1d82c391dac7f39609d492010164b6c2d6d38) Thanks [@jrgarciadev](https://github.com/jrgarciadev)! - Fix input ignoring spaces

## 2.4.8

### Patch Changes
Expand Down
27 changes: 0 additions & 27 deletions packages/components/input/__tests__/input.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -224,33 +224,6 @@ describe("Input", () => {

expect(onClear).toHaveBeenCalledTimes(0);
});

it("should focus input on click", async () => {
const {getByTestId} = render(<Input data-testid="input" />);

const input = getByTestId("input") as HTMLInputElement;
const innerWrapper = document.querySelector("[data-slot='inner-wrapper']") as HTMLDivElement;
const inputWrapper = document.querySelector("[data-slot='input-wrapper']") as HTMLDivElement;

const user = userEvent.setup();

expect(document.activeElement).not.toBe(input);

await user.click(input);
expect(document.activeElement).toBe(input);
input.blur();
expect(document.activeElement).not.toBe(input);

await user.click(innerWrapper);
expect(document.activeElement).toBe(input);
input.blur();
expect(document.activeElement).not.toBe(input);

await user.click(inputWrapper);
expect(document.activeElement).toBe(input);
input.blur();
expect(document.activeElement).not.toBe(input);
});
});

describe("Input with React Hook Form", () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/components/input/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@heroui/input",
"version": "2.4.8",
"version": "2.4.9",
"description": "The input component is designed for capturing user input within a text field.",
"keywords": [
"input"
Expand Down
23 changes: 11 additions & 12 deletions packages/components/input/src/use-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,6 @@ export function useInput<T extends HTMLInputElement | HTMLTextAreaElement = HTML
domRef.current?.focus();
}, [setInputValue, onClear]);

const handleInputWrapperClick = useCallback(() => {
if (domRef.current) {
domRef.current?.focus();
}
}, [domRef.current]);

// if we use `react-hook-form`, it will set the input value using the ref in register
// i.e. setting ref.current.value to something which is uncontrolled
// hence, sync the state with `ref.current.value`
Expand Down Expand Up @@ -226,11 +220,6 @@ export function useInput<T extends HTMLInputElement | HTMLTextAreaElement = HTML
onPress: handleClear,
});

const {pressProps: inputWrapperPressProps} = usePress({
isDisabled: !!originalProps?.isDisabled || !!originalProps?.isReadOnly,
onPress: handleInputWrapperClick,
});

const isInvalid = validationState === "invalid" || isAriaInvalid;

const labelPlacement = useMemo<InputVariantProps["labelPlacement"]>(() => {
Expand Down Expand Up @@ -409,7 +398,12 @@ export function useInput<T extends HTMLInputElement | HTMLTextAreaElement = HTML
className: slots.inputWrapper({
class: clsx(classNames?.inputWrapper, isFilled ? "is-filled" : ""),
}),
...mergeProps(props, hoverProps, inputWrapperPressProps),
...mergeProps(props, hoverProps),
onClick: (e) => {
if (domRef.current && e.currentTarget === e.target) {
domRef.current.focus();
}
},
style: {
cursor: "text",
...props.style,
Expand All @@ -433,6 +427,11 @@ export function useInput<T extends HTMLInputElement | HTMLTextAreaElement = HTML
...props,
ref: innerWrapperRef,
"data-slot": "inner-wrapper",
onClick: (e) => {
if (domRef.current && e.currentTarget === e.target) {
domRef.current.focus();
}
},
className: slots.innerWrapper({
class: clsx(classNames?.innerWrapper, props?.className),
}),
Expand Down
15 changes: 15 additions & 0 deletions packages/core/react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# @heroui/react

## 2.6.13

### Patch Changes

- Updated dependencies [[`45b1d82`](https://github.com/frontio-ai/heroui/commit/45b1d82c391dac7f39609d492010164b6c2d6d38)]:
- @heroui/input@2.4.9
- @heroui/accordion@2.2.7
- @heroui/autocomplete@2.3.10
- @heroui/drawer@2.2.7
- @heroui/modal@2.2.7
- @heroui/navbar@2.2.8
- @heroui/popover@2.3.9
- @heroui/select@2.4.9
- @heroui/tabs@2.2.7

## 2.6.12

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/core/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@heroui/react",
"version": "2.6.12",
"version": "2.6.13",
"description": "🚀 Beautiful and modern React UI library.",
"author": "Junior Garcia <jrgarciadev@gmail.com>",
"homepage": "https://heroui.com",
Expand Down
26 changes: 13 additions & 13 deletions packages/storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,21 @@
"react-dom": "^18.0.0"
},
"devDependencies": {
"@storybook/addon-a11y": "^8.4.5",
"@storybook/addon-actions": "^8.4.5",
"@storybook/addon-docs": "^8.4.5",
"@storybook/addon-essentials": "^8.4.5",
"@storybook/addon-links": "^8.4.5",
"@storybook/cli": "^8.4.5",
"@storybook/manager-api": "^8.4.5",
"@storybook/preview-api": "^8.4.5",
"@storybook/react": "^8.4.5",
"@storybook/react-vite": "^8.4.5",
"@storybook/theming": "^8.4.5",
"@storybook/addon-a11y": "^8.5.0",
"@storybook/addon-actions": "^8.5.0",
"@storybook/addon-docs": "^8.5.0",
"@storybook/addon-essentials": "^8.5.0",
"@storybook/addon-links": "^8.5.0",
"@storybook/cli": "^8.5.0",
"@storybook/manager-api": "^8.5.0",
"@storybook/preview-api": "^8.5.0",
"@storybook/react": "^8.5.0",
"@storybook/react-vite": "^8.5.0",
"@storybook/theming": "^8.5.0",
"@vitejs/plugin-react": "^4.3.3",
"autoprefixer": "^10.4.13",
"remark-gfm": "^4.0.0",
"storybook": "^8.4.5",
"storybook": "^8.5.0",
"storybook-dark-mode": "^4.0.2",
"tailwindcss": "^3.3.5",
"vite": "^5.4.11"
Expand All @@ -65,4 +65,4 @@
"esm"
]
}
}
}
14 changes: 10 additions & 4 deletions packages/storybook/public/dark-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit bdb22b3

Please sign in to comment.