@edmicro/olkit 1.1.3 → 1.1.5

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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Bergside Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Praveen Juge
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,49 @@
1
+ Creative Commons Attribution 4.0 International License (CC BY 4.0)
2
+
3
+ Solar Icon Set by 480 Design
4
+ https://www.figma.com/@solar
5
+ https://github.com/480-Design/Solar-Icon-Set
6
+
7
+ Licensed under Creative Commons Attribution 4.0 International (CC BY 4.0)
8
+ https://creativecommons.org/licenses/by/4.0/
9
+
10
+ =======================================================================
11
+
12
+ You are free to:
13
+
14
+ • Share — copy and redistribute the material in any medium or format
15
+ • Adapt — remix, transform, and build upon the material
16
+ for any purpose, even commercially.
17
+
18
+ The licensor cannot revoke these freedoms as long as you follow the license terms.
19
+
20
+ =======================================================================
21
+
22
+ Under the following terms:
23
+
24
+ • Attribution — You must give appropriate credit, provide a link to the license,
25
+ and indicate if changes were made. You may do so in any reasonable manner,
26
+ but not in any way that suggests the licensor endorses you or your use.
27
+
28
+ • No additional restrictions — You may not apply legal terms or technological
29
+ measures that legally restrict others from doing anything the license permits.
30
+
31
+ =======================================================================
32
+
33
+ Notices:
34
+
35
+ You do not have to comply with the license for elements of the material
36
+ in the public domain or where your use is permitted by an applicable
37
+ exception or limitation.
38
+
39
+ No warranties are given. The license may not give you all of the permissions
40
+ necessary for your intended use. For example, other rights such as publicity,
41
+ privacy, or moral rights may limit how you use the material.
42
+
43
+ =======================================================================
44
+
45
+ Full Legal Code:
46
+ https://creativecommons.org/licenses/by/4.0/legalcode
47
+
48
+ Attribution for this project:
49
+ Solar Icons by 480 Design, licensed under CC BY 4.0
package/README.md CHANGED
@@ -15,6 +15,7 @@ Thư viện thành phần giao diện người dùng (UI Components) chuẩn ho
15
15
  ---
16
16
 
17
17
  ## 📦 1. Cài đặt
18
+
18
19
  ```bash
19
20
  # Cài đặt qua Bun
20
21
  bun add @edmicro/olkit
@@ -26,7 +27,6 @@ npm install @edmicro/olkit
26
27
  yarn add @edmicro/olkit
27
28
  ```
28
29
 
29
-
30
30
  ---
31
31
 
32
32
  ## 🎨 2. Cấu hình Styles (Bắt buộc)
@@ -51,7 +51,6 @@ Thêm file `olkit.css` vào mục `styles` trong file `angular.json` của dự
51
51
  >
52
52
  > ⚠️ **Lưu ý:** Sau khi lưu file `angular.json`, hãy **khởi động lại dev server** (`Ctrl + C` và chạy lại `ng serve` / `npm start`) để Angular áp dụng stylesheet mới.
53
53
 
54
-
55
54
  ---
56
55
 
57
56
  ## 🚀 3. Hướng dẫn sử dụng Components
@@ -60,15 +59,15 @@ Do tất cả component đều là **Standalone**, bạn chỉ cần import comp
60
59
 
61
60
  ```typescript
62
61
  import { Component } from '@angular/core';
63
- import {
64
- OlButton,
62
+ import {
63
+ OlButton,
65
64
  OlDownloadAppButton,
66
- OlAlert,
67
- OlAccordion,
65
+ OlAlert,
66
+ OlAccordion,
68
67
  OlAccordionItem,
69
68
  OlModal,
70
69
  OlTabs,
71
- OlTabItem
70
+ OlTabItem,
72
71
  } from '@edmicro/olkit';
73
72
 
74
73
  @Component({
@@ -82,9 +81,9 @@ import {
82
81
  OlAccordionItem,
83
82
  OlModal,
84
83
  OlTabs,
85
- OlTabItem
84
+ OlTabItem,
86
85
  ],
87
- templateUrl: './dashboard.component.html'
86
+ templateUrl: './dashboard.component.html',
88
87
  })
89
88
  export class DashboardComponent {
90
89
  isModalOpen = false;
@@ -100,6 +99,7 @@ export class DashboardComponent {
100
99
  ## 💻 4. Code Mẫu Chi Tiết Từng Component
101
100
 
102
101
  ### 🔘 Buttons (`<ol-button>`)
102
+
103
103
  Hỗ trợ đầy đủ biến thể theo Figma Ôn Luyện: `brand` (#2B4182), `green` (#007A55), `red` (#C70036), `orange` (#FF5A1F), `ghost`, `tertiary`, `dark`, `white`.
104
104
 
105
105
  ```html
