@webority/ui-react 0.9.15 → 0.9.17
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.
|
@@ -4,5 +4,5 @@ export declare function toast(message: any, variantOrOptions?: string): void;
|
|
|
4
4
|
export declare namespace toast {
|
|
5
5
|
var promise: (promise: Promise<any>, messages: object, opts?: object) => Promise<any>;
|
|
6
6
|
}
|
|
7
|
-
/**
|
|
7
|
+
/** Failure toast — red danger tone. De-duped by message so the same backend error shows once. */
|
|
8
8
|
export declare function errorToast(message: any, opts?: {}): void;
|
package/dist/ui-react.js
CHANGED
|
@@ -9522,7 +9522,7 @@ var qi = {
|
|
|
9522
9522
|
icon: "alert-triangle",
|
|
9523
9523
|
assertive: !0
|
|
9524
9524
|
},
|
|
9525
|
-
|
|
9525
|
+
danger: {
|
|
9526
9526
|
icon: "alert-circle",
|
|
9527
9527
|
assertive: !0
|
|
9528
9528
|
}
|
|
@@ -9952,14 +9952,14 @@ var ua = /* @__PURE__ */ new Set([
|
|
|
9952
9952
|
"success",
|
|
9953
9953
|
"info",
|
|
9954
9954
|
"warning",
|
|
9955
|
-
"
|
|
9955
|
+
"danger"
|
|
9956
9956
|
]);
|
|
9957
9957
|
function da(e, t = "info") {
|
|
9958
9958
|
let n = "info", r = {};
|
|
9959
9959
|
typeof t == "string" ? n = ua.has(t) ? t : "info" : typeof t == "object" && t && (r = t, n = ua.has(r.variant) ? r.variant : "info"), Ui(e, n, r);
|
|
9960
9960
|
}
|
|
9961
9961
|
function fa(e, t = {}) {
|
|
9962
|
-
Ui(e, "
|
|
9962
|
+
Ui(e, "danger", t);
|
|
9963
9963
|
}
|
|
9964
9964
|
da.promise = (e, t, n = {}) => {
|
|
9965
9965
|
let r = n.id || `promise-${Date.now()}-${Math.random()}`;
|
|
@@ -9976,7 +9976,7 @@ da.promise = (e, t, n = {}) => {
|
|
|
9976
9976
|
}), e)).catch((e) => {
|
|
9977
9977
|
throw da((typeof t.error == "function" ? t.error(e) : t.error) || "Error", {
|
|
9978
9978
|
...n,
|
|
9979
|
-
variant: "
|
|
9979
|
+
variant: "danger",
|
|
9980
9980
|
id: r,
|
|
9981
9981
|
duration: n.duration === void 0 ? 5e3 : n.duration
|
|
9982
9982
|
}), e;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webority/ui-react",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.17",
|
|
4
4
|
"description": "Webority shared React component library — App* primitives on react-bootstrap + the @webority/theme design system.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"type": "module",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
},
|
|
29
29
|
"sideEffects": false,
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@webority/theme": "0.9.
|
|
32
|
-
"@webority/ui-elements": "0.9.
|
|
31
|
+
"@webority/theme": "0.9.17",
|
|
32
|
+
"@webority/ui-elements": "0.9.17"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"bootstrap": "5.3.3",
|