@vinyasa/feedback 1.0.21 → 1.0.23
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/cjs/alert.cjs +72 -32
- package/dist/cjs/banner.cjs +31 -14
- package/dist/cjs/circular-progress.cjs +74 -37
- package/dist/cjs/empty-state.cjs +47 -23
- package/dist/cjs/error-boundary.cjs +72 -32
- package/dist/cjs/index.cjs +593 -269
- package/dist/cjs/index.css +54 -32
- package/dist/cjs/inline-message.cjs +32 -15
- package/dist/cjs/loading-overlay.cjs +41 -17
- package/dist/cjs/progress-bar.cjs +143 -48
- package/dist/cjs/progress-bar.css +7 -2
- package/dist/cjs/toaster.cjs +202 -87
- package/dist/cjs/toaster.css +47 -30
- package/dist/esm/147.css +47 -30
- package/dist/esm/147.js +103 -89
- package/dist/esm/158.js +31 -19
- package/dist/esm/266.js +67 -37
- package/dist/esm/277.js +5 -1
- package/dist/esm/288.js +25 -20
- package/dist/esm/516.js +24 -17
- package/dist/esm/872.css +4 -2
- package/dist/esm/872.js +54 -19
- package/dist/esm/880.js +32 -13
- package/dist/esm/903.js +41 -31
- package/dist/esm/989.js +23 -16
- package/dist/esm/alert.js +1 -1
- package/dist/esm/banner.js +1 -1
- package/dist/esm/circular-progress.js +1 -1
- package/dist/esm/components/alert/Alert.d.ts +23 -7
- package/dist/esm/components/alert/index.d.ts +1 -1
- package/dist/esm/components/banner/Banner.d.ts +8 -5
- package/dist/esm/components/banner/index.d.ts +1 -1
- package/dist/esm/components/circular-progress/CircularProgress.d.ts +11 -3
- package/dist/esm/components/circular-progress/index.d.ts +1 -1
- package/dist/esm/components/empty-state/EmptyState.d.ts +24 -13
- package/dist/esm/components/empty-state/index.d.ts +1 -1
- package/dist/esm/components/error-boundary/ErrorBoundary.d.ts +16 -9
- package/dist/esm/components/error-boundary/index.d.ts +1 -1
- package/dist/esm/components/inline-message/InlineMessage.d.ts +5 -0
- package/dist/esm/components/inline-message/index.d.ts +1 -1
- package/dist/esm/components/loading-overlay/LoadingOverlay.d.ts +11 -1
- package/dist/esm/components/loading-overlay/index.d.ts +1 -1
- package/dist/esm/components/progress-bar/ProgressBar.d.ts +11 -4
- package/dist/esm/components/progress-bar/index.d.ts +1 -1
- package/dist/esm/components/spinner/Spinner.d.ts +1 -1
- package/dist/esm/components/toaster/Toaster.css.d.ts +2 -5
- package/dist/esm/components/toaster/Toaster.d.ts +3 -0
- package/dist/esm/components/toaster/ToasterItem.d.ts +18 -0
- package/dist/esm/components/toaster/index.d.ts +1 -1
- package/dist/esm/components/toaster/toastStore.d.ts +2 -2
- package/dist/esm/empty-state.js +1 -1
- package/dist/esm/error-boundary.js +1 -1
- package/dist/esm/index.d.ts +9 -9
- package/dist/esm/index.js +9 -9
- package/dist/esm/inline-message.js +1 -1
- package/dist/esm/loading-overlay.js +1 -1
- package/dist/esm/progress-bar.js +1 -1
- package/dist/esm/status.d.ts +3 -1
- package/dist/esm/toaster.js +1 -1
- package/package.json +15 -11
- package/dist/esm/components/toaster/ToastItemView.d.ts +0 -7
package/dist/esm/880.js
CHANGED
|
@@ -1,7 +1,28 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import _vinyasa_button from "@vinyasa/button";
|
|
3
|
-
import { Component } from "react";
|
|
4
|
-
import { EmptyState as empty_state_EmptyState } from "./288.js";
|
|
3
|
+
import { Children, Component, isValidElement } from "react";
|
|
4
|
+
import { EmptyStateDescription, EmptyStateTitle, EmptyStateAction, EmptyState as empty_state_EmptyState } from "./288.js";
|
|
5
|
+
const ErrorBoundaryContent = ({ children })=>children;
|
|
6
|
+
ErrorBoundaryContent.displayName = 'ErrorBoundaryContent';
|
|
7
|
+
const ErrorBoundaryFallback = (props)=>null;
|
|
8
|
+
ErrorBoundaryFallback.displayName = 'ErrorBoundaryFallback';
|
|
9
|
+
const findSlot = (children, type)=>Children.toArray(children).find((child)=>/*#__PURE__*/ isValidElement(child) && child.type === type);
|
|
10
|
+
const defaultFallback = ({ error, resetErrorBoundary })=>/*#__PURE__*/ jsxs(empty_state_EmptyState, {
|
|
11
|
+
children: [
|
|
12
|
+
/*#__PURE__*/ jsx(EmptyStateTitle, {
|
|
13
|
+
children: "Something went wrong"
|
|
14
|
+
}),
|
|
15
|
+
/*#__PURE__*/ jsx(EmptyStateDescription, {
|
|
16
|
+
children: error.message
|
|
17
|
+
}),
|
|
18
|
+
/*#__PURE__*/ jsx(EmptyStateAction, {
|
|
19
|
+
children: /*#__PURE__*/ jsx(_vinyasa_button, {
|
|
20
|
+
onClick: resetErrorBoundary,
|
|
21
|
+
children: "Try again"
|
|
22
|
+
})
|
|
23
|
+
})
|
|
24
|
+
]
|
|
25
|
+
});
|
|
5
26
|
class ErrorBoundary extends Component {
|
|
6
27
|
state = {
|
|
7
28
|
error: null
|
|
@@ -27,21 +48,19 @@ class ErrorBoundary extends Component {
|
|
|
27
48
|
};
|
|
28
49
|
render() {
|
|
29
50
|
const { error } = this.state;
|
|
30
|
-
|
|
31
|
-
|
|
51
|
+
const { children } = this.props;
|
|
52
|
+
if (!error) return findSlot(children, ErrorBoundaryContent) ?? null;
|
|
53
|
+
const fallbackSlot = findSlot(children, ErrorBoundaryFallback);
|
|
54
|
+
const fallback = fallbackSlot?.props.children;
|
|
32
55
|
if ('function' == typeof fallback) return fallback({
|
|
33
56
|
error,
|
|
34
57
|
resetErrorBoundary: this.reset
|
|
35
58
|
});
|
|
36
|
-
return fallback ??
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
action: /*#__PURE__*/ jsx(_vinyasa_button, {
|
|
40
|
-
onClick: this.reset,
|
|
41
|
-
children: "Try again"
|
|
42
|
-
})
|
|
59
|
+
return fallback ?? defaultFallback({
|
|
60
|
+
error,
|
|
61
|
+
resetErrorBoundary: this.reset
|
|
43
62
|
});
|
|
44
63
|
}
|
|
45
64
|
}
|
|
46
65
|
const error_boundary_ErrorBoundary = ErrorBoundary;
|
|
47
|
-
export { error_boundary_ErrorBoundary as ErrorBoundary };
|
|
66
|
+
export { ErrorBoundaryContent, ErrorBoundaryFallback, error_boundary_ErrorBoundary as ErrorBoundary };
|
package/dist/esm/903.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./903.css";
|
|
2
|
-
import { jsx
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import box from "@vinyasa/layout/box";
|
|
4
4
|
import { forwardRef } from "react";
|
|
5
5
|
import { createRuntimeFn } from "./953.js";
|
|
6
|
-
import { statusIcons } from "./277.js";
|
|
6
|
+
import { StatusProvider, useStatusContext, statusIcons } from "./277.js";
|
|
7
7
|
var Alert_css_alert = createRuntimeFn({
|
|
8
8
|
defaultClassName: '_1313gq0',
|
|
9
9
|
variantClassNames: {
|
|
@@ -20,42 +20,52 @@ var Alert_css_alert = createRuntimeFn({
|
|
|
20
20
|
compoundVariants: []
|
|
21
21
|
});
|
|
22
22
|
var body = '_1313gq6';
|
|
23
|
-
var
|
|
23
|
+
var description = '_1313gq8';
|
|
24
24
|
var icon = '_1313gq5';
|
|
25
|
-
var
|
|
26
|
-
const Alert = /*#__PURE__*/ forwardRef(({ status = 'info',
|
|
27
|
-
const Icon = statusIcons[status];
|
|
25
|
+
var title = '_1313gq7';
|
|
26
|
+
const Alert = /*#__PURE__*/ forwardRef(({ status = 'info', className, children, ...rest }, ref)=>{
|
|
28
27
|
const classes = className ? `${Alert_css_alert({
|
|
29
28
|
status
|
|
30
29
|
})} ${className}` : Alert_css_alert({
|
|
31
30
|
status
|
|
32
31
|
});
|
|
33
|
-
return /*#__PURE__*/
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}),
|
|
43
|
-
/*#__PURE__*/ jsxs("div", {
|
|
44
|
-
className: body,
|
|
45
|
-
children: [
|
|
46
|
-
/*#__PURE__*/ jsx("p", {
|
|
47
|
-
className: Alert_css_title,
|
|
48
|
-
children: title
|
|
49
|
-
}),
|
|
50
|
-
description ? /*#__PURE__*/ jsx("p", {
|
|
51
|
-
className: Alert_css_description,
|
|
52
|
-
children: description
|
|
53
|
-
}) : null
|
|
54
|
-
]
|
|
55
|
-
})
|
|
56
|
-
]
|
|
32
|
+
return /*#__PURE__*/ jsx(StatusProvider, {
|
|
33
|
+
value: status,
|
|
34
|
+
children: /*#__PURE__*/ jsx(box, {
|
|
35
|
+
ref: ref,
|
|
36
|
+
role: "alert",
|
|
37
|
+
className: classes,
|
|
38
|
+
...rest,
|
|
39
|
+
children: children
|
|
40
|
+
})
|
|
57
41
|
});
|
|
58
42
|
});
|
|
59
43
|
Alert.displayName = 'Alert';
|
|
60
44
|
const alert_Alert = Alert;
|
|
61
|
-
|
|
45
|
+
const AlertIcon = ({ className, children, ...rest })=>{
|
|
46
|
+
const status = useStatusContext();
|
|
47
|
+
const StatusIcon = statusIcons[status];
|
|
48
|
+
return /*#__PURE__*/ jsx("span", {
|
|
49
|
+
className: className ? `${icon} ${className}` : icon,
|
|
50
|
+
"aria-hidden": "true",
|
|
51
|
+
...rest,
|
|
52
|
+
children: children ?? /*#__PURE__*/ jsx(StatusIcon, {})
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
AlertIcon.displayName = 'AlertIcon';
|
|
56
|
+
const AlertBody = ({ className, ...rest })=>/*#__PURE__*/ jsx("div", {
|
|
57
|
+
className: className ? `${body} ${className}` : body,
|
|
58
|
+
...rest
|
|
59
|
+
});
|
|
60
|
+
AlertBody.displayName = 'AlertBody';
|
|
61
|
+
const AlertTitle = ({ className, ...rest })=>/*#__PURE__*/ jsx("p", {
|
|
62
|
+
className: className ? `${title} ${className}` : title,
|
|
63
|
+
...rest
|
|
64
|
+
});
|
|
65
|
+
AlertTitle.displayName = 'AlertTitle';
|
|
66
|
+
const AlertDescription = ({ className, ...rest })=>/*#__PURE__*/ jsx("p", {
|
|
67
|
+
className: className ? `${description} ${className}` : description,
|
|
68
|
+
...rest
|
|
69
|
+
});
|
|
70
|
+
AlertDescription.displayName = "AlertDescription";
|
|
71
|
+
export { AlertBody, AlertDescription, AlertIcon, AlertTitle, alert_Alert as Alert };
|
package/dist/esm/989.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./989.css";
|
|
2
|
-
import { jsx
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import box from "@vinyasa/layout/box";
|
|
4
4
|
import { forwardRef } from "react";
|
|
5
5
|
import { createRuntimeFn } from "./953.js";
|
|
6
|
-
import { statusIcons } from "./277.js";
|
|
6
|
+
import { StatusProvider, useStatusContext, statusIcons } from "./277.js";
|
|
7
7
|
var banner = createRuntimeFn({
|
|
8
8
|
defaultClassName: 'a1nlu90',
|
|
9
9
|
variantClassNames: {
|
|
@@ -21,26 +21,33 @@ var banner = createRuntimeFn({
|
|
|
21
21
|
});
|
|
22
22
|
var icon = 'a1nlu95';
|
|
23
23
|
const Banner = /*#__PURE__*/ forwardRef(({ status = 'info', className, children, ...rest }, ref)=>{
|
|
24
|
-
const Icon = statusIcons[status];
|
|
25
24
|
const classes = className ? `${banner({
|
|
26
25
|
status
|
|
27
26
|
})} ${className}` : banner({
|
|
28
27
|
status
|
|
29
28
|
});
|
|
30
|
-
return /*#__PURE__*/
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}),
|
|
40
|
-
children
|
|
41
|
-
]
|
|
29
|
+
return /*#__PURE__*/ jsx(StatusProvider, {
|
|
30
|
+
value: status,
|
|
31
|
+
children: /*#__PURE__*/ jsx(box, {
|
|
32
|
+
ref: ref,
|
|
33
|
+
role: "alert",
|
|
34
|
+
className: classes,
|
|
35
|
+
...rest,
|
|
36
|
+
children: children
|
|
37
|
+
})
|
|
42
38
|
});
|
|
43
39
|
});
|
|
44
40
|
Banner.displayName = 'Banner';
|
|
45
41
|
const banner_Banner = Banner;
|
|
46
|
-
|
|
42
|
+
const BannerIcon = ({ className, children, ...rest })=>{
|
|
43
|
+
const status = useStatusContext();
|
|
44
|
+
const StatusIcon = statusIcons[status];
|
|
45
|
+
return /*#__PURE__*/ jsx("span", {
|
|
46
|
+
className: className ? `${icon} ${className}` : icon,
|
|
47
|
+
"aria-hidden": "true",
|
|
48
|
+
...rest,
|
|
49
|
+
children: children ?? /*#__PURE__*/ jsx(StatusIcon, {})
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
BannerIcon.displayName = 'BannerIcon';
|
|
53
|
+
export { BannerIcon, banner_Banner as Banner };
|
package/dist/esm/alert.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Alert as default } from "./903.js";
|
|
1
|
+
export { Alert as default, AlertBody, AlertDescription, AlertIcon, AlertTitle } from "./903.js";
|
package/dist/esm/banner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Banner as default } from "./989.js";
|
|
1
|
+
export { Banner as default, BannerIcon } from "./989.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { CircularProgress as default } from "./266.js";
|
|
1
|
+
export { CircularProgress as default, CircularProgressIndicator } from "./266.js";
|
|
@@ -1,14 +1,30 @@
|
|
|
1
1
|
import { type BoxProps } from '@vinyasa/layout/box';
|
|
2
|
-
import { type
|
|
2
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
3
3
|
import { type Status } from '../../status';
|
|
4
|
-
export type AlertProps = Omit<BoxProps, '
|
|
4
|
+
export type AlertProps = Omit<BoxProps, 'status'> & {
|
|
5
5
|
status?: Status;
|
|
6
|
-
title: ReactNode;
|
|
7
|
-
description?: ReactNode;
|
|
8
6
|
};
|
|
9
|
-
declare const Alert: import("react").ForwardRefExoticComponent<Omit<BoxProps, "
|
|
7
|
+
declare const Alert: import("react").ForwardRefExoticComponent<Omit<BoxProps, "status"> & {
|
|
10
8
|
status?: Status;
|
|
11
|
-
title: ReactNode;
|
|
12
|
-
description?: ReactNode;
|
|
13
9
|
} & import("react").RefAttributes<HTMLElement>>;
|
|
14
10
|
export default Alert;
|
|
11
|
+
export type AlertIconProps = ComponentPropsWithoutRef<'span'>;
|
|
12
|
+
export declare const AlertIcon: {
|
|
13
|
+
({ className, children, ...rest }: AlertIconProps): import("react").JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
16
|
+
export type AlertBodyProps = ComponentPropsWithoutRef<'div'>;
|
|
17
|
+
export declare const AlertBody: {
|
|
18
|
+
({ className, ...rest }: AlertBodyProps): import("react").JSX.Element;
|
|
19
|
+
displayName: string;
|
|
20
|
+
};
|
|
21
|
+
export type AlertTitleProps = ComponentPropsWithoutRef<'p'>;
|
|
22
|
+
export declare const AlertTitle: {
|
|
23
|
+
({ className, ...rest }: AlertTitleProps): import("react").JSX.Element;
|
|
24
|
+
displayName: string;
|
|
25
|
+
};
|
|
26
|
+
export type AlertDescriptionProps = ComponentPropsWithoutRef<'p'>;
|
|
27
|
+
export declare const AlertDescription: {
|
|
28
|
+
({ className, ...rest }: AlertDescriptionProps): import("react").JSX.Element;
|
|
29
|
+
displayName: string;
|
|
30
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default, type AlertProps } from './Alert';
|
|
1
|
+
export { default, AlertBody, AlertDescription, AlertIcon, AlertTitle, type AlertBodyProps, type AlertDescriptionProps, type AlertIconProps, type AlertProps, type AlertTitleProps, } from './Alert';
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { type BoxProps } from '@vinyasa/layout/box';
|
|
2
|
-
import { type
|
|
2
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
3
3
|
import { type Status } from '../../status';
|
|
4
|
-
export type BannerProps = Omit<BoxProps, '
|
|
4
|
+
export type BannerProps = Omit<BoxProps, 'status'> & {
|
|
5
5
|
status?: Status;
|
|
6
|
-
children?: ReactNode;
|
|
7
6
|
};
|
|
8
|
-
declare const Banner: import("react").ForwardRefExoticComponent<Omit<BoxProps, "
|
|
7
|
+
declare const Banner: import("react").ForwardRefExoticComponent<Omit<BoxProps, "status"> & {
|
|
9
8
|
status?: Status;
|
|
10
|
-
children?: ReactNode;
|
|
11
9
|
} & import("react").RefAttributes<HTMLElement>>;
|
|
12
10
|
export default Banner;
|
|
11
|
+
export type BannerIconProps = ComponentPropsWithoutRef<'span'>;
|
|
12
|
+
export declare const BannerIcon: {
|
|
13
|
+
({ className, children, ...rest }: BannerIconProps): import("react").JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default, type BannerProps } from './Banner';
|
|
1
|
+
export { default, BannerIcon, type BannerIconProps, type BannerProps } from './Banner';
|
|
@@ -1,17 +1,25 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as Progress from '@radix-ui/react-progress';
|
|
2
|
+
import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
|
|
2
3
|
import { type SpacingProps } from '../../spacing';
|
|
3
|
-
export type CircularProgressProps = Omit<ComponentPropsWithoutRef<'
|
|
4
|
+
export type CircularProgressProps = Omit<ComponentPropsWithoutRef<typeof Progress.Root>, 'value' | 'asChild'> & SpacingProps & {
|
|
4
5
|
/** Current progress, 0-max. Omit for an indeterminate spinning ring. */
|
|
5
6
|
value?: number;
|
|
6
7
|
max?: number;
|
|
7
8
|
size?: number;
|
|
8
9
|
strokeWidth?: number;
|
|
10
|
+
children?: ReactNode;
|
|
9
11
|
};
|
|
10
|
-
declare const CircularProgress: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").
|
|
12
|
+
declare const CircularProgress: import("react").ForwardRefExoticComponent<Omit<Omit<Progress.ProgressProps & import("react").RefAttributes<HTMLDivElement>, "ref">, "value" | "asChild"> & SpacingProps & {
|
|
11
13
|
/** Current progress, 0-max. Omit for an indeterminate spinning ring. */
|
|
12
14
|
value?: number;
|
|
13
15
|
max?: number;
|
|
14
16
|
size?: number;
|
|
15
17
|
strokeWidth?: number;
|
|
18
|
+
children?: ReactNode;
|
|
16
19
|
} & import("react").RefAttributes<SVGSVGElement>>;
|
|
17
20
|
export default CircularProgress;
|
|
21
|
+
export type CircularProgressIndicatorProps = ComponentPropsWithoutRef<'circle'>;
|
|
22
|
+
export declare const CircularProgressIndicator: {
|
|
23
|
+
({ className, style, ...rest }: CircularProgressIndicatorProps): import("react").JSX.Element;
|
|
24
|
+
displayName: string;
|
|
25
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default, type CircularProgressProps } from './CircularProgress';
|
|
1
|
+
export { default, CircularProgressIndicator, type CircularProgressIndicatorProps, type CircularProgressProps, } from './CircularProgress';
|
|
@@ -1,15 +1,26 @@
|
|
|
1
1
|
import { type CenterProps } from '@vinyasa/layout';
|
|
2
|
-
import { type
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
description?: ReactNode;
|
|
7
|
-
action?: ReactNode;
|
|
8
|
-
};
|
|
9
|
-
declare const EmptyState: import("react").ForwardRefExoticComponent<Omit<CenterProps, "children"> & {
|
|
10
|
-
icon?: ReactNode;
|
|
11
|
-
title: ReactNode;
|
|
12
|
-
description?: ReactNode;
|
|
13
|
-
action?: ReactNode;
|
|
14
|
-
} & import("react").RefAttributes<HTMLElement>>;
|
|
2
|
+
import { type HeadingProps, type ParagraphProps } from '@vinyasa/typography';
|
|
3
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
4
|
+
export type EmptyStateProps = CenterProps;
|
|
5
|
+
declare const EmptyState: import("react").ForwardRefExoticComponent<CenterProps & import("react").RefAttributes<HTMLElement>>;
|
|
15
6
|
export default EmptyState;
|
|
7
|
+
export type EmptyStateIconProps = ComponentPropsWithoutRef<'span'>;
|
|
8
|
+
export declare const EmptyStateIcon: {
|
|
9
|
+
({ className, ...rest }: EmptyStateIconProps): import("react").JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
export type EmptyStateTitleProps = HeadingProps;
|
|
13
|
+
export declare const EmptyStateTitle: {
|
|
14
|
+
({ size, ...rest }: EmptyStateTitleProps): import("react").JSX.Element;
|
|
15
|
+
displayName: string;
|
|
16
|
+
};
|
|
17
|
+
export type EmptyStateDescriptionProps = ParagraphProps;
|
|
18
|
+
export declare const EmptyStateDescription: {
|
|
19
|
+
({ color, ...rest }: EmptyStateDescriptionProps): import("react").JSX.Element;
|
|
20
|
+
displayName: string;
|
|
21
|
+
};
|
|
22
|
+
export type EmptyStateActionProps = ComponentPropsWithoutRef<'div'>;
|
|
23
|
+
export declare const EmptyStateAction: {
|
|
24
|
+
(props: EmptyStateActionProps): import("react").JSX.Element;
|
|
25
|
+
displayName: string;
|
|
26
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default, type EmptyStateProps } from './EmptyState';
|
|
1
|
+
export { default, EmptyStateAction, EmptyStateDescription, EmptyStateIcon, EmptyStateTitle, type EmptyStateActionProps, type EmptyStateDescriptionProps, type EmptyStateIconProps, type EmptyStateProps, type EmptyStateTitleProps, } from './EmptyState';
|
|
@@ -1,17 +1,24 @@
|
|
|
1
1
|
import { Component, type ErrorInfo, type ReactNode } from 'react';
|
|
2
|
-
export interface
|
|
2
|
+
export interface ErrorBoundaryFallbackRenderProps {
|
|
3
3
|
error: Error;
|
|
4
4
|
resetErrorBoundary: () => void;
|
|
5
5
|
}
|
|
6
|
+
export interface ErrorBoundaryContentProps {
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare const ErrorBoundaryContent: {
|
|
10
|
+
({ children }: ErrorBoundaryContentProps): ReactNode;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
export interface ErrorBoundaryFallbackProps {
|
|
14
|
+
children: ReactNode | ((props: ErrorBoundaryFallbackRenderProps) => ReactNode);
|
|
15
|
+
}
|
|
16
|
+
export declare const ErrorBoundaryFallback: {
|
|
17
|
+
(props: ErrorBoundaryFallbackProps): null;
|
|
18
|
+
displayName: string;
|
|
19
|
+
};
|
|
6
20
|
export interface ErrorBoundaryProps {
|
|
7
21
|
children: ReactNode;
|
|
8
|
-
/**
|
|
9
|
-
* A plain node, or a render function receiving the caught error and a
|
|
10
|
-
* `resetErrorBoundary` callback — same shape as the `react-error-boundary`
|
|
11
|
-
* package's `fallbackRender`, the de facto standard API for this.
|
|
12
|
-
* Defaults to an EmptyState with a "Try again" action wired to reset.
|
|
13
|
-
*/
|
|
14
|
-
fallback?: ReactNode | ((props: ErrorBoundaryFallbackProps) => ReactNode);
|
|
15
22
|
onError?: (error: Error, errorInfo: ErrorInfo) => void;
|
|
16
23
|
/** Called after the boundary resets, before children re-render. */
|
|
17
24
|
onReset?: () => void;
|
|
@@ -27,6 +34,6 @@ declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryS
|
|
|
27
34
|
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
28
35
|
componentDidUpdate(prevProps: ErrorBoundaryProps): void;
|
|
29
36
|
reset: () => void;
|
|
30
|
-
render():
|
|
37
|
+
render(): ReactNode;
|
|
31
38
|
}
|
|
32
39
|
export default ErrorBoundary;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default, type ErrorBoundaryFallbackProps, type ErrorBoundaryProps } from './ErrorBoundary';
|
|
1
|
+
export { default, ErrorBoundaryContent, ErrorBoundaryFallback, type ErrorBoundaryContentProps, type ErrorBoundaryFallbackProps, type ErrorBoundaryFallbackRenderProps, type ErrorBoundaryProps, } from './ErrorBoundary';
|
|
@@ -8,3 +8,8 @@ declare const InlineMessage: import("react").ForwardRefExoticComponent<Omit<impo
|
|
|
8
8
|
status?: Status;
|
|
9
9
|
} & import("react").RefAttributes<HTMLSpanElement>>;
|
|
10
10
|
export default InlineMessage;
|
|
11
|
+
export type InlineMessageIconProps = ComponentPropsWithoutRef<'span'>;
|
|
12
|
+
export declare const InlineMessageIcon: {
|
|
13
|
+
({ className, children, ...rest }: InlineMessageIconProps): import("react").JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default, type InlineMessageProps } from './InlineMessage';
|
|
1
|
+
export { default, InlineMessageIcon, type InlineMessageIconProps, type InlineMessageProps, } from './InlineMessage';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type BoxProps } from '@vinyasa/layout/box';
|
|
2
|
-
import { type ReactNode } from 'react';
|
|
2
|
+
import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
|
|
3
3
|
export type LoadingOverlayProps = Omit<BoxProps, 'children'> & {
|
|
4
4
|
visible: boolean;
|
|
5
5
|
children?: ReactNode;
|
|
@@ -9,3 +9,13 @@ declare const LoadingOverlay: import("react").ForwardRefExoticComponent<Omit<Box
|
|
|
9
9
|
children?: ReactNode;
|
|
10
10
|
} & import("react").RefAttributes<HTMLElement>>;
|
|
11
11
|
export default LoadingOverlay;
|
|
12
|
+
export type LoadingOverlayBackdropProps = ComponentPropsWithoutRef<'div'>;
|
|
13
|
+
export declare const LoadingOverlayBackdrop: {
|
|
14
|
+
({ className, ...rest }: LoadingOverlayBackdropProps): import("react").JSX.Element | null;
|
|
15
|
+
displayName: string;
|
|
16
|
+
};
|
|
17
|
+
export type LoadingOverlayContentProps = ComponentPropsWithoutRef<'div'>;
|
|
18
|
+
export declare const LoadingOverlayContent: {
|
|
19
|
+
({ className, children, ...rest }: LoadingOverlayContentProps): import("react").JSX.Element | null;
|
|
20
|
+
displayName: string;
|
|
21
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default, type LoadingOverlayProps } from './LoadingOverlay';
|
|
1
|
+
export { default, LoadingOverlayBackdrop, LoadingOverlayContent, type LoadingOverlayBackdropProps, type LoadingOverlayContentProps, type LoadingOverlayProps, } from './LoadingOverlay';
|
|
@@ -1,12 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import * as Progress from '@radix-ui/react-progress';
|
|
2
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
3
|
+
import { type SpacingProps } from '../../spacing';
|
|
4
|
+
export type ProgressBarProps = Omit<ComponentPropsWithoutRef<typeof Progress.Root>, 'value'> & SpacingProps & {
|
|
3
5
|
/** Current progress, 0-max. */
|
|
4
6
|
value: number;
|
|
5
7
|
max?: number;
|
|
6
8
|
};
|
|
7
|
-
declare const ProgressBar: import("react").ForwardRefExoticComponent<Omit<
|
|
9
|
+
declare const ProgressBar: import("react").ForwardRefExoticComponent<Omit<Omit<Progress.ProgressProps & import("react").RefAttributes<HTMLDivElement>, "ref">, "value"> & SpacingProps & {
|
|
8
10
|
/** Current progress, 0-max. */
|
|
9
11
|
value: number;
|
|
10
12
|
max?: number;
|
|
11
|
-
} & import("react").RefAttributes<
|
|
13
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
14
|
export default ProgressBar;
|
|
15
|
+
export type ProgressBarIndicatorProps = ComponentPropsWithoutRef<typeof Progress.Indicator>;
|
|
16
|
+
export declare const ProgressBarIndicator: {
|
|
17
|
+
({ className, style, ...rest }: ProgressBarIndicatorProps): import("react").JSX.Element;
|
|
18
|
+
displayName: string;
|
|
19
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default, type ProgressBarProps } from './ProgressBar';
|
|
1
|
+
export { default, ProgressBarIndicator, type ProgressBarIndicatorProps, type ProgressBarProps, } from './ProgressBar';
|
|
@@ -5,6 +5,6 @@ import { spinner } from './Spinner.css';
|
|
|
5
5
|
type SpinnerVariants = RecipeVariants<typeof spinner>;
|
|
6
6
|
export type SpinnerProps = Omit<ComponentPropsWithoutRef<'span'>, 'children'> & SpinnerVariants & SpacingProps;
|
|
7
7
|
declare const Spinner: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref">, "children"> & {
|
|
8
|
-
size?: "
|
|
8
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
9
9
|
} & SpacingProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
10
10
|
export default Spinner;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const viewport: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
2
2
|
position: {
|
|
3
3
|
'top-left': {
|
|
4
4
|
top: `var(--${string})`;
|
|
@@ -48,12 +48,9 @@ export declare const toastCard: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
|
48
48
|
};
|
|
49
49
|
};
|
|
50
50
|
}>;
|
|
51
|
-
export declare const enterFromTop: string;
|
|
52
|
-
export declare const enterFromBottom: string;
|
|
53
|
-
export declare const exitToTop: string;
|
|
54
|
-
export declare const exitToBottom: string;
|
|
55
51
|
export declare const icon: string;
|
|
56
52
|
export declare const body: string;
|
|
57
53
|
export declare const title: string;
|
|
58
54
|
export declare const description: string;
|
|
59
55
|
export declare const closeButton: string;
|
|
56
|
+
export declare const action: string;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { ToastAction, ToastClose, ToastDescription, ToastTitle, type ToastActionProps, type ToastCloseProps, type ToastDescriptionProps, type ToastTitleProps } from './ToasterItem';
|
|
2
|
+
export { ToastAction, ToastClose, ToastDescription, ToastTitle };
|
|
3
|
+
export type { ToastActionProps, ToastCloseProps, ToastDescriptionProps, ToastTitleProps };
|
|
1
4
|
export type ToasterPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
|
2
5
|
export interface ToasterProps {
|
|
3
6
|
/** Defaults to 'bottom-right'. */
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as Toast from '@radix-ui/react-toast';
|
|
2
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
3
|
+
import type { ToastItem } from './toastStore';
|
|
4
|
+
export type ToastTitleProps = ComponentPropsWithoutRef<typeof Toast.Title>;
|
|
5
|
+
export declare const ToastTitle: import("react").ForwardRefExoticComponent<Omit<Toast.ToastTitleProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export type ToastDescriptionProps = ComponentPropsWithoutRef<typeof Toast.Description>;
|
|
7
|
+
export declare const ToastDescription: import("react").ForwardRefExoticComponent<Omit<Toast.ToastDescriptionProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export type ToastActionProps = ComponentPropsWithoutRef<typeof Toast.Action>;
|
|
9
|
+
export declare const ToastAction: import("react").ForwardRefExoticComponent<Omit<Toast.ToastActionProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
export type ToastCloseProps = ComponentPropsWithoutRef<typeof Toast.Close>;
|
|
11
|
+
export declare const ToastClose: import("react").ForwardRefExoticComponent<Omit<Toast.ToastCloseProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
12
|
+
export interface ToasterItemProps extends ToastItem {
|
|
13
|
+
/** Which edge the stack is anchored to — decides which way this animates. */
|
|
14
|
+
edge: 'top' | 'bottom';
|
|
15
|
+
onOpenChange: (open: boolean) => void;
|
|
16
|
+
}
|
|
17
|
+
declare const ToasterItem: ({ status, title: itemTitle, description: itemDescription, duration, open, edge, onOpenChange, }: ToasterItemProps) => import("react").JSX.Element;
|
|
18
|
+
export default ToasterItem;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default, type ToasterPosition, type ToasterProps } from './Toaster';
|
|
1
|
+
export { default, ToastAction, ToastClose, ToastDescription, ToastTitle, type ToastActionProps, type ToastCloseProps, type ToastDescriptionProps, type ToasterPosition, type ToasterProps, type ToastTitleProps, } from './Toaster';
|
|
2
2
|
export { toast, type ToastItem, type ToastOptions } from './toastStore';
|
|
@@ -12,8 +12,8 @@ export interface ToastItem {
|
|
|
12
12
|
title: string;
|
|
13
13
|
description?: string;
|
|
14
14
|
duration: number;
|
|
15
|
-
/**
|
|
16
|
-
|
|
15
|
+
/** Controls Radix's `Toast.Root` — false starts its exit animation. */
|
|
16
|
+
open: boolean;
|
|
17
17
|
}
|
|
18
18
|
export declare const TOAST_EXIT_DURATION_MS = 150;
|
|
19
19
|
export declare const subscribe: (listener: () => void) => (() => void);
|
package/dist/esm/empty-state.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { EmptyState as default } from "./288.js";
|
|
1
|
+
export { EmptyState as default, EmptyStateAction, EmptyStateDescription, EmptyStateIcon, EmptyStateTitle } from "./288.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ErrorBoundary as default } from "./880.js";
|
|
1
|
+
export { ErrorBoundary as default, ErrorBoundaryContent, ErrorBoundaryFallback } from "./880.js";
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export { default as Alert, type AlertProps } from './components/alert';
|
|
2
|
-
export { default as Banner, type BannerProps } from './components/banner';
|
|
3
|
-
export { default as CircularProgress, type CircularProgressProps, } from './components/circular-progress';
|
|
4
|
-
export { default as EmptyState, type EmptyStateProps } from './components/empty-state';
|
|
5
|
-
export { default as ErrorBoundary, type ErrorBoundaryFallbackProps, type ErrorBoundaryProps, } from './components/error-boundary';
|
|
6
|
-
export { default as InlineMessage, type InlineMessageProps } from './components/inline-message';
|
|
7
|
-
export { default as LoadingOverlay, type LoadingOverlayProps } from './components/loading-overlay';
|
|
8
|
-
export { default as ProgressBar, type ProgressBarProps } from './components/progress-bar';
|
|
1
|
+
export { default as Alert, AlertBody, AlertDescription, AlertIcon, AlertTitle, type AlertBodyProps, type AlertDescriptionProps, type AlertIconProps, type AlertProps, type AlertTitleProps, } from './components/alert';
|
|
2
|
+
export { default as Banner, BannerIcon, type BannerIconProps, type BannerProps, } from './components/banner';
|
|
3
|
+
export { default as CircularProgress, CircularProgressIndicator, type CircularProgressIndicatorProps, type CircularProgressProps, } from './components/circular-progress';
|
|
4
|
+
export { default as EmptyState, EmptyStateAction, EmptyStateDescription, EmptyStateIcon, EmptyStateTitle, type EmptyStateActionProps, type EmptyStateDescriptionProps, type EmptyStateIconProps, type EmptyStateProps, type EmptyStateTitleProps, } from './components/empty-state';
|
|
5
|
+
export { default as ErrorBoundary, ErrorBoundaryContent, ErrorBoundaryFallback, type ErrorBoundaryContentProps, type ErrorBoundaryFallbackProps, type ErrorBoundaryFallbackRenderProps, type ErrorBoundaryProps, } from './components/error-boundary';
|
|
6
|
+
export { default as InlineMessage, InlineMessageIcon, type InlineMessageIconProps, type InlineMessageProps, } from './components/inline-message';
|
|
7
|
+
export { default as LoadingOverlay, LoadingOverlayBackdrop, LoadingOverlayContent, type LoadingOverlayBackdropProps, type LoadingOverlayContentProps, type LoadingOverlayProps, } from './components/loading-overlay';
|
|
8
|
+
export { default as ProgressBar, ProgressBarIndicator, type ProgressBarIndicatorProps, type ProgressBarProps, } from './components/progress-bar';
|
|
9
9
|
export { default as Skeleton, type SkeletonProps } from './components/skeleton';
|
|
10
10
|
export { default as Spinner, type SpinnerProps } from './components/spinner';
|
|
11
|
-
export { default as Toaster, toast, type ToasterPosition, type ToasterProps, type ToastItem, type ToastOptions, } from './components/toaster';
|
|
11
|
+
export { default as Toaster, toast, ToastAction, ToastClose, ToastDescription, ToastTitle, type ToasterPosition, type ToasterProps, type ToastActionProps, type ToastCloseProps, type ToastDescriptionProps, type ToastItem, type ToastOptions, type ToastTitleProps, } from './components/toaster';
|
|
12
12
|
export type { Status } from './status';
|
package/dist/esm/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { Alert } from "./903.js";
|
|
2
|
-
export { Banner } from "./989.js";
|
|
3
|
-
export { CircularProgress } from "./266.js";
|
|
4
|
-
export { EmptyState } from "./288.js";
|
|
5
|
-
export { ErrorBoundary } from "./880.js";
|
|
6
|
-
export { InlineMessage } from "./516.js";
|
|
7
|
-
export { LoadingOverlay } from "./158.js";
|
|
8
|
-
export { ProgressBar } from "./872.js";
|
|
1
|
+
export { Alert, AlertBody, AlertDescription, AlertIcon, AlertTitle } from "./903.js";
|
|
2
|
+
export { Banner, BannerIcon } from "./989.js";
|
|
3
|
+
export { CircularProgress, CircularProgressIndicator } from "./266.js";
|
|
4
|
+
export { EmptyState, EmptyStateAction, EmptyStateDescription, EmptyStateIcon, EmptyStateTitle } from "./288.js";
|
|
5
|
+
export { ErrorBoundary, ErrorBoundaryContent, ErrorBoundaryFallback } from "./880.js";
|
|
6
|
+
export { InlineMessage, InlineMessageIcon } from "./516.js";
|
|
7
|
+
export { LoadingOverlay, LoadingOverlayBackdrop, LoadingOverlayContent } from "./158.js";
|
|
8
|
+
export { ProgressBar, ProgressBarIndicator } from "./872.js";
|
|
9
9
|
export { Skeleton } from "./495.js";
|
|
10
10
|
export { Spinner } from "./703.js";
|
|
11
|
-
export { Toaster, toast } from "./147.js";
|
|
11
|
+
export { ToastAction, ToastClose, ToastDescription, ToastTitle, Toaster, toast } from "./147.js";
|