@turk.net/mui 3.0.8 → 3.0.10

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.
@@ -66,14 +66,26 @@ sx={{ bgcolor: 'var(--brand-background-1-rest)' }}
66
66
 
67
67
  ### LAYOUT — MUST use OneHub layout components
68
68
 
69
- - TabBased: `@turknet/onehub/layouts/app/TabBased`
70
- - WithSidebar: `@turknet/onehub/layouts/page/WithSidebar`
71
- - **MUST NOT** use MUI Drawer or AppBar directly
69
+ - TabBased: `@turk.net/mui/layouts/app/TabBased`
70
+ - Dashboard: Modül başına özel sidebar layout (`src/components/layouts/dashboard/`)
71
+ - Empty: Passthrough wrapper (`src/components/layouts/empty.tsx`)
72
+ - Login: Özel login layout'u
73
+ - **MUST NOT** use MUI Drawer or AppBar directly (Drawer slotProps ile kullanılabilir)
74
+
75
+ **Figma "Header tab navigation" layer → TabBased layout:**
76
+ Eğer Figma tasarımında `"Header tab navigation"` isimli bir layer varsa, bu sayfa TabBased layout içinde bir **sekme** olarak geliştirilmelidir. Header'ı sayfa içinde tekrar oluşturma — layout otomatik olarak sağlar.
77
+
78
+ **Figma "Card" / "Container" layer → Paper elevation={2}:**
79
+ Eğer Figma'da `"Card"` veya `"Container"` isimli bir layer şu stillere sahipse:
80
+ - Background: `#FAFAFA` veya beyaz
81
+ - Box Shadow: `0 0 2px 0 rgba(0,0,0,0.12), 0 1px 2px 0 rgba(0,0,0,0.14)`
82
+ → `<Paper elevation={2}>` kullan. Tema default `borderRadius: 8px` verir; Figma köşeliyse `sx={{ borderRadius: 0 }}` ile override et.
72
83
 
73
84
  ### ICONS — MUST use OneHub icon system
74
85
 
75
- - Import from `@turknet/onehub/icons` (SVG components, preferred)
86
+ - Import from `@turk.net/mui/icons/*` (SVG components, tercih edilen)
76
87
  - Or use Tune icon font via project's `TuneIcon` component
88
+ - **MUST NOT** import from `@mui/icons-material` (sadece istisnai durumlarda `Error` ikonu kullanılabilir)
77
89
 
78
90
  ### STYLING — MUST use theme-aware styling
79
91
 
@@ -92,7 +104,7 @@ Before committing any UI code, verify:
92
104
  - [ ] All CSS `var()` references use `--palette-` prefix (e.g. `var(--palette-neutral-foreground-1-rest)`)
93
105
  - [ ] No raw px values in spacing (`'8px'`, `16`)
94
106
  - [ ] All color props match valid values per component
95
- - [ ] Icons from `@turknet/onehub/icons`, not from `@mui/icons-material`
107
+ - [ ] Icons from `@turk.net/mui/icons`, not from `@mui/icons-material`
96
108
 
97
109
  ---
98
110
 
@@ -4,7 +4,7 @@ description: Use WHEN user asks for design review, design audit, or after creati
4
4
  license: MIT
5
5
  compatibility: React 18.2+, Next.js 13+, MUI v5/v9
6
6
  metadata:
7
- theme-package: "@turknet/onehub"
7
+ theme-package: "@turk.net/mui"
8
8
  design-system: "Untitled UI"
9
9
  ---
10
10
 
@@ -65,7 +65,7 @@ Complete each check in order. Every check marked ❌ is a **design defect** that
65
65
  - `Button`: `primary`, `secondary`, `error`
66
66
  - `TextField`/`Select`: `neutral`, `brand`, `danger`
67
67
  - `Checkbox`/`Radio`/`Switch`: `primary`, `error`
68
- - `Chip`: `primary`, `secondary`, `error`
68
+ - `Chip`: `informative`, `brand`, `danger`, `success`, `severewarning`, `important`, `warning`
69
69
  - `Badge`: `default`, `brand`, `success`, `danger`, `severewarning`, `warning`, `important`
70
70
  - `Alert`: `success`, `warning`, `error`, `info`
