@ogidor/dashboard 1.0.12 → 1.0.13
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 +77 -41
- package/app/models.d.ts +20 -0
- package/esm2020/app/dashboard.component.mjs +23 -3
- package/esm2020/app/models.mjs +1 -1
- package/fesm2015/ogidor-dashboard.mjs +22 -2
- package/fesm2015/ogidor-dashboard.mjs.map +1 -1
- package/fesm2020/ogidor-dashboard.mjs +22 -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,47 @@ 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
|
+
|
|
328
|
+
// ── Pop-out Window ──
|
|
329
|
+
popoutTitleColor?: string; // pop-out title text default: #ffffff
|
|
330
|
+
|
|
331
|
+
// ── Widget Card ──
|
|
332
|
+
widgetTitleColor?: string; // card title default: #ffffff
|
|
333
|
+
dragHandleColor?: string; // drag dots default: rgba(255,255,255,0.2)
|
|
334
|
+
widgetBorderColor?: string; // card border default: rgba(255,255,255,0.07)
|
|
335
|
+
widgetButtonBgColor?: string; // icon button bg default: rgba(255,255,255,0.07)
|
|
336
|
+
widgetButtonColor?: string; // icon button colour default: rgba(255,255,255,0.5)
|
|
337
|
+
|
|
338
|
+
// ── Grid ──
|
|
339
|
+
placeholderColor?: string; // drag ghost overlay default: #0a84ff
|
|
340
|
+
resizeHandleColor?: string; // resize icon default: rgba(255,255,255,0.25)
|
|
329
341
|
}
|
|
330
342
|
```
|
|
331
343
|
|
|
@@ -341,11 +353,13 @@ Pass a partial `DashboardTheme` to `[theme]`. Only provided fields are overridde
|
|
|
341
353
|
|
|
342
354
|
```typescript
|
|
343
355
|
theme: DashboardTheme = {
|
|
344
|
-
accentColor:
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
356
|
+
accentColor: '#6c63ff',
|
|
357
|
+
accentTintColor: 'rgba(108,99,255,0.15)',
|
|
358
|
+
accentTintStrongColor: 'rgba(108,99,255,0.25)',
|
|
359
|
+
tabActiveColor: '#2a2a38',
|
|
360
|
+
tabActiveTextColor: '#ffffff',
|
|
361
|
+
widgetTitleColor: '#f0f0f0',
|
|
362
|
+
placeholderColor: '#6c63ff',
|
|
349
363
|
};
|
|
350
364
|
```
|
|
351
365
|
|
|
@@ -355,37 +369,49 @@ theme: DashboardTheme = {
|
|
|
355
369
|
|
|
356
370
|
### CSS Custom Properties
|
|
357
371
|
|
|
358
|
-
Every token is also available as a CSS variable
|
|
372
|
+
Every token is also available as a CSS variable on the `app-dashboard` host element:
|
|
359
373
|
|
|
360
374
|
```css
|
|
361
375
|
app-dashboard {
|
|
362
|
-
/* Layout */
|
|
376
|
+
/* ── Layout ── */
|
|
363
377
|
--dash-bg: #0d0d0d;
|
|
364
378
|
--dash-panel-bg: #161616;
|
|
379
|
+
--dash-panel-border: rgba(255,255,255,0.06);
|
|
365
380
|
--dash-card-bg: #1f1f1f;
|
|
366
381
|
--dash-fore-color: #a0a0a0;
|
|
367
382
|
--dash-accent-color: #6c63ff;
|
|
383
|
+
--dash-accent-tint: rgba(108,99,255,0.15);
|
|
384
|
+
--dash-accent-tint-strong: rgba(108,99,255,0.25);
|
|
368
385
|
--dash-danger-color: #e84545;
|
|
386
|
+
--dash-danger-tint: rgba(232,69,69,0.22);
|
|
369
387
|
--dash-font-family: 'Inter', sans-serif;
|
|
370
388
|
|
|
371
|
-
/* Header / Tabs */
|
|
389
|
+
/* ── Header / Tabs ── */
|
|
372
390
|
--dash-tabs-container-color: rgba(30,30,32,0.7);
|
|
373
391
|
--dash-tab-active-color: #2a2a2e;
|
|
374
392
|
--dash-tab-active-text: #ffffff;
|
|
375
393
|
--dash-tab-hover-text: #d0d0d5;
|
|
394
|
+
--dash-tab-hover-bg: rgba(255,255,255,0.05);
|
|
376
395
|
--dash-add-widget-text: #ffffff;
|
|
396
|
+
--dash-overflow-btn-bg: rgba(255,255,255,0.08);
|
|
397
|
+
--dash-overflow-btn-border: rgba(255,255,255,0.12);
|
|
377
398
|
|
|
378
|
-
/*
|
|
399
|
+
/* ── Tab-switcher overlay ── */
|
|
400
|
+
--dash-overlay-bg: rgba(0,0,0,0.6);
|
|
401
|
+
--dash-sheet-border: rgba(255,255,255,0.08);
|
|
402
|
+
--dash-scrollbar-color: rgba(255,255,255,0.15);
|
|
403
|
+
|
|
404
|
+
/* ── Pop-out ── */
|
|
379
405
|
--dash-popout-title-color: #ffffff;
|
|
380
406
|
|
|
381
|
-
/* Widget card */
|
|
407
|
+
/* ── Widget card ── */
|
|
382
408
|
--dash-widget-title-color: #ffffff;
|
|
383
409
|
--dash-drag-handle-color: rgba(255,255,255,0.2);
|
|
384
410
|
--dash-widget-border-color: rgba(255,255,255,0.07);
|
|
385
411
|
--dash-widget-btn-bg: rgba(255,255,255,0.07);
|
|
386
412
|
--dash-widget-btn-color: rgba(255,255,255,0.5);
|
|
387
413
|
|
|
388
|
-
/* Grid */
|
|
414
|
+
/* ── Grid ── */
|
|
389
415
|
--dash-placeholder-color: #6c63ff;
|
|
390
416
|
--dash-resize-handle-color: rgba(255,255,255,0.25);
|
|
391
417
|
}
|
|
@@ -397,16 +423,26 @@ app-dashboard {
|
|
|
397
423
|
|---|---|---|
|
|
398
424
|
| `--dash-bg` | `backgroundColor` | `#000000` |
|
|
399
425
|
| `--dash-panel-bg` | `panelColor` | `#1c1c1e` |
|
|
426
|
+
| `--dash-panel-border` | `panelBorderColor` | `rgba(255,255,255,0.05)` |
|
|
400
427
|
| `--dash-card-bg` | `widgetCardColor` | `#2c2c2e` |
|
|
401
428
|
| `--dash-fore-color` | `foreColor` | `#8e8e93` |
|
|
402
429
|
| `--dash-accent-color` | `accentColor` | `#0a84ff` |
|
|
430
|
+
| `--dash-accent-tint` | `accentTintColor` | `rgba(10,132,255,0.15)` |
|
|
431
|
+
| `--dash-accent-tint-strong` | `accentTintStrongColor` | `rgba(10,132,255,0.25)` |
|
|
403
432
|
| `--dash-danger-color` | `dangerColor` | `#ff453a` |
|
|
433
|
+
| `--dash-danger-tint` | `dangerTintColor` | `rgba(255,69,58,0.22)` |
|
|
404
434
|
| `--dash-font-family` | `fontFamily` | system-ui stack |
|
|
405
435
|
| `--dash-tabs-container-color` | `tabsContainerColor` | `rgba(44,44,46,0.6)` |
|
|
406
436
|
| `--dash-tab-active-color` | `tabActiveColor` | `#3a3a3c` |
|
|
407
437
|
| `--dash-tab-active-text` | `tabActiveTextColor` | `#ffffff` |
|
|
408
438
|
| `--dash-tab-hover-text` | `tabHoverTextColor` | `#e5e5ea` |
|
|
439
|
+
| `--dash-tab-hover-bg` | `tabHoverBgColor` | `rgba(255,255,255,0.05)` |
|
|
409
440
|
| `--dash-add-widget-text` | `addWidgetButtonTextColor` | `#ffffff` |
|
|
441
|
+
| `--dash-overflow-btn-bg` | `overflowBtnBgColor` | `rgba(255,255,255,0.08)` |
|
|
442
|
+
| `--dash-overflow-btn-border` | `overflowBtnBorderColor` | `rgba(255,255,255,0.12)` |
|
|
443
|
+
| `--dash-overlay-bg` | `overlayBgColor` | `rgba(0,0,0,0.55)` |
|
|
444
|
+
| `--dash-sheet-border` | `sheetBorderColor` | `rgba(255,255,255,0.08)` |
|
|
445
|
+
| `--dash-scrollbar-color` | `scrollbarColor` | `rgba(255,255,255,0.15)` |
|
|
410
446
|
| `--dash-popout-title-color` | `popoutTitleColor` | `#ffffff` |
|
|
411
447
|
| `--dash-widget-title-color` | `widgetTitleColor` | `#ffffff` |
|
|
412
448
|
| `--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,20 @@ 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;
|
|
63
83
|
/** Text color of the pop-out page title. Default: `#ffffff` */
|
|
64
84
|
popoutTitleColor?: string;
|
|
65
85
|
/** Text color of the widget card title. Default: `#ffffff` */
|