@bayonai/mui-design 1.4.0 → 1.5.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 +13 -18
- package/dist/cjs/pricing/PricingTable.js +26 -24
- package/dist/esm/pricing/PricingTable.js +26 -24
- package/dist/types/pricing/PricingTable.d.ts +4 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@bayonai/mui-design` will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## 1.5.0 - 2026-11-19
|
|
6
|
+
|
|
7
|
+
- Add the optional dark comparison appearance for pricing tables.
|
|
8
|
+
- Give plan sections accessible names with an optional host override.
|
|
9
|
+
- Use the published file-uploads package for local upload component development.
|
|
10
|
+
|
|
5
11
|
## 1.4.0 - 2026-11-12
|
|
6
12
|
|
|
7
13
|
- Add reusable metadata value-row/group spacing, neutral template badge, and explicit venue-search presentation.
|
package/README.md
CHANGED
|
@@ -121,7 +121,7 @@ context are retained. The private file swipe adapter delegates `/swipe` with
|
|
|
121
121
|
identical delete colors, spacing, gesture thresholds, easing and reduced-motion
|
|
122
122
|
behavior. Lightbox and scroll utilities keep their existing owners.
|
|
123
123
|
|
|
124
|
-
Uploads consumers
|
|
124
|
+
Uploads consumers can install exact `@bayonai/file-uploads@0.2.1` (an optional peer for
|
|
125
125
|
applications using other MUI entries). Neutral contracts belong to
|
|
126
126
|
`@bayonai/file-uploads`; React-only locking belongs to
|
|
127
127
|
`@bayonai/file-uploads/hooks`. No `file-uploads/mui` entry is introduced.
|
|
@@ -138,41 +138,34 @@ import type { UploadFile, LoadFile } from "@bayonai/file-uploads";
|
|
|
138
138
|
import { useUploadLock } from "@bayonai/file-uploads/hooks";
|
|
139
139
|
```
|
|
140
140
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
The local development dependency uses `vendor/bayonai-file-uploads-0.2.0-neutral.tgz`.
|
|
147
|
-
Release gates include packed ESM/CommonJS/types imports, copied upload lifecycle,
|
|
148
|
-
security, loading, cancellation and download tests, shared swipe regressions,
|
|
149
|
-
host-theme overrides and affected consumer verification. No publication or
|
|
150
|
-
deployment is authorized by this relocation.
|
|
141
|
+
Consumers migrating from `@bayonai/ui/uploads` can use the mapping above.
|
|
142
|
+
Keep host providers, callbacks and props unchanged. The local development
|
|
143
|
+
dependency uses the published `@bayonai/file-uploads@0.2.1` package. Release
|
|
144
|
+
checks cover packed imports and declarations, upload lifecycle, downloads,
|
|
145
|
+
swipe behavior, host theme overrides, and affected consumers.
|
|
151
146
|
|
|
152
147
|
Behavior regression snapshots are in `tests/`, outside the declaration/build
|
|
153
148
|
source tree. They retain the source package's Vitest and React test renderer
|
|
154
149
|
contracts; release verification must supply those test dependencies and run the
|
|
155
150
|
preserved suite as well as build, typecheck, packed ESM/CommonJS import checks,
|
|
156
151
|
and affected consumer checks in the designated fresh verification context.
|
|
157
|
-
Version `1.1.0` is a local release candidate; this work does not publish it.
|
|
158
152
|
|
|
159
153
|
The [upload ownership contract](docs/uploads-contract.md) records preserved flow,
|
|
160
154
|
swipe equivalence and linked behavioral coverage.
|
|
161
155
|
|
|
162
156
|
### Package behavior tests
|
|
163
157
|
|
|
164
|
-
Run `npm test --workspace @bayonai/mui-design` from the owner repository. The package Vitest configuration runs the preserved generic and upload suites against source with one React runtime, including host theme-provider overrides.
|
|
158
|
+
Run `npm test --workspace @bayonai/mui-design` from the owner repository. The package Vitest configuration runs the preserved generic and upload suites against source with one React runtime, including host theme-provider overrides.
|
|
165
159
|
|
|
166
160
|
### Camera and crop dialogs (TL-M251)
|
|
167
161
|
|
|
168
162
|
`CameraCaptureDialog`, `ImageCropDialog`, `CameraCaptureDialogProps`,
|
|
169
163
|
`ImageCropDialogProps`, `CameraCaptureLabels`, and `ImageCropLabels` now belong to
|
|
170
164
|
`@bayonai/mui-design/uploads`. Replace imports from
|
|
171
|
-
`@bayonai/file-uploads/react` with this entry
|
|
172
|
-
Keep existing props, callbacks and host MUI providers unchanged.
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
remains at `@bayonai/file-uploads/hooks`.
|
|
165
|
+
`@bayonai/file-uploads/react` with this entry.
|
|
166
|
+
Keep existing props, callbacks and host MUI providers unchanged. File-uploads 0.2.0 removed the old `/react` presentation entry. Import crop
|
|
167
|
+
geometry and `ImageCrop` from `@bayonai/file-uploads` and upload locking from
|
|
168
|
+
`@bayonai/file-uploads/hooks`.
|
|
176
169
|
|
|
177
170
|
```tsx
|
|
178
171
|
import { CameraCaptureDialog, ImageCropDialog } from "@bayonai/mui-design/uploads";
|
|
@@ -253,3 +246,5 @@ remains visible.
|
|
|
253
246
|
|
|
254
247
|
`TemplateBadge` is the compact neutral marker for host-identified template
|
|
255
248
|
types. Hosts decide which types have a template and may supply a localized label.
|
|
249
|
+
|
|
250
|
+
`PricingTable` also supports the opt-in `appearance="darkComparison"` variant. Plan sections use the text label or ID as their accessible name; `accessibleLabel` can override it. Callers retain responsibility for plan terms, status and actions; the default appearance remains unchanged.
|
|
@@ -10,49 +10,51 @@ const CheckRounded_1 = __importDefault(require("@mui/icons-material/CheckRounded
|
|
|
10
10
|
const material_1 = require("@mui/material");
|
|
11
11
|
// Product decision: callers own plan content and actions; this component only
|
|
12
12
|
// presents the supplied plans and never determines prices or availability.
|
|
13
|
-
function PricingTable({ label, plans, className, interactiveClassName, colors, }) {
|
|
13
|
+
function PricingTable({ label, plans, className, interactiveClassName, colors, appearance = "default", }) {
|
|
14
|
+
const dark = appearance === "darkComparison";
|
|
14
15
|
return ((0, jsx_runtime_1.jsx)(material_1.Box, { "aria-label": label, className: className, sx: {
|
|
15
16
|
display: "grid",
|
|
16
|
-
gap: 1.5,
|
|
17
|
+
gap: dark ? 2.5 : 1.5,
|
|
17
18
|
gridTemplateColumns: {
|
|
18
19
|
xs: "1fr",
|
|
19
20
|
md: `repeat(${plans.length}, minmax(0, 1fr))`,
|
|
20
21
|
},
|
|
21
22
|
}, children: plans.map((plan) => {
|
|
23
|
+
var _a;
|
|
22
24
|
const highlighted = Boolean(plan.highlighted);
|
|
23
|
-
const secondary = highlighted ? "rgba(255,255,255,0.86)" : colors.muted;
|
|
24
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Stack, { className: interactiveClassName, spacing: 2.25, sx: {
|
|
25
|
-
bgcolor: highlighted ? colors.accent : "#FFFFFF",
|
|
26
|
-
boxShadow: highlighted
|
|
25
|
+
const secondary = dark ? "#c9c3dc" : highlighted ? "rgba(255,255,255,0.86)" : colors.muted;
|
|
26
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Stack, { className: interactiveClassName, component: dark ? "section" : "div", "aria-label": dark ? ((_a = plan.accessibleLabel) !== null && _a !== void 0 ? _a : (typeof plan.label === "string" ? plan.label : plan.id)) : undefined, spacing: dark ? 2 : 2.25, sx: {
|
|
27
|
+
bgcolor: dark ? (highlighted ? "#27204d" : "#151327") : highlighted ? colors.accent : "#FFFFFF",
|
|
28
|
+
boxShadow: dark ? "none" : highlighted
|
|
27
29
|
? "0 8px 18px rgba(23, 106, 168, 0.22)"
|
|
28
30
|
: "none",
|
|
29
|
-
color: highlighted ? "#
|
|
30
|
-
minHeight: { md: 430 },
|
|
31
|
-
p: { xs: 2.5, sm: 3 },
|
|
31
|
+
color: dark || highlighted ? "#f5efff" : colors.text,
|
|
32
|
+
minHeight: { md: dark ? 520 : 430 },
|
|
33
|
+
p: dark ? { xs: 2.5, md: 4 } : { xs: 2.5, sm: 3 },
|
|
32
34
|
position: "relative",
|
|
33
|
-
borderRadius: 2,
|
|
34
|
-
...(highlighted
|
|
35
|
+
borderRadius: dark ? 2.5 : 2,
|
|
36
|
+
...(dark ? { border: highlighted ? "1px solid #b56ef3" : "1px solid #49405e" } : highlighted
|
|
35
37
|
? {}
|
|
36
38
|
: { border: "1px solid rgba(23, 38, 56, 0.12)" }),
|
|
37
|
-
"&:hover": {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}, children: [(0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", spacing: 1, sx: { justifyContent: "space-between" }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { sx: { fontSize: 21, fontWeight: 780 }, children: plan.label }), plan.badge] }), (0, jsx_runtime_1.jsx)(material_1.Typography, { sx: {
|
|
39
|
+
...(!dark && { "&:hover": {
|
|
40
|
+
...(highlighted
|
|
41
|
+
? { boxShadow: "0 10px 22px rgba(23, 106, 168, 0.28)" }
|
|
42
|
+
: { bgcolor: "#FCFEFF" }),
|
|
43
|
+
transform: "translateY(-2px)",
|
|
44
|
+
} }),
|
|
45
|
+
}, children: [(0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", spacing: 1, sx: { justifyContent: "space-between" }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { component: dark ? "h2" : "p", sx: { fontSize: dark ? { xs: 26, md: 34 } : 21, fontWeight: 780 }, children: plan.label }), plan.badge] }), (0, jsx_runtime_1.jsx)(material_1.Typography, { sx: {
|
|
44
46
|
color: secondary,
|
|
45
|
-
fontSize: 14,
|
|
47
|
+
fontSize: dark ? { xs: 15, md: 17 } : 14,
|
|
46
48
|
lineHeight: 1.5,
|
|
47
49
|
minHeight: { md: 42 },
|
|
48
|
-
}, children: plan.description }), (0, jsx_runtime_1.jsxs)(material_1.Stack, { spacing: 0.25, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { sx: {
|
|
49
|
-
fontSize: { xs: 25, sm: 28 },
|
|
50
|
+
}, children: plan.description }), (0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: dark ? "row" : "column", spacing: dark ? 1 : 0.25, sx: dark ? { alignItems: "baseline", flexWrap: "wrap" } : undefined, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { sx: {
|
|
51
|
+
fontSize: dark ? { xs: 36, md: 56 } : { xs: 25, sm: 28 },
|
|
50
52
|
fontWeight: 780,
|
|
51
53
|
letterSpacing: "-0.03em",
|
|
52
|
-
}, children: plan.price }), (0, jsx_runtime_1.jsx)(material_1.Typography, { sx: { color: secondary, fontSize: 13 }, children: plan.priceNote })] }), (0, jsx_runtime_1.jsx)(material_1.Stack, { component: "ul", spacing: 1.1, sx: { listStyle: "none", m: 0, p: 0 }, children: plan.features.map((feature, index) => ((0, jsx_runtime_1.jsxs)(material_1.Stack, { component: "li", direction: "row", spacing: 1, children: [(0, jsx_runtime_1.jsx)(CheckRounded_1.default, { sx: {
|
|
53
|
-
color: highlighted ? "#FFFFFF" : colors.accentDark,
|
|
54
|
+
}, children: plan.price }), (0, jsx_runtime_1.jsx)(material_1.Typography, { sx: { color: secondary, fontSize: dark ? { xs: 15, md: 18 } : 13 }, children: plan.priceNote })] }), dark && (0, jsx_runtime_1.jsx)(material_1.Box, { "aria-hidden": "true", sx: { borderTop: "1px solid #514761" } }), (0, jsx_runtime_1.jsx)(material_1.Stack, { component: "ul", spacing: 1.1, sx: { listStyle: "none", m: 0, p: 0 }, children: plan.features.map((feature, index) => ((0, jsx_runtime_1.jsxs)(material_1.Stack, { component: "li", direction: "row", spacing: 1, children: [(0, jsx_runtime_1.jsx)(CheckRounded_1.default, { "aria-hidden": "true", sx: {
|
|
55
|
+
color: dark ? "#d5b3f9" : highlighted ? "#FFFFFF" : colors.accentDark,
|
|
54
56
|
fontSize: 18,
|
|
55
57
|
mt: "2px",
|
|
56
|
-
} }), (0, jsx_runtime_1.jsx)(material_1.Typography, { sx: { fontSize: 14, lineHeight: 1.45 }, children: feature })] }, index))) }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { flex: 1 } }), plan.action] }, plan.id));
|
|
58
|
+
} }), (0, jsx_runtime_1.jsx)(material_1.Typography, { sx: { fontSize: dark ? { xs: 15, md: 18 } : 14, lineHeight: 1.45 }, children: feature })] }, index))) }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { flex: 1 } }), plan.action] }, plan.id));
|
|
57
59
|
}) }));
|
|
58
60
|
}
|
|
@@ -4,49 +4,51 @@ import CheckRoundedIcon from "@mui/icons-material/CheckRounded";
|
|
|
4
4
|
import { Box, Stack, Typography } from "@mui/material";
|
|
5
5
|
// Product decision: callers own plan content and actions; this component only
|
|
6
6
|
// presents the supplied plans and never determines prices or availability.
|
|
7
|
-
export function PricingTable({ label, plans, className, interactiveClassName, colors, }) {
|
|
7
|
+
export function PricingTable({ label, plans, className, interactiveClassName, colors, appearance = "default", }) {
|
|
8
|
+
const dark = appearance === "darkComparison";
|
|
8
9
|
return (_jsx(Box, { "aria-label": label, className: className, sx: {
|
|
9
10
|
display: "grid",
|
|
10
|
-
gap: 1.5,
|
|
11
|
+
gap: dark ? 2.5 : 1.5,
|
|
11
12
|
gridTemplateColumns: {
|
|
12
13
|
xs: "1fr",
|
|
13
14
|
md: `repeat(${plans.length}, minmax(0, 1fr))`,
|
|
14
15
|
},
|
|
15
16
|
}, children: plans.map((plan) => {
|
|
17
|
+
var _a;
|
|
16
18
|
const highlighted = Boolean(plan.highlighted);
|
|
17
|
-
const secondary = highlighted ? "rgba(255,255,255,0.86)" : colors.muted;
|
|
18
|
-
return (_jsxs(Stack, { className: interactiveClassName, spacing: 2.25, sx: {
|
|
19
|
-
bgcolor: highlighted ? colors.accent : "#FFFFFF",
|
|
20
|
-
boxShadow: highlighted
|
|
19
|
+
const secondary = dark ? "#c9c3dc" : highlighted ? "rgba(255,255,255,0.86)" : colors.muted;
|
|
20
|
+
return (_jsxs(Stack, { className: interactiveClassName, component: dark ? "section" : "div", "aria-label": dark ? ((_a = plan.accessibleLabel) !== null && _a !== void 0 ? _a : (typeof plan.label === "string" ? plan.label : plan.id)) : undefined, spacing: dark ? 2 : 2.25, sx: {
|
|
21
|
+
bgcolor: dark ? (highlighted ? "#27204d" : "#151327") : highlighted ? colors.accent : "#FFFFFF",
|
|
22
|
+
boxShadow: dark ? "none" : highlighted
|
|
21
23
|
? "0 8px 18px rgba(23, 106, 168, 0.22)"
|
|
22
24
|
: "none",
|
|
23
|
-
color: highlighted ? "#
|
|
24
|
-
minHeight: { md: 430 },
|
|
25
|
-
p: { xs: 2.5, sm: 3 },
|
|
25
|
+
color: dark || highlighted ? "#f5efff" : colors.text,
|
|
26
|
+
minHeight: { md: dark ? 520 : 430 },
|
|
27
|
+
p: dark ? { xs: 2.5, md: 4 } : { xs: 2.5, sm: 3 },
|
|
26
28
|
position: "relative",
|
|
27
|
-
borderRadius: 2,
|
|
28
|
-
...(highlighted
|
|
29
|
+
borderRadius: dark ? 2.5 : 2,
|
|
30
|
+
...(dark ? { border: highlighted ? "1px solid #b56ef3" : "1px solid #49405e" } : highlighted
|
|
29
31
|
? {}
|
|
30
32
|
: { border: "1px solid rgba(23, 38, 56, 0.12)" }),
|
|
31
|
-
"&:hover": {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}, children: [_jsxs(Stack, { direction: "row", spacing: 1, sx: { justifyContent: "space-between" }, children: [_jsx(Typography, { sx: { fontSize: 21, fontWeight: 780 }, children: plan.label }), plan.badge] }), _jsx(Typography, { sx: {
|
|
33
|
+
...(!dark && { "&:hover": {
|
|
34
|
+
...(highlighted
|
|
35
|
+
? { boxShadow: "0 10px 22px rgba(23, 106, 168, 0.28)" }
|
|
36
|
+
: { bgcolor: "#FCFEFF" }),
|
|
37
|
+
transform: "translateY(-2px)",
|
|
38
|
+
} }),
|
|
39
|
+
}, children: [_jsxs(Stack, { direction: "row", spacing: 1, sx: { justifyContent: "space-between" }, children: [_jsx(Typography, { component: dark ? "h2" : "p", sx: { fontSize: dark ? { xs: 26, md: 34 } : 21, fontWeight: 780 }, children: plan.label }), plan.badge] }), _jsx(Typography, { sx: {
|
|
38
40
|
color: secondary,
|
|
39
|
-
fontSize: 14,
|
|
41
|
+
fontSize: dark ? { xs: 15, md: 17 } : 14,
|
|
40
42
|
lineHeight: 1.5,
|
|
41
43
|
minHeight: { md: 42 },
|
|
42
|
-
}, children: plan.description }), _jsxs(Stack, { spacing: 0.25, children: [_jsx(Typography, { sx: {
|
|
43
|
-
fontSize: { xs: 25, sm: 28 },
|
|
44
|
+
}, children: plan.description }), _jsxs(Stack, { direction: dark ? "row" : "column", spacing: dark ? 1 : 0.25, sx: dark ? { alignItems: "baseline", flexWrap: "wrap" } : undefined, children: [_jsx(Typography, { sx: {
|
|
45
|
+
fontSize: dark ? { xs: 36, md: 56 } : { xs: 25, sm: 28 },
|
|
44
46
|
fontWeight: 780,
|
|
45
47
|
letterSpacing: "-0.03em",
|
|
46
|
-
}, children: plan.price }), _jsx(Typography, { sx: { color: secondary, fontSize: 13 }, children: plan.priceNote })] }), _jsx(Stack, { component: "ul", spacing: 1.1, sx: { listStyle: "none", m: 0, p: 0 }, children: plan.features.map((feature, index) => (_jsxs(Stack, { component: "li", direction: "row", spacing: 1, children: [_jsx(CheckRoundedIcon, { sx: {
|
|
47
|
-
color: highlighted ? "#FFFFFF" : colors.accentDark,
|
|
48
|
+
}, children: plan.price }), _jsx(Typography, { sx: { color: secondary, fontSize: dark ? { xs: 15, md: 18 } : 13 }, children: plan.priceNote })] }), dark && _jsx(Box, { "aria-hidden": "true", sx: { borderTop: "1px solid #514761" } }), _jsx(Stack, { component: "ul", spacing: 1.1, sx: { listStyle: "none", m: 0, p: 0 }, children: plan.features.map((feature, index) => (_jsxs(Stack, { component: "li", direction: "row", spacing: 1, children: [_jsx(CheckRoundedIcon, { "aria-hidden": "true", sx: {
|
|
49
|
+
color: dark ? "#d5b3f9" : highlighted ? "#FFFFFF" : colors.accentDark,
|
|
48
50
|
fontSize: 18,
|
|
49
51
|
mt: "2px",
|
|
50
|
-
} }), _jsx(Typography, { sx: { fontSize: 14, lineHeight: 1.45 }, children: feature })] }, index))) }), _jsx(Box, { sx: { flex: 1 } }), plan.action] }, plan.id));
|
|
52
|
+
} }), _jsx(Typography, { sx: { fontSize: dark ? { xs: 15, md: 18 } : 14, lineHeight: 1.45 }, children: feature })] }, index))) }), _jsx(Box, { sx: { flex: 1 } }), plan.action] }, plan.id));
|
|
51
53
|
}) }));
|
|
52
54
|
}
|
|
@@ -9,10 +9,13 @@ export type PricingTablePlan = {
|
|
|
9
9
|
badge?: ReactNode;
|
|
10
10
|
action?: ReactNode;
|
|
11
11
|
highlighted?: boolean;
|
|
12
|
+
/** Overrides the section name; defaults to the text label or plan ID. */
|
|
13
|
+
accessibleLabel?: string;
|
|
12
14
|
};
|
|
13
15
|
export type PricingTableProps = {
|
|
14
16
|
label: string;
|
|
15
17
|
plans: readonly PricingTablePlan[];
|
|
18
|
+
appearance?: "default" | "darkComparison";
|
|
16
19
|
className?: string;
|
|
17
20
|
interactiveClassName?: string;
|
|
18
21
|
colors: {
|
|
@@ -22,4 +25,4 @@ export type PricingTableProps = {
|
|
|
22
25
|
muted: string;
|
|
23
26
|
};
|
|
24
27
|
};
|
|
25
|
-
export declare function PricingTable({ label, plans, className, interactiveClassName, colors, }: PricingTableProps): import("react").JSX.Element;
|
|
28
|
+
export declare function PricingTable({ label, plans, className, interactiveClassName, colors, appearance, }: PricingTableProps): import("react").JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bayonai/mui-design",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "Shared Bayon AI Material UI theme, style recipes, and reusable design components.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
},
|
|
103
103
|
"devDependencies": {
|
|
104
104
|
"typescript": "^5",
|
|
105
|
-
"@bayonai/file-uploads": "
|
|
105
|
+
"@bayonai/file-uploads": "0.2.1",
|
|
106
106
|
"react": "19.3.1",
|
|
107
107
|
"react-dom": "19.3.1",
|
|
108
108
|
"react-test-renderer": "19.3.1",
|