@ogidor/dashboard 1.0.12 → 1.0.14
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 +83 -41
- package/app/models.d.ts +24 -0
- package/esm2020/app/dashboard.component.mjs +27 -3
- package/esm2020/app/models.mjs +1 -1
- package/fesm2015/ogidor-dashboard.mjs +26 -2
- package/fesm2015/ogidor-dashboard.mjs.map +1 -1
- package/fesm2020/ogidor-dashboard.mjs +26 -2
- package/fesm2020/ogidor-dashboard.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@ sync — out of the box.
|
|
|
32
32
|
- **Structural Sync** — adding, removing, or renaming a widget in any window instantly appears in all open windows via `BroadcastChannel`.
|
|
33
33
|
- **Persistent Layout** — state is saved to `localStorage` on every change and restored on reload.
|
|
34
34
|
- **Content-Agnostic Cards** — you own the card body; stamp any Angular component, chart, or markup inside via `ng-template`.
|
|
35
|
-
- **Fully Themeable** —
|
|
35
|
+
- **Fully Themeable** — 32 colour tokens plus font family, controllable via a typed `DashboardTheme` input or CSS custom properties.
|
|
36
36
|
|
|
37
37
|
---
|
|
38
38
|
|
|
@@ -297,35 +297,49 @@ export interface DashboardConfig {
|
|
|
297
297
|
|
|
298
298
|
```typescript
|
|
299
299
|
export interface DashboardTheme {
|
|
300
|
-
// Layout
|
|
301
|
-
backgroundColor?: string; // outer wrapper
|
|
302
|
-
panelColor?: string; // main panel
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
//
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
//
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
// Widget
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
//
|
|
327
|
-
|
|
328
|
-
|
|
300
|
+
// ── Layout ──
|
|
301
|
+
backgroundColor?: string; // outer wrapper default: #000000
|
|
302
|
+
panelColor?: string; // main panel bg default: #1c1c1e
|
|
303
|
+
panelBorderColor?: string; // panel & pop-out border default: rgba(255,255,255,0.05)
|
|
304
|
+
widgetCardColor?: string; // card background default: #2c2c2e
|
|
305
|
+
foreColor?: string; // text / labels default: #8e8e93
|
|
306
|
+
accentColor?: string; // active states, buttons default: #0a84ff
|
|
307
|
+
accentTintColor?: string; // light accent hover bg default: rgba(10,132,255,0.15)
|
|
308
|
+
accentTintStrongColor?: string; // strong accent active bg default: rgba(10,132,255,0.25)
|
|
309
|
+
dangerColor?: string; // destructive actions default: #ff453a
|
|
310
|
+
dangerTintColor?: string; // light danger hover bg default: rgba(255,69,58,0.22)
|
|
311
|
+
fontFamily?: string; // global font stack default: system-ui
|
|
312
|
+
|
|
313
|
+
// ── Header & Tabs ──
|
|
314
|
+
tabsContainerColor?: string; // pill container bg default: rgba(44,44,46,0.6)
|
|
315
|
+
tabActiveColor?: string; // active tab bg default: #3a3a3c
|
|
316
|
+
tabActiveTextColor?: string; // active tab text default: #ffffff
|
|
317
|
+
tabHoverTextColor?: string; // hovered tab text default: #e5e5ea
|
|
318
|
+
tabHoverBgColor?: string; // hovered tab bg default: rgba(255,255,255,0.05)
|
|
319
|
+
addWidgetButtonTextColor?: string; // Add Widget label default: #ffffff
|
|
320
|
+
overflowBtnBgColor?: string; // "+N more" button bg default: rgba(255,255,255,0.08)
|
|
321
|
+
overflowBtnBorderColor?: string; // "+N more" button border default: rgba(255,255,255,0.12)
|
|
322
|
+
|
|
323
|
+
// ── Tab-switcher overlay ──
|
|
324
|
+
overlayBgColor?: string; // dimmed backdrop default: rgba(0,0,0,0.55)
|
|
325
|
+
sheetBorderColor?: string; // sheet border & dividers default: rgba(255,255,255,0.08)
|
|
326
|
+
scrollbarColor?: string; // scrollbar thumb default: rgba(255,255,255,0.15)
|
|
327
|
+
switcherTitleColor?: string; // dialog "N Workspaces" text default: #ffffff
|
|
328
|
+
switcherCardTextColor?: string; // dialog card name text default: #ffffff
|
|
329
|
+
|
|
330
|
+
// ── Pop-out Window ──
|
|
331
|
+
popoutTitleColor?: string; // pop-out title text default: #ffffff
|
|
332
|
+
|
|
333
|
+
// ── Widget Card ──
|
|
334
|
+
widgetTitleColor?: string; // card title default: #ffffff
|
|
335
|
+
dragHandleColor?: string; // drag dots default: rgba(255,255,255,0.2)
|
|
336
|
+
widgetBorderColor?: string; // card border default: rgba(255,255,255,0.07)
|
|
337
|
+
widgetButtonBgColor?: string; // icon button bg default: rgba(255,255,255,0.07)
|
|
338
|
+
widgetButtonColor?: string; // icon button colour default: rgba(255,255,255,0.5)
|
|
339
|
+
|
|
340
|
+
// ── Grid ──
|
|
341
|
+
placeholderColor?: string; // drag ghost overlay default: #0a84ff
|
|
342
|
+
resizeHandleColor?: string; // resize icon default: rgba(255,255,255,0.25)
|
|
329
343
|
}
|
|
330
344
|
```
|
|
331
345
|
|
|
@@ -341,11 +355,13 @@ Pass a partial `DashboardTheme` to `[theme]`. Only provided fields are overridde
|
|
|
341
355
|
|
|
342
356
|
```typescript
|
|
343
357
|
theme: DashboardTheme = {
|
|
344
|
-
accentColor:
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
358
|
+
accentColor: '#6c63ff',
|
|
359
|
+
accentTintColor: 'rgba(108,99,255,0.15)',
|
|
360
|
+
accentTintStrongColor: 'rgba(108,99,255,0.25)',
|
|
361
|
+
tabActiveColor: '#2a2a38',
|
|
362
|
+
tabActiveTextColor: '#ffffff',
|
|
363
|
+
widgetTitleColor: '#f0f0f0',
|
|
364
|
+
placeholderColor: '#6c63ff',
|
|
349
365
|
};
|
|
350
366
|
```
|
|
351
367
|
|
|
@@ -355,37 +371,51 @@ theme: DashboardTheme = {
|
|
|
355
371
|
|
|
356
372
|
### CSS Custom Properties
|
|
357
373
|
|
|
358
|
-
Every token is also available as a CSS variable
|
|
374
|
+
Every token is also available as a CSS variable on the `app-dashboard` host element:
|
|
359
375
|
|
|
360
376
|
```css
|
|
361
377
|
app-dashboard {
|
|
362
|
-
/* Layout */
|
|
378
|
+
/* ── Layout ── */
|
|
363
379
|
--dash-bg: #0d0d0d;
|
|
364
380
|
--dash-panel-bg: #161616;
|
|
381
|
+
--dash-panel-border: rgba(255,255,255,0.06);
|
|
365
382
|
--dash-card-bg: #1f1f1f;
|
|
366
383
|
--dash-fore-color: #a0a0a0;
|
|
367
384
|
--dash-accent-color: #6c63ff;
|
|
385
|
+
--dash-accent-tint: rgba(108,99,255,0.15);
|
|
386
|
+
--dash-accent-tint-strong: rgba(108,99,255,0.25);
|
|
368
387
|
--dash-danger-color: #e84545;
|
|
388
|
+
--dash-danger-tint: rgba(232,69,69,0.22);
|
|
369
389
|
--dash-font-family: 'Inter', sans-serif;
|
|
370
390
|
|
|
371
|
-
/* Header / Tabs */
|
|
391
|
+
/* ── Header / Tabs ── */
|
|
372
392
|
--dash-tabs-container-color: rgba(30,30,32,0.7);
|
|
373
393
|
--dash-tab-active-color: #2a2a2e;
|
|
374
394
|
--dash-tab-active-text: #ffffff;
|
|
375
395
|
--dash-tab-hover-text: #d0d0d5;
|
|
396
|
+
--dash-tab-hover-bg: rgba(255,255,255,0.05);
|
|
376
397
|
--dash-add-widget-text: #ffffff;
|
|
398
|
+
--dash-overflow-btn-bg: rgba(255,255,255,0.08);
|
|
399
|
+
--dash-overflow-btn-border: rgba(255,255,255,0.12);
|
|
377
400
|
|
|
378
|
-
/*
|
|
401
|
+
/* ── Tab-switcher overlay ── */
|
|
402
|
+
--dash-overlay-bg: rgba(0,0,0,0.6);
|
|
403
|
+
--dash-sheet-border: rgba(255,255,255,0.08);
|
|
404
|
+
--dash-scrollbar-color: rgba(255,255,255,0.15);
|
|
405
|
+
--dash-switcher-title: #ffffff;
|
|
406
|
+
--dash-switcher-card-text: #ffffff;
|
|
407
|
+
|
|
408
|
+
/* ── Pop-out ── */
|
|
379
409
|
--dash-popout-title-color: #ffffff;
|
|
380
410
|
|
|
381
|
-
/* Widget card */
|
|
411
|
+
/* ── Widget card ── */
|
|
382
412
|
--dash-widget-title-color: #ffffff;
|
|
383
413
|
--dash-drag-handle-color: rgba(255,255,255,0.2);
|
|
384
414
|
--dash-widget-border-color: rgba(255,255,255,0.07);
|
|
385
415
|
--dash-widget-btn-bg: rgba(255,255,255,0.07);
|
|
386
416
|
--dash-widget-btn-color: rgba(255,255,255,0.5);
|
|
387
417
|
|
|
388
|
-
/* Grid */
|
|
418
|
+
/* ── Grid ── */
|
|
389
419
|
--dash-placeholder-color: #6c63ff;
|
|
390
420
|
--dash-resize-handle-color: rgba(255,255,255,0.25);
|
|
391
421
|
}
|
|
@@ -397,16 +427,28 @@ app-dashboard {
|
|
|
397
427
|
|---|---|---|
|
|
398
428
|
| `--dash-bg` | `backgroundColor` | `#000000` |
|
|
399
429
|
| `--dash-panel-bg` | `panelColor` | `#1c1c1e` |
|
|
430
|
+
| `--dash-panel-border` | `panelBorderColor` | `rgba(255,255,255,0.05)` |
|
|
400
431
|
| `--dash-card-bg` | `widgetCardColor` | `#2c2c2e` |
|
|
401
432
|
| `--dash-fore-color` | `foreColor` | `#8e8e93` |
|
|
402
433
|
| `--dash-accent-color` | `accentColor` | `#0a84ff` |
|
|
434
|
+
| `--dash-accent-tint` | `accentTintColor` | `rgba(10,132,255,0.15)` |
|
|
435
|
+
| `--dash-accent-tint-strong` | `accentTintStrongColor` | `rgba(10,132,255,0.25)` |
|
|
403
436
|
| `--dash-danger-color` | `dangerColor` | `#ff453a` |
|
|
437
|
+
| `--dash-danger-tint` | `dangerTintColor` | `rgba(255,69,58,0.22)` |
|
|
404
438
|
| `--dash-font-family` | `fontFamily` | system-ui stack |
|
|
405
439
|
| `--dash-tabs-container-color` | `tabsContainerColor` | `rgba(44,44,46,0.6)` |
|
|
406
440
|
| `--dash-tab-active-color` | `tabActiveColor` | `#3a3a3c` |
|
|
407
441
|
| `--dash-tab-active-text` | `tabActiveTextColor` | `#ffffff` |
|
|
408
442
|
| `--dash-tab-hover-text` | `tabHoverTextColor` | `#e5e5ea` |
|
|
443
|
+
| `--dash-tab-hover-bg` | `tabHoverBgColor` | `rgba(255,255,255,0.05)` |
|
|
409
444
|
| `--dash-add-widget-text` | `addWidgetButtonTextColor` | `#ffffff` |
|
|
445
|
+
| `--dash-overflow-btn-bg` | `overflowBtnBgColor` | `rgba(255,255,255,0.08)` |
|
|
446
|
+
| `--dash-overflow-btn-border` | `overflowBtnBorderColor` | `rgba(255,255,255,0.12)` |
|
|
447
|
+
| `--dash-overlay-bg` | `overlayBgColor` | `rgba(0,0,0,0.55)` |
|
|
448
|
+
| `--dash-sheet-border` | `sheetBorderColor` | `rgba(255,255,255,0.08)` |
|
|
449
|
+
| `--dash-scrollbar-color` | `scrollbarColor` | `rgba(255,255,255,0.15)` |
|
|
450
|
+
| `--dash-switcher-title` | `switcherTitleColor` | `#ffffff` |
|
|
451
|
+
| `--dash-switcher-card-text` | `switcherCardTextColor` | `#ffffff` |
|
|
410
452
|
| `--dash-popout-title-color` | `popoutTitleColor` | `#ffffff` |
|
|
411
453
|
| `--dash-widget-title-color` | `widgetTitleColor` | `#ffffff` |
|
|
412
454
|
| `--dash-drag-handle-color` | `dragHandleColor` | `rgba(255,255,255,0.2)` |
|
package/app/models.d.ts
CHANGED
|
@@ -40,14 +40,22 @@ export interface DashboardTheme {
|
|
|
40
40
|
backgroundColor?: string;
|
|
41
41
|
/** Background color of the main content panel. Default: `#1c1c1e` */
|
|
42
42
|
panelColor?: string;
|
|
43
|
+
/** Subtle border on the main panel and pop-out header. Default: `rgba(255,255,255,0.05)` */
|
|
44
|
+
panelBorderColor?: string;
|
|
43
45
|
/** Background color of individual widget cards. Default: `#2c2c2e` */
|
|
44
46
|
widgetCardColor?: string;
|
|
45
47
|
/** Primary foreground/text color. Default: `#8e8e93` */
|
|
46
48
|
foreColor?: string;
|
|
47
49
|
/** Primary accent color (active tabs, buttons, etc.). Default: `#0a84ff` */
|
|
48
50
|
accentColor?: string;
|
|
51
|
+
/** Light tint of the accent color used for hover backgrounds. Default: `rgba(10,132,255,0.15)` */
|
|
52
|
+
accentTintColor?: string;
|
|
53
|
+
/** Stronger tint of the accent color used for active card backgrounds. Default: `rgba(10,132,255,0.25)` */
|
|
54
|
+
accentTintStrongColor?: string;
|
|
49
55
|
/** Danger color used on remove-widget button hover. Default: `#ff453a` */
|
|
50
56
|
dangerColor?: string;
|
|
57
|
+
/** Light tint of the danger color used for hover backgrounds. Default: `rgba(255,69,58,0.22)` */
|
|
58
|
+
dangerTintColor?: string;
|
|
51
59
|
/** Font family applied to the whole dashboard. Default: system-ui stack */
|
|
52
60
|
fontFamily?: string;
|
|
53
61
|
/** Background of the tabs pill container. Default: `rgba(44,44,46,0.6)` */
|
|
@@ -58,8 +66,24 @@ export interface DashboardTheme {
|
|
|
58
66
|
tabActiveTextColor?: string;
|
|
59
67
|
/** Text color of hovered (inactive) tabs. Default: `#e5e5ea` */
|
|
60
68
|
tabHoverTextColor?: string;
|
|
69
|
+
/** Background of a hovered (inactive) tab. Default: `rgba(255,255,255,0.05)` */
|
|
70
|
+
tabHoverBgColor?: string;
|
|
61
71
|
/** Text color of the "Add Widget" button. Default: `#ffffff` */
|
|
62
72
|
addWidgetButtonTextColor?: string;
|
|
73
|
+
/** Background of the overflow "+N" button. Default: `rgba(255,255,255,0.08)` */
|
|
74
|
+
overflowBtnBgColor?: string;
|
|
75
|
+
/** Border of the overflow "+N" button. Default: `rgba(255,255,255,0.12)` */
|
|
76
|
+
overflowBtnBorderColor?: string;
|
|
77
|
+
/** Background of the full-screen overlay behind the tab-switcher sheet. Default: `rgba(0,0,0,0.55)` */
|
|
78
|
+
overlayBgColor?: string;
|
|
79
|
+
/** Border color of the tab-switcher sheet and its inner dividers. Default: `rgba(255,255,255,0.08)` */
|
|
80
|
+
sheetBorderColor?: string;
|
|
81
|
+
/** Scrollbar thumb color inside the tab-switcher grid. Default: `rgba(255,255,255,0.15)` */
|
|
82
|
+
scrollbarColor?: string;
|
|
83
|
+
/** Text color of the "N Workspaces" title inside the tab-switcher dialog. Default: `#ffffff` */
|
|
84
|
+
switcherTitleColor?: string;
|
|
85
|
+
/** Text color of workspace card names inside the tab-switcher dialog. Default: `#ffffff` */
|
|
86
|
+
switcherCardTextColor?: string;
|
|
63
87
|
/** Text color of the pop-out page title. Default: `#ffffff` */
|
|
64
88
|
popoutTitleColor?: string;
|
|
65
89
|
/** Text color of the widget card title. Default: `#ffffff` */
|