From 6e7ec53daa33f8217208d49d56445eada6b6f481 Mon Sep 17 00:00:00 2001 From: SHIMADA Takayuki Date: Fri, 22 Aug 2025 10:06:36 +0900 Subject: [PATCH 1/5] =?UTF-8?q?fix(form-control-label):=20SupportText?= =?UTF-8?q?=E3=81=AE=E6=96=87=E5=AD=97=E8=89=B2=E3=81=AFGray=20600?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/SupportText/SupportText.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/SupportText/SupportText.tsx b/src/components/SupportText/SupportText.tsx index 1242c35..65f5c23 100644 --- a/src/components/SupportText/SupportText.tsx +++ b/src/components/SupportText/SupportText.tsx @@ -6,7 +6,7 @@ export const SupportText = (props: SupportTextProps) => { const { children, className, ...rest } = props; return ( -

+

{children}

); From 2833e81bcc336a7864eb0d00dc6c1c254b5fbc6b Mon Sep 17 00:00:00 2001 From: SHIMADA Takayuki Date: Fri, 22 Aug 2025 10:07:12 +0900 Subject: [PATCH 2/5] =?UTF-8?q?feat(textarea):=20Textarea=E3=82=92Readonly?= =?UTF-8?q?=E3=82=B9=E3=83=86=E3=83=BC=E3=83=88=E3=81=AB=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Textarea/Textarea.stories.tsx | 229 ++++++++++--------- src/components/Textarea/Textarea.tsx | 9 +- 2 files changed, 128 insertions(+), 110 deletions(-) diff --git a/src/components/Textarea/Textarea.stories.tsx b/src/components/Textarea/Textarea.stories.tsx index 80e85bb..3d100c3 100644 --- a/src/components/Textarea/Textarea.stories.tsx +++ b/src/components/Textarea/Textarea.stories.tsx @@ -1,6 +1,6 @@ import type { Meta, StoryObj } from '@storybook/react-vite'; import React from 'react'; -import { ErrorText, Label, RequirementBadge, SupportText } from '../'; +import { ErrorText, Label, RequirementBadge, StatusBadge, SupportText } from '../'; import { Textarea } from './Textarea'; const meta = { @@ -17,159 +17,176 @@ const meta = { type: { summary: 'boolean' }, }, }, - 'aria-disabled': { - description: - '無効化する必要がある場合は `disabled` 属性ではなく `aria-disabled` 属性を使用します。', - control: { type: 'boolean' }, - table: { - defaultValue: { summary: 'false' }, - type: { summary: 'boolean' }, - }, - }, }, } satisfies Meta; export default meta; type Story = StoryObj; -export type TextareaCounterProps = { - count: number; - maxCount: number; - className?: string; - id?: string; -}; - export const Playground: Story = { - decorators: [ - (Story, context) => ( + render: (args) => { + const { isError } = args; + + const formId = React.useId(); + const supportTextId = React.useId(); + const errorTextId = React.useId(); + + const describedBy = isError ? `${errorTextId} ${supportTextId}` : supportTextId; + + return (
-