linear-react-components-ui 0.4.76-beta.13 → 0.4.76-beta.14
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/lib/assets/styles/panel.scss +1 -5
- package/lib/assets/styles/tabs.scss +49 -44
- package/lib/panel/Content.js +4 -11
- package/lib/tabs/Menu.js +1 -11
- package/lib/tabs/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
@import 'colors.scss';
|
|
2
|
-
|
|
3
|
-
$panel-header-height: 40px;
|
|
4
2
|
.panel-component {
|
|
5
3
|
font-family: 'Roboto';
|
|
6
4
|
border: 0;
|
|
@@ -8,8 +6,6 @@ $panel-header-height: 40px;
|
|
|
8
6
|
height: 100%;
|
|
9
7
|
margin-bottom: 20px;
|
|
10
8
|
border: solid 1px $component-border-color;
|
|
11
|
-
display: flex;
|
|
12
|
-
flex-direction: column;
|
|
13
9
|
&.panel-shadow {
|
|
14
10
|
box-shadow: 0 2px 5px 0 rgba(0,0,0,.16), 0 2px 10px 0 rgba(0,0,0,.12);
|
|
15
11
|
}
|
|
@@ -51,7 +47,7 @@ $panel-header-height: 40px;
|
|
|
51
47
|
}
|
|
52
48
|
}
|
|
53
49
|
> .panel-content {
|
|
54
|
-
height:
|
|
50
|
+
height: auto;
|
|
55
51
|
padding: 15px;
|
|
56
52
|
}
|
|
57
53
|
}
|
|
@@ -48,7 +48,6 @@
|
|
|
48
48
|
margin-right: 1px;
|
|
49
49
|
padding: 0;
|
|
50
50
|
width: auto;
|
|
51
|
-
min-width: 100px;
|
|
52
51
|
display: flex;
|
|
53
52
|
justify-content: space-between;
|
|
54
53
|
align-items: center;
|
|
@@ -122,24 +121,26 @@
|
|
|
122
121
|
.tabs-component.menu-left {
|
|
123
122
|
grid-template-columns: auto 1fr;
|
|
124
123
|
grid-template-rows: none;
|
|
125
|
-
> .
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
124
|
+
> .menucontainer {
|
|
125
|
+
> .menu {
|
|
126
|
+
box-shadow: -1px 0px 0px 0px $component-border-color inset;
|
|
127
|
+
flex-direction: column;
|
|
128
|
+
justify-content: center;
|
|
129
|
+
}
|
|
130
|
+
> .menu > .menuitem {
|
|
131
|
+
border-radius: 5px 0px 0px 5px;
|
|
132
|
+
-moz-border-radius: 5px 0px 0px 5px;
|
|
133
|
+
-webkit-border-radius: 5px 0px 0px 5px;
|
|
134
|
+
&.selected {
|
|
135
|
+
border: 1px solid $component-border-color;
|
|
136
|
+
border-right: 1px solid $font-color-second;
|
|
137
|
+
border-left: 2px solid $component-selected-color;
|
|
138
|
+
width: 100%;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
> .menu > .menuitem > .closepanel {
|
|
142
|
+
float: left;
|
|
139
143
|
}
|
|
140
|
-
}
|
|
141
|
-
> .menu > .menuitem > .closepanel {
|
|
142
|
-
float: left;
|
|
143
144
|
}
|
|
144
145
|
> .panel {
|
|
145
146
|
border-top: 1px solid $component-border-color;
|
|
@@ -152,18 +153,20 @@
|
|
|
152
153
|
*/
|
|
153
154
|
.tabs-component.menu-bottom {
|
|
154
155
|
grid-template-rows: 1fr auto;
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
156
|
+
.menucontainer {
|
|
157
|
+
> .menu {
|
|
158
|
+
box-shadow: 0 1px 1px 0px $component-border-color inset;
|
|
159
|
+
}
|
|
160
|
+
> .menu > .menuitem {
|
|
161
|
+
border-radius: 0px 0px 5px 5px;
|
|
162
|
+
-moz-border-radius: 0px 0px 5px 5px;
|
|
163
|
+
-webkit-border-radius: 0px 0px 5px 5px;
|
|
164
|
+
&.selected {
|
|
165
|
+
border: 1px solid $component-border-color;
|
|
166
|
+
border-top: 1px solid $font-color-second;
|
|
167
|
+
border-bottom: 2px solid $component-selected-color;
|
|
168
|
+
height: 100%;
|
|
169
|
+
}
|
|
167
170
|
}
|
|
168
171
|
}
|
|
169
172
|
> .panel {
|
|
@@ -178,20 +181,22 @@
|
|
|
178
181
|
.tabs-component.menu-right {
|
|
179
182
|
grid-template-columns: 1fr auto;
|
|
180
183
|
grid-template-rows: none;
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
184
|
+
.menucontainer{
|
|
185
|
+
> .menu {
|
|
186
|
+
box-shadow: 2px 0 0px -1px $component-border-color inset;
|
|
187
|
+
flex-direction: column;
|
|
188
|
+
justify-content: center;
|
|
189
|
+
}
|
|
190
|
+
> .menu > .menuitem {
|
|
191
|
+
border-radius: 0px 5px 5px 0px;
|
|
192
|
+
-moz-border-radius: 0px 5px 5px 0px;
|
|
193
|
+
-webkit-border-radius: 0px 5px 5px 0px;
|
|
194
|
+
&.selected {
|
|
195
|
+
border: 1px solid $component-border-color;
|
|
196
|
+
border-left: 1px solid $font-color-second;
|
|
197
|
+
border-right: 2px solid $component-selected-color;
|
|
198
|
+
width: 100%;
|
|
199
|
+
}
|
|
195
200
|
}
|
|
196
201
|
}
|
|
197
202
|
> .panel {
|
package/lib/panel/Content.js
CHANGED
|
@@ -21,15 +21,12 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
21
21
|
|
|
22
22
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
23
|
|
|
24
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
25
|
-
|
|
26
24
|
var observer = null;
|
|
27
25
|
|
|
28
26
|
var PanelContent = function PanelContent(props) {
|
|
29
27
|
var customClass = props.customClass,
|
|
30
28
|
children = props.children,
|
|
31
|
-
style = props.style
|
|
32
|
-
overflow = props.overflow;
|
|
29
|
+
style = props.style;
|
|
33
30
|
|
|
34
31
|
var _useContext = (0, _react.useContext)(_helpers["default"]),
|
|
35
32
|
opened = _useContext.opened,
|
|
@@ -74,9 +71,7 @@ var PanelContent = function PanelContent(props) {
|
|
|
74
71
|
return hideContent ? /*#__PURE__*/_react["default"].createElement(_noPermission["default"], null) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
75
72
|
ref: rootElementRef,
|
|
76
73
|
className: "panel-content ".concat(customClass),
|
|
77
|
-
style:
|
|
78
|
-
overflow: overflow
|
|
79
|
-
})
|
|
74
|
+
style: style
|
|
80
75
|
}, opened && children, onEndReached ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
81
76
|
ref: observedElement
|
|
82
77
|
}) : /*#__PURE__*/_react["default"].createElement("noscript", null));
|
|
@@ -85,14 +80,12 @@ var PanelContent = function PanelContent(props) {
|
|
|
85
80
|
PanelContent.propTypes = {
|
|
86
81
|
children: _propTypes["default"].any,
|
|
87
82
|
customClass: _propTypes["default"].string,
|
|
88
|
-
style: _propTypes["default"].object
|
|
89
|
-
overflow: _propTypes["default"].oneOf(['visible', 'hidden', 'scroll', 'auto'])
|
|
83
|
+
style: _propTypes["default"].object
|
|
90
84
|
};
|
|
91
85
|
PanelContent.defaultProps = {
|
|
92
86
|
customClass: '',
|
|
93
87
|
style: {},
|
|
94
|
-
children: null
|
|
95
|
-
overflow: 'auto'
|
|
88
|
+
children: null
|
|
96
89
|
};
|
|
97
90
|
var _default = PanelContent;
|
|
98
91
|
exports["default"] = _default;
|
package/lib/tabs/Menu.js
CHANGED
|
@@ -20,22 +20,12 @@ var Menu = function Menu(props) {
|
|
|
20
20
|
customClassForToolBar = props.customClassForToolBar,
|
|
21
21
|
menuRef = props.menuRef,
|
|
22
22
|
toolBarRef = props.toolBarRef;
|
|
23
|
-
|
|
24
|
-
if (!toolbar) {
|
|
25
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
26
|
-
className: "menucontainer",
|
|
27
|
-
ref: function ref(r) {
|
|
28
|
-
menuRef(r);
|
|
29
|
-
}
|
|
30
|
-
}, /*#__PURE__*/_react["default"].createElement(_MenuItems["default"], props), /*#__PURE__*/_react["default"].createElement(_DropdownItems["default"], props));
|
|
31
|
-
}
|
|
32
|
-
|
|
33
23
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
34
24
|
className: "menucontainer",
|
|
35
25
|
ref: function ref(r) {
|
|
36
26
|
menuRef(r);
|
|
37
27
|
}
|
|
38
|
-
}, /*#__PURE__*/_react["default"].createElement(_MenuItems["default"], props), /*#__PURE__*/_react["default"].createElement(_DropdownItems["default"], props), /*#__PURE__*/_react["default"].cloneElement(toolbar, {
|
|
28
|
+
}, /*#__PURE__*/_react["default"].createElement(_MenuItems["default"], props), /*#__PURE__*/_react["default"].createElement(_DropdownItems["default"], props), toolbar && /*#__PURE__*/_react["default"].cloneElement(toolbar, {
|
|
39
29
|
customClass: "menubar ".concat(customClassForToolBar),
|
|
40
30
|
innerRef: toolBarRef ? function (r) {
|
|
41
31
|
toolBarRef(r);
|
package/lib/tabs/index.js
CHANGED
|
@@ -254,7 +254,7 @@ var Tabs = function Tabs(props) {
|
|
|
254
254
|
return function () {
|
|
255
255
|
return window.removeEventListener('resize', onResize);
|
|
256
256
|
};
|
|
257
|
-
}, [_menuRef.current]);
|
|
257
|
+
}, [_menuRef.current, tabMenuPosition]);
|
|
258
258
|
(0, _react.useEffect)(function () {
|
|
259
259
|
if (selectedTab) setSelectedTabId(selectedTab);
|
|
260
260
|
if (children) setPanels((0, _tabHelpers.buildPanels)(children));
|