@linzjs/windows 2.2.0 → 2.3.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/dist/panel/Panel.scss
CHANGED
|
@@ -9,11 +9,12 @@ export interface PanelHeaderProps {
|
|
|
9
9
|
icon?: LuiIconName;
|
|
10
10
|
extraLeft?: ReactNode;
|
|
11
11
|
extraRight?: ReactNode;
|
|
12
|
+
helpUrl?: string;
|
|
12
13
|
onHelpClick?: () => void;
|
|
13
14
|
dockTo?: string;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
|
-
export const PanelHeader = ({ icon, extraLeft, extraRight, onHelpClick, dockTo }: PanelHeaderProps) => {
|
|
17
|
+
export const PanelHeader = ({ icon, extraLeft, extraRight, helpUrl, onHelpClick, dockTo }: PanelHeaderProps) => {
|
|
17
18
|
const { panelClose, panelTogglePopout, panelPoppedOut, title, dock, undock, docked } =
|
|
18
19
|
useContext(PanelInstanceContext);
|
|
19
20
|
const [cursor, setCursor] = useState<"grab" | "grabbing">("grab");
|
|
@@ -37,7 +38,9 @@ export const PanelHeader = ({ icon, extraLeft, extraRight, onHelpClick, dockTo }
|
|
|
37
38
|
<div className={"WindowPanel-children"}>{extraLeft}</div>
|
|
38
39
|
<div className={"WindowPanel-buttons"}>
|
|
39
40
|
{extraRight}
|
|
40
|
-
{
|
|
41
|
+
{(helpUrl || onHelpClick) && (
|
|
42
|
+
<PanelHeaderButton aria-label={"Help"} href={helpUrl} onClick={onHelpClick} icon={"ic_help_outline"} />
|
|
43
|
+
)}
|
|
41
44
|
</div>
|
|
42
45
|
<div className={"WindowPanel-divider-right"} />
|
|
43
46
|
<div className={"WindowPanel-buttons"}>
|
|
@@ -3,16 +3,19 @@ import { LuiIconName } from "@linzjs/lui/dist/assets/svg-content";
|
|
|
3
3
|
|
|
4
4
|
export interface PanelHeaderButtonProps {
|
|
5
5
|
"aria-label": string;
|
|
6
|
+
href?: string;
|
|
6
7
|
icon: LuiIconName;
|
|
7
|
-
onClick
|
|
8
|
+
onClick?: () => void;
|
|
8
9
|
}
|
|
9
10
|
|
|
10
|
-
export const PanelHeaderButton = ({ "aria-label": ariaLabel, icon, onClick }: PanelHeaderButtonProps) => (
|
|
11
|
+
export const PanelHeaderButton = ({ "aria-label": ariaLabel, href, icon, onClick }: PanelHeaderButtonProps) => (
|
|
11
12
|
<LuiButton
|
|
12
13
|
level={"plain-text"}
|
|
13
14
|
className={"lui-button-icon-only"}
|
|
14
15
|
size={"sm"}
|
|
16
|
+
href={href}
|
|
15
17
|
onClick={onClick}
|
|
18
|
+
openInNewTab={!!href}
|
|
16
19
|
buttonProps={{
|
|
17
20
|
onTouchStart: onClick,
|
|
18
21
|
}}
|
package/package.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"popout"
|
|
14
14
|
],
|
|
15
15
|
"main": "./dist/index.ts",
|
|
16
|
-
"version": "2.
|
|
16
|
+
"version": "2.3.0",
|
|
17
17
|
"peerDependencies": {
|
|
18
18
|
"@linzjs/lui": "^21",
|
|
19
19
|
"lodash-es": ">=4",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
|
|
62
62
|
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
|
|
63
|
-
"@linzjs/step-ag-grid": "^
|
|
63
|
+
"@linzjs/step-ag-grid": "^19.1.0",
|
|
64
64
|
"@rollup/plugin-commonjs": "^25.0.4",
|
|
65
65
|
"@rollup/plugin-json": "^6.0.0",
|
|
66
66
|
"@rollup/plugin-node-resolve": "^15.2.1",
|