@dayflow/core 1.0.7 → 2.0.0

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.
Files changed (51) hide show
  1. package/README.ja.md +325 -90
  2. package/README.md +319 -78
  3. package/README.zh.md +324 -89
  4. package/dist/components/common/CalendarHeader.d.ts +4 -0
  5. package/dist/components/common/ColorPicker.d.ts +1 -0
  6. package/dist/components/common/DefaultEventDetailPanel.d.ts +1 -1
  7. package/dist/components/common/MobileEventDrawer.d.ts +12 -0
  8. package/dist/components/common/MobileSearchDialog.d.ts +14 -0
  9. package/dist/components/common/QuickCreateEventPopup.d.ts +10 -0
  10. package/dist/components/common/SearchDrawer.d.ts +13 -0
  11. package/dist/components/common/SearchResultsList.d.ts +11 -0
  12. package/dist/components/common/ViewHeader.d.ts +0 -2
  13. package/dist/components/mobileEventDrawer/DefaultMobileEventDrawer.d.ts +3 -0
  14. package/dist/components/mobileEventDrawer/components/Switch.d.ts +7 -0
  15. package/dist/components/mobileEventDrawer/components/TimePickerWheel.d.ts +7 -0
  16. package/dist/components/mobileEventDrawer/index.d.ts +3 -0
  17. package/dist/components/monthView/MultiDayEvent.d.ts +7 -2
  18. package/dist/components/monthView/WeekComponent.d.ts +5 -3
  19. package/dist/components/monthView/util.d.ts +1 -1
  20. package/dist/components/search/MobileSearchDialog.d.ts +14 -0
  21. package/dist/components/search/SearchDrawer.d.ts +13 -0
  22. package/dist/components/search/SearchResultsList.d.ts +11 -0
  23. package/dist/components/sidebar/components/CalendarList.d.ts +2 -0
  24. package/dist/components/sidebar/components/SidebarHeader.d.ts +0 -1
  25. package/dist/components/weekView/CalendarEvent.d.ts +7 -2
  26. package/dist/core/CalendarApp.d.ts +15 -1
  27. package/dist/core/DayFlowCalendar.d.ts +3 -0
  28. package/dist/hooks/virtualScroll/useVirtualMonthScroll.d.ts +1 -1
  29. package/dist/index.d.ts +2 -0
  30. package/dist/index.esm.js +1 -1
  31. package/dist/index.js +1 -1
  32. package/dist/locale/types.d.ts +1 -1
  33. package/dist/styles/classNames.d.ts +9 -9
  34. package/dist/styles.css +464 -32
  35. package/dist/types/core.d.ts +38 -0
  36. package/dist/types/dragIndicator.d.ts +5 -3
  37. package/dist/types/event.d.ts +2 -0
  38. package/dist/types/hook.d.ts +7 -7
  39. package/dist/types/index.d.ts +1 -0
  40. package/dist/types/mobileEvent.d.ts +21 -0
  41. package/dist/types/monthView.d.ts +1 -0
  42. package/dist/types/plugin.d.ts +6 -4
  43. package/dist/types/search.d.ts +35 -0
  44. package/dist/utils/compareUtils.d.ts +5 -0
  45. package/dist/utils/eventUtils.d.ts +7 -0
  46. package/dist/utils/helpers.d.ts +2 -1
  47. package/dist/utils/index.d.ts +1 -0
  48. package/dist/utils/searchUtils.d.ts +35 -0
  49. package/dist/views/MonthView.d.ts +0 -2
  50. package/dist/views/WeekView.d.ts +0 -2
  51. package/package.json +1 -1
package/README.ja.md CHANGED
@@ -1,148 +1,383 @@
1
1
  # DayFlow
2
2
 
3
- [English](README.md) | [中文](README.zh.md) | **日本語**
3
+ [English](README.md) | [中文](README.zh.md) | **日本語** | [はじめに & コントリビューション](CONTRIBUTING.md)
4
4
 
5
- DayFlow は、ドラッグ&ドロップ・複数ビュー・プラグインアーキテクチャを備えた柔軟で高機能な React 向けカレンダーコンポーネントライブラリです。
5
+ ドラッグ&ドロップ、マルチビュー、プラグインアーキテクチャをサポートする、柔軟で機能豊富なReactカレンダーコンポーネントライブラリ。
6
6
 
