flexlayout-react 0.7.1 → 0.7.4
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 +12 -0
- package/README.md +33 -34
- package/declarations/view/Icons.d.ts +1 -0
- package/declarations/view/Layout.d.ts +1 -0
- package/dist/flexlayout.js +96 -184
- package/dist/flexlayout_min.js +1 -1
- package/lib/Attribute.js +12 -17
- package/lib/Attribute.js.map +1 -1
- package/lib/AttributeDefinitions.js +44 -53
- package/lib/AttributeDefinitions.js.map +1 -1
- package/lib/DockLocation.js +41 -46
- package/lib/DockLocation.js.map +1 -1
- package/lib/DragDrop.js +55 -60
- package/lib/DragDrop.js.map +1 -1
- package/lib/DropInfo.js +3 -8
- package/lib/DropInfo.js.map +1 -1
- package/lib/I18nLabel.js +2 -5
- package/lib/I18nLabel.js.map +1 -1
- package/lib/Orientation.js +11 -16
- package/lib/Orientation.js.map +1 -1
- package/lib/PopupMenu.js +24 -28
- package/lib/PopupMenu.js.map +1 -1
- package/lib/Rect.js +35 -41
- package/lib/Rect.js.map +1 -1
- package/lib/Types.js +2 -5
- package/lib/Types.js.map +1 -1
- package/lib/index.js +22 -38
- package/lib/index.js.map +1 -1
- package/lib/model/Action.js +3 -8
- package/lib/model/Action.js.map +1 -1
- package/lib/model/Actions.js +68 -75
- package/lib/model/Actions.js.map +1 -1
- package/lib/model/BorderNode.js +189 -206
- package/lib/model/BorderNode.js.map +1 -1
- package/lib/model/BorderSet.js +44 -55
- package/lib/model/BorderSet.js.map +1 -1
- package/lib/model/ICloseType.js +2 -5
- package/lib/model/ICloseType.js.map +1 -1
- package/lib/model/IDraggable.js +1 -2
- package/lib/model/IDropTarget.js +1 -2
- package/lib/model/IJsonModel.js +1 -2
- package/lib/model/Model.js +217 -232
- package/lib/model/Model.js.map +1 -1
- package/lib/model/Node.js +87 -94
- package/lib/model/Node.js.map +1 -1
- package/lib/model/RowNode.js +204 -250
- package/lib/model/RowNode.js.map +1 -1
- package/lib/model/SplitterNode.js +35 -57
- package/lib/model/SplitterNode.js.map +1 -1
- package/lib/model/TabNode.js +100 -124
- package/lib/model/TabNode.js.map +1 -1
- package/lib/model/TabSetNode.js +181 -197
- package/lib/model/TabSetNode.js.map +1 -1
- package/lib/model/Utils.js +20 -26
- package/lib/model/Utils.js.map +1 -1
- package/lib/view/BorderButton.js +45 -49
- package/lib/view/BorderButton.js.map +1 -1
- package/lib/view/BorderTabSet.js +57 -61
- package/lib/view/BorderTabSet.js.map +1 -1
- package/lib/view/ErrorBoundary.js +15 -37
- package/lib/view/ErrorBoundary.js.map +1 -1
- package/lib/view/FloatingWindow.js +43 -56
- package/lib/view/FloatingWindow.js.map +1 -1
- package/lib/view/FloatingWindowTab.js +12 -16
- package/lib/view/FloatingWindowTab.js.map +1 -1
- package/lib/view/Icons.js +17 -25
- package/lib/view/Icons.js.map +1 -1
- package/lib/view/Layout.js +396 -508
- package/lib/view/Layout.js.map +1 -1
- package/lib/view/Splitter.js +53 -57
- package/lib/view/Splitter.js.map +1 -1
- package/lib/view/Tab.js +31 -35
- package/lib/view/Tab.js.map +1 -1
- package/lib/view/TabButton.js +46 -50
- package/lib/view/TabButton.js.map +1 -1
- package/lib/view/TabButtonStamp.js +11 -15
- package/lib/view/TabButtonStamp.js.map +1 -1
- package/lib/view/TabFloating.js +30 -34
- package/lib/view/TabFloating.js.map +1 -1
- package/lib/view/TabOverflowHook.js +46 -50
- package/lib/view/TabOverflowHook.js.map +1 -1
- package/lib/view/TabSet.js +93 -106
- package/lib/view/TabSet.js.map +1 -1
- package/lib/view/Utils.js +11 -17
- package/lib/view/Utils.js.map +1 -1
- package/package.json +5 -3
- package/src/model/BorderNode.ts +6 -1
- package/src/model/TabSetNode.ts +6 -1
- package/src/view/FloatingWindow.tsx +5 -1
- package/src/view/Icons.tsx +7 -7
- package/src/view/Layout.tsx +23 -104
- package/style/dark.css +1 -0
- package/style/dark.css.map +1 -1
- package/style/dark.scss +1 -0
- package/style/gray.css +1 -0
- package/style/gray.css.map +1 -1
- package/style/gray.scss +1 -0
- package/style/light.css +1 -0
- package/style/light.css.map +1 -1
- package/style/light.scss +1 -0
- package/style/underline.css +1 -0
- package/style/underline.css.map +1 -1
- package/style/underline.scss +1 -0
|
@@ -1,46 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.ErrorBoundary = void 0;
|
|
19
|
-
var React = require("react");
|
|
20
|
-
var Types_1 = require("../Types");
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { CLASSES } from "../Types";
|
|
21
3
|
/** @internal */
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
_this.state = { hasError: false };
|
|
27
|
-
return _this;
|
|
4
|
+
export class ErrorBoundary extends React.Component {
|
|
5
|
+
constructor(props) {
|
|
6
|
+
super(props);
|
|
7
|
+
this.state = { hasError: false };
|
|
28
8
|
}
|
|
29
|
-
|
|
9
|
+
static getDerivedStateFromError(error) {
|
|
30
10
|
return { hasError: true };
|
|
31
|
-
}
|
|
32
|
-
|
|
11
|
+
}
|
|
12
|
+
componentDidCatch(error, errorInfo) {
|
|
33
13
|
console.debug(error);
|
|
34
14
|
console.debug(errorInfo);
|
|
35
|
-
}
|
|
36
|
-
|
|
15
|
+
}
|
|
16
|
+
render() {
|
|
37
17
|
if (this.state.hasError) {
|
|
38
|
-
return (React.createElement("div", { className:
|
|
39
|
-
React.createElement("div", { className:
|
|
18
|
+
return (React.createElement("div", { className: CLASSES.FLEXLAYOUT__ERROR_BOUNDARY_CONTAINER },
|
|
19
|
+
React.createElement("div", { className: CLASSES.FLEXLAYOUT__ERROR_BOUNDARY_CONTENT }, this.props.message)));
|
|
40
20
|
}
|
|
41
21
|
return this.props.children;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
}(React.Component));
|
|
45
|
-
exports.ErrorBoundary = ErrorBoundary;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
46
24
|
//# sourceMappingURL=ErrorBoundary.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorBoundary.js","sourceRoot":"","sources":["../../src/view/ErrorBoundary.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ErrorBoundary.js","sourceRoot":"","sources":["../../src/view/ErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAYnC,gBAAgB;AAChB,MAAM,OAAO,aAAc,SAAQ,KAAK,CAAC,SAAmD;IACxF,YAAY,KAA0B;QAClC,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IACrC,CAAC;IAED,MAAM,CAAC,wBAAwB,CAAC,KAAY;QACxC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC9B,CAAC;IAED,iBAAiB,CAAC,KAAY,EAAE,SAAoB;QAChD,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACrB,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAC7B,CAAC;IAED,MAAM;QACF,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;YACrB,OAAO,CACH,6BAAK,SAAS,EAAE,OAAO,CAAC,oCAAoC;gBACxD,6BAAK,SAAS,EAAE,OAAO,CAAC,kCAAkC,IAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAO,CACpF,CACT,CAAC;SACL;QAED,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC/B,CAAC;CACJ"}
|
|
@@ -1,30 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
if (ar || !(i in from)) {
|
|
5
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
6
|
-
ar[i] = from[i];
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.FloatingWindow = void 0;
|
|
13
|
-
var React = require("react");
|
|
14
|
-
var react_dom_1 = require("react-dom");
|
|
15
|
-
var Types_1 = require("../Types");
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { createPortal } from "react-dom";
|
|
3
|
+
import { CLASSES } from "../Types";
|
|
16
4
|
/** @internal */
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
React.
|
|
22
|
-
|
|
5
|
+
export const FloatingWindow = (props) => {
|
|
6
|
+
const { title, id, url, rect, onCloseWindow, onSetWindow, children } = props;
|
|
7
|
+
const popoutWindow = React.useRef(null);
|
|
8
|
+
const timerId = React.useRef(null);
|
|
9
|
+
const [content, setContent] = React.useState(undefined);
|
|
10
|
+
React.useLayoutEffect(() => {
|
|
11
|
+
if (timerId.current) {
|
|
12
|
+
clearTimeout(timerId.current);
|
|
13
|
+
}
|
|
14
|
+
const r = rect;
|
|
23
15
|
// Make a local copy of the styles from the current window which will be passed into
|
|
24
16
|
// the floating window. window.document.styleSheets is mutable and we can't guarantee
|
|
25
17
|
// the styles will exist when 'popoutWindow.load' is called below.
|
|
26
|
-
|
|
27
|
-
|
|
18
|
+
const styles = Array.from(window.document.styleSheets).reduce((result, styleSheet) => {
|
|
19
|
+
let rules = undefined;
|
|
28
20
|
try {
|
|
29
21
|
rules = styleSheet.cssRules;
|
|
30
22
|
}
|
|
@@ -32,50 +24,51 @@ var FloatingWindow = function (props) {
|
|
|
32
24
|
// styleSheet.cssRules can throw security exception
|
|
33
25
|
}
|
|
34
26
|
try {
|
|
35
|
-
return
|
|
27
|
+
return [
|
|
28
|
+
...result,
|
|
36
29
|
{
|
|
37
30
|
href: styleSheet.href,
|
|
38
31
|
type: styleSheet.type,
|
|
39
|
-
rules: rules ? Array.from(rules).map(
|
|
32
|
+
rules: rules ? Array.from(rules).map(rule => rule.cssText) : null,
|
|
40
33
|
}
|
|
41
|
-
]
|
|
34
|
+
];
|
|
42
35
|
}
|
|
43
36
|
catch (e) {
|
|
44
37
|
return result;
|
|
45
38
|
}
|
|
46
39
|
}, []);
|
|
47
|
-
popoutWindow.current = window.open(url, id,
|
|
40
|
+
popoutWindow.current = window.open(url, id, `left=${r.x},top=${r.y},width=${r.width},height=${r.height}`);
|
|
48
41
|
if (popoutWindow.current !== null) {
|
|
49
42
|
onSetWindow(id, popoutWindow.current);
|
|
50
43
|
// listen for parent unloading to remove all popouts
|
|
51
|
-
window.addEventListener("beforeunload",
|
|
44
|
+
window.addEventListener("beforeunload", () => {
|
|
52
45
|
if (popoutWindow.current) {
|
|
53
46
|
popoutWindow.current.close();
|
|
54
47
|
popoutWindow.current = null;
|
|
55
48
|
}
|
|
56
49
|
});
|
|
57
|
-
popoutWindow.current.addEventListener("load",
|
|
58
|
-
|
|
50
|
+
popoutWindow.current.addEventListener("load", () => {
|
|
51
|
+
const popoutDocument = popoutWindow.current.document;
|
|
59
52
|
popoutDocument.title = title;
|
|
60
|
-
|
|
61
|
-
popoutContent.className =
|
|
53
|
+
const popoutContent = popoutDocument.createElement("div");
|
|
54
|
+
popoutContent.className = CLASSES.FLEXLAYOUT__FLOATING_WINDOW_CONTENT;
|
|
62
55
|
popoutDocument.body.appendChild(popoutContent);
|
|
63
|
-
copyStyles(popoutDocument, styles).then(
|
|
56
|
+
copyStyles(popoutDocument, styles).then(() => {
|
|
64
57
|
setContent(popoutContent);
|
|
65
58
|
});
|
|
66
59
|
// listen for popout unloading (needs to be after load for safari)
|
|
67
|
-
popoutWindow.current.addEventListener("beforeunload",
|
|
60
|
+
popoutWindow.current.addEventListener("beforeunload", () => {
|
|
68
61
|
onCloseWindow(id);
|
|
69
62
|
});
|
|
70
63
|
});
|
|
71
64
|
}
|
|
72
65
|
else {
|
|
73
|
-
console.warn(
|
|
66
|
+
console.warn(`Unable to open window ${url}`);
|
|
74
67
|
onCloseWindow(id);
|
|
75
68
|
}
|
|
76
|
-
return
|
|
69
|
+
return () => {
|
|
77
70
|
// delay so refresh will close window
|
|
78
|
-
setTimeout(
|
|
71
|
+
timerId.current = setTimeout(() => {
|
|
79
72
|
if (popoutWindow.current) {
|
|
80
73
|
popoutWindow.current.close();
|
|
81
74
|
popoutWindow.current = null;
|
|
@@ -84,43 +77,37 @@ var FloatingWindow = function (props) {
|
|
|
84
77
|
};
|
|
85
78
|
}, []);
|
|
86
79
|
if (content !== undefined) {
|
|
87
|
-
return
|
|
80
|
+
return createPortal(children, content);
|
|
88
81
|
}
|
|
89
82
|
else {
|
|
90
83
|
return null;
|
|
91
84
|
}
|
|
92
85
|
};
|
|
93
|
-
exports.FloatingWindow = FloatingWindow;
|
|
94
86
|
/** @internal */
|
|
95
87
|
function copyStyles(doc, styleSheets) {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
88
|
+
const head = doc.head;
|
|
89
|
+
const promises = [];
|
|
90
|
+
for (const styleSheet of styleSheets) {
|
|
99
91
|
if (styleSheet.href) {
|
|
100
92
|
// prefer links since they will keep paths to images etc
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
head.appendChild(
|
|
106
|
-
promises.push(new Promise(
|
|
107
|
-
|
|
93
|
+
const styleElement = doc.createElement("link");
|
|
94
|
+
styleElement.type = styleSheet.type;
|
|
95
|
+
styleElement.rel = "stylesheet";
|
|
96
|
+
styleElement.href = styleSheet.href;
|
|
97
|
+
head.appendChild(styleElement);
|
|
98
|
+
promises.push(new Promise((resolve, reject) => {
|
|
99
|
+
styleElement.onload = () => resolve(true);
|
|
108
100
|
}));
|
|
109
101
|
}
|
|
110
102
|
else {
|
|
111
103
|
if (styleSheet.rules) {
|
|
112
|
-
|
|
113
|
-
for (
|
|
114
|
-
var rule = _b[_a];
|
|
104
|
+
const style = doc.createElement("style");
|
|
105
|
+
for (const rule of styleSheet.rules) {
|
|
115
106
|
style.appendChild(doc.createTextNode(rule));
|
|
116
107
|
}
|
|
117
108
|
head.appendChild(style);
|
|
118
109
|
}
|
|
119
110
|
}
|
|
120
|
-
};
|
|
121
|
-
for (var _i = 0, styleSheets_1 = styleSheets; _i < styleSheets_1.length; _i++) {
|
|
122
|
-
var styleSheet = styleSheets_1[_i];
|
|
123
|
-
_loop_1(styleSheet);
|
|
124
111
|
}
|
|
125
112
|
return Promise.all(promises);
|
|
126
113
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FloatingWindow.js","sourceRoot":"","sources":["../../src/view/FloatingWindow.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FloatingWindow.js","sourceRoot":"","sources":["../../src/view/FloatingWindow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAkBnC,gBAAgB;AAChB,MAAM,CAAC,MAAM,cAAc,GAAG,CAA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G,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAC9C,CAAC,CAAC,CACL,CAAC;SACL;aAAM;YACH,IAAI,UAAU,CAAC,KAAK,EAAE;gBAClB,MAAM,KAAK,GAAG,GAAG,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;gBACzC,KAAK,MAAM,IAAI,IAAI,UAAU,CAAC,KAAK,EAAE;oBACjC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC;iBAC/C;gBACD,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;aAC3B;SACJ;KACJ;IACD,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACjC,CAAC"}
|
|
@@ -1,19 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var I18nLabel_1 = require("../I18nLabel");
|
|
7
|
-
var react_1 = require("react");
|
|
8
|
-
var Types_1 = require("../Types");
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { ErrorBoundary } from "./ErrorBoundary";
|
|
3
|
+
import { I18nLabel } from "../I18nLabel";
|
|
4
|
+
import { Fragment } from "react";
|
|
5
|
+
import { CLASSES } from "../Types";
|
|
9
6
|
/** @internal */
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return (React.createElement("div", { className: cm(
|
|
15
|
-
React.createElement(
|
|
16
|
-
React.createElement(
|
|
7
|
+
export const FloatingWindowTab = (props) => {
|
|
8
|
+
const { layout, node, factory } = props;
|
|
9
|
+
const cm = layout.getClassName;
|
|
10
|
+
const child = factory(node);
|
|
11
|
+
return (React.createElement("div", { className: cm(CLASSES.FLEXLAYOUT__FLOATING_WINDOW_TAB) },
|
|
12
|
+
React.createElement(ErrorBoundary, { message: props.layout.i18nName(I18nLabel.Error_rendering_component) },
|
|
13
|
+
React.createElement(Fragment, null, child))));
|
|
17
14
|
};
|
|
18
|
-
exports.FloatingWindowTab = FloatingWindowTab;
|
|
19
15
|
//# sourceMappingURL=FloatingWindowTab.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FloatingWindowTab.js","sourceRoot":"","sources":["../../src/view/FloatingWindowTab.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FloatingWindowTab.js","sourceRoot":"","sources":["../../src/view/FloatingWindowTab.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AASnC,gBAAgB;AAChB,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAA8B,EAAE,EAAE;IAChE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IACxC,MAAM,EAAE,GAAG,MAAM,CAAC,YAAY,CAAC;IAC/B,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE5B,OAAO,CACH,6BAAK,SAAS,EAAE,EAAE,CAAC,OAAO,CAAC,+BAA+B,CAAC;QACvD,oBAAC,aAAa,IAAC,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,yBAAyB,CAAC;YAC9E,oBAAC,QAAQ,QAAE,KAAK,CAAY,CAChB,CACd,CACT,CAAC;AACN,CAAC,CAAC"}
|
package/lib/view/Icons.js
CHANGED
|
@@ -1,41 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var React = require("react");
|
|
5
|
-
var style = { width: "1em", height: "1em", display: "flex", alignItems: "center" };
|
|
6
|
-
var CloseIcon = function () {
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
const style = { width: "1em", height: "1em", display: "flex", alignItems: "center" };
|
|
3
|
+
export const CloseIcon = () => {
|
|
7
4
|
return (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", style: style, viewBox: "0 0 24 24" },
|
|
8
5
|
React.createElement("path", { fill: "none", d: "M0 0h24v24H0z" }),
|
|
9
|
-
React.createElement("path", { stroke: "
|
|
6
|
+
React.createElement("path", { stroke: "var(--color-icon)", fill: "var(--color-icon)", d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" })));
|
|
10
7
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", style: style, viewBox: "0 0 24 24", fill: "gray" },
|
|
8
|
+
export const MaximizeIcon = () => {
|
|
9
|
+
return (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", style: style, viewBox: "0 0 24 24", fill: "var(--color-icon)" },
|
|
14
10
|
React.createElement("path", { d: "M0 0h24v24H0z", fill: "none" }),
|
|
15
|
-
React.createElement("path", { stroke: "
|
|
11
|
+
React.createElement("path", { stroke: "var(--color-icon)", d: "M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z" })));
|
|
16
12
|
};
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", style: style, viewBox: "0 0 24 24", fill: "gray" },
|
|
13
|
+
export const OverflowIcon = () => {
|
|
14
|
+
return (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", style: style, viewBox: "0 0 24 24", fill: "var(--color-icon)" },
|
|
20
15
|
React.createElement("path", { d: "M0 0h24v24H0z", fill: "none" }),
|
|
21
|
-
React.createElement("path", { stroke: "
|
|
16
|
+
React.createElement("path", { stroke: "var(--color-icon)", d: "M7 10l5 5 5-5z" })));
|
|
22
17
|
};
|
|
23
|
-
|
|
24
|
-
var PopoutIcon = function () {
|
|
18
|
+
export const PopoutIcon = () => {
|
|
25
19
|
return (
|
|
26
|
-
// <svg xmlns="http://www.w3.org/2000/svg" style={style} viewBox="0 0 24 24" fill="
|
|
27
|
-
// <svg xmlns="http://www.w3.org/2000/svg" style={style} fill="none" viewBox="0 0 24 24" stroke="
|
|
20
|
+
// <svg xmlns="http://www.w3.org/2000/svg" style={style} viewBox="0 0 24 24" fill="var(--color-icon)"><path d="M0 0h24v24H0z" fill="none"/><path stroke="var(--color-icon)" d="M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5z"/></svg>
|
|
21
|
+
// <svg xmlns="http://www.w3.org/2000/svg" style={style} fill="none" viewBox="0 0 24 24" stroke="var(--color-icon)" stroke-width="2">
|
|
28
22
|
// <path stroke-linecap="round" stroke-linejoin="round" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14" />
|
|
29
23
|
// </svg>
|
|
30
|
-
React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", style: style, viewBox: "0 0 20 20", fill: "
|
|
24
|
+
React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", style: style, viewBox: "0 0 20 20", fill: "var(--color-icon)" },
|
|
31
25
|
React.createElement("path", { d: "M11 3a1 1 0 100 2h2.586l-6.293 6.293a1 1 0 101.414 1.414L15 6.414V9a1 1 0 102 0V4a1 1 0 00-1-1h-5z" }),
|
|
32
26
|
React.createElement("path", { d: "M5 5a2 2 0 00-2 2v8a2 2 0 002 2h8a2 2 0 002-2v-3a1 1 0 10-2 0v3H5V7h3a1 1 0 000-2H5z" })));
|
|
33
27
|
};
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
return (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", style: style, viewBox: "0 0 24 24", fill: "gray" },
|
|
28
|
+
export const RestoreIcon = () => {
|
|
29
|
+
return (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", style: style, viewBox: "0 0 24 24", fill: "var(--color-icon)" },
|
|
37
30
|
React.createElement("path", { d: "M0 0h24v24H0z", fill: "none" }),
|
|
38
|
-
React.createElement("path", { stroke: "
|
|
31
|
+
React.createElement("path", { stroke: "var(--color-icon)", d: "M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z" })));
|
|
39
32
|
};
|
|
40
|
-
exports.RestoreIcon = RestoreIcon;
|
|
41
33
|
//# sourceMappingURL=Icons.js.map
|
package/lib/view/Icons.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icons.js","sourceRoot":"","sources":["../../src/view/Icons.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Icons.js","sourceRoot":"","sources":["../../src/view/Icons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,KAAK,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC;AAErF,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,EAAE;IAC1B,OAAO,CACH,6BAAK,KAAK,EAAC,4BAA4B,EAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAC,WAAW;QACrE,8BAAM,IAAI,EAAC,MAAM,EAAC,CAAC,EAAC,eAAe,GAAG;QACtC,8BAAM,MAAM,EAAC,mBAAmB,EAAC,IAAI,EAAC,mBAAmB,EAAC,CAAC,EAAC,uGAAuG,GAAG,CACpK,CACT,CAAC;AACN,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,EAAE;IAC7B,OAAO,CACH,6BAAK,KAAK,EAAC,4BAA4B,EAAC,KAAK,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