@goat-bravos/intern-hub-layout 2.0.5 → 3.0.0
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
CHANGED
|
@@ -156,6 +156,8 @@ interface HeaderData {
|
|
|
156
156
|
dropdownIcon?: IconData | string;
|
|
157
157
|
dropdownIconColor?: string;
|
|
158
158
|
logo?: string;
|
|
159
|
+
logoWidth?: string;
|
|
160
|
+
logoHeight?: string;
|
|
159
161
|
}
|
|
160
162
|
|
|
161
163
|
interface HeaderAction {
|
|
@@ -186,30 +188,96 @@ import { SidebarComponent, SidebarData, SidebarItem } from "@goat-bravos/intern-
|
|
|
186
188
|
})
|
|
187
189
|
export class MyComponent {
|
|
188
190
|
sidebarData: SidebarData = {
|
|
191
|
+
backgroundColor: "var(--brand-500)",
|
|
192
|
+
collapseIcon: "dsi-arrow-left-line",
|
|
193
|
+
expandIcon: "dsi-arrow-right-line",
|
|
194
|
+
toggleButtonBackgroundColor: "var(--brand-700)",
|
|
195
|
+
closeButtonBackgroundColor: "var(--neutral-color-50)",
|
|
196
|
+
toggleButtonIconColor: "var(--neutral-alpha-white)",
|
|
197
|
+
toggleButtonWidth: "32px",
|
|
198
|
+
toggleButtonHeight: "32px",
|
|
199
|
+
toggleButtonSize: "sm",
|
|
200
|
+
|
|
189
201
|
menuItems: [
|
|
190
202
|
{
|
|
191
203
|
iconLeft: "dsi-home-01-line",
|
|
192
|
-
content: "
|
|
193
|
-
url: "/
|
|
194
|
-
colorIconLeft: "
|
|
195
|
-
colorIconLeftHover: "
|
|
196
|
-
|
|
197
|
-
|
|
204
|
+
content: "Trang chủ",
|
|
205
|
+
url: "/homePage",
|
|
206
|
+
colorIconLeft: "var(--neutral-color-100)",
|
|
207
|
+
colorIconLeftHover: "var(--brand-500)",
|
|
208
|
+
colorContent: "var(--neutral-color-300)",
|
|
209
|
+
colorContentHover: "var(--brand-500)",
|
|
210
|
+
backgroundColorHover: "var(--neutral-100)",
|
|
211
|
+
borderRadius: "8px",
|
|
212
|
+
width: "100%",
|
|
213
|
+
height: "48px",
|
|
198
214
|
},
|
|
199
215
|
{
|
|
200
|
-
iconLeft: "dsi-
|
|
201
|
-
content: "
|
|
216
|
+
iconLeft: "dsi-user-01-line",
|
|
217
|
+
content: "Quản lý người dùng",
|
|
202
218
|
url: "/users",
|
|
203
|
-
colorIconLeft: "
|
|
204
|
-
colorIconLeftHover: "
|
|
219
|
+
colorIconLeft: "var(--neutral-color-100)",
|
|
220
|
+
colorIconLeftHover: "var(--brand-500)",
|
|
221
|
+
colorContent: "var(--neutral-color-300)",
|
|
222
|
+
colorContentHover: "var(--brand-500)",
|
|
223
|
+
backgroundColorHover: "var(--neutral-100)",
|
|
224
|
+
borderRadius: "8px",
|
|
225
|
+
width: "100%",
|
|
226
|
+
height: "48px",
|
|
205
227
|
},
|
|
206
228
|
{
|
|
207
|
-
iconLeft: "dsi-
|
|
208
|
-
content: "
|
|
209
|
-
url: "/
|
|
229
|
+
iconLeft: "dsi-briefcase-line",
|
|
230
|
+
content: "Dự án",
|
|
231
|
+
url: "/projects",
|
|
232
|
+
colorIconLeft: "var(--neutral-color-100)",
|
|
233
|
+
colorIconLeftHover: "var(--brand-500)",
|
|
234
|
+
colorContent: "var(--neutral-color-300)",
|
|
235
|
+
colorContentHover: "var(--brand-500)",
|
|
236
|
+
backgroundColorHover: "var(--neutral-100)",
|
|
237
|
+
borderRadius: "8px",
|
|
238
|
+
width: "100%",
|
|
239
|
+
height: "48px",
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
iconLeft: "dsi-calendar-line",
|
|
243
|
+
content: "Lịch làm việc",
|
|
244
|
+
url: "/calendar",
|
|
245
|
+
colorIconLeft: "var(--neutral-color-100)",
|
|
246
|
+
colorIconLeftHover: "var(--brand-500)",
|
|
247
|
+
colorContent: "var(--neutral-color-300)",
|
|
248
|
+
colorContentHover: "var(--brand-500)",
|
|
249
|
+
backgroundColorHover: "var(--neutral-100)",
|
|
250
|
+
borderRadius: "8px",
|
|
251
|
+
width: "100%",
|
|
252
|
+
height: "48px",
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
iconLeft: "dsi-chart-line",
|
|
256
|
+
content: "Thống kê",
|
|
257
|
+
url: "/statistics",
|
|
258
|
+
colorIconLeft: "var(--neutral-color-100)",
|
|
259
|
+
colorIconLeftHover: "var(--brand-500)",
|
|
260
|
+
colorContent: "var(--neutral-color-300)",
|
|
261
|
+
colorContentHover: "var(--brand-500)",
|
|
262
|
+
backgroundColorHover: "var(--neutral-100)",
|
|
263
|
+
borderRadius: "8px",
|
|
264
|
+
width: "100%",
|
|
265
|
+
height: "48px",
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
iconLeft: "dsi-team-line",
|
|
269
|
+
content: "Nhóm",
|
|
270
|
+
url: "/teams",
|
|
271
|
+
colorIconLeft: "var(--neutral-color-100)",
|
|
272
|
+
colorIconLeftHover: "var(--brand-500)",
|
|
273
|
+
colorContent: "var(--neutral-color-300)",
|
|
274
|
+
colorContentHover: "var(--brand-500)",
|
|
275
|
+
backgroundColorHover: "var(--neutral-100)",
|
|
276
|
+
borderRadius: "8px",
|
|
277
|
+
width: "100%",
|
|
278
|
+
height: "48px",
|
|
210
279
|
},
|
|
211
280
|
],
|
|
212
|
-
backgroundColor: "#1e293b",
|
|
213
281
|
};
|
|
214
282
|
}
|
|
215
283
|
```
|
|
@@ -239,6 +307,17 @@ interface SidebarItem {
|
|
|
239
307
|
interface SidebarData {
|
|
240
308
|
menuItems: SidebarItem[];
|
|
241
309
|
backgroundColor?: string;
|
|
310
|
+
collapseIcon?: string;
|
|
311
|
+
expandIcon?: string;
|
|
312
|
+
toggleButtonBackgroundColor?: string;
|
|
313
|
+
toggleButtonIconColor?: string;
|
|
314
|
+
toggleButtonSize?: string;
|
|
315
|
+
toggleButtonBorderRadius?: string;
|
|
316
|
+
toggleButtonPadding?: string;
|
|
317
|
+
toggleButtonWidth?: string;
|
|
318
|
+
toggleButtonHeight?: string;
|
|
319
|
+
toggleButtonMarginRight?: string;
|
|
320
|
+
toggleButtonMarginLeft?: string;
|
|
242
321
|
}
|
|
243
322
|
```
|
|
244
323
|
|
|
@@ -283,20 +362,19 @@ export class MyComponent {
|
|
|
283
362
|
|
|
284
363
|
**Inputs:**
|
|
285
364
|
|
|
286
|
-
| Input | Type | Default | Description
|
|
287
|
-
| ----------------- | ------------------------------ | ---------------------- |
|
|
288
|
-
|
|
|
289
|
-
|
|
|
290
|
-
| `
|
|
291
|
-
| `
|
|
292
|
-
| `
|
|
293
|
-
| `
|
|
294
|
-
| `
|
|
295
|
-
| `
|
|
296
|
-
| `
|
|
297
|
-
| `
|
|
298
|
-
| `
|
|
299
|
-
| `fontSize` | `string` | - | Custom font size |
|
|
365
|
+
| Input | Type | Default | Description |
|
|
366
|
+
| ----------------- | ------------------------------ | ---------------------- | --------------------- |
|
|
367
|
+
| `size` | `'xs' \| 'sm' \| 'md' \| 'lg'` | `'md'` (Optional) | Button size variant |
|
|
368
|
+
| `content` | `string` | `''` | Button text |
|
|
369
|
+
| `leftIcon` | `string` | - | Left icon text/class |
|
|
370
|
+
| `rightIcon` | `string` | - | Right icon text/class |
|
|
371
|
+
| `color` | `string` | `'var(--brand-100)'` | Text color |
|
|
372
|
+
| `backgroundColor` | `string` | `'var(--utility-900)'` | Background color |
|
|
373
|
+
| `border` | `string` | - | Border style |
|
|
374
|
+
| `borderRadius` | `string` | - | Button border radius |
|
|
375
|
+
| `width` | `string` | - | Button width |
|
|
376
|
+
| `fontSize` | `string` | - | Custom font size |
|
|
377
|
+
| `buttonData` | `ButtonContainerData` | - | Config object |
|
|
300
378
|
|
|
301
379
|
**Outputs:**
|
|
302
380
|
|
|
@@ -400,7 +478,7 @@ export class MyComponent {
|
|
|
400
478
|
| `icon` | `string` | `''` | Icon class for input |
|
|
401
479
|
| `typeInput` | `string` | `'text'` | Input type (text, password, etc.) |
|
|
402
480
|
| `backgroundColor` | `string` | - | Input background color |
|
|
403
|
-
| `
|
|
481
|
+
| `border` | `string` | - | Input border style |
|
|
404
482
|
| `borderColorHover` | `string` | - | Input border color on hover |
|
|
405
483
|
| `borderRadius` | `string` | - | Input border radius |
|
|
406
484
|
| `placeholderColor` | `string` | - | Placeholder text color |
|
|
@@ -772,6 +850,8 @@ interface IconData {
|
|
|
772
850
|
routerLink?: string;
|
|
773
851
|
width?: string;
|
|
774
852
|
height?: string;
|
|
853
|
+
backgroundColor?: string;
|
|
854
|
+
backgroundColorHover?: string;
|
|
775
855
|
}
|
|
776
856
|
```
|
|
777
857
|
|
|
@@ -802,61 +882,39 @@ export class MyComponent {
|
|
|
802
882
|
}
|
|
803
883
|
```
|
|
804
884
|
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
## 🛠️ Development
|
|
808
|
-
|
|
809
|
-
### Prerequisites
|
|
885
|
+
**Inputs (Key inputs only):**
|
|
810
886
|
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
887
|
+
| Input | Type | Description |
|
|
888
|
+
| --------------- | -------------------- | ------------------------- |
|
|
889
|
+
| `content` | `string` | Label text |
|
|
890
|
+
| `iconLeft` | `IconData \| string` | Left icon |
|
|
891
|
+
| `iconRight` | `IconData \| string` | Right icon |
|
|
892
|
+
| `routerLink` | `string` | Navigation URL |
|
|
893
|
+
| `colorContent` | `string` | Text color |
|
|
894
|
+
| `colorIconLeft` | `string` | Left icon color |
|
|
895
|
+
| `bgColor` | `string` | Background color |
|
|
896
|
+
| `bgColorHover` | `string` | Background color on hover |
|
|
814
897
|
|
|
815
|
-
|
|
898
|
+
**Outputs:**
|
|
816
899
|
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
900
|
+
| Output | Type | Description |
|
|
901
|
+
| --------- | --------------------- | --------------------- |
|
|
902
|
+
| `clicked` | `EventEmitter<Event>` | Emits on click events |
|
|
820
903
|
|
|
821
|
-
|
|
822
|
-
npm run build
|
|
904
|
+
---
|
|
823
905
|
|
|
824
|
-
|
|
825
|
-
npm run pack:lib
|
|
826
|
-
```
|
|
906
|
+
## 🛠️ Development
|
|
827
907
|
|
|
828
|
-
###
|
|
908
|
+
### Building the library
|
|
829
909
|
|
|
830
910
|
```bash
|
|
831
|
-
|
|
832
|
-
npm run publish:lib:dry
|
|
833
|
-
|
|
834
|
-
# Publish to npm
|
|
835
|
-
npm run publish:lib
|
|
911
|
+
npm run build
|
|
836
912
|
```
|
|
837
913
|
|
|
838
|
-
###
|
|
914
|
+
### Running the demo app
|
|
839
915
|
|
|
840
|
-
```
|
|
841
|
-
|
|
842
|
-
├── src/
|
|
843
|
-
│ ├── libs/
|
|
844
|
-
│ │ ├── layouts/ # Layout components
|
|
845
|
-
│ │ │ ├── header/ # Header component
|
|
846
|
-
│ │ │ └── sidebar/ # Sidebar component
|
|
847
|
-
│ │ └── shared/
|
|
848
|
-
│ │ └── components/ # Shared UI components
|
|
849
|
-
│ │ ├── button/ # Button components
|
|
850
|
-
│ │ ├── input/ # Input components
|
|
851
|
-
│ │ ├── table/ # Table components
|
|
852
|
-
│ │ ├── approval/ # Approval list components
|
|
853
|
-
│ │ ├── pop-up/ # Pop-up/modal components
|
|
854
|
-
│ │ ├── icon/ # Icon component
|
|
855
|
-
│ │ └── functional-label/
|
|
856
|
-
│ └── public-api.ts # Public exports
|
|
857
|
-
├── ng-package.json # ng-packagr config
|
|
858
|
-
├── package.json
|
|
859
|
-
└── README.md
|
|
916
|
+
```bash
|
|
917
|
+
npm run demo
|
|
860
918
|
```
|
|
861
919
|
|
|
862
920
|
---
|
|
@@ -865,28 +923,14 @@ intern-hub-fe-layout/
|
|
|
865
923
|
|
|
866
924
|
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
867
925
|
|
|
868
|
-
1. Fork the
|
|
869
|
-
2. Create your feature branch (`git checkout -b feature/
|
|
870
|
-
3. Commit your changes (`git commit -m 'Add
|
|
871
|
-
4. Push to the branch (`git push origin feature/
|
|
926
|
+
1. Fork the project
|
|
927
|
+
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
|
|
928
|
+
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
|
|
929
|
+
4. Push to the branch (`git push origin feature/AmazingFeature`)
|
|
872
930
|
5. Open a Pull Request
|
|
873
931
|
|
|
874
932
|
---
|
|
875
933
|
|
|
876
934
|
## 📄 License
|
|
877
935
|
|
|
878
|
-
This project is licensed under the MIT License - see the
|
|
879
|
-
|
|
880
|
-
---
|
|
881
|
-
|
|
882
|
-
## 👥 Author
|
|
883
|
-
|
|
884
|
-
**Intern Hub Team**
|
|
885
|
-
|
|
886
|
-
- Repository: [GitHub](https://github.com/FPT-IS-Intern/Intern-Hub-FE-Layout)
|
|
887
|
-
|
|
888
|
-
---
|
|
889
|
-
|
|
890
|
-
<div align="center">
|
|
891
|
-
<sub>Built with ❤️ by Intern Hub Team</sub>
|
|
892
|
-
</div>
|
|
936
|
+
This project is licensed under the MIT License - see the LICENSE file for details.
|