blue-react 9.2.0 → 9.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/style.scss CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Blue React v9.2.0-alpha2 (https://bruegmann.github.io/blue-react)
2
+ * Blue React v9.3.0-alpha2 (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
 
@@ -1,5 +1,7 @@
1
1
  // Inspired by Bootstrap's button system but extended with more variants
2
2
 
3
+ // Soft buttons
4
+
3
5
  // scss-docs-start btn-variant-loops
4
6
  @each $color, $value in $theme-colors {
5
7
  $bg: tint-color($value, 80%);
@@ -45,11 +47,19 @@
45
47
  }
46
48
  }
47
49
 
50
+ // Plain buttons
51
+
48
52
  // scss-docs-start btn-variant-loops
49
53
  @each $color, $value in $theme-colors {
50
54
  $bg: tint-color($value, 80%);
51
55
  $text-color: $value;
52
56
 
57
+ $active-background: if(
58
+ $color == $color-contrast-light,
59
+ shade-color($value, $btn-active-bg-shade-amount),
60
+ tint-color($value, $btn-active-bg-tint-amount)
61
+ );
62
+
53
63
  .blue-btn-plain-#{$color} {
54
64
  @if $color == "light" {
55
65
  $text-color: color-contrast($value);
@@ -61,8 +71,17 @@
61
71
  $text-color,
62
72
  $hover-background: shade-color($bg, $btn-hover-bg-shade-amount),
63
73
  $hover-border: shade-color($bg, $btn-hover-border-shade-amount),
64
- $active-background: shade-color($bg, $btn-active-bg-shade-amount),
65
- $active-border: shade-color($bg, $btn-active-border-shade-amount)
74
+ $active-background: $active-background,
75
+ $active-border:
76
+ if(
77
+ $color == $color-contrast-light,
78
+ shade-color($value, $btn-active-border-shade-amount),
79
+ tint-color($value, $btn-active-border-tint-amount)
80
+ ),
81
+ $active-color: color-contrast($active-background),
82
+ $disabled-background: $value,
83
+ $disabled-border: $value,
84
+ $disabled-color: color-contrast($value)
66
85
  );
67
86
  }
68
87
  }
@@ -0,0 +1,23 @@
1
+ import { ReactNode } from "react";
2
+ interface ToastProviderProps {
3
+ children?: ReactNode;
4
+ successIcon?: ReactNode;
5
+ infoIcon?: ReactNode;
6
+ warningIcon?: ReactNode;
7
+ dangerIcon?: ReactNode;
8
+ }
9
+ export declare type ToastItemType = "success" | "danger" | "info" | "warning";
10
+ export interface ToastItem {
11
+ type: ToastItemType;
12
+ title?: string;
13
+ message?: string;
14
+ }
15
+ /**
16
+ * Push notifications to your visitors using Bootstrap's toast component.
17
+ */
18
+ export declare function ToastProvider({ children, successIcon, infoIcon, warningIcon, dangerIcon }: ToastProviderProps): JSX.Element;
19
+ export declare const useToast: () => {
20
+ addToast: (toastItem: ToastItem) => void;
21
+ clearToasts: () => void;
22
+ };
23
+ export {};
package/index.d.ts CHANGED
@@ -67,4 +67,6 @@ export { StatusProvider, useStatus } from "./dist/types/components/StatusProvide
67
67
  export { default as Switch } from "./dist/types/components/Switch"
68
68
  export { SwitchProps } from "./dist/types/components/Switch"
69
69
 
70
+ export { ToastProvider, useToast } from "./dist/types/components/ToastProvider"
71
+
70
72
  export { default as Utilities } from "./dist/types/components/Utilities"
package/index.js CHANGED
@@ -21,4 +21,6 @@ exports.Status = require("./dist/components/Status.js")["default"]
21
21
  exports.StatusProvider = require("./dist/components/StatusProvider.js")["StatusProvider"]
22
22
  exports.useStatus = require("./dist/components/StatusProvider.js")["useStatus"]
23
23
  exports.Switch = require("./dist/components/Switch.js")["default"]
24
+ exports.ToastProvider = require("./dist/components/ToastProvider.js")["ToastProvider"]
25
+ exports.useToast = require("./dist/components/ToastProvider.js")["useToast"]
24
26
  exports.Utilities = require("./dist/components/Utilities.js")["default"]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blue-react",
3
- "version": "9.2.0",
3
+ "version": "9.3.0",
4
4
  "description": "Blue React Components",
5
5
  "license": "LGPL-3.0-or-later",
6
6
  "main": "index.js",