@linzjs/windows 2.1.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.
@@ -33,7 +33,7 @@ export const LuiModalAsync = ({
33
33
  // The only way to create a modal dialog is to call showModal, open attribute will not work
34
34
  useEffect(() => {
35
35
  // Check if it's open already to support .vite hot deploys
36
- !dialogRef.current?.open && dialogRef.current?.showModal();
36
+ !dialogRef.current?.open && dialogRef.current?.showModal?.();
37
37
  }, []);
38
38
 
39
39
  useEffect(() => {
@@ -91,7 +91,8 @@
91
91
  display: flex;
92
92
  align-items: center;
93
93
 
94
- button.lui-button {
94
+ a.lui-button,
95
+ button.lui-button {
95
96
  display: flex;
96
97
  align-items: center;
97
98
 
@@ -117,4 +118,4 @@
117
118
  flex: 1;
118
119
  overflow: auto;
119
120
  display: flex;
120
- }
121
+ }
@@ -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
- {onHelpClick && <PanelHeaderButton aria-label={"Help"} onClick={onHelpClick} icon={"ic_help_outline"} />}
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: () => void;
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,9 +13,9 @@
13
13
  "popout"
14
14
  ],
15
15
  "main": "./dist/index.ts",
16
- "version": "2.1.0",
16
+ "version": "2.3.0",
17
17
  "peerDependencies": {
18
- "@linzjs/lui": "^18",
18
+ "@linzjs/lui": "^21",
19
19
  "lodash-es": ">=4",
20
20
  "react": ">=17",
21
21
  "react-dom": ">=17"
@@ -49,7 +49,7 @@
49
49
  "@emotion/cache": "^11.11.0",
50
50
  "@emotion/react": "^11.11.1",
51
51
  "@emotion/styled": "^11.11.0",
52
- "@linzjs/lui": "^20.0.3",
52
+ "@linzjs/lui": "^21",
53
53
  "lodash-es": ">=4",
54
54
  "react": ">=18",
55
55
  "react-dom": ">=18",
@@ -60,22 +60,22 @@
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": "^17.6.1",
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",
67
- "@storybook/addon-docs": "^7.4.5",
68
- "@storybook/addon-essentials": "^7.4.5",
69
- "@storybook/addon-interactions": "^7.4.5",
70
- "@storybook/addon-links": "^7.4.5",
71
- "@storybook/addon-mdx-gfm": "^7.4.5",
72
- "@storybook/blocks": "^7.4.5",
73
- "@storybook/jest": "^0.2.2",
74
- "@storybook/preset-create-react-app": "^7.4.5",
75
- "@storybook/react": "^7.4.5",
76
- "@storybook/react-vite": "^7.4.5",
77
- "@storybook/test-runner": "^0.13.0",
78
- "@storybook/testing-library": "^0.2.1",
67
+ "@storybook/addon-docs": "^7.6.4",
68
+ "@storybook/addon-essentials": "^7.6.4",
69
+ "@storybook/addon-interactions": "^7.6.4",
70
+ "@storybook/addon-links": "^7.6.4",
71
+ "@storybook/addon-mdx-gfm": "^7.6.4",
72
+ "@storybook/blocks": "^7.6.4",
73
+ "@storybook/jest": "^0.2.3",
74
+ "@storybook/preset-create-react-app": "^7.6.4",
75
+ "@storybook/react": "^7.6.4",
76
+ "@storybook/react-vite": "^7.6.4",
77
+ "@storybook/test-runner": "^0.16.0",
78
+ "@storybook/testing-library": "^0.2.2",
79
79
  "@testing-library/jest-dom": "^6.1.3",
80
80
  "@testing-library/react": "^14.0.0",
81
81
  "@testing-library/user-event": "^14.5.1",
@@ -88,6 +88,7 @@
88
88
  "@types/uuid": "^9.0.4",
89
89
  "ag-grid-community": "^29.3.5",
90
90
  "ag-grid-react": "^29.3.5",
91
+ "esbuild": "^0.19.9",
91
92
  "eslint": "^8.50.0",
92
93
  "eslint-config-prettier": "^8.10.0",
93
94
  "eslint-config-react-app": "^7.0.1",
@@ -98,7 +99,7 @@
98
99
  "eslint-plugin-prettier": "^4.2.1",
99
100
  "eslint-plugin-react": "^7.33.2",
100
101
  "eslint-plugin-react-hooks": "^4.6.0",
101
- "eslint-plugin-storybook": "^0.6.14",
102
+ "eslint-plugin-storybook": "^0.6.15",
102
103
  "eslint-plugin-testing-library": "^5.11.1",
103
104
  "jest": "^29.7.0",
104
105
  "jest-canvas-mock": "^2.5.2",
@@ -113,8 +114,8 @@
113
114
  "rollup-plugin-copy": "^3.5.0",
114
115
  "sass": "^1.68.0",
115
116
  "sass-loader": "^13.3.2",
116
- "semantic-release": "^19.0.5",
117
- "storybook": "^7.4.5",
117
+ "semantic-release": "^22.0.10",
118
+ "storybook": "^7.6.4",
118
119
  "style-loader": "^3.3.3",
119
120
  "stylelint": "^14.16.1",
120
121
  "stylelint-config-prettier": "^9.0.5",