flexlayout-react 0.8.19 → 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 +6463 -6395
- package/package.json +21 -24
- package/style/_base.scss +108 -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 +568 -44
- package/style/combined.css.map +1 -1
- package/style/combined.scss +25 -1
- package/style/dark.css +94 -22
- package/style/dark.css.map +1 -1
- package/style/gray.css +95 -23
- package/style/gray.css.map +1 -1
- package/style/light.css +95 -20
- package/style/light.css.map +1 -1
- package/style/rounded.css +106 -25
- package/style/rounded.css.map +1 -1
- package/style/underline.css +98 -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 +30 -25
- package/types/model/Node.d.ts +18 -10
- package/types/{Rect.d.ts → model/Rect.d.ts} +6 -4
- 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,13 +53,10 @@
|
|
|
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"
|
|
@@ -67,35 +64,35 @@
|
|
|
67
64
|
"devDependencies": {
|
|
68
65
|
"@emotion/react": "^11.14.0",
|
|
69
66
|
"@emotion/styled": "^11.14.1",
|
|
70
|
-
"@eslint/js": "^
|
|
71
|
-
"@mui/material": "^
|
|
72
|
-
"@mui/x-data-grid": "^
|
|
73
|
-
"@playwright/test": "^1.
|
|
74
|
-
"@types/node": "^25.
|
|
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",
|
|
75
72
|
"@types/prismjs": "^1.26.6",
|
|
76
73
|
"@types/react": "^19.2.14",
|
|
77
74
|
"@types/react-dom": "^19.2.3",
|
|
78
|
-
"@vitejs/plugin-react": "^
|
|
79
|
-
"ag-grid-community": "^35.1
|
|
80
|
-
"ag-grid-react": "^35.1
|
|
75
|
+
"@vitejs/plugin-react": "^6.0.1",
|
|
76
|
+
"ag-grid-community": "^35.2.1",
|
|
77
|
+
"ag-grid-react": "^35.2.1",
|
|
81
78
|
"chart.js": "^4.5.1",
|
|
82
|
-
"eslint": "^
|
|
79
|
+
"eslint": "^10.2.0",
|
|
83
80
|
"eslint-plugin-react": "^7.37.5",
|
|
84
81
|
"globals": "^17.4.0",
|
|
85
82
|
"ol": "^10.8.0",
|
|
86
83
|
"prettier": "^3.8.1",
|
|
87
84
|
"prismjs": "^1.30.0",
|
|
88
|
-
"react": "^19.2.
|
|
85
|
+
"react": "^19.2.5",
|
|
89
86
|
"react-chartjs-2": "^5.3.1",
|
|
90
|
-
"react-dom": "^19.2.
|
|
87
|
+
"react-dom": "^19.2.5",
|
|
91
88
|
"react-scripts": "5.0.1",
|
|
92
89
|
"rimraf": "^6.1.3",
|
|
93
|
-
"sass": "^1.
|
|
94
|
-
"styled-components": "^6.
|
|
95
|
-
"typedoc": "^0.28.
|
|
96
|
-
"typescript": "^
|
|
97
|
-
"typescript-eslint": "^8.
|
|
98
|
-
"vite": "^
|
|
99
|
-
"vitest": "^4.
|
|
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,7 +22,7 @@
|
|
|
21
22
|
&__layout {
|
|
22
23
|
@include absoluteFill;
|
|
23
24
|
display: flex;
|
|
24
|
-
overflow:hidden;
|
|
25
|
+
overflow: hidden;
|
|
25
26
|
background-color: var(--color-background);
|
|
26
27
|
|
|
27
28
|
&_overlay {
|
|
@@ -35,7 +36,7 @@
|
|
|
35
36
|
z-index: 100;
|
|
36
37
|
display: flex;
|
|
37
38
|
flex-direction: column;
|
|
38
|
-
align-items: start;
|
|
39
|
+
align-items: flex-start;
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
&_moveables {
|
|
@@ -70,6 +71,41 @@
|
|
|
70
71
|
background-color: var(--color-splitter);
|
|
71
72
|
touch-action: none;
|
|
72
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
|
+
}
|
|
73
109
|
|
|
74
110
|
@media (hover: hover) {
|
|
75
111
|
&:hover {
|
|
@@ -80,8 +116,7 @@
|
|
|
80
116
|
}
|
|
81
117
|
}
|
|
82
118
|
|
|
83
|
-
&_border {
|
|
84
|
-
}
|
|
119
|
+
&_border {}
|
|
85
120
|
|
|
86
121
|
&_drag {
|
|
87
122
|
position: absolute;
|
|
@@ -94,8 +129,9 @@
|
|
|
94
129
|
}
|
|
95
130
|
|
|
96
131
|
&_handle {
|
|
97
|
-
background-color:
|
|
132
|
+
background-color: var(--color-splitter-handle);
|
|
98
133
|
border-radius: 3px;
|
|
134
|
+
visibility: var(--splitter-handle-visibility);
|
|
99
135
|
|
|
100
136
|
&_horz {
|
|
101
137
|
width: 3px;
|
|
@@ -197,23 +233,7 @@
|
|
|
197
233
|
}
|
|
198
234
|
|
|
199
235
|
&_leading {
|
|
200
|
-
display:flex;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
&_header {
|
|
204
|
-
// tabset header bar
|
|
205
236
|
display: flex;
|
|
206
|
-
align-items: center;
|
|
207
|
-
padding: 3px 3px 3px 5px;
|
|
208
|
-
box-sizing: border-box;
|
|
209
|
-
border-bottom: 1px solid var(--color-tabset-divider-line);
|
|
210
|
-
color: var(--color-tabset-header);
|
|
211
|
-
background-color: var(--color-tabset-header-background);
|
|
212
|
-
font-size: var(--font-size);
|
|
213
|
-
|
|
214
|
-
&_content {
|
|
215
|
-
flex-grow: 1;
|
|
216
|
-
}
|
|
217
237
|
}
|
|
218
238
|
|
|
219
239
|
&_tabbar {
|
|
@@ -223,7 +243,10 @@
|
|
|
223
243
|
background-color: var(--color-tabset-background);
|
|
224
244
|
overflow: hidden;
|
|
225
245
|
display: flex;
|
|
246
|
+
align-items: center;
|
|
247
|
+
min-height: 1.5em;
|
|
226
248
|
font-size: var(--font-size);
|
|
249
|
+
font-weight: var(--font-weight);
|
|
227
250
|
}
|
|
228
251
|
|
|
229
252
|
&_outer_top {
|
|
@@ -255,6 +278,7 @@
|
|
|
255
278
|
padding-right: 4px;
|
|
256
279
|
box-sizing: border-box;
|
|
257
280
|
white-space: nowrap;
|
|
281
|
+
align-items: center;
|
|
258
282
|
|
|
259
283
|
&_top {
|
|
260
284
|
border-top: 2px solid transparent;
|
|
@@ -310,12 +334,26 @@
|
|
|
310
334
|
background-color: #0000003d;
|
|
311
335
|
}
|
|
312
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
|
+
|
|
313
350
|
&_button {
|
|
314
351
|
display: flex;
|
|
315
352
|
gap: 0.3em;
|
|
316
353
|
align-items: center;
|
|
317
354
|
box-sizing: border-box;
|
|
318
|
-
padding: 3px 0.5em;
|
|
355
|
+
padding: 3px 0.5em;
|
|
356
|
+
font-weight: var(--font-weight);
|
|
319
357
|
|
|
320
358
|
cursor: pointer;
|
|
321
359
|
|
|
@@ -354,11 +392,9 @@
|
|
|
354
392
|
color: var(--color-tab-unselected);
|
|
355
393
|
}
|
|
356
394
|
|
|
357
|
-
&_top {
|
|
358
|
-
}
|
|
395
|
+
&_top {}
|
|
359
396
|
|
|
360
|
-
&_bottom {
|
|
361
|
-
}
|
|
397
|
+
&_bottom {}
|
|
362
398
|
|
|
363
399
|
&_leading {
|
|
364
400
|
display: flex;
|
|
@@ -373,6 +409,7 @@
|
|
|
373
409
|
border: none;
|
|
374
410
|
font-family: var(--font-family);
|
|
375
411
|
font-size: var(--font-size);
|
|
412
|
+
font-weight: var(--font-weight);
|
|
376
413
|
color: var(--color-tab-textbox);
|
|
377
414
|
background-color: var(--color-tab-textbox-background);
|
|
378
415
|
border: 1px inset var(--color-1);
|
|
@@ -473,8 +510,9 @@
|
|
|
473
510
|
box-sizing: border-box;
|
|
474
511
|
overflow: hidden;
|
|
475
512
|
display: flex;
|
|
476
|
-
font-size: var(--font-size);
|
|
477
513
|
font-family: var(--font-family);
|
|
514
|
+
font-size: var(--font-size);
|
|
515
|
+
font-weight: var(--font-weight);
|
|
478
516
|
color: var(--color-border);
|
|
479
517
|
background-color: var(--color-border-background);
|
|
480
518
|
|
|
@@ -483,9 +521,9 @@
|
|
|
483
521
|
overflow: hidden;
|
|
484
522
|
background-color: var(--color-border-tab-content);
|
|
485
523
|
}
|
|
486
|
-
|
|
524
|
+
|
|
487
525
|
&_leading {
|
|
488
|
-
display:flex;
|
|
526
|
+
display: flex;
|
|
489
527
|
}
|
|
490
528
|
|
|
491
529
|
&_top {
|
|
@@ -525,6 +563,7 @@
|
|
|
525
563
|
&_tab_container {
|
|
526
564
|
white-space: nowrap;
|
|
527
565
|
display: flex;
|
|
566
|
+
align-items: center;
|
|
528
567
|
padding-left: 2px;
|
|
529
568
|
padding-right: 2px;
|
|
530
569
|
box-sizing: border-box;
|
|
@@ -556,6 +595,7 @@
|
|
|
556
595
|
margin: 2px 0px;
|
|
557
596
|
box-sizing: border-box;
|
|
558
597
|
white-space: nowrap;
|
|
598
|
+
font-weight: var(--font-weight);
|
|
559
599
|
|
|
560
600
|
&--selected {
|
|
561
601
|
background-color: var(--color-border-tab-selected-background);
|
|
@@ -587,8 +627,7 @@
|
|
|
587
627
|
border-radius: 4px;
|
|
588
628
|
visibility: hidden;
|
|
589
629
|
|
|
590
|
-
&:hover {
|
|
591
|
-
}
|
|
630
|
+
&:hover {}
|
|
592
631
|
}
|
|
593
632
|
|
|
594
633
|
@media (pointer: coarse) {
|
|
@@ -662,6 +701,7 @@
|
|
|
662
701
|
&__popup_menu {
|
|
663
702
|
font-size: var(--font-size);
|
|
664
703
|
font-family: var(--font-family);
|
|
704
|
+
font-weight: var(--font-weight);
|
|
665
705
|
|
|
666
706
|
&_item {
|
|
667
707
|
padding: 2px 0.5em;
|
|
@@ -689,7 +729,7 @@
|
|
|
689
729
|
background: var(--color-popup-unselected-background);
|
|
690
730
|
border-radius: 3px;
|
|
691
731
|
position: absolute;
|
|
692
|
-
z-index:
|
|
732
|
+
z-index: 3000;
|
|
693
733
|
max-height: 50%;
|
|
694
734
|
min-width: 100px;
|
|
695
735
|
overflow: auto;
|
|
@@ -697,6 +737,40 @@
|
|
|
697
737
|
}
|
|
698
738
|
}
|
|
699
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
|
+
|
|
700
774
|
&__floating_window {
|
|
701
775
|
_body {
|
|
702
776
|
height: 100%;
|
|
@@ -729,6 +803,7 @@
|
|
|
729
803
|
padding-bottom: 5px;
|
|
730
804
|
font-size: var(--font-size);
|
|
731
805
|
font-family: var(--font-family);
|
|
806
|
+
font-weight: var(--font-weight);
|
|
732
807
|
}
|
|
733
808
|
|
|
734
809
|
&__mini_scrollbar {
|
|
@@ -762,6 +837,6 @@
|
|
|
762
837
|
}
|
|
763
838
|
}
|
|
764
839
|
|
|
765
|
-
/* ======================== End of Base Classes =========================== */
|
|
840
|
+
/* ======================== End of Base Classes =========================== */
|
|
766
841
|
|
|
767
842
|
}
|