@visin/frontend-core 1.8.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.
Files changed (77) hide show
  1. package/dist/components/AppLayout/AppLayout.d.ts +2 -4
  2. package/dist/components/AppLayout/AppLayout.d.ts.map +1 -1
  3. package/dist/components/AppLayout/AppLayout.js +84 -62
  4. package/dist/components/AppLayout/AppLayout.js.map +1 -1
  5. package/dist/components/ColorMode/ColorModeSetting.d.ts +39 -0
  6. package/dist/components/ColorMode/ColorModeSetting.d.ts.map +1 -0
  7. package/dist/components/ColorMode/ColorModeSetting.js +52 -0
  8. package/dist/components/ColorMode/ColorModeSetting.js.map +1 -0
  9. package/dist/components/ColorMode/VisinThemeProvider.d.ts +16 -0
  10. package/dist/components/ColorMode/VisinThemeProvider.d.ts.map +1 -0
  11. package/dist/components/ColorMode/VisinThemeProvider.js +19 -0
  12. package/dist/components/ColorMode/VisinThemeProvider.js.map +1 -0
  13. package/dist/components/ColorMode/index.d.ts +7 -0
  14. package/dist/components/ColorMode/index.d.ts.map +1 -0
  15. package/dist/components/ColorMode/index.js +4 -0
  16. package/dist/components/ColorMode/index.js.map +1 -0
  17. package/dist/components/ColorMode/useChartColors.d.ts +15 -0
  18. package/dist/components/ColorMode/useChartColors.d.ts.map +1 -0
  19. package/dist/components/ColorMode/useChartColors.js +16 -0
  20. package/dist/components/ColorMode/useChartColors.js.map +1 -0
  21. package/dist/components/Page/EmptyState.d.ts +10 -0
  22. package/dist/components/Page/EmptyState.d.ts.map +1 -0
  23. package/dist/components/Page/EmptyState.js +19 -0
  24. package/dist/components/Page/EmptyState.js.map +1 -0
  25. package/dist/components/Page/ListRow.d.ts +27 -0
  26. package/dist/components/Page/ListRow.d.ts.map +1 -0
  27. package/dist/components/Page/ListRow.js +73 -0
  28. package/dist/components/Page/ListRow.js.map +1 -0
  29. package/dist/components/Page/PageHeader.d.ts +33 -0
  30. package/dist/components/Page/PageHeader.d.ts.map +1 -0
  31. package/dist/components/Page/PageHeader.js +49 -0
  32. package/dist/components/Page/PageHeader.js.map +1 -0
  33. package/dist/components/Page/Panel.d.ts +18 -0
  34. package/dist/components/Page/Panel.d.ts.map +1 -0
  35. package/dist/components/Page/Panel.js +23 -0
  36. package/dist/components/Page/Panel.js.map +1 -0
  37. package/dist/components/Page/ResponsiveActions.d.ts +38 -0
  38. package/dist/components/Page/ResponsiveActions.d.ts.map +1 -0
  39. package/dist/components/Page/ResponsiveActions.js +30 -0
  40. package/dist/components/Page/ResponsiveActions.js.map +1 -0
  41. package/dist/components/Page/SectionHeading.d.ts +10 -0
  42. package/dist/components/Page/SectionHeading.d.ts.map +1 -0
  43. package/dist/components/Page/SectionHeading.js +7 -0
  44. package/dist/components/Page/SectionHeading.js.map +1 -0
  45. package/dist/components/Page/index.d.ts +14 -0
  46. package/dist/components/Page/index.d.ts.map +1 -0
  47. package/dist/components/Page/index.js +8 -0
  48. package/dist/components/Page/index.js.map +1 -0
  49. package/dist/components/Page/layout.d.ts +10 -0
  50. package/dist/components/Page/layout.d.ts.map +1 -0
  51. package/dist/components/Page/layout.js +14 -0
  52. package/dist/components/Page/layout.js.map +1 -0
  53. package/dist/index.d.ts +6 -0
  54. package/dist/index.d.ts.map +1 -1
  55. package/dist/index.js +3 -0
  56. package/dist/index.js.map +1 -1
  57. package/dist/theme/chart.d.ts +19 -0
  58. package/dist/theme/chart.d.ts.map +1 -0
  59. package/dist/theme/chart.js +19 -0
  60. package/dist/theme/chart.js.map +1 -0
  61. package/dist/theme/createVisinTheme.d.ts +45 -0
  62. package/dist/theme/createVisinTheme.d.ts.map +1 -0
  63. package/dist/theme/createVisinTheme.js +261 -0
  64. package/dist/theme/createVisinTheme.js.map +1 -0
  65. package/dist/theme/index.d.ts +6 -0
  66. package/dist/theme/index.d.ts.map +1 -0
  67. package/dist/theme/index.js +5 -0
  68. package/dist/theme/index.js.map +1 -0
  69. package/dist/theme/livePalette.d.ts +11 -0
  70. package/dist/theme/livePalette.d.ts.map +1 -0
  71. package/dist/theme/livePalette.js +10 -0
  72. package/dist/theme/livePalette.js.map +1 -0
  73. package/dist/theme/tokens.d.ts +224 -0
  74. package/dist/theme/tokens.d.ts.map +1 -0
  75. package/dist/theme/tokens.js +205 -0
  76. package/dist/theme/tokens.js.map +1 -0
  77. package/package.json +1 -1