71
71
  - [ ] No `color="success"` on Button (not defined)
@@ -148,8 +148,8 @@ sx={{ marginLeft: 12 }}
148
148
  - [ ] Tables use custom Box-based layout (not MUI Table for data tables — see COMPONENT_MAP.md#table-data-grid)
149
149
  - [ ] Forms use Formik + Yup
150
150
  - [ ] Data fetching uses React Query (TanStack Query)
151
- - [ ] Icons imported from `@turknet/onehub/icons` or Tune icon font
152
- - [ ] Layout uses `TabBasedLayout` or `WithSidebarLayout` from `@turknet/onehub`
151
+ - [ ] Icons imported from `@turk.net/mui/icons/*` or Tune icon font
152
+ - [ ] Layout uses `TabBasedLayout` from `@turk.net/mui` or custom dashboard layout
153
153
 
154
154
  ### 7. Typography Variant Selection Check
155
155
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: turknet-onehub-component-usage
3
- description: Use ONLY when generating Material UI component code with @turknet/onehub theme. Enforces correct component usage, variant/size/color rules, and prohibits custom components.
3
+ description: Use ONLY when generating Material UI component code with @turk.net/mui theme. Enforces correct component usage, variant/size/color rules, and prohibits custom components.
4
4
  license: MIT
5
5
  compatibility: React 18.2+, Next.js 13+
6
6
  metadata:
@@ -8,16 +8,16 @@ metadata:
8
8
  mui-version: "7.0.0+"
9
9
  ---
10
10
 
11
- # @turknet/onehub Material UI Component Usage Guide
11
+ # @turk.net/mui Material UI Component Usage Guide
12
12
 
13
- > **CRITICAL FOR LLM MODELS**: This skill is essential when writing components for projects using `@turknet/onehub`. You MUST read and apply ALL rules.
13
+ > **CRITICAL FOR LLM MODELS**: This skill is essential when writing components for projects using `@turk.net/mui`. You MUST read and apply ALL rules.
14
14
 
15
15
  ---
16
16
 
17
17
  ## Scope & Trigger
18
18
 
19
19
  **You MUST use this skill WHEN:**
20
- - Generating React/TSX components for projects using `@turknet/onehub` theme
20
+ - Generating React/TSX components for projects using `@turk.net/mui` theme
21
21
  - Writing code that imports Material UI components (`@mui/material`)
22
22
  - Styling buttons, forms, typography, cards, dialogs, tables, or any MUI component
23
23
  - Creating layouts with Paper, Container, Box, Stack, Grid
@@ -34,7 +34,15 @@ metadata:
34
34
  ### Rule 1: You MUST ONLY Use Material UI from @mui/material
35
35
 
36
36
  ```tsx
37
- // ✅ CORRECT
37
+ // ✅ CORRECT — Path-based import (gerçek projelerde kullanılan yöntem)
38
+ import Button from "@mui/material/Button";
39
+ import Typography from "@mui/material/Typography";
40
+ import TextField from "@mui/material/TextField";
41
+ import Box from "@mui/material/Box";
42
+ import Paper from "@mui/material/Paper";
43
+ import Chip from "@mui/material/Chip";
44
+
45
+ // ✅ ALSO CORRECT — Barrel import
38
46
  import { Button, Typography, TextField } from '@mui/material';
39
47
 
40
48
  // ❌ WRONG
@@ -127,7 +135,7 @@ palette:
127
135
  | **Checkbox** | primary, error | primary |
128
136
  | **Radio** | primary, error | primary |
129
137
  | **Switch** | primary, error | primary |
130
- | **Chip** | primary, secondary, error | primary |
138
+ | **Chip** | informative, brand, danger, success, severewarning, important, warning | informative |
131
139
  | **Alert** | success, warning, error, info | - |
132
140
  | **Badge** | primary, secondary, error, success, warning, info | - |
133
141
 
@@ -412,10 +420,12 @@ You MUST use the `elevation` prop with values **0-24 only**:
412
420
 
413
421
  ```tsx
414
422
  // Different Chip styles
415
- <Chip label="Tag" variant="filled" color="primary" />
416
- <Chip label="Tag" variant="outlined" color="secondary" />
417
- <Chip label="Removable" onDelete={() => {}} />
418
- <Chip icon={<StarIcon />} label="Favorite" />
423
+ <Chip label="Tag" variant="filled" color="informative" />
424
+ <Chip label="Tag" variant="tint" color="brand" />
425
+ <Chip label="Tag" variant="outline" color="important" />
426
+ <Chip label="Removable" variant="tint" color="primary" onDelete={() => {}} />
427
+ <Chip icon={<StarIcon />} label="Active" variant="tint" color="success" />
428
+ <Chip icon={<ErrorIcon />} label="Error" variant="tint" color="danger" />
419
429
 
420
430
  // Badge
421
431
  <Badge badgeContent={4} color="error">
@@ -436,6 +446,55 @@ You MUST use the `elevation` prop with values **0-24 only**:
436
446
 
437
447
  ---
438
448
 
449
+ ## 📐 Layout & Figma Recognition
450
+
451
+ ### Figma "Header tab navigation" → TabBased Layout
452
+
453
+ **When a Figma design contains a layer named `"Header tab navigation"`:**
454
+
455
+ This is the TabBased layout header. The page MUST be developed as a **tab** within the TabBased layout — do NOT implement the header in your page component.
456
+
457
+ ```tsx
458
+ // ❌ WRONG — Recreating the layout header
459
+ function MyPage() {
460
+ return (
461
+ <Box>
462
+ <AppBar>...</AppBar> // ← TabBased header'ı sayfada tekrar oluşturma!
463
+ <Box>page content</Box>
464
+ </Box>
465
+ );
466
+ }
467
+
468
+ // ✅ CORRECT — Page content only, layout provides header
469
+ function MyPageContent() {
470
+ return (
471
+ <Box>
472
+ <Typography variant="display.xs.bold">Page Title</Typography>
473
+ {/* sadece sayfa içeriği */}
474
+ </Box>
475
+ );
476
+ }
477
+ ```
478
+
479
+ ### Figma "Card" / "Container" → Paper elevation={2}
480
+
481
+ **When a Figma design contains a layer named `"Card"` or `"Container"`** with background `#FAFAFA` / white and shadow `0 0 2px + 0 1px 2px rgba`:
482
+
483
+ → Use `<Paper elevation={2}>` from `@mui/material`
484
+
485
+ ```tsx
486
+ // ✅ CORRECT — Match Figma shadow2
487
+ <Paper elevation={2}>
488
+ <Box sx={{ p: theme.spacing(4) }}>
489
+ {/* card content */}
490
+ </Box>
491
+ </Paper>
492
+ ```
493
+
494
+ Paper default borderRadius: `8px` (theme). Override with `sx={{ borderRadius: 0 }}` if Figma shows sharp corners.
495
+
496
+ ---
497
+
439
498
  ## 🚨 Common Mistakes to Avoid
440
499
 
441
500
  ### Mistake 1: Custom Button Component
@@ -633,7 +692,7 @@ export function LoginForm() {
633
692
 
634
693
  ## 📚 References
635
694
 
636
- - **@turknet/onehub Package**: https://npm.js/package/@turknet/onehub
695
+ - **@turk.net/mui Package**: https://npm.js/package/@turk.net/mui
637
696
  - **LLM Guidelines**: Look for `LLM_GUIDELINES.md` in the package
638
697
  - **Usage Examples**: Look for `LLM_EXAMPLES.md` in the package
639
698
  - **Material UI Docs**: https://mui.com/material-ui/
@@ -646,7 +705,7 @@ export function LoginForm() {
646
705
  ### 1. Install the Theme Package
647
706
 
648
707
  ```bash
649
- yarn add @turknet/onehub
708
+ yarn add @turk.net/mui
650
709
  ```
651
710
 
652
711
  ### 2. Apply Theme Provider
@@ -654,8 +713,8 @@ yarn add @turknet/onehub
654
713
  ```tsx
655
714
  // pages/_app.tsx or app layout
656
715
  import { ThemeProvider } from '@mui/material/styles';
657
- import theme from '@turknet/onehub/theme';
658
- import '@turknet/onehub/fonts.css';
716
+ import theme from '@turk.net/mui/theme';
717
+ import '@turk.net/mui/fonts.css';
659
718
 
660
719
  export default function App({ Component, pageProps }) {
661
720
  return (