@raketa-builder/builder 0.9.0 → 0.10.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/.turbo/turbo-build.log
CHANGED
package/.turbo/turbo-lint.log
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
$ TIMING=1 eslint "**/*.js"
|
|
2
2
|
Rule | Time (ms) | Relative
|
|
3
3
|
:---------------------------------|----------:|--------:
|
|
4
|
-
react/
|
|
5
|
-
react/
|
|
6
|
-
react/require-render-return |
|
|
7
|
-
react/no-deprecated |
|
|
8
|
-
react
|
|
9
|
-
react/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
react/no-
|
|
13
|
-
react/
|
|
4
|
+
react/display-name | 86.473 | 28.1%
|
|
5
|
+
react/no-direct-mutation-state | 79.777 | 25.9%
|
|
6
|
+
react/require-render-return | 61.222 | 19.9%
|
|
7
|
+
react/no-deprecated | 15.966 | 5.2%
|
|
8
|
+
react/no-string-refs | 9.252 | 3.0%
|
|
9
|
+
react-hooks/rules-of-hooks | 8.985 | 2.9%
|
|
10
|
+
jsx-a11y/role-supports-aria-props | 4.664 | 1.5%
|
|
11
|
+
react/no-unescaped-entities | 4.425 | 1.4%
|
|
12
|
+
react/jsx-no-comment-textnodes | 4.237 | 1.4%
|
|
13
|
+
react-hooks/exhaustive-deps | 4.217 | 1.4%
|
package/package.json
CHANGED
package/src/lib/AdminWidget.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* eslint-disable no-undef */
|
|
2
2
|
import React from "react";
|
|
3
|
-
import styled from "styled-components";
|
|
4
3
|
import AdminWidgetWrapper from "./AdminWidgetWrapper";
|
|
5
4
|
import AdminWidgetToolbar from "./AdminWidgetToolbar";
|
|
5
|
+
import AdminWidgetLabel from "./AdminWidgetLabel";
|
|
6
6
|
import IconButton from "./IconButton";
|
|
7
7
|
import widgetData from "../helpers/widgetData";
|
|
8
8
|
|
|
@@ -62,6 +62,10 @@ const AdminWidget = ({
|
|
|
62
62
|
)}
|
|
63
63
|
</AdminWidgetToolbar>
|
|
64
64
|
|
|
65
|
+
<AdminWidgetLabel data-widget-label>
|
|
66
|
+
{widgetData.title(currentAdminWidget)}
|
|
67
|
+
</AdminWidgetLabel>
|
|
68
|
+
|
|
65
69
|
{React.createElement(currentWidget, widget.settings)}
|
|
66
70
|
</AdminWidgetWrapper>
|
|
67
71
|
);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { reset } from "@raketa-builder/ui";
|
|
3
|
+
|
|
4
|
+
const AdminWidgetLabel = styled.div`
|
|
5
|
+
${reset};
|
|
6
|
+
position: absolute;
|
|
7
|
+
top: ${(props) => props.theme.font.base};
|
|
8
|
+
right: ${(props) => props.theme.font.base};
|
|
9
|
+
z-index: 9;
|
|
10
|
+
display: none;
|
|
11
|
+
padding: 4px 12px;
|
|
12
|
+
border-radius: 16px;
|
|
13
|
+
background-color: rgba(64, 64, 64, 0.8);
|
|
14
|
+
color: ${(props) => props.theme.colors.trueWhite};
|
|
15
|
+
font-size: ${(props) => props.theme.font.small};
|
|
16
|
+
backdrop-filter: blur(4px);
|
|
17
|
+
`;
|
|
18
|
+
|
|
19
|
+
export default AdminWidgetLabel;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import AdminWidgetWrapper from "./AdminWidgetWrapper";
|
|
4
4
|
import AdminWidgetToolbar from "./AdminWidgetToolbar";
|
|
5
|
+
import AdminWidgetLabel from "./AdminWidgetLabel";
|
|
5
6
|
import IconButton from "./IconButton";
|
|
6
7
|
import widgetData from "../helpers/widgetData";
|
|
7
8
|
|
|
@@ -35,6 +36,10 @@ const AdminWidgetMinimal = ({ library, adminLibrary, identifier, widget }) => {
|
|
|
35
36
|
)}
|
|
36
37
|
</AdminWidgetToolbar>
|
|
37
38
|
|
|
39
|
+
<AdminWidgetLabel data-widget-label>
|
|
40
|
+
{widgetData.title(currentAdminWidget)}
|
|
41
|
+
</AdminWidgetLabel>
|
|
42
|
+
|
|
38
43
|
{React.createElement(currentWidget, widget.settings)}
|
|
39
44
|
</AdminWidgetWrapper>
|
|
40
45
|
);
|
|
@@ -2,11 +2,12 @@ import styled from "styled-components";
|
|
|
2
2
|
|
|
3
3
|
const AdminWidgetWrapper = styled.div`
|
|
4
4
|
${(props) => `
|
|
5
|
-
|
|
5
|
+
&:hover {
|
|
6
6
|
position: relative;
|
|
7
7
|
outline: 1px dashed ${props.theme.colors.gray};
|
|
8
8
|
|
|
9
9
|
& > div[data-toolbar] { display: flex; }
|
|
10
|
+
& > div[data-widget-label] { display: block; }
|
|
10
11
|
}
|
|
11
12
|
`}
|
|
12
13
|
`;
|