Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
e4ef75d
💄 UIやスタイルファイルの追加や更新
touyou Jul 28, 2025
43de86c
💡 docs: SelectコンポーネントのargTypesから説明を削除し、型定義を改善
touyou Jul 28, 2025
2c41191
📝 docs: Selectコンポーネントの概要を更新し、SelectTriggerの説明を追加
touyou Jul 28, 2025
4c41ae0
💄 UIやスタイルファイルの追加や更新
touyou Jul 28, 2025
0d2c5d5
💡 feat: Figmaとの接続を追加し、SelectTriggerコンポーネントのプロパティをマッピング
touyou Jul 28, 2025
a2aff8e
💄 UIやスタイルファイルの更新
touyou Jul 28, 2025
d87ecf3
💄 UIやスタイルファイルの更新
touyou Jul 28, 2025
91a9e84
🔧 コードの構造/フォーマットの改善
touyou Jul 28, 2025
b0c6d33
💄 UIやスタイルファイルの更新
touyou Jul 28, 2025
ee943fe
Apply suggestion from @Copilot
touyou Jul 28, 2025
8548d90
feat: add Tooltip component with TooltipProvider, TooltipTrigger, and…
touyou Jul 28, 2025
3c17e4f
Merge branch 'main' into fix/select
touyou Aug 25, 2025
b7308b9
Merge branch 'main' into fix/select
touyou Aug 27, 2025
893f144
💄 style: selectコンポーネントのスクロールボタンのスタイルを統一
touyou Aug 27, 2025
013b15a
📝 docs: Selectコンポーネントの概要と使用例を追加
touyou Aug 27, 2025
698e6d9
Merge branch 'main' into fix/select
touyou Sep 26, 2025
98dc4f4
Merge branch 'main' into fix/select
touyou Sep 26, 2025
64ba239
📝 ドキュメントの追加や更新: Selectコンポーネントの実装状況を更新
touyou Sep 26, 2025
bdc1eeb
✨ SelectItemコンポーネントにtextClassNameプロパティを追加
touyou Oct 1, 2025
9a7e3e0
💄 SelectItemコンポーネントのスタイルを修正
touyou Oct 1, 2025
6ea4e42
Merge branch 'main' into fix/select
touyou Oct 30, 2025
f471ca5
Merge branch 'main' into fix/select
touyou Dec 12, 2025
f21f0cb
fix: 修正された選択トリガーの無効状態の背景色を変更
touyou Dec 12, 2025
7914cda
fix: SelectTriggerの幅を変更し、ItemTextのクラス名を修正
touyou Dec 12, 2025
d575a6c
fix: SelectTriggerのホワイトスペースを修正し、aria-invalid属性を追加
touyou Dec 12, 2025
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ Sparkle Design のバッジは、コンポーネントが Sparkle Design を使

現在のコンポーネントの実装状況は以下の表を参照してください。

| コンポーネント | 実装 | Storybook | レジストリ | Figma Code Connect | A11y チェック |
| コンポーネント | 実装 | Storybook | レジストリ | Figma Code Connect | A11y チェック |
| ----------------- | ---- | --------- | ---------- | ------------------ | ------------- |
| Avatar | ❌ | ❌ | ❌ | ❌ | ❌ |
| Badge | ✅ | ✅ | ✅ | ✅ | ❌ |
Expand Down Expand Up @@ -248,7 +248,7 @@ Sparkle Design のバッジは、コンポーネントが Sparkle Design を使
| Popover | ❌ | ❌ | ❌ | ❌ | ❌ |
| Radio | ✅ | ✅ | ✅ | ✅ | ❌ |
| Segmented Control | ❌ | ❌ | ❌ | ❌ | ❌ |
| Select | ✅ | ✅ | ✅ | | ❌ |
| Select | ✅ | ✅ | ✅ | | ❌ |
| Side Navigation | ❌ | ❌ | ❌ | ❌ | ❌ |
| Skeleton | ✅ | ✅ | ✅ | ✅ | ❌ |
| Slider | ✅ | ✅ | ✅ | ✅ | ❌ |
Expand Down
57 changes: 57 additions & 0 deletions src/components/ui/select/index.figma.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import React from "react";
import figma from "@figma/code-connect";
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
} from "./index";

/**
* -- This file was auto-generated by Code Connect --
* `props` includes a mapping from your code props to Figma properties.
* You should check this is correct, and update the `example` function
* to return the code example you'd like to see in Figma
*/

