blue-react 9.10.2 → 9.12.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/style.scss CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Blue React v9.10.2 (https://bruegmann.github.io/blue-react)
2
+ * Blue React v9.12.0 (https://bruegmann.github.io/blue-react)
3
3
  * Licensed under GNU General Public License v3.0 (https://github.com/bruegmann/blue-react/blob/master/LICENSE).
4
4
  */
5
5
 
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ export interface AProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
3
+ }
4
+ /**
5
+ * The `<a>` element automatically sets `rel="noreferrer"` for external links with `target="_blank"`.\
6
+ * `A` allows all props of the `<a>` element.\
7
+ * `<A href="https://example.com" target="_blank">Example</A>` ➡️ `<a href="https://example.com" target="_blank" rel="noreferrer">Example</a>`
8
+ */
9
+ export default function A({ children, rel, ...rest }: AProps): JSX.Element;
@@ -82,6 +82,12 @@ export interface MenuItemProps {
82
82
  * Close on click outside.
83
83
  */
84
84
  supportOutside?: boolean;
85
+ /**
86
+ * Overrides default class list to be ignored on click outside.
87
+ * Hint: If you want this menu item to stay open when others will open, set:
88
+ * `outsideIgnoreClasses={["blue-menu-item-wrapper"]}`.
89
+ */
90
+ outsideIgnoreClasses?: string[];
85
91
  /**
86
92
  * By default, MenuItem is a `"button"`. If you set a `href`, it's a `"a"`.
87
93
  * If you want to have it another type, you can pass a component reference with this prop (e.g. `Link`).
@@ -1,4 +1,4 @@
1
- import { CSSProperties, MouseEventHandler, MutableRefObject } from "react";
1
+ import { CSSProperties, MouseEventHandler, MutableRefObject, RefObject } from "react";
2
2
  /**
3
3
  * Hook that alerts clicks outside of the passed ref
4
4
  */
@@ -9,8 +9,9 @@ export interface OutsideProps {
9
9
  onClickOutside?: (event: MouseEvent) => void;
10
10
  onClick?: MouseEventHandler<HTMLDivElement> | undefined;
11
11
  style?: CSSProperties;
12
+ wrapperRef?: RefObject<HTMLDivElement>;
12
13
  }
13
14
  /**
14
15
  * Component that fires an event if you click outside of it
15
16
  */
16
- export default function Outside({ children, className, onClickOutside, onClick, style }: OutsideProps): JSX.Element;
17
+ export default function Outside({ children, className, onClickOutside, onClick, style, wrapperRef }: OutsideProps): JSX.Element;
@@ -4,6 +4,7 @@ export interface SidebarMenuItemProps extends MenuItemProps {
4
4
  outerClass?: string;
5
5
  }
6
6
  /**
7
+ * @deprecated `MenuItem` now has all the features of `SidebarMenuItem`. Use `MenuItem` instead.
7
8
  * Extends `MenuItem` with following features:
8
9
  * * Shows provided label as tooltip if sidebar is closed.
9
10
  * * Children will be displayed on the right side of the parent item.
package/index.d.ts CHANGED
@@ -9,6 +9,9 @@ export default global
9
9
  export { default as Layout } from "./dist/types/components/Layout"
10
10
  export { LayoutProps } from "./dist/types/components/Layout"
11
11
 
12
+ export { default as A } from "./dist/types/components/A"
13
+ export { AProps } from "./dist/types/components/A"
14
+
12
15
  export { default as ActionMenu } from "./dist/types/components/ActionMenu"
13
16
  export { ActionMenuProps } from "./dist/types/components/ActionMenu"
14
17
 
package/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ exports.A = require("./dist/components/A.js")["default"]
1
2
  exports.ActionMenu = require("./dist/components/ActionMenu.js")["default"]
2
3
  exports.ActionMenuSwitch = require("./dist/components/ActionMenuSwitch.js")["default"]
3
4
  exports.ActionMenuItem = require("./dist/components/ActionMenuItem.js")["default"]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blue-react",
3
- "version": "9.10.2",
3
+ "version": "9.12.0",
4
4
  "description": "Blue React Components",
5
5
  "license": "LGPL-3.0-or-later",
6
6
  "main": "index.js",
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@popperjs/core": "^2.11.5",
35
- "blue-web": "^1.0.2",
35
+ "blue-web": "^1.2.0",
36
36
  "bootstrap": "~5.3.3",
37
37
  "clsx": "^1.1.1"
38
38
  },