@bayonai/mui-design 1.9.0 → 1.10.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 +6 -0
- package/README.md +18 -0
- package/package.json +1 -1
- package/dist/cjs/actions/ActionMenu.d.ts +0 -24
- package/dist/cjs/actions/ActionMenu.js +0 -36
- package/dist/cjs/actions/DialogActionButtons.d.ts +0 -23
- package/dist/cjs/actions/DialogActionButtons.js +0 -33
- package/dist/cjs/actions/LoadingIconButton.d.ts +0 -11
- package/dist/cjs/actions/LoadingIconButton.js +0 -10
- package/dist/cjs/actions/StickyActionFooter.d.ts +0 -14
- package/dist/cjs/actions/StickyActionFooter.js +0 -27
- package/dist/cjs/actions/StickySubmitButton.d.ts +0 -10
- package/dist/cjs/actions/StickySubmitButton.js +0 -10
- package/dist/cjs/actions/index.d.ts +0 -5
- package/dist/cjs/actions/index.js +0 -18
- package/dist/cjs/client.d.ts +0 -4
- package/dist/cjs/client.js +0 -21
- package/dist/cjs/components/BayonFlowVisual.d.ts +0 -12
- package/dist/cjs/components/BayonFlowVisual.js +0 -87
- package/dist/cjs/components/BayonThemeModeToggle.d.ts +0 -6
- package/dist/cjs/components/BayonThemeModeToggle.js +0 -34
- package/dist/cjs/components/IconTooltipButton.d.ts +0 -10
- package/dist/cjs/components/IconTooltipButton.js +0 -50
- package/dist/cjs/components/panels.d.ts +0 -37
- package/dist/cjs/components/panels.js +0 -92
- package/dist/cjs/drawers/BottomDrawer.d.ts +0 -16
- package/dist/cjs/drawers/BottomDrawer.js +0 -43
- package/dist/cjs/drawers/MobileBottomDrawer.d.ts +0 -20
- package/dist/cjs/drawers/MobileBottomDrawer.js +0 -102
- package/dist/cjs/drawers/MobileBottomDrawerHeader.d.ts +0 -11
- package/dist/cjs/drawers/MobileBottomDrawerHeader.js +0 -36
- package/dist/cjs/drawers/ResponsiveDrawer.d.ts +0 -25
- package/dist/cjs/drawers/ResponsiveDrawer.js +0 -22
- package/dist/cjs/drawers/WorkspaceSidePane.d.ts +0 -29
- package/dist/cjs/drawers/WorkspaceSidePane.js +0 -222
- package/dist/cjs/drawers/WorkspaceSidePaneRoot.d.ts +0 -1
- package/dist/cjs/drawers/WorkspaceSidePaneRoot.js +0 -93
- package/dist/cjs/drawers/drawerAppearance.d.ts +0 -8
- package/dist/cjs/drawers/drawerAppearance.js +0 -10
- package/dist/cjs/drawers/index.d.ts +0 -7
- package/dist/cjs/drawers/index.js +0 -19
- package/dist/cjs/drawers/useVisualViewportBottomInset.d.ts +0 -6
- package/dist/cjs/drawers/useVisualViewportBottomInset.js +0 -33
- package/dist/cjs/drawers/workspaceSidePaneGeometry.d.ts +0 -11
- package/dist/cjs/drawers/workspaceSidePaneGeometry.js +0 -15
- package/dist/cjs/feedback/StatusNotice.d.ts +0 -13
- package/dist/cjs/feedback/StatusNotice.js +0 -62
- package/dist/cjs/feedback/index.d.ts +0 -1
- package/dist/cjs/feedback/index.js +0 -7
- package/dist/cjs/index.d.ts +0 -9
- package/dist/cjs/index.js +0 -25
- package/dist/cjs/internal/DialogChoiceTile.d.ts +0 -20
- package/dist/cjs/internal/DialogChoiceTile.js +0 -60
- package/dist/cjs/links/LinkAddressPreview.d.ts +0 -19
- package/dist/cjs/links/LinkAddressPreview.js +0 -80
- package/dist/cjs/links/index.d.ts +0 -3
- package/dist/cjs/links/index.js +0 -9
- package/dist/cjs/links/useLinkAddressPreview.d.ts +0 -26
- package/dist/cjs/links/useLinkAddressPreview.js +0 -162
- package/dist/cjs/location/GeographicLocationField.d.ts +0 -26
- package/dist/cjs/location/GeographicLocationField.js +0 -49
- package/dist/cjs/location/GoogleMapsAttribution.d.ts +0 -1
- package/dist/cjs/location/GoogleMapsAttribution.js +0 -12
- package/dist/cjs/location/MetadataFieldGroup.d.ts +0 -5
- package/dist/cjs/location/MetadataFieldGroup.js +0 -13
- package/dist/cjs/location/MetadataValueField.d.ts +0 -23
- package/dist/cjs/location/MetadataValueField.js +0 -27
- package/dist/cjs/location/SearchInputAction.d.ts +0 -9
- package/dist/cjs/location/SearchInputAction.js +0 -14
- package/dist/cjs/location/TemplateBadge.d.ts +0 -5
- package/dist/cjs/location/TemplateBadge.js +0 -9
- package/dist/cjs/location/VenueSearchDialog.d.ts +0 -33
- package/dist/cjs/location/VenueSearchDialog.js +0 -112
- package/dist/cjs/location/index.d.ts +0 -6
- package/dist/cjs/location/index.js +0 -20
- package/dist/cjs/package.json +0 -3
- package/dist/cjs/pending/PendingChangesDialogShell.d.ts +0 -2
- package/dist/cjs/pending/PendingChangesDialogShell.js +0 -16
- package/dist/cjs/pending/PendingChangesDialogView.d.ts +0 -2
- package/dist/cjs/pending/PendingChangesDialogView.js +0 -140
- package/dist/cjs/pending/PendingChangesIndicatorView.d.ts +0 -10
- package/dist/cjs/pending/PendingChangesIndicatorView.js +0 -27
- package/dist/cjs/pending/index.d.ts +0 -3
- package/dist/cjs/pending/index.js +0 -9
- package/dist/cjs/pending/types.d.ts +0 -55
- package/dist/cjs/pending/types.js +0 -2
- package/dist/cjs/pricing/PlanUpgradeDialog.d.ts +0 -17
- package/dist/cjs/pricing/PlanUpgradeDialog.js +0 -22
- package/dist/cjs/pricing/PricingTable.d.ts +0 -28
- package/dist/cjs/pricing/PricingTable.js +0 -60
- package/dist/cjs/pricing/index.d.ts +0 -3
- package/dist/cjs/pricing/index.js +0 -8
- package/dist/cjs/providers/BayonThemeProvider.d.ts +0 -20
- package/dist/cjs/providers/BayonThemeProvider.js +0 -163
- package/dist/cjs/sections/ExpandableSectionToggle.d.ts +0 -12
- package/dist/cjs/sections/ExpandableSectionToggle.js +0 -32
- package/dist/cjs/sections/index.d.ts +0 -2
- package/dist/cjs/sections/index.js +0 -7
- package/dist/cjs/styles/pageStyles.d.ts +0 -15
- package/dist/cjs/styles/pageStyles.js +0 -103
- package/dist/cjs/swipe/SwipeActionRow.d.ts +0 -8
- package/dist/cjs/swipe/SwipeActionRow.js +0 -123
- package/dist/cjs/swipe/index.d.ts +0 -1
- package/dist/cjs/swipe/index.js +0 -8
- package/dist/cjs/theme/components.d.ts +0 -2
- package/dist/cjs/theme/components.js +0 -123
- package/dist/cjs/theme/createBayonTheme.d.ts +0 -4
- package/dist/cjs/theme/createBayonTheme.js +0 -45
- package/dist/cjs/theme/palette.d.ts +0 -146
- package/dist/cjs/theme/palette.js +0 -109
- package/dist/cjs/theme/shadows.d.ts +0 -2
- package/dist/cjs/theme/shadows.js +0 -21
- package/dist/cjs/theme/types.d.ts +0 -47
- package/dist/cjs/theme/types.js +0 -2
- package/dist/cjs/theme/typography.d.ts +0 -2
- package/dist/cjs/theme/typography.js +0 -58
- package/dist/cjs/toasts/ActionToast.d.ts +0 -11
- package/dist/cjs/toasts/ActionToast.js +0 -12
- package/dist/cjs/toasts/Toast.d.ts +0 -16
- package/dist/cjs/toasts/Toast.js +0 -55
- package/dist/cjs/toasts/index.d.ts +0 -5
- package/dist/cjs/toasts/index.js +0 -12
- package/dist/cjs/toasts/useUpwardToastDismiss.d.ts +0 -15
- package/dist/cjs/toasts/useUpwardToastDismiss.js +0 -73
- package/dist/cjs/uploads/CameraCaptureDialog.d.ts +0 -22
- package/dist/cjs/uploads/CameraCaptureDialog.js +0 -187
- package/dist/cjs/uploads/FileRow.d.ts +0 -10
- package/dist/cjs/uploads/FileRow.js +0 -23
- package/dist/cjs/uploads/FileSwipeActionRow.d.ts +0 -1
- package/dist/cjs/uploads/FileSwipeActionRow.js +0 -11
- package/dist/cjs/uploads/FileThumbnail.d.ts +0 -5
- package/dist/cjs/uploads/FileThumbnail.js +0 -104
- package/dist/cjs/uploads/FileUpload.d.ts +0 -26
- package/dist/cjs/uploads/FileUpload.js +0 -98
- package/dist/cjs/uploads/FileViewer.d.ts +0 -9
- package/dist/cjs/uploads/FileViewer.js +0 -155
- package/dist/cjs/uploads/ImageCropDialog.d.ts +0 -26
- package/dist/cjs/uploads/ImageCropDialog.js +0 -215
- package/dist/cjs/uploads/ImageInfoPanel.d.ts +0 -24
- package/dist/cjs/uploads/ImageInfoPanel.js +0 -41
- package/dist/cjs/uploads/ImageUploadQualityDialog.d.ts +0 -13
- package/dist/cjs/uploads/ImageUploadQualityDialog.js +0 -57
- package/dist/cjs/uploads/UploadProgressRing.d.ts +0 -24
- package/dist/cjs/uploads/UploadProgressRing.js +0 -32
- package/dist/cjs/uploads/cameraCropPresentation.d.ts +0 -2
- package/dist/cjs/uploads/cameraCropPresentation.js +0 -12
- package/dist/cjs/uploads/index.d.ts +0 -12
- package/dist/cjs/uploads/index.js +0 -24
- package/dist/cjs/utils/createBayonEmotionCache.d.ts +0 -1
- package/dist/cjs/utils/createBayonEmotionCache.js +0 -21
- package/dist/esm/actions/ActionMenu.js +0 -30
- package/dist/esm/actions/DialogActionButtons.js +0 -24
- package/dist/esm/actions/LoadingIconButton.js +0 -7
- package/dist/esm/actions/StickyActionFooter.js +0 -24
- package/dist/esm/actions/StickySubmitButton.js +0 -7
- package/dist/esm/actions/index.js +0 -7
- package/dist/esm/client.js +0 -5
- package/dist/esm/components/BayonFlowVisual.js +0 -81
- package/dist/esm/components/BayonThemeModeToggle.js +0 -28
- package/dist/esm/components/IconTooltipButton.js +0 -11
- package/dist/esm/components/panels.js +0 -76
- package/dist/esm/drawers/BottomDrawer.js +0 -37
- package/dist/esm/drawers/MobileBottomDrawer.js +0 -95
- package/dist/esm/drawers/MobileBottomDrawerHeader.js +0 -30
- package/dist/esm/drawers/ResponsiveDrawer.js +0 -19
- package/dist/esm/drawers/WorkspaceSidePane.js +0 -216
- package/dist/esm/drawers/WorkspaceSidePaneRoot.js +0 -90
- package/dist/esm/drawers/drawerAppearance.js +0 -7
- package/dist/esm/drawers/index.js +0 -8
- package/dist/esm/drawers/useVisualViewportBottomInset.js +0 -29
- package/dist/esm/drawers/workspaceSidePaneGeometry.js +0 -11
- package/dist/esm/feedback/StatusNotice.js +0 -56
- package/dist/esm/feedback/index.js +0 -3
- package/dist/esm/index.js +0 -9
- package/dist/esm/internal/DialogChoiceTile.js +0 -54
- package/dist/esm/links/LinkAddressPreview.js +0 -74
- package/dist/esm/links/index.js +0 -4
- package/dist/esm/links/useLinkAddressPreview.js +0 -159
- package/dist/esm/location/GeographicLocationField.js +0 -43
- package/dist/esm/location/GoogleMapsAttribution.js +0 -9
- package/dist/esm/location/MetadataFieldGroup.js +0 -9
- package/dist/esm/location/MetadataValueField.js +0 -23
- package/dist/esm/location/SearchInputAction.js +0 -8
- package/dist/esm/location/TemplateBadge.js +0 -6
- package/dist/esm/location/VenueSearchDialog.js +0 -109
- package/dist/esm/location/index.js +0 -7
- package/dist/esm/pending/PendingChangesDialogShell.js +0 -10
- package/dist/esm/pending/PendingChangesDialogView.js +0 -134
- package/dist/esm/pending/PendingChangesIndicatorView.js +0 -21
- package/dist/esm/pending/index.js +0 -4
- package/dist/esm/pending/types.js +0 -1
- package/dist/esm/pricing/PlanUpgradeDialog.js +0 -19
- package/dist/esm/pricing/PricingTable.js +0 -54
- package/dist/esm/pricing/index.js +0 -3
- package/dist/esm/providers/BayonThemeProvider.js +0 -123
- package/dist/esm/sections/ExpandableSectionToggle.js +0 -26
- package/dist/esm/sections/index.js +0 -3
- package/dist/esm/styles/pageStyles.js +0 -100
- package/dist/esm/swipe/SwipeActionRow.js +0 -116
- package/dist/esm/swipe/index.js +0 -3
- package/dist/esm/theme/components.js +0 -120
- package/dist/esm/theme/createBayonTheme.js +0 -41
- package/dist/esm/theme/palette.js +0 -106
- package/dist/esm/theme/shadows.js +0 -18
- package/dist/esm/theme/types.js +0 -1
- package/dist/esm/theme/typography.js +0 -55
- package/dist/esm/toasts/ActionToast.js +0 -9
- package/dist/esm/toasts/Toast.js +0 -52
- package/dist/esm/toasts/index.js +0 -5
- package/dist/esm/toasts/useUpwardToastDismiss.js +0 -69
- package/dist/esm/uploads/CameraCaptureDialog.js +0 -181
- package/dist/esm/uploads/FileRow.js +0 -17
- package/dist/esm/uploads/FileSwipeActionRow.js +0 -7
- package/dist/esm/uploads/FileThumbnail.js +0 -98
- package/dist/esm/uploads/FileUpload.js +0 -92
- package/dist/esm/uploads/FileViewer.js +0 -149
- package/dist/esm/uploads/ImageCropDialog.js +0 -212
- package/dist/esm/uploads/ImageInfoPanel.js +0 -35
- package/dist/esm/uploads/ImageUploadQualityDialog.js +0 -51
- package/dist/esm/uploads/UploadProgressRing.js +0 -29
- package/dist/esm/uploads/cameraCropPresentation.js +0 -5
- package/dist/esm/uploads/index.js +0 -11
- package/dist/esm/utils/createBayonEmotionCache.js +0 -15
- package/dist/types/actions/ActionMenu.d.ts +0 -24
- package/dist/types/actions/DialogActionButtons.d.ts +0 -23
- package/dist/types/actions/LoadingIconButton.d.ts +0 -11
- package/dist/types/actions/StickyActionFooter.d.ts +0 -14
- package/dist/types/actions/StickySubmitButton.d.ts +0 -10
- package/dist/types/actions/index.d.ts +0 -5
- package/dist/types/client.d.ts +0 -4
- package/dist/types/components/BayonFlowVisual.d.ts +0 -12
- package/dist/types/components/BayonThemeModeToggle.d.ts +0 -6
- package/dist/types/components/IconTooltipButton.d.ts +0 -10
- package/dist/types/components/panels.d.ts +0 -37
- package/dist/types/drawers/BottomDrawer.d.ts +0 -16
- package/dist/types/drawers/MobileBottomDrawer.d.ts +0 -20
- package/dist/types/drawers/MobileBottomDrawerHeader.d.ts +0 -11
- package/dist/types/drawers/ResponsiveDrawer.d.ts +0 -25
- package/dist/types/drawers/WorkspaceSidePane.d.ts +0 -29
- package/dist/types/drawers/WorkspaceSidePaneRoot.d.ts +0 -1
- package/dist/types/drawers/drawerAppearance.d.ts +0 -8
- package/dist/types/drawers/index.d.ts +0 -7
- package/dist/types/drawers/useVisualViewportBottomInset.d.ts +0 -6
- package/dist/types/drawers/workspaceSidePaneGeometry.d.ts +0 -11
- package/dist/types/feedback/StatusNotice.d.ts +0 -13
- package/dist/types/feedback/index.d.ts +0 -1
- package/dist/types/index.d.ts +0 -9
- package/dist/types/internal/DialogChoiceTile.d.ts +0 -20
- package/dist/types/links/LinkAddressPreview.d.ts +0 -19
- package/dist/types/links/index.d.ts +0 -3
- package/dist/types/links/useLinkAddressPreview.d.ts +0 -26
- package/dist/types/location/GeographicLocationField.d.ts +0 -26
- package/dist/types/location/GoogleMapsAttribution.d.ts +0 -1
- package/dist/types/location/MetadataFieldGroup.d.ts +0 -5
- package/dist/types/location/MetadataValueField.d.ts +0 -23
- package/dist/types/location/SearchInputAction.d.ts +0 -9
- package/dist/types/location/TemplateBadge.d.ts +0 -5
- package/dist/types/location/VenueSearchDialog.d.ts +0 -33
- package/dist/types/location/index.d.ts +0 -6
- package/dist/types/pending/PendingChangesDialogShell.d.ts +0 -2
- package/dist/types/pending/PendingChangesDialogView.d.ts +0 -2
- package/dist/types/pending/PendingChangesIndicatorView.d.ts +0 -10
- package/dist/types/pending/index.d.ts +0 -3
- package/dist/types/pending/types.d.ts +0 -55
- package/dist/types/pricing/PlanUpgradeDialog.d.ts +0 -17
- package/dist/types/pricing/PricingTable.d.ts +0 -28
- package/dist/types/pricing/index.d.ts +0 -3
- package/dist/types/providers/BayonThemeProvider.d.ts +0 -20
- package/dist/types/sections/ExpandableSectionToggle.d.ts +0 -12
- package/dist/types/sections/index.d.ts +0 -2
- package/dist/types/styles/pageStyles.d.ts +0 -15
- package/dist/types/swipe/SwipeActionRow.d.ts +0 -8
- package/dist/types/swipe/index.d.ts +0 -1
- package/dist/types/theme/components.d.ts +0 -2
- package/dist/types/theme/createBayonTheme.d.ts +0 -4
- package/dist/types/theme/palette.d.ts +0 -146
- package/dist/types/theme/shadows.d.ts +0 -2
- package/dist/types/theme/types.d.ts +0 -47
- package/dist/types/theme/typography.d.ts +0 -2
- package/dist/types/toasts/ActionToast.d.ts +0 -11
- package/dist/types/toasts/Toast.d.ts +0 -16
- package/dist/types/toasts/index.d.ts +0 -5
- package/dist/types/toasts/useUpwardToastDismiss.d.ts +0 -15
- package/dist/types/uploads/CameraCaptureDialog.d.ts +0 -22
- package/dist/types/uploads/FileRow.d.ts +0 -10
- package/dist/types/uploads/FileSwipeActionRow.d.ts +0 -1
- package/dist/types/uploads/FileThumbnail.d.ts +0 -5
- package/dist/types/uploads/FileUpload.d.ts +0 -26
- package/dist/types/uploads/FileViewer.d.ts +0 -9
- package/dist/types/uploads/ImageCropDialog.d.ts +0 -26
- package/dist/types/uploads/ImageInfoPanel.d.ts +0 -24
- package/dist/types/uploads/ImageUploadQualityDialog.d.ts +0 -13
- package/dist/types/uploads/UploadProgressRing.d.ts +0 -24
- package/dist/types/uploads/cameraCropPresentation.d.ts +0 -2
- package/dist/types/uploads/index.d.ts +0 -12
- package/dist/types/utils/createBayonEmotionCache.d.ts +0 -1
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.BayonPageShell = BayonPageShell;
|
|
7
|
-
exports.BayonGradientHero = BayonGradientHero;
|
|
8
|
-
exports.BayonDarkPanel = BayonDarkPanel;
|
|
9
|
-
exports.BayonAccentPanel = BayonAccentPanel;
|
|
10
|
-
exports.BayonCtaPanel = BayonCtaPanel;
|
|
11
|
-
exports.BayonContentBox = BayonContentBox;
|
|
12
|
-
exports.BayonMethodBox = BayonMethodBox;
|
|
13
|
-
exports.BayonProjectCard = BayonProjectCard;
|
|
14
|
-
exports.BayonPillarCard = BayonPillarCard;
|
|
15
|
-
exports.BayonTechChip = BayonTechChip;
|
|
16
|
-
exports.BayonPanelStack = BayonPanelStack;
|
|
17
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
18
|
-
const Box_1 = __importDefault(require("@mui/material/Box"));
|
|
19
|
-
const Stack_1 = __importDefault(require("@mui/material/Stack"));
|
|
20
|
-
const Typography_1 = __importDefault(require("@mui/material/Typography"));
|
|
21
|
-
const pageStyles_js_1 = require("../styles/pageStyles.js");
|
|
22
|
-
function mergeSx(...items) {
|
|
23
|
-
return items.flat().filter(Boolean);
|
|
24
|
-
}
|
|
25
|
-
function BayonPageShell({ sx, ...props }) {
|
|
26
|
-
return (0, jsx_runtime_1.jsx)(Box_1.default, { sx: mergeSx(pageStyles_js_1.pageShellSx, sx), ...props });
|
|
27
|
-
}
|
|
28
|
-
function BayonGradientHero({ sx, ...props }) {
|
|
29
|
-
return (0, jsx_runtime_1.jsx)(Box_1.default, { component: "section", sx: mergeSx(pageStyles_js_1.gradientHeroSx, sx), ...props });
|
|
30
|
-
}
|
|
31
|
-
function BayonDarkPanel({ hover = false, sx, ...props }) {
|
|
32
|
-
return (0, jsx_runtime_1.jsx)(Box_1.default, { sx: mergeSx(pageStyles_js_1.darkPanelSx, hover ? pageStyles_js_1.darkPanelHoverSx : undefined, sx), ...props });
|
|
33
|
-
}
|
|
34
|
-
function BayonAccentPanel({ hover = false, sx, ...props }) {
|
|
35
|
-
return (0, jsx_runtime_1.jsx)(Box_1.default, { sx: mergeSx(pageStyles_js_1.accentPanelSx, hover ? pageStyles_js_1.darkPanelHoverSx : undefined, sx), ...props });
|
|
36
|
-
}
|
|
37
|
-
function BayonCtaPanel({ sx, ...props }) {
|
|
38
|
-
return (0, jsx_runtime_1.jsx)(Box_1.default, { sx: mergeSx(pageStyles_js_1.darkCtaSx, sx), ...props });
|
|
39
|
-
}
|
|
40
|
-
function BayonContentBox({ sx, ...props }) {
|
|
41
|
-
return ((0, jsx_runtime_1.jsx)(Box_1.default, { sx: mergeSx({
|
|
42
|
-
p: { xs: 3, md: 4 },
|
|
43
|
-
border: '1px solid var(--bayon-border)',
|
|
44
|
-
borderRadius: 2,
|
|
45
|
-
bgcolor: 'var(--bayon-panel)',
|
|
46
|
-
}, sx), ...props }));
|
|
47
|
-
}
|
|
48
|
-
function BayonMethodBox({ accentColor = '#2DD4BF', sx, ...props }) {
|
|
49
|
-
return ((0, jsx_runtime_1.jsx)(BayonCtaPanel, { sx: mergeSx({
|
|
50
|
-
p: 3,
|
|
51
|
-
borderLeft: `3px solid ${accentColor}`,
|
|
52
|
-
}, sx), ...props }));
|
|
53
|
-
}
|
|
54
|
-
function BayonProjectCard({ category, status, title, body, actions, children, hover = true, sx, ...props }) {
|
|
55
|
-
return ((0, jsx_runtime_1.jsxs)(BayonAccentPanel, { hover: hover, sx: mergeSx({
|
|
56
|
-
p: 4,
|
|
57
|
-
minHeight: 290,
|
|
58
|
-
display: 'flex',
|
|
59
|
-
flexDirection: 'column',
|
|
60
|
-
}, sx), ...props, children: [category && ((0, jsx_runtime_1.jsx)(Typography_1.default, { sx: { color: '#2DD4BF', fontWeight: 800, fontSize: '0.82rem', textTransform: 'uppercase', mb: 1.5 }, children: category })), title && ((0, jsx_runtime_1.jsx)(Typography_1.default, { variant: "h5", sx: { color: 'var(--bayon-heading)', mb: 2 }, children: title })), body && (0, jsx_runtime_1.jsx)(Typography_1.default, { sx: { color: 'var(--bayon-muted)', lineHeight: 1.75, mb: 3 }, children: body }), children, status && (0, jsx_runtime_1.jsx)(Typography_1.default, { sx: { color: '#FDE047', fontWeight: 700, mt: 'auto' }, children: status }), actions] }));
|
|
61
|
-
}
|
|
62
|
-
function BayonPillarCard({ accentColor = '#2DD4BF', eyebrow, title, body, actions, children, sx, ...props }) {
|
|
63
|
-
return ((0, jsx_runtime_1.jsxs)(Box_1.default, { sx: mergeSx({
|
|
64
|
-
p: { xs: 3, md: 5 },
|
|
65
|
-
border: '1px solid var(--bayon-border)',
|
|
66
|
-
borderRadius: 2,
|
|
67
|
-
bgcolor: 'var(--bayon-panel)',
|
|
68
|
-
boxShadow: 'var(--bayon-panel-shadow)',
|
|
69
|
-
transition: 'transform 180ms ease, border-color 180ms ease',
|
|
70
|
-
'&:hover': {
|
|
71
|
-
transform: 'translateY(-5px)',
|
|
72
|
-
borderColor: accentColor,
|
|
73
|
-
},
|
|
74
|
-
}, sx), ...props, children: [eyebrow && ((0, jsx_runtime_1.jsx)(Typography_1.default, { sx: { color: accentColor, fontSize: '0.82rem', fontWeight: 800, textTransform: 'uppercase', mb: 1.5 }, children: eyebrow })), title && ((0, jsx_runtime_1.jsx)(Typography_1.default, { variant: "h3", sx: { color: 'var(--bayon-heading)', mb: 2 }, children: title })), body && (0, jsx_runtime_1.jsx)(Typography_1.default, { sx: { color: 'var(--bayon-muted)', lineHeight: 1.75 }, children: body }), children, actions] }));
|
|
75
|
-
}
|
|
76
|
-
function BayonTechChip({ label, children, sx, ...props }) {
|
|
77
|
-
return ((0, jsx_runtime_1.jsx)(Box_1.default, { sx: mergeSx({
|
|
78
|
-
px: 1.5,
|
|
79
|
-
py: 0.75,
|
|
80
|
-
borderRadius: 1,
|
|
81
|
-
bgcolor: 'rgba(45, 212, 191, 0.12)',
|
|
82
|
-
color: '#A7F3D0',
|
|
83
|
-
border: '1px solid rgba(45, 212, 191, 0.24)',
|
|
84
|
-
fontSize: '0.9rem',
|
|
85
|
-
fontWeight: 600,
|
|
86
|
-
maxWidth: '100%',
|
|
87
|
-
overflowWrap: 'anywhere',
|
|
88
|
-
}, sx), ...props, children: label !== null && label !== void 0 ? label : children }));
|
|
89
|
-
}
|
|
90
|
-
function BayonPanelStack({ sx, ...props }) {
|
|
91
|
-
return (0, jsx_runtime_1.jsx)(Stack_1.default, { spacing: 3, sx: sx, ...props });
|
|
92
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
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;
|
|
@@ -1,43 +0,0 @@
|
|
|
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.BottomDrawer = BottomDrawer;
|
|
8
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
9
|
-
const CloseRounded_1 = __importDefault(require("@mui/icons-material/CloseRounded"));
|
|
10
|
-
const material_1 = require("@mui/material");
|
|
11
|
-
const drawerAppearance_js_1 = require("./drawerAppearance.js");
|
|
12
|
-
function BottomDrawer({ children, appearance = drawerAppearance_js_1.defaultDrawerAppearance, closeTooltip, closeLabel, contentSx, dataComponent, disablePortal = false, headerActions, onClose, open, title, }) {
|
|
13
|
-
const paperSlotProps = {
|
|
14
|
-
"data-component": dataComponent,
|
|
15
|
-
sx: {
|
|
16
|
-
bgcolor: appearance.background,
|
|
17
|
-
borderRadius: "16px 16px 0 0",
|
|
18
|
-
boxShadow: appearance.shadow,
|
|
19
|
-
maxHeight: "calc(100dvh - 24px)",
|
|
20
|
-
width: "100%",
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Drawer, { anchor: "bottom",
|
|
24
|
-
// Portal ownership belongs to the host because route slots and stacking
|
|
25
|
-
// containers are application concerns rather than drawer presentation.
|
|
26
|
-
ModalProps: { disablePortal }, onClose: onClose, open: open, slotProps: { paper: paperSlotProps }, children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
27
|
-
alignItems: "center",
|
|
28
|
-
borderBottom: 1,
|
|
29
|
-
borderColor: "divider",
|
|
30
|
-
display: "flex",
|
|
31
|
-
flex: "0 0 auto",
|
|
32
|
-
gap: 1,
|
|
33
|
-
minHeight: 64,
|
|
34
|
-
px: 2.5,
|
|
35
|
-
}, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { component: "h1", sx: { flex: 1, fontWeight: 760 }, children: title }), headerActions ? ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: { alignItems: "center", display: "flex" }, children: headerActions })) : null, (0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: closeTooltip !== null && closeTooltip !== void 0 ? closeTooltip : "", children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { "aria-label": closeLabel, onClick: onClose, sx: {
|
|
36
|
-
minHeight: 40,
|
|
37
|
-
minWidth: 40,
|
|
38
|
-
"& > .MuiSvgIcon-root": { fontSize: 28 },
|
|
39
|
-
}, children: (0, jsx_runtime_1.jsx)(CloseRounded_1.default, {}) }) })] }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: [
|
|
40
|
-
{ flex: 1, minHeight: 0, overflowY: "auto" },
|
|
41
|
-
...(Array.isArray(contentSx) ? contentSx : [contentSx]),
|
|
42
|
-
], children: children })] }));
|
|
43
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
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;
|
|
@@ -1,102 +0,0 @@
|
|
|
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.mobileBottomDrawerDismissDuration = void 0;
|
|
8
|
-
exports.MobileBottomDrawer = MobileBottomDrawer;
|
|
9
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
10
|
-
const material_1 = require("@mui/material");
|
|
11
|
-
const SwipeableDrawer_1 = __importDefault(require("@mui/material/SwipeableDrawer"));
|
|
12
|
-
const react_1 = require("react");
|
|
13
|
-
const drawerAppearance_js_1 = require("./drawerAppearance.js");
|
|
14
|
-
const MobileBottomDrawerHeader_js_1 = require("./MobileBottomDrawerHeader.js");
|
|
15
|
-
exports.mobileBottomDrawerDismissDuration = 220;
|
|
16
|
-
function MobileBottomDrawer({ ariaLabel, appearance = drawerAppearance_js_1.defaultDrawerAppearance, closeTooltip, children, contentScrollMode = "container", dataComponent, dismiss = false, handleBackground = "default", handlePlacement = "above-content", headerLeft, headerRight, maxHeight = "calc(100dvh - 24px)", onClose, }) {
|
|
17
|
-
const dismissTimer = (0, react_1.useRef)(null);
|
|
18
|
-
const [open, setOpen] = (0, react_1.useState)(true);
|
|
19
|
-
(0, react_1.useEffect)(() => () => {
|
|
20
|
-
if (dismissTimer.current) {
|
|
21
|
-
clearTimeout(dismissTimer.current);
|
|
22
|
-
}
|
|
23
|
-
}, []);
|
|
24
|
-
const requestClose = (0, react_1.useCallback)(() => {
|
|
25
|
-
if (!open || dismissTimer.current) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
setOpen(false);
|
|
29
|
-
const prefersReducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
30
|
-
dismissTimer.current = setTimeout(onClose, prefersReducedMotion ? 0 : exports.mobileBottomDrawerDismissDuration);
|
|
31
|
-
}, [onClose, open]);
|
|
32
|
-
// Product decision: nested dialogs may layer over a retained drawer; the host
|
|
33
|
-
// decides whether closing that dialog also closes its underlying context.
|
|
34
|
-
(0, react_1.useEffect)(() => {
|
|
35
|
-
if (!dismiss || !open) {
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
const prefersReducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
39
|
-
dismissTimer.current = setTimeout(onClose, prefersReducedMotion ? 0 : exports.mobileBottomDrawerDismissDuration);
|
|
40
|
-
return () => {
|
|
41
|
-
if (dismissTimer.current) {
|
|
42
|
-
clearTimeout(dismissTimer.current);
|
|
43
|
-
dismissTimer.current = null;
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
}, [dismiss, onClose, open]);
|
|
47
|
-
const paperSlotProps = {
|
|
48
|
-
"aria-label": ariaLabel,
|
|
49
|
-
"data-component": dataComponent !== null && dataComponent !== void 0 ? dataComponent : "mobile-bottom-drawer",
|
|
50
|
-
sx: {
|
|
51
|
-
backgroundColor: appearance.background,
|
|
52
|
-
borderRadius: "16px 16px 0 0",
|
|
53
|
-
bottom: 0,
|
|
54
|
-
boxShadow: appearance.shadow,
|
|
55
|
-
display: "flex",
|
|
56
|
-
flexDirection: "column",
|
|
57
|
-
height: maxHeight,
|
|
58
|
-
maxHeight,
|
|
59
|
-
overflow: "hidden",
|
|
60
|
-
overscrollBehaviorY: "contain",
|
|
61
|
-
width: "100%",
|
|
62
|
-
},
|
|
63
|
-
};
|
|
64
|
-
const drawerHandle = ((0, jsx_runtime_1.jsx)(material_1.Box, { "aria-hidden": true, "data-component": "mobile-bottom-drawer-handle", "data-placement": handlePlacement, "data-swipe-surface": "drawer", sx: {
|
|
65
|
-
alignItems: "center",
|
|
66
|
-
bgcolor: handleBackground === "detailChrome"
|
|
67
|
-
? appearance.chrome
|
|
68
|
-
: "transparent",
|
|
69
|
-
display: "flex",
|
|
70
|
-
flex: "0 0 auto",
|
|
71
|
-
justifyContent: "center",
|
|
72
|
-
minHeight: 44,
|
|
73
|
-
// Product decision: header actions sit above this visual handle while
|
|
74
|
-
// MUI SwipeableDrawer owns a natural pull-down gesture across the
|
|
75
|
-
// entire sheet, including its scroll-aware cancellation behavior.
|
|
76
|
-
pointerEvents: handlePlacement === "overlay" ? "none" : "auto",
|
|
77
|
-
position: handlePlacement === "overlay" ? "absolute" : "relative",
|
|
78
|
-
top: handlePlacement === "overlay" ? 0 : "auto",
|
|
79
|
-
width: "100%",
|
|
80
|
-
zIndex: 0,
|
|
81
|
-
}, children: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
|
|
82
|
-
bgcolor: appearance.handle,
|
|
83
|
-
borderRadius: 999,
|
|
84
|
-
height: 4,
|
|
85
|
-
width: 36,
|
|
86
|
-
} }) }));
|
|
87
|
-
return ((0, jsx_runtime_1.jsxs)(SwipeableDrawer_1.default, { anchor: "bottom", disableBackdropTransition: true, disableDiscovery: true, disableSwipeToOpen: true, hysteresis: 0.16, onClose: requestClose, onOpen: () => undefined, open: dismiss ? false : open, slotProps: {
|
|
88
|
-
backdrop: {
|
|
89
|
-
sx: { backgroundColor: "transparent" },
|
|
90
|
-
},
|
|
91
|
-
paper: paperSlotProps,
|
|
92
|
-
}, transitionDuration: exports.mobileBottomDrawerDismissDuration, children: [headerLeft ? ((0, jsx_runtime_1.jsx)(MobileBottomDrawerHeader_js_1.MobileBottomDrawerHeader, { closeLabel: `Close ${ariaLabel}`, closeTooltip: closeTooltip, dragHandle: drawerHandle, left: headerLeft, onClose: requestClose, right: headerRight })) : handlePlacement === "above-content" ? (drawerHandle) : null, (0, jsx_runtime_1.jsxs)(material_1.Box, { "data-component": "mobile-bottom-drawer-scroll", sx: {
|
|
93
|
-
display: contentScrollMode === "child" ? "flex" : "block",
|
|
94
|
-
flex: 1,
|
|
95
|
-
minHeight: 0,
|
|
96
|
-
overflowY: contentScrollMode === "child" ? "hidden" : "auto",
|
|
97
|
-
overscrollBehaviorY: "contain",
|
|
98
|
-
pb: appearance.safeAreaBottom,
|
|
99
|
-
position: "relative",
|
|
100
|
-
zIndex: handlePlacement === "overlay" ? 1 : "auto",
|
|
101
|
-
}, children: [handlePlacement === "overlay" ? drawerHandle : null, children] })] }));
|
|
102
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,36 +0,0 @@
|
|
|
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.MobileBottomDrawerHeader = MobileBottomDrawerHeader;
|
|
8
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
9
|
-
const CloseRounded_1 = __importDefault(require("@mui/icons-material/CloseRounded"));
|
|
10
|
-
const material_1 = require("@mui/material");
|
|
11
|
-
function MobileBottomDrawerHeader({ closeLabel, closeTooltip, dragHandle, left, onClose, right, }) {
|
|
12
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { component: "header", "data-component": "mobile-bottom-drawer-header", sx: {
|
|
13
|
-
flex: "0 0 auto",
|
|
14
|
-
minHeight: 56,
|
|
15
|
-
position: "relative",
|
|
16
|
-
}, children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
|
|
17
|
-
inset: 0,
|
|
18
|
-
position: "absolute",
|
|
19
|
-
zIndex: 0,
|
|
20
|
-
}, children: dragHandle }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
21
|
-
alignItems: "center",
|
|
22
|
-
display: "flex",
|
|
23
|
-
gap: 1,
|
|
24
|
-
minHeight: 56,
|
|
25
|
-
px: 2,
|
|
26
|
-
// Product decision: title and actions occupy the same compact row as
|
|
27
|
-
// the drag affordance, avoiding a second band that pushes context
|
|
28
|
-
// away from the top edge of the drawer.
|
|
29
|
-
position: "relative",
|
|
30
|
-
zIndex: 1,
|
|
31
|
-
}, children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: { flex: 1, minWidth: 0 }, children: left }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { alignItems: "center", display: "flex", gap: 0.5 }, children: [right, (0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: closeTooltip !== null && closeTooltip !== void 0 ? closeTooltip : "", children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { "aria-label": closeLabel, onClick: onClose, sx: {
|
|
32
|
-
minHeight: 48,
|
|
33
|
-
minWidth: 48,
|
|
34
|
-
"& > .MuiSvgIcon-root": { fontSize: 32 },
|
|
35
|
-
}, children: (0, jsx_runtime_1.jsx)(CloseRounded_1.default, {}) }) })] })] })] }));
|
|
36
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use client";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.ResponsiveDrawer = ResponsiveDrawer;
|
|
5
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const material_1 = require("@mui/material");
|
|
7
|
-
const MobileBottomDrawer_js_1 = require("./MobileBottomDrawer.js");
|
|
8
|
-
const BottomDrawer_js_1 = require("./BottomDrawer.js");
|
|
9
|
-
// Product decision: consumers share responsive drawer chrome but keep
|
|
10
|
-
// navigation and dismissal policies in their owning feature.
|
|
11
|
-
function ResponsiveDrawer({ ariaLabel, appearance, closeTooltip, children, desktopContentSx, desktopCloseLabel, desktopDataComponent, desktopDisablePortal = false, desktopOpen = true, headerActions, mobileContentScrollMode, mobileDataComponent, mobileDismiss = false, mobileOpen = true, onDesktopClose, onMobileClose, title, }) {
|
|
12
|
-
const isMobileDrawer = (0, material_1.useMediaQuery)("(max-width:899.95px)", {
|
|
13
|
-
noSsr: true,
|
|
14
|
-
});
|
|
15
|
-
if (isMobileDrawer) {
|
|
16
|
-
if (!mobileOpen) {
|
|
17
|
-
return null;
|
|
18
|
-
}
|
|
19
|
-
return ((0, jsx_runtime_1.jsx)(MobileBottomDrawer_js_1.MobileBottomDrawer, { appearance: appearance, closeTooltip: closeTooltip, ariaLabel: ariaLabel, contentScrollMode: mobileContentScrollMode, dataComponent: mobileDataComponent, dismiss: mobileDismiss, headerLeft: (0, jsx_runtime_1.jsx)(material_1.Typography, { component: "h1", sx: { fontWeight: 760 }, children: title }), headerRight: headerActions, onClose: onMobileClose, children: children("mobile") }));
|
|
20
|
-
}
|
|
21
|
-
return ((0, jsx_runtime_1.jsx)(BottomDrawer_js_1.BottomDrawer, { appearance: appearance, closeTooltip: closeTooltip, closeLabel: desktopCloseLabel !== null && desktopCloseLabel !== void 0 ? desktopCloseLabel : `Close ${ariaLabel}`, contentSx: desktopContentSx, dataComponent: desktopDataComponent, disablePortal: desktopDisablePortal, headerActions: headerActions, onClose: onDesktopClose, open: desktopOpen, title: title, children: children("desktop") }));
|
|
22
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { type CSSProperties, type MouseEvent, type ReactNode, type RefObject } from "react";
|
|
2
|
-
export interface WorkspaceSidePaneActions {
|
|
3
|
-
visible: boolean;
|
|
4
|
-
paneId: string;
|
|
5
|
-
openFrom: (event: MouseEvent<HTMLButtonElement>, focusTarget?: RefObject<HTMLElement | null>) => void;
|
|
6
|
-
close: (opener?: HTMLButtonElement) => void;
|
|
7
|
-
}
|
|
8
|
-
export interface WorkspaceSidePaneProps {
|
|
9
|
-
children: ReactNode;
|
|
10
|
-
enabled?: boolean;
|
|
11
|
-
className?: string;
|
|
12
|
-
style?: CSSProperties;
|
|
13
|
-
paneId?: string;
|
|
14
|
-
headingId: string;
|
|
15
|
-
headingRef: RefObject<HTMLElement | null>;
|
|
16
|
-
workspaceRef?: RefObject<HTMLDivElement | null>;
|
|
17
|
-
actionsLabel: string;
|
|
18
|
-
resizeLabel?: string;
|
|
19
|
-
keepPaneMounted?: boolean;
|
|
20
|
-
/** Preferred docked width in CSS pixels. The available canvas can constrain the displayed width. */
|
|
21
|
-
preferredWidth?: number;
|
|
22
|
-
/** Reports an explicit resize through the pointer or keyboard control. */
|
|
23
|
-
onPreferredWidthChange?: (width: number) => void;
|
|
24
|
-
getOverlaySiblings?: (root: HTMLDivElement) => readonly HTMLElement[];
|
|
25
|
-
renderActions: (actions: WorkspaceSidePaneActions) => ReactNode;
|
|
26
|
-
renderPane: (visible: boolean) => ReactNode;
|
|
27
|
-
}
|
|
28
|
-
/** Keeps the workspace in one slot across docked, modal and closed presentation. */
|
|
29
|
-
export declare function WorkspaceSidePane({ children, enabled, className, style, paneId, headingId, headingRef, workspaceRef, actionsLabel, resizeLabel, keepPaneMounted, preferredWidth, onPreferredWidthChange, getOverlaySiblings, renderActions, renderPane, }: WorkspaceSidePaneProps): import("react").JSX.Element;
|
|
@@ -1,222 +0,0 @@
|
|
|
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.WorkspaceSidePane = WorkspaceSidePane;
|
|
8
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
9
|
-
const react_1 = require("react");
|
|
10
|
-
const Collapse_1 = __importDefault(require("@mui/material/Collapse"));
|
|
11
|
-
const Fade_1 = __importDefault(require("@mui/material/Fade"));
|
|
12
|
-
const useMediaQuery_1 = __importDefault(require("@mui/material/useMediaQuery"));
|
|
13
|
-
const WorkspaceSidePaneRoot_js_1 = require("./WorkspaceSidePaneRoot.js");
|
|
14
|
-
const workspaceSidePaneGeometry_js_1 = require("./workspaceSidePaneGeometry.js");
|
|
15
|
-
const motion = { timeout: { enter: 220, exit: 170 }, easing: "cubic-bezier(0.25, 1, 0.5, 1)" };
|
|
16
|
-
/** Keeps the workspace in one slot across docked, modal and closed presentation. */
|
|
17
|
-
function WorkspaceSidePane({ children, enabled = true, className, style, paneId, headingId, headingRef, workspaceRef, actionsLabel, resizeLabel = "Resize side pane", keepPaneMounted = false, preferredWidth, onPreferredWidthChange, getOverlaySiblings, renderActions, renderPane, }) {
|
|
18
|
-
const generatedId = (0, react_1.useId)();
|
|
19
|
-
const panelId = paneId !== null && paneId !== void 0 ? paneId : generatedId;
|
|
20
|
-
const rootRef = (0, react_1.useRef)(null);
|
|
21
|
-
const internalWorkspaceRef = (0, react_1.useRef)(null);
|
|
22
|
-
const contentRef = workspaceRef !== null && workspaceRef !== void 0 ? workspaceRef : internalWorkspaceRef;
|
|
23
|
-
const groupRef = (0, react_1.useRef)(null);
|
|
24
|
-
const openerRef = (0, react_1.useRef)(null);
|
|
25
|
-
const [open, setOpen] = (0, react_1.useState)(false);
|
|
26
|
-
const [present, setPresent] = (0, react_1.useState)(false);
|
|
27
|
-
const [directResize, setDirectResize] = (0, react_1.useState)(false);
|
|
28
|
-
const reducedMotion = (0, useMediaQuery_1.default)("(prefers-reduced-motion: reduce)", { noSsr: true });
|
|
29
|
-
const duration = reducedMotion ? 0 : motion.timeout;
|
|
30
|
-
const [internalWidth, setWidth] = (0, react_1.useState)(workspaceSidePaneGeometry_js_1.workspaceSidePaneMetrics.initialPane);
|
|
31
|
-
const [bounds, setBounds] = (0, react_1.useState)({ width: workspaceSidePaneGeometry_js_1.workspaceSidePaneMetrics.minCanvas + workspaceSidePaneGeometry_js_1.workspaceSidePaneMetrics.rail + workspaceSidePaneGeometry_js_1.workspaceSidePaneMetrics.initialPane, top: 0, workspaceInset: 0 });
|
|
32
|
-
const drag = (0, react_1.useRef)(null);
|
|
33
|
-
const dockedMaximum = Math.max(workspaceSidePaneGeometry_js_1.workspaceSidePaneMetrics.minPane, Math.min(workspaceSidePaneGeometry_js_1.workspaceSidePaneMetrics.maxPane, bounds.width - bounds.workspaceInset - workspaceSidePaneGeometry_js_1.workspaceSidePaneMetrics.rail - workspaceSidePaneGeometry_js_1.workspaceSidePaneMetrics.minCanvas));
|
|
34
|
-
const hasPreferredWidth = typeof preferredWidth === "number" && Number.isFinite(preferredWidth);
|
|
35
|
-
const requestedWidth = hasPreferredWidth
|
|
36
|
-
? Math.min(workspaceSidePaneGeometry_js_1.workspaceSidePaneMetrics.maxPane, Math.max(workspaceSidePaneGeometry_js_1.workspaceSidePaneMetrics.minPane, preferredWidth))
|
|
37
|
-
: internalWidth;
|
|
38
|
-
// A host preference can yield to the canvas without changing the preferred
|
|
39
|
-
// width or turning a workspace that fits the default into a modal.
|
|
40
|
-
const width = hasPreferredWidth && dockedMaximum >= workspaceSidePaneGeometry_js_1.workspaceSidePaneMetrics.initialPane
|
|
41
|
-
? Math.min(requestedWidth, dockedMaximum)
|
|
42
|
-
: requestedWidth;
|
|
43
|
-
const geometry = (0, workspaceSidePaneGeometry_js_1.workspaceSidePaneGeometry)(bounds.width, width, bounds.workspaceInset);
|
|
44
|
-
const presentedWidth = geometry.overlay && hasPreferredWidth
|
|
45
|
-
? (0, workspaceSidePaneGeometry_js_1.workspaceSidePaneGeometry)(bounds.width, workspaceSidePaneGeometry_js_1.workspaceSidePaneMetrics.initialPane, bounds.workspaceInset).paneWidth
|
|
46
|
-
: geometry.paneWidth;
|
|
47
|
-
const visible = enabled && open;
|
|
48
|
-
const overlay = visible && geometry.overlay;
|
|
49
|
-
const visibleRef = (0, react_1.useRef)(visible);
|
|
50
|
-
visibleRef.current = visible;
|
|
51
|
-
// Release modal focus and report closed to the host before visual exit.
|
|
52
|
-
const overlayPresentation = geometry.overlay && (visible || (present && !reducedMotion));
|
|
53
|
-
(0, react_1.useLayoutEffect)(() => {
|
|
54
|
-
if (!enabled) {
|
|
55
|
-
setPresent(false);
|
|
56
|
-
setDirectResize(false);
|
|
57
|
-
drag.current = null;
|
|
58
|
-
}
|
|
59
|
-
else if (visible) {
|
|
60
|
-
setPresent(true);
|
|
61
|
-
}
|
|
62
|
-
}, [enabled, visible]);
|
|
63
|
-
(0, react_1.useLayoutEffect)(() => {
|
|
64
|
-
const element = rootRef.current;
|
|
65
|
-
if (!element)
|
|
66
|
-
return;
|
|
67
|
-
const measure = () => {
|
|
68
|
-
const rect = element.getBoundingClientRect();
|
|
69
|
-
const workspaceStyle = contentRef.current ? getComputedStyle(contentRef.current) : null;
|
|
70
|
-
// Useful canvas excludes its retained page padding; chrome still uses
|
|
71
|
-
// the full root width, including in narrow overlays.
|
|
72
|
-
const workspaceInset = workspaceStyle
|
|
73
|
-
? (parseFloat(workspaceStyle.paddingLeft) || 0) + (parseFloat(workspaceStyle.paddingRight) || 0)
|
|
74
|
-
: 0;
|
|
75
|
-
const next = { width: rect.width || window.innerWidth, top: Math.max(0, rect.top), workspaceInset };
|
|
76
|
-
// Content ResizeObserver notifications also arrive during pane motion;
|
|
77
|
-
// unchanged shell geometry must not rerender pane content per frame.
|
|
78
|
-
setBounds((previous) => previous.width === next.width && previous.top === next.top && previous.workspaceInset === next.workspaceInset ? previous : next);
|
|
79
|
-
};
|
|
80
|
-
measure();
|
|
81
|
-
const observer = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(measure);
|
|
82
|
-
observer === null || observer === void 0 ? void 0 : observer.observe(element);
|
|
83
|
-
if (contentRef.current)
|
|
84
|
-
observer === null || observer === void 0 ? void 0 : observer.observe(contentRef.current);
|
|
85
|
-
window.addEventListener("resize", measure);
|
|
86
|
-
return () => {
|
|
87
|
-
observer === null || observer === void 0 ? void 0 : observer.disconnect();
|
|
88
|
-
window.removeEventListener("resize", measure);
|
|
89
|
-
};
|
|
90
|
-
}, [enabled, contentRef]);
|
|
91
|
-
(0, react_1.useLayoutEffect)(() => {
|
|
92
|
-
var _a, _b, _c;
|
|
93
|
-
if (!overlay)
|
|
94
|
-
return;
|
|
95
|
-
const content = contentRef.current;
|
|
96
|
-
const root = rootRef.current;
|
|
97
|
-
const siblings = root ? (_a = getOverlaySiblings === null || getOverlaySiblings === void 0 ? void 0 : getOverlaySiblings(root)) !== null && _a !== void 0 ? _a : [] : [];
|
|
98
|
-
const covered = [...new Set([...(content ? [content] : []), ...siblings])];
|
|
99
|
-
const priorInert = covered.map((element) => ({ element, value: element.getAttribute("inert") }));
|
|
100
|
-
// Restore the pre-existing inert state when this overlay releases focus.
|
|
101
|
-
covered.forEach((element) => element.setAttribute("inert", ""));
|
|
102
|
-
const ownerDocument = (_c = (_b = rootRef.current) === null || _b === void 0 ? void 0 : _b.ownerDocument) !== null && _c !== void 0 ? _c : document;
|
|
103
|
-
const focusInside = () => { var _a; return (_a = headingRef.current) === null || _a === void 0 ? void 0 : _a.focus(); };
|
|
104
|
-
const containsTarget = (target) => { var _a; return Boolean(target && ((_a = groupRef.current) === null || _a === void 0 ? void 0 : _a.contains(target))); };
|
|
105
|
-
const containFocus = (event) => {
|
|
106
|
-
if (!containsTarget(event.target))
|
|
107
|
-
focusInside();
|
|
108
|
-
};
|
|
109
|
-
const containOutsideTab = (event) => {
|
|
110
|
-
if (event.key !== "Tab" || containsTarget(event.target))
|
|
111
|
-
return;
|
|
112
|
-
event.preventDefault();
|
|
113
|
-
event.stopPropagation();
|
|
114
|
-
focusInside();
|
|
115
|
-
};
|
|
116
|
-
// inert blocks normal background interaction; focusin additionally contains
|
|
117
|
-
// programmatic focus and browsers/environments with incomplete inert support.
|
|
118
|
-
ownerDocument.addEventListener("focusin", containFocus, true);
|
|
119
|
-
ownerDocument.addEventListener("keydown", containOutsideTab, true);
|
|
120
|
-
focusInside();
|
|
121
|
-
return () => {
|
|
122
|
-
ownerDocument.removeEventListener("focusin", containFocus, true);
|
|
123
|
-
ownerDocument.removeEventListener("keydown", containOutsideTab, true);
|
|
124
|
-
priorInert.forEach(({ element, value }) => {
|
|
125
|
-
if (value === null)
|
|
126
|
-
element.removeAttribute("inert");
|
|
127
|
-
else
|
|
128
|
-
element.setAttribute("inert", value);
|
|
129
|
-
});
|
|
130
|
-
};
|
|
131
|
-
}, [overlay, headingId, headingRef, contentRef, getOverlaySiblings]);
|
|
132
|
-
(0, react_1.useLayoutEffect)(() => {
|
|
133
|
-
var _a;
|
|
134
|
-
if (!visible && present)
|
|
135
|
-
(_a = openerRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
136
|
-
}, [visible, present]);
|
|
137
|
-
const close = (opener) => {
|
|
138
|
-
if (opener)
|
|
139
|
-
openerRef.current = opener;
|
|
140
|
-
setOpen(false);
|
|
141
|
-
setDirectResize(false);
|
|
142
|
-
drag.current = null;
|
|
143
|
-
};
|
|
144
|
-
// Deliberate docked resizing preserves the useful canvas and its focusable
|
|
145
|
-
// control. Only an external viewport/container change may require an overlay.
|
|
146
|
-
const clampWidth = (next, reset = false) => {
|
|
147
|
-
const nextWidth = Math.max(workspaceSidePaneGeometry_js_1.workspaceSidePaneMetrics.minPane, Math.min(dockedMaximum, Math.round(next)));
|
|
148
|
-
if (nextWidth === width && (!reset || nextWidth === requestedWidth))
|
|
149
|
-
return;
|
|
150
|
-
setDirectResize(true);
|
|
151
|
-
setWidth(nextWidth);
|
|
152
|
-
onPreferredWidthChange === null || onPreferredWidthChange === void 0 ? void 0 : onPreferredWidthChange(nextWidth);
|
|
153
|
-
};
|
|
154
|
-
const keyboard = (event) => {
|
|
155
|
-
var _a, _b, _c, _d, _e;
|
|
156
|
-
// Nested native dialogs own their own Escape handling.
|
|
157
|
-
if ((_b = (_a = event.target).closest) === null || _b === void 0 ? void 0 : _b.call(_a, "dialog[open]"))
|
|
158
|
-
return;
|
|
159
|
-
if (event.key === "Escape" && !event.defaultPrevented) {
|
|
160
|
-
event.preventDefault();
|
|
161
|
-
event.stopPropagation();
|
|
162
|
-
close();
|
|
163
|
-
return;
|
|
164
|
-
}
|
|
165
|
-
if (!overlay || event.key !== "Tab")
|
|
166
|
-
return;
|
|
167
|
-
const controls = [...((_d = (_c = groupRef.current) === null || _c === void 0 ? void 0 : _c.querySelectorAll('button, a[href], input, textarea, select, summary, [tabindex]')) !== null && _d !== void 0 ? _d : [])]
|
|
168
|
-
.filter((element) => element.tabIndex >= 0 && !element.matches(":disabled")
|
|
169
|
-
&& !element.closest('[hidden], [inert], dialog:not([open])')
|
|
170
|
-
&& element.getClientRects().length > 0 && getComputedStyle(element).visibility !== "hidden");
|
|
171
|
-
const first = controls[0], last = controls[controls.length - 1];
|
|
172
|
-
const focused = (_e = groupRef.current) === null || _e === void 0 ? void 0 : _e.ownerDocument.activeElement;
|
|
173
|
-
if (event.shiftKey && (focused === first || focused === headingRef.current)) {
|
|
174
|
-
event.preventDefault();
|
|
175
|
-
last === null || last === void 0 ? void 0 : last.focus();
|
|
176
|
-
}
|
|
177
|
-
else if (!event.shiftKey && focused === last) {
|
|
178
|
-
event.preventDefault();
|
|
179
|
-
first === null || first === void 0 ? void 0 : first.focus();
|
|
180
|
-
}
|
|
181
|
-
};
|
|
182
|
-
const openFrom = (event, focusTarget = headingRef) => {
|
|
183
|
-
openerRef.current = event.currentTarget;
|
|
184
|
-
setPresent(true);
|
|
185
|
-
setOpen(true);
|
|
186
|
-
if (event.detail === 0)
|
|
187
|
-
requestAnimationFrame(() => {
|
|
188
|
-
var _a;
|
|
189
|
-
if (visibleRef.current)
|
|
190
|
-
(_a = focusTarget.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
191
|
-
});
|
|
192
|
-
};
|
|
193
|
-
return ((0, jsx_runtime_1.jsxs)(WorkspaceSidePaneRoot_js_1.WorkspaceSidePaneRoot, { ref: rootRef, className: `workspace-side-pane${className ? ` ${className}` : ""}${enabled ? " workspace-side-pane-enabled" : ""}${visible ? " workspace-side-pane-open" : ""}${overlayPresentation ? " workspace-side-pane-overlay" : ""}${directResize && visible ? " workspace-side-pane-direct-resize" : ""}${reducedMotion ? " workspace-side-pane-reduced-motion" : ""}`, style: { ...style, "--workspace-side-pane-width": `${presentedWidth}px`, "--workspace-side-pane-top": `${bounds.top}px` }, children: [(0, jsx_runtime_1.jsx)("div", { ref: contentRef, className: "workspace-side-pane-workspace", children: children }), enabled && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Fade_1.default, { in: overlay, timeout: duration, easing: motion.easing, mountOnEnter: true, unmountOnExit: true, children: (0, jsx_runtime_1.jsx)("div", { className: "workspace-side-pane-backdrop", "data-active": overlay, style: { pointerEvents: overlay ? "auto" : "none" }, onClick: () => close(), "aria-hidden": "true" }) }), (0, jsx_runtime_1.jsxs)("div", { className: "workspace-side-pane-group", ref: groupRef, role: overlay ? "dialog" : undefined, "aria-modal": overlay ? true : undefined, "aria-labelledby": overlay ? headingId : undefined, onKeyDown: keyboard, children: [(0, jsx_runtime_1.jsxs)("nav", { className: "workspace-side-pane-rail", "aria-label": actionsLabel, children: [renderActions({ visible, paneId: panelId, openFrom, close }), visible && !overlay && ((0, jsx_runtime_1.jsx)("div", { role: "separator", tabIndex: 0, className: "workspace-side-pane-resize", "aria-label": resizeLabel, "aria-orientation": "vertical", "aria-valuemin": workspaceSidePaneGeometry_js_1.workspaceSidePaneMetrics.minPane, "aria-valuemax": dockedMaximum, "aria-valuenow": width, "aria-valuetext": `${Math.round(geometry.paneWidth)} pixels`, title: "Drag to resize; Left/Right adjusts width; Enter resets", onKeyDown: (event) => {
|
|
194
|
-
const next = event.key === "ArrowLeft"
|
|
195
|
-
? width + 16
|
|
196
|
-
: event.key === "ArrowRight"
|
|
197
|
-
? width - 16
|
|
198
|
-
: event.key === "Home"
|
|
199
|
-
? workspaceSidePaneGeometry_js_1.workspaceSidePaneMetrics.minPane
|
|
200
|
-
: event.key === "End"
|
|
201
|
-
? workspaceSidePaneGeometry_js_1.workspaceSidePaneMetrics.maxPane
|
|
202
|
-
: event.key === "Enter"
|
|
203
|
-
? workspaceSidePaneGeometry_js_1.workspaceSidePaneMetrics.initialPane
|
|
204
|
-
: null;
|
|
205
|
-
if (next !== null) {
|
|
206
|
-
event.preventDefault();
|
|
207
|
-
event.stopPropagation();
|
|
208
|
-
clampWidth(next, event.key === "Enter");
|
|
209
|
-
}
|
|
210
|
-
}, onPointerDown: (event) => {
|
|
211
|
-
var _a, _b;
|
|
212
|
-
drag.current = { x: event.clientX, width };
|
|
213
|
-
(_b = (_a = event.currentTarget).setPointerCapture) === null || _b === void 0 ? void 0 : _b.call(_a, event.pointerId);
|
|
214
|
-
}, onPointerMove: (event) => {
|
|
215
|
-
if (drag.current)
|
|
216
|
-
clampWidth(drag.current.width + drag.current.x - event.clientX);
|
|
217
|
-
}, onPointerUp: () => {
|
|
218
|
-
drag.current = null;
|
|
219
|
-
}, onPointerCancel: () => {
|
|
220
|
-
drag.current = null;
|
|
221
|
-
} }))] }), (0, jsx_runtime_1.jsx)(Collapse_1.default, { in: visible, orientation: "horizontal", className: "workspace-side-pane-presence", timeout: duration, easing: motion.easing, mountOnEnter: true, unmountOnExit: !keepPaneMounted, onExited: () => setPresent(false), children: (0, jsx_runtime_1.jsx)("aside", { id: panelId, className: "workspace-side-pane-panel", "aria-labelledby": headingId, "aria-hidden": !visible || undefined, inert: !visible, children: renderPane(visible) }) })] })] }))] }));
|
|
222
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const WorkspaceSidePaneRoot: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|