@@ -0,0 +1,19 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box, Typography } from '@mui/material';
3
+ import { livePalette } from '../../theme';
4
+ /** What stands in for a list with nothing in it: what would be here, and how to add the first one. */
5
+ export function EmptyState({ icon, title, description, action }) {
6
+ return (_jsxs(Box, { sx: { textAlign: 'center', px: 3, py: { xs: 6, md: 8 } }, children: [_jsx(Box, { "aria-hidden": true, sx: (theme) => ({
7
+ width: 56,
8
+ height: 56,
9
+ mx: 'auto',
10
+ mb: 2,
11
+ borderRadius: '16px',
12
+ display: 'grid',
13
+ placeItems: 'center',
14
+ color: 'primary.main',
15
+ bgcolor: theme.alpha(livePalette(theme).primary.main, 0.1),
16
+ '& svg': { fontSize: 28 }
17
+ }), children: icon }), _jsx(Typography, { sx: { fontWeight: 700, fontSize: '1.05rem' }, children: title }), description && (_jsx(Typography, { variant: "body2", sx: { color: 'text.secondary', mt: 0.5, maxWidth: 420, mx: 'auto' }, children: description })), action && _jsx(Box, { sx: { mt: 2.5 }, children: action })] }));
18
+ }
19
+ //# sourceMappingURL=EmptyState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EmptyState.js","sourceRoot":"","sources":["../../../src/components/Page/EmptyState.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAS1C,sGAAsG;AACtG,MAAM,UAAU,UAAU,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAmB;IAC9E,OAAO,CACL,MAAC,GAAG,IAAC,EAAE,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,aAC3D,KAAC,GAAG,yBAEF,EAAE,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;oBACd,KAAK,EAAE,EAAE;oBACT,MAAM,EAAE,EAAE;oBACV,EAAE,EAAE,MAAM;oBACV,EAAE,EAAE,CAAC;oBACL,YAAY,EAAE,MAAM;oBACpB,OAAO,EAAE,MAAM;oBACf,UAAU,EAAE,QAAQ;oBACpB,KAAK,EAAE,cAAc;oBACrB,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC;oBAC1D,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;iBAC1B,CAAC,YAED,IAAI,GACD,EACN,KAAC,UAAU,IAAC,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,QAAQ,EAAE,SAAS,EAAE,YAAG,KAAK,GAAc,EAC7E,WAAW,IAAI,CACd,KAAC,UAAU,IAAC,OAAO,EAAC,OAAO,EAAC,EAAE,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,EAAE,YAC5F,WAAW,GACD,CACd,EACA,MAAM,IAAI,KAAC,GAAG,IAAC,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,YAAG,MAAM,GAAO,IAC3C,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,27 @@
1
+ import type { ReactNode } from 'react';
2
+ export interface ListRowProps {
3
+ /** A route in this app. */
4
+ to?: string;
5
+ /** A page elsewhere, loaded in full. */
6
+ href?: string;
7
+ onClick?: () => void;
8
+ leading?: ReactNode;
9
+ title: ReactNode;
10
+ secondary?: ReactNode;
11
+ /** Controls at the end of the row (a menu, a chip). Replaces the chevron, and sits outside the tap target. */
12
+ trailing?: ReactNode;
13
+ /** Drawn under the secondary line, e.g. a progress meter. */
14
+ children?: ReactNode;
15
+ }
16
+ /**
17
+ * One row of a native-style list: icon, two lines, and a chevron — the whole
18
+ * row one tap target. Rows in a `Panel` get hairlines between them, inset past
19
+ * the icon the way a phone draws them.
20
+ */
21
+ export declare function ListRow({ to, href, onClick, leading, title, secondary, trailing, children }: ListRowProps): import("react").JSX.Element;
22
+ /** The tinted square an icon sits in at the start of a row. */
23
+ export declare function RowIcon({ color, children }: {
24
+ color: string;
25
+ children: ReactNode;
26
+ }): import("react").JSX.Element;
27
+ //# sourceMappingURL=ListRow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ListRow.d.ts","sourceRoot":"","sources":["../../../src/components/Page/ListRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAgBvC,MAAM,WAAW,YAAY;IAC3B,2BAA2B;IAC3B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,wCAAwC;IACxC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,KAAK,EAAE,SAAS,CAAC;IACjB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,8GAA8G;IAC9G,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,YAAY,+BA2EzG;AAED,+DAA+D;AAC/D,wBAAgB,OAAO,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,+BAoBlF"}
@@ -0,0 +1,73 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { Link as RouterLink } from 'react-router-dom';
3
+ import { Box, ButtonBase, Typography } from '@mui/material';
4
+ import { tint } from '../../theme';
5
+ import { ChevronRight } from '@mui/icons-material';
6
+ // Up to two lines, then an ellipsis: one line cut a phone row's detail off
7
+ // before its most useful part.
8
+ const twoLines = {
9
+ display: '-webkit-box',
10
+ WebkitBoxOrient: 'vertical',
11
+ WebkitLineClamp: 2,
12
+ overflow: 'hidden',
13
+ overflowWrap: 'anywhere'
14
+ };
15
+ /**
16
+ * One row of a native-style list: icon, two lines, and a chevron — the whole
17
+ * row one tap target. Rows in a `Panel` get hairlines between them, inset past
18
+ * the icon the way a phone draws them.
19
+ */
20
+ export function ListRow({ to, href, onClick, leading, title, secondary, trailing, children }) {
21
+ const navigable = to !== undefined || href !== undefined || onClick !== undefined;
22
+ const target = to !== undefined ? { component: RouterLink, to } : href !== undefined ? { component: 'a', href } : {};
23
+ const body = (_jsxs(_Fragment, { children: [leading, _jsxs(Box, { component: "span", sx: { flex: 1, minWidth: 0 }, children: [_jsx(Typography, { component: "span", sx: { ...twoLines, fontSize: '0.975rem', fontWeight: 600, lineHeight: 1.4 }, children: title }), secondary && (_jsx(Typography, { component: "span", variant: "body2", sx: { ...twoLines, color: 'text.secondary' }, children: secondary })), children] }), navigable && !trailing && _jsx(ChevronRight, { sx: { color: 'text.disabled', flexShrink: 0 } })] }));
24
+ const rowSx = {
25
+ flex: 1,
26
+ minWidth: 0,
27
+ display: 'flex',
28
+ alignItems: 'center',
29
+ justifyContent: 'flex-start',
30
+ gap: 1.5,
31
+ px: 2,
32
+ py: 1.5,
33
+ minHeight: 64,
34
+ textAlign: 'left',
35
+ color: 'text.primary'
36
+ };
37
+ return (_jsxs(Box, { className: "visin-list-row", sx: {
38
+ position: 'relative',
39
+ display: 'flex',
40
+ alignItems: 'center',
41
+ pr: trailing ? 1 : 0,
42
+ '.visin-list-row + &::before': {
43
+ content: '""',
44
+ position: 'absolute',
45
+ top: 0,
46
+ left: leading ? 68 : 16,
47
+ right: 0,
48
+ borderTop: '1px solid',
49
+ borderColor: 'divider'
50
+ }
51
+ }, children: [navigable ? (_jsx(ButtonBase, { ...target, onClick: onClick, sx: {
52
+ ...rowSx,
53
+ WebkitTapHighlightColor: 'transparent',
54
+ transition: 'background-color .15s ease',
55
+ '&:hover': { bgcolor: 'action.hover' },
56
+ '&:active': { bgcolor: 'action.selected' }
57
+ }, children: body })) : (_jsx(Box, { sx: rowSx, children: body })), trailing && _jsx(Box, { sx: { display: 'flex', alignItems: 'center', gap: 0.5, flexShrink: 0 }, children: trailing })] }));
58
+ }
59
+ /** The tinted square an icon sits in at the start of a row. */
60
+ export function RowIcon({ color, children }) {
61
+ return (_jsx(Box, { component: "span", "aria-hidden": true, sx: {
62
+ width: 40,
63
+ height: 40,
64
+ borderRadius: '12px',
65
+ display: 'grid',
66
+ placeItems: 'center',
67
+ flexShrink: 0,
68
+ color,
69
+ // `tint`, not MUI's `alpha`: the colour may be a theme variable.
70
+ bgcolor: tint(color, 0.12)
71
+ }, children: children }));
72
+ }
73
+ //# sourceMappingURL=ListRow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ListRow.js","sourceRoot":"","sources":["../../../src/components/Page/ListRow.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,2EAA2E;AAC3E,+BAA+B;AAC/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AQ,IAAI,KAAC,GAAG,IAAC,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC,EAAE,YAAG,QAAQ,GAAO,IACtG,CACP,CAAC;AACJ,CAAC;AAED,+DAA+D;AAC/D,MAAM,UAAU,OAAO,CAAC,EAAE,KAAK,EAAE,QAAQ,EAA0C;IACjF,OAAO,CACL,KAAC,GAAG,IACF,SAAS,EAAC,MAAM,uBAEhB,EAAE,EAAE;YACF,KAAK,EAAE,EAAE;YACT,MAAM,EAAE,EAAE;YACV,YAAY,EAAE,MAAM;YACpB,OAAO,EAAE,MAAM;YACf,UAAU,EAAE,QAAQ;YACpB,UAAU,EAAE,CAAC;YACb,KAAK;YACL,iEAAiE;YACjE,OAAO,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC;SAC3B,YAEA,QAAQ,GACL,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,33 @@
1
+ import type { ReactNode } from 'react';
2
+ export interface PageAction {
3
+ label: string;
4
+ icon?: ReactNode;
5
+ /** A route in this app. */
6
+ to?: string;
7
+ onClick?: () => void;
8
+ disabled?: boolean;
9
+ }
10
+ export interface PageHeaderProps {
11
+ /**
12
+ * Left out where the layout already titles the page (label and account pages,
13
+ * whose `AppLayout` header names them): then only the subtitle and actions show.
14
+ */
15
+ title?: string;
16
+ subtitle?: ReactNode;
17
+ /** Secondary controls beside the primary action, e.g. a refresh button. */
18
+ actions?: ReactNode;
19
+ /** The page's main action. A button on desktop; a floating button above the tab bar on a phone. */
20
+ primaryAction?: PageAction;
21
+ /**
22
+ * The app bar already names this page on a phone — a top-level section like
23
+ * Projects or Jobs — so the title is left out there rather than said twice.
24
+ */
25
+ hideTitleOnPhone?: boolean;
26
+ }
27
+ /**
28
+ * The top of a page: its title, a line saying what it is for, and what can be
29
+ * done here. On a phone the main action moves to a floating button in thumb
30
+ * reach, the way a native app offers "new".
31
+ */
32
+ export declare function PageHeader({ title, subtitle, actions, primaryAction, hideTitleOnPhone }: PageHeaderProps): import("react").JSX.Element;
33
+ //# sourceMappingURL=PageHeader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PageHeader.d.ts","sourceRoot":"","sources":["../../../src/components/Page/PageHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAevC,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,2BAA2B;IAC3B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,2EAA2E;IAC3E,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,mGAAmG;IACnG,aAAa,CAAC,EAAE,UAAU,CAAC;IAC3B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,gBAAwB,EAAE,EAAE,eAAe,+BAwFhH"}
@@ -0,0 +1,49 @@
1
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
+ import { Link as RouterLink } from 'react-router-dom';
3
+ import { Box, Button, Fab, Typography } from '@mui/material';
4
+ import { livePalette, mainAction } from '../../theme';
5
+ import { TAB_BAR_HEIGHT, useCompactLayout } from './layout';
6
+ const visuallyHidden = {
7
+ position: 'absolute',
8
+ width: '1px',
9
+ height: '1px',
10
+ overflow: 'hidden',
11
+ clip: 'rect(0 0 0 0)',
12
+ whiteSpace: 'nowrap'
13
+ };
14
+ /**
15
+ * The top of a page: its title, a line saying what it is for, and what can be
16
+ * done here. On a phone the main action moves to a floating button in thumb
17
+ * reach, the way a native app offers "new".
18
+ */
19
+ export function PageHeader({ title, subtitle, actions, primaryAction, hideTitleOnPhone = false }) {
20
+ const compact = useCompactLayout();
21
+ const showTitle = title !== undefined && !(compact && hideTitleOnPhone);
22
+ const link = primaryAction?.to !== undefined ? { component: RouterLink, to: primaryAction.to } : {};
23
+ const primary = primaryAction &&
24
+ (compact ? (_jsxs(Fab, { variant: "extended", color: "primary", ...link, onClick: primaryAction.onClick, disabled: primaryAction.disabled, sx: {
25
+ position: 'fixed',
26
+ right: 16,
27
+ bottom: `calc(${TAB_BAR_HEIGHT}px + 16px + env(safe-area-inset-bottom))`,
28
+ zIndex: (theme) => theme.zIndex.speedDial,
29
+ gap: 1,
30
+ px: 2.5,
31
+ ...mainAction,
32
+ boxShadow: (theme) => `0 8px 24px ${theme.alpha(livePalette(theme).primary.main, 0.35)}`
33
+ }, children: [primaryAction.icon, primaryAction.label] })) : (_jsx(Button, { variant: "contained", ...link, onClick: primaryAction.onClick, disabled: primaryAction.disabled, startIcon: primaryAction.icon, sx: { flexShrink: 0, height: 40, px: 2.25, ...mainAction }, children: primaryAction.label })));
34
+ const controls = (actions || (primary && !compact)) && (_jsxs(Box, { sx: { display: 'flex', alignItems: 'center', gap: 1, flexShrink: 0 }, children: [actions, !compact && primary] }));
35
+ return (_jsxs(Box, { component: "header", sx: {
36
+ display: 'flex',
37
+ alignItems: showTitle ? 'flex-start' : 'center',
38
+ justifyContent: 'space-between',
39
+ // A narrow screen wraps a wide control (a select) under the text rather
40
+ // than squeezing the text into a strip beside it; an icon still fits.
41
+ flexWrap: 'wrap',
42
+ gap: 2,
43
+ // Nothing visible (a phone, no subtitle or controls): no gap either.
44
+ mb: !showTitle && !subtitle && !controls ? 0 : { xs: 2, md: 3 }
45
+ }, children: [_jsxs(Box, { sx: { minWidth: 0, flex: '1 1 240px' }, children: [title !== undefined && (_jsx(Typography, { variant: "h4", component: "h1", sx: showTitle
46
+ ? { fontSize: { xs: '1.5rem', md: '1.75rem' }, lineHeight: 1.25, mb: subtitle ? 0.5 : 0 }
47
+ : visuallyHidden, children: title })), subtitle && (_jsx(Typography, { variant: "body2", sx: { color: 'text.secondary', fontSize: { md: '0.95rem' } }, children: subtitle }))] }), controls, compact && primary] }));
48
+ }
49
+ //# sourceMappingURL=PageHeader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PageHeader.js","sourceRoot":"","sources":["../../../src/components/Page/PageHeader.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5D,MAAM,cAAc,GAAG;IACrB,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE,KAAK;IACb,QAAQ,EAAE,QAAQ;IAClB,IAAI,EAAE,eAAe;IACrB,UAAU,EAAE,QAAQ;CACZ,CAAC;AA6BX;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,gBAAgB,GAAG,KAAK,EAAmB;IAC/G,MAAM,OAAO,GAAG,gBAAgB,EAAE,CAAC;IACnC,MAAM,SAAS,GAAG,KAAK,KAAK,SAAS,IAAI,CAAC,CAAC,OAAO,IAAI,gBAAgB,CAAC,CAAC;IACxE,MAAM,IAAI,GAAG,aAAa,EAAE,EAAE,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,EAAE,EAAE,aAAa,CAAC,EAAE,E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,IAAI,OAAO,IACf,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,18 @@
1
+ import type { ReactNode } from 'react';
2
+ import { type SxProps, type Theme } from '@mui/material';
3
+ export interface PanelProps {
4
+ children: ReactNode;
5
+ sx?: SxProps<Theme>;
6
+ /** The element to render, e.g. `section` or `ul`. */
7
+ component?: React.ElementType;
8
+ 'aria-label'?: string;
9
+ 'aria-labelledby'?: string;
10
+ }
11
+ /**
12
+ * The surface lists, tables and forms sit on: paper, a hairline border, 16px
13
+ * corners and a shadow soft enough that a stack of them does not read as
14
+ * clutter on a phone. Solid, not glass: blur behind rows of numbers costs
15
+ * legibility.
16
+ */
17
+ export declare function Panel({ children, sx, component, ...aria }: PanelProps): import("react").JSX.Element;
18
+ //# sourceMappingURL=Panel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Panel.d.ts","sourceRoot":"","sources":["../../../src/components/Page/Panel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAO,KAAK,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,eAAe,CAAC;AAG9D,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,SAAS,CAAC;IACpB,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACpB,qDAAqD;IACrD,SAAS,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAiB,EAAE,GAAG,IAAI,EAAE,EAAE,UAAU,+BAoB7E"}
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Box } from '@mui/material';
3
+ import { raisedShadow } from '../../theme';
4
+ /**
5
+ * The surface lists, tables and forms sit on: paper, a hairline border, 16px
6
+ * corners and a shadow soft enough that a stack of them does not read as
7
+ * clutter on a phone. Solid, not glass: blur behind rows of numbers costs
8
+ * legibility.
9
+ */
10
+ export function Panel({ children, sx, component = 'div', ...aria }) {
11
+ return (_jsx(Box, { component: component, ...aria, sx: [
12
+ {
13
+ bgcolor: 'background.paper',
14
+ border: '1px solid',
15
+ borderColor: 'divider',
16
+ borderRadius: '16px',
17
+ boxShadow: raisedShadow,
18
+ overflow: 'hidden'
19
+ },
20
+ ...(Array.isArray(sx) ? sx : [sx])
21
+ ], children: children }));
22
+ }
23
+ //# sourceMappingURL=Panel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Panel.js","sourceRoot":"","sources":["../../../src/components/Page/Panel.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAA4B,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAW3C;;;;;GAKG;AACH,MAAM,UAAU,KAAK,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,GAAG,KAAK,EAAE,GAAG,IAAI,EAAc;IAC5E,OAAO,CACL,KAAC,GAAG,IACF,SAAS,EAAE,SAAS,KAChB,IAAI,EACR,EAAE,EAAE;YACF;gBACE,OAAO,EAAE,kBAAkB;gBAC3B,MAAM,EAAE,WAAW;gBACnB,WAAW,EAAE,SAAS;gBACtB,YAAY,EAAE,MAAM;gBACpB,SAAS,EAAE,YAAY;gBACvB,QAAQ,EAAE,QAAQ;aACnB;YACD,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;SACnC,YAEA,QAAQ,GACL,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,38 @@
1
+ import { type ReactNode } from 'react';
2
+ export interface ResponsiveAction {
3
+ label: string;
4
+ icon?: ReactNode;
5
+ onClick?: () => void;
6
+ /** A route in this app. */
7
+ to?: string;
8
+ /** A page or file elsewhere. */
9
+ href?: string;
10
+ /** Filled: the one thing this page is for. At most one per bar. */
11
+ primary?: boolean;
12
+ /** A destructive action, drawn in the error colour. */
13
+ danger?: boolean;
14
+ disabled?: boolean;
15
+ }
16
+ export interface ResponsiveActionsProps {
17
+ actions: ResponsiveAction[];
18
+ /**
19
+ * How many of the leading actions stay buttons on a phone; the rest move into
20
+ * a ⋮ menu. Defaults to 0 — a phone's width belongs to the content.
21
+ */
22
+ keepOnPhone?: number;
23
+ /**
24
+ * How many stay buttons on desktop; the rest go behind ⋮ there too. Defaults
25
+ * to all — set it where a page has chores (exports, archive) that would
26
+ * otherwise crowd out what the page is for.
27
+ */
28
+ keepOnDesktop?: number;
29
+ /** Names the ⋮ button, e.g. "More actions for VLM". */
30
+ menuLabel?: string;
31
+ }
32
+ /**
33
+ * A page's actions: a row of buttons on desktop, and on a phone the leading
34
+ * few as buttons with the rest behind a ⋮ menu, the way a native app keeps its
35
+ * toolbar to what fits.
36
+ */
37
+ export declare function ResponsiveActions({ actions, keepOnPhone, keepOnDesktop, menuLabel }: ResponsiveActionsProps): import("react").JSX.Element | null;
38
+ //# sourceMappingURL=ResponsiveActions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResponsiveActions.d.ts","sourceRoot":"","sources":["../../../src/components/Page/ResponsiveActions.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAMjD,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,2BAA2B;IAC3B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,gCAAgC;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,uDAAuD;IACvD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AASD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,OAAO,EAAE,WAAe,EAAE,aAAa,EAAE,SAA0B,EAAE,EAAE,sBAAsB,sCA2DhI"}
@@ -0,0 +1,30 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useState } from 'react';
3
+ import { Link as RouterLink } from 'react-router-dom';
4
+ import { Box, Button, IconButton, ListItemIcon, Menu, MenuItem } from '@mui/material';
5
+ import { MoreVert } from '@mui/icons-material';
6
+ import { useCompactLayout } from './layout';
7
+ const linkProps = (action) => action.to !== undefined
8
+ ? { component: RouterLink, to: action.to }
9
+ : action.href !== undefined
10
+ ? { component: 'a', href: action.href }
11
+ : {};
12
+ /**
13
+ * A page's actions: a row of buttons on desktop, and on a phone the leading
14
+ * few as buttons with the rest behind a ⋮ menu, the way a native app keeps its
15
+ * toolbar to what fits.
16
+ */
17
+ export function ResponsiveActions({ actions, keepOnPhone = 0, keepOnDesktop, menuLabel = 'More actions' }) {
18
+ const compact = useCompactLayout();
19
+ const [anchor, setAnchor] = useState(null);
20
+ const kept = compact ? keepOnPhone : (keepOnDesktop ?? actions.length);
21
+ const shown = actions.slice(0, kept);
22
+ const overflow = actions.slice(kept);
23
+ if (actions.length === 0)
24
+ return null;
25
+ return (_jsxs(Box, { sx: { display: 'flex', alignItems: 'center', flexWrap: 'wrap', gap: 1 }, children: [shown.map((action) => (_jsx(Button, { ...linkProps(action), onClick: action.onClick, disabled: action.disabled, startIcon: action.icon, variant: action.primary ? 'contained' : 'outlined', color: action.danger ? 'error' : action.primary ? 'primary' : 'inherit', sx: action.primary || action.danger ? undefined : { borderColor: 'divider', color: 'text.primary' }, children: action.label }, action.label))), overflow.length > 0 && (_jsxs(_Fragment, { children: [_jsx(IconButton, { "aria-label": menuLabel, "aria-haspopup": "menu", onClick: (event) => setAnchor(event.currentTarget), children: _jsx(MoreVert, {}) }), _jsx(Menu, { anchorEl: anchor, open: Boolean(anchor), onClose: () => setAnchor(null), anchorOrigin: { vertical: 'bottom', horizontal: 'right' }, transformOrigin: { vertical: 'top', horizontal: 'right' }, slotProps: { paper: { sx: { minWidth: 200 } } }, children: overflow.map((action) => (_jsxs(MenuItem, { ...linkProps(action), disabled: action.disabled, onClick: () => {
26
+ setAnchor(null);
27
+ action.onClick?.();
28
+ }, sx: action.danger ? { color: 'error.main' } : undefined, children: [action.icon && _jsx(ListItemIcon, { sx: action.danger ? { color: 'inherit' } : undefined, children: action.icon }), action.label] }, action.label))) })] }))] }));
29
+ }
30
+ //# sourceMappingURL=ResponsiveActions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResponsiveActions.js","sourceRoot":"","sources":["../../../src/components/Page/ResponsiveActions.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACtF,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAkC5C,MAAM,SAAS,GAAG,CAAC,MAAwB,EAAE,EAAE,CAC7C,MAAM,CAAC,EAAE,KAAK,SAAS;IACrB,CAAC,CAAC,EAAE,SAAS,EAA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E,EAAE,CAAC;4BACrB,CAAC,EACD,EAAE,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,SAAS,aAEtD,MAAM,CAAC,IAAI,IAAI,KAAC,YAAY,IAAC,EAAE,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,SAAS,YAAG,MAAM,CAAC,IAAI,GAAgB,EAC/G,MAAM,CAAC,KAAK,KAVR,MAAM,CAAC,KAAK,CAWR,CACZ,CAAC,GACG,IACN,CACJ,IACG,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { ReactNode } from 'react';
2
+ export interface SectionHeadingProps {
3
+ id?: string;
4
+ children: ReactNode;
5
+ /** Beside the caption, e.g. a "See all" link. */
6
+ action?: ReactNode;
7
+ }
8
+ /** The small caption over a group of rows, the way a phone's settings screens caption theirs. */
9
+ export declare function SectionHeading({ id, children, action }: SectionHeadingProps): import("react").JSX.Element;
10
+ //# sourceMappingURL=SectionHeading.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SectionHeading.d.ts","sourceRoot":"","sources":["../../../src/components/Page/SectionHeading.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,WAAW,mBAAmB;IAClC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,SAAS,CAAC;IACpB,iDAAiD;IACjD,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AAED,iGAAiG;AACjG,wBAAgB,cAAc,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,mBAAmB,+BAa3E"}
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box, Typography } from '@mui/material';
3
+ /** The small caption over a group of rows, the way a phone's settings screens caption theirs. */
4
+ export function SectionHeading({ id, children, action }) {
5
+ return (_jsxs(Box, { sx: { display: 'flex', alignItems: 'baseline', justifyContent: 'space-between', gap: 2, px: 0.5, mb: 1 }, children: [_jsx(Typography, { id: id, component: "h2", sx: { fontSize: 13, fontWeight: 700, letterSpacing: '0.06em', textTransform: 'uppercase', color: 'text.secondary' }, children: children }), action] }));
6
+ }
7
+ //# sourceMappingURL=SectionHeading.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SectionHeading.js","sourceRoot":"","sources":["../../../src/components/Page/SectionHeading.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAShD,iGAAiG;AACjG,MAAM,UAAU,cAAc,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAuB;IAC1E,OAAO,CACL,MAAC,GAAG,IAAC,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,cAAc,EAAE,eAAe,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,EAAE,aAC3G,KAAC,UAAU,IACT,EAAE,EAAE,EAAE,EACN,SAAS,EAAC,IAAI,EACd,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,aAAa,EAAE,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,KAAK,EAAE,gBAAgB,EAAE,YAElH,QAAQ,GACE,EACZ,MAAM,IACH,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,14 @@
1
+ export { PageHeader } from './PageHeader';
2
+ export type { PageHeaderProps, PageAction } from './PageHeader';
3
+ export { Panel } from './Panel';
4
+ export type { PanelProps } from './Panel';
5
+ export { ListRow, RowIcon } from './ListRow';
6
+ export type { ListRowProps } from './ListRow';
7
+ export { SectionHeading } from './SectionHeading';
8
+ export type { SectionHeadingProps } from './SectionHeading';
9
+ export { EmptyState } from './EmptyState';
10
+ export type { EmptyStateProps } from './EmptyState';
11
+ export { ResponsiveActions } from './ResponsiveActions';
12
+ export type { ResponsiveAction, ResponsiveActionsProps } from './ResponsiveActions';
13
+ export { TAB_BAR_HEIGHT, useCompactLayout } from './layout';
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Page/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,8 @@
1
+ export { PageHeader } from './PageHeader';
2
+ export { Panel } from './Panel';
3
+ export { ListRow, RowIcon } from './ListRow';
4
+ export { SectionHeading } from './SectionHeading';
5
+ export { EmptyState } from './EmptyState';
6
+ export { ResponsiveActions } from './ResponsiveActions';
7
+ export { TAB_BAR_HEIGHT, useCompactLayout } from './layout';
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Page/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE7C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,10 @@
1
+ /** Height the phone tab bar covers at the foot of the screen, above the safe-area inset. */
2
+ export declare const TAB_BAR_HEIGHT = 72;
3
+ /**
4
+ * Whether the compact (phone) layout is showing: tab bar, app-bar titles,
5
+ * floating actions. The cut is at `md`, where the rail and a readable content
6
+ * column stop fitting side by side. Read synchronously, so a phone never draws
7
+ * a frame of the desktop layout first.
8
+ */
9
+ export declare function useCompactLayout(): boolean;
10
+ //# sourceMappingURL=layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../src/components/Page/layout.ts"],"names":[],"mappings":"AAEA,4FAA4F;AAC5F,eAAO,MAAM,cAAc,KAAK,CAAC;AAEjC;;;;;GAKG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAG1C"}
@@ -0,0 +1,14 @@
1
+ import { useMediaQuery, useTheme } from '@mui/material';
2
+ /** Height the phone tab bar covers at the foot of the screen, above the safe-area inset. */
3
+ export const TAB_BAR_HEIGHT = 72;
4
+ /**
5
+ * Whether the compact (phone) layout is showing: tab bar, app-bar titles,
6
+ * floating actions. The cut is at `md`, where the rail and a readable content
7
+ * column stop fitting side by side. Read synchronously, so a phone never draws
8
+ * a frame of the desktop layout first.
9
+ */
10
+ export function useCompactLayout() {
11
+ const theme = useTheme();
12
+ return useMediaQuery(theme.breakpoints.down('md'), { noSsr: true });
13
+ }
14
+ //# sourceMappingURL=layout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.js","sourceRoot":"","sources":["../../../src/components/Page/layout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAExD,4FAA4F;AAC5F,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,CAAC;AAEjC;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB;IAC9B,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,OAAO,aAAa,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AACtE,CAAC"}
package/dist/index.d.ts CHANGED
@@ -6,6 +6,12 @@ export { ErrorPage } from './components/ErrorPage';
6
6
  export type { ErrorPageProps } from './components/ErrorPage';
