gantt-lib 0.146.6 → 0.146.8
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 +33 -1
- package/dist/index.css.map +1 -1
- package/dist/index.js +690 -626
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +287 -223
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +447 -404
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -498,10 +498,34 @@ interface DependencyError {
|
|
|
498
498
|
|
|
499
499
|
### CSS Variables
|
|
500
500
|
|
|
501
|
-
Override these CSS variables to customize the appearance:
|
|
501
|
+
Override these CSS variables to customize the appearance. Set theme variables on `:root` when using popovers or task tooltips: these render in a portal under `document.body` and do not inherit variables from a chart container.
|
|
502
502
|
|
|
503
503
|
```css
|
|
504
504
|
:root {
|
|
505
|
+
/* Shared UI colors (each use retains its original light fallback) */
|
|
506
|
+
--gantt-text-color: #1f2937;
|
|
507
|
+
--gantt-text-muted-color: #6b7280;
|
|
508
|
+
--gantt-header-background: #f9fafb;
|
|
509
|
+
--gantt-hover-background: #f3f4f6;
|
|
510
|
+
--gantt-control-background: #ffffff;
|
|
511
|
+
--gantt-control-border-color: #d1d5db;
|
|
512
|
+
--gantt-focus-color: #3b82f6;
|
|
513
|
+
--gantt-task-label-color: #1f2937;
|
|
514
|
+
--gantt-action-solid-background: #3b82f6;
|
|
515
|
+
--gantt-danger-solid-background: #dc2626;
|
|
516
|
+
--gantt-success-solid-background: #059669;
|
|
517
|
+
--gantt-solid-foreground: #ffffff;
|
|
518
|
+
--gantt-inverse-background: #111827;
|
|
519
|
+
--gantt-shadow-color: rgba(15, 23, 42, 0.18);
|
|
520
|
+
--gantt-info-background: #deebff;
|
|
521
|
+
--gantt-info-foreground: #0747a6;
|
|
522
|
+
--gantt-success-background: #e3fcef;
|
|
523
|
+
--gantt-success-foreground: #006644;
|
|
524
|
+
--gantt-danger-background: #fef2f2;
|
|
525
|
+
--gantt-danger-foreground: #991b1b;
|
|
526
|
+
--gantt-selection-background: rgba(37, 99, 235, 0.12);
|
|
527
|
+
--gantt-selection-foreground: #2563eb;
|
|
528
|
+
|
|
505
529
|
/* Grid Colors */
|
|
506
530
|
--gantt-grid-line-color: #e0e0e0;
|
|
507
531
|
--gantt-cell-background: #ffffff;
|
|
@@ -541,6 +565,14 @@ Override these CSS variables to customize the appearance:
|
|
|
541
565
|
}
|
|
542
566
|
```
|
|
543
567
|
|
|
568
|
+
The legacy input, calendar and popover variables are independent and must also be set for a complete theme: `--gantt-input-bg`, `--gantt-input-text`, `--gantt-input-border`, `--gantt-input-focus-ring`, `--gantt-input-placeholder`, `--gantt-popover-bg`, `--gantt-popover-border`, `--gantt-calendar-bg`, `--gantt-calendar-text`, and the `--gantt-calendar-day-*` and `--gantt-calendar-text-*` state colors. Set `--gantt-task-label-color` for labels outside bars; the bar and its contrast text remain independent. `--gantt-plan-fact-day-line-color` and `--gantt-dependency-selected-color` override those specialized features. `--gantt-bar-highlight-color` controls translucent marks over colored bars.
|
|
569
|
+
|
|
570
|
+
For translucent states and gradients, supply alpha colors for `--gantt-neutral-overlay`, `--gantt-warning-overlay`, `--gantt-danger-overlay`, `--gantt-success-overlay`, `--gantt-focus-overlay`, `--gantt-selection-overlay` and `--gantt-selection-overlay-strong`; keep `--gantt-selection-overlay-clear` transparent. `--gantt-skeleton-base-color` and `--gantt-skeleton-highlight-color` style loading gradients, while `--gantt-bar-highlight-color` and `--gantt-bar-highlight-soft-color` style marks over colored bars. Each use retains its historical light fallback when a variable is unset. `--gantt-warning-background` styles highlighted rows and `--gantt-warning-foreground` styles warning text.
|
|
571
|
+
|
|
572
|
+
Labels inside bars and colored date markers use a compact contrast backing. `--gantt-bar-label-foreground` falls back to `--gantt-task-bar-text-color`, and `--gantt-bar-label-background` defaults to translucent black. Override them as a pair with at least 4.5:1 contrast against both the bar and progress overlay. Bars that contrast less than 3:1 with the chart background receive a thin boundary. `--gantt-bar-marker-color` and `--gantt-bar-marker-outline` control fixed-date markers.
|
|
573
|
+
|
|
574
|
+
Inverse tooltip surfaces use `--gantt-tooltip-background`, `--gantt-tooltip-foreground`, `--gantt-tooltip-muted-foreground` and `--gantt-tooltip-danger-foreground`; override each foreground with an accessible value against the chosen background.
|
|
575
|
+
|
|
544
576
|
### Example: Dark Theme
|
|
545
577
|
|
|
546
578
|
```css
|