ar-design 0.3.30 → 0.3.31
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 +48 -140
- package/dist/assets/css/components/data-display/dnd/dnd.css +1 -0
- package/dist/assets/css/components/data-display/grid-system/column/styles.css +16 -1
- package/dist/components/data-display/card/IProps.d.ts +0 -18
- package/dist/components/data-display/chip/IProps.d.ts +0 -9
- package/dist/components/data-display/diagram/IProps.d.ts +1 -43
- package/dist/components/data-display/dnd/IProps.d.ts +0 -32
- package/dist/components/data-display/dnd/index.js +1 -1
- package/dist/components/data-display/grid-system/column/IProps.d.ts +2 -42
- package/dist/components/data-display/kanban-board/IProps.d.ts +3 -3
- package/dist/components/data-display/kanban-board/index.d.ts +1 -1
- package/dist/components/data-display/kanban-board/index.js +1 -1
- package/dist/components/data-display/paper/IProps.d.ts +6 -0
- package/dist/components/data-display/paper/IProps.js +1 -0
- package/dist/components/data-display/paper/index.d.ts +2 -5
- package/dist/components/data-display/paper/index.js +1 -1
- package/dist/components/data-display/table/IProps.d.ts +0 -113
- package/dist/components/data-display/tabs/IProps.d.ts +0 -49
- package/dist/components/data-display/typography/paragraph/IProps.d.ts +0 -24
- package/dist/components/data-display/typography/title/IProps.d.ts +0 -46
- package/dist/components/form/text-editor/index.js +1 -1
- package/dist/libs/types/index.d.ts +25 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -33,158 +33,69 @@ yarn add ar-design
|
|
|
33
33
|
- React >= 18.0.0
|
|
34
34
|
- React DOM >= 18.0.0
|
|
35
35
|
|
|
36
|
-
## 🎯 Hızlı Başlangıç
|
|
37
|
-
|
|
38
|
-
```tsx
|
|
39
|
-
import { Button, Input, Card } from 'ar-design';
|
|
40
|
-
|
|
41
|
-
function App() {
|
|
42
|
-
return (
|
|
43
|
-
<div>
|
|
44
|
-
<Card>
|
|
45
|
-
<Input placeholder="Adınızı girin" />
|
|
46
|
-
<Button variant="filled" color="primary">
|
|
47
|
-
Gönder
|
|
48
|
-
</Button>
|
|
49
|
-
</Card>
|
|
50
|
-
</div>
|
|
51
|
-
);
|
|
52
|
-
}
|
|
53
|
-
```
|
|
54
|
-
|
|
55
36
|
## 📚 Bileşenler
|
|
56
37
|
|
|
57
|
-
###
|
|
58
|
-
|
|
59
|
-
- **Button** - Çoklu varyant ve boyut seçenekleri
|
|
60
|
-
- **ButtonAction** - Aksiyon butonları
|
|
61
|
-
- **ButtonGroup** - Buton grupları
|
|
62
|
-
- **Checkbox** - Onay kutuları
|
|
63
|
-
- **DatePicker** - Tarih seçici
|
|
64
|
-
- **Input** - Metin giriş alanları
|
|
65
|
-
- **InputTag** - Etiket giriş alanları
|
|
66
|
-
- **Radio** - Radyo butonları
|
|
67
|
-
- **Select** - Açılır liste
|
|
68
|
-
- **Switch** - Anahtar düğmeleri
|
|
69
|
-
- **TextEditor** - Zengin metin editörü
|
|
70
|
-
- **Upload** - Dosya yükleme
|
|
71
|
-
|
|
72
|
-
### Veri Görüntüleme
|
|
73
|
-
|
|
74
|
-
- **Card** - Kart bileşenleri
|
|
75
|
-
- **Chip** - Etiket bileşenleri
|
|
76
|
-
- **Divider** - Ayırıcı çizgiler
|
|
77
|
-
- **DnD** - Sürükle-bırak
|
|
78
|
-
- **Paper** - Kağıt bileşenleri
|
|
79
|
-
- **SyntaxHighlighter** - Kod vurgulayıcı
|
|
80
|
-
- **Table** - Tablo bileşenleri
|
|
81
|
-
- **Tabs** - Sekme bileşenleri
|
|
82
|
-
- **Typography** - Tipografi bileşenleri
|
|
83
|
-
|
|
84
|
-
### Geri Bildirim
|
|
85
|
-
|
|
86
|
-
- **Alert** - Uyarı mesajları
|
|
87
|
-
- **Drawer** - Çekmece bileşenleri
|
|
88
|
-
- **Modal** - Modal pencereler
|
|
89
|
-
- **Popover** - Açılır ipuçları
|
|
90
|
-
- **Progress** - İlerleme çubukları
|
|
91
|
-
- **Tooltip** - İpucu balonları
|
|
92
|
-
|
|
93
|
-
### Navigasyon
|
|
94
|
-
|
|
95
|
-
- **Breadcrumb** - Gezinti kırıntıları
|
|
96
|
-
- **Menu** - Menü bileşenleri
|
|
97
|
-
- **Steps** - Adım göstergeleri
|
|
38
|
+
### Data Display (Veri Görüntüleme)
|
|
98
39
|
|
|
99
|
-
|
|
40
|
+
[📖 Detaylı Kullanım Kılavuzu](./docs/data-display.md)
|
|
100
41
|
|
|
101
|
-
- **
|
|
102
|
-
- **
|
|
42
|
+
- **Card**
|
|
43
|
+
- **Chip**
|
|
44
|
+
- **Diagram**
|
|
45
|
+
- **Divider**
|
|
46
|
+
- **DnD (Drag and Drop)**
|
|
47
|
+
- **Grid System**
|
|
48
|
+
- **Kanban Board**
|
|
49
|
+
- **Paper**
|
|
50
|
+
- **Table**
|
|
51
|
+
- **Tabs**
|
|
52
|
+
- **Typography**
|
|
103
53
|
|
|
104
|
-
|
|
54
|
+
### (Feedback) Geri Bildirim
|
|
105
55
|
|
|
106
|
-
|
|
56
|
+
[📖 Detaylı Kullanım Kılavuzu](./docs/feedback-components.md)
|
|
107
57
|
|
|
108
|
-
-
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
-
-
|
|
112
|
-
-
|
|
113
|
-
-
|
|
114
|
-
-
|
|
58
|
+
- **Alert**
|
|
59
|
+
- **Drawer**
|
|
60
|
+
- **Loading**
|
|
61
|
+
- **Modal**
|
|
62
|
+
- **Notification**
|
|
63
|
+
- **Popover**
|
|
64
|
+
- **Popup**
|
|
65
|
+
- **Progress**
|
|
66
|
+
- **Tooltip**
|
|
115
67
|
|
|
116
|
-
|
|
68
|
+
### (Form) Form Elemanları
|
|
117
69
|
|
|
118
|
-
|
|
70
|
+
[📖 Detaylı Kullanım Kılavuzu](./docs/form-components.md)
|
|
119
71
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
72
|
+
- **Button**
|
|
73
|
+
- **Button Action**
|
|
74
|
+
- **Button Group**
|
|
75
|
+
- **Checkbox**
|
|
76
|
+
- **Date Picker**
|
|
77
|
+
- **Input**
|
|
78
|
+
- **Input Number**
|
|
79
|
+
- **Input Tag**
|
|
80
|
+
- **Radio**
|
|
81
|
+
- **Select**
|
|
82
|
+
- **Switch**
|
|
83
|
+
- **TextEditor**
|
|
84
|
+
- **Upload**
|
|
130
85
|
|
|
131
|
-
|
|
86
|
+
### Layout (Düzen)
|
|
132
87
|
|
|
133
|
-
|
|
88
|
+
[📖 Detaylı Kullanım Kılavuzu](./docs/layout-components.md)
|
|
134
89
|
|
|
135
|
-
|
|
136
|
-
git clone https://github.com/kaancetin-f/ar-design.git
|
|
137
|
-
cd ar-design
|
|
138
|
-
npm install
|
|
139
|
-
```
|
|
90
|
+
- **Layout**
|
|
140
91
|
|
|
141
|
-
###
|
|
142
|
-
|
|
143
|
-
```bash
|
|
144
|
-
npm run build
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
### CSS Loader
|
|
148
|
-
|
|
149
|
-
```bash
|
|
150
|
-
npm run css-loader
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
## 📦 Modüler Import
|
|
154
|
-
|
|
155
|
-
AR Design, modüler import desteği sunar:
|
|
156
|
-
|
|
157
|
-
```tsx
|
|
158
|
-
// Tüm bileşenler
|
|
159
|
-
import { Button, Input, Card } from 'ar-design';
|
|
160
|
-
|
|
161
|
-
// Sadece belirli kategoriler
|
|
162
|
-
import { Button, Input } from 'ar-design';
|
|
163
|
-
|
|
164
|
-
// Servis ve yardımcı fonksiyonlar
|
|
165
|
-
import { Api } from 'ar-design/@service';
|
|
166
|
-
import { Config } from 'ar-design/@config';
|
|
167
|
-
import { useNotification } from 'ar-design/@hooks';
|
|
168
|
-
|
|
169
|
-
// Stil dosyaları
|
|
170
|
-
import 'ar-design/@styles';
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
## 🌍 Çoklu Dil Desteği
|
|
174
|
-
|
|
175
|
-
AR Design, çoklu dil desteği sunar:
|
|
92
|
+
### Navigasyon
|
|
176
93
|
|
|
177
|
-
|
|
178
|
-
import { LanguageProvider } from 'ar-design/@config';
|
|
94
|
+
[📖 Detaylı Kullanım Kılavuzu](./docs/navigation.md)
|
|
179
95
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
{/* Uygulama içeriği */}
|
|
184
|
-
</LanguageProvider>
|
|
185
|
-
);
|
|
186
|
-
}
|
|
187
|
-
```
|
|
96
|
+
- **Menu**
|
|
97
|
+
- **Pagination**
|
|
98
|
+
- **Steps**
|
|
188
99
|
|
|
189
100
|
## 📄 Lisans
|
|
190
101
|
|
|
@@ -205,10 +116,6 @@ Bu proje [MIT Lisansı](LICENSE) altında lisanslanmıştır.
|
|
|
205
116
|
4. Branch'inizi push edin (`git push origin feature/amazing-feature`)
|
|
206
117
|
5. Pull Request oluşturun
|
|
207
118
|
|
|
208
|
-
## 📝 Changelog
|
|
209
|
-
|
|
210
|
-
Detaylı değişiklik geçmişi için [CHANGELOG.md](CHANGELOG.md) dosyasını inceleyin.
|
|
211
|
-
|
|
212
119
|
## 🐛 Hata Bildirimi
|
|
213
120
|
|
|
214
121
|
Hata bildirimi için [GitHub Issues](https://github.com/kaancetin-f/ar-design/issues) sayfasını kullanın.
|
|
@@ -216,6 +123,7 @@ Hata bildirimi için [GitHub Issues](https://github.com/kaancetin-f/ar-design/is
|
|
|
216
123
|
## 📞 Destek
|
|
217
124
|
|
|
218
125
|
Sorularınız için:
|
|
126
|
+
|
|
219
127
|
- GitHub Issues: [Issues](https://github.com/kaancetin-f/ar-design/issues)
|
|
220
128
|
|
|
221
129
|
---
|
|
@@ -1,6 +1,21 @@
|
|
|
1
|
+
.row > [class^="col"].left,
|
|
2
|
+
.row > [class*="col"].left,
|
|
3
|
+
.row > [class^="col"].center,
|
|
4
|
+
.row > [class*="col"].center,
|
|
1
5
|
.row > [class^="col"].right,
|
|
2
6
|
.row > [class*="col"].right {
|
|
3
7
|
position: relative;
|
|
4
8
|
display: flex;
|
|
5
|
-
|
|
9
|
+
}
|
|
10
|
+
.row > [class^="col"].left,
|
|
11
|
+
.row > [class*="col"].left {
|
|
12
|
+
justify-content: flex-start;
|
|
13
|
+
}
|
|
14
|
+
.row > [class^="col"].center,
|
|
15
|
+
.row > [class*="col"].center {
|
|
16
|
+
justify-content: center;
|
|
17
|
+
}
|
|
18
|
+
.row > [class^="col"].right,
|
|
19
|
+
.row > [class*="col"].right {
|
|
20
|
+
justify-content: flex-end;
|
|
6
21
|
}
|
|
@@ -4,25 +4,7 @@ interface IProps extends IChildren, IVariant<{
|
|
|
4
4
|
}>, IStatus<{
|
|
5
5
|
component: "card";
|
|
6
6
|
}> {
|
|
7
|
-
/**
|
|
8
|
-
* Kart başlığı.
|
|
9
|
-
*
|
|
10
|
-
* Örneğin;
|
|
11
|
-
*
|
|
12
|
-
* ```jsx
|
|
13
|
-
* <Card title="Kullanıcı Bilgileri" />
|
|
14
|
-
* ```
|
|
15
|
-
*/
|
|
16
7
|
title?: string;
|
|
17
|
-
/**
|
|
18
|
-
* Kartın sağ üst köşesinde gösterilecek aksiyonlar (buton, menü vb.).
|
|
19
|
-
*
|
|
20
|
-
* Örneğin;
|
|
21
|
-
*
|
|
22
|
-
* ```jsx
|
|
23
|
-
* <Card actions={<button>Düzenle</button>} />
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
8
|
actions?: React.JSX.Element;
|
|
27
9
|
}
|
|
28
10
|
export default IProps;
|
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
import { IBorder, IColors, IIcon, IVariant } from "../../../libs/types/IGlobalProps";
|
|
2
2
|
interface IProps extends IVariant, IColors, IBorder, IIcon {
|
|
3
|
-
/**
|
|
4
|
-
* Bileşende gösterilecek metin.
|
|
5
|
-
*
|
|
6
|
-
* Örneğin;
|
|
7
|
-
*
|
|
8
|
-
* ```jsx
|
|
9
|
-
* <Chip text="..." />
|
|
10
|
-
* ```
|
|
11
|
-
*/
|
|
12
3
|
text: string;
|
|
13
4
|
}
|
|
14
5
|
export default IProps;
|
|
@@ -1,48 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
id: number;
|
|
3
|
-
position: {
|
|
4
|
-
x: number;
|
|
5
|
-
y: number;
|
|
6
|
-
};
|
|
7
|
-
data: {
|
|
8
|
-
label: string;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
type Port = "top" | "bottom";
|
|
12
|
-
export type EdgeData = {
|
|
13
|
-
id: number;
|
|
14
|
-
from: {
|
|
15
|
-
id: number;
|
|
16
|
-
port: Port;
|
|
17
|
-
};
|
|
18
|
-
to: {
|
|
19
|
-
id: number;
|
|
20
|
-
port: Port;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
1
|
+
import { EdgeData, NodeData } from "../../../libs/types";
|
|
23
2
|
interface IProps {
|
|
24
|
-
/**
|
|
25
|
-
* Sürüklenebilir liste verisi.
|
|
26
|
-
*
|
|
27
|
-
* Örneğin;
|
|
28
|
-
*
|
|
29
|
-
* ```jsx
|
|
30
|
-
* <Diagram data={[{ id: 1, ... }, { id: 2, ... }]} />
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
3
|
nodes: NodeData[];
|
|
34
|
-
/**
|
|
35
|
-
* Her bir öğenin nasıl render edileceğini tanımlar.
|
|
36
|
-
*
|
|
37
|
-
* - `item`: Mevcut öğe.
|
|
38
|
-
* - `index`: Öğenin listedeki sırası.
|
|
39
|
-
*
|
|
40
|
-
* Örneğin;
|
|
41
|
-
*
|
|
42
|
-
* ```jsx
|
|
43
|
-
* <Diagram renderItem={(item) => <div>{item.label}</div>} />
|
|
44
|
-
* ```
|
|
45
|
-
*/
|
|
46
4
|
edges: EdgeData[];
|
|
47
5
|
}
|
|
48
6
|
export default IProps;
|
|
@@ -1,40 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
interface IProps<T> {
|
|
3
|
-
/**
|
|
4
|
-
* Sürüklenebilir liste verisi.
|
|
5
|
-
*
|
|
6
|
-
* Örneğin;
|
|
7
|
-
*
|
|
8
|
-
* ```jsx
|
|
9
|
-
* <DnD data={[{ id: 1, ... }, { id: 2, ... }]} />
|
|
10
|
-
* ```
|
|
11
|
-
*/
|
|
12
3
|
data: T[];
|
|
13
|
-
/**
|
|
14
|
-
* Her bir öğenin nasıl render edileceğini tanımlar.
|
|
15
|
-
*
|
|
16
|
-
* - `item`: Mevcut öğe.
|
|
17
|
-
* - `index`: Öğenin listedeki sırası.
|
|
18
|
-
*
|
|
19
|
-
* Örneğin;
|
|
20
|
-
*
|
|
21
|
-
* ```jsx
|
|
22
|
-
* <DnD renderItem={(item) => <div>{item.label}</div>} />
|
|
23
|
-
* ```
|
|
24
|
-
*/
|
|
25
4
|
renderItem: (item: T, index: number) => React.JSX.Element;
|
|
26
5
|
columnKey?: string;
|
|
27
|
-
/**
|
|
28
|
-
* Sıralama değiştiğinde tetiklenen olay.
|
|
29
|
-
*
|
|
30
|
-
* - `data`: Yeni sıralanmış öğeler.
|
|
31
|
-
*
|
|
32
|
-
* Örneğin;
|
|
33
|
-
*
|
|
34
|
-
* ```jsx
|
|
35
|
-
* <DnD onChange={(data) => console.log("Yeni sıra:", data)} />
|
|
36
|
-
* ```
|
|
37
|
-
*/
|
|
38
6
|
onChange?: (data: T[]) => void;
|
|
39
7
|
confing?: {
|
|
40
8
|
isMoveIcon: boolean;
|
|
@@ -26,7 +26,7 @@ const DnD = function ({ data, renderItem, columnKey, onChange, confing = { isMov
|
|
|
26
26
|
_fromColumn = columnKey ?? undefined;
|
|
27
27
|
}
|
|
28
28
|
// Korumaya başla.
|
|
29
|
-
if (_arDnD.current) {
|
|
29
|
+
if (_arDnD.current && columnKey && _fromColumn !== columnKey) {
|
|
30
30
|
_arDnD.current.childNodes.forEach((item) => {
|
|
31
31
|
const placeholder = document.createElement("div");
|
|
32
32
|
placeholder.setAttribute("data-id", "placeholder");
|
|
@@ -1,33 +1,6 @@
|
|
|
1
|
+
import { IChildren } from "../../../../libs/types/IGlobalProps";
|
|
1
2
|
type Column = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
2
|
-
interface IProps {
|
|
3
|
-
/**
|
|
4
|
-
* Kolon içinde gösterilecek içerik.
|
|
5
|
-
*
|
|
6
|
-
* Örneğin;
|
|
7
|
-
*
|
|
8
|
-
* ```jsx
|
|
9
|
-
* <Column>
|
|
10
|
-
* <p>İçerik</p>
|
|
11
|
-
* </Column>
|
|
12
|
-
* ```
|
|
13
|
-
*/
|
|
14
|
-
children: React.ReactNode;
|
|
15
|
-
/**
|
|
16
|
-
* Kolon genişliğini belirler.
|
|
17
|
-
*
|
|
18
|
-
* - Sayı olarak verilirse tüm cihazlarda aynı genişlik uygulanır.
|
|
19
|
-
* - Obje olarak verilirse, farklı ekran boyutlarına göre özel kolon genişlikleri tanımlanabilir.
|
|
20
|
-
*
|
|
21
|
-
* Örneğin;
|
|
22
|
-
*
|
|
23
|
-
* ```jsx
|
|
24
|
-
* <Column size={6}>...</Column>
|
|
25
|
-
* ```
|
|
26
|
-
* veya
|
|
27
|
-
* ```jsx
|
|
28
|
-
* <Column size={{ xl: 3, md: 6, xs: 12 }}>...</Column>
|
|
29
|
-
* ```
|
|
30
|
-
*/
|
|
3
|
+
interface IProps extends IChildren {
|
|
31
4
|
size?: {
|
|
32
5
|
xl?: Column;
|
|
33
6
|
lg?: Column;
|
|
@@ -35,19 +8,6 @@ interface IProps {
|
|
|
35
8
|
sm?: Column;
|
|
36
9
|
xs?: Column;
|
|
37
10
|
} | number;
|
|
38
|
-
/**
|
|
39
|
-
* İçeriğin yatay hizalamasını belirler.
|
|
40
|
-
*
|
|
41
|
-
* - `left`: İçerik sola hizalanır.
|
|
42
|
-
* - `center`: İçerik yatayda ortalanır.
|
|
43
|
-
* - `right`: İçerik sağa hizalanır.
|
|
44
|
-
*
|
|
45
|
-
* Örneğin;
|
|
46
|
-
*
|
|
47
|
-
* ```jsx
|
|
48
|
-
* <Column align="center">...</Column>
|
|
49
|
-
* ```
|
|
50
|
-
*/
|
|
51
11
|
align?: "left" | "center" | "right";
|
|
52
12
|
}
|
|
53
13
|
export default IProps;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { KanbanBoardColumnType } from "../../../libs/types";
|
|
2
|
-
interface IProps<T> {
|
|
2
|
+
interface IProps<T, TColumnProperties> {
|
|
3
3
|
trackBy: (item: T) => string;
|
|
4
|
-
columns: KanbanBoardColumnType<T>[];
|
|
5
|
-
onChange?: (item: T, columnKey: string, hoverIndex: number) => void;
|
|
4
|
+
columns: KanbanBoardColumnType<T, TColumnProperties>[];
|
|
5
|
+
onChange?: (item: T, columnKey: string, columnProperties: TColumnProperties, hoverIndex: number) => void;
|
|
6
6
|
}
|
|
7
7
|
export default IProps;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import IProps from "./IProps";
|
|
3
3
|
import "../../../assets/css/components/data-display/kanban-board/styles.css";
|
|
4
|
-
declare const KanbanBoard: <T>({ trackBy, columns, onChange }: IProps<T>) => React.JSX.Element;
|
|
4
|
+
declare const KanbanBoard: <T, TColumnProperties>({ trackBy, columns, onChange }: IProps<T, TColumnProperties>) => React.JSX.Element;
|
|
5
5
|
export default KanbanBoard;
|
|
@@ -27,7 +27,7 @@ const KanbanBoard = function ({ trackBy, columns, onChange }) {
|
|
|
27
27
|
const boardItems = [...board.items];
|
|
28
28
|
const safeIndex = Math.min(_hoverItemIndex.current ?? Infinity, boardItems.length); // son elemandan fazla olmasın.
|
|
29
29
|
boardItems.splice(safeIndex, 0, item);
|
|
30
|
-
onChange?.(item, board.key, safeIndex);
|
|
30
|
+
onChange?.(item, board.key, board.columnProperties, safeIndex);
|
|
31
31
|
return {
|
|
32
32
|
...board,
|
|
33
33
|
items: boardItems,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import "../../../assets/css/components/data-display/paper/styles.css";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
title?: string;
|
|
6
|
-
action?: React.ReactNode;
|
|
7
|
-
}>;
|
|
3
|
+
import IProps from "./IProps";
|
|
4
|
+
declare const Paper: React.FC<IProps>;
|
|
8
5
|
export default Paper;
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import Typography from "../typography";
|
|
3
3
|
import "../../../assets/css/components/data-display/paper/styles.css";
|
|
4
4
|
const { Title } = Typography;
|
|
5
|
-
const Paper = ({ children, title, action
|
|
5
|
+
const Paper = ({ children, title, action }) => {
|
|
6
6
|
return (React.createElement("div", { className: "ar-paper" },
|
|
7
7
|
(title || action) && (React.createElement("div", { className: "header" },
|
|
8
8
|
title && React.createElement(Title, { Level: "h3" }, title),
|
|
@@ -4,81 +4,33 @@ import { IChildren } from "../../../libs/types/IGlobalProps";
|
|
|
4
4
|
import { FilterOperator } from "../../../libs/infrastructure/shared/Enums";
|
|
5
5
|
export type Operator = "Contains" | "DoesNotContains" | "Equals" | "DoesNotEquals" | "BeginsWith" | "EndsWith" | "Blank" | "NotBlank";
|
|
6
6
|
export type FilterValue = {
|
|
7
|
-
/**
|
|
8
|
-
* Filtre değeri olabilir: string, number veya boolean.
|
|
9
|
-
*/
|
|
10
7
|
value: string | number | boolean;
|
|
11
|
-
/**
|
|
12
|
-
* Uygulanacak filtre operatörü.
|
|
13
|
-
*/
|
|
14
8
|
operator: FilterOperator;
|
|
15
9
|
};
|
|
16
10
|
export type SearchedParam = {
|
|
17
11
|
[key: string]: FilterValue | FilterValue[];
|
|
18
12
|
};
|
|
19
13
|
export type Config = {
|
|
20
|
-
/**
|
|
21
|
-
* Verilerin sunucu tarafında mı işlendiğini belirtir.
|
|
22
|
-
*/
|
|
23
14
|
isServerSide?: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* Tablo içinde arama özelliğinin aktif olup olmadığı.
|
|
26
|
-
*/
|
|
27
15
|
isSearchable?: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Kaydırma özelliği ve maksimum yüksekliği.
|
|
30
|
-
*/
|
|
31
16
|
scroll?: {
|
|
32
|
-
/**
|
|
33
|
-
* Maksimum tablo yüksekliği (piksel cinsinden).
|
|
34
|
-
*/
|
|
35
17
|
maxHeight: number;
|
|
36
18
|
};
|
|
37
|
-
/**
|
|
38
|
-
* Alt satır (subrow) özellikleri.
|
|
39
|
-
*/
|
|
40
19
|
subrow?: {
|
|
41
|
-
/**
|
|
42
|
-
* Alt satırın otomatik açılıp açılmayacağı.
|
|
43
|
-
*/
|
|
44
20
|
openAutomatically?: boolean;
|
|
45
|
-
/**
|
|
46
|
-
* Alt satırı açmak için seçici (CSS selector) tanımı.
|
|
47
|
-
*/
|
|
48
21
|
selector?: string;
|
|
49
|
-
/**
|
|
50
|
-
* Alt satır açma butonunun gösterilip gösterilmeyeceği.
|
|
51
|
-
*/
|
|
52
22
|
button?: boolean;
|
|
53
23
|
};
|
|
54
24
|
isTreeView?: boolean;
|
|
55
25
|
};
|
|
56
26
|
type ImportActionType = {
|
|
57
|
-
/**
|
|
58
|
-
* Import butonunun üzerine gelindiğinde gösterilecek açıklayıcı metin.
|
|
59
|
-
*/
|
|
60
27
|
tooltip: string;
|
|
61
28
|
title?: string;
|
|
62
29
|
message?: string;
|
|
63
30
|
buttonText?: string;
|
|
64
|
-
/**
|
|
65
|
-
* Kabul edilen dosya türleri.
|
|
66
|
-
*/
|
|
67
31
|
allowedTypes?: MimeTypes[];
|
|
68
|
-
/**
|
|
69
|
-
* Butonun önünde gösterilecek içerik.
|
|
70
|
-
*/
|
|
71
32
|
prefixItem?: React.ReactNode;
|
|
72
|
-
/**
|
|
73
|
-
* Butonun arkasında gösterilecek içerik.
|
|
74
|
-
*/
|
|
75
33
|
suffixItem?: React.ReactNode;
|
|
76
|
-
/**
|
|
77
|
-
* Dosya import işlemi tetiklendiğinde çağrılan fonksiyon.
|
|
78
|
-
*
|
|
79
|
-
* @param formData - Dosyaları içeren FormData nesnesi (undefined olabilir).
|
|
80
|
-
* @param files - Seçilen dosyalar dizisi.
|
|
81
|
-
*/
|
|
82
34
|
onClick: (formData: FormData | undefined, files: File[], base64: string[]) => void;
|
|
83
35
|
};
|
|
84
36
|
type ExportActionType = {
|
|
@@ -89,13 +41,7 @@ type ExportActionType = {
|
|
|
89
41
|
onClick: () => void;
|
|
90
42
|
};
|
|
91
43
|
type CreateActionType = {
|
|
92
|
-
/**
|
|
93
|
-
* Create butonunun üzerine gelindiğinde gösterilecek açıklayıcı metin.
|
|
94
|
-
*/
|
|
95
44
|
tooltip: string;
|
|
96
|
-
/**
|
|
97
|
-
* Butona tıklanıldığında tetiklenen fonksiyon.
|
|
98
|
-
*/
|
|
99
45
|
onClick: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
100
46
|
};
|
|
101
47
|
type DeleteActionType = {
|
|
@@ -106,84 +52,25 @@ type DeleteActionType = {
|
|
|
106
52
|
};
|
|
107
53
|
interface IProps<T> extends IChildren {
|
|
108
54
|
trackBy?: (item: T) => string;
|
|
109
|
-
/**
|
|
110
|
-
* Tablo başlığı.
|
|
111
|
-
*
|
|
112
|
-
* Örneğin;
|
|
113
|
-
*
|
|
114
|
-
* ```jsx
|
|
115
|
-
* <Table title="..." />
|
|
116
|
-
* ```
|
|
117
|
-
*/
|
|
118
55
|
title?: string;
|
|
119
|
-
/**
|
|
120
|
-
* Tabloya ait açıklama veya alt metin.
|
|
121
|
-
*/
|
|
122
56
|
description?: string;
|
|
123
|
-
/**
|
|
124
|
-
* Tabloya verilecek veri dizisi.
|
|
125
|
-
*/
|
|
126
57
|
data: T[];
|
|
127
|
-
/**
|
|
128
|
-
* Tablo kolonlarının tanımı.
|
|
129
|
-
*/
|
|
130
58
|
columns: TableColumnType<T>[];
|
|
131
|
-
/**
|
|
132
|
-
* Tablo üzerindeki eylem butonları.
|
|
133
|
-
*/
|
|
134
59
|
actions?: {
|
|
135
|
-
/**
|
|
136
|
-
* Dosya import işlemi için buton ayarları.
|
|
137
|
-
*/
|
|
138
60
|
import?: ImportActionType;
|
|
139
61
|
export?: ExportActionType;
|
|
140
|
-
/**
|
|
141
|
-
* Yeni kayıt oluşturma butonu ayarları.
|
|
142
|
-
*/
|
|
143
62
|
create?: CreateActionType;
|
|
144
63
|
delete?: DeleteActionType;
|
|
145
64
|
};
|
|
146
|
-
/**
|
|
147
|
-
* Seçili satırlar değiştiğinde çağrılan fonksiyon.
|
|
148
|
-
*
|
|
149
|
-
* @param selectionItems - Seçilen satırların dizisi.
|
|
150
|
-
*/
|
|
151
65
|
selections?: (selectionItems: T[]) => void;
|
|
152
|
-
/**
|
|
153
|
-
* Daha önce seçilmiş satırlar.
|
|
154
|
-
*/
|
|
155
66
|
previousSelections?: T[];
|
|
156
|
-
/**
|
|
157
|
-
* Arama parametreleri ve sorgu değiştiğinde çağrılan fonksiyon.
|
|
158
|
-
*
|
|
159
|
-
* @param params - Arama parametreleri veya null.
|
|
160
|
-
* @param query - Arama sorgu metni.
|
|
161
|
-
* @param operator - Kullanılan filtre operatörü.
|
|
162
|
-
*/
|
|
163
67
|
searchedParams?: (params: SearchedParam | null, query: string, operator: FilterOperator) => void;
|
|
164
68
|
onEditable?: (item: T, index: number) => void;
|
|
165
|
-
/**
|
|
166
|
-
* Sayfalama ayarları.
|
|
167
|
-
*/
|
|
168
69
|
pagination?: {
|
|
169
|
-
/**
|
|
170
|
-
* Toplam kayıt sayısı.
|
|
171
|
-
*/
|
|
172
70
|
totalRecords: number;
|
|
173
|
-
/**
|
|
174
|
-
* Sayfa başına gösterilecek kayıt sayısı.
|
|
175
|
-
*/
|
|
176
71
|
perPage: number;
|
|
177
|
-
/**
|
|
178
|
-
* Sayfa değiştirildiğinde tetiklenen fonksiyon.
|
|
179
|
-
*
|
|
180
|
-
* @param currentPage - Yeni sayfa numarası.
|
|
181
|
-
*/
|
|
182
72
|
onChange?: (currentPage: number) => void;
|
|
183
73
|
};
|
|
184
|
-
/**
|
|
185
|
-
* Tablo yapılandırma ayarları.
|
|
186
|
-
*/
|
|
187
74
|
config?: Config;
|
|
188
75
|
}
|
|
189
76
|
export default IProps;
|
|
@@ -1,58 +1,9 @@
|
|
|
1
1
|
import { TabProps } from "../../../libs/types";
|
|
2
2
|
interface IProps {
|
|
3
|
-
/**
|
|
4
|
-
* İsim benzersiz olmalıdır. Sayfa yenilenmesinde seçimin değişmemesi için kullanılmaktadır.
|
|
5
|
-
*/
|
|
6
3
|
name: string;
|
|
7
|
-
/**
|
|
8
|
-
* Tab'ları temsil eden dizi.
|
|
9
|
-
* Her bir eleman `TabProps` tipinde olmalıdır.
|
|
10
|
-
*
|
|
11
|
-
* Örneğin;
|
|
12
|
-
*
|
|
13
|
-
* ```jsx
|
|
14
|
-
* <Component
|
|
15
|
-
* tabs={[
|
|
16
|
-
* { title: "Ana Sayfa", content: <HomePage />, config: { canBeClosed: false } },
|
|
17
|
-
* { title: "Profil", content: <Profile />, config: { canBeClosed: true } },
|
|
18
|
-
* ]}
|
|
19
|
-
* />
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
4
|
tabs: TabProps[];
|
|
23
|
-
/**
|
|
24
|
-
* Aktif olarak seçili olan tab'ın indeksi.
|
|
25
|
-
*
|
|
26
|
-
* Örneğin;
|
|
27
|
-
*
|
|
28
|
-
* ```jsx
|
|
29
|
-
* <Tabs activeTab={0} />
|
|
30
|
-
* ```
|
|
31
|
-
*/
|
|
32
5
|
activeTab?: number;
|
|
33
|
-
/**
|
|
34
|
-
* Tab değiştirildiğinde çağrılan fonksiyon.
|
|
35
|
-
*
|
|
36
|
-
* @param currentTab - Yeni seçilen tab'ın indeksi.
|
|
37
|
-
*
|
|
38
|
-
* Örneğin;
|
|
39
|
-
*
|
|
40
|
-
* ```jsx
|
|
41
|
-
* <Tabs onChange={(currentTab) => console.log(currentTab)} />
|
|
42
|
-
* ```
|
|
43
|
-
*/
|
|
44
6
|
onChange?: (currentTab: number) => void;
|
|
45
|
-
/**
|
|
46
|
-
* Tab kapatıldığında çağrılan fonksiyon.
|
|
47
|
-
*
|
|
48
|
-
* @param closeTab - Kapatılan tab'ın indeksi.
|
|
49
|
-
*
|
|
50
|
-
* Örneğin;
|
|
51
|
-
*
|
|
52
|
-
* ```jsx
|
|
53
|
-
* <Tabs onClose={(closeTab) => console.log(closeTab)} />
|
|
54
|
-
* ```
|
|
55
|
-
*/
|
|
56
7
|
onClose?: (closeTab: number) => void;
|
|
57
8
|
}
|
|
58
9
|
export default IProps;
|
|
@@ -1,31 +1,7 @@
|
|
|
1
1
|
import { ParagraphColors, Status } from "../../../../libs/types";
|
|
2
2
|
import { IChildren, ISize, IUpperCase } from "../../../../libs/types/IGlobalProps";
|
|
3
3
|
interface IProps extends IChildren, ISize, IUpperCase {
|
|
4
|
-
/**
|
|
5
|
-
* Paragraf metninin rengi.
|
|
6
|
-
*
|
|
7
|
-
* `ParagraphColors` veya `Status` tipi değer alabilir.
|
|
8
|
-
*
|
|
9
|
-
* Örneğin;
|
|
10
|
-
*
|
|
11
|
-
* ```jsx
|
|
12
|
-
* <Paragraph color="error" />
|
|
13
|
-
* ```
|
|
14
|
-
*/
|
|
15
4
|
color?: ParagraphColors | Status;
|
|
16
|
-
/**
|
|
17
|
-
* Metnin yatay hizalamasını belirler.
|
|
18
|
-
*
|
|
19
|
-
* - `left`: Metin sola hizalanır.
|
|
20
|
-
* - `center`: Metin ortalanır.
|
|
21
|
-
* - `right`: Metin sağa hizalanır.
|
|
22
|
-
*
|
|
23
|
-
* Örneğin;
|
|
24
|
-
*
|
|
25
|
-
* ```jsx
|
|
26
|
-
* <Paragraph align="left" />
|
|
27
|
-
* ```
|
|
28
|
-
*/
|
|
29
5
|
align?: "left" | "center" | "right";
|
|
30
6
|
}
|
|
31
7
|
export default IProps;
|
|
@@ -1,53 +1,7 @@
|
|
|
1
1
|
import { IChildren, IUpperCase } from "../../../../libs/types/IGlobalProps";
|
|
2
2
|
interface IProps extends IChildren, IUpperCase, React.HTMLAttributes<HTMLHeadingElement> {
|
|
3
|
-
/**
|
|
4
|
-
* Başlığın HTML seviyesini belirler.
|
|
5
|
-
*
|
|
6
|
-
* - `h1` en büyük başlıktır, `h6` ise en küçük.
|
|
7
|
-
* - Semantik anlamda uygun başlık seviyeleri kullanılması önerilir.
|
|
8
|
-
*
|
|
9
|
-
* Örneğin;
|
|
10
|
-
*
|
|
11
|
-
* ```jsx
|
|
12
|
-
* <Title Level="h2" />
|
|
13
|
-
* ```
|
|
14
|
-
*/
|
|
15
3
|
Level: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
16
|
-
/**
|
|
17
|
-
* Başlık metninin yatay hizalamasını belirler.
|
|
18
|
-
*
|
|
19
|
-
* - `"left"`: Metin sola hizalanır.
|
|
20
|
-
* - `"center"`: Metin ortalanır.
|
|
21
|
-
* - `"right"`: Metin sağa hizalanır.
|
|
22
|
-
*
|
|
23
|
-
* Örneğin;
|
|
24
|
-
*
|
|
25
|
-
* ```jsx
|
|
26
|
-
* <Title align="center" />
|
|
27
|
-
* ```
|
|
28
|
-
*/
|
|
29
4
|
align?: "left" | "center" | "right";
|
|
30
|
-
/**
|
|
31
|
-
* Başlık metninin boyutunu belirler.
|
|
32
|
-
*
|
|
33
|
-
* Aşağıdaki CSS'e karşılık gelen değerleri destekler:
|
|
34
|
-
* - `"xx-small"` → Çok çok küçük
|
|
35
|
-
* - `"x-small"` → Çok küçük
|
|
36
|
-
* - `"small"` → Küçük
|
|
37
|
-
* - `"medium"` → Orta (varsayılan)
|
|
38
|
-
* - `"large"` → Büyük
|
|
39
|
-
* - `"x-large"` → Çok büyük
|
|
40
|
-
* - `"xx-large"` → Çok çok büyük
|
|
41
|
-
* - `"xxx-large"` → En büyük
|
|
42
|
-
* - `"smaller"` → Ebeveyn öğeye göre daha küçük
|
|
43
|
-
* - `"larger"` → Ebeveyn öğeye göre daha büyük
|
|
44
|
-
*
|
|
45
|
-
* Örneğin;
|
|
46
|
-
*
|
|
47
|
-
* ```jsx
|
|
48
|
-
* <Title size="x-large" />
|
|
49
|
-
* ```
|
|
50
|
-
*/
|
|
51
5
|
size?: "xx-small" | "x-small" | "small" | "medium" | "large" | "x-large" | "xx-large" | "xxx-large" | "smaller" | "larger";
|
|
52
6
|
}
|
|
53
7
|
export default IProps;
|
|
@@ -213,7 +213,7 @@ validation, }) => {
|
|
|
213
213
|
}, []);
|
|
214
214
|
return (React.createElement("div", { ref: _container, className: "ar-text-editor" },
|
|
215
215
|
React.createElement("iframe", { ref: _arIframe, name: name, className: _iframeClassName.map((c) => c).join(" "), height: height }),
|
|
216
|
-
React.createElement("div", { className: "toolbar" }, toolbarButtons.map(({ command, icon, tooltip }) => (React.createElement(Tooltip, { text: tooltip },
|
|
216
|
+
React.createElement("div", { className: "toolbar" }, toolbarButtons.map(({ command, icon, tooltip }, index) => (React.createElement(Tooltip, { key: `${command}-${index}`, text: tooltip },
|
|
217
217
|
React.createElement(Button, { key: command, type: "button", variant: "borderless", color: "light", border: { radius: "none" }, icon: { element: React.createElement(ARIcon, { icon: icon }) }, onClick: () => execCommand(command) }))))),
|
|
218
218
|
React.createElement("div", { className: "resize", onMouseDown: handleMouseDown }),
|
|
219
219
|
validation?.text && React.createElement("span", { className: "validation" }, validation.text),
|
|
@@ -58,9 +58,10 @@ export type TabProps = {
|
|
|
58
58
|
canBeClosed: boolean;
|
|
59
59
|
};
|
|
60
60
|
};
|
|
61
|
-
export type KanbanBoardColumnType<T> = {
|
|
61
|
+
export type KanbanBoardColumnType<T, TColumnProperties> = {
|
|
62
62
|
title: string;
|
|
63
63
|
key: string;
|
|
64
|
+
columnProperties: TColumnProperties;
|
|
64
65
|
items: T[];
|
|
65
66
|
renderItem: (item: T, index: number) => React.JSX.Element;
|
|
66
67
|
};
|
|
@@ -86,3 +87,26 @@ export type PieChartDataType = {
|
|
|
86
87
|
value: number;
|
|
87
88
|
text: string;
|
|
88
89
|
};
|
|
90
|
+
export type NodeData = {
|
|
91
|
+
id: number;
|
|
92
|
+
position: {
|
|
93
|
+
x: number;
|
|
94
|
+
y: number;
|
|
95
|
+
};
|
|
96
|
+
data: {
|
|
97
|
+
label: string;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
type Port = "top" | "bottom";
|
|
101
|
+
export type EdgeData = {
|
|
102
|
+
id: number;
|
|
103
|
+
from: {
|
|
104
|
+
id: number;
|
|
105
|
+
port: Port;
|
|
106
|
+
};
|
|
107
|
+
to: {
|
|
108
|
+
id: number;
|
|
109
|
+
port: Port;
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
export {};
|