@bayonai/mui-design 1.5.0 → 1.7.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/CHANGELOG.md +12 -0
- package/dist/cjs/actions/ActionMenu.d.ts +24 -0
- package/dist/cjs/actions/DialogActionButtons.d.ts +23 -0
- package/dist/cjs/actions/DialogActionButtons.js +2 -2
- package/dist/cjs/actions/LoadingIconButton.d.ts +11 -0
- package/dist/cjs/actions/StickyActionFooter.d.ts +14 -0
- package/dist/cjs/actions/StickySubmitButton.d.ts +10 -0
- package/dist/cjs/actions/index.d.ts +5 -0
- package/dist/cjs/client.d.ts +4 -0
- package/dist/cjs/components/BayonFlowVisual.d.ts +12 -0
- package/dist/cjs/components/BayonThemeModeToggle.d.ts +6 -0
- package/dist/cjs/components/IconTooltipButton.d.ts +10 -0
- package/dist/cjs/components/panels.d.ts +37 -0
- package/dist/cjs/drawers/BottomDrawer.d.ts +16 -0
- package/dist/cjs/drawers/MobileBottomDrawer.d.ts +20 -0
- package/dist/cjs/drawers/MobileBottomDrawerHeader.d.ts +11 -0
- package/dist/cjs/drawers/ResponsiveDrawer.d.ts +25 -0
- package/dist/cjs/drawers/drawerAppearance.d.ts +8 -0
- package/dist/cjs/drawers/index.d.ts +6 -0
- package/dist/cjs/drawers/useVisualViewportBottomInset.d.ts +6 -0
- package/dist/cjs/feedback/StatusNotice.d.ts +13 -0
- package/dist/cjs/feedback/index.d.ts +1 -0
- package/dist/cjs/index.d.ts +9 -0
- package/dist/cjs/internal/DialogChoiceTile.d.ts +20 -0
- package/dist/cjs/internal/DialogChoiceTile.js +60 -0
- package/dist/cjs/links/LinkAddressPreview.d.ts +19 -0
- package/dist/cjs/links/index.d.ts +3 -0
- package/dist/cjs/links/useLinkAddressPreview.d.ts +26 -0
- package/dist/cjs/location/GeographicLocationField.d.ts +26 -0
- package/dist/cjs/location/GoogleMapsAttribution.d.ts +1 -0
- package/dist/cjs/location/MetadataFieldGroup.d.ts +5 -0
- package/dist/cjs/location/MetadataValueField.d.ts +23 -0
- package/dist/cjs/location/SearchInputAction.d.ts +9 -0
- package/dist/cjs/location/TemplateBadge.d.ts +5 -0
- package/dist/cjs/location/VenueSearchDialog.d.ts +33 -0
- package/dist/cjs/location/index.d.ts +6 -0
- package/dist/cjs/pending/PendingChangesDialogShell.d.ts +2 -0
- package/dist/cjs/pending/PendingChangesDialogView.d.ts +2 -0
- package/dist/cjs/pending/PendingChangesIndicatorView.d.ts +10 -0
- package/dist/cjs/pending/index.d.ts +3 -0
- package/dist/cjs/pending/types.d.ts +55 -0
- package/dist/cjs/pricing/PlanUpgradeDialog.d.ts +17 -0
- package/dist/cjs/pricing/PlanUpgradeDialog.js +22 -0
- package/dist/cjs/pricing/PricingTable.d.ts +28 -0
- package/dist/cjs/pricing/index.d.ts +3 -0
- package/dist/cjs/pricing/index.js +3 -1
- package/dist/cjs/providers/BayonThemeProvider.d.ts +20 -0
- package/dist/cjs/sections/ExpandableSectionToggle.d.ts +12 -0
- package/dist/cjs/sections/index.d.ts +2 -0
- package/dist/cjs/styles/pageStyles.d.ts +15 -0
- package/dist/cjs/swipe/SwipeActionRow.d.ts +8 -0
- package/dist/cjs/swipe/index.d.ts +1 -0
- package/dist/cjs/theme/components.d.ts +2 -0
- package/dist/cjs/theme/createBayonTheme.d.ts +4 -0
- package/dist/cjs/theme/palette.d.ts +146 -0
- package/dist/cjs/theme/shadows.d.ts +2 -0
- package/dist/cjs/theme/types.d.ts +47 -0
- package/dist/cjs/theme/typography.d.ts +2 -0
- package/dist/cjs/toasts/ActionToast.d.ts +11 -0
- package/dist/cjs/toasts/Toast.d.ts +16 -0
- package/dist/cjs/toasts/index.d.ts +5 -0
- package/dist/cjs/toasts/useUpwardToastDismiss.d.ts +15 -0
- package/dist/cjs/uploads/CameraCaptureDialog.d.ts +22 -0
- package/dist/cjs/uploads/FileRow.d.ts +10 -0
- package/dist/cjs/uploads/FileSwipeActionRow.d.ts +1 -0
- package/dist/cjs/uploads/FileThumbnail.d.ts +5 -0
- package/dist/cjs/uploads/FileUpload.d.ts +26 -0
- package/dist/cjs/uploads/FileViewer.d.ts +9 -0
- package/dist/cjs/uploads/FileViewer.js +25 -21
- package/dist/cjs/uploads/ImageCropDialog.d.ts +26 -0
- package/dist/cjs/uploads/ImageInfoPanel.d.ts +24 -0
- package/dist/cjs/uploads/ImageInfoPanel.js +41 -0
- package/dist/cjs/uploads/ImageUploadQualityDialog.d.ts +13 -0
- package/dist/cjs/uploads/ImageUploadQualityDialog.js +57 -0
- package/dist/cjs/uploads/UploadProgressRing.d.ts +24 -0
- package/dist/cjs/uploads/cameraCropPresentation.d.ts +2 -0
- package/dist/cjs/uploads/index.d.ts +12 -0
- package/dist/cjs/uploads/index.js +5 -1
- package/dist/cjs/utils/createBayonEmotionCache.d.ts +1 -0
- package/dist/esm/actions/DialogActionButtons.js +3 -3
- package/dist/esm/internal/DialogChoiceTile.js +54 -0
- package/dist/esm/pricing/PlanUpgradeDialog.js +19 -0
- package/dist/esm/pricing/index.js +1 -0
- package/dist/esm/uploads/FileViewer.js +25 -21
- package/dist/esm/uploads/ImageInfoPanel.js +35 -0
- package/dist/esm/uploads/ImageUploadQualityDialog.js +51 -0
- package/dist/esm/uploads/index.js +2 -0
- package/dist/types/actions/DialogActionButtons.d.ts +2 -1
- package/dist/types/internal/DialogChoiceTile.d.ts +20 -0
- package/dist/types/pricing/PlanUpgradeDialog.d.ts +17 -0
- package/dist/types/pricing/index.d.ts +1 -0
- package/dist/types/uploads/ImageInfoPanel.d.ts +24 -0
- package/dist/types/uploads/ImageUploadQualityDialog.d.ts +13 -0
- package/dist/types/uploads/index.d.ts +2 -0
- package/docs/uploads-contract.md +9 -0
- package/package.json +119 -41
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.7.0 — 2026-11-20
|
|
4
|
+
|
|
5
|
+
- Add a controlled image quality dialog with a local preview and quality tiles.
|
|
6
|
+
- Add a host-configured plan upgrade dialog with selectable plan cards.
|
|
7
|
+
- Let dialog consumers opt into a labeled primary button.
|
|
8
|
+
|
|
9
|
+
## 1.6.0 — 2026-11-20
|
|
10
|
+
|
|
11
|
+
- Add the read-only `ImageInfoPanel` to `@bayonai/mui-design/uploads`.
|
|
12
|
+
|
|
13
|
+
|
|
3
14
|
All notable changes to `@bayonai/mui-design` will be documented in this file.
|
|
15
|
+
- Restore attachment preview when its loader is replaced and ship CommonJS declarations.
|
|
4
16
|
|
|
5
17
|
## 1.5.0 - 2026-11-19
|
|
6
18
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type SxProps, type Theme } from "@mui/material";
|
|
2
|
+
import { type ReactNode } from "react";
|
|
3
|
+
export type ActionMenuColor = "default" | "primary" | "secondary" | "error";
|
|
4
|
+
export type ActionMenuItem = {
|
|
5
|
+
color?: ActionMenuColor;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
icon?: ReactNode;
|
|
8
|
+
label: string;
|
|
9
|
+
onClick: () => void;
|
|
10
|
+
section?: string;
|
|
11
|
+
};
|
|
12
|
+
export type ActionMenuProps = {
|
|
13
|
+
actionColorSx?: Partial<Record<ActionMenuColor, SxProps<Theme>>>;
|
|
14
|
+
actions: ActionMenuItem[];
|
|
15
|
+
buttonSx?: SxProps<Theme>;
|
|
16
|
+
containerSx?: SxProps<Theme>;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
label?: string;
|
|
19
|
+
loading?: boolean;
|
|
20
|
+
loadingLabel?: string;
|
|
21
|
+
size?: "small" | "medium" | "large";
|
|
22
|
+
};
|
|
23
|
+
/** A compact, grouped action menu with an optional in-flight trigger state. */
|
|
24
|
+
export declare function ActionMenu({ actionColorSx, actions, buttonSx, containerSx, disabled, label, loading, loadingLabel, size, }: ActionMenuProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { SxProps, Theme } from "@mui/material/styles";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
export declare const compactDialogPaperSx: SxProps<Theme>;
|
|
4
|
+
export type DialogActionButtonsProps = {
|
|
5
|
+
confirmLabel: string;
|
|
6
|
+
confirmText?: string;
|
|
7
|
+
confirmDisabled?: boolean;
|
|
8
|
+
confirmColor?: "error" | "primary" | "secondary" | "success" | "warning";
|
|
9
|
+
confirmIcon?: ReactNode;
|
|
10
|
+
confirmType?: "button" | "submit";
|
|
11
|
+
onConfirm?: () => void;
|
|
12
|
+
sx?: SxProps<Theme>;
|
|
13
|
+
};
|
|
14
|
+
/** Keeps the modal's primary decision compact and explicitly labelled. */
|
|
15
|
+
export declare function DialogActionButtons({ confirmColor, confirmDisabled, confirmIcon, confirmLabel, confirmText, confirmType, onConfirm, sx, }: DialogActionButtonsProps): import("react").JSX.Element;
|
|
16
|
+
export declare function DialogActionProgress(): import("react").JSX.Element;
|
|
17
|
+
export type DialogCloseButtonProps = {
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
label?: string;
|
|
20
|
+
onClose: () => void;
|
|
21
|
+
sx?: SxProps<Theme>;
|
|
22
|
+
};
|
|
23
|
+
export declare function DialogCloseButton({ disabled, label, onClose, sx, }: DialogCloseButtonProps): import("react").JSX.Element;
|
|
@@ -21,8 +21,8 @@ exports.compactDialogPaperSx = {
|
|
|
21
21
|
overflowWrap: "anywhere",
|
|
22
22
|
};
|
|
23
23
|
/** Keeps the modal's primary decision compact and explicitly labelled. */
|
|
24
|
-
function DialogActionButtons({ confirmColor = "success", confirmDisabled = false, confirmIcon, confirmLabel, confirmType = "button", onConfirm, sx, }) {
|
|
25
|
-
return ((0, jsx_runtime_1.jsx)(material_1.DialogActions, { sx: sx, children: (0, jsx_runtime_1.jsx)(material_1.Stack, { direction: "row", spacing: 1, children: (0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: confirmLabel, children: (0, jsx_runtime_1.jsx)("span", { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { "aria-label": confirmLabel, color: confirmColor, disabled: confirmDisabled, onClick: confirmType === "submit" ? undefined : onConfirm, type: confirmType, children: confirmIcon !== null && confirmIcon !== void 0 ? confirmIcon : (0, jsx_runtime_1.jsx)(Check_1.default, {}) }) }) }) }) }));
|
|
24
|
+
function DialogActionButtons({ confirmColor = "success", confirmDisabled = false, confirmIcon, confirmLabel, confirmText, confirmType = "button", onConfirm, sx, }) {
|
|
25
|
+
return ((0, jsx_runtime_1.jsx)(material_1.DialogActions, { sx: sx, children: confirmText ? ((0, jsx_runtime_1.jsx)(material_1.Button, { "aria-label": confirmLabel, color: confirmColor, disabled: confirmDisabled, onClick: confirmType === "submit" ? undefined : onConfirm, startIcon: confirmIcon, type: confirmType, variant: "contained", children: confirmText })) : ((0, jsx_runtime_1.jsx)(material_1.Stack, { direction: "row", spacing: 1, children: (0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: confirmLabel, children: (0, jsx_runtime_1.jsx)("span", { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { "aria-label": confirmLabel, color: confirmColor, disabled: confirmDisabled, onClick: confirmType === "submit" ? undefined : onConfirm, type: confirmType, children: confirmIcon !== null && confirmIcon !== void 0 ? confirmIcon : (0, jsx_runtime_1.jsx)(Check_1.default, {}) }) }) }) })) }));
|
|
26
26
|
}
|
|
27
27
|
function DialogActionProgress() {
|
|
28
28
|
return (0, jsx_runtime_1.jsx)(material_1.CircularProgress, { color: "inherit", size: 20 });
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type IconButtonProps } from "@mui/material";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
export type LoadingIconButtonProps = Omit<IconButtonProps, "aria-label" | "children"> & {
|
|
4
|
+
"aria-label": string;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
loading?: boolean;
|
|
7
|
+
loadingLabel: string;
|
|
8
|
+
spinnerSize?: number;
|
|
9
|
+
};
|
|
10
|
+
/** Keeps an icon action's footprint while making an in-flight request visible. */
|
|
11
|
+
export declare function LoadingIconButton({ "aria-label": ariaLabel, children, disabled, loading, loadingLabel, spinnerSize, ...props }: LoadingIconButtonProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type SxProps, type Theme } from "@mui/material";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
export type StickyActionFooterProps = {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
sx?: SxProps<Theme>;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Keeps the final actions of a long, scrollable form in view.
|
|
9
|
+
*
|
|
10
|
+
* Product decision: this component owns local sticky positioning and neutral
|
|
11
|
+
* footer chrome only. The host owns its scroll container, any edge-to-edge
|
|
12
|
+
* bleed required by a padded surface, action layout, and form submission.
|
|
13
|
+
*/
|
|
14
|
+
export declare function StickyActionFooter({ children, sx }: StickyActionFooterProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ButtonProps, type SxProps, type Theme } from "@mui/material";
|
|
2
|
+
export type StickySubmitButtonProps = {
|
|
3
|
+
buttonSx?: SxProps<Theme>;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
footerSx?: SxProps<Theme>;
|
|
6
|
+
label?: string;
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
variant?: ButtonProps["variant"];
|
|
9
|
+
};
|
|
10
|
+
export declare function StickySubmitButton({ buttonSx, disabled, footerSx, label, loading, variant, }: StickySubmitButtonProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { ActionMenu, type ActionMenuColor, type ActionMenuItem, type ActionMenuProps, } from "./ActionMenu.js";
|
|
2
|
+
export { LoadingIconButton, type LoadingIconButtonProps, } from "./LoadingIconButton.js";
|
|
3
|
+
export { StickyActionFooter, type StickyActionFooterProps, } from "./StickyActionFooter.js";
|
|
4
|
+
export { StickySubmitButton, type StickySubmitButtonProps, } from "./StickySubmitButton.js";
|
|
5
|
+
export { compactDialogPaperSx, DialogActionButtons, DialogActionProgress, DialogCloseButton, type DialogActionButtonsProps, type DialogCloseButtonProps, } from "./DialogActionButtons.js";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type BoxProps } from '@mui/material/Box';
|
|
3
|
+
export type BayonFlowItem = {
|
|
4
|
+
label: React.ReactNode;
|
|
5
|
+
value: React.ReactNode;
|
|
6
|
+
color: string;
|
|
7
|
+
};
|
|
8
|
+
export interface BayonFlowVisualProps extends BoxProps {
|
|
9
|
+
items?: BayonFlowItem[];
|
|
10
|
+
caption?: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export declare function BayonFlowVisual({ items, caption, sx, ...props }: BayonFlowVisualProps): React.JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type IconButtonProps } from '@mui/material/IconButton';
|
|
3
|
+
import type { TooltipProps } from '@mui/material/Tooltip';
|
|
4
|
+
export interface IconTooltipButtonProps extends Omit<IconButtonProps, 'aria-label'> {
|
|
5
|
+
component?: React.ElementType;
|
|
6
|
+
href?: string;
|
|
7
|
+
label: string;
|
|
8
|
+
tooltipProps?: Omit<TooltipProps, 'title' | 'children'>;
|
|
9
|
+
}
|
|
10
|
+
export declare const IconTooltipButton: React.ForwardRefExoticComponent<Omit<IconTooltipButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type BoxProps } from '@mui/material/Box';
|
|
3
|
+
import { type StackProps } from '@mui/material/Stack';
|
|
4
|
+
export interface BayonPanelProps extends BoxProps {
|
|
5
|
+
hover?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function BayonPageShell({ sx, ...props }: BoxProps): React.JSX.Element;
|
|
8
|
+
export declare function BayonGradientHero({ sx, ...props }: BoxProps): React.JSX.Element;
|
|
9
|
+
export declare function BayonDarkPanel({ hover, sx, ...props }: BayonPanelProps): React.JSX.Element;
|
|
10
|
+
export declare function BayonAccentPanel({ hover, sx, ...props }: BayonPanelProps): React.JSX.Element;
|
|
11
|
+
export declare function BayonCtaPanel({ sx, ...props }: BoxProps): React.JSX.Element;
|
|
12
|
+
export declare function BayonContentBox({ sx, ...props }: BoxProps): React.JSX.Element;
|
|
13
|
+
export interface BayonMethodBoxProps extends BoxProps {
|
|
14
|
+
accentColor?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function BayonMethodBox({ accentColor, sx, ...props }: BayonMethodBoxProps): React.JSX.Element;
|
|
17
|
+
export interface BayonProjectCardProps extends Omit<BayonPanelProps, 'title'> {
|
|
18
|
+
category?: React.ReactNode;
|
|
19
|
+
status?: React.ReactNode;
|
|
20
|
+
title?: React.ReactNode;
|
|
21
|
+
body?: React.ReactNode;
|
|
22
|
+
actions?: React.ReactNode;
|
|
23
|
+
}
|
|
24
|
+
export declare function BayonProjectCard({ category, status, title, body, actions, children, hover, sx, ...props }: BayonProjectCardProps): React.JSX.Element;
|
|
25
|
+
export interface BayonPillarCardProps extends Omit<BoxProps, 'title'> {
|
|
26
|
+
accentColor?: string;
|
|
27
|
+
eyebrow?: React.ReactNode;
|
|
28
|
+
title?: React.ReactNode;
|
|
29
|
+
body?: React.ReactNode;
|
|
30
|
+
actions?: React.ReactNode;
|
|
31
|
+
}
|
|
32
|
+
export declare function BayonPillarCard({ accentColor, eyebrow, title, body, actions, children, sx, ...props }: BayonPillarCardProps): React.JSX.Element;
|
|
33
|
+
export interface BayonTechChipProps extends BoxProps {
|
|
34
|
+
label?: React.ReactNode;
|
|
35
|
+
}
|
|
36
|
+
export declare function BayonTechChip({ label, children, sx, ...props }: BayonTechChipProps): React.JSX.Element;
|
|
37
|
+
export declare function BayonPanelStack({ sx, ...props }: StackProps): React.JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { SxProps, Theme } from "@mui/material/styles";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
import { type DrawerAppearance } from "./drawerAppearance.js";
|
|
4
|
+
export declare function BottomDrawer({ children, appearance, closeTooltip, closeLabel, contentSx, dataComponent, disablePortal, headerActions, onClose, open, title, }: {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
appearance?: DrawerAppearance;
|
|
7
|
+
closeTooltip?: string;
|
|
8
|
+
closeLabel: string;
|
|
9
|
+
contentSx?: SxProps<Theme>;
|
|
10
|
+
dataComponent?: string;
|
|
11
|
+
disablePortal?: boolean;
|
|
12
|
+
headerActions?: ReactNode;
|
|
13
|
+
onClose: () => void;
|
|
14
|
+
open: boolean;
|
|
15
|
+
title: ReactNode;
|
|
16
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type DrawerAppearance } from "./drawerAppearance.js";
|
|
3
|
+
export declare const mobileBottomDrawerDismissDuration = 220;
|
|
4
|
+
export declare function MobileBottomDrawer({ ariaLabel, appearance, closeTooltip, children, contentScrollMode, dataComponent, dismiss, handleBackground, handlePlacement, headerLeft, headerRight, maxHeight, onClose, }: {
|
|
5
|
+
ariaLabel: string;
|
|
6
|
+
appearance?: DrawerAppearance;
|
|
7
|
+
closeTooltip?: string;
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
/** Chooses whether the drawer body or its direct child owns vertical scrolling. */
|
|
10
|
+
contentScrollMode?: "container" | "child";
|
|
11
|
+
dataComponent?: string;
|
|
12
|
+
/** Requests the standard dismiss animation before invoking onClose. */
|
|
13
|
+
dismiss?: boolean;
|
|
14
|
+
handleBackground?: "default" | "detailChrome";
|
|
15
|
+
handlePlacement?: "above-content" | "overlay";
|
|
16
|
+
headerLeft?: ReactNode;
|
|
17
|
+
headerRight?: ReactNode;
|
|
18
|
+
maxHeight?: string;
|
|
19
|
+
onClose: () => void;
|
|
20
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
type MobileBottomDrawerHeaderProps = {
|
|
3
|
+
closeLabel: string;
|
|
4
|
+
closeTooltip?: string;
|
|
5
|
+
dragHandle: ReactNode;
|
|
6
|
+
left: ReactNode;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
right?: ReactNode;
|
|
9
|
+
};
|
|
10
|
+
export declare function MobileBottomDrawerHeader({ closeLabel, closeTooltip, dragHandle, left, onClose, right, }: MobileBottomDrawerHeaderProps): import("react").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { SxProps, Theme } from "@mui/material/styles";
|
|
3
|
+
import type { DrawerAppearance } from "./drawerAppearance.js";
|
|
4
|
+
type DrawerPresentation = "desktop" | "mobile";
|
|
5
|
+
type ResponsiveDrawerProps = {
|
|
6
|
+
ariaLabel: string;
|
|
7
|
+
appearance?: DrawerAppearance;
|
|
8
|
+
closeTooltip?: string;
|
|
9
|
+
children: (presentation: DrawerPresentation) => ReactNode;
|
|
10
|
+
desktopContentSx?: SxProps<Theme>;
|
|
11
|
+
desktopCloseLabel?: string;
|
|
12
|
+
desktopDataComponent?: string;
|
|
13
|
+
desktopDisablePortal?: boolean;
|
|
14
|
+
desktopOpen?: boolean;
|
|
15
|
+
headerActions?: ReactNode;
|
|
16
|
+
mobileContentScrollMode?: "child" | "container";
|
|
17
|
+
mobileDataComponent?: string;
|
|
18
|
+
mobileDismiss?: boolean;
|
|
19
|
+
mobileOpen?: boolean;
|
|
20
|
+
onDesktopClose: () => void;
|
|
21
|
+
onMobileClose: () => void;
|
|
22
|
+
title: ReactNode;
|
|
23
|
+
};
|
|
24
|
+
export declare function ResponsiveDrawer({ ariaLabel, appearance, closeTooltip, children, desktopContentSx, desktopCloseLabel, desktopDataComponent, desktopDisablePortal, desktopOpen, headerActions, mobileContentScrollMode, mobileDataComponent, mobileDismiss, mobileOpen, onDesktopClose, onMobileClose, title, }: ResponsiveDrawerProps): import("react").JSX.Element | null;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { MobileBottomDrawer, mobileBottomDrawerDismissDuration, } from "./MobileBottomDrawer.js";
|
|
2
|
+
export { MobileBottomDrawerHeader } from "./MobileBottomDrawerHeader.js";
|
|
3
|
+
export { BottomDrawer } from "./BottomDrawer.js";
|
|
4
|
+
export { ResponsiveDrawer } from "./ResponsiveDrawer.js";
|
|
5
|
+
export { useVisualViewportBottomInset, getVisualViewportBottomInset, } from "./useVisualViewportBottomInset.js";
|
|
6
|
+
export type { DrawerAppearance } from "./drawerAppearance.js";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function getVisualViewportBottomInset({ layoutViewportHeight, visualViewportHeight, visualViewportOffsetTop, }: {
|
|
2
|
+
layoutViewportHeight: number;
|
|
3
|
+
visualViewportHeight: number;
|
|
4
|
+
visualViewportOffsetTop: number;
|
|
5
|
+
}): number;
|
|
6
|
+
export declare function useVisualViewportBottomInset(): number;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type SxProps, type Theme } from "@mui/material";
|
|
2
|
+
import type { AriaRole, ReactNode } from "react";
|
|
3
|
+
export type StatusNoticeTone = "error" | "info" | "success" | "warning";
|
|
4
|
+
export type StatusNoticeProps = {
|
|
5
|
+
action?: ReactNode;
|
|
6
|
+
compact?: boolean;
|
|
7
|
+
dataComponent?: string;
|
|
8
|
+
message: ReactNode;
|
|
9
|
+
role?: AriaRole;
|
|
10
|
+
sx?: SxProps<Theme>;
|
|
11
|
+
tone?: StatusNoticeTone;
|
|
12
|
+
};
|
|
13
|
+
export declare function StatusNotice({ action, compact, dataComponent, message, role, sx, tone, }: StatusNoticeProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { StatusNotice, type StatusNoticeProps, type StatusNoticeTone, } from "./StatusNotice.js";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './components/panels.js';
|
|
2
|
+
export * from './styles/pageStyles.js';
|
|
3
|
+
export * from './theme/components.js';
|
|
4
|
+
export * from './theme/createBayonTheme.js';
|
|
5
|
+
export * from './theme/palette.js';
|
|
6
|
+
export * from './theme/shadows.js';
|
|
7
|
+
export * from './theme/typography.js';
|
|
8
|
+
export * from './theme/types.js';
|
|
9
|
+
export * from './utils/createBayonEmotionCache.js';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
type DialogChoiceTileProps = {
|
|
3
|
+
label: string;
|
|
4
|
+
description?: ReactNode;
|
|
5
|
+
icon?: ReactNode;
|
|
6
|
+
selected: boolean;
|
|
7
|
+
autoFocus?: boolean;
|
|
8
|
+
} & ({
|
|
9
|
+
name: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
onSelect: () => void;
|
|
12
|
+
onLockedClick?: never;
|
|
13
|
+
} | {
|
|
14
|
+
onLockedClick: () => void;
|
|
15
|
+
name?: never;
|
|
16
|
+
disabled?: never;
|
|
17
|
+
onSelect?: never;
|
|
18
|
+
});
|
|
19
|
+
export declare function DialogChoiceTile(props: DialogChoiceTileProps): import("react").JSX.Element;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.DialogChoiceTile = DialogChoiceTile;
|
|
8
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
9
|
+
const CheckCircle_1 = __importDefault(require("@mui/icons-material/CheckCircle"));
|
|
10
|
+
const LockOutlined_1 = __importDefault(require("@mui/icons-material/LockOutlined"));
|
|
11
|
+
const material_1 = require("@mui/material");
|
|
12
|
+
function DialogChoiceTile(props) {
|
|
13
|
+
const { label, description, icon, selected, autoFocus } = props;
|
|
14
|
+
const sx = {
|
|
15
|
+
position: "relative",
|
|
16
|
+
display: "flex",
|
|
17
|
+
flexDirection: "column",
|
|
18
|
+
alignItems: icon ? "center" : "flex-start",
|
|
19
|
+
justifyContent: "center",
|
|
20
|
+
textAlign: icon ? "center" : "start",
|
|
21
|
+
gap: 0.5,
|
|
22
|
+
p: 1.5,
|
|
23
|
+
minWidth: 0,
|
|
24
|
+
minHeight: 80,
|
|
25
|
+
border: "1px solid",
|
|
26
|
+
borderColor: selected ? "success.main" : "divider",
|
|
27
|
+
borderRadius: 2,
|
|
28
|
+
backgroundColor: selected ? "action.selected" : "background.paper",
|
|
29
|
+
overflowWrap: "anywhere",
|
|
30
|
+
"&:hover": { backgroundColor: "action.hover" },
|
|
31
|
+
"&:has(input:focus-visible), &.Mui-focusVisible": {
|
|
32
|
+
outline: "2px solid",
|
|
33
|
+
outlineColor: "success.main",
|
|
34
|
+
outlineOffset: 2,
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
const content = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [selected || props.onLockedClick ? ((0, jsx_runtime_1.jsx)(material_1.Box, { "aria-hidden": true, sx: {
|
|
38
|
+
position: "absolute",
|
|
39
|
+
top: 8,
|
|
40
|
+
right: 8,
|
|
41
|
+
color: selected ? "success.main" : "text.secondary",
|
|
42
|
+
lineHeight: 0,
|
|
43
|
+
}, children: selected ? ((0, jsx_runtime_1.jsx)(CheckCircle_1.default, { fontSize: "small" })) : ((0, jsx_runtime_1.jsx)(LockOutlined_1.default, { fontSize: "small" })) })) : null, icon ? ((0, jsx_runtime_1.jsx)(material_1.Box, { "aria-hidden": true, sx: { lineHeight: 0 }, children: icon })) : null, (0, jsx_runtime_1.jsx)(material_1.Typography, { component: "span", variant: "subtitle2", sx: { pr: icon ? 0 : 3 }, children: label }), description ? ((0, jsx_runtime_1.jsx)(material_1.Typography, { component: "span", variant: "body2", color: "text.secondary", children: description })) : null] }));
|
|
44
|
+
if (props.onLockedClick) {
|
|
45
|
+
return ((0, jsx_runtime_1.jsx)(material_1.ButtonBase, { "aria-label": label, "aria-haspopup": "dialog", autoFocus: autoFocus, onClick: props.onLockedClick, sx: sx, type: "button", children: content }));
|
|
46
|
+
}
|
|
47
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { component: "label", sx: {
|
|
48
|
+
...sx,
|
|
49
|
+
cursor: props.disabled ? "default" : "pointer",
|
|
50
|
+
opacity: props.disabled ? 0.6 : 1,
|
|
51
|
+
}, children: [(0, jsx_runtime_1.jsx)(material_1.Box, { component: "input", type: "radio", name: props.name, "aria-label": label, autoFocus: autoFocus, checked: selected, disabled: props.disabled, onChange: props.onSelect, sx: {
|
|
52
|
+
position: "absolute",
|
|
53
|
+
inset: 0,
|
|
54
|
+
opacity: 0,
|
|
55
|
+
width: "100%",
|
|
56
|
+
height: "100%",
|
|
57
|
+
m: 0,
|
|
58
|
+
cursor: "inherit",
|
|
59
|
+
} }), content] }));
|
|
60
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type SxProps, type Theme } from "@mui/material";
|
|
2
|
+
import type { HTMLAttributes } from "react";
|
|
3
|
+
export type LinkAddressPreviewState = {
|
|
4
|
+
href: string;
|
|
5
|
+
label: string;
|
|
6
|
+
left: number;
|
|
7
|
+
top: number;
|
|
8
|
+
};
|
|
9
|
+
export type LinkAddressPreviewProps = Pick<HTMLAttributes<HTMLElement>, "id" | "className" | "onMouseEnter" | "onMouseLeave" | "onFocusCapture" | "onBlurCapture" | "onKeyDown" | "onClick"> & {
|
|
10
|
+
link: LinkAddressPreviewState;
|
|
11
|
+
ariaLabel?: string;
|
|
12
|
+
openLabel?: string;
|
|
13
|
+
sx?: SxProps<Theme>;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Shared presentation of the editor's destination card. Hosts own validated
|
|
17
|
+
* URLs, placement, portal/lifecycle and navigation policy; no metadata is fetched.
|
|
18
|
+
*/
|
|
19
|
+
export declare function LinkAddressPreview({ link, ariaLabel, openLabel, sx, ...events }: LinkAddressPreviewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type FocusEvent, type KeyboardEvent, type MouseEvent, type PointerEvent as ReactPointerEvent } from "react";
|
|
2
|
+
/** Product decision: hosts own link interaction; the shared UI card only displays
|
|
3
|
+
* a validated destination. The source previews/edits; the card navigates. */
|
|
4
|
+
export declare function useLinkAddressPreview(enabled?: boolean, onEdit?: () => void): {
|
|
5
|
+
linkProps(href: string, label: string): {
|
|
6
|
+
"aria-controls": string | undefined;
|
|
7
|
+
"aria-keyshortcuts": string;
|
|
8
|
+
onPointerDown: (event: ReactPointerEvent<HTMLAnchorElement>) => void;
|
|
9
|
+
onMouseEnter: (event: MouseEvent<HTMLAnchorElement>) => void;
|
|
10
|
+
onMouseLeave: () => void;
|
|
11
|
+
onFocus: (event: FocusEvent<HTMLAnchorElement>) => void;
|
|
12
|
+
onBlur: (event: FocusEvent<HTMLElement>) => void;
|
|
13
|
+
onKeyDown: (event: KeyboardEvent<HTMLAnchorElement>) => void;
|
|
14
|
+
} | {
|
|
15
|
+
"aria-controls"?: undefined;
|
|
16
|
+
"aria-keyshortcuts"?: undefined;
|
|
17
|
+
onPointerDown?: undefined;
|
|
18
|
+
onMouseEnter?: undefined;
|
|
19
|
+
onMouseLeave?: undefined;
|
|
20
|
+
onFocus?: undefined;
|
|
21
|
+
onBlur?: undefined;
|
|
22
|
+
onKeyDown?: undefined;
|
|
23
|
+
};
|
|
24
|
+
onClick(event: MouseEvent<HTMLAnchorElement>, href: string, label: string): void;
|
|
25
|
+
card: import("react").ReactPortal | null;
|
|
26
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type GoogleVenueReference, type VenueSuggestion, type VenueSearchCopy } from "./VenueSearchDialog.js";
|
|
3
|
+
export type GeographicLocationCopy = {
|
|
4
|
+
fieldLabel: string;
|
|
5
|
+
empty: string;
|
|
6
|
+
choose: string;
|
|
7
|
+
change: string;
|
|
8
|
+
clear: string;
|
|
9
|
+
openMaps: (label: string) => string;
|
|
10
|
+
};
|
|
11
|
+
export type GeographicLocationFieldProps = {
|
|
12
|
+
value?: {
|
|
13
|
+
label: string;
|
|
14
|
+
mapsUrl: string;
|
|
15
|
+
};
|
|
16
|
+
placeName?: string;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
canSearch?: boolean;
|
|
19
|
+
copyAction?: ReactNode;
|
|
20
|
+
copy?: Partial<GeographicLocationCopy>;
|
|
21
|
+
pickerCopy?: Partial<VenueSearchCopy>;
|
|
22
|
+
searchVenues: (query: string) => Promise<VenueSuggestion[]>;
|
|
23
|
+
onChange?: (value: GoogleVenueReference | undefined) => void;
|
|
24
|
+
};
|
|
25
|
+
/** Host adapters supply persisted values, copy behavior and an authorized lookup. */
|
|
26
|
+
export declare function GeographicLocationField({ value, placeName, disabled, canSearch, copyAction, copy, pickerCopy, searchVenues, onChange, }: GeographicLocationFieldProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function GoogleMapsAttribution(): import("react").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type StackProps } from "@mui/material";
|
|
2
|
+
/** Keep each label close to its value and separate neighboring fields. */
|
|
3
|
+
export declare const METADATA_FIELD_LABEL_SPACING = 0.25;
|
|
4
|
+
export declare const METADATA_FIELD_GROUP_SPACING = 2.5;
|
|
5
|
+
export declare function MetadataFieldGroup(props: StackProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export declare const metadataFieldLabelSx: {
|
|
3
|
+
readonly color: "text.secondary";
|
|
4
|
+
readonly fontSize: "0.75rem";
|
|
5
|
+
readonly fontWeight: 700;
|
|
6
|
+
readonly letterSpacing: "0.04em";
|
|
7
|
+
readonly lineHeight: 1.2;
|
|
8
|
+
readonly textTransform: "uppercase";
|
|
9
|
+
};
|
|
10
|
+
export declare const metadataValueRowSx: {
|
|
11
|
+
readonly alignItems: "center";
|
|
12
|
+
readonly borderBottom: 1;
|
|
13
|
+
readonly borderColor: "divider";
|
|
14
|
+
readonly minHeight: 40;
|
|
15
|
+
readonly minWidth: 0;
|
|
16
|
+
};
|
|
17
|
+
/** Compact label/value row; consumers own actions, wording and persistence. */
|
|
18
|
+
export type MetadataValueFieldProps = {
|
|
19
|
+
label: ReactNode;
|
|
20
|
+
children: ReactNode;
|
|
21
|
+
actions?: ReactNode;
|
|
22
|
+
};
|
|
23
|
+
export declare function MetadataValueField({ label, children, actions, }: MetadataValueFieldProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Shared trailing action for search text fields; typing never starts a lookup. */
|
|
2
|
+
export type SearchInputActionProps = {
|
|
3
|
+
label: string;
|
|
4
|
+
loadingLabel: string;
|
|
5
|
+
loading?: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
onSearch: () => void;
|
|
8
|
+
};
|
|
9
|
+
export declare function SearchInputAction({ label, loadingLabel, loading, disabled, onSearch, }: SearchInputActionProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export type VenueSuggestion = {
|
|
2
|
+
placeId: string;
|
|
3
|
+
name: string;
|
|
4
|
+
address?: string;
|
|
5
|
+
};
|
|
6
|
+
export type GoogleVenueReference = {
|
|
7
|
+
provider: "google";
|
|
8
|
+
placeId: string;
|
|
9
|
+
};
|
|
10
|
+
/** Hosts can localize all product copy; Google Maps attribution remains fixed. */
|
|
11
|
+
export type VenueSearchCopy = {
|
|
12
|
+
title: string;
|
|
13
|
+
close: string;
|
|
14
|
+
queryLabel: string;
|
|
15
|
+
queryHelp: string;
|
|
16
|
+
queryTooLong: string;
|
|
17
|
+
search: string;
|
|
18
|
+
searching: string;
|
|
19
|
+
loading: string;
|
|
20
|
+
resultsLabel: string;
|
|
21
|
+
chooseResult: string;
|
|
22
|
+
noResults: string;
|
|
23
|
+
failure: string;
|
|
24
|
+
};
|
|
25
|
+
export type VenueSearchDialogProps = {
|
|
26
|
+
placeName?: string;
|
|
27
|
+
canSearch?: boolean;
|
|
28
|
+
searchVenues: (query: string) => Promise<VenueSuggestion[]>;
|
|
29
|
+
copy?: Partial<VenueSearchCopy>;
|
|
30
|
+
onClose: () => void;
|
|
31
|
+
onChange: (pin: GoogleVenueReference) => void;
|
|
32
|
+
};
|
|
33
|
+
export declare function VenueSearchDialog({ placeName, canSearch, searchVenues, copy, onClose, onChange, }: VenueSearchDialogProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { VenueSearchDialog, type VenueSuggestion, type VenueSearchCopy, type VenueSearchDialogProps, type GoogleVenueReference, } from "./VenueSearchDialog.js";
|
|
2
|
+
export { SearchInputAction, type SearchInputActionProps, } from "./SearchInputAction.js";
|
|
3
|
+
export { MetadataValueField, metadataFieldLabelSx, metadataValueRowSx, type MetadataValueFieldProps, } from "./MetadataValueField.js";
|
|
4
|
+
export { GeographicLocationField, type GeographicLocationFieldProps, type GeographicLocationCopy, } from "./GeographicLocationField.js";
|
|
5
|
+
export { TemplateBadge, type TemplateBadgeProps } from "./TemplateBadge.js";
|
|
6
|
+
export { MetadataFieldGroup, METADATA_FIELD_GROUP_SPACING, METADATA_FIELD_LABEL_SPACING, } from "./MetadataFieldGroup.js";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { PendingChangesDialogShellProps } from "./types.js";
|
|
2
|
+
export declare function PendingChangesDialogShell({ children, open, onClose, title, titleIcon, contentHeader, contentTouchHandlers, contentSx, onEntered, closeLabel, }: PendingChangesDialogShellProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { PendingChangesDialogViewProps } from "./types.js";
|
|
2
|
+
export declare function PendingChangesDialogView({ groups, open, onClose, title, summary, emptyMessage, accountKey, onOpenItem, onDiscardRequest, discardLabel, focusGroupKey, navigationError, contentHeader, contentTouchHandlers, shell: Shell, }: PendingChangesDialogViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type SxProps, type Theme } from "@mui/material/styles";
|
|
2
|
+
export type PendingChangesIndicatorViewProps = {
|
|
3
|
+
count: number;
|
|
4
|
+
isOffline?: boolean;
|
|
5
|
+
label?: string;
|
|
6
|
+
explanation?: string;
|
|
7
|
+
onOpen: () => void;
|
|
8
|
+
sx?: SxProps<Theme>;
|
|
9
|
+
};
|
|
10
|
+
export declare function PendingChangesIndicatorView({ count, isOffline, label, explanation, onOpen, sx, }: PendingChangesIndicatorViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { PendingChangesDialogView } from "./PendingChangesDialogView.js";
|
|
2
|
+
export { PendingChangesIndicatorView, type PendingChangesIndicatorViewProps, } from "./PendingChangesIndicatorView.js";
|
|
3
|
+
export type { PendingChangeRow, PendingChangeViewGroup, PendingChangesDialogViewProps, PendingChangesDialogShellProps, } from "./types.js";
|