react-beauti-graph 1.3.0 → 1.3.1

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/dist/style.css CHANGED
@@ -1,356 +1,380 @@
1
- /* react-beauti-graph styles: everything is scoped under .rbg-graph */
2
-
3
- .rbg-graph {
4
- display: flex;
5
- flex-direction: column;
6
- flex: 1;
7
- height: 100%;
8
- min-height: 0;
9
- }
10
-
11
- /* Top controls row text size comes from create_graph options (topControlsFontSize), set as a CSS variable.
12
- Spacing is in em, so it grows with the text size; the row wraps when it does not fit. */
13
- .rbg-graph .controls {
14
- font-size: var(--rbg-top-controls-font-size, 14px);
15
- padding: 0.7em 1em;
16
- background: #fafafa;
17
- border-bottom: 1px solid #ddd;
18
- display: flex;
19
- flex-wrap: wrap;
20
- align-items: center;
21
- gap: 0.5em 0.8em;
22
- flex-shrink: 0;
23
- position: relative;
24
- z-index: 10;
25
- }
26
-
27
- /* A label with its box (and the Track node switch): kept on one line */
28
- .rbg-graph .control-group {
29
- display: inline-flex;
30
- align-items: center;
31
- gap: 0.5em 0.8em;
32
- white-space: nowrap;
33
- }
34
-
35
- .rbg-graph .controls label {
36
- color: #0066cc;
37
- white-space: nowrap;
38
- }
39
-
40
- .rbg-graph .help {
41
- position: relative;
42
- display: inline-flex;
43
- }
44
-
45
- .rbg-graph .help-icon {
46
- width: 20px;
47
- height: 20px;
48
- padding: 0;
49
- border: 1px solid #0066cc;
50
- border-radius: 50%;
51
- background: #fff;
52
- color: #0066cc;
53
- font-size: 13px;
54
- font-weight: bold;
55
- line-height: 1;
56
- cursor: help;
57
- }
58
-
59
- .rbg-graph .font-size-buttons {
60
- display: inline-flex;
61
- align-items: center;
62
- gap: 4px;
63
- }
64
-
65
- .rbg-graph .font-size-buttons select {
66
- font-size: inherit;
67
- color: #0066cc;
68
- border: 1px solid #0066cc;
69
- border-radius: 4px;
70
- background: #fff;
71
- }
72
-
73
- .rbg-graph .font-size-buttons .help-icon {
74
- cursor: pointer;
75
- }
76
-
77
- .rbg-graph .font-size-buttons .help-icon:disabled {
78
- opacity: 0.4;
79
- cursor: not-allowed;
80
- }
81
-
82
- .rbg-graph .help-tooltip {
83
- display: none;
84
- position: absolute;
85
- top: calc(100% + 6px);
86
- left: 0;
87
- width: 320px;
88
- padding: 8px 10px;
89
- background: #fff;
90
- border: 1px solid #ccc;
91
- border-radius: 4px;
92
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
93
- color: #0066cc;
94
- line-height: 1.5;
95
- z-index: 1000;
96
- }
97
-
98
- /* Show on hover, or when the icon is clicked/focused with the keyboard */
99
- .rbg-graph .help:hover .help-tooltip,
100
- .rbg-graph .help-icon:focus + .help-tooltip {
101
- display: block;
102
- }
103
-
104
- .rbg-graph .node-search {
105
- position: relative;
106
- }
107
-
108
- /* Track node: Parents [switch] Children */
109
- .rbg-graph .track-switch {
110
- display: inline-flex;
111
- align-items: center;
112
- gap: 0.45em;
113
- color: #999;
114
- white-space: nowrap;
115
- }
116
-
117
- /* Colors come from create_graph options (parentsColor, childrenColor), set as CSS variables */
118
- .rbg-graph .track-switch .on {
119
- font-weight: bold;
120
- }
121
-
122
- .rbg-graph .track-switch .parents.on {
123
- color: var(--rbg-parents-color, #2e7d32);
124
- }
125
-
126
- .rbg-graph .track-switch .children.on {
127
- color: var(--rbg-children-color, #7b1fa2);
128
- }
129
-
130
- .rbg-graph .switch {
131
- position: relative;
132
- width: 36px;
133
- height: 20px;
134
- padding: 0;
135
- border: none;
136
- border-radius: 10px;
137
- background: var(--rbg-parents-color, #2e7d32);
138
- cursor: pointer;
139
- }
140
-
141
- .rbg-graph .switch-knob {
142
- position: absolute;
143
- top: 2px;
144
- left: 2px;
145
- width: 16px;
146
- height: 16px;
147
- border-radius: 50%;
148
- background: #fff;
149
- transition: left 0.15s;
150
- }
151
-
152
- /* Switch on: Children */
153
- .rbg-graph .switch[aria-checked='true'] {
154
- background: var(--rbg-children-color, #7b1fa2);
155
- }
156
-
157
- .rbg-graph .switch[aria-checked='true'] .switch-knob {
158
- left: 18px;
159
- }
160
-
161
- /* Track node is "No tracking": nothing to track, the switch is greyed out */
162
- .rbg-graph .track-switch.disabled {
163
- opacity: 0.4;
164
- }
165
-
166
- .rbg-graph .switch:disabled {
167
- cursor: not-allowed;
168
- }
169
-
170
- .rbg-graph .node-search > input {
171
- padding: 0.4em 2em 0.4em 0.7em;
172
- font-size: var(--rbg-top-controls-font-size, 14px);
173
- min-width: 18.5em;
174
- color: #0066cc;
175
- font-weight: bold;
176
- border: 1px solid #ccc;
177
- border-radius: 4px;
178
- }
179
-
180
- .rbg-graph .node-search > input::placeholder {
181
- color: #0066cc;
182
- font-weight: normal;
183
- opacity: 0.7;
184
- }
185
-
186
- .rbg-graph .node-search-clear {
187
- position: absolute;
188
- right: 6px;
189
- top: 50%;
190
- transform: translateY(-50%);
191
- border: none;
192
- background: none;
193
- font-size: 16px;
194
- line-height: 1;
195
- color: #0066cc;
196
- cursor: pointer;
197
- }
198
-
199
- .rbg-graph .node-search-list {
200
- position: absolute;
201
- top: calc(100% + 2px);
202
- left: 0;
203
- right: 0;
204
- max-height: 320px;
205
- overflow-y: auto;
206
- margin: 0;
207
- padding: 4px 0;
208
- list-style: none;
209
- background: #fff;
210
- border: 1px solid #ccc;
211
- border-radius: 4px;
212
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
213
- z-index: 1000;
214
- }
215
-
216
- .rbg-graph .node-search-list li {
217
- padding: 5px 10px;
218
- font-size: var(--rbg-top-controls-font-size, 14px);
219
- color: #0066cc;
220
- cursor: pointer;
221
- }
222
-
223
- .rbg-graph .node-search-list li.active {
224
- background: #e8f0fb;
225
- }
226
-
227
- /* Visibility checkbox in "Node to Display" */
228
- .rbg-graph .node-search-list li input[type='checkbox'] {
229
- margin: 0 0.5em 0 0;
230
- vertical-align: middle;
231
- cursor: pointer;
232
- }
233
-
234
- /* Node hidden from the graph */
235
- .rbg-graph .node-search-list li.off {
236
- opacity: 0.5;
237
- }
238
-
239
- .rbg-graph .node-search-list li.node-search-empty {
240
- cursor: default;
241
- opacity: 0.7;
242
- }
243
-
244
- .rbg-graph .graph-area {
245
- flex: 1;
246
- min-height: 0;
247
- display: flex;
248
- }
249
-
250
- .rbg-graph .cy-container {
251
- flex: 1;
252
- min-height: 0;
253
- min-width: 0;
254
- background: #fff;
255
- }
256
-
257
- /* Right details panel text size comes from create_graph options (rightDisplayFontSize), set as a CSS variable */
258
- .rbg-graph .node-info-panel {
259
- width: 300px;
260
- flex-shrink: 0;
261
- overflow-y: auto;
262
- padding: 12px 16px;
263
- border-left: 1px solid #ddd;
264
- background: #fafafa;
265
- color: #0066cc;
266
- font-size: var(--rbg-right-display-font-size, 14px);
267
- }
268
-
269
- .rbg-graph .node-info-header {
270
- display: flex;
271
- align-items: flex-start;
272
- justify-content: space-between;
273
- gap: 8px;
274
- }
275
-
276
- .rbg-graph .node-info-header h2 {
277
- margin: 0 0 8px;
278
- font-size: var(--rbg-right-display-font-size, 14px);
279
- font-weight: normal;
280
- color: #0066cc;
281
- word-break: break-word;
282
- }
283
-
284
- .rbg-graph .node-info-header button {
285
- border: none;
286
- background: none;
287
- font-size: var(--rbg-right-display-font-size, 14px);
288
- line-height: 1;
289
- color: #0066cc;
290
- cursor: pointer;
291
- }
292
-
293
- .rbg-graph .node-info-panel h3 {
294
- margin: 16px 0 6px;
295
- font-size: var(--rbg-right-display-font-size, 14px);
296
- font-weight: bold;
297
- color: #0066cc;
298
- }
299
-
300
- .rbg-graph .node-info-panel ul {
301
- list-style: none;
302
- margin: 0;
303
- padding: 0;
304
- }
305
-
306
- .rbg-graph .node-info-panel li button {
307
- display: block;
308
- width: 100%;
309
- padding: 4px 6px;
310
- border: none;
311
- background: none;
312
- text-align: left;
313
- font-size: var(--rbg-right-display-font-size, 14px);
314
- color: #0066cc;
315
- cursor: pointer;
316
- }
317
-
318
- .rbg-graph .node-info-panel li button:hover {
319
- background: #e8f0fb;
320
- }
321
-
322
- .rbg-graph .node-info-panel li span {
323
- color: #0066cc;
324
- }
325
-
326
- .rbg-graph .node-context-menu {
327
- position: fixed;
328
- z-index: 1000;
329
- background: #fff;
330
- border: 1px solid #ccc;
331
- border-radius: 4px;
332
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
333
- padding: 4px 0;
334
- min-width: 150px;
335
- }
336
-
337
- .rbg-graph .node-context-menu button {
338
- display: block;
339
- width: 100%;
340
- padding: 6px 14px;
341
- border: none;
342
- background: none;
343
- text-align: left;
344
- font-size: 14px;
345
- color: #0066cc;
346
- cursor: pointer;
347
- }
348
-
349
- .rbg-graph .node-context-menu button:hover {
350
- background: #e8f0fb;
351
- }
352
-
353
- /* One level / All levels switch under Group in the details panel */
354
- .rbg-graph .node-info-panel .level-switch {
355
- margin: 4px 0 8px;
356
- }
1
+ /* react-beauti-graph styles: everything is scoped under .rbg-graph */
2
+
3
+ .rbg-graph {
4
+ display: flex;
5
+ flex-direction: column;
6
+ flex: 1;
7
+ height: 100%;
8
+ min-height: 0;
9
+ }
10
+
11
+ /* Top controls row text size comes from create_graph options (topControlsFontSize), set as a CSS variable.
12
+ Spacing is in em, so it grows with the text size; the row wraps when it does not fit. */
13
+ .rbg-graph .controls {
14
+ font-size: var(--rbg-top-controls-font-size, 14px);
15
+ padding: 0.7em 1em;
16
+ background: #fafafa;
17
+ border-bottom: 1px solid #ddd;
18
+ display: flex;
19
+ flex-wrap: wrap;
20
+ align-items: center;
21
+ gap: 0.5em 0.8em;
22
+ flex-shrink: 0;
23
+ position: relative;
24
+ z-index: 10;
25
+ }
26
+
27
+ /* A label with its box (and the Track node switch): kept on one line */
28
+ .rbg-graph .control-group {
29
+ display: inline-flex;
30
+ align-items: center;
31
+ gap: 0.5em 0.8em;
32
+ white-space: nowrap;
33
+ }
34
+
35
+ .rbg-graph .controls label {
36
+ color: #0066cc;
37
+ white-space: nowrap;
38
+ }
39
+
40
+ .rbg-graph .help {
41
+ position: relative;
42
+ display: inline-flex;
43
+ }
44
+
45
+ .rbg-graph .help-icon {
46
+ width: 20px;
47
+ height: 20px;
48
+ padding: 0;
49
+ border: 1px solid #0066cc;
50
+ border-radius: 50%;
51
+ background: #fff;
52
+ color: #0066cc;
53
+ font-size: 13px;
54
+ font-weight: bold;
55
+ line-height: 1;
56
+ cursor: help;
57
+ }
58
+
59
+ .rbg-graph .font-size-buttons {
60
+ margin-left: auto;
61
+ display: inline-flex;
62
+ align-items: center;
63
+ gap: 4px;
64
+ }
65
+
66
+ .rbg-graph .font-size-buttons select {
67
+ font-size: inherit;
68
+ color: #0066cc;
69
+ border: 1px solid #0066cc;
70
+ border-radius: 4px;
71
+ background: #fff;
72
+ }
73
+
74
+ .rbg-graph .font-size-buttons .help-icon {
75
+ cursor: pointer;
76
+ }
77
+
78
+ .rbg-graph .font-size-buttons .help-icon:disabled {
79
+ opacity: 0.4;
80
+ cursor: not-allowed;
81
+ }
82
+
83
+ .rbg-graph .help-tooltip {
84
+ display: none;
85
+ position: absolute;
86
+ top: calc(100% + 6px);
87
+ left: 0;
88
+ width: 320px;
89
+ padding: 8px 10px;
90
+ background: #fff;
91
+ border: 1px solid #ccc;
92
+ border-radius: 4px;
93
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
94
+ color: #0066cc;
95
+ line-height: 1.5;
96
+ z-index: 1000;
97
+ }
98
+
99
+ /* Show on hover, or when the icon is clicked/focused with the keyboard */
100
+ .rbg-graph .help:hover .help-tooltip,
101
+ .rbg-graph .help-icon:focus + .help-tooltip {
102
+ display: block;
103
+ }
104
+
105
+ .rbg-graph .node-search {
106
+ position: relative;
107
+ }
108
+
109
+ /* Track node: Parents [switch] Children */
110
+ .rbg-graph .track-switch {
111
+ display: inline-flex;
112
+ align-items: center;
113
+ gap: 0.45em;
114
+ color: #999;
115
+ white-space: nowrap;
116
+ }
117
+
118
+ /* Colors come from create_graph options (parentsColor, childrenColor), set as CSS variables */
119
+ .rbg-graph .track-switch .on {
120
+ font-weight: bold;
121
+ }
122
+
123
+ .rbg-graph .track-switch .parents.on {
124
+ color: var(--rbg-parents-color, #2e7d32);
125
+ }
126
+
127
+ .rbg-graph .track-switch .children.on {
128
+ color: var(--rbg-children-color, #7b1fa2);
129
+ }
130
+
131
+ .rbg-graph .switch {
132
+ position: relative;
133
+ width: 36px;
134
+ height: 20px;
135
+ padding: 0;
136
+ border: none;
137
+ border-radius: 10px;
138
+ background: var(--rbg-parents-color, #2e7d32);
139
+ cursor: pointer;
140
+ }
141
+
142
+ .rbg-graph .switch-knob {
143
+ position: absolute;
144
+ top: 2px;
145
+ left: 2px;
146
+ width: 16px;
147
+ height: 16px;
148
+ border-radius: 50%;
149
+ background: #fff;
150
+ transition: left 0.15s;
151
+ }
152
+
153
+ /* Switch on: Children */
154
+ .rbg-graph .switch[aria-checked='true'] {
155
+ background: var(--rbg-children-color, #7b1fa2);
156
+ }
157
+
158
+ .rbg-graph .switch[aria-checked='true'] .switch-knob {
159
+ left: 18px;
160
+ }
161
+
162
+ /* Track node is "No tracking": nothing to track, the switch is greyed out */
163
+ .rbg-graph .track-switch.disabled {
164
+ opacity: 0.4;
165
+ }
166
+
167
+ .rbg-graph .switch:disabled {
168
+ cursor: not-allowed;
169
+ }
170
+
171
+ .rbg-graph .node-search > input {
172
+ padding: 0.4em 2em 0.4em 0.7em;
173
+ font-size: var(--rbg-top-controls-font-size, 14px);
174
+ min-width: 18.5em;
175
+ color: #0066cc;
176
+ font-weight: bold;
177
+ border: 1px solid #ccc;
178
+ border-radius: 4px;
179
+ }
180
+
181
+ .rbg-graph .node-search > input::placeholder {
182
+ color: #0066cc;
183
+ font-weight: normal;
184
+ opacity: 0.7;
185
+ }
186
+
187
+ .rbg-graph .node-search-clear {
188
+ position: absolute;
189
+ right: 6px;
190
+ top: 50%;
191
+ transform: translateY(-50%);
192
+ border: none;
193
+ background: none;
194
+ font-size: 16px;
195
+ line-height: 1;
196
+ color: #0066cc;
197
+ cursor: pointer;
198
+ }
199
+
200
+ .rbg-graph .node-search-list {
201
+ position: absolute;
202
+ top: calc(100% + 2px);
203
+ left: 0;
204
+ right: 0;
205
+ max-height: 320px;
206
+ overflow-y: auto;
207
+ margin: 0;
208
+ padding: 4px 0;
209
+ list-style: none;
210
+ background: #fff;
211
+ border: 1px solid #ccc;
212
+ border-radius: 4px;
213
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
214
+ z-index: 1000;
215
+ }
216
+
217
+ .rbg-graph .node-search-list li {
218
+ padding: 5px 10px;
219
+ font-size: var(--rbg-top-controls-font-size, 14px);
220
+ color: #0066cc;
221
+ cursor: pointer;
222
+ }
223
+
224
+ .rbg-graph .node-search-list li.active {
225
+ background: #e8f0fb;
226
+ }
227
+
228
+ /* Visibility checkbox in "Node to Display" */
229
+ .rbg-graph .node-search-list li input[type='checkbox'] {
230
+ margin: 0 0.5em 0 0;
231
+ vertical-align: middle;
232
+ cursor: pointer;
233
+ }
234
+
235
+ /* Node hidden from the graph */
236
+ .rbg-graph .node-search-list li.off {
237
+ opacity: 0.5;
238
+ }
239
+
240
+ .rbg-graph .node-search-list li.node-search-empty {
241
+ cursor: default;
242
+ opacity: 0.7;
243
+ }
244
+
245
+ .rbg-graph .graph-area {
246
+ flex: 1;
247
+ min-height: 0;
248
+ display: flex;
249
+ }
250
+
251
+ .rbg-graph .cy-container {
252
+ flex: 1;
253
+ min-height: 0;
254
+ min-width: 0;
255
+ background: #fff;
256
+ }
257
+
258
+ /* Right details panel text size comes from create_graph options (rightDisplayFontSize), set as a CSS variable */
259
+ .rbg-graph .node-info-panel {
260
+ width: 300px;
261
+ flex-shrink: 0;
262
+ overflow-y: auto;
263
+ padding: 12px 16px;
264
+ border-left: 1px solid #ddd;
265
+ background: #fafafa;
266
+ color: #0066cc;
267
+ font-size: var(--rbg-right-display-font-size, 14px);
268
+ }
269
+
270
+ .rbg-graph .node-info-header {
271
+ display: flex;
272
+ align-items: flex-start;
273
+ justify-content: space-between;
274
+ gap: 8px;
275
+ }
276
+
277
+ .rbg-graph .node-info-header h2 {
278
+ margin: 0 0 8px;
279
+ font-size: var(--rbg-right-display-font-size, 14px);
280
+ font-weight: normal;
281
+ color: #0066cc;
282
+ word-break: break-word;
283
+ }
284
+
285
+ .rbg-graph .node-info-header button {
286
+ border: none;
287
+ background: none;
288
+ font-size: var(--rbg-right-display-font-size, 14px);
289
+ line-height: 1;
290
+ color: #0066cc;
291
+ cursor: pointer;
292
+ }
293
+
294
+ .rbg-graph .node-info-panel h3 {
295
+ margin: 16px 0 6px;
296
+ font-size: var(--rbg-right-display-font-size, 14px);
297
+ font-weight: bold;
298
+ color: #0066cc;
299
+ }
300
+
301
+ .rbg-graph .node-info-panel ul {
302
+ list-style: none;
303
+ margin: 0;
304
+ padding: 0;
305
+ }
306
+
307
+ .rbg-graph .node-info-panel li button {
308
+ display: block;
309
+ width: 100%;
310
+ padding: 4px 6px;
311
+ border: none;
312
+ background: none;
313
+ text-align: left;
314
+ font-size: var(--rbg-right-display-font-size, 14px);
315
+ color: #0066cc;
316
+ cursor: pointer;
317
+ }
318
+
319
+ .rbg-graph .node-info-panel li button:hover {
320
+ background: #e8f0fb;
321
+ }
322
+
323
+ .rbg-graph .node-info-panel li span {
324
+ color: #0066cc;
325
+ }
326
+
327
+ .rbg-graph .node-context-menu {
328
+ position: fixed;
329
+ z-index: 1000;
330
+ background: #fff;
331
+ border: 1px solid #ccc;
332
+ border-radius: 4px;
333
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
334
+ padding: 4px 0;
335
+ min-width: 150px;
336
+ }
337
+
338
+ .rbg-graph .node-context-menu button {
339
+ display: block;
340
+ width: 100%;
341
+ padding: 6px 14px;
342
+ border: none;
343
+ background: none;
344
+ text-align: left;
345
+ font-size: 14px;
346
+ color: #0066cc;
347
+ cursor: pointer;
348
+ }
349
+
350
+ .rbg-graph .node-context-menu button:hover {
351
+ background: #e8f0fb;
352
+ }
353
+
354
+ /* One level / All levels switch under Group in the details panel */
355
+ .rbg-graph .node-info-panel .level-switch {
356
+ margin: 4px 0 8px;
357
+ }
358
+
359
+ .rbg-graph .export-svg {
360
+ margin-left: -0.5em; /* tuck against the font-size controls */
361
+ padding: 0.38em 1.05em;
362
+ font-size: 1em;
363
+ border: 0;
364
+ border-radius: 8px;
365
+ background: #0066cc;
366
+ color: #fff;
367
+ font-weight: 600;
368
+ cursor: pointer;
369
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
370
+ transition: background 0.15s;
371
+ }
372
+
373
+ .rbg-graph .export-svg:hover {
374
+ background: #0052a3;
375
+ }
376
+
377
+ .rbg-graph .export-svg:focus-visible {
378
+ outline: 2px solid #99c7ff;
379
+ outline-offset: 2px;
380
+ }