@turk.net/mui 3.0.7 → 3.0.8
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/.opencode/rules/design-compliance.md +119 -0
- package/.opencode/skills/onehub-design-verification/SKILL.md +315 -0
- package/.opencode/skills/turknet-onehub-component-usage/SKILL.md +16 -16
- package/COMPONENT_GLOSSARY.md +500 -0
- package/COMPONENT_MAP.md +567 -0
- package/DESIGN_RULES.md +399 -0
- package/DESIGN_SOURCES.md +198 -0
- package/DESIGN_TOKENS_MAP.md +271 -0
- package/ESLINT_DESIGN_RULES.md +392 -0
- package/LLM_EXAMPLES.md +183 -169
- package/LLM_GUIDELINES.md +192 -192
- package/PAGE_PATTERNS.md +509 -0
- package/SKILL_SETUP.md +237 -200
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -0
- package/dist/index.mjs.map +1 -1
- package/dist/theme/index.js +1 -0
- package/dist/theme/index.js.map +1 -1
- package/dist/theme/index.mjs +1 -0
- package/dist/theme/index.mjs.map +1 -1
- package/package.json +20 -3
- package/scripts/verify-design.js +351 -0
package/DESIGN_RULES.md
ADDED
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
# OneHub Design Rules
|
|
2
|
+
|
|
3
|
+
> **Purpose:** Mandatory design constraints that ALL AI agents and developers MUST follow when writing UI code for OneHub.
|
|
4
|
+
>
|
|
5
|
+
> **Language:** This document uses RFC 2119 keywords: MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD, SHOULD NOT, RECOMMENDED, MAY, OPTIONAL.
|
|
6
|
+
>
|
|
7
|
+
> **Violation of any MUST/MUST NOT rule is a design defect.**
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Rule 1: Typography
|
|
12
|
+
|
|
13
|
+
### 1.1 — Variant Selection
|
|
14
|
+
|
|
15
|
+
**MUST ONLY use Untitled UI custom typography variants.**
|
|
16
|
+
|
|
17
|
+
MUI default variants (`h1`-`h6`, `body1`, `body2`, `subtitle1`, `subtitle2`, `caption`, `button`) are **DISABLED** in the theme and MUST NOT be used.
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
// ✅ CORRECT
|
|
21
|
+
<Typography variant="display.lg.bold">Page Title</Typography>
|
|
22
|
+
<Typography variant="text.md.regular">Body text</Typography>
|
|
23
|
+
<Typography variant="text.xs.medium">Label</Typography>
|
|
24
|
+
|
|
25
|
+
// ❌ WRONG — MUI default variants are disabled
|
|
26
|
+
<Typography variant="h1">Title</Typography>
|
|
27
|
+
<Typography variant="body1">Text</Typography>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### 1.2 — Font Family
|
|
31
|
+
|
|
32
|
+
**MUST use Inter font exclusively.** The host project MUST define `--font-inter` CSS variable.
|
|
33
|
+
|
|
34
|
+
Font weights: `400` (Regular), `500` (Medium), `600` (Semibold), `700` (Bold).
|
|
35
|
+
|
|
36
|
+
### 1.3 — Typography Hierarchy
|
|
37
|
+
|
|
38
|
+
| Context | Variant | Weight |
|
|
39
|
+
|---------|---------|--------|
|
|
40
|
+
| Page title | `display.lg.bold` or `display.md.semibold` | 600-700 |
|
|
41
|
+
| Section header | `text.lg.medium` or `text.md.semibold` | 500-600 |
|
|
42
|
+
| Body text | `text.md.regular` or `text.sm.regular` | 400 |
|
|
43
|
+
| Table header | `text.xs.medium` | 500 |
|
|
44
|
+
| Table cell | `text.sm.regular` | 400 |
|
|
45
|
+
| Form label | `text.sm.regular` or `text.xs.regular` | 400 |
|
|
46
|
+
| Helper/error text | `text.xs.regular` | 400 |
|
|
47
|
+
| Button text | `text.sm.medium` | 500 |
|
|
48
|
+
| Chip/Badge text | `text.xs.medium` | 500 |
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Rule 2: Colors
|
|
53
|
+
|
|
54
|
+
### 2.1 — Access Method
|
|
55
|
+
|
|
56
|
+
**MUST reference colors exclusively via CSS custom properties OR `theme.vars.palette.*` paths.** Raw hex values, RGB values, or `theme.palette` (non-vars) MUST NOT be used.
|
|
57
|
+
|
|
58
|
+
> **IMPORTANT — MUI v5 `--palette-` prefix:** Projeler MUI v5 kullandığı için CSS custom property'lere `--palette-` prefix'i ile erişilmelidir. Prefix'siz yazım (`var(--neutral-foreground-1-rest)`) çalışmaz.
|
|
59
|
+
|
|
60
|
+
```typescript
|
|
61
|
+
// ✅ CORRECT — CSS custom property (MUI v5 — --palette- prefix ŞART)
|
|
62
|
+
sx={{ color: 'var(--palette-neutral-foreground-1-rest)' }}
|
|
63
|
+
sx={{ bgcolor: 'var(--palette-brand-background-1-rest)' }}
|
|
64
|
+
|
|
65
|
+
// ✅ CORRECT — theme.vars
|
|
66
|
+
sx={{ bgcolor: theme.vars.palette.brand.background[1].rest }}
|
|
67
|
+
|
|
68
|
+
// ❌ WRONG — raw hex value
|
|
69
|
+
sx={{ color: '#242424' }}
|
|
70
|
+
|
|
71
|
+
// ❌ WRONG — non-vars palette
|
|
72
|
+
sx={{ bgcolor: theme.palette.primary.main }}
|
|
73
|
+
|
|
74
|
+
// ❌ WRONG — prefix eksik (MUI v5'te çalışmaz)
|
|
75
|
+
sx={{ color: 'var(--neutral-foreground-1-rest)' }}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### 2.2 — Color by Component
|
|
79
|
+
|
|
80
|
+
Component color props MUST use ONLY the values listed below:
|
|
81
|
+
|
|
82
|
+
| Component | Valid `color` Values |
|
|
83
|
+
|-----------|---------------------|
|
|
84
|
+
| `Button` | `primary`, `secondary`, `error` |
|
|
85
|
+
| `TextField` | `neutral`, `brand`, `danger` |
|
|
86
|
+
| `Select` | `neutral`, `brand`, `danger` |
|
|
87
|
+
| `Checkbox` | `primary`, `error` |
|
|
88
|
+
| `Radio` | `primary`, `error` |
|
|
89
|
+
| `Switch` | `primary`, `error` |
|
|
90
|
+
| `Chip` | `primary`, `secondary`, `error` |
|
|
91
|
+
| `Badge` | `default`, `brand`, `success`, `danger`, `severewarning`, `warning`, `important` |
|
|
92
|
+
| `Alert` | `success`, `warning`, `error`, `info` |
|
|
93
|
+
|
|
94
|
+
### 2.3 — Shared Colors
|
|
95
|
+
|
|
96
|
+
`theme.vars.palette.shared.*` colors (red, green, orange, yellow, purple, pink, cyan, lime) MUST ONLY be used in custom components, NOT as `color` props on standard MUI components.
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Rule 3: Spacing
|
|
101
|
+
|
|
102
|
+
### 3.1 — No Magic Numbers
|
|
103
|
+
|
|
104
|
+
**MUST NOT use raw pixel values for spacing.** All spacing MUST pass through `theme.spacing(n)`.
|
|
105
|
+
|
|
106
|
+
Base grid: **4px** (`theme.spacing(1)` = 4px).
|
|
107
|
+
|
|
108
|
+
```typescript
|
|
109
|
+
// ✅ CORRECT
|
|
110
|
+
sx={{ padding: theme.spacing(2) }} // 8px
|
|
111
|
+
sx={{ gap: theme.spacing(1) }} // 4px
|
|
112
|
+
sx={{ marginLeft: theme.spacing(3) }} // 12px
|
|
113
|
+
|
|
114
|
+
// ❌ WRONG — magic numbers
|
|
115
|
+
sx={{ padding: '8px' }}
|
|
116
|
+
sx={{ padding: 8 }}
|
|
117
|
+
sx={{ gap: '4px' }}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### 3.2 — Standard Spacing Values
|
|
121
|
+
|
|
122
|
+
| Context | Value | `theme.spacing()` |
|
|
123
|
+
|---------|-------|-------------------|
|
|
124
|
+
| Tight icon gap | 4px | `theme.spacing(1)` |
|
|
125
|
+
| Standard gap | 8px | `theme.spacing(2)` |
|
|
126
|
+
| Button horizontal padding | 12px | `theme.spacing(3)` |
|
|
127
|
+
| Card/section padding | 16px | `theme.spacing(4)` |
|
|
128
|
+
| Large section gap | 24px | `theme.spacing(6)` |
|
|
129
|
+
| Table cell horizontal padding | 32px | `theme.spacing(8)` |
|
|
130
|
+
| Page padding | 64px | `theme.spacing(16)` |
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## Rule 4: Components
|
|
135
|
+
|
|
136
|
+
### 4.1 — No Custom Components
|
|
137
|
+
|
|
138
|
+
**MUST NOT create custom components that duplicate Material UI functionality.** Use MUI components with theme overrides instead.
|
|
139
|
+
|
|
140
|
+
```typescript
|
|
141
|
+
// ❌ WRONG — custom component duplicating MUI
|
|
142
|
+
function MyButton({ children }: { children: React.ReactNode }) {
|
|
143
|
+
return <div className="custom-button">{children}</div>;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// ✅ CORRECT — use MUI component
|
|
147
|
+
<Button variant="contained" color="primary">{children}</Button>
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### 4.2 — No Inline Styles
|
|
151
|
+
|
|
152
|
+
**MUST NOT use inline styles (`style={{}}` prop).** Use `sx` prop with theme values or CSS custom properties.
|
|
153
|
+
|
|
154
|
+
```typescript
|
|
155
|
+
// ❌ WRONG
|
|
156
|
+
<Button style={{ backgroundColor: 'red', padding: '20px' }}>Click</Button>
|
|
157
|
+
|
|
158
|
+
// ✅ CORRECT
|
|
159
|
+
<Button sx={{ color: theme.vars.palette.danger.foreground[1].rest }}>Click</Button>
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### 4.3 — Valid Props Only
|
|
163
|
+
|
|
164
|
+
**MUST NOT use variant/size/color combinations not defined in `COMPONENT_MAP.md`.** Any undefined combination will not have theme styles applied.
|
|
165
|
+
|
|
166
|
+
```typescript
|
|
167
|
+
// ❌ WRONG — color="success" not defined for Button
|
|
168
|
+
<Button color="success">Save</Button>
|
|
169
|
+
|
|
170
|
+
// ❌ WRONG — variant="gradient" not defined
|
|
171
|
+
<Button variant="gradient">Gradient</Button>
|
|
172
|
+
|
|
173
|
+
// ✅ CORRECT
|
|
174
|
+
<Button variant="contained" color="primary" size="medium">Save</Button>
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### 4.4 — Layout Components
|
|
178
|
+
|
|
179
|
+
**MUST use OneHub layout components for page structure:**
|
|
180
|
+
|
|
181
|
+
| Layout | Import | Use Case |
|
|
182
|
+
|--------|--------|----------|
|
|
183
|
+
| TabBased | `@turknet/onehub/layouts/app/TabBased` | Tab-based application layout |
|
|
184
|
+
| WithSidebar | `@turknet/onehub/layouts/page/WithSidebar` | Sidebar + content layout |
|
|
185
|
+
| Empty | Custom per module | No layout (passthrough) |
|
|
186
|
+
| Login | Custom per module | Authentication pages |
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## Rule 5: Icon Usage
|
|
191
|
+
|
|
192
|
+
### 5.1 — Icon Source
|
|
193
|
+
|
|
194
|
+
**MUST import icons from `@turknet/onehub/icons`** (SVG React components) or the project's Tune icon font.
|
|
195
|
+
|
|
196
|
+
```typescript
|
|
197
|
+
// ✅ CORRECT — SVG icons
|
|
198
|
+
import { CheckIcon, ChevronDownIcon } from '@turknet/onehub/icons';
|
|
199
|
+
|
|
200
|
+
// ✅ CORRECT — Tune icon font
|
|
201
|
+
import { TuneIcon } from '@/components/ui/icon';
|
|
202
|
+
<TuneIcon name="check" />
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### 5.2 — Icon Sizing
|
|
206
|
+
|
|
207
|
+
Standard icon sizes: `16px` (small/inline), `20px` (default), `24px` (large).
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## Rule 6: Border Radius
|
|
212
|
+
|
|
213
|
+
| Element | Value | `theme.shape.borderRadius` equivalent |
|
|
214
|
+
|---------|-------|--------------------------------------|
|
|
215
|
+
| Checkbox, small elements | `4px` | `theme.shape.borderRadius / 2` |
|
|
216
|
+
| Buttons, inputs, cards, radio | `8px` | `theme.shape.borderRadius` |
|
|
217
|
+
| Chips, badges, filter tags | `16px` | `theme.shape.borderRadius * 2` |
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## Rule 7: Elevation / Shadows
|
|
222
|
+
|
|
223
|
+
**MUST use `theme.shadows[n]` or the `elevation` prop (0-24) on Paper components.**
|
|
224
|
+
|
|
225
|
+
| Level | Usage |
|
|
226
|
+
|-------|-------|
|
|
227
|
+
| `0` | Flat elements (no shadow) |
|
|
228
|
+
| `2` | Very subtle elevation |
|
|
229
|
+
| `4` | Dropdowns, tooltips |
|
|
230
|
+
| `8` | Dialogs |
|
|
231
|
+
| `16` | Modals |
|
|
232
|
+
| `24` | Top-level overlays |
|
|
233
|
+
|
|
234
|
+
```typescript
|
|
235
|
+
// ✅ CORRECT
|
|
236
|
+
<Paper elevation={4}>Content</Paper>
|
|
237
|
+
<Card elevation={2}>Content</Card>
|
|
238
|
+
|
|
239
|
+
// ✅ CORRECT — theme.shadows access
|
|
240
|
+
sx={{ boxShadow: theme.shadows[6] }}
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
---
|
|
244
|
+
|
|
245
|
+
## Rule 8: Responsive Design
|
|
246
|
+
|
|
247
|
+
### 8.1 — Breakpoints
|
|
248
|
+
|
|
249
|
+
**MUST use MUI breakpoints** via `theme.breakpoints` or `sx` prop.
|
|
250
|
+
|
|
251
|
+
| Breakpoint | Width |
|
|
252
|
+
|-----------|-------|
|
|
253
|
+
| `xs` | 0px |
|
|
254
|
+
| `sm` | 600px |
|
|
255
|
+
| `md` | 900px |
|
|
256
|
+
| `lg` | 1200px |
|
|
257
|
+
| `xl` | 1536px |
|
|
258
|
+
|
|
259
|
+
```typescript
|
|
260
|
+
// ✅ CORRECT
|
|
261
|
+
sx={{
|
|
262
|
+
padding: { xs: theme.spacing(2), md: theme.spacing(4) }
|
|
263
|
+
}}
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
---
|
|
267
|
+
|
|
268
|
+
## Rule 9: Forms
|
|
269
|
+
|
|
270
|
+
### 9.1 — Form Library
|
|
271
|
+
|
|
272
|
+
**MUST use Formik + Yup** for form handling.
|
|
273
|
+
|
|
274
|
+
```typescript
|
|
275
|
+
import { useFormik } from 'formik';
|
|
276
|
+
import * as yup from 'yup';
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
### 9.2 — Form Components
|
|
280
|
+
|
|
281
|
+
| Field Type | MUI Component |
|
|
282
|
+
|-----------|---------------|
|
|
283
|
+
| Text input | `TextField` |
|
|
284
|
+
| Dropdown | `Select` + `MenuItem` |
|
|
285
|
+
| Autocomplete | `Autocomplete` |
|
|
286
|
+
| Checkbox | `Checkbox` + `FormControlLabel` |
|
|
287
|
+
| Radio group | `RadioGroup` + `Radio` + `FormControlLabel` |
|
|
288
|
+
| Switch | `Switch` + `FormControlLabel` |
|
|
289
|
+
| Date picker | `DatePicker` (`@mui/x-date-pickers`) |
|
|
290
|
+
| Submit | `Button variant="contained" color="primary"` |
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
## Rule 10: File Organization
|
|
295
|
+
|
|
296
|
+
### 10.1 — Component Placement
|
|
297
|
+
|
|
298
|
+
| Component Type | Directory |
|
|
299
|
+
|---------------|-----------|
|
|
300
|
+
| Reusable UI components | `src/components/ui/` |
|
|
301
|
+
| Page-specific components | `src/components/pages/<pageName>/` |
|
|
302
|
+
| Layout components | `src/components/layouts/` |
|
|
303
|
+
| API types/models | `src/data/models/` |
|
|
304
|
+
| API services | `src/data/services/` |
|
|
305
|
+
| Custom hooks | `src/data/hooks/` or `src/hooks/` |
|
|
306
|
+
| Redux slices | `src/redux/slices/` |
|
|
307
|
+
| Utility functions | `src/utils/` |
|
|
308
|
+
|
|
309
|
+
### 10.2 — Naming Conventions
|
|
310
|
+
|
|
311
|
+
- **Component files:** PascalCase (e.g., `SigninForm.tsx`)
|
|
312
|
+
- **Utility files:** camelCase (e.g., `cookieKeys.ts`)
|
|
313
|
+
- **Type files:** camelCase (e.g., `user.ts`)
|
|
314
|
+
- **Style overrides:** `*.styled.tsx` suffix
|
|
315
|
+
- **Page directories:** camelCase (e.g., `myTasks/`)
|
|
316
|
+
|
|
317
|
+
---
|
|
318
|
+
|
|
319
|
+
## Rule 11: Data Fetching
|
|
320
|
+
|
|
321
|
+
### 11.1 — API Calls
|
|
322
|
+
|
|
323
|
+
**MUST use React Query (TanStack Query)** for all server data.
|
|
324
|
+
|
|
325
|
+
```typescript
|
|
326
|
+
import { useQuery, useMutation } from '@tanstack/react-query';
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
### 11.2 — API Client
|
|
330
|
+
|
|
331
|
+
**MUST use the Hermes API client** (GraphQL endpoint) configured per module.
|
|
332
|
+
|
|
333
|
+
---
|
|
334
|
+
|
|
335
|
+
## Rule 12: Accessibility
|
|
336
|
+
|
|
337
|
+
### 12.1 — Required Attributes
|
|
338
|
+
|
|
339
|
+
- All form inputs MUST have associated labels
|
|
340
|
+
- Icon buttons MUST have `aria-label`
|
|
341
|
+
- Tables MUST have proper header rows
|
|
342
|
+
- Color contrast MUST meet WCAG AA standards
|
|
343
|
+
- Focus indicators MUST be visible
|
|
344
|
+
|
|
345
|
+
### 12.2 — Keyboard Navigation
|
|
346
|
+
|
|
347
|
+
- All interactive elements MUST be keyboard accessible
|
|
348
|
+
- Dialogs MUST trap focus
|
|
349
|
+
- Tab order MUST follow visual order
|
|
350
|
+
|
|
351
|
+
---
|
|
352
|
+
|
|
353
|
+
## Rule 13: Performance
|
|
354
|
+
|
|
355
|
+
### 13.1 — Bundle Size
|
|
356
|
+
|
|
357
|
+
- **MUST NOT** import entire MUI library (`import * as Mui from '@mui/material'`)
|
|
358
|
+
- **MUST** use named imports
|
|
359
|
+
- **SHOULD** use React.lazy for page-level code splitting
|
|
360
|
+
|
|
361
|
+
### 13.2 — Image Optimization
|
|
362
|
+
|
|
363
|
+
- **MUST** use `next/image` for images
|
|
364
|
+
- **SHOULD** use SVG for icons (preferred over icon fonts)
|
|
365
|
+
|
|
366
|
+
---
|
|
367
|
+
|
|
368
|
+
## Rule 14: Module Federation
|
|
369
|
+
|
|
370
|
+
### 14.1 — Shared Dependencies
|
|
371
|
+
|
|
372
|
+
Modules MUST share these dependencies via Module Federation (do NOT bundle locally):
|
|
373
|
+
|
|
374
|
+
- `@mui/material`
|
|
375
|
+
- `@mui/icons-material`
|
|
376
|
+
- `react` / `react-dom`
|
|
377
|
+
- `dayjs`
|
|
378
|
+
- `notistack`
|
|
379
|
+
|
|
380
|
+
### 14.2 — Remote Components
|
|
381
|
+
|
|
382
|
+
When consuming remote components from the host application, use `React.lazy`:
|
|
383
|
+
|
|
384
|
+
```typescript
|
|
385
|
+
const ChangeModuleModal = React.lazy(() => import('components/changeModuleModal'));
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
---
|
|
389
|
+
|
|
390
|
+
## Enforcement
|
|
391
|
+
|
|
392
|
+
These rules are enforced through:
|
|
393
|
+
|
|
394
|
+
1. **`.opencode/rules/design-compliance.md`** — Always-apply rule for AI agents
|
|
395
|
+
2. **`.opencode/skills/onehub-design-verification/SKILL.md`** — Step-by-step verification skill
|
|
396
|
+
3. **`scripts/verify-design.js`** — Automated compliance scanner
|
|
397
|
+
4. **`ESLINT_DESIGN_RULES.md`** — Lint rules specification (future custom ESLint plugin)
|
|
398
|
+
|
|
399
|
+
Any violation of MUST/MUST NOT rules found during code review is a **blocking issue**.
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
# OneHub Design Sources
|
|
2
|
+
|
|
3
|
+
> **Purpose:** Maps every OneHub module to its Figma design source and provides quick navigation to key design pages.
|
|
4
|
+
>
|
|
5
|
+
> **Usage:** When implementing a new feature for a module, AI agents MUST reference the corresponding Figma source to verify component usage, spacing, typography, and color choices.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Primary Design Files
|
|
10
|
+
|
|
11
|
+
### 1. Tune UI — Component Library & Design Tokens
|
|
12
|
+
|
|
13
|
+
| Attribute | Value |
|
|
14
|
+
|-----------|-------|
|
|
15
|
+
| **Figma URL** | https://www.figma.com/design/3HRzKtaYJ7OOHWlxTE0ihw/Tune-UI-%E2%80%93--Beta-v0.1 |
|
|
16
|
+
| **Node ID** | `2371-1464` |
|
|
17
|
+
| **Purpose** | Base component library: Button, TextField, Chip, Badge, Checkbox, Radio, Switch, Select, Autocomplete, etc. All component variants, sizes, and color states. |
|
|
18
|
+
| **Contains** | Component specifications, design tokens, color palette, typography scale, shadow definitions, spacing system |
|
|
19
|
+
| **Doc Pages** | `🔑 Tokens` (design tokens), `Component` (component library), `📕 read Me` (documentation) |
|
|
20
|
+
|
|
21
|
+
### 2. OneHub Pages & Layouts — Module Screens
|
|
22
|
+
|
|
23
|
+
| Attribute | Value |
|
|
24
|
+
|-----------|-------|
|
|
25
|
+
| **Figma URL** | https://www.figma.com/design/bbqqjZQvPaVwgk35rDdi6p/05---OneHub---Pages-and-Layouts |
|
|
26
|
+
| **Node ID** | `363-22380` |
|
|
27
|
+
| **Purpose** | Page-level designs for all OneHub modules. Screen layouts, page patterns, content structures. |
|
|
28
|
+
| **Doc Pages** | See module sections below |
|
|
29
|
+
|
|
30
|
+
### 3. OneHub Yönetim Modül — Administration Module
|
|
31
|
+
|
|
32
|
+
| Attribute | Value |
|
|
33
|
+
|-----------|-------|
|
|
34
|
+
| **Figma URL** | https://www.figma.com/design/11BlopkoRzfdm6ZyvkasTL/05---OneHub---Yonetim-Mod%C3%BCl |
|
|
35
|
+
| **Node ID** | `17014-14727` |
|
|
36
|
+
| **Purpose** | Dedicated designs for the Support Quality & Communication module |
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Module → Design Mapping
|
|
41
|
+
|
|
42
|
+
### Support Module (`tn.onehub.ui.task`)
|
|
43
|
+
|
|
44
|
+
| Attribute | Value |
|
|
45
|
+
|-----------|-------|
|
|
46
|
+
| **App Path** | `/support` |
|
|
47
|
+
| **Figma Doc** | OneHub Pages & Layouts |
|
|
48
|
+
| **Page Node ID** | `363:22380` — Pages - Destek Ekibi |
|
|
49
|
+
|
|
50
|
+
**Key Pages in Figma:**
|
|
51
|
+
|
|
52
|
+
| Page Name | Figma Section | Key Components Used |
|
|
53
|
+
|-----------|--------------|---------------------|
|
|
54
|
+
| **Task Listing** | `Görev listeleme` (`453:23224`) | Table, SearchInput, Badge/Chip, Filter Button, Pagination, Checkbox |
|
|
55
|
+
| **Task Detail** | `Görev Detay` (`2392:18837`) | Tabs, Form Fields, Buttons, Status Badges, Data Cards |
|
|
56
|
+
| **Customers** | `Müşteriler` (`2392:21320`) | Search Table, Customer Status Badges, Pagination |
|
|
57
|
+
| **Login** | `Oturum açma` (`363:27138`) | SignInForm, TextField, Button, Gradient Background |
|
|
58
|
+
| **Ticket Close/Defer/Transfer** | `Ticket Kapatma, Erteleme, Aktarma` (`2844:24042`) | Dialog, Form, Radio, TextArea, Button |
|
|
59
|
+
| **Call Answering** | `Görüşme Cevaplama` (`3459:30467`) | Form, Radio Buttons, TextField, Button |
|
|
60
|
+
| **Customer Status** | `Kullanıcı Statu Değiştirme` (`4000:38012`) | Dropdown, Status Badge, Button |
|
|
61
|
+
| **Subscriber Info** | `Abone Bilgileri` (`4472:41034`) | Data Cards, Tables, Badges |
|
|
62
|
+
| **Performance** | `Perfomans` (`6320:27443`) | Data Tables, Metrics |
|
|
63
|
+
| **Ticket Flow (Complaint)** | `Şikayet Görev Akışı` (`6567:27967`) | Flow Chart, Form Elements |
|
|
64
|
+
| **AI Explanation** | `AI Açıklama` (`13968:222110`) | Card, Text Content |
|
|
65
|
+
| **Labels** | `Etiketler` (`17708:168933`) | Tag/Chip List, Filter |
|
|
66
|
+
| **Authentication** | `Kimlik Doğrulama` (`18568:124485`) | Form, TextField, Button |
|
|
67
|
+
| **Notifications** | `Notification` (`19592:106701`) | Snackbar/Toast, Alert |
|
|
68
|
+
| **Road Map** | `Ağ Yolu Haritası` (`20073:159756`) | Visual Diagram |
|
|
69
|
+
| **Chat** | `Chat` (`21456:115282`) | Chat Interface, Message Bubbles |
|
|
70
|
+
| **Field Priority** | `Saha Öncelliği` (`23995:123620`) | Data Grid, Badges |
|
|
71
|
+
| **Live Chat** | `Net Uzman Canlı Sohbet` (`24165:177134`) | Chat Interface |
|
|
72
|
+
| **Activity History** | `Aktivite Geçmişi` (`17204:211755`) | Timeline, Data Table |
|
|
73
|
+
| **New Task** | `Yeni Görev oluştur` (`14414:232693`) | Form, Dropdown, Button |
|
|
74
|
+
| **Task Edit** | `Görev Düzenle` (`14414:239260`) | Form, Dropdown, Button |
|
|
75
|
+
| **Connection Check** | `Müşteri Detay - Bağlantı Kontrol` (`11350:147025`) | Status Card, Metrics |
|
|
76
|
+
| **Speed Test History** | `Geçmiş Hız Testi Sonuçları` (`20675:136856`) | Data Table, Charts |
|
|
77
|
+
| **Past Tasks** | `Geçmiş-Gorevler` (`22331:170137`) | Data Table |
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
### Team Lead / Nexus Module (`tn.onehub.ui.nexus`)
|
|
82
|
+
|
|
83
|
+
| Attribute | Value |
|
|
84
|
+
|-----------|-------|
|
|
85
|
+
| **App Path** | `/support-team-lead` |
|
|
86
|
+
| **Figma Doc** | OneHub Pages & Layouts |
|
|
87
|
+
| **Page Node ID** | `5935:75901` — Pages - Destek Takım Lideri |
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
### Lead Module (`tn.onehub.ui.lead`)
|
|
92
|
+
|
|
93
|
+
| Attribute | Value |
|
|
94
|
+
|-----------|-------|
|
|
95
|
+
| **App Path** | `/lead` |
|
|
96
|
+
| **Figma Doc** | OneHub Pages & Layouts |
|
|
97
|
+
| **Page Node ID** | `5148:85859` — Pages - Lead Alma |
|
|
98
|
+
|
|
99
|
+
**Component Library Section:** `Lead table` (`9560:59968`) — Lead-specific table with search, filters, title, row, hover state, pagination.
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
### Order Tracking Module (`tn.onehub.ui.ordertracking`)
|
|
104
|
+
|
|
105
|
+
| Attribute | Value |
|
|
106
|
+
|-----------|-------|
|
|
107
|
+
| **App Path** | `/order-tracking` |
|
|
108
|
+
| **Figma Doc** | OneHub Pages & Layouts |
|
|
109
|
+
| **Page Node ID** | `16599:257816` — Pages - Sipariş Ekibi |
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
### Activation Module (`tn.onehub.ui.activation`)
|
|
114
|
+
|
|
115
|
+
| Attribute | Value |
|
|
116
|
+
|-----------|-------|
|
|
117
|
+
| **App Path** | `/activation` |
|
|
118
|
+
| **Figma Doc** | OneHub Pages & Layouts |
|
|
119
|
+
| **Page Node ID** | `15632:51384` — Pages - Aktivasyon |
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
### Funnel Module (`tn.onehub.ui.funnel`)
|
|
124
|
+
|
|
125
|
+
| Attribute | Value |
|
|
126
|
+
|-----------|-------|
|
|
127
|
+
| **App Path** | `/funnel` |
|
|
128
|
+
| **Figma Doc** | OneHub Pages & Layouts |
|
|
129
|
+
| **Page Node ID** | `22173:310640` — Pages - Funnel |
|
|
130
|
+
|
|
131
|
+
**Component Library Section:** `Dashboard` (`22810:311671`) — Funnel dashboard components.
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
### Support Quality & Communication Module (`tn.onehub.ui.supportqualcomm`)
|
|
136
|
+
|
|
137
|
+
| Attribute | Value |
|
|
138
|
+
|-----------|-------|
|
|
139
|
+
| **App Path** | `/support-qual-comm` |
|
|
140
|
+
| **Figma Doc** | OneHub Yönetim Modül |
|
|
141
|
+
| **Page Node ID** | `17014:14727` |
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
### Entrypoint (`tn.onehub.ui.entrypoint`)
|
|
146
|
+
|
|
147
|
+
| Attribute | Value |
|
|
148
|
+
|-----------|-------|
|
|
149
|
+
| **App Path** | `/login` |
|
|
150
|
+
| **Figma Doc** | OneHub Pages & Layouts |
|
|
151
|
+
| **Design Section** | Login page, Module selection screen |
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Design System Component Pages (Shared)
|
|
156
|
+
|
|
157
|
+
These are located under `Component` (`51:16668`) in the Pages & Layouts document:
|
|
158
|
+
|
|
159
|
+
| Component Library | Figma Node ID | Description |
|
|
160
|
+
|------------------|---------------|-------------|
|
|
161
|
+
| **Sidebar static** | `62:16343` | Static sidebar variants (Skeleton, User, Rol, Customer, Akkordion) |
|
|
162
|
+
| **Sidebar dynamic** | `241:25857` | Dynamic sidebar (Skeleton, Help, AI) |
|
|
163
|
+
| **My task table** | `364:28717` | Task table with Search/Filter, Title, Task row, Subtask, Pagination |
|
|
164
|
+
| **Team task table** | `694:41994` | Team task table with Filter, Title, Task row, Pagination |
|
|
165
|
+
| **Customer table** | `2291:40548` | Customer table with multiple filter types, Title, Task row, Hover, Pagination |
|
|
166
|
+
| **Lead table** | `9560:59968` | Lead-specific table |
|
|
167
|
+
| **Ticket List table** | `9148:52401` | Ticket list table with hover state |
|
|
168
|
+
| **Netuzman Table** | `2852:33089` | Netuzman-specific table |
|
|
169
|
+
| **IVR Table** | `5272:95132` | IVR settings table |
|
|
170
|
+
| **Comparison Table** | `8366:85886` | Comparison table with icons |
|
|
171
|
+
| **Customer Status** | `2291:41099` | Status badges (Dondurulmus, Aktif, Hizmet disi) |
|
|
172
|
+
| **AI Checkbox Card** | `1195:32250` | Checkbox card component |
|
|
173
|
+
| **Timer** | `1908:60012` | Timer indicator (Above 60, 15-60, Under 15) |
|
|
174
|
+
| **Failure logging** | `3500:35889` | Failure logging form with rest state and empty state |
|
|
175
|
+
| **Team Durum - Net Uzman** | `6280:55681` | Team status table for Net Uzman |
|
|
176
|
+
| **Team Durum - Leader** | `6280:56097` | Team status table for Team Leaders |
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## How to Use This Reference
|
|
181
|
+
|
|
182
|
+
### When Creating a New Page
|
|
183
|
+
1. Find your module in the **Module → Design Mapping** section above
|
|
184
|
+
2. Locate the closest matching page design in Figma
|
|
185
|
+
3. Read `COMPONENT_MAP.md` to find the correct MUI component + props for each UI element
|
|
186
|
+
4. Read `DESIGN_TOKENS_MAP.md` for the correct CSS custom property paths
|
|
187
|
+
5. Read `DESIGN_RULES.md` for mandatory constraints
|
|
188
|
+
|
|
189
|
+
### When Adding a Feature to an Existing Page
|
|
190
|
+
1. Check if the feature exists in Figma for your module
|
|
191
|
+
2. If yes: follow the Figma design exactly
|
|
192
|
+
3. If no: find the closest pattern from the Component library section and adapt
|
|
193
|
+
4. Always run `scripts/verify-design.js` after implementation
|
|
194
|
+
|
|
195
|
+
### Module Ownership
|
|
196
|
+
- Each module has ONE Figma page section (e.g., `Pages - Destek Ekibi`)
|
|
197
|
+
- Components are shared across modules via the `Component` library page
|
|
198
|
+
- New components MUST be added to the `Component` page first, then used in module pages
|