@shipfox/react-ui 0.20.0 → 0.21.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.
|
@@ -1,8 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
import { type AlertProps } from '../../../components/alert';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
export interface DashboardAlertProps extends AlertProps {
|
|
2
4
|
title?: string;
|
|
3
5
|
description?: string;
|
|
4
6
|
onDismiss?: () => void;
|
|
5
7
|
className?: string;
|
|
8
|
+
variant?: AlertProps['variant'];
|
|
9
|
+
primaryAction?: {
|
|
10
|
+
label: string | ReactNode;
|
|
11
|
+
onClick: () => void;
|
|
12
|
+
};
|
|
13
|
+
secondaryAction?: {
|
|
14
|
+
label: string | ReactNode;
|
|
15
|
+
onClick: () => void;
|
|
16
|
+
};
|
|
6
17
|
}
|
|
7
|
-
export declare function DashboardAlert({ title, description, onDismiss, className, }: DashboardAlertProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function DashboardAlert({ title, description, onDismiss, className, variant, primaryAction, secondaryAction, ...props }: DashboardAlertProps): import("react/jsx-runtime").JSX.Element;
|
|
8
19
|
//# sourceMappingURL=dashboard-alert.d.ts.map
|
|
@@ -1,18 +1,31 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Alert, AlertClose, AlertContent, AlertDescription, AlertTitle } from '../../../components/alert/index.js';
|
|
3
|
-
export function DashboardAlert({ title
|
|
2
|
+
import { Alert, AlertAction, AlertActions, AlertClose, AlertContent, AlertDescription, AlertTitle } from '../../../components/alert/index.js';
|
|
3
|
+
export function DashboardAlert({ title, description, onDismiss, className, variant = 'info', primaryAction, secondaryAction, ...props }) {
|
|
4
4
|
return /*#__PURE__*/ _jsxs(Alert, {
|
|
5
|
-
variant:
|
|
5
|
+
variant: variant,
|
|
6
6
|
onOpenChange: (open)=>!open && onDismiss?.(),
|
|
7
7
|
className: className,
|
|
8
|
+
...props,
|
|
8
9
|
children: [
|
|
9
10
|
/*#__PURE__*/ _jsxs(AlertContent, {
|
|
10
11
|
children: [
|
|
11
|
-
/*#__PURE__*/ _jsx(AlertTitle, {
|
|
12
|
+
title && /*#__PURE__*/ _jsx(AlertTitle, {
|
|
12
13
|
children: title
|
|
13
14
|
}),
|
|
14
|
-
/*#__PURE__*/ _jsx(AlertDescription, {
|
|
15
|
+
description && /*#__PURE__*/ _jsx(AlertDescription, {
|
|
15
16
|
children: description
|
|
17
|
+
}),
|
|
18
|
+
(primaryAction || secondaryAction) && /*#__PURE__*/ _jsxs(AlertActions, {
|
|
19
|
+
children: [
|
|
20
|
+
primaryAction && /*#__PURE__*/ _jsx(AlertAction, {
|
|
21
|
+
onClick: primaryAction.onClick,
|
|
22
|
+
children: primaryAction.label
|
|
23
|
+
}),
|
|
24
|
+
secondaryAction && /*#__PURE__*/ _jsx(AlertAction, {
|
|
25
|
+
onClick: secondaryAction.onClick,
|
|
26
|
+
children: secondaryAction.label
|
|
27
|
+
})
|
|
28
|
+
]
|
|
16
29
|
})
|
|
17
30
|
]
|
|
18
31
|
}),
|
|
@@ -182,7 +182,18 @@ export function AnalyticsPage() {
|
|
|
182
182
|
/*#__PURE__*/ _jsxs("div", {
|
|
183
183
|
className: "flex-1 px-12 pb-12 pt-4 md:px-24 md:pb-24 space-y-12 md:space-y-16 lg:space-y-20 overflow-auto",
|
|
184
184
|
children: [
|
|
185
|
-
/*#__PURE__*/ _jsx(DashboardAlert, {
|
|
185
|
+
/*#__PURE__*/ _jsx(DashboardAlert, {
|
|
186
|
+
title: "Ship faster. At half the cost.",
|
|
187
|
+
description: "Track every workflow in one place, with full visibility into performance and reliability.",
|
|
188
|
+
primaryAction: {
|
|
189
|
+
label: 'Learn more',
|
|
190
|
+
onClick: ()=>undefined
|
|
191
|
+
},
|
|
192
|
+
secondaryAction: {
|
|
193
|
+
label: 'Dismiss',
|
|
194
|
+
onClick: ()=>undefined
|
|
195
|
+
}
|
|
196
|
+
}),
|
|
186
197
|
/*#__PURE__*/ _jsx(ExpressionFilterBar, {
|
|
187
198
|
value: resourceType,
|
|
188
199
|
onValueChange: setResourceType
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shipfox/react-ui",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.21.0",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -84,11 +84,11 @@
|
|
|
84
84
|
"vite": "^7.1.7",
|
|
85
85
|
"vitest": "^4.0.8",
|
|
86
86
|
"zod": "^4.1.12",
|
|
87
|
-
"@shipfox/ts-config": "1.3.5",
|
|
88
|
-
"@shipfox/vite": "1.2.2",
|
|
89
87
|
"@shipfox/biome": "1.6.0",
|
|
90
88
|
"@shipfox/swc": "1.2.2",
|
|
89
|
+
"@shipfox/ts-config": "1.3.5",
|
|
91
90
|
"@shipfox/typescript": "1.1.2",
|
|
91
|
+
"@shipfox/vite": "1.2.2",
|
|
92
92
|
"@shipfox/vitest": "1.2.0"
|
|
93
93
|
},
|
|
94
94
|
"scripts": {
|