@visin/frontend-core 1.17.0 → 1.18.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.
- package/dist/components/Page/ConfirmDialog.d.ts +27 -0
- package/dist/components/Page/ConfirmDialog.d.ts.map +1 -0
- package/dist/components/Page/ConfirmDialog.js +11 -0
- package/dist/components/Page/ConfirmDialog.js.map +1 -0
- package/dist/components/Page/ListSkeleton.d.ts +12 -0
- package/dist/components/Page/ListSkeleton.d.ts.map +1 -0
- package/dist/components/Page/ListSkeleton.js +10 -0
- package/dist/components/Page/ListSkeleton.js.map +1 -0
- package/dist/components/Page/index.d.ts +4 -0
- package/dist/components/Page/index.d.ts.map +1 -1
- package/dist/components/Page/index.js +2 -0
- package/dist/components/Page/index.js.map +1 -1
- package/dist/components/ShareButton.d.ts.map +1 -1
- package/dist/components/ShareButton.js +12 -4
- package/dist/components/ShareButton.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface ConfirmDialogProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
/** The question, as a sentence: "Delete this comparison?" */
|
|
5
|
+
title: string;
|
|
6
|
+
/** What will happen, and what will not be possible afterwards. */
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
/** The button that does it, named for the act: "Delete", not "OK". */
|
|
9
|
+
confirmLabel: string;
|
|
10
|
+
/** The same button while it runs; defaults to the label with an ellipsis. */
|
|
11
|
+
busyLabel?: string;
|
|
12
|
+
/** An act that cannot be taken back is drawn in the error colour. Defaults to true. */
|
|
13
|
+
destructive?: boolean;
|
|
14
|
+
/** Holds both buttons and the backdrop while the act runs. */
|
|
15
|
+
busy?: boolean;
|
|
16
|
+
/** Why the last attempt was refused, shown where the person is looking. */
|
|
17
|
+
error?: string | null;
|
|
18
|
+
onConfirm: () => void;
|
|
19
|
+
onCancel: () => void;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* One way to ask "are you sure?": a question, what will happen, and a button named for it. It keeps itself open with
|
|
23
|
+
* the reason when the act is refused, and holds still while the act runs, so a second click or a stray backdrop tap
|
|
24
|
+
* cannot interrupt it. Cancel is focused first, so Enter on a destructive prompt backs out.
|
|
25
|
+
*/
|
|
26
|
+
export declare function ConfirmDialog({ open, title, children, confirmLabel, busyLabel, destructive, busy, error, onConfirm, onCancel }: ConfirmDialogProps): import("react").JSX.Element;
|
|
27
|
+
//# sourceMappingURL=ConfirmDialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfirmDialog.d.ts","sourceRoot":"","sources":["../../../src/components/Page/ConfirmDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,OAAO,CAAC;IACd,6DAA6D;IAC7D,KAAK,EAAE,MAAM,CAAC;IACd,kEAAkE;IAClE,QAAQ,EAAE,SAAS,CAAC;IACpB,sEAAsE;IACtE,YAAY,EAAE,MAAM,CAAC;IACrB,6EAA6E;IAC7E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uFAAuF;IACvF,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,8DAA8D;IAC9D,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,2EAA2E;IAC3E,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,EAC5B,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,WAAkB,EAClB,IAAY,EACZ,KAAK,EACL,SAAS,EACT,QAAQ,EACT,EAAE,kBAAkB,+BA4BpB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Alert, Button, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle } from '@mui/material';
|
|
3
|
+
/**
|
|
4
|
+
* One way to ask "are you sure?": a question, what will happen, and a button named for it. It keeps itself open with
|
|
5
|
+
* the reason when the act is refused, and holds still while the act runs, so a second click or a stray backdrop tap
|
|
6
|
+
* cannot interrupt it. Cancel is focused first, so Enter on a destructive prompt backs out.
|
|
7
|
+
*/
|
|
8
|
+
export function ConfirmDialog({ open, title, children, confirmLabel, busyLabel, destructive = true, busy = false, error, onConfirm, onCancel }) {
|
|
9
|
+
return (_jsxs(Dialog, { open: open, onClose: busy ? undefined : onCancel, "aria-labelledby": "confirm-dialog-title", children: [_jsx(DialogTitle, { id: "confirm-dialog-title", children: title }), _jsxs(DialogContent, { children: [_jsx(DialogContentText, { component: "div", children: children }), error && (_jsx(Alert, { severity: "error", sx: { mt: 2 }, children: error }))] }), _jsxs(DialogActions, { children: [_jsx(Button, { onClick: onCancel, disabled: busy, autoFocus: destructive, children: "Cancel" }), _jsx(Button, { onClick: onConfirm, disabled: busy, variant: "contained", color: destructive ? 'error' : 'primary', autoFocus: !destructive, children: busy ? (busyLabel ?? `${confirmLabel}…`) : confirmLabel })] })] }));
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=ConfirmDialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfirmDialog.js","sourceRoot":"","sources":["../../../src/components/Page/ConfirmDialog.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAsBpH;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,EAC5B,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,WAAW,GAAG,IAAI,EAClB,IAAI,GAAG,KAAK,EACZ,KAAK,EACL,SAAS,EACT,QAAQ,EACW;IACnB,OAAO,CACL,MAAC,MAAM,IAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,qBAAkB,sBAAsB,aAC9F,KAAC,WAAW,IAAC,EAAE,EAAC,sBAAsB,YAAE,KAAK,GAAe,EAC5D,MAAC,aAAa,eACZ,KAAC,iBAAiB,IAAC,SAAS,EAAC,KAAK,YAAE,QAAQ,GAAqB,EAChE,KAAK,IAAI,CACR,KAAC,KAAK,IAAC,QAAQ,EAAC,OAAO,EAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,YAClC,KAAK,GACA,CACT,IACa,EAChB,MAAC,aAAa,eACZ,KAAC,MAAM,IAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,uBAExD,EACT,KAAC,MAAM,IACL,OAAO,EAAE,SAAS,EAClB,QAAQ,EAAE,IAAI,EACd,OAAO,EAAC,WAAW,EACnB,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,EACxC,SAAS,EAAE,CAAC,WAAW,YAEtB,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,IAAI,GAAG,YAAY,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,GACjD,IACK,IACT,CACV,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface ListSkeletonProps {
|
|
2
|
+
/** How many placeholder rows. Defaults to 5. */
|
|
3
|
+
rows?: number;
|
|
4
|
+
/** Names the region for assistive technology. Defaults to "Loading". */
|
|
5
|
+
label?: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* The shape of a list while it loads: rows where the rows will be. A spinner in the middle of an empty page says only
|
|
9
|
+
* that something is happening; this says what is coming, and the page does not jump when it arrives.
|
|
10
|
+
*/
|
|
11
|
+
export declare function ListSkeleton({ rows, label }: ListSkeletonProps): import("react").JSX.Element;
|
|
12
|
+
//# sourceMappingURL=ListSkeleton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListSkeleton.d.ts","sourceRoot":"","sources":["../../../src/components/Page/ListSkeleton.tsx"],"names":[],"mappings":"AAEA,MAAM,WAAW,iBAAiB;IAChC,gDAAgD;IAChD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wEAAwE;IACxE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAAE,IAAQ,EAAE,KAAiB,EAAE,EAAE,iBAAiB,+BAc9E"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Skeleton } from '@mui/material';
|
|
3
|
+
/**
|
|
4
|
+
* The shape of a list while it loads: rows where the rows will be. A spinner in the middle of an empty page says only
|
|
5
|
+
* that something is happening; this says what is coming, and the page does not jump when it arrives.
|
|
6
|
+
*/
|
|
7
|
+
export function ListSkeleton({ rows = 5, label = 'Loading' }) {
|
|
8
|
+
return (_jsx(Box, { role: "status", "aria-label": label, "aria-busy": "true", sx: { display: 'grid', gap: 1.5 }, children: Array.from({ length: rows }, (_, index) => (_jsxs(Box, { sx: { display: 'flex', alignItems: 'center', gap: 2 }, children: [_jsx(Skeleton, { variant: "rounded", width: 40, height: 40, sx: { flexShrink: 0 } }), _jsxs(Box, { sx: { flex: 1, minWidth: 0 }, children: [_jsx(Skeleton, { width: `${70 - (index % 3) * 12}%` }), _jsx(Skeleton, { width: `${40 + (index % 2) * 15}%` })] })] }, index))) }));
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=ListSkeleton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListSkeleton.js","sourceRoot":"","sources":["../../../src/components/Page/ListSkeleton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAS9C;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,EAAE,IAAI,GAAG,CAAC,EAAE,KAAK,GAAG,SAAS,EAAqB;IAC7E,OAAO,CACL,KAAC,GAAG,IAAC,IAAI,EAAC,QAAQ,gBAAa,KAAK,eAAY,MAAM,EAAC,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,YACrF,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,CAC1C,MAAC,GAAG,IAAa,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,aACpE,KAAC,QAAQ,IAAC,OAAO,EAAC,SAAS,EAAC,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,GAAI,EAC5E,MAAC,GAAG,IAAC,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,aAC/B,KAAC,QAAQ,IAAC,KAAK,EAAE,GAAG,EAAE,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,GAAI,EAChD,KAAC,QAAQ,IAAC,KAAK,EAAE,GAAG,EAAE,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,GAAI,IAC5C,KALE,KAAK,CAMT,CACP,CAAC,GACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -11,4 +11,8 @@ export type { EmptyStateProps } from './EmptyState';
|
|
|
11
11
|
export { ResponsiveActions } from './ResponsiveActions';
|
|
12
12
|
export type { ResponsiveAction, ResponsiveActionsProps } from './ResponsiveActions';
|
|
13
13
|
export { TAB_BAR_HEIGHT, useCompactLayout } from './layout';
|
|
14
|
+
export { ConfirmDialog } from './ConfirmDialog';
|
|
15
|
+
export type { ConfirmDialogProps } from './ConfirmDialog';
|
|
16
|
+
export { ListSkeleton } from './ListSkeleton';
|
|
17
|
+
export type { ListSkeletonProps } from './ListSkeleton';
|
|
14
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Page/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Page/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -5,4 +5,6 @@ export { SectionHeading } from './SectionHeading';
|
|
|
5
5
|
export { EmptyState } from './EmptyState';
|
|
6
6
|
export { ResponsiveActions } from './ResponsiveActions';
|
|
7
7
|
export { TAB_BAR_HEIGHT, useCompactLayout } from './layout';
|
|
8
|
+
export { ConfirmDialog } from './ConfirmDialog';
|
|
9
|
+
export { ListSkeleton } from './ListSkeleton';
|
|
8
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Page/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE7C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Page/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE7C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShareButton.d.ts","sourceRoot":"","sources":["../../src/components/ShareButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ShareButton.d.ts","sourceRoot":"","sources":["../../src/components/ShareButton.tsx"],"names":[],"mappings":"AAkDA,oHAAoH;AACpH,wBAAgB,WAAW,CAAC,EAAE,GAAG,EAAE,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,sCAEpD"}
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from 'react';
|
|
3
|
-
import { Alert,
|
|
4
|
-
import { Share } from '@mui/icons-material';
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
|
+
import { Alert, Chip, Dialog, DialogContent, DialogTitle, IconButton, TextField, Tooltip } from '@mui/material';
|
|
4
|
+
import { Check, Share } from '@mui/icons-material';
|
|
5
|
+
/** How long the "Link copied" tag stays, when focus has not already left. */
|
|
6
|
+
const COPIED_TAG_MS = 2500;
|
|
5
7
|
function ShareButtonForUrl({ url }) {
|
|
6
8
|
const [copied, setCopied] = useState(false);
|
|
7
9
|
const [manual, setManual] = useState(false);
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
if (!copied)
|
|
12
|
+
return undefined;
|
|
13
|
+
const timer = setTimeout(() => setCopied(false), COPIED_TAG_MS);
|
|
14
|
+
return () => clearTimeout(timer);
|
|
15
|
+
}, [copied]);
|
|
8
16
|
const copy = async () => {
|
|
9
17
|
try {
|
|
10
18
|
await navigator.clipboard.writeText(url);
|
|
@@ -14,7 +22,7 @@ function ShareButtonForUrl({ url }) {
|
|
|
14
22
|
setManual(true);
|
|
15
23
|
}
|
|
16
24
|
};
|
|
17
|
-
return (_jsxs(_Fragment, { children: [_jsx(
|
|
25
|
+
return (_jsxs(_Fragment, { children: [_jsx(Tooltip, { title: "Copy link", children: _jsx(IconButton, { size: "small", "aria-label": "Share", onClick: () => void copy(), onBlur: () => setCopied(false), children: _jsx(Share, { fontSize: "small" }) }) }), copied && _jsx(Chip, { role: "status", size: "small", color: "success", variant: "outlined", icon: _jsx(Check, {}), label: "Link copied" }), _jsxs(Dialog, { open: manual, onClose: () => setManual(false), fullWidth: true, maxWidth: "sm", children: [_jsx(DialogTitle, { children: "Share this page" }), _jsxs(DialogContent, { children: [_jsx(Alert, { severity: "info", sx: { mb: 2 }, children: "Copy this link to share the page." }), _jsx(TextField, { label: "Share link", value: url, fullWidth: true, slotProps: { input: { readOnly: true } }, onFocus: (event) => event.target.select() })] })] })] }));
|
|
18
26
|
}
|
|
19
27
|
/** Copies the preview URL, with manual selection when clipboard access is unavailable. State belongs to one URL. */
|
|
20
28
|
export function ShareButton({ url }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShareButton.js","sourceRoot":"","sources":["../../src/components/ShareButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ShareButton.js","sourceRoot":"","sources":["../../src/components/ShareButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAChH,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAEnD,6EAA6E;AAC7E,MAAM,aAAa,GAAG,IAAI,CAAC;AAE3B,SAAS,iBAAiB,CAAC,EAAE,GAAG,EAAmB;IACjD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC5C,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC5C,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,MAAM;YAAE,OAAO,SAAS,CAAC;QAC9B,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,aAAa,CAAC,CAAC;QAChE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EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,EACxC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,GACzC,IACY,IACT,IACR,CACJ,CAAC;AACJ,CAAC;AAED,oHAAoH;AACpH,MAAM,UAAU,WAAW,CAAC,EAAE,GAAG,EAAoB;IACnD,OAAO,GAAG,CAAC,CAAC,CAAC,KAAC,iBAAiB,IAAW,GAAG,EAAE,GAAG,IAAb,GAAG,CAAc,CAAC,CAAC,CAAC,IAAI,CAAC;AAChE,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -9,8 +9,8 @@ export type { ErrorPageProps } from './components/ErrorPage';
|
|
|
9
9
|
export { AppLayout } from './components/AppLayout';
|
|
10
10
|
export { Markdown, MAX_MARKDOWN_LENGTH } from './components/Markdown';
|
|
11
11
|
export type { AppLayoutProps, AppLayoutNavGroup, AppLayoutNavItem, AppLayoutInternalNavItem, AppLayoutExternalNavItem, AppLayoutRecent, AppLayoutSiteLink, AppLayoutUser } from './components/AppLayout';
|
|
12
|
-
export { PageHeader, Panel, ListRow, RowIcon, SectionHeading, EmptyState, ResponsiveActions, TAB_BAR_HEIGHT, useCompactLayout } from './components/Page';
|
|
13
|
-
export type { PageHeaderProps, PageAction, PanelProps, ListRowProps, SectionHeadingProps, EmptyStateProps, ResponsiveAction, ResponsiveActionsProps } from './components/Page';
|
|
12
|
+
export { PageHeader, Panel, ListRow, RowIcon, SectionHeading, EmptyState, ResponsiveActions, ConfirmDialog, ListSkeleton, TAB_BAR_HEIGHT, useCompactLayout } from './components/Page';
|
|
13
|
+
export type { PageHeaderProps, PageAction, PanelProps, ListRowProps, SectionHeadingProps, EmptyStateProps, ResponsiveAction, ResponsiveActionsProps, ConfirmDialogProps, ListSkeletonProps } from './components/Page';
|
|
14
14
|
export { createVisinTheme, visinTheme, VISIN_COLORS, COLOR_SCHEME_ATTRIBUTE, COLOR_MODE_STORAGE_KEY, COLOR_SCHEME_STORAGE_KEY, brand, schemes, ink, surface, pageBackground, glass, glassInteractive, liftOnHover, raisedShadow, mainAction, chrome, onImage, tint, livePalette, chartSeries } from './theme';
|
|
15
15
|
export type { ColorSchemeName } from './theme';
|
|
16
16
|
export { VisinThemeProvider, ColorModeSetting, COLOR_MODE_OPTIONS, useThemeColorMeta, useActivePalette, useChartColors } from './components/ColorMode';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACtG,YAAY,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACvD,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAElF,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACtE,YAAY,EACV,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,wBAAwB,EACxB,wBAAwB,EACxB,eAAe,EACf,iBAAiB,EACjB,aAAa,EACd,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,UAAU,EACV,KAAK,EACL,OAAO,EACP,OAAO,EACP,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,gB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MAAM,4BAA4B,CAAC;AAE1F,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,YAAY,EAAE,WAAW,EAAE,kBAAkB,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrG,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,YAAY,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAEjF,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ export { Loader } from './components/Loader';
|
|
|
5
5
|
export { ErrorPage } from './components/ErrorPage';
|
|
6
6
|
export { AppLayout } from './components/AppLayout';
|
|
7
7
|
export { Markdown, MAX_MARKDOWN_LENGTH } from './components/Markdown';
|
|
8
|
-
export { PageHeader, Panel, ListRow, RowIcon, SectionHeading, EmptyState, ResponsiveActions, TAB_BAR_HEIGHT, useCompactLayout } from './components/Page';
|
|
8
|
+
export { PageHeader, Panel, ListRow, RowIcon, SectionHeading, EmptyState, ResponsiveActions, ConfirmDialog, ListSkeleton, TAB_BAR_HEIGHT, useCompactLayout } from './components/Page';
|
|
9
9
|
export { createVisinTheme, visinTheme, VISIN_COLORS, COLOR_SCHEME_ATTRIBUTE, COLOR_MODE_STORAGE_KEY, COLOR_SCHEME_STORAGE_KEY, brand, schemes, ink, surface, pageBackground, glass, glassInteractive, liftOnHover, raisedShadow, mainAction, chrome, onImage, tint, livePalette, chartSeries } from './theme';
|
|
10
10
|
export { VisinThemeProvider, ColorModeSetting, COLOR_MODE_OPTIONS, useThemeColorMeta, useActivePalette, useChartColors } from './components/ColorMode';
|
|
11
11
|
export { OwnerPicker, VisibilitySwitch, OwnerChip, TransferOwnershipDialog, transferTargets, ownerLabel } from './components/Ownership';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,mFAAmF;AAEnF,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAItG,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAWtE,OAAO,EACL,UAAU,EACV,KAAK,EACL,OAAO,EACP,OAAO,EACP,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EACjB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,mFAAmF;AAEnF,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAItG,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAWtE,OAAO,EACL,UAAU,EACV,KAAK,EACL,OAAO,EACP,OAAO,EACP,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,aAAa,EACb,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