flexlayout-react 0.8.6 → 0.8.8
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/ChangeLog.txt +9 -0
- package/README.md +49 -0
- package/declarations/Rect.d.ts +2 -0
- package/declarations/view/Layout.d.ts +1 -1
- package/dist/flexlayout.js +6 -6
- package/dist/flexlayout_min.js +1 -1
- package/lib/Rect.js +6 -0
- package/lib/Rect.js.map +1 -1
- package/lib/view/BorderTabSet.js +5 -6
- package/lib/view/BorderTabSet.js.map +1 -1
- package/lib/view/Layout.js +1 -1
- package/lib/view/PopupMenu.js +14 -1
- package/lib/view/PopupMenu.js.map +1 -1
- package/lib/view/TabOverflowHook.js +55 -52
- package/lib/view/TabOverflowHook.js.map +1 -1
- package/lib/view/TabSet.js +4 -4
- package/lib/view/TabSet.js.map +1 -1
- package/package.json +1 -2
- package/src/Rect.ts +8 -0
- package/src/view/BorderTabSet.tsx +5 -6
- package/src/view/Layout.tsx +1 -1
- package/src/view/PopupMenu.tsx +18 -0
- package/src/view/TabOverflowHook.tsx +63 -60
- package/src/view/TabSet.tsx +4 -4
- package/style/_base.scss +1 -0
- package/style/_themes.scss +3 -6
- package/style/combined.css +4 -6
- package/style/combined.css.map +1 -1
- package/style/dark.css +705 -704
- package/style/dark.css.map +1 -1
- package/style/gray.css +708 -707
- package/style/gray.css.map +1 -1
- package/style/light.css +682 -681
- package/style/light.css.map +1 -1
- package/style/rounded.css +4 -6
- package/style/rounded.css.map +1 -1
- package/style/underline.css +711 -710
- package/style/underline.css.map +1 -1
package/ChangeLog.txt
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
0.8.8
|
|
2
|
+
Enable esc to close overflow menu
|
|
3
|
+
Prevent initial reposition flash when there are hidden tabs
|
|
4
|
+
Removed Roboto font from demo
|
|
5
|
+
|
|
6
|
+
0.8.7
|
|
7
|
+
Improved tab scrolling into visible area
|
|
8
|
+
Added sections about tab and tabset customization to readme
|
|
9
|
+
|
|
1
10
|
0.8.6
|
|
2
11
|
Restructured scss files to remove use of deprecated @import rule
|
|
3
12
|
Added combined.css containing all themes.
|
package/README.md
CHANGED
|
@@ -223,6 +223,55 @@ For example:
|
|
|
223
223
|
containerRef.current!.className = "flexlayout__theme_dark"
|
|
224
224
|
```
|
|
225
225
|
|
|
226
|
+
## Customizing Tabs
|
|
227
|
+
|
|
228
|
+
You can use the `<Layout>` prop onRenderTab to customize the tab rendering:
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+

|
|
232
|
+
|
|
233
|
+
Update the renderValues parameter as needed:
|
|
234
|
+
|
|
235
|
+
renderValues.leading : the red block
|
|
236
|
+
|
|
237
|
+
renderValues.content : the green block
|
|
238
|
+
|
|
239
|
+
renderValues.buttons : the yellow block
|
|
240
|
+
|
|
241
|
+
For example:
|
|
242
|
+
|
|
243
|
+
```
|
|
244
|
+
onRenderTab = (node: TabNode, renderValues: ITabRenderValues) => {
|
|
245
|
+
// renderValues.leading = <img style={{width:"1em", height:"1em"}}src="images/folder.svg"/>;
|
|
246
|
+
// renderValues.content += " *";
|
|
247
|
+
renderValues.buttons.push(<img key="menu" style={{width:"1em", height:"1em"}} src="images/menu.svg"/>);
|
|
248
|
+
}
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
## Customizing Tab sets
|
|
252
|
+
|
|
253
|
+
You can use the `<Layout>` prop onRenderTabSet to customize the tab set rendering:
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+

|
|
257
|
+
|
|
258
|
+
Update the renderValues parameter as needed:
|
|
259
|
+
|
|
260
|
+
renderValues.stickyButtons : the red block
|
|
261
|
+
|
|
262
|
+
renderValues.buttons : the green block
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
For example:
|
|
266
|
+
|
|
267
|
+
```
|
|
268
|
+
onRenderTabSet = (node: (TabSetNode | BorderNode), renderValues: ITabSetRenderValues) => {
|
|
269
|
+
renderValues.stickyButtons.push(<img key="add" style={{width:"1em", height:"1em"}} src="images/add.svg"/>);
|
|
270
|
+
|
|
271
|
+
renderValues.buttons.push(<img key="menu" style={{width:"1em", height:"1em"}} src="images/menu.svg"/>);
|
|
272
|
+
}
|
|
273
|
+
```
|
|
274
|
+
|
|
226
275
|
## Model Actions
|
|
227
276
|
|
|
228
277
|
Once the model json has been loaded all changes to the model are applied through actions.
|
package/declarations/Rect.d.ts
CHANGED
|
@@ -98,7 +98,7 @@ export declare class Layout extends React.Component<ILayoutProps> {
|
|
|
98
98
|
/** Get the root div element of the layout */
|
|
99
99
|
getRootDiv(): HTMLDivElement | null;
|
|
100
100
|
}
|
|
101
|
-
export declare const FlexLayoutVersion = "0.8.
|
|
101
|
+
export declare const FlexLayoutVersion = "0.8.8";
|
|
102
102
|
export type DragRectRenderCallback = (content: React.ReactNode | undefined, node?: Node, json?: IJsonTabNode) => React.ReactNode | undefined;
|
|
103
103
|
export type NodeMouseEvent = (node: TabNode | TabSetNode | BorderNode, event: React.MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
104
104
|
export type ShowOverflowMenuCallback = (node: TabSetNode | BorderNode, mouseEvent: React.MouseEvent<HTMLElement, MouseEvent>, items: {
|