figma.connect(
SelectTrigger,
"https://www.figma.com/design/7alBZXZf65YgcII41TWT0r/Sparkle-Design?node-id=139%3A22300",
{
props: {
// These props were automatically mapped based on your linked code:
size: figma.enum("size", {
sm: "sm",
md: "md",
lg: "lg",
}),
isInvalid: figma.enum("isInvalid", {
false: false,
true: true,
}),
disabled: figma.enum("state", {
disabled: true,
}),
// No matching props could be found for these Figma properties:
// "isFocused": figma.boolean('isFocused'),
value: figma.string("value"),
},
example: props => (
<Select>
<SelectTrigger
size={props.size}
isInvalid={props.isInvalid}
disabled={props.disabled}
>
<SelectValue placeholder={props.value} />
</SelectTrigger>
<SelectContent>
<SelectItem value="option1">Option 1</SelectItem>
<SelectItem value="option2">Option 2</SelectItem>
<SelectItem value="option3">Option 3</SelectItem>
</SelectContent>
</Select>
),
}
);
71 changes: 45 additions & 26 deletions src/components/ui/select/index.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,49 +1,62 @@
import type { Meta, StoryObj } from "@storybook/react";
import {
Select,
SelectContent,
SelectGroup,
SelectItem,
SelectLabel,
SelectTrigger,
SelectValue,
SelectTrigger,
SelectContent,
SelectLabel,
SelectItem,
SelectSeparator,
SelectScrollUpButton,
SelectScrollDownButton,
SelectTriggerProps,
} from "./index";

const meta = {
title: "Form/Select",
component: SelectTrigger,
component: Select,
subcomponents: {
SelectGroup,
SelectValue,
SelectTrigger,
SelectContent,
SelectLabel,
SelectItem,
SelectSeparator,
SelectScrollUpButton,
SelectScrollDownButton,
},
parameters: {
layout: "centered",
},
tags: ["autodocs"],
argTypes: {
disabled: {
control: "boolean",
description: "セレクトを無効化します",
defaultValue: false,
},
size: {
control: { type: "radio" },
options: ["sm", "md", "lg"],
description: "セレクトのサイズを指定します",
defaultValue: "md",
},
isInvalid: {
control: "boolean",
description: "エラー状態を指定します",
defaultValue: false,
},
},
} satisfies Meta<typeof SelectTrigger>;
argTypes: {},
} satisfies Meta<typeof Select>;

export default meta;
type Story = StoryObj<typeof SelectTrigger>;
type Story = StoryObj<SelectTriggerProps>;
const argTypes: Story["argTypes"] = {
disabled: {
control: "boolean",
defaultValue: false,
},
size: {
control: { type: "radio" },
options: ["sm", "md", "lg"],
defaultValue: "md",
},
isInvalid: {
control: "boolean",
defaultValue: false,
},
};

export const Default: Story = {
argTypes: argTypes,
render: args => (
<Select>
<SelectTrigger className="w-[280px]" {...args}>
<SelectTrigger className="w-[480px]" {...args}>
<SelectValue placeholder="Select a timezone" />
</SelectTrigger>
<SelectContent>
Expand Down Expand Up @@ -111,6 +124,7 @@ export const Small: Story = {
args: {
size: "sm",
},
argTypes: argTypes,
render: args => (
<Select>
<SelectTrigger className="w-[240px]" {...args}>
Expand All @@ -129,6 +143,7 @@ export const Medium: Story = {
args: {
size: "md",
},
argTypes: argTypes,
render: args => (
<Select>
<SelectTrigger className="w-[240px]" {...args}>
Expand All @@ -147,6 +162,7 @@ export const Large: Story = {
args: {
size: "lg",
},
argTypes: argTypes,
render: args => (
<Select>
<SelectTrigger className="w-[240px]" {...args}>
Expand All @@ -162,6 +178,7 @@ export const Large: Story = {
};

export const Invalid: Story = {
argTypes: argTypes,
render: args => (
<Select>
<SelectTrigger className="w-[240px]" isInvalid {...args}>
Expand All @@ -177,6 +194,7 @@ export const Invalid: Story = {
};

export const Disabled: Story = {
argTypes: argTypes,
render: args => (
<Select>
<SelectTrigger className="w-[240px]" disabled {...args}>
Expand All @@ -192,6 +210,7 @@ export const Disabled: Story = {
};

export const DisabledWithInvalidState: Story = {
argTypes: argTypes,
render: args => (
<Select>
<SelectTrigger className="w-[240px]" disabled isInvalid {...args}>
Expand Down
Loading