7
7
  export { AppLayout } from './components/AppLayout';
8
8
  export type { AppLayoutProps, AppLayoutNavGroup, AppLayoutNavItem, AppLayoutInternalNavItem, AppLayoutExternalNavItem, AppLayoutUser } from './components/AppLayout';
9
+ export { PageHeader, Panel, ListRow, RowIcon, SectionHeading, EmptyState, ResponsiveActions, TAB_BAR_HEIGHT, useCompactLayout } from './components/Page';
10
+ export type { PageHeaderProps, PageAction, PanelProps, ListRowProps, SectionHeadingProps, EmptyStateProps, ResponsiveAction, ResponsiveActionsProps } from './components/Page';
11
+ export { createVisinTheme, visinTheme, VISIN_COLORS, COLOR_SCHEME_ATTRIBUTE, COLOR_MODE_STORAGE_KEY, COLOR_SCHEME_STORAGE_KEY, brand, schemes, ink, surface, pageBackground, glass, glassInteractive, liftOnHover, raisedShadow, mainAction, chrome, onImage, tint, livePalette, chartSeries } from './theme';
12
+ export type { ColorSchemeName } from './theme';
13
+ export { VisinThemeProvider, ColorModeSetting, COLOR_MODE_OPTIONS, useThemeColorMeta, useActivePalette, useChartColors } from './components/ColorMode';
14
+ export type { VisinThemeProviderProps, ColorMode, ColorModeSettingProps, ChartColors } from './components/ColorMode';
9
15
  export { createVisinNavigation } from './navigation';
