@mindbill/react 0.10.0 → 0.12.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/README.md +21 -3
- package/dist/index.d.ts +71 -4
- package/dist/index.js +121 -27
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,11 +16,29 @@ import { ConnectedBillLifecycle } from "@mindbill/react";
|
|
|
16
16
|
<ConnectedBillLifecycle
|
|
17
17
|
billId={billId}
|
|
18
18
|
sessionEndpoint="/api/mindbill/billing-session"
|
|
19
|
-
appearance={{
|
|
19
|
+
appearance={{ preset: "qme-companion" }}
|
|
20
20
|
onChanged={(lifecycle) => syncBillStatus(lifecycle.bill)}
|
|
21
21
|
/>
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
+
## Appearance
|
|
25
|
+
|
|
26
|
+
Choose a complete preset, then override only the tokens your design system owns. The preset applies to review, payer search, attachments, submission, status, EOR, payment, denial, resubmission, and close states.
|
|
27
|
+
|
|
28
|
+
```tsx
|
|
29
|
+
<ConnectedBillLifecycle
|
|
30
|
+
billId={billId}
|
|
31
|
+
appearance={{
|
|
32
|
+
preset: "orange-bright",
|
|
33
|
+
accentColor: "#ff4f0a",
|
|
34
|
+
fontFamily: "Inter, sans-serif",
|
|
35
|
+
borderRadius: "8px",
|
|
36
|
+
}}
|
|
37
|
+
/>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Available presets are `mindbill`, `qme-companion`, and `orange-bright`. Preset names describe visual styles rather than customer or partner brands. Supported overrides include accent, accent text, background, surface, input background, text, muted text, border, font, panel radius, control radius, shadow, danger, success, and warning colors.
|
|
41
|
+
|
|
24
42
|
Add one authenticated route to your app. It verifies that the signed-in user may access the bill, then mints an exact-origin, bill-scoped token. The Partner API key stays on the server.
|
|
25
43
|
|
|
26
44
|
```ts
|
|
@@ -60,7 +78,7 @@ import { ConnectedBillStatus } from "@mindbill/react";
|
|
|
60
78
|
<ConnectedBillStatus
|
|
61
79
|
billId={billId}
|
|
62
80
|
sessionEndpoint="/api/mindbill/status-session"
|
|
63
|
-
appearance={{
|
|
81
|
+
appearance={{ preset: "qme-companion" }}
|
|
64
82
|
/>
|
|
65
83
|
```
|
|
66
84
|
|
|
@@ -75,7 +93,7 @@ import { BillReviewForm } from "@mindbill/react";
|
|
|
75
93
|
|
|
76
94
|
<BillReviewForm
|
|
77
95
|
data={billReview}
|
|
78
|
-
appearance={{
|
|
96
|
+
appearance={{ preset: "qme-companion" }}
|
|
79
97
|
onSave={(input) => api.patch("/billing/review", input)}
|
|
80
98
|
onSubmit={(input, route) => api.post("/billing/submit", { input, route })}
|
|
81
99
|
onAddAttachment={(file, documentType, description) =>
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,73 @@ import { MindBillAppearance, MindBillEventDetail, MindBillErrorDetail } from '@m
|
|
|
2
2
|
export { MindBillAppearance, MindBillErrorDetail, MindBillEventDetail } from '@mindbill/embed';
|
|
3
3
|
import { CSSProperties, ReactElement, ReactNode } from 'react';
|
|
4
4
|
|
|
5
|
+
type MindBillThemePreset = "mindbill" | "qme-companion" | "orange-bright";
|
|
6
|
+
type MindBillReactAppearance = MindBillAppearance & {
|
|
7
|
+
/** A complete starting point. Individual tokens below always win. */
|
|
8
|
+
preset?: MindBillThemePreset;
|
|
9
|
+
accentTextColor?: string;
|
|
10
|
+
inputBackgroundColor?: string;
|
|
11
|
+
controlRadius?: string;
|
|
12
|
+
shadow?: string;
|
|
13
|
+
dangerColor?: string;
|
|
14
|
+
successColor?: string;
|
|
15
|
+
warningColor?: string;
|
|
16
|
+
};
|
|
17
|
+
declare const mindBillThemePresets: {
|
|
18
|
+
readonly mindbill: {
|
|
19
|
+
readonly accentColor: "#238dbd";
|
|
20
|
+
readonly accentTextColor: "#ffffff";
|
|
21
|
+
readonly backgroundColor: "#f3f8fa";
|
|
22
|
+
readonly surfaceColor: "#ffffff";
|
|
23
|
+
readonly inputBackgroundColor: "#ffffff";
|
|
24
|
+
readonly textColor: "#203743";
|
|
25
|
+
readonly mutedColor: "#657982";
|
|
26
|
+
readonly borderColor: "#dbe6ea";
|
|
27
|
+
readonly borderRadius: "14px";
|
|
28
|
+
readonly controlRadius: "8px";
|
|
29
|
+
readonly shadow: "0 8px 24px rgba(28,58,72,.04)";
|
|
30
|
+
readonly dangerColor: "#b63d35";
|
|
31
|
+
readonly successColor: "#217449";
|
|
32
|
+
readonly warningColor: "#8a5c17";
|
|
33
|
+
};
|
|
34
|
+
readonly "qme-companion": {
|
|
35
|
+
readonly accentColor: "#53b5dc";
|
|
36
|
+
readonly accentTextColor: "#173542";
|
|
37
|
+
readonly backgroundColor: "#f2f8fb";
|
|
38
|
+
readonly surfaceColor: "#ffffff";
|
|
39
|
+
readonly inputBackgroundColor: "#ffffff";
|
|
40
|
+
readonly textColor: "#1d3440";
|
|
41
|
+
readonly mutedColor: "#617783";
|
|
42
|
+
readonly borderColor: "#d7e5eb";
|
|
43
|
+
readonly borderRadius: "12px";
|
|
44
|
+
readonly controlRadius: "8px";
|
|
45
|
+
readonly shadow: "0 1px 2px rgba(29,52,64,.05)";
|
|
46
|
+
readonly dangerColor: "#b83f3a";
|
|
47
|
+
readonly successColor: "#21835d";
|
|
48
|
+
readonly warningColor: "#9a6418";
|
|
49
|
+
readonly fontFamily: "Inter, ui-sans-serif, system-ui, sans-serif";
|
|
50
|
+
};
|
|
51
|
+
readonly "orange-bright": {
|
|
52
|
+
readonly accentColor: "#ff4f0a";
|
|
53
|
+
readonly accentTextColor: "#ffffff";
|
|
54
|
+
readonly backgroundColor: "#fffaf6";
|
|
55
|
+
readonly surfaceColor: "#ffffff";
|
|
56
|
+
readonly inputBackgroundColor: "#ffffff";
|
|
57
|
+
readonly textColor: "#111827";
|
|
58
|
+
readonly mutedColor: "#626a73";
|
|
59
|
+
readonly borderColor: "#e5e1dc";
|
|
60
|
+
readonly borderRadius: "8px";
|
|
61
|
+
readonly controlRadius: "6px";
|
|
62
|
+
readonly shadow: "0 4px 18px rgba(17,24,39,.06)";
|
|
63
|
+
readonly dangerColor: "#b42318";
|
|
64
|
+
readonly successColor: "#16794f";
|
|
65
|
+
readonly warningColor: "#9a5b13";
|
|
66
|
+
readonly fontFamily: "Inter, ui-sans-serif, system-ui, sans-serif";
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
declare function resolveMindBillAppearance(appearance: MindBillReactAppearance | undefined): MindBillReactAppearance;
|
|
70
|
+
declare function mindBillAppearanceStyle(appearance: MindBillReactAppearance | undefined, style?: CSSProperties): CSSProperties;
|
|
71
|
+
|
|
5
72
|
type BillReviewDocumentType = "final_report" | "letter_of_attestation" | "proof_of_service" | "form_122" | "return_to_work_voucher" | "w9" | "medical_records" | "appeal" | "other";
|
|
6
73
|
type BillReviewBillingProvider = {
|
|
7
74
|
name: string;
|
|
@@ -162,7 +229,7 @@ type BillReviewFormProps = {
|
|
|
162
229
|
onSearchClaimsAdministrators?: (query: string, claimNumber?: string) => Promise<BillReviewPayer[]>;
|
|
163
230
|
className?: string;
|
|
164
231
|
style?: CSSProperties;
|
|
165
|
-
appearance?:
|
|
232
|
+
appearance?: MindBillReactAppearance;
|
|
166
233
|
features?: BillReviewFeatures;
|
|
167
234
|
disabled?: boolean;
|
|
168
235
|
};
|
|
@@ -200,7 +267,7 @@ type BillStatusSummaryProps = {
|
|
|
200
267
|
actions?: BillStatusAction[];
|
|
201
268
|
className?: string;
|
|
202
269
|
style?: CSSProperties;
|
|
203
|
-
appearance?:
|
|
270
|
+
appearance?: MindBillReactAppearance;
|
|
204
271
|
};
|
|
205
272
|
type BillStatusAction = {
|
|
206
273
|
id: string;
|
|
@@ -389,7 +456,7 @@ type UseBillLifecycleResult = {
|
|
|
389
456
|
declare function createBillLifecycleClient({ billId, sessionEndpoint, getSession, apiBaseUrl, fetch: fetchOverride, }: BillLifecycleClientOptions): BillLifecycleClient;
|
|
390
457
|
declare function useBillLifecycle({ billId: providedBillId, sessionEndpoint, getSession, apiBaseUrl, refreshInterval, enabled, initialData, onBillIdChange, fetch: fetchOverride, }: UseBillLifecycleOptions): UseBillLifecycleResult;
|
|
391
458
|
type ConnectedBillLifecycleProps = UseBillLifecycleOptions & {
|
|
392
|
-
appearance?:
|
|
459
|
+
appearance?: MindBillReactAppearance;
|
|
393
460
|
features?: BillReviewFeatures;
|
|
394
461
|
className?: string;
|
|
395
462
|
style?: CSSProperties;
|
|
@@ -411,4 +478,4 @@ type MindBillWidgetProps = {
|
|
|
411
478
|
declare function MindBillBillTimeline(props: MindBillWidgetProps): ReactElement;
|
|
412
479
|
declare function MindBillBillReview(props: MindBillWidgetProps): ReactElement;
|
|
413
480
|
|
|
414
|
-
export { type BillEorDocument, type BillLifecycleAction, type BillLifecycleActionId, type BillLifecycleClient, type BillLifecycleClientOptions, type BillLifecycleData, type BillLifecycleSession, type BillLifecycleSessionProvider, type BillLifecycleSessionRequest, type BillReviewAttachment, type BillReviewBillingProvider, type BillReviewClinician, type BillReviewData, type BillReviewDocumentType, type BillReviewDraft, type BillReviewFeatures, BillReviewForm, type BillReviewFormProps, type BillReviewLineItem, type BillReviewLocation, type BillReviewPayer, type BillReviewSaveInput, type BillStatusAction, type BillStatusClient, type BillStatusClientOptions, type BillStatusData, type BillStatusSession, type BillStatusSessionProvider, type BillStatusSessionRequest, BillStatusSummary, type BillStatusSummaryProps, type BillSubmissionRoute, type CloseBillInput, ConnectedBillLifecycle, type ConnectedBillLifecycleProps, ConnectedBillStatus, type ConnectedBillStatusProps, MindBillBillReview, MindBillBillTimeline, type MindBillWidgetProps, type PostBillPaymentInput, type SubmitSecondReviewInput, type UseBillLifecycleOptions, type UseBillLifecycleResult, type UseBillStatusOptions, type UseBillStatusResult, buildBillReviewSaveInput, createBillLifecycleClient, createBillStatusClient, useBillLifecycle, useBillStatus };
|
|
481
|
+
export { type BillEorDocument, type BillLifecycleAction, type BillLifecycleActionId, type BillLifecycleClient, type BillLifecycleClientOptions, type BillLifecycleData, type BillLifecycleSession, type BillLifecycleSessionProvider, type BillLifecycleSessionRequest, type BillReviewAttachment, type BillReviewBillingProvider, type BillReviewClinician, type BillReviewData, type BillReviewDocumentType, type BillReviewDraft, type BillReviewFeatures, BillReviewForm, type BillReviewFormProps, type BillReviewLineItem, type BillReviewLocation, type BillReviewPayer, type BillReviewSaveInput, type BillStatusAction, type BillStatusClient, type BillStatusClientOptions, type BillStatusData, type BillStatusSession, type BillStatusSessionProvider, type BillStatusSessionRequest, BillStatusSummary, type BillStatusSummaryProps, type BillSubmissionRoute, type CloseBillInput, ConnectedBillLifecycle, type ConnectedBillLifecycleProps, ConnectedBillStatus, type ConnectedBillStatusProps, MindBillBillReview, MindBillBillTimeline, type MindBillReactAppearance, type MindBillThemePreset, type MindBillWidgetProps, type PostBillPaymentInput, type SubmitSecondReviewInput, type UseBillLifecycleOptions, type UseBillLifecycleResult, type UseBillStatusOptions, type UseBillStatusResult, buildBillReviewSaveInput, createBillLifecycleClient, createBillStatusClient, mindBillAppearanceStyle, mindBillThemePresets, resolveMindBillAppearance, useBillLifecycle, useBillStatus };
|
package/dist/index.js
CHANGED
|
@@ -4,6 +4,85 @@
|
|
|
4
4
|
import "@mindbill/embed";
|
|
5
5
|
import { createElement, useEffect as useEffect4, useRef as useRef4 } from "react";
|
|
6
6
|
|
|
7
|
+
// src/appearance.ts
|
|
8
|
+
var mindBillThemePresets = {
|
|
9
|
+
mindbill: {
|
|
10
|
+
accentColor: "#238dbd",
|
|
11
|
+
accentTextColor: "#ffffff",
|
|
12
|
+
backgroundColor: "#f3f8fa",
|
|
13
|
+
surfaceColor: "#ffffff",
|
|
14
|
+
inputBackgroundColor: "#ffffff",
|
|
15
|
+
textColor: "#203743",
|
|
16
|
+
mutedColor: "#657982",
|
|
17
|
+
borderColor: "#dbe6ea",
|
|
18
|
+
borderRadius: "14px",
|
|
19
|
+
controlRadius: "8px",
|
|
20
|
+
shadow: "0 8px 24px rgba(28,58,72,.04)",
|
|
21
|
+
dangerColor: "#b63d35",
|
|
22
|
+
successColor: "#217449",
|
|
23
|
+
warningColor: "#8a5c17"
|
|
24
|
+
},
|
|
25
|
+
"qme-companion": {
|
|
26
|
+
accentColor: "#53b5dc",
|
|
27
|
+
accentTextColor: "#173542",
|
|
28
|
+
backgroundColor: "#f2f8fb",
|
|
29
|
+
surfaceColor: "#ffffff",
|
|
30
|
+
inputBackgroundColor: "#ffffff",
|
|
31
|
+
textColor: "#1d3440",
|
|
32
|
+
mutedColor: "#617783",
|
|
33
|
+
borderColor: "#d7e5eb",
|
|
34
|
+
borderRadius: "12px",
|
|
35
|
+
controlRadius: "8px",
|
|
36
|
+
shadow: "0 1px 2px rgba(29,52,64,.05)",
|
|
37
|
+
dangerColor: "#b83f3a",
|
|
38
|
+
successColor: "#21835d",
|
|
39
|
+
warningColor: "#9a6418",
|
|
40
|
+
fontFamily: "Inter, ui-sans-serif, system-ui, sans-serif"
|
|
41
|
+
},
|
|
42
|
+
"orange-bright": {
|
|
43
|
+
accentColor: "#ff4f0a",
|
|
44
|
+
accentTextColor: "#ffffff",
|
|
45
|
+
backgroundColor: "#fffaf6",
|
|
46
|
+
surfaceColor: "#ffffff",
|
|
47
|
+
inputBackgroundColor: "#ffffff",
|
|
48
|
+
textColor: "#111827",
|
|
49
|
+
mutedColor: "#626a73",
|
|
50
|
+
borderColor: "#e5e1dc",
|
|
51
|
+
borderRadius: "8px",
|
|
52
|
+
controlRadius: "6px",
|
|
53
|
+
shadow: "0 4px 18px rgba(17,24,39,.06)",
|
|
54
|
+
dangerColor: "#b42318",
|
|
55
|
+
successColor: "#16794f",
|
|
56
|
+
warningColor: "#9a5b13",
|
|
57
|
+
fontFamily: "Inter, ui-sans-serif, system-ui, sans-serif"
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
function resolveMindBillAppearance(appearance) {
|
|
61
|
+
const preset = appearance?.preset ?? "mindbill";
|
|
62
|
+
return { ...mindBillThemePresets[preset], ...appearance, preset };
|
|
63
|
+
}
|
|
64
|
+
function mindBillAppearanceStyle(appearance, style) {
|
|
65
|
+
const resolved = resolveMindBillAppearance(appearance);
|
|
66
|
+
return {
|
|
67
|
+
"--mb-accent": resolved.accentColor,
|
|
68
|
+
"--mb-accent-contrast": resolved.accentTextColor,
|
|
69
|
+
"--mb-text": resolved.textColor,
|
|
70
|
+
"--mb-muted": resolved.mutedColor,
|
|
71
|
+
"--mb-border": resolved.borderColor,
|
|
72
|
+
"--mb-soft": resolved.backgroundColor,
|
|
73
|
+
"--mb-surface": resolved.surfaceColor,
|
|
74
|
+
"--mb-input": resolved.inputBackgroundColor,
|
|
75
|
+
"--mb-font": resolved.fontFamily,
|
|
76
|
+
"--mb-radius": resolved.borderRadius,
|
|
77
|
+
"--mb-control-radius": resolved.controlRadius,
|
|
78
|
+
"--mb-shadow": resolved.shadow,
|
|
79
|
+
"--mb-danger": resolved.dangerColor,
|
|
80
|
+
"--mb-success": resolved.successColor,
|
|
81
|
+
"--mb-warning": resolved.warningColor,
|
|
82
|
+
...style
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
7
86
|
// src/native-bill-review.tsx
|
|
8
87
|
import { useEffect, useId, useMemo, useRef, useState } from "react";
|
|
9
88
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -131,18 +210,6 @@ function money(value) {
|
|
|
131
210
|
currency: "USD"
|
|
132
211
|
}).format(value);
|
|
133
212
|
}
|
|
134
|
-
function appearanceStyle(appearance, style) {
|
|
135
|
-
return {
|
|
136
|
-
...appearance?.accentColor ? { "--mb-accent": appearance.accentColor } : {},
|
|
137
|
-
...appearance?.textColor ? { "--mb-text": appearance.textColor } : {},
|
|
138
|
-
...appearance?.mutedColor ? { "--mb-muted": appearance.mutedColor } : {},
|
|
139
|
-
...appearance?.borderColor ? { "--mb-border": appearance.borderColor } : {},
|
|
140
|
-
...appearance?.backgroundColor ? { "--mb-soft": appearance.backgroundColor } : {},
|
|
141
|
-
...appearance?.surfaceColor ? { "--mb-surface": appearance.surfaceColor } : {},
|
|
142
|
-
...appearance?.fontFamily ? { "--mb-font": appearance.fontFamily } : {},
|
|
143
|
-
...style
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
213
|
function Field({
|
|
147
214
|
label,
|
|
148
215
|
value,
|
|
@@ -448,10 +515,11 @@ function BillReviewForm({
|
|
|
448
515
|
"form",
|
|
449
516
|
{
|
|
450
517
|
className: ["mb-native-review", className].filter(Boolean).join(" "),
|
|
451
|
-
style:
|
|
518
|
+
style: mindBillAppearanceStyle(appearance, style),
|
|
452
519
|
onSubmit: handleSave,
|
|
453
520
|
children: [
|
|
454
521
|
/* @__PURE__ */ jsx("style", { children: NATIVE_BILL_REVIEW_STYLES }),
|
|
522
|
+
/* @__PURE__ */ jsx("style", { children: NATIVE_THEME_OVERRIDE_STYLES }),
|
|
455
523
|
/* @__PURE__ */ jsxs("header", { className: "mb-native-heading", children: [
|
|
456
524
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
457
525
|
/* @__PURE__ */ jsx("span", { className: "mb-native-eyebrow", children: "Billing review" }),
|
|
@@ -760,8 +828,9 @@ function BillReviewForm({
|
|
|
760
828
|
);
|
|
761
829
|
}
|
|
762
830
|
function BillStatusSummary({ status, submittedAt, agingDays, updatedAt, totalCharge, totalPaid, balanceDue, actions = [], className, style, appearance }) {
|
|
763
|
-
return /* @__PURE__ */ jsxs("section", { className: ["mb-native-status", className].filter(Boolean).join(" "), style:
|
|
831
|
+
return /* @__PURE__ */ jsxs("section", { className: ["mb-native-status", className].filter(Boolean).join(" "), style: mindBillAppearanceStyle(appearance, style), children: [
|
|
764
832
|
/* @__PURE__ */ jsx("style", { children: NATIVE_BILL_REVIEW_STYLES }),
|
|
833
|
+
/* @__PURE__ */ jsx("style", { children: NATIVE_THEME_OVERRIDE_STYLES }),
|
|
765
834
|
/* @__PURE__ */ jsxs("div", { className: "mb-native-status-copy", children: [
|
|
766
835
|
/* @__PURE__ */ jsx("span", { className: "mb-native-eyebrow", children: "Bill status" }),
|
|
767
836
|
/* @__PURE__ */ jsx("h3", { children: status.replaceAll("_", " ") }),
|
|
@@ -816,6 +885,23 @@ var NATIVE_BILL_REVIEW_STYLES = `
|
|
|
816
885
|
.mb-native-eams{margin-top:13px!important;font-size:12px}.mb-native-eams a{color:var(--mb-accent);font-weight:750}
|
|
817
886
|
@media(max-width:620px){.mb-native-review{padding:12px}.mb-native-grid.two{grid-template-columns:1fr}}
|
|
818
887
|
`;
|
|
888
|
+
var NATIVE_THEME_OVERRIDE_STYLES = `
|
|
889
|
+
.mb-native-review,.mb-native-status{color:var(--mb-text);font-family:var(--mb-font,Inter,ui-sans-serif,system-ui,sans-serif)}
|
|
890
|
+
.mb-native-review{background:var(--mb-soft)}
|
|
891
|
+
.mb-native-heading>div:first-child>p,.mb-native-section>header p,.mb-native-total span,.mb-native-status-copy p,.mb-native-status dt{color:var(--mb-muted)}
|
|
892
|
+
.mb-native-summary,.mb-native-section,.mb-native-status{border-color:var(--mb-border);border-radius:var(--mb-radius);background:var(--mb-surface);box-shadow:var(--mb-shadow)}
|
|
893
|
+
.mb-native-field input,.mb-native-field select,.mb-native-field textarea,.mb-native-attachment-form input,.mb-native-attachment-form select{border-color:var(--mb-border);border-radius:var(--mb-control-radius);background:var(--mb-input);color:var(--mb-text)}
|
|
894
|
+
.mb-native-line,.mb-native-note,.mb-native-file,.mb-native-attachment-form,.mb-native-payer-insight,.mb-native-blockers,.mb-native-message{border-radius:var(--mb-control-radius)}
|
|
895
|
+
.mb-native-line,.mb-native-note,.mb-native-attachment-form,.mb-native-payer-insight{border-color:var(--mb-border);background:var(--mb-soft)}
|
|
896
|
+
.mb-native-file{border-color:var(--mb-border);background:var(--mb-surface)}
|
|
897
|
+
.mb-native-button.primary,.mb-native-presets button.active{border-color:var(--mb-accent);background:var(--mb-accent);color:var(--mb-accent-contrast)}
|
|
898
|
+
.mb-native-button.primary:hover,.mb-native-presets button.active:hover{filter:brightness(.96)}
|
|
899
|
+
.mb-native-button.secondary,.mb-native-presets button,.mb-native-chips button{border-color:var(--mb-border);border-radius:var(--mb-control-radius);background:var(--mb-input);color:var(--mb-text)}
|
|
900
|
+
.mb-native-message.error{background:color-mix(in srgb,var(--mb-danger) 10%,white);color:var(--mb-danger)}
|
|
901
|
+
.mb-native-message.success{background:color-mix(in srgb,var(--mb-success) 10%,white);color:var(--mb-success)}
|
|
902
|
+
.mb-native-blockers{border-color:color-mix(in srgb,var(--mb-warning) 35%,white);background:color-mix(in srgb,var(--mb-warning) 8%,white);color:var(--mb-warning)}
|
|
903
|
+
.mb-native-combo-list{border-color:var(--mb-border);border-radius:var(--mb-control-radius);background:var(--mb-surface);box-shadow:var(--mb-shadow)}
|
|
904
|
+
`;
|
|
819
905
|
|
|
820
906
|
// src/connected-bill-status.tsx
|
|
821
907
|
import {
|
|
@@ -1545,18 +1631,6 @@ function dateInputValue() {
|
|
|
1545
1631
|
const offset = now.getTimezoneOffset() * 6e4;
|
|
1546
1632
|
return new Date(now.getTime() - offset).toISOString().slice(0, 10);
|
|
1547
1633
|
}
|
|
1548
|
-
function appearanceStyle2(appearance, style) {
|
|
1549
|
-
return {
|
|
1550
|
-
...appearance?.accentColor ? { "--mb-accent": appearance.accentColor } : {},
|
|
1551
|
-
...appearance?.textColor ? { "--mb-text": appearance.textColor } : {},
|
|
1552
|
-
...appearance?.mutedColor ? { "--mb-muted": appearance.mutedColor } : {},
|
|
1553
|
-
...appearance?.borderColor ? { "--mb-border": appearance.borderColor } : {},
|
|
1554
|
-
...appearance?.backgroundColor ? { "--mb-soft": appearance.backgroundColor } : {},
|
|
1555
|
-
...appearance?.surfaceColor ? { "--mb-surface": appearance.surfaceColor } : {},
|
|
1556
|
-
...appearance?.fontFamily ? { "--mb-font": appearance.fontFamily } : {},
|
|
1557
|
-
...style
|
|
1558
|
-
};
|
|
1559
|
-
}
|
|
1560
1634
|
function SupportingDocumentControl({
|
|
1561
1635
|
disabled,
|
|
1562
1636
|
onAdd
|
|
@@ -1664,8 +1738,9 @@ function ConnectedBillLifecycle({
|
|
|
1664
1738
|
disabled: !action.enabled || lifecycle.isMutating
|
|
1665
1739
|
}));
|
|
1666
1740
|
const canEditAndSubmit = Boolean(has("edit_and_submit"));
|
|
1667
|
-
return /* @__PURE__ */ jsxs3("section", { className: ["mb-connected-lifecycle", className].filter(Boolean).join(" "), style:
|
|
1741
|
+
return /* @__PURE__ */ jsxs3("section", { className: ["mb-connected-lifecycle", className].filter(Boolean).join(" "), style: mindBillAppearanceStyle(appearance, style), children: [
|
|
1668
1742
|
/* @__PURE__ */ jsx3("style", { children: CONNECTED_LIFECYCLE_STYLES }),
|
|
1743
|
+
/* @__PURE__ */ jsx3("style", { children: CONNECTED_THEME_OVERRIDE_STYLES }),
|
|
1669
1744
|
canEditAndSubmit ? /* @__PURE__ */ jsx3(
|
|
1670
1745
|
BillReviewForm,
|
|
1671
1746
|
{
|
|
@@ -1863,6 +1938,22 @@ function ConnectedBillLifecycle({
|
|
|
1863
1938
|
var CONNECTED_LIFECYCLE_STYLES = `
|
|
1864
1939
|
.mb-connected-lifecycle{--mb-accent:#238dbd;--mb-text:#203743;--mb-muted:#657982;--mb-border:#dbe6ea;--mb-soft:#f3f8fa;--mb-surface:#fff;display:grid;gap:14px;color:var(--mb-text);font:14px/1.45 var(--mb-font,Inter,ui-sans-serif,system-ui,sans-serif)}.mb-connected-lifecycle *{box-sizing:border-box}.mb-lifecycle-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 14px;border:1px solid var(--mb-border);border-radius:10px;background:var(--mb-surface)}.mb-lifecycle-toolbar>div:first-child{display:grid;gap:2px}.mb-lifecycle-toolbar span,.mb-lifecycle-card p,.mb-lifecycle-panel p,.mb-lifecycle-info span{color:var(--mb-muted)}.mb-lifecycle-toolbar-actions,.mb-lifecycle-panel-actions{display:flex;justify-content:flex-end;gap:8px}.mb-lifecycle-button{min-height:38px;border:1px solid var(--mb-border);border-radius:8px;background:#fff;color:var(--mb-text);cursor:pointer;font:inherit;font-weight:750;padding:8px 13px}.mb-lifecycle-button.primary{border-color:var(--mb-accent);background:var(--mb-accent);color:#fff}.mb-lifecycle-button.quiet{border-color:transparent;background:transparent;color:var(--mb-muted)}.mb-lifecycle-button.danger{border-color:#b63d35;background:#b63d35;color:#fff}.mb-lifecycle-button:disabled{cursor:not-allowed;opacity:.5}.mb-lifecycle-card,.mb-lifecycle-panel{padding:18px;border:1px solid var(--mb-border);border-radius:12px;background:var(--mb-surface)}.mb-lifecycle-card header{display:flex;align-items:start;justify-content:space-between;gap:16px}.mb-lifecycle-card h3,.mb-lifecycle-panel h3{margin:0;font-size:18px}.mb-lifecycle-card p,.mb-lifecycle-panel p{margin:3px 0 0}.mb-lifecycle-card header>span{padding:5px 8px;border-radius:999px;background:var(--mb-soft);color:var(--mb-muted);font-size:11px;font-weight:800;text-transform:uppercase}.mb-lifecycle-documents{list-style:none;margin:12px 0 0;padding:0}.mb-lifecycle-documents li{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:11px 0;border-top:1px solid var(--mb-border)}.mb-lifecycle-documents li>div{display:grid}.mb-lifecycle-documents span{color:var(--mb-muted);font-size:12px}.mb-lifecycle-info{display:grid;gap:3px;padding:13px 15px;border:1px solid #cddfe5;border-radius:10px;background:var(--mb-soft)}.mb-lifecycle-panel{display:grid;gap:16px;box-shadow:0 14px 38px rgba(30,56,68,.08)}.mb-lifecycle-panel.danger{border-color:#ecc5c2}.mb-lifecycle-panel label{display:grid;gap:6px;font-size:12px;font-weight:750}.mb-lifecycle-panel label small{color:var(--mb-muted);font-size:inherit;font-weight:500}.mb-lifecycle-panel input,.mb-lifecycle-panel select,.mb-lifecycle-panel textarea,.mb-lifecycle-upload input,.mb-lifecycle-upload select{width:100%;min-height:42px;border:1px solid var(--mb-border);border-radius:8px;background:#fff;color:var(--mb-text);font:inherit;padding:9px 11px}.mb-lifecycle-panel textarea{min-height:100px;resize:vertical}.mb-lifecycle-fields{display:grid;gap:12px}.mb-lifecycle-fields.two{grid-template-columns:repeat(2,minmax(0,1fr))}.mb-lifecycle-fields .full{grid-column:1/-1}.mb-lifecycle-packet{display:grid;gap:0;margin:0;padding:0;border:0}.mb-lifecycle-packet legend{margin-bottom:7px;font-size:12px;font-weight:800}.mb-lifecycle-packet>label{display:grid;grid-template-columns:auto 1fr auto auto;align-items:center;gap:10px;padding:10px 2px;border-top:1px solid var(--mb-border)}.mb-lifecycle-packet>label>input{width:16px;min-height:16px}.mb-lifecycle-packet>label>span{display:grid}.mb-lifecycle-packet button{border:0;background:transparent;color:var(--mb-accent);cursor:pointer;font:inherit}.mb-lifecycle-upload{display:grid;grid-template-columns:220px 1fr auto;align-items:end;gap:10px;padding:12px;border-radius:9px;background:var(--mb-soft)}.mb-lifecycle-message,.mb-lifecycle-error,.mb-lifecycle-loading{padding:12px 14px;border-radius:9px}.mb-lifecycle-message.success{background:#edf9f2;color:#217449}.mb-lifecycle-message.error,.mb-lifecycle-error{background:#fff0ef;color:#9d3029}.mb-lifecycle-error{display:flex;align-items:center;gap:12px}.mb-lifecycle-error span{flex:1}.mb-lifecycle-error button{border:1px solid currentColor;border-radius:7px;background:transparent;color:inherit;padding:7px 10px}@media(max-width:760px){.mb-lifecycle-toolbar,.mb-lifecycle-card header{align-items:stretch;flex-direction:column}.mb-lifecycle-toolbar-actions,.mb-lifecycle-panel-actions{justify-content:start}.mb-lifecycle-fields.two,.mb-lifecycle-upload{grid-template-columns:1fr}.mb-lifecycle-documents li{align-items:start}.mb-lifecycle-packet>label{grid-template-columns:auto 1fr auto}}
|
|
1865
1940
|
`;
|
|
1941
|
+
var CONNECTED_THEME_OVERRIDE_STYLES = `
|
|
1942
|
+
.mb-connected-lifecycle{color:var(--mb-text);font-family:var(--mb-font,Inter,ui-sans-serif,system-ui,sans-serif)}
|
|
1943
|
+
.mb-lifecycle-toolbar,.mb-lifecycle-card,.mb-lifecycle-panel{border-color:var(--mb-border);border-radius:var(--mb-radius);background:var(--mb-surface)}
|
|
1944
|
+
.mb-lifecycle-panel{box-shadow:var(--mb-shadow)}
|
|
1945
|
+
.mb-lifecycle-toolbar span,.mb-lifecycle-card p,.mb-lifecycle-panel p,.mb-lifecycle-info span{color:var(--mb-muted)}
|
|
1946
|
+
.mb-lifecycle-button{border-color:var(--mb-border);border-radius:var(--mb-control-radius);background:var(--mb-input);color:var(--mb-text)}
|
|
1947
|
+
.mb-lifecycle-button.primary{border-color:var(--mb-accent);background:var(--mb-accent);color:var(--mb-accent-contrast)}
|
|
1948
|
+
.mb-lifecycle-button.primary:hover{filter:brightness(.96)}
|
|
1949
|
+
.mb-lifecycle-button.danger{border-color:var(--mb-danger);background:var(--mb-danger);color:white}
|
|
1950
|
+
.mb-lifecycle-card header>span,.mb-lifecycle-info,.mb-lifecycle-upload{background:var(--mb-soft)}
|
|
1951
|
+
.mb-lifecycle-info,.mb-lifecycle-panel input,.mb-lifecycle-panel select,.mb-lifecycle-panel textarea,.mb-lifecycle-upload input,.mb-lifecycle-upload select{border-color:var(--mb-border);border-radius:var(--mb-control-radius)}
|
|
1952
|
+
.mb-lifecycle-panel input,.mb-lifecycle-panel select,.mb-lifecycle-panel textarea,.mb-lifecycle-upload input,.mb-lifecycle-upload select{background:var(--mb-input);color:var(--mb-text)}
|
|
1953
|
+
.mb-lifecycle-message,.mb-lifecycle-error,.mb-lifecycle-loading,.mb-lifecycle-upload{border-radius:var(--mb-control-radius)}
|
|
1954
|
+
.mb-lifecycle-message.success{background:color-mix(in srgb,var(--mb-success) 10%,white);color:var(--mb-success)}
|
|
1955
|
+
.mb-lifecycle-message.error,.mb-lifecycle-error{background:color-mix(in srgb,var(--mb-danger) 10%,white);color:var(--mb-danger)}
|
|
1956
|
+
`;
|
|
1866
1957
|
|
|
1867
1958
|
// src/index.tsx
|
|
1868
1959
|
function widget(tagName, props) {
|
|
@@ -1914,6 +2005,9 @@ export {
|
|
|
1914
2005
|
buildBillReviewSaveInput,
|
|
1915
2006
|
createBillLifecycleClient,
|
|
1916
2007
|
createBillStatusClient,
|
|
2008
|
+
mindBillAppearanceStyle,
|
|
2009
|
+
mindBillThemePresets,
|
|
2010
|
+
resolveMindBillAppearance,
|
|
1917
2011
|
useBillLifecycle,
|
|
1918
2012
|
useBillStatus
|
|
1919
2013
|
};
|