@@ -140,6 +140,7 @@ Hỗ trợ đầy đủ biến thể theo Figma Ôn Luyện: `brand` (#2B4182),
140
140
  ---
141
141
 
142
142
  ### 📲 Nút Tải Ứng Dụng (`<ol-download-app-button>`)
143
+
143
144
  Nút tải chuẩn nhận diện App Store & Google Play từ Figma Ôn Luyện (tự động thích ứng Light/Dark mode).
144
145
 
145
146
  ```html
@@ -155,6 +156,7 @@ Nút tải chuẩn nhận diện App Store & Google Play từ Figma Ôn Luyện
155
156
  ---
156
157
 
157
158
  ### 🔔 Alerts (`<ol-alert>`)
159
+
158
160
  Thông báo phản hồi ngữ cảnh: `info`, `danger` (red), `success` (green), `warning` (orange), `dark`.
159
161
 
160
162
  ```html
@@ -170,25 +172,19 @@ Thông báo phản hồi ngữ cảnh: `info`, `danger` (red), `success` (green)
170
172
  </ol-alert>
171
173
 
172
174
  <!-- Thông báo dạng Border Accent -->
173
- <ol-alert color="danger" [border]="true">
174
- Lỗi bảo mật: Phiên làm việc đã hết hạn.
175
- </ol-alert>
175
+ <ol-alert color="danger" [border]="true"> Lỗi bảo mật: Phiên làm việc đã hết hạn. </ol-alert>
176
176
  ```
177
177
 
178
178
  ---
179
179
 
180
180
  ### 🪟 Modals (`<ol-modal>`)
181
+
181
182
  Cửa sổ hộp thoại tương tác cao, có thể backdrop dismiss, ESC key, nhiều kích thước:
182
183
 
183
184
  ```html
184
185
  <ol-button color="brand" (click)="isModalOpen = true">Mở Modal</ol-button>
185
186
 
186
- <ol-modal
187
- [(isOpen)]="isModalOpen"
188
- title="Xác nhận nộp bài thi"
189
- size="md"
190
- [dismissible]="true"
191
- >
187
+ <ol-modal [(isOpen)]="isModalOpen" title="Xác nhận nộp bài thi" size="md" [dismissible]="true">
192
188
  <p class="text-sm text-gray-600 dark:text-gray-300">
193
189
  Bạn còn 3 câu chưa hoàn thành. Bạn có chắc chắn muốn nộp bài thi ngay bây giờ không?
194
190
  </p>
@@ -242,20 +238,49 @@ Cửa sổ hộp thoại tương tác cao, có thể backdrop dismiss, ESC key,
242
238
 
243
239
  ---
244
240
 
245
- ## 🛠️ 5. Cập nhật phiên bản mới
241
+ ## 📜 5. Nhật ký thay đổi
242
+
243
+ Mọi thay đổi đáng kể của thư viện — kèm hướng dẫn nâng cấp cho các bản có thay
244
+ đổi phá vỡ — ghi trong nhật ký:
245
+
246
+ <p align="center">
247
+ <a href="https://gitlab.edmicro.io/onluyenpub/olkit-source/-/blob/master/CHANGELOG.md">
248
+ <img alt="Xem nhật ký thay đổi"
249
+ src="https://img.shields.io/badge/%F0%9F%93%96%20Xem%20nh%E1%BA%ADt%20k%C3%BD%20thay%20%C4%91%E1%BB%95i-CHANGELOG.md-2B4182?style=for-the-badge" />
250
+ </a>
251
+ </p>
252
+
253
+ 👉 **[Mở CHANGELOG.md](https://gitlab.edmicro.io/onluyenpub/olkit-source/-/blob/master/CHANGELOG.md)** — dùng liên kết này nếu nút trên không hiện
254
+ (npmjs.com chặn một số ảnh từ miền ngoài).
246
255
 
247
- Khi có bản phát hành mới từ GitLab, bạn chỉ cần chạy lệnh cập nhật:
256
+ > 💡 Đọc nhật ký **trước khi nâng phiên bản**. Số hiệu của thư viện này là
257
+ > `patch` cả ở những bản có thay đổi phá vỡ, nên đừng dựa vào số để đoán —
258
+ > các bản đó có khối cảnh báo ⚠ ở đầu mục, kèm mã trước/sau và việc cần làm.
259
+
260
+ ---
261
+
262
+ ## 🛠️ 6. Cập nhật phiên bản mới
248
263
 
249
264
  ```bash
250
- # Cập nhật lại package từ repository
251
- npm install git+https://gitlab.edmicro.io/onluyenpub/olkit-deploy.git#v1.0.1
265
+ # Nâng lên bản mới nhất
266
+ npm install @edmicro/olkit@latest
267
+
268
+ # Hoặc ghim đúng một phiên bản
269
+ npm install @edmicro/olkit@1.1.4
270
+
271
+ # Xem các bản đã phát hành
272
+ npm view @edmicro/olkit versions
252
273
  ```
253
274
 
275
+ > Cách cài từ GitLab (`npm install git+https://…olkit-deploy.git#v1.0.1`) đã
276
+ > **bỏ** — gói phát hành trên NPM registry công khai từ bản 1.0.x.
277
+
254
278
  ---
255
279
 
256
280
  ## 📄 License & Bản quyền
257
281
 
258
282
  ### Giấy phép chính
283
+
259
284
  Dự án này được cấp phép theo **MIT License**
260
285
  Copyright (c) 2026 EDMicro
261
286
 
@@ -263,22 +288,24 @@ Copyright (c) 2026 EDMicro
263
288
 
264
289
  Dự án này tích hợp các thành phần mã nguồn mở từ bên thứ ba, mỗi thành phần giữ nguyên điều khoản giấy phép gốc:
265
290
 
266
- | Thành phần | License | Commercial Use | Attribution Required |
267
- |------------|---------|----------------|---------------------|
268
- | **Flowbite** | MIT | ✅ | Giữ copyright notice |
269
- | **Myna UI Icons** | MIT | ✅ | Giữ copyright notice |
270
- | **Solar Icons** | **CC BY 4.0** | ✅ | **✅ Bắt buộc** |
291
+ | Thành phần | License | Commercial Use | Attribution Required |
292
+ | ----------------- | ------------- | -------------- | -------------------- |
293
+ | **Flowbite** | MIT | ✅ | Giữ copyright notice |
294
+ | **Myna UI Icons** | MIT | ✅ | Giữ copyright notice |
295
+ | **Solar Icons** | **CC BY 4.0** | ✅ | **✅ Bắt buộc** |
271
296
 
272
297
  #### ⚠️ Lưu ý quan trọng về Solar Icons
273
298
 
274
- **Solar Icon Set** của 480 Design được cấp phép theo **Creative Commons Attribution 4.0 International (CC BY 4.0)**.
299
+ **Solar Icon Set** của 480 Design được cấp phép theo **Creative Commons Attribution 4.0 International (CC BY 4.0)**.
275
300
 
276
301
  Điều này có nghĩa:
302
+
277
303
  - ✅ Bạn có thể sử dụng cho mục đích thương mại
278
304
  - ✅ Bạn có thể chỉnh sửa, tùy biến màu sắc, kích thước
279
305
  - ⚠️ **BẮT BUỘC ghi công tác giả** (attribution) khi sử dụng
280
306
 
281
307
  **Attribution mẫu:**
308
+
282
309
  ```
283
310
  Solar Icons by 480 Design
284
311
  Licensed under CC BY 4.0
@@ -288,6 +315,7 @@ https://creativecommons.org/licenses/by/4.0/
288
315
  #### Chi tiết đầy đủ
289
316
 
290
317
  Xem chi tiết các giấy phép trong:
318
+
291
319
  - [`LICENSE`](../../LICENSE) - Giấy phép MIT chính của dự án
292
320
  - [`THIRD-PARTY-NOTICES`](../../THIRD-PARTY-NOTICES) - Thông báo đầy đủ về license bên thứ ba
293
321
  - [`LICENSES/`](../../LICENSES/) - Bản gốc các giấy phép:
@@ -298,6 +326,7 @@ Xem chi tiết các giấy phép trong:
298
326
  ---
299
327
 
300
328
  ## 📞 Liên hệ
329
+
301
330
  - **Đơn vị phát triển**: EDMICRO - Đội ngũ Frontend Ôn Luyện V4
302
331
  - **Figma Design System**: [Ôn Luyện Design System](https://www.figma.com/design/lip4g3PkcupVurtCxXCkEz/%C3%94n-Luy%E1%BB%87n-Design-System?node-id=2542-21012)
303
332
  - **GitLab Repository**: [https://gitlab.edmicro.io/onluyenpub/olkit-deploy](https://gitlab.edmicro.io/onluyenpub/olkit-deploy)