blue-react 9.2.0 → 9.3.1
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/components/ToastProvider.js +137 -0
- package/dist/components/shared.js +4 -1
- package/dist/style.css +52 -52
- package/dist/style.min.css +3 -3
- package/dist/style.scss +1 -1
- package/dist/styles/_buttons.scss +21 -2
- package/dist/types/components/ToastProvider.d.ts +23 -0
- package/index.d.ts +2 -0
- package/index.js +2 -0
- package/package.json +1 -1
package/dist/style.scss
CHANGED
|
@@ -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:
|
|
65
|
-
$active-border:
|
|
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, ToastItemType } 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"]
|