@dashboard-designer/ui 0.2.0 → 0.2.2
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 +63 -0
- package/dist/index.d.ts +34 -6
- package/dist/index.js +5346 -4919
- package/dist/styles.css +165 -0
- package/package.json +2 -2
package/dist/styles.css
CHANGED
|
@@ -421,6 +421,89 @@
|
|
|
421
421
|
}
|
|
422
422
|
|
|
423
423
|
/* Modal */
|
|
424
|
+
.dd-widget-filters {
|
|
425
|
+
padding: 8px 12px;
|
|
426
|
+
max-height: 150px;
|
|
427
|
+
overflow: auto;
|
|
428
|
+
border-bottom: 1px solid var(--dd-border);
|
|
429
|
+
flex-shrink: 0;
|
|
430
|
+
}
|
|
431
|
+
.dd-timeline-scroll {
|
|
432
|
+
width: 100%;
|
|
433
|
+
height: 100%;
|
|
434
|
+
min-height: 0;
|
|
435
|
+
overflow: auto;
|
|
436
|
+
padding: 4px 12px 0;
|
|
437
|
+
}
|
|
438
|
+
.dd-timeline {
|
|
439
|
+
display: flex;
|
|
440
|
+
align-items: stretch;
|
|
441
|
+
list-style: none;
|
|
442
|
+
padding: 4px;
|
|
443
|
+
margin: 0;
|
|
444
|
+
min-width: 100%;
|
|
445
|
+
width: max-content;
|
|
446
|
+
}
|
|
447
|
+
.dd-timeline li { flex: 1 0 172px; width: 172px; }
|
|
448
|
+
.dd-timeline button {
|
|
449
|
+
display: flex;
|
|
450
|
+
align-items: stretch;
|
|
451
|
+
flex-direction: column;
|
|
452
|
+
width: 100%;
|
|
453
|
+
height: 100%;
|
|
454
|
+
padding: 0;
|
|
455
|
+
border: 0;
|
|
456
|
+
border-radius: 10px;
|
|
457
|
+
background: transparent;
|
|
458
|
+
color: var(--dd-ink);
|
|
459
|
+
font: inherit;
|
|
460
|
+
cursor: pointer;
|
|
461
|
+
}
|
|
462
|
+
.dd-timeline button:disabled { cursor: default; opacity: 1; }
|
|
463
|
+
.dd-timeline button:focus-visible { outline: 3px solid var(--dd-accent); outline-offset: 3px; }
|
|
464
|
+
.dd-timeline-status {
|
|
465
|
+
display: flex;
|
|
466
|
+
flex: 1;
|
|
467
|
+
align-items: center;
|
|
468
|
+
gap: 8px;
|
|
469
|
+
margin: 0 12px;
|
|
470
|
+
padding: 12px;
|
|
471
|
+
min-height: 68px;
|
|
472
|
+
border: 1px solid var(--dd-border-subtle);
|
|
473
|
+
border-top: 3px solid var(--stage-color);
|
|
474
|
+
border-radius: 10px;
|
|
475
|
+
background: color-mix(in srgb, var(--stage-color) 16%, white);
|
|
476
|
+
box-shadow: 0 2px 6px rgba(18, 32, 26, .04);
|
|
477
|
+
font-size: 13px;
|
|
478
|
+
font-weight: 600;
|
|
479
|
+
text-align: start;
|
|
480
|
+
overflow-wrap: anywhere;
|
|
481
|
+
}
|
|
482
|
+
.dd-timeline-step { flex-shrink: 0; white-space: nowrap; font-size: 11px; font-weight: 500; color: var(--dd-muted); align-self: flex-start; padding-top: 2px; }
|
|
483
|
+
.dd-timeline-connector { position: relative; height: 30px; flex-shrink: 0; }
|
|
484
|
+
.dd-timeline-connector::before { content: ''; position: absolute; width: 2px; inset-block: 0; left: calc(50% - 1px); background: var(--stage-color); opacity: .6; }
|
|
485
|
+
.dd-timeline-connector span { position: absolute; width: 8px; height: 8px; bottom: -4px; left: calc(50% - 4px); border-radius: 50%; background: var(--stage-color); z-index: 1; }
|
|
486
|
+
.dd-timeline-band {
|
|
487
|
+
display: flex;
|
|
488
|
+
flex-direction: column;
|
|
489
|
+
justify-content: center;
|
|
490
|
+
gap: 2px;
|
|
491
|
+
padding: 16px 24px;
|
|
492
|
+
min-height: 96px;
|
|
493
|
+
background: color-mix(in srgb, var(--stage-color) 42%, white);
|
|
494
|
+
clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%, 18px 50%);
|
|
495
|
+
color: #12201a;
|
|
496
|
+
font-size: 12px;
|
|
497
|
+
}
|
|
498
|
+
.dd-timeline li:first-child .dd-timeline-band { clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%); }
|
|
499
|
+
.dd-timeline strong { font-size: 30px; line-height: 1.2; font-weight: 700; font-variant-numeric: tabular-nums; }
|
|
500
|
+
.dd-timeline-caption { display: flex; flex-direction: column; gap: 6px; padding: 6px 8px 0; font-size: 11px; color: var(--dd-muted); }
|
|
501
|
+
.dd-timeline-link { color: var(--dd-accent); font-weight: 600; }
|
|
502
|
+
.dd-timeline button:not(:disabled):hover .dd-timeline-status { border-color: var(--stage-color); }
|
|
503
|
+
.dd-timeline button:not(:disabled):hover .dd-timeline-band { background: color-mix(in srgb, var(--stage-color) 55%, white); }
|
|
504
|
+
.dd-timeline button:not(:disabled):hover .dd-timeline-link { text-decoration: underline; }
|
|
505
|
+
[dir='rtl'] .dd-timeline-band { transform: scaleX(-1); }
|
|
506
|
+
[dir='rtl'] .dd-timeline-band > * { transform: scaleX(-1); }
|
|
424
507
|
.dd-chart-data-popup {
|
|
425
508
|
font-family: var(--dd-font);
|
|
426
509
|
color: var(--dd-ink);
|
|
@@ -3469,6 +3552,88 @@ select.dd-input[multiple] {
|
|
|
3469
3552
|
}
|
|
3470
3553
|
}
|
|
3471
3554
|
|
|
3555
|
+
|
|
3556
|
+
.dd-table-sort { display: flex; align-items: center; gap: 6px; width: 100%; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: inherit; cursor: pointer; }
|
|
3557
|
+
.dd-table-sort:hover { color: var(--dd-accent); }
|
|
3558
|
+
|
|
3559
|
+
.dd-kpi-icon { display: inline-flex; align-items: center; justify-content: center; padding: 8px; border-radius: 12px; color: var(--dd-accent); background: var(--dd-accent-soft); flex-shrink: 0; }
|
|
3560
|
+
|
|
3561
|
+
.dd-kpi-icon-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
|
|
3562
|
+
.dd-kpi-icon-picker [aria-pressed="true"] { background: var(--dd-accent-soft); border-color: var(--dd-accent); color: var(--dd-accent); }
|
|
3563
|
+
|
|
3564
|
+
.dd-kpi-main { display: flex; align-items: center; justify-content: center; gap: 12px; }
|
|
3565
|
+
|
|
3566
|
+
.dd-kpi-text { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
|
|
3567
|
+
|
|
3568
|
+
.dd-kpi-number-button { padding: 0; border: 0; background: transparent; font-family: inherit; text-align: inherit; cursor: pointer; }
|
|
3569
|
+
.dd-kpi-number-button:hover { text-decoration: underline; text-underline-offset: 4px; }
|
|
3570
|
+
.dd-kpi-number-button:focus-visible { outline: 2px solid var(--dd-accent); outline-offset: 4px; border-radius: 3px; }
|
|
3571
|
+
|
|
3572
|
+
/* Vertical timelines keep stage labels beside a downward sequence of counts. */
|
|
3573
|
+
.dd-timeline.dd-timeline-vertical { flex-direction: column; width: 100%; min-width: 0; gap: 4px; }
|
|
3574
|
+
.dd-timeline-vertical li { flex: none; width: 100%; }
|
|
3575
|
+
.dd-timeline-vertical button { display: grid; grid-template-columns: minmax(0, 1fr) 24px 96px; grid-template-rows: auto auto; align-items: center; }
|
|
3576
|
+
.dd-timeline-vertical .dd-timeline-status { margin: 0; min-height: 60px; border-top-width: 1px; border-inline-start: 3px solid var(--stage-color); }
|
|
3577
|
+
.dd-timeline-vertical .dd-timeline-connector { height: 2px; width: 24px; }
|
|
3578
|
+
.dd-timeline-vertical .dd-timeline-connector::before { width: 100%; height: 2px; inset: 0; }
|
|
3579
|
+
.dd-timeline-vertical .dd-timeline-connector span { inset-inline-start: auto; inset-inline-end: -4px; top: -3px; bottom: auto; }
|
|
3580
|
+
.dd-timeline-vertical .dd-timeline-band,
|
|
3581
|
+
.dd-timeline-vertical li:first-child .dd-timeline-band { padding: 20px 8px; min-height: 100px; clip-path: polygon(0 0, 50% 12px, 100% 0, 100% calc(100% - 12px), 50% 100%, 0 calc(100% - 12px)); }
|
|
3582
|
+
.dd-timeline-vertical li:first-child .dd-timeline-band { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), 50% 100%, 0 calc(100% - 12px)); }
|
|
3583
|
+
.dd-timeline-vertical .dd-timeline-caption { grid-column: 1; grid-row: 2; padding: 0 12px 8px; text-align: start; }
|
|
3584
|
+
.dd-timeline-vertical .dd-timeline-band { grid-column: 3; grid-row: 1 / 3; }
|
|
3585
|
+
[dir='rtl'] .dd-timeline-vertical .dd-timeline-band,
|
|
3586
|
+
[dir='rtl'] .dd-timeline-vertical .dd-timeline-band > * { transform: none; }
|
|
3587
|
+
|
|
3588
|
+
/* Widget configuration: grouped settings with persistent form state. */
|
|
3589
|
+
.dd-config-heading { padding: 2px 0 16px; }
|
|
3590
|
+
.dd-config-heading h3 { margin-bottom: 4px; font-size: 14px; color: var(--dd-ink); letter-spacing: 0; text-transform: none; }
|
|
3591
|
+
.dd-config-heading p { margin: 0; font-size: 12px; color: var(--dd-muted); }
|
|
3592
|
+
.dd-config-section { margin-bottom: 12px; border: 1px solid var(--dd-border-subtle); border-radius: 12px; background: var(--dd-surface); }
|
|
3593
|
+
.dd-config-section > summary { display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; padding: 14px 16px; cursor: pointer; list-style: none; border-radius: 12px; }
|
|
3594
|
+
.dd-config-section > summary::-webkit-details-marker { display: none; }
|
|
3595
|
+
.dd-config-section > summary::before { content: '›'; font-size: 20px; line-height: 16px; color: var(--dd-muted); }
|
|
3596
|
+
.dd-config-section[open] > summary::before { transform: rotate(90deg); }
|
|
3597
|
+
.dd-config-section > summary > span { font-size: 13px; font-weight: 650; color: var(--dd-ink); }
|
|
3598
|
+
.dd-config-section > summary small { flex-basis: 100%; padding-inline-start: 16px; margin-top: 3px; font-size: 11px; color: var(--dd-muted); }
|
|
3599
|
+
.dd-config-section > summary:hover { background: #f4f8f6; }
|
|
3600
|
+
.dd-config-section > summary:focus-visible { outline: 2px solid var(--dd-accent); outline-offset: 2px; }
|
|
3601
|
+
.dd-config-section[open] > summary { border-bottom: 1px solid var(--dd-border-subtle); border-radius: 12px 12px 0 0; }
|
|
3602
|
+
.dd-config-section-body { padding: 16px; }
|
|
3603
|
+
.dd-config-section-body > :last-child { margin-bottom: 0; }
|
|
3604
|
+
.dd-config-section-body .dd-field { margin-bottom: 16px; }
|
|
3605
|
+
.dd-config-section-body .dd-type-switch { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px; }
|
|
3606
|
+
.dd-config-section-body .dd-type-switch .dd-chip { justify-content: flex-start; padding: 9px 10px; border-radius: 8px; }
|
|
3607
|
+
.dd-config-section-body .dd-type-switch .dd-chip.active { box-shadow: inset 0 0 0 1px var(--dd-accent); }
|
|
3608
|
+
.dd-config-section-body .dd-drill-section { margin-top: 0; padding: 12px; border-radius: 8px; }
|
|
3609
|
+
.dd-config-section-body .dd-filter-bar { margin: 0 0 16px; }
|
|
3610
|
+
.dd-config-section-body .dd-join-block { padding: 12px; margin-bottom: 12px; }
|
|
3611
|
+
.dd-config-section-body .dd-join-block > label { display: block; margin-bottom: 10px; font-size: 12px; font-weight: 600; }
|
|
3612
|
+
.dd-config-section-body .dd-join-block > label > .dd-input { margin-top: 5px; }
|
|
3613
|
+
.dd-config-run { margin: 12px 0; }
|
|
3614
|
+
.dd-config-run > .dd-btn { width: 100%; min-height: 40px; justify-content: center; }
|
|
3615
|
+
@media (max-width: 600px) {
|
|
3616
|
+
.dd-config-section-body { padding: 12px; }
|
|
3617
|
+
.dd-config-section > summary { padding: 12px; }
|
|
3618
|
+
}
|
|
3619
|
+
|
|
3620
|
+
.dd-record-details-toggle { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
|
|
3621
|
+
.dd-record-details-toggle > input { flex-shrink: 0; margin: 3px 0 0; accent-color: var(--dd-accent); }
|
|
3622
|
+
.dd-record-details-toggle > span { min-width: 0; }
|
|
3623
|
+
.dd-record-details-toggle strong { display: block; font-size: 13px; line-height: 1.5; }
|
|
3624
|
+
.dd-record-details-description { display: block; margin-top: 3px; font-size: 12px; font-weight: 400; line-height: 1.5; color: var(--dd-muted); }
|
|
3625
|
+
.dd-record-details-options { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--dd-border-subtle); }
|
|
3626
|
+
.dd-record-details-label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 600; }
|
|
3627
|
+
.dd-record-details-options > .dd-hint { margin: 8px 0 12px; line-height: 1.5; }
|
|
3628
|
+
.dd-record-details-help { font-size: 12px; }
|
|
3629
|
+
.dd-record-details-help > summary { cursor: pointer; color: var(--dd-accent); font-weight: 600; }
|
|
3630
|
+
.dd-record-details-help .dd-hint { line-height: 1.5; margin: 8px 0 0; }
|
|
3631
|
+
|
|
3632
|
+
.dd-custom-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
|
|
3633
|
+
.dd-custom-toolbar-icon { display:inline-flex; align-items:center; justify-content:center; width:16px; height:16px; }
|
|
3634
|
+
.dd-custom-toolbar-spinner { animation: dd-toolbar-spin 1s linear infinite; }
|
|
3635
|
+
@keyframes dd-toolbar-spin { to { transform:rotate(360deg); } }
|
|
3636
|
+
@media(prefers-reduced-motion:reduce) { .dd-custom-toolbar-spinner { animation:none; } }
|
|
3472
3637
|
|
|
3473
3638
|
|
|
3474
3639
|
/* --- table-empty-overrides.css --- */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dashboard-designer/ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"react-i18next": "^15.4.1",
|
|
29
29
|
"react-resizable": "^3.0.5",
|
|
30
30
|
"recharts": "^2.15.1",
|
|
31
|
-
"@dashboard-designer/core": "0.2.
|
|
31
|
+
"@dashboard-designer/core": "0.2.1"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/react": "^19.0.10",
|