@noemaru1011/ui 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,23 @@
1
+ ## ライセンス・免責事項
2
+
3
+ 本プロジェクトは、[shadcn/ui](https://ui.shadcn.com/) をベースにカスタマイズ・拡張したUIコンポーネントライブラリです。
4
+
5
+ - 本プロジェクトは現状有姿(AS IS)で提供されます。
6
+ - 動作や品質、特定の目的への適合性について、明示的・黙示的を問わず保証しません。
7
+ - 本プロジェクトの利用によって発生した損害や不具合について、作者は責任を負いません。
8
+ - 利用者自身の責任においてご利用ください。
9
+ - shadcn/uiおよびその他の依存ライブラリについては、それぞれのライセンス条件に従ってください。
10
+
11
+ 本プロジェクトに含まれる第三者の著作物には、それぞれのライセンスが適用されます。
12
+
13
+ ### License and Disclaimer
14
+
15
+ This project is a UI component library customized and extended based on [shadcn/ui](https://ui.shadcn.com/).
16
+
17
+ - This project is provided "AS IS", without any warranties or guarantees.
18
+ - The author makes no express or implied warranties regarding its functionality, quality, or fitness for a particular purpose.
19
+ - The author shall not be held liable for any damages, issues, or losses arising from the use of this project.
20
+ - Users are responsible for using this project at their own risk.
21
+ - shadcn/ui and other third-party dependencies are subject to their respective license terms.
22
+
23
+ Third-party components and materials included in this project remain subject to their respective licenses.
package/README.md CHANGED
@@ -1,16 +1,15 @@
1
- <div align="center">
1
+ <div align="center">
2
2
 
3
3
  <img src="my-icon.jpg" alt="UI Catalog" width="180" />
4
4
 
5
5
  # UI Catalog
6
6
 
7
- ## 概要
7
+ React と TypeScript で構築した、個人開発の UI コンポーネントカタログです。
8
8
 
9
- このプロジェクトは、React と TypeScript で構築した、個人開発の UI コンポーネントカタログです。
10
9
  Storybook を活用し、コンポーネントの表示・動作・バリエーションを一元管理します。
11
10
 
12
11
  [**カタログを確認する**](https://noemaru1011.github.io/my-ui-catalog/)
13
- <!-- Tech Stack -->
12
+
14
13
  <p align="center">
15
14
  <img src="https://img.shields.io/badge/React-61DAFB?style=for-the-badge&logo=react&logoColor=black" />
16
15
  <img src="https://img.shields.io/badge/TypeScript-3178C6?style=for-the-badge&logo=typescript&logoColor=white" />
@@ -22,6 +21,7 @@ Storybook を活用し、コンポーネントの表示・動作・バリエー
22
21
  <img src="https://img.shields.io/badge/react--i18next-26A69A?style=for-the-badge&logo=react&logoColor=white" />
23
22
  <img src="https://img.shields.io/badge/i18next--cli-26A69A?style=for-the-badge&logo=i18next&logoColor=white" />
24
23
  </p>
24
+
25
25
  <p align="center">
26
26
  <img src="https://img.shields.io/badge/React_Hook_Form-EC5990?style=for-the-badge&logo=reacthookform&logoColor=white" />
27
27
  <img src="https://img.shields.io/badge/Zod-3E67B1?style=for-the-badge&logo=zod&logoColor=white" />
@@ -36,7 +36,7 @@ Storybook を活用し、コンポーネントの表示・動作・バリエー
36
36
 
37
37
  </div>
38
38
 
39
- ### 技術スタック
39
+ ## 技術スタック
40
40
 
41
41
  | カテゴリー | 技術名 |
42
42
  | -------------------- | ----------------------------------- |
@@ -54,204 +54,149 @@ Storybook を活用し、コンポーネントの表示・動作・バリエー
54
54
  | CI/CD | GitHub Actions |
55
55
  | Deployment | GitHub Pages |
56
56
 
57
- ## インストール及びスタート方法
57
+ ## 主な機能
58
58
 
59
- ### 1. 環境準備
59
+ ### Elements
60
60
 
61
- | Tool | Version |
62
- | ---------- | ----------- |
63
- | Node.js | `>=24.22.2` |
64
- | npm | Required |
65
- | Git | Required |
66
- | GitHub CLI | Required |
61
+ アプリケーションの UI を構成する、再利用可能なコンポーネントを提供します。
67
62
 
68
- Node.js のバージョンは `.nvmrc` と `package.json` の `engines` で管理しています。
63
+ ### Layouts
69
64
 
70
- ### 2. Repositoryをクローン
65
+ コンテンツの配置やレイアウトを制御するコンポーネントを提供します。
71
66
 
72
- ```bash
73
- git clone https://github.com/noemaru1011/my-ui-catalog.git
67
+ - `AppLayout`:アプリケーション全体の基本レイアウトを提供する
68
+ - `Center`:子要素を中央に配置する
69
+ - `Cluster`:子要素を横方向にまとめて配置する
70
+ - `Container`:コンテンツの最大幅などを制御する
71
+ - `Grid`:子要素をグリッド形式で配置する
72
+ - `Reel`:子要素を横方向に並べ、横スクロール可能にする
73
+ - `Stack`:子要素を縦方向に積み重ねて配置する
74
+ - `Error`:404・403・500 などのエラー画面を提供する
74
75
 
75
- cd my-ui-catalog
76
- ```
76
+ ### UI Primitives
77
77
 
78
- ### 3. Node.jsの環境構築
78
+ shadcn/ui をベースとした、ボタン・入力欄・ラベル・ポップオーバーなどの基本的な UI コンポーネントを提供します。
79
79
 
80
- nvm を使用している場合、プロジェクトで指定された Node.js のバージョンを適用します。
81
-
82
- ```bash
83
- nvm use
84
- ```
80
+ ## 使い方
85
81
 
86
- ### 4. 依存関係のインストール
82
+ ### 1. インストール
87
83
 
88
84
  ```bash
89
- npm ci
85
+ npm install @noemaru1011/ui
90
86
  ```
91
87
 
92
- インストール時には `prepare` スクリプトによって、Git フックの参照先が `.github/hooks` に設定されます。
93
-
94
- ### 5. Storybookの起動
95
-
96
- ```bash
97
- npm run storybook
88
+ ### 2. i18nextの初期化
89
+
90
+ i18nextとreact-i18nextを利用する場合は、アプリケーションでi18nextを初期化します。
91
+
92
+ ```tsx
93
+ // i18n.ts
94
+ import i18n from 'i18next';
95
+ import { initReactI18next } from 'react-i18next';
96
+
97
+ i18n.use(initReactI18next).init({
98
+ lng: 'ja',
99
+ fallbackLng: 'ja',
100
+ resources: {
101
+ ja: {
102
+ translation: {},
103
+ },
104
+ en: {
105
+ translation: {},
106
+ },
107
+ },
108
+ interpolation: {
109
+ escapeValue: false,
110
+ },
111
+ });
112
+
113
+ export default i18n;
98
114
  ```
99
115
 
100
- ブラウザで以下にアクセスします。
101
-
102
- <http://localhost:6006>
116
+ ### 3. CSSの読み込み
103
117
 
104
- ### 6. Storybookのビルド
118
+ アプリケーションのエントリーポイントでCSSを読み込みます。
105
119
 
106
- ```bash
107
- npm run build-storybook
120
+ ```tsx
121
+ import '@noemaru1011/ui/style.css';
108
122
  ```
109
123
 
110
- ビルド成果物は `storybook-static/` に出力されます。
111
-
112
- ## 使い方
113
-
114
- ### 1. プロジェクトを実行するコマンド
115
-
116
- ```bash
117
- # Biome による Lint
118
- npm run lint
119
-
120
- # Biome によるフォーマット
121
- npm run format
122
-
123
- # Biome によるチェック
124
- npm run check
125
-
126
- # Biome によるチェックと自動修正
127
- npm run check:fix
128
-
129
- # Vitest の Watch モードでテストを実行
130
- npm run test
131
-
132
- # 全 Vitest プロジェクトのテストを一括実行
133
- npm run test:run
134
-
135
- # コンポーネントテストを実行
136
- npm run test:components
137
-
138
- # Storybook の Story テストを実行
139
- npm run test:storybook
124
+ ### 4. Providerの設定
140
125
 
141
- # カバレッジ付きでテストを実行
142
- npm run test:coverage
126
+ `ThemeProvider`、`TooltipProvider`、`Toaster` をアプリケーションのルートに設定します。
143
127
 
144
- # Playwright E2E テストを実行
145
- npm run test:e2e
128
+ ```tsx
129
+ import { ThemeProvider, primitives } from '@noemaru1011/ui';
146
130
 
147
- # 日本語・英語の翻訳キーが揃っているか確認
148
- npm run i18n:check
131
+ const { Toaster, TooltipProvider } = primitives;
149
132
 
150
- # 使用されていない翻訳キーがないか確認
151
- npm run i18n:check:unused
133
+ function Root() {
134
+ return (
135
+ <ThemeProvider>
136
+ <TooltipProvider delay={100}>
137
+ <App />
138
+ <Toaster />
139
+ </TooltipProvider>
140
+ </ThemeProvider>
141
+ );
142
+ }
152
143
  ```
153
144
 
154
- ### 2. プロジェクトの主な機能の使い方を説明
145
+ ### 5. コンポーネントの利用
155
146
 
156
- #### Elements
147
+ 利用したいコンポーネントをインポートして使用します。
157
148
 
158
- 自作したアプリケーションの UI を構成する、再利用可能なコンポーネントを管理します。
149
+ ```tsx
150
+ import { Button, Card } from '@noemaru1011/ui';
159
151
 
160
- #### Layouts
161
-
162
- コンポーネントの配置やレイアウトを制御するためのコンポーネントを管理します。
163
-
164
- #### UI Primitives
165
-
166
- `src/components/ui/` では、shadcn/ui をベースとした UI プリミティブを管理します。
167
-
168
- ボタン、入力欄、ラベル、ポップオーバーなど、上位のコンポーネントを構成する基本的な UI 要素を配置します。
169
-
170
- #### Examples
171
-
172
- 複数のコンポーネントを組み合わせた使用例を管理します。
173
-
174
- - `src/components/example/form/`:フォームの実装例
175
- - `src/components/example/table/`:テーブルの実装例
176
-
177
- ### 3. コード例
178
-
179
- #### Layouts
180
-
181
- - **Center**:子要素を中央に配置する
182
- - **Cluster**:子要素を横方向にまとめて配置する
183
- - **Container**:コンテンツの最大幅などを制御する
184
- - **Stack**:子要素を縦方向に積み重ねて配置する
185
-
186
- #### Form
187
-
188
- `src/components/example/form/`
189
-
190
- 以下の技術を組み合わせたフォームの実装例です。
191
-
192
- - Zod:入力値のバリデーション
193
- - React Hook Form:フォーム状態の管理
194
- - カスタムフック:フォーム処理の共通化
195
- - フォーム UI:入力画面の構築
196
- - ページ:フォームの利用例
197
-
198
- #### Table
199
-
200
- `src/components/example/table/`
201
-
202
- TanStack Table v9 を使用したテーブルの実装例です。
203
-
204
- - ソート
205
- - 絞り込み
206
- - ページネーション
207
- - 行編集
208
-
209
- ## 運用
210
-
211
- 本リポジトリでは、品質の担保と開発効率の向上を目的に、以下のルールと自動化ツールを導入しています。
212
-
213
- ### 1. 開発フローと GitHub Projects 連携
214
-
215
- すべての作業は **Issue** を起点とし、GitHub Projects 上でステータスを管理します。
152
+ function Example() {
153
+ return (
154
+ <Card>
155
+ <Button>ボタン</Button>
156
+ </Card>
157
+ );
158
+ }
159
+ ```
216
160
 
217
- 1. **Issue の作成**
218
- - `.github/ISSUE_TEMPLATE/issue.md` のテンプレートに従ってタスクを起票します。
219
- - 起票された Issue はプロジェクトボードの `Todo` に追加されます。
220
- 2. **ブランチ作成・実装**
221
- - Issue 画面の「Create a branch」から作業用ブランチを作成し、ステータスを `In Progress` に変更します。
222
- - コミット時には Git Hooks(`pre-commit` / `commit-msg`)が自動実行され、コードフォーマットやコミットメッセージの規約チェックが行われます。
223
- 3. **Pull Request(PR)の作成**
224
- - 実装完了後、`.github/PULL_REQUEST_TEMPLATE.md` に従って PR を作成し、ステータスを `In Review` に変更します。
225
- - PR の説明欄に `Closes #<Issue番号>` を記載し、Issue と紐付けます。
226
- 4. **レビュー・マージ**
227
- - CI の通過およびレビュアーの承認後、マージを行います。
228
- - マージされると紐づいた Issue が自動的にクローズされ、プロジェクトボードのステータスも `Done` へ移行します。
161
+ ### 6. Primitivesの利用
229
162
 
230
- ### 2. ローカル開発環境(Git Hooks)
163
+ 基本的なUIコンポーネントは `primitives` から利用できます。
231
164
 
232
- - **`pre-commit`**: コミット前に Lint やフォーマットチェック等を実行します。
233
- - **`commit-msg`**: コミットメッセージが規約(Conventional Commits 等)に沿っているか検証します。
165
+ ```tsx
166
+ import { primitives } from '@noemaru1011/ui';
234
167
 
235
- ### 3. CI / CD(GitHub Actions)
168
+ const { CardHeader, CardTitle, CardDescription, CardContent, CardFooter } = primitives;
169
+ ```
236
170
 
237
- `.github/workflows` に定義された以下のワークフローが自動実行されます。
171
+ ### 7. Layoutsの利用
172
+
173
+ レイアウトコンポーネントを組み合わせて、画面構成を作成できます。
174
+
175
+ ```tsx
176
+ import { Center, Container, Stack } from '@noemaru1011/ui';
177
+
178
+ function Example() {
179
+ return (
180
+ <Container>
181
+ <Center>
182
+ <Stack>
183
+ <h1>タイトル</h1>
184
+ <p>コンテンツ</p>
185
+ </Stack>
186
+ </Center>
187
+ </Container>
188
+ );
189
+ }
190
+ ```
238
191
 
239
- - **`ci.yml`**: 自動テスト、ビルド、静的解析を実行します。**CI がすべてパスすることがマージの必須条件です。**
240
- - **`check-node-version.yml`**: .nvmrcを変更した際に、package.jsonのバージョンに差異がないか検証します。
241
- - **`cd.yml`**: `master` ブランチへのマージをトリガーに、本番環境への自動デプロイを実行します。
192
+ ### 8. コンポーネント一覧
242
193
 
243
- ### 4. 依存パッケージの自動更新(Dependabot)
194
+ 各コンポーネントの使用方法やバリエーションは、Storybookで確認できます。
244
195
 
245
- - `.github/dependabot.yml` の設定に基づき、依存ライブラリのアップデートやセキュリティパッチの PR が定期的に自動作成されます。
246
- - Dependabot による PR も通常の PR と同様に CI の通過を確認したうえでマージします。
196
+ [Storybook](https://noemaru1011.github.io/my-ui-catalog/)
247
197
 
248
- ### 5. コードオーナーとブランチ保護(CODEOWNERS)
198
+ ## 開発に参加する
249
199
 
250
- 品質担保および開発ルール維持のため、`.github/CODEOWNERS` とブランチ保護ルール(Rulesets)により、重要ファイルの変更にはコードオーナーの承認を必須としています。
200
+ 開発環境の構築、コマンド一覧、テストの実行方法、開発フローなどについては、以下を参照してください。
251
201
 
252
- - **保護対象ファイル・ディレクトリ**
253
- - **`.github/`・`.agents/`**: CI/CD ワークフロー、Git Hooks、AI 向け指示書などの開発ルール・自動化基盤
254
- - **`*.test.ts(x)`・`*.spec.ts(x)`・`/e2e/`**: 単体テストおよび E2E テストコード(テスト削除・改ざんによる CI 突破の防止)
255
- - **変更・削除時の運用ルール**
256
- - 上記ファイルを含む PR を作成すると、自動的にコードオーナー(`@noemaru1011`)がレビュアーに割り当てられます。
257
- - テストの削除やルールの変更が正当な理由に基づく場合は、PR 上で理由を明記し、コードオーナーの承認(Approve)を得た
202
+ - [CONTRIBUTING.md](CONTRIBUTING.md)
@@ -1,8 +1,7 @@
1
1
  import { ComponentProps } from 'react';
2
2
  import { Option } from '../../types/Option';
3
- import { WithoutExternalStyle } from '../../types/WithoutExternalStyle';
4
3
  import { Checkbox as BaseCheckbox } from '../../ui/checkbox';
5
- type CheckboxProps = WithoutExternalStyle<ComponentProps<typeof BaseCheckbox>, 'value' | 'checked' | 'onCheckedChange' | 'disabled'> & {
4
+ type CheckboxProps = Omit<ComponentProps<typeof BaseCheckbox>, 'className' | 'style' | 'value' | 'checked' | 'onCheckedChange' | 'disabled'> & {
6
5
  label: string;
7
6
  options: Option[];
8
7
  value: string[];
@@ -14,5 +13,5 @@ type CheckboxProps = WithoutExternalStyle<ComponentProps<typeof BaseCheckbox>, '
14
13
  /** 極力使用せず、表示できるか検討する。 */
15
14
  disabled?: boolean;
16
15
  };
17
- export declare function Checkbox({ label, options, value, onChange, description, error, required, disabled, ...rawProps }: CheckboxProps): import('react').JSX.Element;
16
+ export declare function Checkbox({ label, options, value, onChange, description, error, required, disabled, ...props }: CheckboxProps): import('react').JSX.Element;
18
17
  export {};
@@ -1,7 +1,6 @@
1
1
  import { Combobox as ComboboxPrimitive } from '@base-ui/react';
2
2
  import { Option } from '../../types/Option';
3
- import { WithoutExternalStyle } from '../../types/WithoutExternalStyle';
4
- type ComboboxProps = WithoutExternalStyle<ComboboxPrimitive.Root.Props<Option>, 'items' | 'disabled' | 'value' | 'onValueChange' | 'onChange'> & {
3
+ type ComboboxProps = Omit<ComboboxPrimitive.Root.Props<Option>, 'className' | 'style' | 'items' | 'disabled' | 'value' | 'onValueChange' | 'onChange'> & {
5
4
  /** idは指定しなかったら場合、自動採番。 */
6
5
  id?: string;
7
6
  label: string;
@@ -16,5 +15,5 @@ type ComboboxProps = WithoutExternalStyle<ComboboxPrimitive.Root.Props<Option>,
16
15
  disabled?: boolean;
17
16
  inputSize?: 'sm' | 'md' | 'lg';
18
17
  };
19
- export declare function Combobox({ id, label, options, value, onChange, description, error, required, disabled, inputSize, ...rawProps }: ComboboxProps): import('react').JSX.Element;
18
+ export declare function Combobox({ id, label, options, value, onChange, description, error, required, disabled, inputSize, ...props }: ComboboxProps): import('react').JSX.Element;
20
19
  export {};
@@ -1,7 +1,6 @@
1
1
  import { Combobox as ComboboxPrimitive } from '@base-ui/react';
2
2
  import { Option } from '../../types/Option';
3
- import { WithoutExternalStyle } from '../../types/WithoutExternalStyle';
4
- type ComboboxMultipleProps = WithoutExternalStyle<ComboboxPrimitive.Root.Props<Option, true>, 'items' | 'multiple' | 'disabled' | 'value' | 'onValueChange' | 'onChange'> & {
3
+ type ComboboxMultipleProps = Omit<ComboboxPrimitive.Root.Props<Option, true>, 'className' | 'style' | 'items' | 'multiple' | 'disabled' | 'value' | 'onValueChange' | 'onChange'> & {
5
4
  /** idは指定しなかったら場合、自動採番。 */
6
5
  id?: string;
7
6
  label: string;
@@ -14,7 +13,10 @@ type ComboboxMultipleProps = WithoutExternalStyle<ComboboxPrimitive.Root.Props<O
14
13
  required?: boolean;
15
14
  /** 極力使用せず、表示できるか検討する。 */
16
15
  disabled?: boolean;
16
+ /** 入力欄のサイズを指定。 */
17
17
  inputSize?: 'sm' | 'md' | 'lg';
18
+ /** 入力欄に表示する選択済みチップの最大件数。超過分はTooltip内に表示する。 @default 2 */
19
+ maxVisibleChips?: number;
18
20
  };
19
- export declare function ComboboxMultiple({ id, label, options, value, onChange, description, error, required, disabled, inputSize, ...rawProps }: ComboboxMultipleProps): import('react').JSX.Element;
21
+ export declare function ComboboxMultiple({ id, label, options, value, onChange, description, error, required, disabled, inputSize, maxVisibleChips, ...props }: ComboboxMultipleProps): import('react').JSX.Element;
20
22
  export {};
@@ -1,10 +1,11 @@
1
1
  type DisclosureProps = {
2
- triggerText: string;
2
+ openText: string;
3
+ closeText: string;
3
4
  children: React.ReactNode;
4
5
  defaultOpen?: boolean;
5
6
  };
6
7
  /** メイン情報に対する追加情報を折りたたんで提示するときに使用します。
7
8
  * 大事な項目には使用しない、表示領域をコンパクトを目的とはしない。
8
9
  */
9
- export declare function Disclosure({ triggerText, children, defaultOpen }: DisclosureProps): import('react').JSX.Element;
10
+ export declare function Disclosure({ openText, closeText, children, defaultOpen, }: DisclosureProps): import('react').JSX.Element;
10
11
  export {};
@@ -1,7 +1,6 @@
1
1
  import { ComponentProps } from 'react';
2
- import { WithoutExternalStyle } from '../../types/WithoutExternalStyle';
3
2
  import { Input as BaseInput } from '../../ui/input';
4
- type InputProps = WithoutExternalStyle<ComponentProps<typeof BaseInput>, 'type' | 'disabled'> & {
3
+ type InputProps = Omit<ComponentProps<typeof BaseInput>, 'className' | 'style' | 'type' | 'disabled'> & {
5
4
  /** idは指定しなかったら場合、自動採番。 */
6
5
  id?: string;
7
6
  label: string;
@@ -14,5 +13,5 @@ type InputProps = WithoutExternalStyle<ComponentProps<typeof BaseInput>, 'type'
14
13
  readOnly?: boolean;
15
14
  inputSize?: 'sm' | 'md' | 'lg';
16
15
  };
17
- export declare function Input({ id, label, description, error, required, readOnly, inputSize, ...rawProps }: InputProps): import('react').JSX.Element;
16
+ export declare function Input({ id, label, description, error, required, readOnly, inputSize, onChange, value, defaultValue, ...props }: InputProps): import('react').JSX.Element;
18
17
  export {};
@@ -1,7 +1,6 @@
1
1
  import { ComponentProps } from 'react';
2
- import { WithoutExternalStyle } from '../../types/WithoutExternalStyle';
3
2
  import { InputGroupInput } from '../../ui/input-group';
4
- type PasswordInputProps = WithoutExternalStyle<ComponentProps<typeof InputGroupInput>, 'type' | 'disabled'> & {
3
+ type PasswordInputProps = Omit<ComponentProps<typeof InputGroupInput>, 'className' | 'style' | 'type' | 'disabled'> & {
5
4
  /** idは指定しなかったら場合、自動採番。 */
6
5
  id?: string;
7
6
  label: string;
@@ -14,5 +13,5 @@ type PasswordInputProps = WithoutExternalStyle<ComponentProps<typeof InputGroupI
14
13
  inputSize?: 'sm' | 'md' | 'lg';
15
14
  };
16
15
  /** Inputタグ type=Password の専用コンポーネント、アイコンを押すことで type=text に切り替えができる。(確認が目的)*/
17
- export declare function PasswordInput({ id, label, description, error, required, readOnly, inputSize, ...rawProps }: PasswordInputProps): import('react').JSX.Element;
16
+ export declare function PasswordInput({ id, label, description, error, required, readOnly, inputSize, value, defaultValue, onChange, ...props }: PasswordInputProps): import('react').JSX.Element;
18
17
  export {};
@@ -1,8 +1,7 @@
1
1
  import { ComponentProps } from 'react';
2
2
  import { Option } from '../../types/Option';
3
- import { WithoutExternalStyle } from '../../types/WithoutExternalStyle';
4
3
  import { RadioGroup } from '../../ui/radio-group';
5
- type RadioProps = WithoutExternalStyle<ComponentProps<typeof RadioGroup>, 'disabled' | 'value' | 'onValueChange' | 'onChange'> & {
4
+ type RadioProps = Omit<ComponentProps<typeof RadioGroup>, 'className' | 'style' | 'disabled' | 'value' | 'onValueChange' | 'onChange'> & {
6
5
  label: string;
7
6
  options: Option[];
8
7
  value?: string;
@@ -14,5 +13,5 @@ type RadioProps = WithoutExternalStyle<ComponentProps<typeof RadioGroup>, 'disab
14
13
  /** 極力使用せず、表示できるか検討する。 */
15
14
  disabled?: boolean;
16
15
  };
17
- export declare function Radio({ label, options, value, onChange, description, error, required, disabled, ...rawProps }: RadioProps): import('react').JSX.Element;
16
+ export declare function Radio({ label, options, value, onChange, description, error, required, disabled, ...props }: RadioProps): import('react').JSX.Element;
18
17
  export {};
@@ -1,8 +1,7 @@
1
1
  import { ComponentProps } from 'react';
2
2
  import { Option } from '../../types/Option';
3
- import { WithoutExternalStyle } from '../../types/WithoutExternalStyle';
4
3
  import { Select as BaseSelect } from '../../ui/select';
5
- type SelectProps = WithoutExternalStyle<ComponentProps<typeof BaseSelect>, 'disabled' | 'value' | 'onValueChange'> & {
4
+ type SelectProps = Omit<ComponentProps<typeof BaseSelect>, 'className' | 'style' | 'disabled' | 'value' | 'onValueChange'> & {
6
5
  /** idは指定しなかったら場合、自動採番。 */
7
6
  id?: string;
8
7
  label: string;
@@ -17,5 +16,5 @@ type SelectProps = WithoutExternalStyle<ComponentProps<typeof BaseSelect>, 'disa
17
16
  disabled?: boolean;
18
17
  inputSize?: 'sm' | 'md' | 'lg';
19
18
  };
20
- export declare function Select({ id, label, options, value, onChange, description, error, required, disabled, inputSize, ...rawProps }: SelectProps): import('react').JSX.Element;
19
+ export declare function Select({ id, label, options, value, onChange, description, error, required, disabled, inputSize, ...props }: SelectProps): import('react').JSX.Element;
21
20
  export {};
@@ -1,7 +1,6 @@
1
1
  import { ComponentProps, ReactNode } from 'react';
2
- import { WithoutExternalStyle } from '../../types/WithoutExternalStyle';
3
2
  import { Switch as BaseSwitch } from '../../ui/switch';
4
- type SwitchProps = WithoutExternalStyle<ComponentProps<typeof BaseSwitch>, 'id' | 'aria-label' | 'disabled'> & {
3
+ type SwitchProps = Omit<ComponentProps<typeof BaseSwitch>, 'className' | 'style' | 'id' | 'aria-label' | 'disabled'> & {
5
4
  /** idを指定しない場合は自動採番。 */
6
5
  id?: string;
7
6
  label?: ReactNode;
@@ -11,5 +10,5 @@ type SwitchProps = WithoutExternalStyle<ComponentProps<typeof BaseSwitch>, 'id'
11
10
  /** 極力使用せず、表示できるか検討する。 */
12
11
  disabled?: boolean;
13
12
  };
14
- export declare function Switch({ id, label, labelPosition, 'aria-label': ariaLabel, disabled, ...rawProps }: SwitchProps): import('react').JSX.Element;
13
+ export declare function Switch({ id, label, labelPosition, 'aria-label': ariaLabel, disabled, ...props }: SwitchProps): import('react').JSX.Element;
15
14
  export {};
@@ -1,7 +1,6 @@
1
1
  import { ComponentProps } from 'react';
2
- import { WithoutExternalStyle } from '../../types/WithoutExternalStyle';
3
2
  import { Textarea as BaseTextarea } from '../../ui/textarea';
4
- type TextareaProps = WithoutExternalStyle<ComponentProps<typeof BaseTextarea>, 'disabled'> & {
3
+ type TextareaProps = Omit<ComponentProps<typeof BaseTextarea>, 'className' | 'style' | 'disabled'> & {
5
4
  /** idは指定しなかったら場合、自動採番。 */
6
5
  id?: string;
7
6
  label: string;
@@ -12,5 +11,5 @@ type TextareaProps = WithoutExternalStyle<ComponentProps<typeof BaseTextarea>, '
12
11
  /** disabledはアクセシビリティの観点で使わない、readonlyも極力使用せず、表示できるか検討する。 */
13
12
  readOnly?: boolean;
14
13
  };
15
- export declare function Textarea({ id, label, description, error, required, readOnly, ...rawProps }: TextareaProps): import('react').JSX.Element;
14
+ export declare function Textarea({ id, label, description, error, required, readOnly, ...props }: TextareaProps): import('react').JSX.Element;
16
15
  export {};
@@ -1,8 +1,9 @@
1
1
  import { ReactNode } from 'react';
2
2
  type CenterProps = {
3
3
  children: ReactNode;
4
- maxWidth?: 'sm' | 'md' | 'lg' | 'xl' | 'full';
4
+ /** 最低限の高さ(画面の高さ)を確保するかどうか。(親要素が横幅しか確保してないときに用いる。) */
5
+ minHeight?: boolean;
5
6
  };
6
- /** コンテンツを水平方向の中央に配置するコンポーネントです。用途はコンテンツの最大幅と中央寄せ */
7
- export declare function Center({ children, maxWidth }: CenterProps): import('react').JSX.Element;
7
+ /** 子要素を親要素に対して垂直・水平方向の中央に配置するコンポーネントです。 */
8
+ export declare function Center({ children, minHeight }: CenterProps): import('react').JSX.Element;
8
9
  export {};
@@ -1,15 +1,10 @@
1
1
  import { PropsWithChildren } from 'react';
2
2
  type ClusterProps = PropsWithChildren<{
3
- /**
4
- * 折り返しを無効にする
5
- * @default false
6
- */
7
- nowrap?: boolean;
8
3
  /**
9
4
  * 子要素間の間隔
10
5
  * @default 'md'
11
6
  */
12
- space?: 'sm' | 'md' | 'lg';
7
+ space?: 'none' | 'sm' | 'md' | 'lg';
13
8
  /**
14
9
  * 水平方向の配置
15
10
  * @default 'start'
@@ -21,6 +16,9 @@ type ClusterProps = PropsWithChildren<{
21
16
  */
22
17
  align?: 'start' | 'center' | 'end' | 'stretch';
23
18
  }>;
24
- /** 子要素を横方向に並べるレイアウトコンポーネントです。space は要素間の間隔、justify は水平方向の配置、align は垂直方向の配置を制御します。子要素が収まらない場合は自動的に折り返します。 */
25
- export declare function Cluster({ nowrap, space, justify, align, children, }: ClusterProps): import('react').JSX.Element;
19
+ /**
20
+ * 子要素を横方向に並べ、収まりきらない場合は折り返すレイアウトコンポーネントです。
21
+ * space は要素間の間隔、justify は水平方向の配置、align は垂直方向の配置を制御します。
22
+ */
23
+ export declare function Cluster({ space, justify, align, children, }: ClusterProps): import('react').JSX.Element;
26
24
  export {};
@@ -1,8 +1,8 @@
1
1
  import { ReactNode } from 'react';
2
2
  type ContainerProps = {
3
3
  children?: ReactNode;
4
- width?: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full';
4
+ width?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl' | 'full';
5
5
  };
6
- /** コンテンツの幅を制限するレイアウトコンポーネントです。用途はページの外枠、余白、全体のレイアウトコンテンツの幅を制限するレイアウトコンポーネントです。用途はページの外枠、余白、全体のレイアウト */
6
+ /** コンテンツの最大幅を制限するレイアウトコンポーネントです。 */
7
7
  export declare function Container({ children, width }: ContainerProps): import('react').JSX.Element;
8
8
  export {};
@@ -1,9 +1,25 @@
1
- import { ReactNode } from 'react';
2
- type GridProps = {
1
+ import { ReactElement, ReactNode } from 'react';
2
+ type GridColumns = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
3
+ type ResponsiveValue<T> = {
4
+ default?: T;
5
+ sm?: T;
6
+ md?: T;
7
+ lg?: T;
8
+ xl?: T;
9
+ };
10
+ type GridItemProps = {
3
11
  children: ReactNode;
4
- columns?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
12
+ span?: GridColumns | ResponsiveValue<GridColumns>;
13
+ };
14
+ type GridProps = {
15
+ /** GridItemPropsのみ有効です。 */
16
+ children: ReactElement<GridItemProps, typeof GridItem> | ReactElement<GridItemProps, typeof GridItem>[];
17
+ columns?: GridColumns | ResponsiveValue<GridColumns>;
5
18
  space?: 'none' | 'sm' | 'md' | 'lg';
6
- className?: string;
7
19
  };
8
- export declare function Grid({ children, columns, space, className }: GridProps): import('react').JSX.Element;
20
+ declare function GridItem({ children, span }: GridItemProps): import('react').JSX.Element;
21
+ export declare function Grid({ children, columns, space }: GridProps): import('react').JSX.Element;
22
+ export declare namespace Grid {
23
+ var Item: typeof GridItem;
24
+ }
9
25
  export {};