ods-component-lib 1.21.0 → 1.21.1
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 +278 -19
- package/dist/_virtual/index10.js +1 -1
- package/dist/_virtual/index11.js +1 -1
- package/dist/_virtual/index3.js +1 -1
- package/dist/_virtual/index4.js +1 -1
- package/dist/node_modules/@rc-component/util/es/ref.js +1 -1
- package/dist/node_modules/hoist-non-react-statics/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/hoist-non-react-statics/node_modules/react-is/index.js.map +1 -1
- package/dist/node_modules/ods-icon/react/24/outline/index.js +1 -1
- package/dist/node_modules/raf/index.js +1 -1
- package/dist/node_modules/raf/index.js.map +1 -1
- package/dist/node_modules/react-fast-marquee/dist/index.js +1 -1
- package/dist/node_modules/styled-components/dist/styled-components.browser.esm.js +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,39 +1,298 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Odeon Component Library (ODS Component Lib)
|
|
2
2
|
|
|
3
|
-
> Odeon
|
|
3
|
+
> Odeon Design System React Component Library - Modern, yeniden kullanılabilir UI bileşenleri.
|
|
4
4
|
|
|
5
|
-
[](https://www.npmjs.com/package/ods-component-lib)
|
|
6
|
+
[](https://standardjs.com)
|
|
6
7
|
|
|
7
|
-
##
|
|
8
|
+
## 📋 İçindekiler
|
|
9
|
+
|
|
10
|
+
- [Hakkında](#hakkında)
|
|
11
|
+
- [Özellikler](#özellikler)
|
|
12
|
+
- [Gereksinimler](#gereksinimler)
|
|
13
|
+
- [Kurulum](#kurulum)
|
|
14
|
+
- [Kullanım](#kullanım)
|
|
15
|
+
- [Bileşenler](#bileşenler)
|
|
16
|
+
- [Geliştirme](#geliştirme)
|
|
17
|
+
- [Scripts](#scripts)
|
|
18
|
+
- [Klasör Yapısı](#klasör-yapısı)
|
|
19
|
+
- [Lisans](#lisans)
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Hakkında
|
|
24
|
+
|
|
25
|
+
Odeon Component Library, kurumsal React uygulamaları için tasarlanmış kapsamlı bir UI bileşen kütüphanesidir. [Ant Design](https://ant.design/) ve [DevExtreme](https://js.devexpress.com/) üzerine inşa edilmiş olup, tutarlı ve profesyonel bir kullanıcı deneyimi sunar.
|
|
26
|
+
|
|
27
|
+
## Özellikler
|
|
28
|
+
|
|
29
|
+
- 🎨 **50+ Hazır Bileşen** - Form elemanlarından DataGrid'lere kadar geniş bileşen yelpazesi
|
|
30
|
+
- 📱 **Ant Design Tabanlı** - Modern ve responsive tasarım sistemi
|
|
31
|
+
- 📊 **DevExtreme DataGrid** - Gelişmiş veri tablosu bileşenleri
|
|
32
|
+
- 🎯 **TypeScript Desteği** - Tam tip güvenliği
|
|
33
|
+
- 📖 **Storybook Dokümantasyonu** - İnteraktif bileşen belgeleri
|
|
34
|
+
- 🌙 **Tema Desteği** - Light/Dark tema alt yapısı
|
|
35
|
+
- ⚡ **Tree Shaking** - Sadece kullandığınız bileşenler bundle'a dahil edilir
|
|
36
|
+
|
|
37
|
+
## Gereksinimler
|
|
38
|
+
|
|
39
|
+
- **Node.js**: `>= 24.11.1`
|
|
40
|
+
- **React**: `>= 19.2.0`
|
|
41
|
+
- **React DOM**: `>= 19.2.0`
|
|
42
|
+
- **DevExtreme**: `25.1.7`
|
|
43
|
+
- **DevExtreme React**: `25.1.7`
|
|
44
|
+
|
|
45
|
+
## Kurulum
|
|
46
|
+
|
|
47
|
+
### NPM ile Projenize Kurulum
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
npm install ods-component-lib
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Peer Dependencies
|
|
54
|
+
|
|
55
|
+
Aşağıdaki paketlerin projenizde yüklü olduğundan emin olun:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
npm install react react-dom devextreme devextreme-react
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### DevExtreme Stilleri
|
|
62
|
+
|
|
63
|
+
DevExtreme bileşenlerini kullanıyorsanız, projenizin giriş noktasına DevExtreme CSS dosyasını eklemeyi unutmayın:
|
|
64
|
+
|
|
65
|
+
```tsx
|
|
66
|
+
// App.tsx veya index.tsx
|
|
67
|
+
import 'devextreme/dist/css/dx.light.css'; // veya dx.dark.css
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Kullanım
|
|
73
|
+
|
|
74
|
+
### Temel Kullanım
|
|
75
|
+
|
|
76
|
+
```tsx
|
|
77
|
+
import React from 'react';
|
|
78
|
+
import { OdsButton, OdsInput, OdsSelect } from 'ods-component-lib';
|
|
79
|
+
|
|
80
|
+
const MyForm = () => {
|
|
81
|
+
return (
|
|
82
|
+
<div>
|
|
83
|
+
<OdsInput placeholder="Adınızı girin" />
|
|
84
|
+
<OdsSelect
|
|
85
|
+
options={[
|
|
86
|
+
{ value: '1', label: 'Seçenek 1' },
|
|
87
|
+
{ value: '2', label: 'Seçenek 2' }
|
|
88
|
+
]}
|
|
89
|
+
/>
|
|
90
|
+
<OdsButton type="primary">Gönder</OdsButton>
|
|
91
|
+
</div>
|
|
92
|
+
);
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
export default MyForm;
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### OdsDataGrid Kullanımı
|
|
99
|
+
|
|
100
|
+
DataGrid bileşeni, DevExtreme DataGrid üzerine inşa edilmiş gelişmiş bir veri tablosu bileşenidir:
|
|
101
|
+
|
|
102
|
+
```tsx
|
|
103
|
+
import React, { useRef } from 'react';
|
|
104
|
+
import { OdsDataGrid, Column } from 'ods-component-lib';
|
|
105
|
+
|
|
106
|
+
const data = [
|
|
107
|
+
{ id: 1, name: 'Ahmet', age: 28 },
|
|
108
|
+
{ id: 2, name: 'Mehmet', age: 32 },
|
|
109
|
+
];
|
|
110
|
+
|
|
111
|
+
const MyDataGrid = () => {
|
|
112
|
+
const dataGridRef = useRef(null);
|
|
113
|
+
|
|
114
|
+
return (
|
|
115
|
+
<OdsDataGrid
|
|
116
|
+
dataGridRef={dataGridRef}
|
|
117
|
+
dataSource={data}
|
|
118
|
+
compact={true}
|
|
119
|
+
keyExpr="id"
|
|
120
|
+
>
|
|
121
|
+
<Column dataField="name" caption="Ad" />
|
|
122
|
+
<Column dataField="age" caption="Yaş" />
|
|
123
|
+
</OdsDataGrid>
|
|
124
|
+
);
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
export default MyDataGrid;
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### OdsDataGrid Props
|
|
131
|
+
|
|
132
|
+
| Prop | Tip | Varsayılan | Açıklama |
|
|
133
|
+
|------|-----|------------|----------|
|
|
134
|
+
| `dataGridRef` | `React.RefObject` | - | DataGrid referansı |
|
|
135
|
+
| `compact` | `boolean` | `false` | Kompakt görünüm modu |
|
|
136
|
+
| `hasSummaryButton` | `boolean` | `false` | Özet butonu gösterimi |
|
|
137
|
+
| `disableBodyClasses` | `boolean` | `false` | Body class yönetimini devre dışı bırakır |
|
|
138
|
+
| `dataGridBorderRadius` | `number \| string` | - | Border radius değeri |
|
|
139
|
+
|
|
140
|
+
> **Not:** Tüm DevExtreme DataGrid props'ları da desteklenmektedir.
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## Bileşenler
|
|
145
|
+
|
|
146
|
+
### Ant Design Tabanlı Bileşenler
|
|
147
|
+
|
|
148
|
+
| Kategori | Bileşenler |
|
|
149
|
+
|----------|------------|
|
|
150
|
+
| **Form** | `OdsInput`, `OdsPassword`, `OdsTextArea`, `OdsSearch`, `OdsPhoneInput`, `OdsInputNumber`, `OdsCurrencyInput` |
|
|
151
|
+
| **Seçim** | `OdsSelect`, `OdsMultiSelect`, `OdsCheckbox`, `OdsCheckboxGroup`, `OdsRadio`, `OdsRadioGroup`, `OdsSwitch`, `OdsTreeSelect` |
|
|
152
|
+
| **Tarih/Zaman** | `OdsDatepicker`, `OdsDateRangePicker`, `OdsTimepicker`, `OdsRangeTimepicker`, `OdsCalendar` |
|
|
153
|
+
| **Görüntüleme** | `OdsCard`, `OdsCollapse`, `OdsImage`, `OdsList`, `OdsTable`, `OdsBasicTable`, `OdsTag`, `OdsBadge`, `OdsDivider` |
|
|
154
|
+
| **Tipografi** | `OdsTitle`, `OdsText`, `OdsParagraph`, `OdsLink` |
|
|
155
|
+
| **Geri Bildirim** | `OdsAlert`, `OdsBannerAlert`, `OdsNotification`, `OdsModal`, `OdsSpin`, `OdsProgress` |
|
|
156
|
+
| **Navigasyon** | `OdsTab`, `OdsDropdown`, `OdsTreeListMenu`, `OdsTimeline` |
|
|
157
|
+
| **Diğer** | `OdsButton`, `OdsAutoComplete`, `OdsFileUpload`, `OdsRate`, `OdsChange` |
|
|
158
|
+
|
|
159
|
+
### DevExtreme Tabanlı Bileşenler
|
|
160
|
+
|
|
161
|
+
| Bileşen | Açıklama |
|
|
162
|
+
|---------|----------|
|
|
163
|
+
| `OdsDataGrid` | ⭐ Modern DataGrid bileşeni (önerilen) |
|
|
164
|
+
| `OdsDataGridMemoized` | Memoized DataGrid versiyonu |
|
|
165
|
+
| `OdsMergeCellDataGrid` | Hücre birleştirme özellikli DataGrid |
|
|
166
|
+
| `OdsTimelineTable` | Zaman çizelgesi tablosu |
|
|
167
|
+
| `OdsTransfer` | Transfer bileşeni |
|
|
168
|
+
| `OdsTransferV2` | Transfer bileşeni v2 |
|
|
169
|
+
|
|
170
|
+
#### Deprecated DataGrid Bileşenleri
|
|
171
|
+
|
|
172
|
+
Aşağıdaki bileşenler ilerleyen sürümlerde kaldırılacaktır. Lütfen `OdsDataGrid` kullanımına geçin:
|
|
173
|
+
|
|
174
|
+
- `OdsDataGridLegacy`
|
|
175
|
+
- `OdsBasicDataGrid`
|
|
176
|
+
- `OdsBatchEditDataGrid`
|
|
177
|
+
- `OdsDisplayGrid`
|
|
178
|
+
- `OdsInlineEditDataGrid`
|
|
179
|
+
- `OdsRemoteDataGrid`
|
|
180
|
+
- `OdsServerSideDatagrid`
|
|
181
|
+
|
|
182
|
+
### Filtre Bileşenleri
|
|
183
|
+
|
|
184
|
+
| Bileşen | Açıklama |
|
|
185
|
+
|---------|----------|
|
|
186
|
+
| `OdsFilter` | Temel filtre bileşeni |
|
|
187
|
+
| `OdsFilterPlus` | Gelişmiş filtre bileşeni |
|
|
188
|
+
| `OdsFilterTagView` | Filtre etiketleri görünümü |
|
|
189
|
+
|
|
190
|
+
### Hooks
|
|
191
|
+
|
|
192
|
+
| Hook | Açıklama |
|
|
193
|
+
|------|----------|
|
|
194
|
+
| `useBodyClasses` | Body class yönetimi için hook |
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## Geliştirme
|
|
199
|
+
|
|
200
|
+
### Kaynak Koddan Kurulum
|
|
8
201
|
|
|
9
202
|
```bash
|
|
203
|
+
# Repository'yi klonlayın
|
|
204
|
+
git clone https://github.com/OdeonTechnology/ods-component-lib.git
|
|
205
|
+
|
|
206
|
+
# Proje dizinine gidin
|
|
207
|
+
cd odeon-component-library
|
|
208
|
+
|
|
209
|
+
# Bağımlılıkları yükleyin
|
|
10
210
|
npm install
|
|
11
|
-
|
|
12
|
-
|
|
211
|
+
|
|
212
|
+
# veya postinstall scriptini atlamak için
|
|
13
213
|
npm install --ignore-scripts
|
|
14
214
|
```
|
|
15
215
|
|
|
16
|
-
|
|
216
|
+
### Storybook ile Geliştirme
|
|
217
|
+
|
|
218
|
+
Storybook, bileşenleri izole bir şekilde geliştirmek ve test etmek için kullanılır:
|
|
17
219
|
|
|
18
220
|
```bash
|
|
19
|
-
|
|
221
|
+
# Storybook'u başlatın (port: 3010)
|
|
222
|
+
npm run storybook
|
|
20
223
|
```
|
|
21
224
|
|
|
22
|
-
|
|
225
|
+
Storybook başladıktan sonra tarayıcınızda `http://localhost:3010` adresini açın.
|
|
23
226
|
|
|
24
|
-
|
|
25
|
-
import React, { Component } from "react";
|
|
227
|
+
### Yeni Bileşen Oluşturma
|
|
26
228
|
|
|
27
|
-
|
|
28
|
-
import "odeon-component-library/dist/index.css";
|
|
229
|
+
Plop generator kullanarak yeni bileşen oluşturabilirsiniz:
|
|
29
230
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
return <MyComponent />;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
231
|
+
```bash
|
|
232
|
+
npm run plop
|
|
35
233
|
```
|
|
36
234
|
|
|
37
|
-
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
## Scripts
|
|
238
|
+
|
|
239
|
+
| Script | Açıklama |
|
|
240
|
+
|--------|----------|
|
|
241
|
+
| `npm run dev` | Watch modunda build |
|
|
242
|
+
| `npm run build` | Production build |
|
|
243
|
+
| `npm run storybook` | Storybook'u başlat (port: 3010) |
|
|
244
|
+
| `npm run build-storybook` | Storybook static build |
|
|
245
|
+
| `npm run test` | Testleri çalıştır |
|
|
246
|
+
| `npm run test:watch` | Testleri watch modunda çalıştır |
|
|
247
|
+
| `npm run test:lint` | ESLint kontrolü |
|
|
248
|
+
| `npm run plop` | Yeni bileşen oluştur |
|
|
249
|
+
| `npm run patch` | Versiyon patch |
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
253
|
+
## Klasör Yapısı
|
|
254
|
+
|
|
255
|
+
```
|
|
256
|
+
odeon-component-library/
|
|
257
|
+
├── src/
|
|
258
|
+
│ ├── components/
|
|
259
|
+
│ │ ├── antd/ # Ant Design tabanlı bileşenler
|
|
260
|
+
│ │ │ ├── alert/
|
|
261
|
+
│ │ │ ├── button/
|
|
262
|
+
│ │ │ ├── input/
|
|
263
|
+
│ │ │ └── ...
|
|
264
|
+
│ │ ├── devextreme/ # DevExtreme tabanlı bileşenler
|
|
265
|
+
│ │ │ ├── DataGrid/ # Modern OdsDataGrid
|
|
266
|
+
│ │ │ ├── OdsTimelineTable/
|
|
267
|
+
│ │ │ └── ...
|
|
268
|
+
│ │ ├── filter/ # Filtre bileşenleri
|
|
269
|
+
│ │ └── helpers/ # Yardımcı bileşenler
|
|
270
|
+
│ ├── hooks/ # Custom hooks
|
|
271
|
+
│ ├── stories/ # Storybook hikayeleri
|
|
272
|
+
│ ├── tokens/ # Design tokens
|
|
273
|
+
│ ├── utils/ # Utility fonksiyonlar
|
|
274
|
+
│ └── index.tsx # Ana export dosyası
|
|
275
|
+
├── dist/ # Build çıktısı
|
|
276
|
+
├── .storybook/ # Storybook yapılandırması
|
|
277
|
+
├── plop-templates/ # Plop template'leri
|
|
278
|
+
├── package.json
|
|
279
|
+
├── tsconfig.json
|
|
280
|
+
├── vite.config.ts
|
|
281
|
+
└── vitest.config.ts
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
---
|
|
285
|
+
|
|
286
|
+
## Build Çıktısı
|
|
287
|
+
|
|
288
|
+
Kütüphane aşağıdaki formatlarda build edilir:
|
|
289
|
+
|
|
290
|
+
- **ES Modules**: `dist/index.es.js`
|
|
291
|
+
- **CommonJS**: `dist/index.cjs.js`
|
|
292
|
+
- **TypeScript Types**: `dist/index.d.ts`
|
|
293
|
+
|
|
294
|
+
---
|
|
295
|
+
|
|
296
|
+
## Lisans
|
|
38
297
|
|
|
39
298
|
MIT © [OdeonTechnology](https://github.com/OdeonTechnology)
|
package/dist/_virtual/index10.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../node_modules/@rc-component/util/node_modules/react-is/index.js");var r=e.__require();exports.reactIsExports=r;
|
|
2
2
|
//# sourceMappingURL=index10.js.map
|
package/dist/_virtual/index11.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={exports:{}};exports.__module=e;
|
|
2
2
|
//# sourceMappingURL=index11.js.map
|
package/dist/_virtual/index3.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
|
|
2
2
|
//# sourceMappingURL=index3.js.map
|
package/dist/_virtual/index4.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../node_modules/react-is/index.js");var r=e.__require();exports.reactIsExports=r;
|
|
2
2
|
//# sourceMappingURL=index4.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react"),o=require("../../../../_virtual/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react"),o=require("../../../../_virtual/index10.js"),l=require("./hooks/useMemo.js"),a=require("./React/isFragment.js"),R=Number(u.version.split(".")[0]),i=(e,t)=>{typeof e=="function"?e(t):typeof e=="object"&&e&&"current"in e&&(e.current=t)},c=(...e)=>{const t=e.filter(Boolean);return t.length<=1?t[0]:r=>{e.forEach(s=>{i(s,r)})}},y=(...e)=>l(()=>c(...e),e,(t,r)=>t.length!==r.length||t.every((s,n)=>s!==r[n])),p=e=>{if(!e)return!1;if(f(e)&&R>=19)return!0;const t=o.reactIsExports.isMemo(e)?e.type.type:e.type;return!(typeof t=="function"&&!t.prototype?.render&&t.$$typeof!==o.reactIsExports.ForwardRef||typeof e=="function"&&!e.prototype?.render&&e.$$typeof!==o.reactIsExports.ForwardRef)};function f(e){return u.isValidElement(e)&&!a(e)}const g=e=>f(e)&&p(e),E=e=>{if(e&&f(e)){const t=e;return t.props.propertyIsEnumerable("ref")?t.props.ref:t.ref}return null};exports.composeRef=c;exports.fillRef=i;exports.getNodeRef=E;exports.supportNodeRef=g;exports.supportRef=p;exports.useComposeRef=y;
|
|
2
2
|
//# sourceMappingURL=ref.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../vite-plugin-node-polyfills/shims/process/dist/index.js"),e=require("../../../../_virtual/
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../vite-plugin-node-polyfills/shims/process/dist/index.js"),e=require("../../../../_virtual/index9.js"),o=require("./cjs/react-is.production.min.js"),u=require("./cjs/react-is.development.js");var r;function i(){return r||(r=1,t.default.env.NODE_ENV==="production"?e.__module.exports=o.__require():e.__module.exports=u.__require()),e.__module.exports}exports.__require=i;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../node_modules/hoist-non-react-statics/node_modules/react-is/index.js"],"sourcesContent":["'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n"],"names":["process","reactIsModule","require$$0","require$$1"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../node_modules/hoist-non-react-statics/node_modules/react-is/index.js"],"sourcesContent":["'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n"],"names":["process","reactIsModule","require$$0","require$$1"],"mappings":"0UAEIA,UAAQ,IAAI,WAAa,aAC3BC,EAAAA,SAAA,QAAiBC,YAAA,EAEjBD,EAAAA,SAAA,QAAiBE,YAAA","x_google_ignoreList":[0]}
|