mirror of
https://github.com/nextui-org/nextui.git
synced 2025-12-08 19:26:11 +00:00
Merge pull request #5922 from heroui-inc/fix/v3-input-disabled-style
fix(style): disabled styles of input and textarea
This commit is contained in:
commit
7777f27206
@ -11,6 +11,16 @@ icon: clock-arrow-rotate-left
|
||||
|
||||
## Latest Release
|
||||
|
||||
### v3.0.0-beta.3
|
||||
|
||||
**November 23, 2025**
|
||||
|
||||
Minor bug fixes and improvements.
|
||||
|
||||
[Read full release notes →](/docs/changelog/v3-0-0-beta-3)
|
||||
|
||||
---
|
||||
|
||||
### v3.0.0-beta.2
|
||||
|
||||
**November 20, 2025**
|
||||
|
||||
@ -2,5 +2,5 @@
|
||||
"title": "Changelog",
|
||||
"description": "HeroUI v3 Release Notes",
|
||||
"root": false,
|
||||
"pages": ["changelog", "v3-0-0-beta-2"]
|
||||
"pages": ["changelog", "v3-0-0-beta-3"]
|
||||
}
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
---
|
||||
title: v3.0.0-beta.1
|
||||
description: Major redesign with new design system, 8 new components, and improved developer experience.
|
||||
github:
|
||||
pull: 5872
|
||||
---
|
||||
|
||||
<div className="flex items-center gap-3 mb-6">
|
||||
@ -590,7 +592,7 @@ You can override any auto-calculated values using Tailwind's `@theme` directive:
|
||||
@theme inline {
|
||||
/* Adjust surface levels */
|
||||
--color-surface-secondary: color-mix(in oklab, var(--surface) 96%, var(--surface-foreground) 4%);
|
||||
|
||||
|
||||
/* Adjust soft colors */
|
||||
--color-accent-soft: color-mix(in oklab, var(--color-accent) 20%, transparent);
|
||||
}
|
||||
@ -864,3 +866,4 @@ See what the community is saying: [HeroUI Native Reception](https://x.com/hero_u
|
||||
|
||||
Thanks to everyone who contributed to this release, helping us create a design system that's both beautiful and practical!
|
||||
|
||||
<PRContributors />
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
---
|
||||
title: v3.0.0-beta.2
|
||||
description: Six new components (AlertDialog, ComboBox, Dropdown, InputGroup, Modal, NumberField), Select API improvements, and component refinements.
|
||||
github:
|
||||
pull: 5885
|
||||
---
|
||||
|
||||
<div className="flex items-center gap-3 mb-6">
|
||||
@ -303,3 +305,4 @@ If you have custom themes that override the divider variable, update them:
|
||||
|
||||
Thanks to everyone who contributed to this release!
|
||||
|
||||
<PRContributors />
|
||||
|
||||
56
apps/docs/content/docs/changelog/v3-0-0-beta-3.mdx
Normal file
56
apps/docs/content/docs/changelog/v3-0-0-beta-3.mdx
Normal file
@ -0,0 +1,56 @@
|
||||
---
|
||||
title: v3.0.0-beta.3
|
||||
description: Bug fixes and improvements.
|
||||
---
|
||||
|
||||
<div className="flex items-center gap-3 mb-6">
|
||||
<span className="text-sm text-muted">November 23, 2025</span>
|
||||
</div>
|
||||
|
||||
Minor bug fixes and improvements.
|
||||
|
||||
## Installation
|
||||
|
||||
Update to the latest version:
|
||||
|
||||
<Tabs items={["npm", "pnpm", "yarn", "bun"]}>
|
||||
<Tab value="npm">
|
||||
```bash
|
||||
npm i @heroui/styles@beta @heroui/react@beta
|
||||
```
|
||||
</Tab>
|
||||
<Tab value="pnpm">
|
||||
```bash
|
||||
pnpm add @heroui/styles@beta @heroui/react@beta
|
||||
```
|
||||
</Tab>
|
||||
<Tab value="yarn">
|
||||
```bash
|
||||
yarn add @heroui/styles@beta @heroui/react@beta
|
||||
```
|
||||
</Tab>
|
||||
<Tab value="bun">
|
||||
```bash
|
||||
bun add @heroui/styles@beta @heroui/react@beta
|
||||
```
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
-
|
||||
|
||||
## Style Fixes
|
||||
|
||||
- Fixed disabled state styling for [Input](/docs/components/input) and [TextArea](/docs/components/textarea) components
|
||||
|
||||
|
||||
## Links
|
||||
|
||||
- [Component Documentation](https://v3.heroui.com/docs/components)
|
||||
- [Design System - Figma Kit V3 (updated)](https://www.figma.com/community/file/1546526812159103429/heroui-figma-kit-v3)
|
||||
- [GitHub Repository](https://github.com/heroui-inc/heroui)
|
||||
|
||||
## Contributors
|
||||
|
||||
Thanks to everyone who contributed to this release!
|
||||
@ -42,6 +42,11 @@ const config: NextConfig = {
|
||||
pathname: "/**",
|
||||
protocol: "https",
|
||||
},
|
||||
{
|
||||
hostname: "avatars.githubusercontent.com",
|
||||
pathname: "/**",
|
||||
protocol: "https",
|
||||
},
|
||||
],
|
||||
},
|
||||
logging: {
|
||||
|
||||
@ -8,11 +8,12 @@ import {notFound} from "next/navigation";
|
||||
import {LLMCopyButton, ViewOptions} from "@/components/ai/page-actions";
|
||||
import {ComponentLinks} from "@/components/component-links";
|
||||
import {NewsletterForm} from "@/components/newsletter-form";
|
||||
import {PRContributors} from "@/components/pr-contributors";
|
||||
import StatusChip from "@/components/status-chip";
|
||||
import {source} from "@/lib/source";
|
||||
import {getMDXComponents} from "@/mdx-components";
|
||||
import {DOCS_CONTENT_PATH} from "@/utils/constants";
|
||||
import {extractLinksFromMDX} from "@/utils/extract-links";
|
||||
import {extractGithubFromMDX, extractLinksFromMDX} from "@/utils/extract-links";
|
||||
// import { getGithubLastEdit } from "fumadocs-core/server";
|
||||
|
||||
const componentStatusIcons = ["preview", "new", "updated"];
|
||||
@ -36,6 +37,9 @@ export default async function Page(props: {params: Promise<{slug?: string[]}>})
|
||||
// Extract links from MDX content
|
||||
const links = extractLinksFromMDX(page.data.content);
|
||||
|
||||
// Extract GitHub info from MDX content
|
||||
const githubInfo = extractGithubFromMDX(page.data.content);
|
||||
|
||||
return (
|
||||
<DocsPage
|
||||
full={page.data.full}
|
||||
@ -71,6 +75,8 @@ export default async function Page(props: {params: Promise<{slug?: string[]}>})
|
||||
<DocsBody className="prose-sm">
|
||||
<MDXContent
|
||||
components={getMDXComponents({
|
||||
PRContributors: () => <PRContributors github={githubInfo} />,
|
||||
|
||||
// this allows you to link to other pages with relative file paths
|
||||
a: createRelativeLink(source, page),
|
||||
})}
|
||||
|
||||
70
apps/docs/src/components/pr-contributors.tsx
Normal file
70
apps/docs/src/components/pr-contributors.tsx
Normal file
@ -0,0 +1,70 @@
|
||||
import {Avatar, Link} from "@heroui/react";
|
||||
import * as React from "react";
|
||||
|
||||
import {siteConfig} from "@/config/site";
|
||||
import {GITHUB_API_URL} from "@/utils/constants";
|
||||
|
||||
interface GitHubUser {
|
||||
login: string;
|
||||
avatar_url: string;
|
||||
html_url: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches all unique contributors from a GitHub Pull Request
|
||||
*/
|
||||
async function fetchPRContributors(prNumber: number): Promise<GitHubUser[]> {
|
||||
try {
|
||||
const url = `${GITHUB_API_URL}/repos/${siteConfig.githubRepo}/pulls/${prNumber}/commits`;
|
||||
const response = await fetch(url, {cache: "force-cache"});
|
||||
|
||||
if (!response.ok) return [];
|
||||
|
||||
const commits: Array<{author: GitHubUser | null}> = await response.json();
|
||||
|
||||
// Deduplicate contributors by login
|
||||
const uniqueContributors = commits.reduce((acc, commit) => {
|
||||
const author = commit.author;
|
||||
|
||||
if (author?.login && !acc.has(author.login)) {
|
||||
acc.set(author.login, author);
|
||||
}
|
||||
|
||||
return acc;
|
||||
}, new Map<string, GitHubUser>());
|
||||
|
||||
return Array.from(uniqueContributors.values());
|
||||
} catch (error) {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
export async function PRContributors(props: any) {
|
||||
if (!props.github?.pull) return null;
|
||||
|
||||
const contributors = await fetchPRContributors(props.github.pull);
|
||||
|
||||
if (contributors.length === 0) return null;
|
||||
|
||||
return (
|
||||
<div className="!mt-0 mb-2 flex flex-wrap gap-4">
|
||||
{contributors.map((contributor) => (
|
||||
<Link.Root
|
||||
key={contributor.login}
|
||||
className="group flex items-center justify-start gap-1 !no-underline hover:!no-underline"
|
||||
href={contributor.html_url}
|
||||
rel="noreferrer"
|
||||
target="_blank"
|
||||
underline="none"
|
||||
>
|
||||
<Avatar.Root size="sm">
|
||||
<Avatar.Image alt={contributor.login} className="!m-0" src={contributor.avatar_url} />
|
||||
<Avatar.Fallback>{contributor.login[0]?.toUpperCase()}</Avatar.Fallback>
|
||||
<span className="sr-only">{contributor.login}</span>
|
||||
</Avatar.Root>
|
||||
<span className="text-sm">@{contributor.login}</span>
|
||||
</Link.Root>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@ -15,6 +15,10 @@ export interface ComponentLinksType {
|
||||
[key: string]: string | boolean | undefined;
|
||||
}
|
||||
|
||||
export interface GithubInfoType {
|
||||
pull?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts the links field from MDX frontmatter
|
||||
* @param content - The raw MDX content string
|
||||
@ -36,6 +40,27 @@ export function extractLinksFromMDX(content: string): ComponentLinksType | null
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts the github field from MDX frontmatter
|
||||
* @param content - The raw MDX content string
|
||||
* @returns The parsed github object or null if not found
|
||||
*/
|
||||
export function extractGithubFromMDX(content: string): GithubInfoType | null {
|
||||
try {
|
||||
const {data} = matter(content);
|
||||
|
||||
if (data["github"] && typeof data["github"] === "object") {
|
||||
return data["github"] as GithubInfoType;
|
||||
}
|
||||
|
||||
return null;
|
||||
} catch (error) {
|
||||
console.error("Error extracting github info from MDX:", error);
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a Storybook title to a URL path segment
|
||||
* Handles both grouped titles (e.g., "Components/Buttons/Button") and simple titles
|
||||
|
||||
@ -33,6 +33,12 @@
|
||||
@apply status-invalid-field;
|
||||
background-color: var(--color-field-focus);
|
||||
}
|
||||
|
||||
/* Disabled state */
|
||||
&[data-disabled],
|
||||
&[aria-disabled] {
|
||||
@apply status-disabled pointer-events-none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Variant modifiers */
|
||||
|
||||
@ -35,6 +35,12 @@
|
||||
@apply status-invalid-field;
|
||||
background-color: var(--color-field-focus);
|
||||
}
|
||||
|
||||
/* Disabled state */
|
||||
&[data-disabled],
|
||||
&[aria-disabled] {
|
||||
@apply status-disabled pointer-events-none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Variant modifiers */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user