10
16
  export type { VisinApp, VisinAppUrls, VisinNavigation } from './navigation';
11
17
  export { createProtectedRoute } from './components/ProtectedRoute';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACxD,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAElF,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,YAAY,EACV,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,wBAAwB,EACxB,wBAAwB,EACxB,aAAa,EACd,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrD,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,YAAY,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAC3F,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,YAAY,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM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E,2BAA2B,EAAE,MAAM,+BAA+B,CAAC"}
package/dist/index.js CHANGED
@@ -3,6 +3,9 @@ export { createApiClient, ApiError } from './apiClient';
3
3
  export { Loader } from './components/Loader';
4
4
  export { ErrorPage } from './components/ErrorPage';
5
5
  export { AppLayout } from './components/AppLayout';
6
+ export { PageHeader, Panel, ListRow, RowIcon, SectionHeading, EmptyState, ResponsiveActions, TAB_BAR_HEIGHT, useCompactLayout } from './components/Page';
7
+ export { createVisinTheme, visinTheme, VISIN_COLORS, COLOR_SCHEME_ATTRIBUTE, COLOR_MODE_STORAGE_KEY, COLOR_SCHEME_STORAGE_KEY, brand, schemes, ink, surface, pageBackground, glass, glassInteractive, liftOnHover, raisedShadow, mainAction, chrome, onImage, tint, livePalette, chartSeries } from './theme';
8
+ export { VisinThemeProvider, ColorModeSetting, COLOR_MODE_OPTIONS, useThemeColorMeta, useActivePalette, useChartColors } from './components/ColorMode';
6
9
  export { createVisinNavigation } from './navigation';
