blue-react 8.3.4 → 8.4.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 v8.3.4 (https://bruegmann.github.io/blue-react)
2
+ * Blue React v8.4.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
 
@@ -55,7 +55,7 @@ export interface MenuItemProps {
55
55
  */
56
56
  supportOutside?: boolean;
57
57
  /**
58
- * By default, MenuItem is a `"button"</button>. If you set a `href`, it's a `"a"`.
58
+ * By default, MenuItem is a `"button"`. If you set a `href`, it's a `"a"`.
59
59
  * If you want to have it another type, you can pass a component reference with this prop (e.g. `Link`).
60
60
  */
61
61
  elementType?: any;
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React, { ReactNode } from "react";
2
2
  export interface SwitchProps {
3
3
  className?: string;
4
4
  checked?: boolean;
@@ -12,10 +12,22 @@ export interface SwitchProps {
12
12
  */
13
13
  elementType?: string;
14
14
  disabled?: boolean;
15
+ /**
16
+ * Set prop to use the older look and feel. Will disappear in future releases.
17
+ */
18
+ legacy?: boolean;
19
+ label?: ReactNode | string;
15
20
  }
16
21
  /**
17
- * Switch.
22
+ * @deprecated
23
+ * Use Bootstrap's `.form-check.form-switch` instead:
24
+ * https://getbootstrap.com/docs/5.2/forms/checks-radios/#switches
25
+ *
26
+ * For now, this component acts as proxy for Bootstrap's Switch.
27
+ * To place a label next to the switch, use the new `label` prop.
28
+ *
29
+ * Migrate to Blue React 8.4.0 and use legacy support: Set the `label` with a string. Or set the `legacy` prop to use the previous look and behaviour.
18
30
  */
19
- export default function Switch({ className, checked, onChange, sliderLabel, disabled, elementType }: SwitchProps): React.ReactElement<{
31
+ export default function Switch({ className, checked, onChange, sliderLabel, disabled, elementType, legacy, label }: SwitchProps): React.ReactElement<{
20
32
  className: string;
21
33
  }, string | React.JSXElementConstructor<any>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blue-react",
3
- "version": "8.3.4",
3
+ "version": "8.4.0",
4
4
  "description": "Blue React Components",
5
5
  "license": "LGPL-3.0-or-later",
6
6
  "main": "index.js",
@@ -60,7 +60,7 @@
60
60
  "postcss-minify": "^1.1.0",
61
61
  "prettier": "2.4.1",
62
62
  "react": "^18.1.0",
63
- "react-bootstrap-icons": "^1.5.0",
63
+ "react-bootstrap-icons": "^1.8.4",
64
64
  "react-docgen": "^5.4.0",
65
65
  "react-dom": "^18.1.0",
66
66
  "react-markdown-github": "^3.3.1",