@gunjo/ui 0.0.1-alpha.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.
- package/README.md +129 -0
- package/design/atoms-metadata.json +82 -0
- package/design/molecules-metadata.json +130 -0
- package/design/organisms-metadata.json +38 -0
- package/design/templates-metadata.json +38 -0
- package/package.json +158 -0
- package/src/components/atoms/Alert.tsx +63 -0
- package/src/components/atoms/Avatar.tsx +57 -0
- package/src/components/atoms/Badge.tsx +30 -0
- package/src/components/atoms/Button.tsx +29 -0
- package/src/components/atoms/ButtonVariants.ts +37 -0
- package/src/components/atoms/Checkbox.tsx +52 -0
- package/src/components/atoms/Img.tsx +102 -0
- package/src/components/atoms/Input.tsx +37 -0
- package/src/components/atoms/Kbd.tsx +22 -0
- package/src/components/atoms/Label.tsx +22 -0
- package/src/components/atoms/Progress.tsx +38 -0
- package/src/components/atoms/RadioGroup.tsx +86 -0
- package/src/components/atoms/Select.tsx +28 -0
- package/src/components/atoms/Separator.tsx +33 -0
- package/src/components/atoms/Skeleton.tsx +36 -0
- package/src/components/atoms/Slider.tsx +26 -0
- package/src/components/atoms/Spinner.tsx +34 -0
- package/src/components/atoms/Switch.tsx +47 -0
- package/src/components/atoms/Textarea.tsx +34 -0
- package/src/components/atoms/ToggleGroup.tsx +60 -0
- package/src/components/atoms/ToolPill.tsx +77 -0
- package/src/components/atoms/generated/default-variant-keys.ts +36 -0
- package/src/components/atoms/generated/variant-keys.ts +61 -0
- package/src/components/generated/component-manifest.ts +741 -0
- package/src/components/generated/component-style-hints.ts +1262 -0
- package/src/components/molecules/AIChatInput.tsx +140 -0
- package/src/components/molecules/AIChatMessage.tsx +109 -0
- package/src/components/molecules/Accordion.tsx +99 -0
- package/src/components/molecules/Breadcrumb.tsx +115 -0
- package/src/components/molecules/Calendar.tsx +60 -0
- package/src/components/molecules/Card.tsx +78 -0
- package/src/components/molecules/Carousel.tsx +261 -0
- package/src/components/molecules/Command.tsx +152 -0
- package/src/components/molecules/ContextMenu.tsx +200 -0
- package/src/components/molecules/Dialog.tsx +122 -0
- package/src/components/molecules/DropdownMenu.tsx +200 -0
- package/src/components/molecules/FilterButton.tsx +133 -0
- package/src/components/molecules/Form.tsx +90 -0
- package/src/components/molecules/HoverCard.tsx +29 -0
- package/src/components/molecules/List.tsx +120 -0
- package/src/components/molecules/Menubar.tsx +231 -0
- package/src/components/molecules/Modal.tsx +66 -0
- package/src/components/molecules/NotificationCenter.tsx +118 -0
- package/src/components/molecules/Pagination.tsx +118 -0
- package/src/components/molecules/Popover.tsx +31 -0
- package/src/components/molecules/ProgressWidget.tsx +40 -0
- package/src/components/molecules/Resizable.tsx +47 -0
- package/src/components/molecules/ScrollArea.tsx +48 -0
- package/src/components/molecules/Sheet.tsx +140 -0
- package/src/components/molecules/SidebarItem.tsx +134 -0
- package/src/components/molecules/SortButton.tsx +56 -0
- package/src/components/molecules/StatusBar.tsx +41 -0
- package/src/components/molecules/Stepper.tsx +108 -0
- package/src/components/molecules/Table.tsx +117 -0
- package/src/components/molecules/Tabs.tsx +64 -0
- package/src/components/molecules/Toast.tsx +57 -0
- package/src/components/molecules/Tooltip.tsx +30 -0
- package/src/components/molecules/generated/default-variant-keys.ts +22 -0
- package/src/components/molecules/generated/variant-keys.ts +33 -0
- package/src/components/organisms/AppRail.tsx +28 -0
- package/src/components/organisms/CommandPalette.tsx +58 -0
- package/src/components/organisms/FileUploader.tsx +151 -0
- package/src/components/organisms/FloatingPanel.tsx +46 -0
- package/src/components/organisms/InspectorPanel.tsx +65 -0
- package/src/components/organisms/RightRail.tsx +29 -0
- package/src/components/organisms/ShareModal.tsx +182 -0
- package/src/components/organisms/SpatialCanvas.tsx +36 -0
- package/src/components/organisms/ToastProvider.tsx +49 -0
- package/src/components/templates/AuthTemplate.tsx +58 -0
- package/src/components/templates/BannalyzeTemplate.tsx +55 -0
- package/src/components/templates/ChatTemplate.tsx +55 -0
- package/src/components/templates/DashboardTemplate.tsx +34 -0
- package/src/components/templates/EditorTemplate.tsx +46 -0
- package/src/components/templates/KanbanTemplate.tsx +38 -0
- package/src/components/templates/LandingTemplate.tsx +53 -0
- package/src/components/templates/MediaLibraryTemplate.tsx +55 -0
- package/src/components/templates/SettingsTemplate.tsx +48 -0
- package/src/globals.css +108 -0
- package/src/index.ts +89 -0
- package/src/lib/utils.ts +6 -0
- package/tailwind-preset.js +11 -0
- package/tailwind-theme-extend.cjs +86 -0
package/README.md
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# @gunjo/ui
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@gunjo/ui)
|
|
4
|
+
|
|
5
|
+
> ⚠️ **Early alpha** — `0.0.1-alpha.0` は名前確保とドライラン目的の初回 publish です。API は今後変更される可能性があります。本格採用は `1.0.0` stable リリース以降を推奨。
|
|
6
|
+
|
|
7
|
+
SSOT-driven な React + Tailwind デザインシステム。Pen / source / docs の 3 軸で整合性検証された 70 コンポーネントを提供。
|
|
8
|
+
|
|
9
|
+
## 📘 デザイン仕様(正式)
|
|
10
|
+
|
|
11
|
+
- UI デザイン仕様の正式ドキュメントは [DESIGN.md](./DESIGN.md) を参照してください。
|
|
12
|
+
- SSOT 運用・同期手順は [design/README.md](./design/README.md) を参照してください。
|
|
13
|
+
- 今回対応の概要と運用 RUNBOOK は [SSOT_RUNBOOK.md](./SSOT_RUNBOOK.md) を参照してください。
|
|
14
|
+
- コンポーネント突合表(Source / Docs / Pen)は [COMPONENT_COVERAGE_MATRIX.md](./COMPONENT_COVERAGE_MATRIX.md) を参照してください。
|
|
15
|
+
- 視覚監査台帳(docs vs pen)は [COMPONENT_VISUAL_AUDIT.md](./COMPONENT_VISUAL_AUDIT.md) を参照してください。
|
|
16
|
+
|
|
17
|
+
## 🚀 採用ガイド(他プロジェクトから使う)
|
|
18
|
+
|
|
19
|
+
GunjoUI を別アプリに導入したい場合:
|
|
20
|
+
|
|
21
|
+
- [docs/adoption.md](./docs/adoption.md) — **5 分インストール**(ここから始める)
|
|
22
|
+
- [docs/adoption-strategy.md](./docs/adoption-strategy.md) — 配布形態の決定書
|
|
23
|
+
- [docs/migration-playbook.md](./docs/migration-playbook.md) — 既存アプリの段階移行
|
|
24
|
+
- [docs/dependencies.md](./docs/dependencies.md) — peer dependency 範囲とテスト済み組み合わせ
|
|
25
|
+
- [docs/versioning.md](./docs/versioning.md) — semver 運用と破壊的変更ポリシー
|
|
26
|
+
|
|
27
|
+
GunjoUI に新規コンポーネントを足したい場合:
|
|
28
|
+
|
|
29
|
+
- [docs/component-addition.md](./docs/component-addition.md) — SSOT 三軸(pen + source + docs)で追加する手順
|
|
30
|
+
|
|
31
|
+
## 📦 セットアップ
|
|
32
|
+
|
|
33
|
+
### 依存関係のインストール
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
cd gunjo
|
|
37
|
+
npm install
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### 型チェック
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
npm run type-check
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## 🚀 ドキュメントサイトの起動
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
npm run dev
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
ドキュメントサイトは `http://localhost:13030` で起動します。
|
|
53
|
+
|
|
54
|
+
## 📚 使用方法(ライブラリとして)
|
|
55
|
+
|
|
56
|
+
### インストール(他のプロジェクトから)
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
# npm から(推奨)
|
|
60
|
+
npm install @gunjo/ui
|
|
61
|
+
|
|
62
|
+
# ローカルパスで(開発時)
|
|
63
|
+
npm install file:../gunjo
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
> **重要**:採用先 Next.js では `next.config.ts` に `transpilePackages: ["@gunjo/ui"]` を追加してください(本パッケージは TypeScript ソースを直接配布するため)。詳細は [docs/adoption.md §2](./docs/adoption.md#2-nextjs-設定必須)。
|
|
67
|
+
|
|
68
|
+
### インポート
|
|
69
|
+
|
|
70
|
+
```typescript
|
|
71
|
+
// コンポーネント
|
|
72
|
+
import { Button, Input, Card } from '@gunjo/ui';
|
|
73
|
+
|
|
74
|
+
// スタイル
|
|
75
|
+
import '@gunjo/ui/styles';
|
|
76
|
+
|
|
77
|
+
// Tailwindプリセット
|
|
78
|
+
import gunjoPreset from '@gunjo/ui/tailwind-preset';
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## ✅ 完全独立
|
|
82
|
+
|
|
83
|
+
- ✅ 他のパッケージへの依存なし
|
|
84
|
+
- ✅ 相対パスはすべて `gunjo/` ディレクトリ内
|
|
85
|
+
- ✅ どこに移動しても動作します
|
|
86
|
+
- ✅ `npm install` で依存関係をインストール可能
|
|
87
|
+
- ✅ ドキュメントサイトも含まれています
|
|
88
|
+
|
|
89
|
+
## 🤖 AIエディタでの利用
|
|
90
|
+
|
|
91
|
+
コンポーネントは **AI エディタ(Cursor 等)で読み出して使いやすい** 構成にしています。
|
|
92
|
+
|
|
93
|
+
- **単一エントリ**: すべての公開 API を `src/index.ts` から re-export しているため、`import { Button, Card } from '@gunjo/ui'` の形で一覧・利用しやすい
|
|
94
|
+
- **TypeScript**: 各コンポーネントの props が型付けされており、補完・推論がしやすい
|
|
95
|
+
- **Atomic Design**: Atoms / Molecules / Organisms / Templates で整理され、役割ごとに検索しやすい
|
|
96
|
+
- **Radix UI ベース**: アクセシビリティ(ARIA・キーボード操作)を考慮した構造で、意味の読み取りがしやすい
|
|
97
|
+
|
|
98
|
+
利用時は `@gunjo/ui` から必要なコンポーネントを import し、`@gunjo/ui/styles` と Tailwind プリセットを併用してください。
|
|
99
|
+
|
|
100
|
+
## 📁 構造
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
gunjo/
|
|
104
|
+
├── src/ # コンポーネントライブラリ
|
|
105
|
+
│ ├── components/
|
|
106
|
+
│ │ ├── atoms/ # 原子コンポーネント
|
|
107
|
+
│ │ ├── molecules/ # 分子コンポーネント
|
|
108
|
+
│ │ ├── organisms/ # 有機体コンポーネント
|
|
109
|
+
│ │ └── templates/ # テンプレート
|
|
110
|
+
│ ├── lib/ # ユーティリティ
|
|
111
|
+
│ ├── globals.css # グローバルスタイル
|
|
112
|
+
│ └── index.ts # エクスポート
|
|
113
|
+
├── docs/ # ドキュメントサイト(Next.js)
|
|
114
|
+
│ ├── app/ # Next.jsアプリ
|
|
115
|
+
│ ├── components/ # ドキュメント用コンポーネント
|
|
116
|
+
│ └── lib/ # ドキュメント用ユーティリティ
|
|
117
|
+
├── public/ # 静的ファイル
|
|
118
|
+
├── tailwind-preset.js # Tailwindプリセット
|
|
119
|
+
├── next.config.ts # Next.js設定
|
|
120
|
+
├── postcss.config.mjs # PostCSS設定
|
|
121
|
+
├── package.json
|
|
122
|
+
└── tsconfig.json
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## 📝 注意事項
|
|
126
|
+
|
|
127
|
+
- ライブラリとして使用する場合: `src/` からコンポーネントをインポート
|
|
128
|
+
- ドキュメントサイトを起動する場合: `npm run dev` で起動
|
|
129
|
+
- すべての依存関係は `package.json` に含まれています
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"button": {
|
|
3
|
+
"title": "Button",
|
|
4
|
+
"description": "Displays a button or a component that looks like a button."
|
|
5
|
+
},
|
|
6
|
+
"input": {
|
|
7
|
+
"title": "Input",
|
|
8
|
+
"description": "Displays a form input field or a component that looks like an input field."
|
|
9
|
+
},
|
|
10
|
+
"badge": {
|
|
11
|
+
"title": "Badge",
|
|
12
|
+
"description": "Displays a badge or a component that looks like a badge."
|
|
13
|
+
},
|
|
14
|
+
"label": {
|
|
15
|
+
"title": "Label",
|
|
16
|
+
"description": "Renders an accessible label associated with controls."
|
|
17
|
+
},
|
|
18
|
+
"checkbox": {
|
|
19
|
+
"title": "Checkbox",
|
|
20
|
+
"description": "A control that allows the user to toggle between checked and not checked."
|
|
21
|
+
},
|
|
22
|
+
"separator": {
|
|
23
|
+
"title": "Separator",
|
|
24
|
+
"description": "Visually or semantically separates content."
|
|
25
|
+
},
|
|
26
|
+
"switch": {
|
|
27
|
+
"title": "Switch",
|
|
28
|
+
"description": "A control that allows the user to toggle between checked and not checked."
|
|
29
|
+
},
|
|
30
|
+
"textarea": {
|
|
31
|
+
"title": "Textarea",
|
|
32
|
+
"description": "Displays a form textarea or a component that looks like a textarea."
|
|
33
|
+
},
|
|
34
|
+
"alert": {
|
|
35
|
+
"title": "Alert",
|
|
36
|
+
"description": "Displays a callout for user attention."
|
|
37
|
+
},
|
|
38
|
+
"avatar": {
|
|
39
|
+
"title": "Avatar",
|
|
40
|
+
"description": "An image element with a fallback for representing the user."
|
|
41
|
+
},
|
|
42
|
+
"kbd": {
|
|
43
|
+
"title": "Kbd",
|
|
44
|
+
"description": "Displays a keyboard shortcut key."
|
|
45
|
+
},
|
|
46
|
+
"img": {
|
|
47
|
+
"title": "Img",
|
|
48
|
+
"description": "An enhanced image component with loading skeleton and error fallback."
|
|
49
|
+
},
|
|
50
|
+
"progress": {
|
|
51
|
+
"title": "Progress",
|
|
52
|
+
"description": "Displays an indicator showing the completion progress of a task, typically displayed as a progress bar."
|
|
53
|
+
},
|
|
54
|
+
"spinner": {
|
|
55
|
+
"title": "Spinner",
|
|
56
|
+
"description": "A visual indicator that content is being loaded."
|
|
57
|
+
},
|
|
58
|
+
"radioGroup": {
|
|
59
|
+
"title": "RadioGroup",
|
|
60
|
+
"description": "A set of checkable buttons—known as radio buttons—where no more than one of the buttons can be checked at a time."
|
|
61
|
+
},
|
|
62
|
+
"slider": {
|
|
63
|
+
"title": "Slider",
|
|
64
|
+
"description": "An input where the user selects a value from within a given range."
|
|
65
|
+
},
|
|
66
|
+
"select": {
|
|
67
|
+
"title": "Select",
|
|
68
|
+
"description": "Displays a list of options for the user to pick from."
|
|
69
|
+
},
|
|
70
|
+
"toggleGroup": {
|
|
71
|
+
"title": "ToggleGroup",
|
|
72
|
+
"description": "A set of two-state buttons that can be toggled on or off."
|
|
73
|
+
},
|
|
74
|
+
"toolPill": {
|
|
75
|
+
"title": "ToolPill",
|
|
76
|
+
"description": "Compact icon pill used for toolbar quick actions with active and danger states."
|
|
77
|
+
},
|
|
78
|
+
"skeleton": {
|
|
79
|
+
"title": "Skeleton",
|
|
80
|
+
"description": "Loading placeholder for content while it is being fetched."
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
{
|
|
2
|
+
"card": {
|
|
3
|
+
"title": "Card",
|
|
4
|
+
"description": "Displays a card with header, content, and footer."
|
|
5
|
+
},
|
|
6
|
+
"list": {
|
|
7
|
+
"title": "List",
|
|
8
|
+
"description": "A semantic list component with customizable markers and spacing."
|
|
9
|
+
},
|
|
10
|
+
"accordion": {
|
|
11
|
+
"title": "Accordion",
|
|
12
|
+
"description": "A vertically stacked set of interactive headings that each reveal a section of content."
|
|
13
|
+
},
|
|
14
|
+
"breadcrumb": {
|
|
15
|
+
"title": "Breadcrumb",
|
|
16
|
+
"description": "Displays the path to the current resource using a hierarchy of links."
|
|
17
|
+
},
|
|
18
|
+
"dropdownMenu": {
|
|
19
|
+
"title": "Dropdown Menu",
|
|
20
|
+
"description": "Displays a menu to the user—such as a set of actions or functions—triggered by a button."
|
|
21
|
+
},
|
|
22
|
+
"popover": {
|
|
23
|
+
"title": "Popover",
|
|
24
|
+
"description": "Displays rich content in a portal, triggered by a button."
|
|
25
|
+
},
|
|
26
|
+
"command": {
|
|
27
|
+
"title": "Command",
|
|
28
|
+
"description": "Fast, composable, unstyled command menu for React."
|
|
29
|
+
},
|
|
30
|
+
"calendar": {
|
|
31
|
+
"title": "Calendar",
|
|
32
|
+
"description": "A date field component that allows users to enter and edit date."
|
|
33
|
+
},
|
|
34
|
+
"table": {
|
|
35
|
+
"title": "Table",
|
|
36
|
+
"description": "A responsive table component."
|
|
37
|
+
},
|
|
38
|
+
"tabs": {
|
|
39
|
+
"title": "Tabs",
|
|
40
|
+
"description": "A set of layered sections of content—known as tab panels—that are displayed one at a time."
|
|
41
|
+
},
|
|
42
|
+
"toast": {
|
|
43
|
+
"title": "Toast",
|
|
44
|
+
"description": "Transient feedback message with semantic variants."
|
|
45
|
+
},
|
|
46
|
+
"modal": {
|
|
47
|
+
"title": "Modal",
|
|
48
|
+
"description": "Dialog surface with header, content, and optional footer actions."
|
|
49
|
+
},
|
|
50
|
+
"carousel": {
|
|
51
|
+
"title": "Carousel",
|
|
52
|
+
"description": "Embla-powered slider with keyboard and arrow controls."
|
|
53
|
+
},
|
|
54
|
+
"pagination": {
|
|
55
|
+
"title": "Pagination",
|
|
56
|
+
"description": "Navigation controls for traversing paged content."
|
|
57
|
+
},
|
|
58
|
+
"notificationCenter": {
|
|
59
|
+
"title": "Notification Center",
|
|
60
|
+
"description": "Popover-based inbox for unread activity and quick actions."
|
|
61
|
+
},
|
|
62
|
+
"dialog": {
|
|
63
|
+
"title": "Dialog",
|
|
64
|
+
"description": "Centered modal dialog with overlay, header, and footer actions."
|
|
65
|
+
},
|
|
66
|
+
"sheet": {
|
|
67
|
+
"title": "Sheet",
|
|
68
|
+
"description": "Side panel variant with overlay, heading, and action area."
|
|
69
|
+
},
|
|
70
|
+
"tooltip": {
|
|
71
|
+
"title": "Tooltip",
|
|
72
|
+
"description": "Compact helper text bubble for hover and focus states."
|
|
73
|
+
},
|
|
74
|
+
"hoverCard": {
|
|
75
|
+
"title": "HoverCard",
|
|
76
|
+
"description": "Rich hover content with compact profile-like layout."
|
|
77
|
+
},
|
|
78
|
+
"contextMenu": {
|
|
79
|
+
"title": "ContextMenu",
|
|
80
|
+
"description": "Right-click style action list with labels and nested trigger."
|
|
81
|
+
},
|
|
82
|
+
"menubar": {
|
|
83
|
+
"title": "Menubar",
|
|
84
|
+
"description": "Top application menu with trigger items and nested submenu entry."
|
|
85
|
+
},
|
|
86
|
+
"scrollArea": {
|
|
87
|
+
"title": "ScrollArea",
|
|
88
|
+
"description": "Custom scrollbar container with viewport and thumb controls."
|
|
89
|
+
},
|
|
90
|
+
"resizable": {
|
|
91
|
+
"title": "Resizable",
|
|
92
|
+
"description": "Pane group with draggable handle and optional grip indicator."
|
|
93
|
+
},
|
|
94
|
+
"statusBar": {
|
|
95
|
+
"title": "StatusBar",
|
|
96
|
+
"description": "Bottom fixed utility bar with left, center and right regions."
|
|
97
|
+
},
|
|
98
|
+
"sidebarItem": {
|
|
99
|
+
"title": "SidebarItem",
|
|
100
|
+
"description": "Nested sidebar row with chevron, icon, label, and counter area."
|
|
101
|
+
},
|
|
102
|
+
"aiChatInput": {
|
|
103
|
+
"title": "AIChatInput",
|
|
104
|
+
"description": "Composer row with attachments, autosizing textarea, and send/stop actions."
|
|
105
|
+
},
|
|
106
|
+
"aiChatMessage": {
|
|
107
|
+
"title": "AIChatMessage",
|
|
108
|
+
"description": "Chat row for user/assistant with avatar, bubble, and action controls."
|
|
109
|
+
},
|
|
110
|
+
"filterButton": {
|
|
111
|
+
"title": "FilterButton",
|
|
112
|
+
"description": "Filter trigger with dashed border, count badge, and command popover list."
|
|
113
|
+
},
|
|
114
|
+
"sortButton": {
|
|
115
|
+
"title": "SortButton",
|
|
116
|
+
"description": "Three-state sort trigger (none, asc, desc) with icon + text."
|
|
117
|
+
},
|
|
118
|
+
"progressWidget": {
|
|
119
|
+
"title": "ProgressWidget",
|
|
120
|
+
"description": "Metric card showing title, value, progress bar, and optional subtext."
|
|
121
|
+
},
|
|
122
|
+
"stepper": {
|
|
123
|
+
"title": "Stepper",
|
|
124
|
+
"description": "A multi-step progress indicator with completed, current, and upcoming states."
|
|
125
|
+
},
|
|
126
|
+
"form": {
|
|
127
|
+
"title": "Form",
|
|
128
|
+
"description": "Compound form primitives: Form / FormField / FormLabel / FormControl / FormDescription / FormMessage."
|
|
129
|
+
}
|
|
130
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"appRail": {
|
|
3
|
+
"title": "App Rail",
|
|
4
|
+
"description": "Primary vertical icon rail used for application-wide navigation."
|
|
5
|
+
},
|
|
6
|
+
"commandPalette": {
|
|
7
|
+
"title": "Command Palette",
|
|
8
|
+
"description": "Global quick-action launcher with grouped commands and keyboard shortcuts."
|
|
9
|
+
},
|
|
10
|
+
"rightRail": {
|
|
11
|
+
"title": "Right Rail",
|
|
12
|
+
"description": "Secondary side panel for contextual tools and inspector content."
|
|
13
|
+
},
|
|
14
|
+
"floatingPanel": {
|
|
15
|
+
"title": "Floating Panel",
|
|
16
|
+
"description": "Animated floating container for transient UI surfaces."
|
|
17
|
+
},
|
|
18
|
+
"inspectorPanel": {
|
|
19
|
+
"title": "Inspector Panel",
|
|
20
|
+
"description": "Structured side panel for detailed property editing."
|
|
21
|
+
},
|
|
22
|
+
"spatialCanvas": {
|
|
23
|
+
"title": "Spatial Canvas",
|
|
24
|
+
"description": "Large grid-based interaction surface for node and layout editing."
|
|
25
|
+
},
|
|
26
|
+
"shareModal": {
|
|
27
|
+
"title": "Share Modal",
|
|
28
|
+
"description": "Dialog for toggling public access and copying shareable URLs."
|
|
29
|
+
},
|
|
30
|
+
"fileUploader": {
|
|
31
|
+
"title": "File Uploader",
|
|
32
|
+
"description": "Drag-and-drop file intake with compact list rendering."
|
|
33
|
+
},
|
|
34
|
+
"toastProvider": {
|
|
35
|
+
"title": "Toast Provider",
|
|
36
|
+
"description": "Global toast stack manager for showing transient feedback messages."
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"dashboardTemplate": {
|
|
3
|
+
"title": "Dashboard Template",
|
|
4
|
+
"description": "Two-column dashboard shell with optional header and sidebar."
|
|
5
|
+
},
|
|
6
|
+
"editorTemplate": {
|
|
7
|
+
"title": "Editor Template",
|
|
8
|
+
"description": "Panel-based editing layout with top bar and side docks."
|
|
9
|
+
},
|
|
10
|
+
"landingTemplate": {
|
|
11
|
+
"title": "Landing Template",
|
|
12
|
+
"description": "Marketing page skeleton with sticky header and section rhythm."
|
|
13
|
+
},
|
|
14
|
+
"authTemplate": {
|
|
15
|
+
"title": "Auth Template",
|
|
16
|
+
"description": "Split authentication layout with branded panel and centered form."
|
|
17
|
+
},
|
|
18
|
+
"kanbanTemplate": {
|
|
19
|
+
"title": "Kanban Template",
|
|
20
|
+
"description": "Board workflow shell with optional sidebar and horizontal columns."
|
|
21
|
+
},
|
|
22
|
+
"chatTemplate": {
|
|
23
|
+
"title": "Chat Template",
|
|
24
|
+
"description": "Conversation layout with channel rail, message area, and detail pane."
|
|
25
|
+
},
|
|
26
|
+
"settingsTemplate": {
|
|
27
|
+
"title": "Settings Template",
|
|
28
|
+
"description": "Responsive settings layout with mobile stack and desktop split view."
|
|
29
|
+
},
|
|
30
|
+
"bannalyzeTemplate": {
|
|
31
|
+
"title": "Bannalyze Template",
|
|
32
|
+
"description": "Three-region analysis workspace with center canvas and side inspectors."
|
|
33
|
+
},
|
|
34
|
+
"mediaLibraryTemplate": {
|
|
35
|
+
"title": "Media Library Template",
|
|
36
|
+
"description": "Asset management workspace with folders, grid area, and details pane."
|
|
37
|
+
}
|
|
38
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@gunjo/ui",
|
|
3
|
+
"version": "0.0.1-alpha.0",
|
|
4
|
+
"description": "GunjoUI — SSOT-driven React + Tailwind design system. Pen / source / docs three-axis verified. Early alpha: API may change. See docs/adoption.md to consume from another project.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"design-system",
|
|
7
|
+
"react",
|
|
8
|
+
"tailwindcss",
|
|
9
|
+
"radix-ui",
|
|
10
|
+
"shadcn",
|
|
11
|
+
"ssot"
|
|
12
|
+
],
|
|
13
|
+
"main": "src/index.ts",
|
|
14
|
+
"types": "src/index.ts",
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"private": false,
|
|
17
|
+
"publishConfig": {
|
|
18
|
+
"access": "public"
|
|
19
|
+
},
|
|
20
|
+
"exports": {
|
|
21
|
+
".": "./src/index.ts",
|
|
22
|
+
"./styles": "./src/globals.css",
|
|
23
|
+
"./tailwind-preset": "./tailwind-preset.js",
|
|
24
|
+
"./tailwind-theme-extend": "./tailwind-theme-extend.cjs"
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"src",
|
|
28
|
+
"tailwind-preset.js",
|
|
29
|
+
"tailwind-theme-extend.cjs",
|
|
30
|
+
"design/atoms-metadata.json",
|
|
31
|
+
"design/molecules-metadata.json",
|
|
32
|
+
"design/organisms-metadata.json",
|
|
33
|
+
"design/templates-metadata.json"
|
|
34
|
+
],
|
|
35
|
+
"scripts": {
|
|
36
|
+
"type-check": "tsc --noEmit --incremental false",
|
|
37
|
+
"dev": "next dev -p 13030",
|
|
38
|
+
"build": "next build",
|
|
39
|
+
"start": "next start",
|
|
40
|
+
"lint": "eslint",
|
|
41
|
+
"prepare": "npm run hooks:install",
|
|
42
|
+
"hooks:install": "node scripts/install-git-hooks.mjs",
|
|
43
|
+
"design:sync": "node scripts/design-sync.mjs",
|
|
44
|
+
"design:sync:tokens": "node scripts/design-sync.mjs --tokens",
|
|
45
|
+
"design:sync:metadata": "node scripts/design-sync.mjs --metadata",
|
|
46
|
+
"design:sync:components": "node scripts/design-sync.mjs --components",
|
|
47
|
+
"design:sync:docs-navigation": "node scripts/design-sync.mjs --docs-navigation",
|
|
48
|
+
"design:sync:docs-pages": "node scripts/design-sync.mjs --docs-pages",
|
|
49
|
+
"design:sync:docs-pages:refresh": "node scripts/design-sync.mjs --docs-pages --refresh-generated",
|
|
50
|
+
"design:sync:stubs": "node scripts/design-sync.mjs --stubs",
|
|
51
|
+
"design:sync:stubs:refresh": "node scripts/design-sync.mjs --stubs --refresh-generated",
|
|
52
|
+
"design:sync:stubs:production": "node scripts/design-sync.mjs --stubs --production-stubs",
|
|
53
|
+
"design:sync:stubs:production:refresh": "node scripts/design-sync.mjs --stubs --refresh-generated --production-stubs",
|
|
54
|
+
"design:sync:from-metadata": "node scripts/design-sync.mjs --from-metadata",
|
|
55
|
+
"design:verify": "node scripts/design-verify.mjs",
|
|
56
|
+
"design:verify:metadata-map": "node scripts/design-verify-metadata-map-coverage.mjs",
|
|
57
|
+
"design:verify:coverage": "node scripts/design-verify-spec-coverage.mjs",
|
|
58
|
+
"design:verify:docs-metadata": "node scripts/design-verify-docs-metadata-coverage.mjs",
|
|
59
|
+
"design:verify:docs-content-ssot": "node scripts/design-verify-docs-content-ssot.mjs",
|
|
60
|
+
"design:verify:docs-navigation": "node scripts/design-verify-docs-navigation-coverage.mjs",
|
|
61
|
+
"design:verify:docs-spec-imports": "node scripts/design-verify-docs-spec-imports.mjs",
|
|
62
|
+
"design:verify:nav-translations": "node scripts/design-verify-nav-translation-coverage.mjs",
|
|
63
|
+
"design:verify:node-snapshots": "node scripts/design-verify-node-snapshot-coverage.mjs",
|
|
64
|
+
"design:verify:slot-nodes": "node scripts/design-verify-slot-node-coverage.mjs",
|
|
65
|
+
"design:verify:atom-variant-keys": "node scripts/design-verify-atom-variant-key-coverage.mjs",
|
|
66
|
+
"design:verify:atom-generated-variant-keys": "node scripts/design-verify-atom-generated-variant-key-coverage.mjs",
|
|
67
|
+
"design:verify:atom-generated-variant-key-usage": "node scripts/design-verify-atom-generated-variant-key-usage.mjs",
|
|
68
|
+
"design:verify:molecule-variant-keys": "node scripts/design-verify-molecule-variant-key-coverage.mjs",
|
|
69
|
+
"design:verify:molecule-generated-variant-key-usage": "node scripts/design-verify-molecule-generated-variant-key-usage.mjs",
|
|
70
|
+
"design:verify:default-variant-keys": "node scripts/design-verify-default-variant-key-coverage.mjs",
|
|
71
|
+
"design:verify:default-variant-key-usage": "node scripts/design-verify-default-variant-key-usage.mjs",
|
|
72
|
+
"design:verify:component-style-hints": "node scripts/design-verify-component-style-hints-coverage.mjs",
|
|
73
|
+
"design:verify:component-style-drift-report": "node scripts/design-verify-component-style-drift-report.mjs",
|
|
74
|
+
"design:verify:component-style-drift": "node scripts/design-verify-component-style-drift-report.mjs --strict",
|
|
75
|
+
"design:verify:component-style-drift:scoped": "node scripts/design-verify-component-style-drift-report.mjs --strict --strict-target-policy",
|
|
76
|
+
"design:verify:hardcoded-color-classes": "node scripts/design-verify-hardcoded-color-classes.mjs",
|
|
77
|
+
"design:verify:tailwind-color-tokens": "node scripts/design-verify-tailwind-color-tokens.mjs",
|
|
78
|
+
"design:verify:tailwind-foundation-tokens": "node scripts/design-verify-tailwind-foundation-tokens.mjs",
|
|
79
|
+
"design:verify:tailwind-theme-ssot": "node scripts/design-verify-tailwind-theme-ssot.mjs",
|
|
80
|
+
"design:verify:tailwind-preset-plugins": "node scripts/design-verify-tailwind-preset-plugins.mjs",
|
|
81
|
+
"design:verify:css-vars": "node scripts/design-verify-css-variable-coverage.mjs",
|
|
82
|
+
"design:verify:app-globals": "node scripts/design-verify-app-globals-sync.mjs",
|
|
83
|
+
"design:verify:generated-stubs": "node scripts/design-verify-generated-stub-coverage.mjs",
|
|
84
|
+
"design:verify:generated-stubs:report": "node scripts/design-verify-generated-stub-coverage.mjs --report",
|
|
85
|
+
"design:verify:generated-docs-pages": "node scripts/design-verify-generated-docs-page-coverage.mjs",
|
|
86
|
+
"design:verify:generated-docs-pages:report": "node scripts/design-verify-generated-docs-page-coverage.mjs --report",
|
|
87
|
+
"design:verify:generated-artifacts:report": "node scripts/design-verify-generated-artifacts-report.mjs",
|
|
88
|
+
"design:verify:ssot-progress-report": "node scripts/design-verify-ssot-progress-report.mjs",
|
|
89
|
+
"design:verify:ssot-progress-report:json": "node scripts/design-verify-ssot-progress-report.mjs --json",
|
|
90
|
+
"design:verify:ssot-progress-summary": "node scripts/design-verify-ssot-progress-summary.mjs",
|
|
91
|
+
"design:verify:ssot-progress-diff": "node scripts/design-verify-ssot-progress-diff.mjs",
|
|
92
|
+
"design:verify:ssot-progress-regressions": "node scripts/design-verify-ssot-progress-regressions.mjs",
|
|
93
|
+
"design:verify:ssot-progress-regression-summary": "node scripts/design-verify-ssot-progress-regression-summary.mjs",
|
|
94
|
+
"design:verify:ssot-progress-pr-comment": "node scripts/design-verify-ssot-progress-pr-comment.mjs",
|
|
95
|
+
"design:verify:ssot-progress-thresholds": "node scripts/design-verify-ssot-progress-thresholds.mjs",
|
|
96
|
+
"design:verify:ssot-pr-comment-docs": "node scripts/design-verify-ssot-pr-comment-docs.mjs",
|
|
97
|
+
"design:report:component-coverage": "node scripts/design-generate-component-coverage-matrix.mjs",
|
|
98
|
+
"design:audit:docs-capture": "node scripts/design-capture-doc-component-screenshots.mjs",
|
|
99
|
+
"design:audit:checklist": "node scripts/design-generate-visual-audit-checklist.mjs",
|
|
100
|
+
"design:audit:refresh": "npm run -s design:audit:docs-capture && npm run -s design:audit:checklist",
|
|
101
|
+
"design:verify:components": "node scripts/design-verify-components.mjs",
|
|
102
|
+
"design:verify:molecules": "node scripts/design-verify-molecule-drift.mjs",
|
|
103
|
+
"design:verify:organisms": "node scripts/design-verify-organism-drift.mjs",
|
|
104
|
+
"design:verify:templates": "node scripts/design-verify-template-drift.mjs"
|
|
105
|
+
},
|
|
106
|
+
"peerDependencies": {
|
|
107
|
+
"react": "^19.0.0",
|
|
108
|
+
"react-dom": "^19.0.0",
|
|
109
|
+
"tailwindcss": "^3.0.0 || ^4.0.0"
|
|
110
|
+
},
|
|
111
|
+
"dependencies": {
|
|
112
|
+
"@radix-ui/react-accordion": "^1.2.12",
|
|
113
|
+
"@radix-ui/react-avatar": "^1.1.11",
|
|
114
|
+
"@radix-ui/react-context-menu": "^2.2.16",
|
|
115
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
116
|
+
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
117
|
+
"@radix-ui/react-hover-card": "^1.1.15",
|
|
118
|
+
"@radix-ui/react-menubar": "^1.1.16",
|
|
119
|
+
"@radix-ui/react-popover": "^1.1.15",
|
|
120
|
+
"@radix-ui/react-scroll-area": "^1.2.10",
|
|
121
|
+
"@radix-ui/react-slot": "^1.2.4",
|
|
122
|
+
"@radix-ui/react-tabs": "^1.1.13",
|
|
123
|
+
"@radix-ui/react-toggle-group": "^1.1.11",
|
|
124
|
+
"@radix-ui/react-tooltip": "^1.2.8",
|
|
125
|
+
"@radix-ui/react-visually-hidden": "^1.2.4",
|
|
126
|
+
"class-variance-authority": "^0.7.1",
|
|
127
|
+
"clsx": "^2.1.1",
|
|
128
|
+
"cmdk": "^1.1.1",
|
|
129
|
+
"date-fns": "^4.1.0",
|
|
130
|
+
"embla-carousel-react": "^8.6.0",
|
|
131
|
+
"framer-motion": "^12.0.0",
|
|
132
|
+
"lucide-react": "^0.562.0",
|
|
133
|
+
"next": "16.1.0",
|
|
134
|
+
"next-themes": "^0.4.6",
|
|
135
|
+
"react": "^19.0.0",
|
|
136
|
+
"react-day-picker": "^9.13.0",
|
|
137
|
+
"react-dom": "^19.0.0",
|
|
138
|
+
"react-markdown": "^10.1.0",
|
|
139
|
+
"react-resizable-panels": "^4.0.11",
|
|
140
|
+
"remark-gfm": "^4.0.1",
|
|
141
|
+
"shiki": "^3.20.0",
|
|
142
|
+
"tailwind-merge": "^3.4.0",
|
|
143
|
+
"tailwindcss-animate": "^1.0.7"
|
|
144
|
+
},
|
|
145
|
+
"devDependencies": {
|
|
146
|
+
"@tailwindcss/postcss": "^4.1.18",
|
|
147
|
+
"@types/node": "^20",
|
|
148
|
+
"@types/react": "^19",
|
|
149
|
+
"@types/react-dom": "^19",
|
|
150
|
+
"@types/react-syntax-highlighter": "^15.5.13",
|
|
151
|
+
"eslint": "^9",
|
|
152
|
+
"eslint-config-next": "16.1.0",
|
|
153
|
+
"postcss": "^8.5.6",
|
|
154
|
+
"puppeteer": "^24.41.0",
|
|
155
|
+
"tailwindcss": "^4",
|
|
156
|
+
"typescript": "^5"
|
|
157
|
+
}
|
|
158
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import { cva, type VariantProps } from "class-variance-authority"
|
|
3
|
+
|
|
4
|
+
import { cn } from "../../lib/utils"
|
|
5
|
+
import type { AlertVariantKey } from "./generated/variant-keys"
|
|
6
|
+
import { alertDefaultVariantKey } from "./generated/default-variant-keys"
|
|
7
|
+
|
|
8
|
+
const alertVariantClasses: Record<AlertVariantKey, string> = {
|
|
9
|
+
default: "border-border bg-background text-foreground",
|
|
10
|
+
destructive:
|
|
11
|
+
"border-destructive/20 bg-destructive/10 text-destructive [&>svg]:text-destructive",
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const alertVariants = cva(
|
|
15
|
+
"relative inline-flex h-fit w-[320px] max-w-full items-center gap-1 rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",
|
|
16
|
+
{
|
|
17
|
+
variants: {
|
|
18
|
+
variant: alertVariantClasses,
|
|
19
|
+
},
|
|
20
|
+
defaultVariants: {
|
|
21
|
+
variant: alertDefaultVariantKey,
|
|
22
|
+
},
|
|
23
|
+
}
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
const Alert = React.forwardRef<
|
|
27
|
+
HTMLDivElement,
|
|
28
|
+
React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>
|
|
29
|
+
>(({ className, variant, ...props }, ref) => (
|
|
30
|
+
<div
|
|
31
|
+
ref={ref}
|
|
32
|
+
role="alert"
|
|
33
|
+
className={cn(alertVariants({ variant }), className)}
|
|
34
|
+
{...props}
|
|
35
|
+
/>
|
|
36
|
+
))
|
|
37
|
+
Alert.displayName = "Alert"
|
|
38
|
+
|
|
39
|
+
const AlertTitle = React.forwardRef<
|
|
40
|
+
HTMLParagraphElement,
|
|
41
|
+
React.HTMLAttributes<HTMLHeadingElement>
|
|
42
|
+
>(({ className, ...props }, ref) => (
|
|
43
|
+
<h5
|
|
44
|
+
ref={ref}
|
|
45
|
+
className={cn("mb-1 font-medium leading-none tracking-tight", className)}
|
|
46
|
+
{...props}
|
|
47
|
+
/>
|
|
48
|
+
))
|
|
49
|
+
AlertTitle.displayName = "AlertTitle"
|
|
50
|
+
|
|
51
|
+
const AlertDescription = React.forwardRef<
|
|
52
|
+
HTMLParagraphElement,
|
|
53
|
+
React.HTMLAttributes<HTMLParagraphElement>
|
|
54
|
+
>(({ className, ...props }, ref) => (
|
|
55
|
+
<div
|
|
56
|
+
ref={ref}
|
|
57
|
+
className={cn("text-sm [&_p]:leading-relaxed", className)}
|
|
58
|
+
{...props}
|
|
59
|
+
/>
|
|
60
|
+
))
|
|
61
|
+
AlertDescription.displayName = "AlertDescription"
|
|
62
|
+
|
|
63
|
+
export { Alert, AlertTitle, AlertDescription }
|