wenay-react2 1.0.33 → 1.0.35

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.
@@ -59,6 +59,23 @@ export const tokens = {
59
59
  navBg: '#17202e',
60
60
  navWidth: '168px',
61
61
  },
62
+ /** Toolbar (createToolbar) chrome (--tb-*). Dark defaults; apps re-skin via :root[data-theme]. */
63
+ tb: {
64
+ bg: 'transparent',
65
+ border: 'none',
66
+ radius: '6px',
67
+ gap: '2px',
68
+ /** var(--color-text-base) in CSS */
69
+ itemColor: '#c4c4c4',
70
+ itemHoverBg: 'rgba(255, 255, 255, 0.08)',
71
+ itemRadius: '6px',
72
+ /** var(--color-bg-dark) in CSS */
73
+ popBg: '#131821',
74
+ /** var(--color-border-common) in CSS */
75
+ popBorder: '1px solid rgb(50, 62, 71)',
76
+ popRadius: '8px',
77
+ popShadow: '0 8px 28px rgba(0, 0, 0, 0.5)',
78
+ },
62
79
  font: {
63
80
  family: 'Roboto',
64
81
  sizeBase: '12px',
@@ -434,6 +434,134 @@ body {
434
434
  top: 8px;
435
435
  right: 8px;
436
436
  }
437
+ /* Toolbar (createToolbar). Themed via --tb-* (tokens.css), dark defaults. */
438
+ .wenayTb {
439
+ display: inline-flex;
440
+ align-items: center;
441
+ gap: var(--tb-gap, 2px);
442
+ background: var(--tb-bg, transparent);
443
+ border: var(--tb-border, none);
444
+ border-radius: var(--tb-radius, 6px);
445
+ color: var(--tb-item-color, var(--color-text-base));
446
+ }
447
+ .wenayTbItem {
448
+ display: inline-flex;
449
+ align-items: center;
450
+ gap: 6px;
451
+ padding: 4px 6px;
452
+ border-radius: var(--tb-item-radius, 6px);
453
+ cursor: pointer;
454
+ user-select: none;
455
+ white-space: nowrap;
456
+ }
457
+ .wenayTbItem:hover {
458
+ background: var(--tb-item-hover-bg, rgba(255, 255, 255, 0.08));
459
+ }
460
+ .wenayTbIcon {
461
+ display: inline-flex;
462
+ align-items: center;
463
+ justify-content: center;
464
+ min-width: 16px;
465
+ }
466
+ /* The gear + its popover live in one positioned container (also the outside-click boundary) */
467
+ .wenayTbGear {
468
+ position: relative;
469
+ display: inline-flex;
470
+ }
471
+ .wenayTbPop {
472
+ position: absolute;
473
+ top: calc(100% + 6px);
474
+ right: 0;
475
+ z-index: var(--wenay-z-modal, 9999);
476
+ min-width: 240px;
477
+ padding: 10px;
478
+ background: var(--tb-pop-bg, var(--color-bg-dark));
479
+ border: var(--tb-pop-border, 1px solid var(--color-border-common));
480
+ border-radius: var(--tb-pop-radius, 8px);
481
+ box-shadow: var(--tb-pop-shadow, 0 8px 28px rgba(0, 0, 0, 0.5));
482
+ color: var(--color-text-base);
483
+ }
484
+ /* Bar popAlign='left' - for bars sitting at a container's LEFT edge (default 'right'
485
+ suits toolbars in a top-right corner) */
486
+ .wenayTbPopLeft {
487
+ right: auto;
488
+ left: 0;
489
+ }
490
+ /* The pure config editor (same element in the popover and in a settings section) */
491
+ .wenayTbSettings {
492
+ display: flex;
493
+ flex-direction: column;
494
+ gap: 10px;
495
+ font-size: 13px;
496
+ }
497
+ .wenayTbDensity {
498
+ display: inline-flex;
499
+ gap: 4px;
500
+ flex-wrap: wrap;
501
+ }
502
+ .wenayTbRows {
503
+ display: flex;
504
+ flex-direction: column;
505
+ gap: 2px;
506
+ }
507
+ .wenayTbRow {
508
+ display: flex;
509
+ align-items: center;
510
+ gap: 8px;
511
+ padding: 4px 6px;
512
+ border-radius: 6px;
513
+ }
514
+ .wenayTbRow:hover {
515
+ background: rgba(255, 255, 255, 0.05);
516
+ }
517
+ /* Non-fixed rows drag as a whole (mouse and touch) */
518
+ .wenayTbRowGrab {
519
+ cursor: grab;
520
+ touch-action: none; /* the browser must not hijack drags for scrolling */
521
+ user-select: none;
522
+ -webkit-user-select: none;
523
+ }
524
+ /* Displaced neighbours glide; the dragged row itself must NOT transition (it follows the pointer) */
525
+ .wenayTbRowShift {
526
+ transition: transform 0.12s ease;
527
+ }
528
+ .wenayTbRowDrag {
529
+ position: relative;
530
+ z-index: 1;
531
+ cursor: grabbing;
532
+ background: rgba(255, 255, 255, 0.12);
533
+ box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
534
+ }
535
+ .wenayTbRowTitle {
536
+ flex: 1;
537
+ min-width: 0;
538
+ overflow: hidden;
539
+ text-overflow: ellipsis;
540
+ white-space: nowrap;
541
+ }
542
+ /* The settings-button toggle: set slightly apart from the item rows, never draggable */
543
+ .wenayTbRowMeta {
544
+ border-top: 1px solid rgba(255, 255, 255, 0.08);
545
+ margin-top: 4px;
546
+ border-radius: 0 0 6px 6px;
547
+ opacity: 0.85;
548
+ }
549
+ .wenayTbHandle {
550
+ display: inline-flex;
551
+ align-items: center;
552
+ cursor: grab;
553
+ user-select: none;
554
+ touch-action: none; /* the browser must not hijack vertical drags for scrolling */
555
+ padding: 0 4px;
556
+ opacity: 0.65;
557
+ }
558
+ .wenayTbHandle:hover,
559
+ .wenayTbHandle:focus {
560
+ opacity: 1;
561
+ outline: none;
562
+ color: #fff;
563
+ }
564
+
437
565
  /* Minimal default section/segment buttons; apps override via sectionClassName /
438
566
  sectionActiveClassName (SettingsDialog) and className / activeClassName (PlacementSetting) */
439
567
  .wenayDlgSection,
@@ -72,6 +72,20 @@
72
72
  --dlg-nav-bg: var(--color-bg-light);
73
73
  --dlg-nav-width: 168px;
74
74
 
75
+ /* Toolbar (createToolbar). Dark defaults; apps re-skin via :root[data-theme]
76
+ overrides, same contract as --wnd-* / --dlg-*. */
77
+ --tb-bg: transparent;
78
+ --tb-border: none;
79
+ --tb-radius: 6px;
80
+ --tb-gap: 2px;
81
+ --tb-item-color: var(--color-text-base);
82
+ --tb-item-hover-bg: rgba(255, 255, 255, 0.08);
83
+ --tb-item-radius: 6px;
84
+ --tb-pop-bg: var(--color-bg-dark);
85
+ --tb-pop-border: 1px solid var(--color-border-common);
86
+ --tb-pop-radius: 8px;
87
+ --tb-pop-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
88
+
75
89
  /* Layers */
76
90
  --wenay-z-modal: 9999;
77
91
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wenay-react2",
3
- "version": "1.0.33",
3
+ "version": "1.0.35",
4
4
  "description": "Common react",
5
5
  "strict": true,
6
6
  "main": "dist/index.js",
@@ -23,7 +23,7 @@
23
23
  "react": "^19.2.0",
24
24
  "react-dom": "^19.2.0",
25
25
  "react-rnd": "^10.5.3",
26
- "wenay-common2": "^1.0.57"
26
+ "wenay-common2": "^1.0.61"
27
27
  },
28
28
  "peerDependencies": {
29
29
  "react": "^19.2.0",