7
10
  export { createProtectedRoute } from './components/ProtectedRoute';
8
11
  export { createLoginRedirect } from './components/LoginRedirect';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,mFAAmF;AAEnF,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAGxD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AASnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAEnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAGjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,OAAO,EAAE,iBA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MAAM,+BAA+B,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Series colours for charts: eight hues in a fixed order, stepped separately
3
+ * for each scheme.
4
+ *
5
+ * The order is what keeps neighbouring series apart under colour-vision
6
+ * deficiency, so assign slots in order, never shuffle them, and give an entity
7
+ * the same slot wherever it appears (training is slot 1, validation slot 2).
8
+ * Validated against Visin's paper surfaces (#ffffff, #121826): every adjacent
9
+ * pair clears ΔE 8 under CVD simulation and 15 in normal vision. In light,
10
+ * slots 3–5 sit under 3:1 on white, so a chart using them keeps its legend.
11
+ *
12
+ * Real values rather than CSS variables: the chart library writes them into
13
+ * SVG attributes and blends them itself, and can do neither with `var()`.
14
+ */
15
+ export declare const chartSeries: {
16
+ readonly light: readonly ["#2a78d6", "#eb6834", "#1baf7a", "#eda100", "#e87ba4", "#008300", "#4a3aa7", "#e34948"];
17
+ readonly dark: readonly ["#3987e5", "#d95926", "#199e70", "#c98500", "#d55181", "#008300", "#9085e9", "#e66767"];
18
+ };
19
+ //# sourceMappingURL=chart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chart.d.ts","sourceRoot":"","sources":["../../src/theme/chart.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,WAAW;;;CAGd,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Series colours for charts: eight hues in a fixed order, stepped separately
3
+ * for each scheme.
4
+ *
5
+ * The order is what keeps neighbouring series apart under colour-vision
6
+ * deficiency, so assign slots in order, never shuffle them, and give an entity
7
+ * the same slot wherever it appears (training is slot 1, validation slot 2).
8
+ * Validated against Visin's paper surfaces (#ffffff, #121826): every adjacent
9
+ * pair clears ΔE 8 under CVD simulation and 15 in normal vision. In light,
10
+ * slots 3–5 sit under 3:1 on white, so a chart using them keeps its legend.
11
+ *
12
+ * Real values rather than CSS variables: the chart library writes them into
13
+ * SVG attributes and blends them itself, and can do neither with `var()`.
14
+ */
15
+ export const chartSeries = {
16
+ light: ['#2a78d6', '#eb6834', '#1baf7a', '#eda100', '#e87ba4', '#008300', '#4a3aa7', '#e34948'],
17
+ dark: ['#3987e5', '#d95926', '#199e70', '#c98500', '#d55181', '#008300', '#9085e9', '#e66767']
18
+ };
19
+ //# sourceMappingURL=chart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chart.js","sourceRoot":"","sources":["../../src/theme/chart.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,KAAK,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC;IAC/F,IAAI,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC;CACtF,CAAC"}
@@ -0,0 +1,45 @@
1
+ import { type Theme, type ThemeOptions } from '@mui/material/styles';
2
+ declare module '@mui/material/styles' {
3
+ interface CssThemeVariables {
4
+ enabled: true;
5
+ }
6
+ }
7
+ /** The attribute on <html> that says which scheme is showing: `light` or `dark`. */
8
+ export declare const COLOR_SCHEME_ATTRIBUTE = "data-color-scheme";
9
+ /**
10
+ * Where the person's choice (`system`, `light` or `dark`) is kept. Named rather
11
+ * than MUI's default, so the pre-paint script in each index.html reads the same key.
12
+ */
13
+ export declare const COLOR_MODE_STORAGE_KEY = "visin-mode";
14
+ export declare const COLOR_SCHEME_STORAGE_KEY = "visin-color-scheme";
15
+ /**
16
+ * The colours named outside a React tree: `theme-color` in each index.html,
17
+ * the manifest, the offline page.
18
+ */
19
+ export declare const VISIN_COLORS: {
20
+ /** Primary: buttons, links, the selected state. */
21
+ readonly brand: "#2563eb";
22
+ readonly themeColor: "#f6f7fb";
23
+ readonly themeColorDark: "#0b0f17";
24
+ readonly background: "#f6f7fb";
25
+ };
26
+ /**
27
+ * The one theme every Visin front renders with — shell, vision, label, account
28
+ * and sign-in — so crossing apps inside the shell never changes the typeface,
29
+ * the blue, the scheme or the shape of a button.
30
+ *
31
+ * Colours are CSS variables switched by an attribute on <html>. That is what
32
+ * makes one switch reach every front: the remotes are federated into the
33
+ * shell's page, so they all read the same attribute. It also means
34
+ * `theme.palette` holds the *light* values in both schemes; code that needs a
35
+ * colour in JS reads `theme.vars.palette` (or `useActivePalette` for a real
36
+ * value, e.g. a chart series).
37
+ *
38
+ * `shape.borderRadius` stays MUI's 4px unit on purpose: pages across the apps
39
+ * set radii as theme multiples (`borderRadius: 2`), and a larger unit turned
40
+ * those into pills. Components get their rounder corners here instead.
41
+ */
42
+ export declare function createVisinTheme(overrides?: ThemeOptions): Theme;
43
+ /** Built once at module scope: a theme rebuilt per render remounts every style. */
44
+ export declare const visinTheme: Theme;
45
+ //# sourceMappingURL=createVisinTheme.d.ts.map