flexlayout-react 0.8.18 → 0.9.0
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 +144 -206
- package/dist/index.js +6451 -6398
- package/package.json +31 -34
- package/style/_base.scss +109 -33
- package/style/_themes.scss +720 -49
- package/style/alpha_dark.css +862 -0
- package/style/alpha_dark.css.map +1 -0
- package/style/alpha_dark.scss +6 -0
- package/style/alpha_light.css +856 -0
- package/style/alpha_light.css.map +1 -0
- package/style/alpha_light.scss +6 -0
- package/style/alpha_rounded.css +811 -0
- package/style/alpha_rounded.css.map +1 -0
- package/style/alpha_rounded.scss +6 -0
- package/style/combined.css +569 -44
- package/style/combined.css.map +1 -1
- package/style/combined.scss +25 -1
- package/style/dark.css +95 -22
- package/style/dark.css.map +1 -1
- package/style/gray.css +96 -23
- package/style/gray.css.map +1 -1
- package/style/light.css +96 -20
- package/style/light.css.map +1 -1
- package/style/rounded.css +107 -25
- package/style/rounded.css.map +1 -1
- package/style/underline.css +99 -22
- package/style/underline.css.map +1 -1
- package/types/index.d.ts +14 -14
- package/types/model/Actions.d.ts +62 -31
- package/types/model/Attributes.d.ts +42 -0
- package/types/model/BorderNode.d.ts +11 -11
- package/types/model/BorderSet.d.ts +2 -2
- package/types/{DropInfo.d.ts → model/DropInfo.d.ts} +2 -2
- package/types/model/IDropTarget.d.ts +2 -2
- package/types/model/IJsonModel.d.ts +70 -48
- package/types/model/Layout.d.ts +41 -0
- package/types/model/Model.d.ts +31 -26
- package/types/model/Node.d.ts +18 -10
- package/types/{Rect.d.ts → model/Rect.d.ts} +6 -3
- package/types/model/RowNode.d.ts +15 -14
- package/types/model/TabNode.d.ts +15 -21
- package/types/model/TabSetNode.d.ts +15 -21
- package/types/view/BorderButton.d.ts +4 -3
- package/types/view/BorderTab.d.ts +3 -3
- package/types/view/BorderTabSet.d.ts +3 -3
- package/types/{Types.d.ts → view/CSSClassNames.d.ts} +9 -2
- package/types/view/DragContainer.d.ts +6 -4
- package/types/view/FloatWindow.d.ts +11 -0
- package/types/{I18nLabel.d.ts → view/I18nLabel.d.ts} +1 -0
- package/types/view/Icons.d.ts +1 -0
- package/types/view/Layout.d.ts +34 -212
- package/types/view/Overlay.d.ts +2 -2
- package/types/view/PopoutWindow.d.ts +6 -6
- package/types/view/PopupMenu.d.ts +2 -2
- package/types/view/Row.d.ts +3 -3
- package/types/view/Splitter.d.ts +2 -4
- package/types/view/Tab.d.ts +3 -4
- package/types/view/TabButton.d.ts +3 -3
- package/types/view/TabButtonStamp.d.ts +3 -3
- package/types/view/TabContentRenderer.d.ts +14 -0
- package/types/view/TabLayout.d.ts +12 -0
- package/types/view/TabOverflowHook.d.ts +3 -3
- package/types/view/TabSet.d.ts +3 -3
- package/types/view/Utils.d.ts +7 -4
- package/types/view/layout/BorderContainer.d.ts +7 -0
- package/types/view/layout/DragDropManager.d.ts +48 -0
- package/types/view/layout/EdgeIndicators.d.ts +5 -0
- package/types/view/layout/FloatingWindowContainer.d.ts +5 -0
- package/types/view/layout/LayoutInternal.d.ts +151 -0
- package/types/view/layout/LayoutTypes.d.ts +51 -0
- package/types/Attribute.d.ts +0 -25
- package/types/AttributeDefinitions.d.ts +0 -18
- package/types/model/Action.d.ts +0 -5
- package/types/model/LayoutWindow.d.ts +0 -44
- package/types/view/SizeTracker.d.ts +0 -13
- /package/types/{DockLocation.d.ts → model/DockLocation.d.ts} +0 -0
- /package/types/{Orientation.d.ts → model/Orientation.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flexlayout-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "A multi-tab docking layout manager",
|
|
5
5
|
"author": "Caplin Systems Ltd",
|
|
6
6
|
"repository": {
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"docking layout"
|
|
45
45
|
],
|
|
46
46
|
"scripts": {
|
|
47
|
-
"dev": "vite",
|
|
47
|
+
"dev": "vite --host",
|
|
48
48
|
"preview": "vite preview",
|
|
49
49
|
"build": "npm run build:clean && npm run build:demo && npm run css && npm run build:lib && npm run build:types && npm run doc",
|
|
50
50
|
"build:clean": "rimraf demo/dist dist/ types/ typedoc/",
|
|
@@ -53,49 +53,46 @@
|
|
|
53
53
|
"build:lib": "vite build --config vite.config.lib.ts",
|
|
54
54
|
"test": "vitest",
|
|
55
55
|
"playwright": "playwright test --ui",
|
|
56
|
-
"lint": "eslint src
|
|
56
|
+
"lint": "eslint src",
|
|
57
57
|
"doc": "typedoc --out typedoc --exclude \"**/demo/**/*.tsx\" --excludeInternal --disableSources --excludePrivate --excludeProtected --readme none ./src",
|
|
58
58
|
"css": "sass style:style"
|
|
59
59
|
},
|
|
60
|
-
"eslintConfig": {
|
|
61
|
-
"extends": "react-app"
|
|
62
|
-
},
|
|
63
60
|
"peerDependencies": {
|
|
64
61
|
"react": "^18.0.0 || ^19.0.0",
|
|
65
62
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
66
63
|
},
|
|
67
64
|
"devDependencies": {
|
|
68
65
|
"@emotion/react": "^11.14.0",
|
|
69
|
-
"@emotion/styled": "^11.14.
|
|
70
|
-
"@eslint/js": "^
|
|
71
|
-
"@mui/material": "^
|
|
72
|
-
"@mui/x-data-grid": "^
|
|
73
|
-
"@playwright/test": "^1.
|
|
74
|
-
"@types/node": "^
|
|
75
|
-
"@types/prismjs": "^1.26.
|
|
76
|
-
"@types/react": "^19.
|
|
77
|
-
"@types/react-dom": "^19.
|
|
78
|
-
"@vitejs/plugin-react": "^
|
|
79
|
-
"ag-grid-community": "^
|
|
80
|
-
"ag-grid-react": "^
|
|
81
|
-
"chart.js": "^4.
|
|
82
|
-
"eslint": "^
|
|
66
|
+
"@emotion/styled": "^11.14.1",
|
|
67
|
+
"@eslint/js": "^10.0.1",
|
|
68
|
+
"@mui/material": "^9.0.0",
|
|
69
|
+
"@mui/x-data-grid": "^9.0.1",
|
|
70
|
+
"@playwright/test": "^1.59.1",
|
|
71
|
+
"@types/node": "^25.5.2",
|
|
72
|
+
"@types/prismjs": "^1.26.6",
|
|
73
|
+
"@types/react": "^19.2.14",
|
|
74
|
+
"@types/react-dom": "^19.2.3",
|
|
75
|
+
"@vitejs/plugin-react": "^6.0.1",
|
|
76
|
+
"ag-grid-community": "^35.2.1",
|
|
77
|
+
"ag-grid-react": "^35.2.1",
|
|
78
|
+
"chart.js": "^4.5.1",
|
|
79
|
+
"eslint": "^10.2.0",
|
|
83
80
|
"eslint-plugin-react": "^7.37.5",
|
|
84
|
-
"globals": "^
|
|
85
|
-
"ol": "^10.
|
|
86
|
-
"prettier": "^3.
|
|
81
|
+
"globals": "^17.4.0",
|
|
82
|
+
"ol": "^10.8.0",
|
|
83
|
+
"prettier": "^3.8.1",
|
|
87
84
|
"prismjs": "^1.30.0",
|
|
88
|
-
"react": "^19.
|
|
89
|
-
"react-chartjs-2": "^5.3.
|
|
90
|
-
"react-dom": "^19.
|
|
85
|
+
"react": "^19.2.5",
|
|
86
|
+
"react-chartjs-2": "^5.3.1",
|
|
87
|
+
"react-dom": "^19.2.5",
|
|
91
88
|
"react-scripts": "5.0.1",
|
|
92
|
-
"rimraf": "^6.
|
|
93
|
-
"sass": "^1.
|
|
94
|
-
"styled-components": "^6.
|
|
95
|
-
"typedoc": "^0.28.
|
|
96
|
-
"typescript": "^
|
|
97
|
-
"typescript-eslint": "^8.
|
|
98
|
-
"vite": "^
|
|
99
|
-
"vitest": "^
|
|
89
|
+
"rimraf": "^6.1.3",
|
|
90
|
+
"sass": "^1.99.0",
|
|
91
|
+
"styled-components": "^6.4.0",
|
|
92
|
+
"typedoc": "^0.28.18",
|
|
93
|
+
"typescript": "^6.0.2",
|
|
94
|
+
"typescript-eslint": "^8.58.1",
|
|
95
|
+
"vite": "^8.0.8",
|
|
96
|
+
"vitest": "^4.1.4"
|
|
100
97
|
}
|
|
101
98
|
}
|
package/style/_base.scss
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
@mixin baseMixin {
|
|
17
|
+
|
|
17
18
|
/*
|
|
18
19
|
base classes
|
|
19
20
|
*/
|
|
@@ -21,6 +22,7 @@
|
|
|
21
22
|
&__layout {
|
|
22
23
|
@include absoluteFill;
|
|
23
24
|
display: flex;
|
|
25
|
+
overflow: hidden;
|
|
24
26
|
background-color: var(--color-background);
|
|
25
27
|
|
|
26
28
|
&_overlay {
|
|
@@ -34,7 +36,7 @@
|
|
|
34
36
|
z-index: 100;
|
|
35
37
|
display: flex;
|
|
36
38
|
flex-direction: column;
|
|
37
|
-
align-items: start;
|
|
39
|
+
align-items: flex-start;
|
|
38
40
|
}
|
|
39
41
|
|
|
40
42
|
&_moveables {
|
|
@@ -69,6 +71,41 @@
|
|
|
69
71
|
background-color: var(--color-splitter);
|
|
70
72
|
touch-action: none;
|
|
71
73
|
z-index: 10;
|
|
74
|
+
position: relative;
|
|
75
|
+
|
|
76
|
+
&_horz {
|
|
77
|
+
width: var(--splitter-size);
|
|
78
|
+
min-width: var(--splitter-size);
|
|
79
|
+
|
|
80
|
+
&::before {
|
|
81
|
+
content: "";
|
|
82
|
+
position: absolute;
|
|
83
|
+
top: 0;
|
|
84
|
+
bottom: 0;
|
|
85
|
+
/* Center the hit area over the thin line */
|
|
86
|
+
left: 50%;
|
|
87
|
+
width: var(--splitter-active-size);
|
|
88
|
+
transform: translateX(-50%);
|
|
89
|
+
z-index: 1;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&_vert {
|
|
94
|
+
height: var(--splitter-size);
|
|
95
|
+
min-height: var(--splitter-size);
|
|
96
|
+
|
|
97
|
+
&::before {
|
|
98
|
+
content: "";
|
|
99
|
+
position: absolute;
|
|
100
|
+
left: 0;
|
|
101
|
+
right: 0;
|
|
102
|
+
/* Center the hit area over the thin line */
|
|
103
|
+
top: 50%;
|
|
104
|
+
height: var(--splitter-active-size);
|
|
105
|
+
transform: translateY(-50%);
|
|
106
|
+
z-index: 1;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
72
109
|
|
|
73
110
|
@media (hover: hover) {
|
|
74
111
|
&:hover {
|
|
@@ -79,8 +116,7 @@
|
|
|
79
116
|
}
|
|
80
117
|
}
|
|
81
118
|
|
|
82
|
-
&_border {
|
|
83
|
-
}
|
|
119
|
+
&_border {}
|
|
84
120
|
|
|
85
121
|
&_drag {
|
|
86
122
|
position: absolute;
|
|
@@ -93,8 +129,9 @@
|
|
|
93
129
|
}
|
|
94
130
|
|
|
95
131
|
&_handle {
|
|
96
|
-
background-color:
|
|
132
|
+
background-color: var(--color-splitter-handle);
|
|
97
133
|
border-radius: 3px;
|
|
134
|
+
visibility: var(--splitter-handle-visibility);
|
|
98
135
|
|
|
99
136
|
&_horz {
|
|
100
137
|
width: 3px;
|
|
@@ -196,23 +233,7 @@
|
|
|
196
233
|
}
|
|
197
234
|
|
|
198
235
|
&_leading {
|
|
199
|
-
display:flex;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
&_header {
|
|
203
|
-
// tabset header bar
|
|
204
236
|
display: flex;
|
|
205
|
-
align-items: center;
|
|
206
|
-
padding: 3px 3px 3px 5px;
|
|
207
|
-
box-sizing: border-box;
|
|
208
|
-
border-bottom: 1px solid var(--color-tabset-divider-line);
|
|
209
|
-
color: var(--color-tabset-header);
|
|
210
|
-
background-color: var(--color-tabset-header-background);
|
|
211
|
-
font-size: var(--font-size);
|
|
212
|
-
|
|
213
|
-
&_content {
|
|
214
|
-
flex-grow: 1;
|
|
215
|
-
}
|
|
216
237
|
}
|
|
217
238
|
|
|
218
239
|
&_tabbar {
|
|
@@ -222,7 +243,10 @@
|
|
|
222
243
|
background-color: var(--color-tabset-background);
|
|
223
244
|
overflow: hidden;
|
|
224
245
|
display: flex;
|
|
246
|
+
align-items: center;
|
|
247
|
+
min-height: 1.5em;
|
|
225
248
|
font-size: var(--font-size);
|
|
249
|
+
font-weight: var(--font-weight);
|
|
226
250
|
}
|
|
227
251
|
|
|
228
252
|
&_outer_top {
|
|
@@ -254,6 +278,7 @@
|
|
|
254
278
|
padding-right: 4px;
|
|
255
279
|
box-sizing: border-box;
|
|
256
280
|
white-space: nowrap;
|
|
281
|
+
align-items: center;
|
|
257
282
|
|
|
258
283
|
&_top {
|
|
259
284
|
border-top: 2px solid transparent;
|
|
@@ -309,12 +334,26 @@
|
|
|
309
334
|
background-color: #0000003d;
|
|
310
335
|
}
|
|
311
336
|
|
|
337
|
+
&_layout_container {
|
|
338
|
+
// @include absoluteFill;
|
|
339
|
+
position:relative;
|
|
340
|
+
height: 100%;
|
|
341
|
+
box-sizing: border-box;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
&_layout_container_user {
|
|
345
|
+
position:relative;
|
|
346
|
+
flex-grow: 1;
|
|
347
|
+
box-sizing: border-box;
|
|
348
|
+
}
|
|
349
|
+
|
|
312
350
|
&_button {
|
|
313
351
|
display: flex;
|
|
314
352
|
gap: 0.3em;
|
|
315
353
|
align-items: center;
|
|
316
354
|
box-sizing: border-box;
|
|
317
|
-
padding: 3px 0.5em;
|
|
355
|
+
padding: 3px 0.5em;
|
|
356
|
+
font-weight: var(--font-weight);
|
|
318
357
|
|
|
319
358
|
cursor: pointer;
|
|
320
359
|
|
|
@@ -353,11 +392,9 @@
|
|
|
353
392
|
color: var(--color-tab-unselected);
|
|
354
393
|
}
|
|
355
394
|
|
|
356
|
-
&_top {
|
|
357
|
-
}
|
|
395
|
+
&_top {}
|
|
358
396
|
|
|
359
|
-
&_bottom {
|
|
360
|
-
}
|
|
397
|
+
&_bottom {}
|
|
361
398
|
|
|
362
399
|
&_leading {
|
|
363
400
|
display: flex;
|
|
@@ -372,6 +409,7 @@
|
|
|
372
409
|
border: none;
|
|
373
410
|
font-family: var(--font-family);
|
|
374
411
|
font-size: var(--font-size);
|
|
412
|
+
font-weight: var(--font-weight);
|
|
375
413
|
color: var(--color-tab-textbox);
|
|
376
414
|
background-color: var(--color-tab-textbox-background);
|
|
377
415
|
border: 1px inset var(--color-1);
|
|
@@ -472,8 +510,9 @@
|
|
|
472
510
|
box-sizing: border-box;
|
|
473
511
|
overflow: hidden;
|
|
474
512
|
display: flex;
|
|
475
|
-
font-size: var(--font-size);
|
|
476
513
|
font-family: var(--font-family);
|
|
514
|
+
font-size: var(--font-size);
|
|
515
|
+
font-weight: var(--font-weight);
|
|
477
516
|
color: var(--color-border);
|
|
478
517
|
background-color: var(--color-border-background);
|
|
479
518
|
|
|
@@ -482,9 +521,9 @@
|
|
|
482
521
|
overflow: hidden;
|
|
483
522
|
background-color: var(--color-border-tab-content);
|
|
484
523
|
}
|
|
485
|
-
|
|
524
|
+
|
|
486
525
|
&_leading {
|
|
487
|
-
display:flex;
|
|
526
|
+
display: flex;
|
|
488
527
|
}
|
|
489
528
|
|
|
490
529
|
&_top {
|
|
@@ -524,6 +563,7 @@
|
|
|
524
563
|
&_tab_container {
|
|
525
564
|
white-space: nowrap;
|
|
526
565
|
display: flex;
|
|
566
|
+
align-items: center;
|
|
527
567
|
padding-left: 2px;
|
|
528
568
|
padding-right: 2px;
|
|
529
569
|
box-sizing: border-box;
|
|
@@ -555,6 +595,7 @@
|
|
|
555
595
|
margin: 2px 0px;
|
|
556
596
|
box-sizing: border-box;
|
|
557
597
|
white-space: nowrap;
|
|
598
|
+
font-weight: var(--font-weight);
|
|
558
599
|
|
|
559
600
|
&--selected {
|
|
560
601
|
background-color: var(--color-border-tab-selected-background);
|
|
@@ -586,8 +627,7 @@
|
|
|
586
627
|
border-radius: 4px;
|
|
587
628
|
visibility: hidden;
|
|
588
629
|
|
|
589
|
-
&:hover {
|
|
590
|
-
}
|
|
630
|
+
&:hover {}
|
|
591
631
|
}
|
|
592
632
|
|
|
593
633
|
@media (pointer: coarse) {
|
|
@@ -661,6 +701,7 @@
|
|
|
661
701
|
&__popup_menu {
|
|
662
702
|
font-size: var(--font-size);
|
|
663
703
|
font-family: var(--font-family);
|
|
704
|
+
font-weight: var(--font-weight);
|
|
664
705
|
|
|
665
706
|
&_item {
|
|
666
707
|
padding: 2px 0.5em;
|
|
@@ -688,7 +729,7 @@
|
|
|
688
729
|
background: var(--color-popup-unselected-background);
|
|
689
730
|
border-radius: 3px;
|
|
690
731
|
position: absolute;
|
|
691
|
-
z-index:
|
|
732
|
+
z-index: 3000;
|
|
692
733
|
max-height: 50%;
|
|
693
734
|
min-width: 100px;
|
|
694
735
|
overflow: auto;
|
|
@@ -696,6 +737,40 @@
|
|
|
696
737
|
}
|
|
697
738
|
}
|
|
698
739
|
|
|
740
|
+
&__float_window {
|
|
741
|
+
box-sizing: border-box;
|
|
742
|
+
background-color: var(--color-tabset-background);
|
|
743
|
+
border-radius: 5px;
|
|
744
|
+
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
|
|
745
|
+
display: flex;
|
|
746
|
+
flex-direction: column;
|
|
747
|
+
overflow: hidden;
|
|
748
|
+
z-index: 2000;
|
|
749
|
+
|
|
750
|
+
&_header {
|
|
751
|
+
display: flex;
|
|
752
|
+
align-items: center;
|
|
753
|
+
padding: 2px 8px;
|
|
754
|
+
background-color: var(--color-float-window-header-background);
|
|
755
|
+
border-bottom: 1px solid var(--color-tabset-divider-line);
|
|
756
|
+
cursor: move;
|
|
757
|
+
user-select: none;
|
|
758
|
+
font-family: var(--font-family);
|
|
759
|
+
font-size: .8em;
|
|
760
|
+
min-height: 15px;
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
&_content {
|
|
764
|
+
position: relative;
|
|
765
|
+
flex-grow: 1;
|
|
766
|
+
display: flex;
|
|
767
|
+
flex-direction: column;
|
|
768
|
+
min-height: 0;
|
|
769
|
+
min-width: 0;
|
|
770
|
+
margin: 5px;
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
|
|
699
774
|
&__floating_window {
|
|
700
775
|
_body {
|
|
701
776
|
height: 100%;
|
|
@@ -728,6 +803,7 @@
|
|
|
728
803
|
padding-bottom: 5px;
|
|
729
804
|
font-size: var(--font-size);
|
|
730
805
|
font-family: var(--font-family);
|
|
806
|
+
font-weight: var(--font-weight);
|
|
731
807
|
}
|
|
732
808
|
|
|
733
809
|
&__mini_scrollbar {
|
|
@@ -761,6 +837,6 @@
|
|
|
761
837
|
}
|
|
762
838
|
}
|
|
763
839
|
|
|
764
|
-
/* ======================== End of Base Classes =========================== */
|
|
840
|
+
/* ======================== End of Base Classes =========================== */
|
|
765
841
|
|
|
766
|
-
}
|
|
842
|
+
}
|