7
7
  [![npm](https://img.shields.io/npm/v/@dayflow/core?logo=npm&color=blue&label=version)](https://www.npmjs.com/package/@dayflow/core)
8
8
  [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen?logo=github)](https://github.com/dayflow-js/dayflow/pulls)
9
9
  [![License](https://img.shields.io/github/license/dayflow-js/dayflow)](https://github.com/dayflow-js/dayflow/blob/main/LICENSE)
10
- [![Discord](https://img.shields.io/badge/Discord-Join%20Chat-5865F2?logo=discord&logoColor=white)](https://discord.gg/jc37N4xw)
10
+ [![Discord](https://img.shields.io/badge/Discord-Join%20Chat-5865F2?logo=discord&logoColor=white)](https://discord.gg/9vdFZKJqBb)
11
11
 
12
- ## 🗓️ 主な特長
12
+ ## 🗓️ 機能
13
13
 
14
- ### ✨ 月/週/日など多彩なビュー
14
+ ### ✨ 月次、週次、日次、その他のビュータイプ
15
15
 
16
- | 月ビュー | 週ビュー |
17
- | -------------------------------------- | -------------------------------------- |
16
+ | 月次 | 週次 |
17
+ |------------------------------------------|----------------------------------------|
18
18
  | ![image](./assets/images//MonthView.png) | ![image](./assets/images/WeekView.png) |
19
19
 
20
- | 日ビュー | イベントスタック |
21
- | -------------------------------------- | -------------------------------------- |
22
- | ![image](./assets/images/DayView.png) | ![image](./assets/images/stackLevel.png) |
20
+ | 日次 | イベントスタックレベル |
21
+ |---------------------------------------|------------------------------------------|
22
+ | ![image](./assets/images/DayView.png) | ![image](./assets/images/stackLevel.png) |
23
23
 
24
- ### 🤩 デフォルトの詳細パネル(複数のカスタム構成を用意)
24
+ ### 🤩 デフォルトパネル(複数のイベント詳細パネルオプションが利用可能)
25
25
 
26
- | ポップアップ詳細 | ダイアログ詳細 |
27
- | ------------------------------------- | ------------------------------------- |
28
- | ![image](./assets/images/popup.png) | ![image](./assets/images/dialog.png) |
26
+ | 詳細ポップアップ | 詳細ダイアログ |
27
+ |-------------------------------------|--------------------------------------|
28
+ | ![image](./assets/images/popup.png) | ![image](./assets/images/dialog.png) |
29
29
 
30
- ### 🎯 スムーズなドラッグ&リサイズ
30
+ ## クイックスタート
31
31
 
32
- https://github.com/user-attachments/assets/726a5232-35a8-4fe3-8e7b-4de07c455353
32
+ 公式サイト:
33
33
 
34
- https://github.com/user-attachments/assets/957317e5-02d8-4419-a74b-62b7d191e347
34
+ https://dayflow-js.github.io/calendar/
35
35
 
36
- > ⚡ さらに多くの機能を体験したい場合は [ライブデモ](https://dayflow-js.github.io/dayflow/) をご覧ください。
36
+ ### インストール
37
37
 
38
- ## ✨ コア機能
38
+ ```bash
39
+ npm install @dayflow/core lucide-react
40
+ ```
41
+
42
+ **DayFlow** アプリ全体は `useCalendarApp` フックを通じて作成され、**`calendar`** オブジェクトを返します。
43
+
44
+ このオブジェクトは、`DayFlowCalendar` UI コンポーネントを使用してレンダリングされます。
39
45
 
40
- - 🗓️ **複数ビュー**:日/週/月/年ビューをサポート
41
- - 🎨 **高いカスタマイズ性**:Tailwind CSS によるテーマ拡張
42
- - 📱 **レスポンシブ対応**:デスクトップ/タブレット/モバイルに最適化
43
- - 🔌 **プラグインアーキテクチャ**:拡張しやすい設計
44
- - 🎯 **ドラッグ&ドロップ**:直感的なイベント操作
45
- - ⚡ **TypeScript サポート**:完全な型定義
46
- - 🎨 **イベント管理**:作成/更新/削除/分類を簡単に
47
- - 🔄 **バーチャルスクロール**:大量データでも軽快
48
- - 🎭 **カスタムレンダラー**:イベント表示と挙動を自由に拡張
46
+ ```tsx
47
+ 'use client';
48
+
49
+ import {
50
+ useCalendarApp,
51
+ DayFlowCalendar,
52
+ createMonthView,
53
+ createEvent,
54
+ createAllDayEvent,
55
+ createTimedEvent,
56
+ } from '@dayflow/core';
57
+ import '@dayflow/core/dist/styles.css';
58
+
59
+ // ローカル時間指定イベント(タイムゾーンの複雑さなし)
60
+ const meeting = createEvent({
61
+ id: '1',
62
+ title: 'Team Meeting',
63
+ start: new Date(2024, 9, 15, 10, 0), // 2024年10月15日 10:00
64
+ end: new Date(2024, 9, 15, 11, 0), // 2024年10月15日 11:00
65
+ });
66
+
67
+ // 終日イベント
68
+ const holiday = createAllDayEvent(
69
+ '2',
70
+ 'Tech Conference',
71
+ new Date(2024, 9, 20)
72
+ );
73
+
74
+ // 時間指定イベントのクイック作成
75
+ const lunch = createTimedEvent(
76
+ '3',
77
+ 'Lunch Break',
78
+ new Date(2024, 9, 15, 12, 0), // 12:00
79
+ new Date(2024, 9, 15, 13, 0) // 13:00
80
+ );
81
+
82
+ export default function MyCalendar() {
83
+ const calendar = useCalendarApp({
84
+ views: [createMonthView()],
85
+ events: [],
86
+ calendars: [],
87
+ defaultView: 'month',
88
+ initialDate: new Date(),
89
+ });
49
90
 
50
- ## 🚀 追加機能
91
+ return <DayFlowCalendar calendar={calendar} />;
92
+ }
93
+ ```
51
94
 
52
- ### 📅 高度なカレンダー機能
95
+ - **views**: カレンダービューの配列。現在、DayFlow は4つの組み込みファクトリ関数を提供しています:
96
+ `createMonthView`、`createWeekView`、`createDayView`、および `createYearView`(開発中)。
97
+ ビューの順序によってタブの順序が決まります(年 / 月 / 週 / 日)。
98
+ - **events**: カレンダーのコアデータ。イベントタイプに応じて、組み込みヘルパー
99
+ `createEvent`、`createAllDayEvent`、および `createTimedEvent` を使用して作成できます。
53
100
 
54
- - **マルチデイイベント**:複数日にまたがるイベント表示
55
- - **終日イベント**:専用ヘッダー領域を用意
56
- - **イベントスタック**:重複イベントをスマートに配置
57
- - **サイドバー**:カレンダー管理用サイドバーを内蔵
101
+ ---
58
102
 
59
- ### 🎨 カスタマイズ & テーマ
103
+ ## `useCalendarApp` 設定オプション
60
104
 
61
- - **カスタムイベントレンダラー**:UI を完全にコントロール
62
- - **カラーコーディング**:複数カレンダーと色分けに対応
63
- - **詳細パネル**:ダイアログ/ポップアップ/カスタムパネル
64
- - **ヘッダーのカスタマイズ**:`ViewHeader` で表示切替を制御
65
- - **ドラッグインジケーター**:イベントタイプごとにカスタム指標
105
+ | オプション | 型 | デフォルト | 説明 | 必須 |
106
+ |------------------------|----------------------------|---------------------|--------------------------------------------------------------------------|------|
107
+ | `views` | `CalendarView[]` | — | 登録されたビュー定義(例:`createMonthView()`)。少なくとも1つのビューが必要です | ✅ |
108
+ | `plugins` | `CalendarPlugin[]` | `[]` | オプションのプラグイン(ドラッグサポート、キーボードショートカットなど)。各プラグインはインストール中にアプリインスタンスを受け取ります | ❌ |
109
+ | `events` | `Event[]` | `[]` | 初期のイベントデータ。後で `addEvent` / `updateEvent` を使用して変更します | ❌ |
110
+ | `callbacks` | `CalendarCallbacks` | `{}` | ビュー、日付、またはイベントの変更時にトリガーされるライフサイクルフック — API 同期に最適です | ❌ |
111
+ | `defaultView` | `ViewType` | `ViewType.WEEK` | ロード時の初期ビュー。`views` に存在する必要があります | ❌ |
112
+ | `initialDate` | `Date` | `new Date()` | 初期のフォーカス日付(可視範囲の計算も初期化します) | ❌ |
113
+ | `switcherMode` | `'buttons' \| 'select'` | `'buttons'` | ヘッダー内の組み込みビュースイッチャーのレンダリング方法を制御します | ❌ |
114
+ | `calendars` | `CalendarType[]` | `[]` | カレンダーカテゴリ(仕事、個人など)を色と表示設定とともに登録します | ❌ |
115
+ | `defaultCalendar` | `string` | 最初の可視カレンダー | 新しいイベントを作成するときに使用されるカレンダー ID | ❌ |
116
+ | `theme` | `ThemeConfig` | `{ mode: 'light' }` | グローバルテーマモードとオプションのトークンオーバーライド | ❌ |
117
+ | `locale` | `string \| Locale` | `'en-US'` | 国際化 (i18n)。言語コード(例:`'ja'`)または Locale オブジェクトをサポートします | ❌ |
118
+ | `useSidebar` | `boolean \| SidebarConfig` | `false` | 組み込みサイドバーを有効にするか、幅、折りたたみ状態、およびレンダラーをカスタマイズします | ❌ |
119
+ | `useEventDetailDialog` | `boolean` | `false` | イベント詳細にインラインパネルではなくモーダルダイアログを使用します | ❌ |
66
120
 
67
- ### 🎯 インタラクション
121
+ ## コールバック関数
68
122
 
69
- - **イベントコールバック**:`onEventCreate` / `onEventUpdate` / `onEventDelete`
70
- - **クリックイベント**:イベントクリックにリアクション
71
- - **ドラッグ&リサイズ**:移動と長さ調整をスムーズに
72
- - **カラーピッカー**:組み込みの色選択 UI
123
+ `callbacks` は、DayFlow とバックエンドまたは外部状態管理の間のブリッジとして機能します。
73
124
 
74
- ### パフォーマンス & DX
125
+ これらは通常、データベースまたは API との CRUD 操作に使用されます。
75
126
 
76
- - **バーチャルスクロール**:月/年ビューの大量イベントでも高速
77
- - **TypeScript First**:すべての API に型定義
78
- - **プラグインシステム**:イベント/ドラッグプラグインで拡張
79
- - **Temporal API**:モダンな Temporal で日時を管理
127
+ 例:
80
128
 
81
- ## 📦 インストール
129
+ - `onViewChange(view)`: ビューの切り替え後にトリガーされます(分析や URL 同期に便利)
130
+ - `onDateChange(date)`: フォーカスされた日付が変更されたときに発火します
131
+ - `onVisibleMonthChange(date)`: 表示されている月が変更されたときにトリガーされます(データのプリロードに便利)
132
+ - `onEventCreate / Update / Delete`: イベント CRUD をバックエンドに接続します
133
+ - `onCalendarCreate / Update / Delete`: カレンダーリストの変更を同期します
134
+ - `onCalendarMerge(sourceId, targetId)`: 2つのカレンダーをマージするときにトリガーされます
135
+ - `onRender`: レンダリングサイクル後に発火し、パフォーマンス監視に適しています
82
136
 
83
- ```bash
84
- npm install @dayflow/core lucide-react
85
- # または
86
- yarn add @dayflow/core lucide-react
87
- # または
88
- pnpm add @dayflow/core lucide-react
137
+ ```tsx
138
+ const calendar = useCalendarApp({
139
+ views: [createDayView(), createWeekView(), createMonthView()],
140
+ events,
141
+ calendars: customCalendarTypes,
142
+ defaultCalendar: 'work',
143
+ plugins: [dragPlugin],
144
+ theme: { mode: 'auto' },
145
+ useSidebar: sidebarConfig,
146
+ callbacks: {
147
+ onCalendarUpdate: async calendar => {
148
+ console.log('update calendar:', calendar);
149
+ },
150
+ onCalendarDelete: async calendar => {
151
+ console.log('delete calendar:', calendar);
152
+ },
153
+ onCalendarCreate: async calendar => {
154
+ // await server API call
155
+ console.log('create calendar:', calendar);
156
+ },
157
+ onCalendarMerge: async (sourceId, targetId) => {
158
+ console.log('merge calendar:', sourceId, targetId);
159
+ },
160
+ },
161
+ });
89
162
  ```
90
163
 
91
- ### Peer Dependencies
164
+ ---
165
+
166
+ ## イベント詳細管理
92
167
 
93
- - `react` >= 18.0.0
94
- - `react-dom` >= 18.0.0
95
- - `lucide-react` >= 0.400.0
168
+ DayFlow には、以下の編集をサポートするデフォルトのイベント詳細パネルが含まれています:
96
169
 
97
- ## 🚀 クイックスタート
170
+ - タイトル
171
+ - 時間範囲
172
+ - メモ
173
+
174
+ `meta` オブジェクトを渡して、**会議リンク**、**場所** などのカスタムフィールドを保存することもできます。
175
+
176
+ <img width="536" height="323" alt="image" src="https://github.com/user-attachments/assets/7a599105-460e-4f83-8418-92bcd0ff8c2a" />
177
+
178
+ `useEventDetailDialog` を `DayFlowCalendar` に渡すことで、詳細パネルをモーダルダイアログとして有効にできます:
98
179
 
99
180
  ```tsx
100
- import { useCalendarApp, DayFlowCalendar } from '@dayflow/core';
101
- import { createMonthView, createWeekView, createDayView } from '@dayflow/core';
102
- import '@dayflow/core/dist/styles.css';
181
+ <DayFlowCalendar calendar={calendar} useEventDetailDialog={true} />
182
+ ```
183
+
184
+ <img width="1476" height="1108" alt="image" src="https://github.com/user-attachments/assets/c9f1e231-f8d1-4006-8ff1-942bb7491934" />
185
+
186
+ ---
187
+
188
+ ### カスタムイベント詳細パネル / ダイアログ
189
+
190
+ 完全にカスタマイズされた UI の場合、以下を提供することで、デフォルトの詳細パネルまたはダイアログを独自のコンポーネントに置き換えることができます:
191
+
192
+ - `customDetailPanelContent`
193
+ - `customEventDetailDialog`
194
+
195
+ ```tsx
196
+ <DayFlowCalendar
197
+ calendar={calendar}
198
+ customEventDetailDialog={CustomDialog} // Modal dialog
199
+ customDetailPanelContent={CustomContent} // Floating panel
200
+ />
201
+ ```
202
+
203
+ 詳細はドキュメントをご覧ください:
204
+
205
+ - **カスタムイベント詳細ダイアログ**
206
+ https://dayflow-js.github.io/calendar/docs-ja/features/custom-detail-dialog
207
+ - **カスタムイベント詳細パネル**
208
+ https://dayflow-js.github.io/calendar/docs-ja/features/custom-detail-panel
209
+
210
+ ---
211
+
212
+ ## サイドバー
103
213
 
104
- function App() {
214
+ DayFlow には強力な組み込みサイドバーが搭載されています。
215
+
216
+ 以下のことができます:
217
+
218
+ - サイドバーからカレンダーをドラッグしてイベントを作成
219
+
220
+ ![Area](https://github.com/user-attachments/assets/938a9a8f-b995-4ea0-8fe3-fa25ca2be4b6)
221
+
222
+ - カレンダーの統合、削除、色の変更
223
+
224
+ <img width="540" height="423" alt="image" src="https://github.com/user-attachments/assets/257a8671-e645-43fe-861e-613030f6c46e" />
225
+
226
+ - プリセットカラーの使用、またはカラーピッカーによるカスタムカラーの選択
227
+
228
+ <img width="872" height="708" alt="image" src="https://github.com/user-attachments/assets/bfda7cde-281e-4c23-86d6-910b13e7bc63" />
229
+
230
+ ```tsx
231
+ const calendar = useCalendarApp({
232
+ views: [createMonthView(), createWeekView(), createDayView()],
233
+ plugins: [createDragPlugin()],
234
+ events,
235
+ calendars,
236
+ defaultView: ViewType.WEEK,
237
+ useSidebar: {
238
+ enabled: true,
239
+ width: 280,
240
+ },
241
+ });
242
+ ```
243
+
244
+ ---
245
+
246
+ ### `useSidebar` 設定
247
+
248
+ | プロパティ | 型 | 説明 | デフォルト |
249
+ |------------------------------|--------------------------------------------------------------------|-----------------------------------------------------------------------|------------|
250
+ | `enabled` | `boolean` | サイドバーが有効かどうか。 | `true` |
251
+ | `width` | `number \| string` | サイドバーの幅(例:`240` または `'20%'`)。 | `'240px'` |
252
+ | `initialCollapsed` | `boolean` | サイドバーがデフォルトで折りたたまれているかどうか。 | `false` |
253
+ | `render` | `(props: CalendarSidebarRenderProps) => React.ReactNode` | サイドバー UI の完全なオーバーライド。 | - |
254
+ | `createCalendarMode` | `'inline' \| 'modal'` | 新しいカレンダーを作成するモード:`inline`(リスト内で直接編集)または `modal`(ポップアップダイアログ)。 | `'inline'` |
255
+ | `renderCalendarContextMenu` | `(calendar: CalendarType, onClose: () => void) => React.ReactNode` | カレンダーアイテムの右クリックコンテキストメニューのカスタムレンダラー。 | - |
256
+ | `renderCreateCalendarDialog` | `(props: CreateCalendarDialogProps) => React.ReactNode` | カレンダー作成ダイアログのカスタムレンダラー(`modal` モードで使用)。 | - |
257
+
258
+
259
+ ---
260
+
261
+ ### カスタムサイドバー
262
+
263
+ プロジェクトに独自のサイドバーデザインがすでにある場合は、`useSidebar.render` を使用して完全にカスタマイズできます。
264
+
265
+ このレンダリング関数は、リアルタイムのカレンダー状態と、DayFlow コアと対話するためのヘルパーメソッドを受け取ります。
266
+
267
+ **`CalendarSidebarRenderProps` は、カスタムサイドバーと DayFlow コア間の通信を可能にします。**
268
+
269
+ ```tsx
270
+ import type { CalendarSidebarRenderProps } from '@dayflow/core';
271
+
272
+ const CustomSidebar = ({
273
+ app,
274
+ calendars,
275
+ toggleCalendarVisibility,
276
+ toggleAll,
277
+ isCollapsed,
278
+ setCollapsed,
279
+ }: CalendarSidebarRenderProps) => {
280
+ if (isCollapsed) {
281
+ return <button onClick={() => setCollapsed(false)}>Expand Sidebar</button>;
282
+ }
283
+
284
+ return (
285
+ <aside className="flex h-full flex-col gap-4 p-4">
286
+ <header className="flex items-center justify-between">
287
+ <h3 className="text-sm font-semibold">Calendars</h3>
288
+ <div className="space-x-2">
289
+ <button onClick={() => toggleAll(true)}>Show All</button>
290
+ <button onClick={() => toggleAll(false)}>Hide All</button>
291
+ </div>
292
+ </header>
293
+ <ul className="space-y-2">
294
+ {calendars.map(calendar => (
295
+ <li key={calendar.id} className="flex items-center gap-2 text-sm">
296
+ <input
297
+ type="checkbox"
298
+ checked={calendar.isVisible}
299
+ onChange={() =>
300
+ toggleCalendarVisibility(calendar.id, !calendar.isVisible)
301
+ }
302
+ />
303
+ <span
304
+ className="h-2.5 w-2.5 rounded-full"
305
+ style={{ backgroundColor: calendar.colors.eventColor }}
306
+ />
307
+ {calendar.name}
308
+ </li>
309
+ ))}
310
+ </ul>
311
+ <section className="rounded-xl border border-slate-200 p-3 text-xs">
312
+ <p>Current date: {app.getCurrentDate().toDateString()}</p>
313
+ <p>Total events: {app.getEvents().length}</p>
314
+ </section>
315
+ </aside>
316
+ );
317
+ };
318
+
319
+ const calendar = useCalendarApp({
320
+ /* ... */
321
+ useSidebar: {
322
+ enabled: true,
323
+ width: 320,
324
+ render: props => <CustomSidebar {...props} />,
325
+ },
326
+ });
327
+ ```
328
+
329
+ ---
330
+
331
+ ## ダークモード
332
+
333
+ DayFlow Calendar は、ビュー、サイドバー、イベントカード、ダイアログ全体で完全なダークモードをネイティブにサポートしています。
334
+
335
+ <img width="1103" height="729" alt="image" src="https://github.com/user-attachments/assets/03c542d4-4b1b-4b99-9590-08c7be7f85df" />
336
+
337
+ **light**(ライト)、**dark**(ダーク)、または **auto**(システム設定に従う)を切り替えることができます。
338
+
339
+ ```tsx
340
+ import { DayFlowCalendar, useCalendarApp } from '@dayflow/core';
341
+
342
+ function MyCalendar() {
105
343
  const calendar = useCalendarApp({
106
- views: [createMonthView(), createWeekView(), createDayView()],
107
- initialDate: new Date(),
344
+ theme: {
345
+ mode: 'dark', // 'light' | 'dark' | 'auto'
346
+ },
108
347
  });
109
348
 
110
349
  return <DayFlowCalendar calendar={calendar} />;
111
350
  }
112
351
  ```
113
352
 
114
- > 📖 **[完全なドキュメントを見る →](https://dayflow-js.github.io/dayflow/)**
353
+ ---
115
354
 
116
- ## 🎯 ユースケース
355
+ ## ビュースイッチャーモード
117
356
 
118
- DayFlow は以下の用途に最適です:
357
+ `switcherMode` オプションは、ヘッダーのビュースイッチャーのレンダリング方法を制御します。
119
358
 
120
- - 📅 **スケジューリングアプリ**:スタッフシフト、予約管理、授業予定
121
- - 🎫 **イベント管理**:会議、イベントカレンダー、フェスティバル
122
- - 🏢 **プロジェクト管理**:タイムライン表示、タスクスケジューリング
123
- - 💼 **ビジネス**:会議室やリソースの予約、可用性管理
359
+ DayFlow は2つの組み込みモードを提供します:
124
360
 
125
- ## 🌟 ハイライト
361
+ - **`buttons`**: 水平ボタンタブ(デフォルト、デスクトップに最適)
126
362
 
127
- - **TypeScript 対応**
128
- - ✅ **ドラッグ&ドロップ**
129
- - ✅ **バーチャルスクロール**
130
- - ✅ **プラグインシステム**
131
- - ✅ **最新の React Hooks (18+)**
132
- - ✅ **Tailwind CSS による簡単スタイリング**
363
+ <img width="2190" height="406" alt="image" src="https://github.com/user-attachments/assets/a4be37bc-90ac-4872-afa0-589e3d1f7e9b" />
133
364
 
134
- ## 🤝 コントリビューション
365
+ - **`select`**: ドロップダウンメニュー(省スペース、モバイルフレンドリー)
135
366
 
136
- Pull Request 大歓迎です。ぜひ貢献してください。
367
+ <img width="2186" height="420" alt="image" src="https://github.com/user-attachments/assets/28e321ae-6c56-441a-a9fc-ddcfa504c920" />
137
368
 
138
- ## 🐛 バグ報告
369
+ ---
139
370
 
140
- 問題を見つけた場合は [GitHub Issues](https://github.com/dayflow-js/dayflow/issues) へ。
371
+ ## コントリビューション
141
372
 
142
- ## 📮 サポート
373
+ コントリビューションは大歓迎です!お気軽に Pull Request を送信してください。
143
374
 
144
- 質問があれば GitHub で Issue を立てるか Discord に参加してください。
375
+ ## バグ報告
145
376
 
146
- ---
377
+ バグを見つけた場合は、[GitHub Issues](https://github.com/dayflow-js/dayflow/issues) で問題を報告してください。
378
+
379
+ ## サポート
380
+
381
+ 質問やサポートについては、GitHub で Issue を開くか、Discord に参加してください。
147
382
 
148
- Jayce Li が ❤️ を込めて開発しました。
383
+ ---