@algolia/satellite 1.0.0-beta.177 → 1.0.0-beta.178
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/cjs/Toast/Toast.d.ts +1 -1
- package/cjs/Toast/Toast.js +2 -0
- package/cjs/Toast/types.d.ts +4 -4
- package/esm/Toast/Toast.d.ts +1 -1
- package/esm/Toast/Toast.js +2 -0
- package/esm/Toast/types.d.ts +4 -4
- package/package.json +1 -1
package/cjs/Toast/Toast.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { FC, HTMLAttributes } from "react";
|
2
2
|
import type { Notification } from "./types";
|
3
3
|
export declare type ToastLocale = Notification["locale"];
|
4
|
-
export declare type ToastProps = Omit<Notification, "id" | "content" | "autoDismissAfter"> & HTMLAttributes<HTMLElement>;
|
4
|
+
export declare type ToastProps = Omit<Notification, "id" | "content" | "autoDismissAfter"> & Omit<HTMLAttributes<HTMLElement>, "title">;
|
5
5
|
export declare const Toast: FC<ToastProps>;
|
6
6
|
export default Toast;
|
package/cjs/Toast/Toast.js
CHANGED
@@ -69,9 +69,11 @@ var Toast = exports.Toast = function Toast(_ref) {
|
|
69
69
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
70
70
|
className: (0, _satellitePrefixer["default"])(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2["default"])(["p-4 flex"]))),
|
71
71
|
children: [loading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ProgressSpinner["default"], {
|
72
|
+
"aria-hidden": true,
|
72
73
|
size: 24,
|
73
74
|
className: VARIANT_SPINNER_CLASSNAMES[variant]
|
74
75
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(Icon, {
|
76
|
+
"aria-hidden": true,
|
75
77
|
className: (0, _clsx["default"])((0, _satellitePrefixer["default"])(_templateObject15 || (_templateObject15 = (0, _taggedTemplateLiteral2["default"])(["shrink-0 text-white rounded-full p-1"]))), VARIANT_CLASSNAMES[variant]),
|
76
78
|
size: 24
|
77
79
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
package/cjs/Toast/types.d.ts
CHANGED
@@ -1,13 +1,13 @@
|
|
1
|
-
import type { ReactNode } from "react";
|
1
|
+
import type { ReactNode, ReactPortal } from "react";
|
2
2
|
import type { IconComponentType } from "../Icons";
|
3
3
|
import type { ColorVariant } from "../types";
|
4
4
|
export declare type Notification = {
|
5
5
|
/** Defines an unique ID for the `Toast`. */
|
6
6
|
id: string;
|
7
|
-
/** Defines the title for the `Toast`. */
|
8
|
-
title:
|
7
|
+
/** Defines the title for the `Toast`. Will be rendered in a heading element. */
|
8
|
+
title: Exclude<ReactNode, ReactPortal>;
|
9
9
|
/** Defines the content for the `Toast`. */
|
10
|
-
content?: ReactNode
|
10
|
+
content?: Exclude<ReactNode, ReactPortal>;
|
11
11
|
/** Defines the icon for the `Toast`. */
|
12
12
|
icon?: IconComponentType;
|
13
13
|
/**
|
package/esm/Toast/Toast.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { FC, HTMLAttributes } from "react";
|
2
2
|
import type { Notification } from "./types";
|
3
3
|
export declare type ToastLocale = Notification["locale"];
|
4
|
-
export declare type ToastProps = Omit<Notification, "id" | "content" | "autoDismissAfter"> & HTMLAttributes<HTMLElement>;
|
4
|
+
export declare type ToastProps = Omit<Notification, "id" | "content" | "autoDismissAfter"> & Omit<HTMLAttributes<HTMLElement>, "title">;
|
5
5
|
export declare const Toast: FC<ToastProps>;
|
6
6
|
export default Toast;
|
package/esm/Toast/Toast.js
CHANGED
@@ -60,9 +60,11 @@ export var Toast = function Toast(_ref) {
|
|
60
60
|
children: /*#__PURE__*/_jsxs("div", {
|
61
61
|
className: stl(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["p-4 flex"]))),
|
62
62
|
children: [loading ? /*#__PURE__*/_jsx(ProgressSpinner, {
|
63
|
+
"aria-hidden": true,
|
63
64
|
size: 24,
|
64
65
|
className: VARIANT_SPINNER_CLASSNAMES[variant]
|
65
66
|
}) : /*#__PURE__*/_jsx(Icon, {
|
67
|
+
"aria-hidden": true,
|
66
68
|
className: cx(stl(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["shrink-0 text-white rounded-full p-1"]))), VARIANT_CLASSNAMES[variant]),
|
67
69
|
size: 24
|
68
70
|
}), /*#__PURE__*/_jsxs("div", {
|
package/esm/Toast/types.d.ts
CHANGED
@@ -1,13 +1,13 @@
|
|
1
|
-
import type { ReactNode } from "react";
|
1
|
+
import type { ReactNode, ReactPortal } from "react";
|
2
2
|
import type { IconComponentType } from "../Icons";
|
3
3
|
import type { ColorVariant } from "../types";
|
4
4
|
export declare type Notification = {
|
5
5
|
/** Defines an unique ID for the `Toast`. */
|
6
6
|
id: string;
|
7
|
-
/** Defines the title for the `Toast`. */
|
8
|
-
title:
|
7
|
+
/** Defines the title for the `Toast`. Will be rendered in a heading element. */
|
8
|
+
title: Exclude<ReactNode, ReactPortal>;
|
9
9
|
/** Defines the content for the `Toast`. */
|
10
|
-
content?: ReactNode
|
10
|
+
content?: Exclude<ReactNode, ReactPortal>;
|
11
11
|
/** Defines the icon for the `Toast`. */
|
12
12
|
icon?: IconComponentType;
|
13
13
|
/**
|