@msm-platform/customer-react 0.3.0 → 0.3.1

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/dist/layout.d.ts CHANGED
@@ -1,9 +1,15 @@
1
1
  import type { ReactNode } from "react";
2
2
  import type { CustomerBrand } from "./client";
3
3
  import type { CustomerScreen } from "./context";
4
+ import { type MessageKey } from "./i18n";
4
5
  export declare function BrandMark({ brand }: {
5
6
  brand: CustomerBrand | undefined;
6
7
  }): import("react").JSX.Element | null;
8
+ type Tab = "businesses" | "bookings" | "passes" | "details";
9
+ export type Tabs = [Tab, MessageKey][];
10
+ /** The account's own screens, without booking. */
11
+ export declare const accountTabs: Tabs;
12
+ export declare const allTabs: Tabs;
7
13
  /**
8
14
  * The shell around every screen, signed in or not: brand header with sign
9
15
  * in or out, navigation between booking and the account screens, and the
@@ -11,6 +17,7 @@ export declare function BrandMark({ brand }: {
11
17
  */
12
18
  export declare function AccountLayout(props: {
13
19
  brand: CustomerBrand | undefined;
20
+ tabs: Tabs;
14
21
  screen: CustomerScreen;
15
22
  signedIn: boolean;
16
23
  /** The sign-in form is on screen, so the header offers no second one. */
@@ -19,3 +26,4 @@ export declare function AccountLayout(props: {
19
26
  onSignOut: () => void;
20
27
  children: ReactNode;
21
28
  }): import("react").JSX.Element;
29
+ export {};
@@ -0,0 +1,26 @@
1
+ import { type ReactNode } from "react";
2
+ import { type CustomerScreen, type Portal } from "./context";
3
+ /**
4
+ * What every screen component shares: the session on `basePath`, the
5
+ * client, the partner's public businesses and sign-out, as the `Portal`
6
+ * its screens read.
7
+ */
8
+ export declare function useCustomerPortal(options: {
9
+ basePath: string;
10
+ navigate: (screen: CustomerScreen) => void;
11
+ /** Whether the screens may lead to the business list and the account. */
12
+ accountNavigation: boolean;
13
+ onSessionChange: ((signedIn: boolean) => void) | undefined;
14
+ }): {
15
+ basePath: string;
16
+ sessionKey: import("./session").SessionState;
17
+ notice: "app.loading" | "app.loadFailed" | "app.retry" | "app.signedOut" | "app.signedOutEverywhere" | "nav.label" | "nav.book" | "nav.signIn" | "nav.bookings" | "nav.passes" | "nav.details" | "nav.signOut" | "signIn.heading" | "signIn.intro" | "signIn.toRegister" | "register.heading" | "register.intro" | "register.name" | "register.toSignIn" | "signIn.phone" | "signIn.codeSent" | "signIn.code" | "signIn.sendCode" | "signIn.submit" | "register.submit" | "signIn.wait" | "signIn.differentNumber" | "signIn.cancel" | "signIn.error.tooMany" | "signIn.error.tooManyLater" | "signIn.error.paused" | "signIn.error.pausedLater" | "signIn.error.destination" | "signIn.error.badCode" | "register.error.badCode" | "signIn.error.invalid" | "signIn.error.refused" | "signIn.error.unreachable" | "signIn.error.failed" | "signIn.error.botCheck" | "signIn.error.botCheckUnavailable" | "signIn.error.notConfigured" | "wait.seconds.one" | "wait.seconds.other" | "wait.minutes.one" | "wait.minutes.other" | "wait.hours.one" | "wait.hours.other" | "bookings.heading" | "bookings.period" | "bookings.upcoming" | "bookings.past" | "bookings.emptyUpcoming" | "bookings.emptyPast" | "bookings.more" | "bookings.when" | "bookings.cancelled" | "bookings.cancelledLate" | "bookings.attended" | "bookings.noShow" | "bookings.lateFrom" | "bookings.started" | "bookings.cancel" | "bookings.confirmHeading" | "bookings.confirmLate" | "bookings.confirmCredit" | "bookings.confirm" | "bookings.keep" | "bookings.cancelling" | "bookings.doneOnTime" | "bookings.doneLate" | "bookings.cancelFailed" | "bookings.gone" | "businesses.heading" | "businesses.intro" | "businesses.empty" | "businesses.open" | "business.all" | "business.notFound" | "business.types" | "business.allTypes" | "business.resources" | "business.anyResource" | "business.typeMissing" | "business.minutes" | "business.week" | "business.previousWeek" | "business.nextWeek" | "business.weekOf" | "business.empty" | "business.seatsLeft.one" | "business.seatsLeft.other" | "business.full" | "business.openTime" | "business.with" | "business.book" | "book.heading" | "book.signInFirst" | "book.back" | "book.reserving" | "book.heldUntil" | "book.confirm" | "book.confirming" | "book.booked" | "book.toBookings" | "book.done" | "book.close" | "book.chooseType" | "book.noTypes" | "book.seeAll" | "book.chooseResource" | "book.anyResource" | "book.anyResourceHint" | "book.toTypes" | "book.otherResource" | "book.reserveAgain" | "book.full" | "book.slotTaken" | "book.limit" | "book.expired" | "book.notAllowed" | "book.unavailable" | "book.refused" | "book.failed" | "passes.heading" | "passes.empty" | "passes.unlimited" | "passes.credits" | "passes.validFrom" | "passes.validRange" | "passes.expired" | "details.heading" | "details.name" | "details.phone" | "details.email" | "details.none" | "details.readOnly" | "details.save" | "details.saving" | "details.saved" | "details.saveFailed" | "details.signOutEverywhere" | "details.signOutEverywhereHint" | "details.signOutEverywhereFailed" | undefined;
18
+ portal: Portal;
19
+ signedInAs: (next: string) => void;
20
+ };
21
+ /** The scoped root every screen component renders, "Loading…" until the session is known. */
22
+ export declare function CustomerRoot(props: {
23
+ portal: Portal;
24
+ loading: boolean;
25
+ children: ReactNode;
26
+ }): import("react").JSX.Element;
@@ -1,11 +1,80 @@
1
- import type { Business as BusinessDto, Candidate } from "../client";
1
+ import { type ReactNode } from "react";
2
+ import type { Business as BusinessDto, Candidate, EventType } from "../client";
3
+ /** The date of `at` in `timeZone`, as YYYY-MM-DD; today by default. */
4
+ export declare function localDate(timeZone: string, at?: Date): string;
5
+ /** The calendar date `count` days after `date` (YYYY-MM-DD). */
6
+ export declare function addDays(date: string, count: number): string;
7
+ type Catalog = ReturnType<typeof useCatalog>;
8
+ /** A business and its event types, the public reads every booking step needs. */
9
+ export declare function useCatalog(businessId: string): {
10
+ business: {
11
+ address: string | null;
12
+ displayName: string;
13
+ email: string | null;
14
+ id: string;
15
+ latitude: number | null;
16
+ logoAssetId: string | null;
17
+ longitude: number | null;
18
+ phone: string | null;
19
+ timezone: string;
20
+ } | null | undefined;
21
+ types: {
22
+ cancellationCutoffMinutes: number | null;
23
+ categoryId: string | null;
24
+ description: string | null;
25
+ displayName: string;
26
+ durationMinutes: number;
27
+ id: string;
28
+ imageAssetId: string | null;
29
+ requiresAccess: boolean;
30
+ resources: {
31
+ description: string | null;
32
+ displayName: string;
33
+ id: string;
34
+ }[];
35
+ timeSlotBooking: boolean;
36
+ }[] | undefined;
37
+ failed: boolean;
38
+ reload: () => Promise<void>;
39
+ };
40
+ /**
41
+ * The screen for a catalog that has not loaded: it failed, the business is
42
+ * not public here, or it is still loading. Undefined once it has loaded.
43
+ */
44
+ export declare function pendingCatalog(catalog: Catalog, back: ReactNode): import("react").JSX.Element | undefined;
45
+ /** The resources that provide `types`, each once, in the order they appear. */
46
+ export declare function resourcesOf(types: EventType[]): {
47
+ description: string | null;
48
+ displayName: string;
49
+ id: string;
50
+ }[];
51
+ /** The filters the business screen shows, when its host drives them. */
52
+ export interface BusinessFilter {
53
+ eventTypeId?: string;
54
+ resourceId?: string;
55
+ }
2
56
  /**
3
57
  * A business: its details, its event types as filters, and a week of its
4
58
  * availability, events with seats and open time slots in one list, in the
5
- * business's timezone. Choosing a candidate starts booking it.
59
+ * business's timezone. Choosing a candidate starts booking it. With
60
+ * `onFilter`, it also filters by resource, and both filters call it instead
61
+ * of navigating.
6
62
  */
7
63
  export declare function Business(props: {
8
64
  businessId: string;
9
65
  eventTypeId: string | undefined;
66
+ resourceId?: string | undefined;
67
+ onFilter?: ((filter: BusinessFilter) => void) | undefined;
10
68
  onChoose: (business: BusinessDto, candidate: Candidate) => void;
69
+ }): import("react").JSX.Element | undefined;
70
+ /** An event type's name, description and length, above its times. */
71
+ export declare function TypeDetails({ type }: {
72
+ type: EventType;
73
+ }): import("react").JSX.Element;
74
+ export declare function Availability(props: {
75
+ business: BusinessDto;
76
+ eventTypeId: string | undefined;
77
+ resourceId?: string | undefined;
78
+ onChoose: (candidate: Candidate) => void;
11
79
  }): import("react").JSX.Element;
80
+ export {};
@@ -0,0 +1,10 @@
1
+ /** undefined while checking, null when signed out, else the session's ID. */
2
+ export type SessionState = string | null | undefined;
3
+ /** Sets the session every component on `basePath` shows. */
4
+ export declare function setSession(basePath: string, value: string | null): void;
5
+ /**
6
+ * The shared session on `basePath`, checked with the server half when the
7
+ * first component mounts. `onChange` hears each sign-in and sign-out after
8
+ * that first answer, including a session the server half ended.
9
+ */
10
+ export declare function useSession(basePath: string, onChange: ((signedIn: boolean) => void) | undefined): SessionState;
@@ -0,0 +1,26 @@
1
+ import type { CustomerBotCheck, CustomerBrand } from "./client";
2
+ export interface MsmSignInProps {
3
+ /** Where the server half is mounted, as for MsmCustomer. */
4
+ basePath: string;
5
+ /** The host's name and logo above the form. */
6
+ brand?: CustomerBrand;
7
+ /** The bot check before a code is sent, as for MsmCustomer. */
8
+ botCheck: CustomerBotCheck;
9
+ /**
10
+ * Called once the customer is signed in, whether they signed in or
11
+ * registered, and at once when they already were.
12
+ */
13
+ onSignedIn?: () => void;
14
+ /** Offers a Cancel button that calls this. */
15
+ onCancel?: () => void;
16
+ /**
17
+ * Called when the customer signs in or out after the first session check,
18
+ * here or in another of the package's components on the same `basePath`.
19
+ */
20
+ onSessionChange?: (signedIn: boolean) => void;
21
+ }
22
+ /**
23
+ * Phone sign-in and registration on their own, for a host's modal. It
24
+ * never navigates: the host closes it on `onSignedIn` or `onCancel`.
25
+ */
26
+ export declare function MsmSignIn(props: MsmSignInProps): import("react").JSX.Element;
package/dist/sign-in.d.ts CHANGED
@@ -9,6 +9,10 @@ export declare function SignIn(props: {
9
9
  botCheck: CustomerBotCheck | undefined;
10
10
  notice: MessageKey | undefined;
11
11
  onSignedIn: (sessionKey: string) => void;
12
+ /** Offers a Cancel button that calls this. */
13
+ onCancel?: (() => void) | undefined;
14
+ /** Moves focus to the first field on mount, as in a host's dialog. */
15
+ autoFocus?: boolean;
12
16
  /** What the customer is signing in for, such as the time they chose. */
13
17
  children?: ReactNode;
14
18
  }): import("react").JSX.Element;
package/dist/style.css CHANGED
@@ -1,2 +1,2 @@
1
- .msm-phone{grid-template-columns:minmax(0,1fr);gap:4px;min-width:0;display:grid}.msm-phone .msm-phone-row{gap:8px;display:flex}.msm-phone .msm-phone-row button.msm-phone-country{border:1px solid var(--msm-border,#c9d1c8);background:var(--msm-surface,#fff);min-width:48px;min-height:48px;color:var(--msm-text,#202e2b);font:inherit;cursor:pointer;border-radius:6px;flex-shrink:0;align-items:center;gap:6px;padding:0 12px;font-size:16px;font-weight:400;display:flex}.msm-phone .msm-phone-row button.msm-phone-country:after{content:"▾";color:var(--msm-muted,#66736c);font-size:12px}.msm-phone .msm-phone-row input.msm-phone-number{border:1px solid var(--msm-border,#c9d1c8);background:var(--msm-surface,#fff);min-width:0;min-height:48px;color:var(--msm-text,#202e2b);font:inherit;border-radius:6px;flex:1;padding:0 12px;font-size:16px;font-weight:400}.msm-phone .msm-phone-row input.msm-phone-number[aria-invalid=true]{border-color:var(--msm-danger,#9b2c2c)}.msm-phone p.msm-phone-problem{color:var(--msm-danger,#9b2c2c);margin:0;font-size:14px;font-weight:400}:is(.msm-phone,.msm-select) .msm-picker-dialog{background:var(--msm-surface,#fff);width:min(440px,100vw - 32px);max-width:none;height:min(640px,100dvh - 64px);max-height:none;color:var(--msm-text,#202e2b);border:0;border-radius:12px;padding:0;font:16px/1.4 system-ui,sans-serif;box-shadow:0 16px 48px #202e2b40}:is(.msm-phone,.msm-select) .msm-picker-dialog[open]{flex-direction:column;display:flex}:is(.msm-phone,.msm-select) .msm-picker-dialog::backdrop{background:#202e2b73}:is(.msm-phone,.msm-select) .msm-picker-head{justify-content:space-between;align-items:center;padding:8px 8px 8px 20px;display:flex}:is(.msm-phone,.msm-select) .msm-picker-head h2{letter-spacing:0;margin:0;font-size:18px;font-weight:600}:is(.msm-phone,.msm-select) .msm-picker-head button{min-width:48px;min-height:48px;color:var(--msm-accent,#235b4b);font:inherit;cursor:pointer;background:0 0;border:0;padding:0 12px;font-weight:600}:is(.msm-phone,.msm-select) .msm-picker-dialog input.msm-picker-search{border:1px solid var(--msm-border,#c9d1c8);min-height:48px;color:var(--msm-text,#202e2b);font:inherit;border-radius:6px;margin:0 16px 8px;padding:0 12px}:is(.msm-phone,.msm-select) .msm-picker-dialog ul{overscroll-behavior:contain;border-top:1px solid var(--msm-divider,#dce2db);flex:1;margin:0;padding:0 0 8px;list-style:none;overflow-y:auto}:is(.msm-phone,.msm-select) .msm-picker-dialog li button{width:100%;min-height:48px;color:var(--msm-text,#202e2b);font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;border-radius:0;align-items:center;gap:12px;padding:0 20px;display:flex}:is(.msm-phone,.msm-select) .msm-picker-dialog li button:hover,:is(.msm-phone,.msm-select) .msm-picker-dialog li button.msm-picker-first{background:var(--msm-highlight,#e5ece5)}:is(.msm-phone,.msm-select) .msm-picker-dialog li button[aria-current=true]{color:var(--msm-accent,#235b4b);font-weight:600}:is(.msm-phone,.msm-select) .msm-picker-dialog li button:focus-visible{outline-offset:-3px}:is(.msm-phone,.msm-select) .msm-picker-dialog .msm-picker-label{overflow-wrap:anywhere;flex:1;min-width:0}:is(.msm-phone,.msm-select) .msm-picker-dialog .msm-picker-hint{color:var(--msm-muted,#66736c);font-variant-numeric:tabular-nums;white-space:nowrap}:is(.msm-phone,.msm-select) .msm-picker-dialog .msm-picker-empty{color:var(--msm-muted,#66736c);margin:0;padding:16px 20px}.msm-select{grid-template-columns:minmax(0,1fr);gap:4px;min-width:0;display:grid}.msm-select button.msm-select-value{border:1px solid var(--msm-border,#c9d1c8);background:var(--msm-surface,#fff);min-height:48px;color:var(--msm-text,#202e2b);font:inherit;text-align:left;cursor:pointer;border-radius:6px;justify-self:stretch;align-items:center;gap:8px;padding:8px 12px;font-size:16px;font-weight:400;display:flex}.msm-select button.msm-select-value:after{content:"▾";color:var(--msm-muted,#66736c);margin-left:auto;font-size:12px}.msm-select .msm-select-text{overflow-wrap:anywhere;min-width:0}@media (width<=600px){:is(.msm-phone,.msm-select) .msm-picker-dialog{border-radius:0;width:100%;height:100%;margin:0}}.msm-customer{--cp-accent:var(--msm-customer-accent,#235b4b);--cp-accent-text:var(--msm-customer-accent-text,#fff);--cp-ink:var(--msm-customer-text,#202e2b);--cp-muted:var(--msm-customer-muted,#66736c);--cp-control-line:var(--msm-customer-border,#c9d1c8);--cp-line:var(--msm-customer-border,#dce2db);--cp-bg:var(--msm-customer-background,#f6f7f4);--cp-surface:var(--msm-customer-surface,#fff);--cp-radius:var(--msm-customer-radius,6px);--cp-card-radius:calc(var(--cp-radius) * 4 / 3);--msm-accent:var(--cp-accent);--msm-text:var(--cp-ink);--msm-muted:var(--cp-muted);--msm-border:var(--cp-control-line);--msm-divider:var(--cp-line);--msm-surface:var(--cp-surface);box-sizing:border-box;background:var(--cp-bg);color:var(--cp-ink);font-size:15px;line-height:1.6;font-family:var(--msm-customer-font,inherit)}.msm-customer *{box-sizing:border-box}.msm-customer .cp-status{place-items:center;margin:0;padding:24px;display:grid}.msm-customer button{min-height:44px;font:inherit;border-radius:var(--cp-radius);background:var(--cp-accent);color:var(--cp-accent-text);cursor:pointer;border:0;padding:10px 14px;font-weight:600}.msm-customer button:disabled{opacity:.55;cursor:default}.msm-customer button.cp-secondary{background:var(--cp-surface);color:var(--cp-ink);border:1px solid var(--cp-control-line)}.msm-customer button.cp-link{color:var(--cp-accent);background:0 0;padding:10px 0;text-decoration:underline}.msm-customer input{min-height:44px;font:inherit;border:1px solid var(--cp-control-line);border-radius:var(--cp-radius);background:var(--cp-surface);color:var(--cp-ink);width:100%;padding:10px 12px;font-size:16px;font-weight:400}.msm-customer input:focus,.msm-customer button:focus-visible{outline:2px solid var(--cp-accent);outline-offset:1px}.msm-customer label{gap:6px;font-size:13px;font-weight:600;display:grid}.msm-customer [role=alert]{color:#a3271f;margin:0}.cp-notice{border-radius:var(--cp-radius);color:var(--cp-ink);background:#eef3ee;margin:0;padding:10px 12px}.cp-brand{letter-spacing:-.5px;align-items:center;gap:10px;font-size:20px;font-weight:750;display:flex}.cp-brand img{max-width:120px;max-height:36px}.cp-sign-in{place-items:center;display:grid}.cp-sign-in form{background:var(--cp-surface);border:1px solid var(--cp-line);border-radius:var(--cp-card-radius);gap:14px;width:min(400px,100%);margin:16px 0;padding:32px 24px;display:grid}.cp-sign-in h1{margin:8px 0 0;font-size:22px;font-weight:600}.cp-sign-in p{color:var(--cp-muted);margin:0}.cp-shell{max-width:640px;padding:env(safe-area-inset-top) 16px calc(24px + env(safe-area-inset-bottom));margin:0 auto}.cp-header{justify-content:space-between;align-items:center;padding:12px 0;display:flex}.cp-nav{background:var(--cp-surface);border:1px solid var(--cp-line);border-radius:var(--cp-card-radius);grid-template-columns:repeat(4,1fr);gap:4px;padding:4px;display:grid}.msm-customer .cp-nav button{white-space:nowrap;color:var(--cp-ink);background:0 0;padding:6px 2px;line-height:1.2}.msm-customer .cp-nav button[aria-current=page]{background:var(--cp-accent);color:var(--cp-accent-text)}.cp-main{padding-top:8px}.cp-screen{gap:12px;display:grid}.cp-screen h1{margin:12px 0 0;font-size:22px;font-weight:600}.msm-customer fieldset{min-width:0;margin:0}.cp-tabs{border:0;gap:8px;padding:0;display:flex}.msm-customer .cp-tabs button{background:var(--cp-surface);color:var(--cp-ink);border:1px solid var(--cp-control-line);flex:1}.msm-customer .cp-tabs button[aria-pressed=true]{border-color:var(--cp-accent);box-shadow:inset 0 0 0 1px var(--cp-accent)}.cp-list{gap:12px;margin:0;padding:0;list-style:none;display:grid}.cp-card{background:var(--cp-surface);border:1px solid var(--cp-line);border-radius:var(--cp-card-radius);gap:6px;padding:16px;display:grid}.cp-card p{margin:0}.cp-card-head{justify-content:space-between;align-items:start;gap:8px;display:flex}.cp-card h2{margin:0;font-size:17px;font-weight:600}.cp-badge{color:var(--cp-muted);background:#eef0ec;border-radius:999px;flex:none;padding:2px 8px;font-size:12px;font-weight:600}.cp-hint,.cp-empty{color:var(--cp-muted);margin:0;font-size:14px}.cp-credits{font-weight:600}.cp-confirm{border-radius:var(--cp-radius);background:#faf6ec;border:1px solid #eadfbf;gap:8px;padding:12px;display:grid}.cp-confirm legend{float:left;width:100%;padding:0;font-weight:600}.cp-warning{color:#7a4b00}.cp-actions{grid-template-columns:1fr 1fr;gap:8px;display:grid}.cp-actions>:only-child{grid-column:1/-1}.cp-form{gap:12px}.cp-form dl{grid-template-columns:max-content 1fr;gap:4px 16px;margin:0;display:grid}.cp-form dt{font-size:13px;font-weight:600}.cp-form dd{overflow-wrap:anywhere;margin:0}.cp-error{gap:8px;display:grid}.cp-business{gap:10px}.msm-customer .cp-business button{justify-self:start}.msm-customer button.cp-back{justify-self:start;min-height:0;padding:4px 0}.cp-business-head p{margin:0}.cp-chips{border:0;flex-wrap:wrap;gap:8px;padding:0;display:flex}.msm-customer .cp-chips button{background:var(--cp-surface);min-height:36px;color:var(--cp-ink);border:1px solid var(--cp-control-line);border-radius:999px;padding:6px 12px;font-weight:500}.msm-customer .cp-chips button[aria-pressed=true]{background:var(--cp-accent);color:var(--cp-accent-text);border-color:var(--cp-accent)}.cp-type h2{margin:0;font-size:17px;font-weight:600}.cp-type p{margin:0}.cp-week{text-align:center;border:0;grid-template-columns:44px 1fr 44px;align-items:center;gap:8px;padding:0;font-weight:600;display:grid}.msm-customer .cp-week button{padding:0;font-size:20px}.cp-day{gap:8px;display:grid}.cp-day h2{color:var(--cp-muted);margin:8px 0 0;font-size:15px;font-weight:600}.cp-candidate{grid-template-columns:auto 1fr auto;align-items:center;gap:4px 14px}.cp-time{font-variant-numeric:tabular-nums;white-space:nowrap;font-weight:650}.cp-candidate-body{min-width:0}.cp-candidate h3{margin:0;font-size:16px;font-weight:600}@media (width<=479px){.msm-customer .cp-nav button{font-size:14px}.cp-candidate{grid-template-columns:1fr auto}.cp-time{grid-column:1/-1}}.cp-summary{border-radius:var(--cp-radius);border:1px solid var(--cp-line);background:var(--cp-surface);gap:2px;padding:12px 14px;display:grid}.cp-summary h2{margin:0;font-size:17px;font-weight:600}.cp-summary p{color:var(--cp-ink);margin:0}.cp-summary p.cp-hint{color:var(--cp-muted)}@media (width<=359px){.msm-customer .cp-nav button{white-space:normal}}
1
+ .msm-phone{grid-template-columns:minmax(0,1fr);gap:4px;min-width:0;display:grid}.msm-phone .msm-phone-row{gap:8px;display:flex}.msm-phone .msm-phone-row button.msm-phone-country{border:1px solid var(--msm-border,#c9d1c8);background:var(--msm-surface,#fff);min-width:48px;min-height:48px;color:var(--msm-text,#202e2b);font:inherit;cursor:pointer;border-radius:6px;flex-shrink:0;align-items:center;gap:6px;padding:0 12px;font-size:16px;font-weight:400;display:flex}.msm-phone .msm-phone-row button.msm-phone-country:after{content:"▾";color:var(--msm-muted,#66736c);font-size:12px}.msm-phone .msm-phone-row input.msm-phone-number{border:1px solid var(--msm-border,#c9d1c8);background:var(--msm-surface,#fff);min-width:0;min-height:48px;color:var(--msm-text,#202e2b);font:inherit;border-radius:6px;flex:1;padding:0 12px;font-size:16px;font-weight:400}.msm-phone .msm-phone-row input.msm-phone-number[aria-invalid=true]{border-color:var(--msm-danger,#9b2c2c)}.msm-phone p.msm-phone-problem{color:var(--msm-danger,#9b2c2c);margin:0;font-size:14px;font-weight:400}:is(.msm-phone,.msm-select) .msm-picker-dialog{background:var(--msm-surface,#fff);width:min(440px,100vw - 32px);max-width:none;height:min(640px,100dvh - 64px);max-height:none;color:var(--msm-text,#202e2b);border:0;border-radius:12px;padding:0;font:16px/1.4 system-ui,sans-serif;box-shadow:0 16px 48px #202e2b40}:is(.msm-phone,.msm-select) .msm-picker-dialog[open]{flex-direction:column;display:flex}:is(.msm-phone,.msm-select) .msm-picker-dialog::backdrop{background:#202e2b73}:is(.msm-phone,.msm-select) .msm-picker-head{justify-content:space-between;align-items:center;padding:8px 8px 8px 20px;display:flex}:is(.msm-phone,.msm-select) .msm-picker-head h2{letter-spacing:0;margin:0;font-size:18px;font-weight:600}:is(.msm-phone,.msm-select) .msm-picker-head button{min-width:48px;min-height:48px;color:var(--msm-accent,#235b4b);font:inherit;cursor:pointer;background:0 0;border:0;padding:0 12px;font-weight:600}:is(.msm-phone,.msm-select) .msm-picker-dialog input.msm-picker-search{border:1px solid var(--msm-border,#c9d1c8);min-height:48px;color:var(--msm-text,#202e2b);font:inherit;border-radius:6px;margin:0 16px 8px;padding:0 12px}:is(.msm-phone,.msm-select) .msm-picker-dialog ul{overscroll-behavior:contain;border-top:1px solid var(--msm-divider,#dce2db);flex:1;margin:0;padding:0 0 8px;list-style:none;overflow-y:auto}:is(.msm-phone,.msm-select) .msm-picker-dialog li button{width:100%;min-height:48px;color:var(--msm-text,#202e2b);font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;border-radius:0;align-items:center;gap:12px;padding:0 20px;display:flex}:is(.msm-phone,.msm-select) .msm-picker-dialog li button:hover,:is(.msm-phone,.msm-select) .msm-picker-dialog li button.msm-picker-first{background:var(--msm-highlight,#e5ece5)}:is(.msm-phone,.msm-select) .msm-picker-dialog li button[aria-current=true]{color:var(--msm-accent,#235b4b);font-weight:600}:is(.msm-phone,.msm-select) .msm-picker-dialog li button:focus-visible{outline-offset:-3px}:is(.msm-phone,.msm-select) .msm-picker-dialog .msm-picker-label{overflow-wrap:anywhere;flex:1;min-width:0}:is(.msm-phone,.msm-select) .msm-picker-dialog .msm-picker-hint{color:var(--msm-muted,#66736c);font-variant-numeric:tabular-nums;white-space:nowrap}:is(.msm-phone,.msm-select) .msm-picker-dialog .msm-picker-empty{color:var(--msm-muted,#66736c);margin:0;padding:16px 20px}.msm-select{grid-template-columns:minmax(0,1fr);gap:4px;min-width:0;display:grid}.msm-select button.msm-select-value{border:1px solid var(--msm-border,#c9d1c8);background:var(--msm-surface,#fff);min-height:48px;color:var(--msm-text,#202e2b);font:inherit;text-align:left;cursor:pointer;border-radius:6px;justify-self:stretch;align-items:center;gap:8px;padding:8px 12px;font-size:16px;font-weight:400;display:flex}.msm-select button.msm-select-value:after{content:"▾";color:var(--msm-muted,#66736c);margin-left:auto;font-size:12px}.msm-select .msm-select-text{overflow-wrap:anywhere;min-width:0}@media (width<=600px){:is(.msm-phone,.msm-select) .msm-picker-dialog{border-radius:0;width:100%;height:100%;margin:0}}.msm-customer{--cp-accent:var(--msm-customer-accent,#235b4b);--cp-accent-text:var(--msm-customer-accent-text,#fff);--cp-ink:var(--msm-customer-text,#202e2b);--cp-muted:var(--msm-customer-muted,#66736c);--cp-control-line:var(--msm-customer-border,#c9d1c8);--cp-line:var(--msm-customer-border,#dce2db);--cp-bg:var(--msm-customer-background,#f6f7f4);--cp-surface:var(--msm-customer-surface,#fff);--cp-radius:var(--msm-customer-radius,6px);--cp-card-radius:calc(var(--cp-radius) * 4 / 3);--msm-accent:var(--cp-accent);--msm-text:var(--cp-ink);--msm-muted:var(--cp-muted);--msm-border:var(--cp-control-line);--msm-divider:var(--cp-line);--msm-surface:var(--cp-surface);box-sizing:border-box;background:var(--cp-bg);color:var(--cp-ink);font-size:15px;line-height:1.6;font-family:var(--msm-customer-font,inherit)}.msm-customer *{box-sizing:border-box}.msm-customer .cp-status{place-items:center;margin:0;padding:24px;display:grid}.msm-customer button{min-height:44px;font:inherit;border-radius:var(--cp-radius);background:var(--cp-accent);color:var(--cp-accent-text);cursor:pointer;border:0;padding:10px 14px;font-weight:600}.msm-customer button:disabled{opacity:.55;cursor:default}.msm-customer button.cp-secondary{background:var(--cp-surface);color:var(--cp-ink);border:1px solid var(--cp-control-line)}.msm-customer button.cp-link{color:var(--cp-accent);background:0 0;padding:10px 0;text-decoration:underline}.msm-customer input{min-height:44px;font:inherit;border:1px solid var(--cp-control-line);border-radius:var(--cp-radius);background:var(--cp-surface);color:var(--cp-ink);width:100%;padding:10px 12px;font-size:16px;font-weight:400}.msm-customer input:focus,.msm-customer button:focus-visible{outline:2px solid var(--cp-accent);outline-offset:1px}.msm-customer label{gap:6px;font-size:13px;font-weight:600;display:grid}.msm-customer [role=alert]{color:#a3271f;margin:0}.cp-notice{border-radius:var(--cp-radius);color:var(--cp-ink);background:#eef3ee;margin:0;padding:10px 12px}.cp-brand{letter-spacing:-.5px;align-items:center;gap:10px;font-size:20px;font-weight:750;display:flex}.cp-brand img{max-width:120px;max-height:36px}.cp-sign-in{place-items:center;display:grid}.cp-sign-in form{background:var(--cp-surface);border:1px solid var(--cp-line);border-radius:var(--cp-card-radius);gap:14px;width:min(400px,100%);margin:16px 0;padding:32px 24px;display:grid}.cp-sign-in h1{margin:8px 0 0;font-size:22px;font-weight:600}.cp-sign-in p{color:var(--cp-muted);margin:0}.cp-shell{max-width:640px;padding:env(safe-area-inset-top) 16px calc(24px + env(safe-area-inset-bottom));margin:0 auto}.cp-header{justify-content:space-between;align-items:center;padding:12px 0;display:flex}.cp-nav{background:var(--cp-surface);border:1px solid var(--cp-line);border-radius:var(--cp-card-radius);grid-auto-columns:1fr;grid-auto-flow:column;gap:4px;padding:4px;display:grid}.msm-customer .cp-nav button{white-space:nowrap;color:var(--cp-ink);background:0 0;padding:6px 2px;line-height:1.2}.msm-customer .cp-nav button[aria-current=page]{background:var(--cp-accent);color:var(--cp-accent-text)}.cp-main{padding-top:8px}.cp-screen{gap:12px;display:grid}.cp-screen h1{margin:12px 0 0;font-size:22px;font-weight:600}.msm-customer fieldset{min-width:0;margin:0}.cp-tabs{border:0;gap:8px;padding:0;display:flex}.msm-customer .cp-tabs button{background:var(--cp-surface);color:var(--cp-ink);border:1px solid var(--cp-control-line);flex:1}.msm-customer .cp-tabs button[aria-pressed=true]{border-color:var(--cp-accent);box-shadow:inset 0 0 0 1px var(--cp-accent)}.cp-list{gap:12px;margin:0;padding:0;list-style:none;display:grid}.cp-card{background:var(--cp-surface);border:1px solid var(--cp-line);border-radius:var(--cp-card-radius);gap:6px;padding:16px;display:grid}.cp-card p{margin:0}.cp-card-head{justify-content:space-between;align-items:start;gap:8px;display:flex}.cp-card h2{margin:0;font-size:17px;font-weight:600}.cp-badge{color:var(--cp-muted);background:#eef0ec;border-radius:999px;flex:none;padding:2px 8px;font-size:12px;font-weight:600}.cp-hint,.cp-empty{color:var(--cp-muted);margin:0;font-size:14px}.cp-credits{font-weight:600}.cp-confirm{border-radius:var(--cp-radius);background:#faf6ec;border:1px solid #eadfbf;gap:8px;padding:12px;display:grid}.cp-confirm legend{float:left;width:100%;padding:0;font-weight:600}.cp-warning{color:#7a4b00}.cp-actions{grid-template-columns:1fr 1fr;gap:8px;display:grid}.cp-actions>:only-child{grid-column:1/-1}.cp-form{gap:12px}.cp-form dl{grid-template-columns:max-content 1fr;gap:4px 16px;margin:0;display:grid}.cp-form dt{font-size:13px;font-weight:600}.cp-form dd{overflow-wrap:anywhere;margin:0}.cp-error{gap:8px;display:grid}.cp-business{gap:10px}.msm-customer .cp-business button{justify-self:start}.msm-customer button.cp-back{justify-self:start;min-height:0;padding:4px 0}.cp-business-head p{margin:0}.cp-chips{border:0;flex-wrap:wrap;gap:8px;padding:0;display:flex}.cp-chips legend{color:var(--cp-muted);margin-bottom:6px;padding:0;font-size:14px}.msm-customer .cp-chips button{background:var(--cp-surface);min-height:36px;color:var(--cp-ink);border:1px solid var(--cp-control-line);border-radius:999px;padding:6px 12px;font-weight:500}.msm-customer .cp-chips button[aria-pressed=true]{background:var(--cp-accent);color:var(--cp-accent-text);border-color:var(--cp-accent)}.cp-type h2{margin:0;font-size:17px;font-weight:600}.cp-type p{margin:0}.cp-week{text-align:center;border:0;grid-template-columns:44px 1fr 44px;align-items:center;gap:8px;padding:0;font-weight:600;display:grid}.msm-customer .cp-week button{padding:0;font-size:20px}.cp-day{gap:8px;display:grid}.cp-day h2{color:var(--cp-muted);margin:8px 0 0;font-size:15px;font-weight:600}.cp-candidate{grid-template-columns:auto 1fr auto;align-items:center;gap:4px 14px}.cp-time{font-variant-numeric:tabular-nums;white-space:nowrap;font-weight:650}.cp-candidate-body{min-width:0}.cp-candidate h3{margin:0;font-size:16px;font-weight:600}@media (width<=479px){.msm-customer .cp-nav button{font-size:14px}.cp-candidate{grid-template-columns:1fr auto}.cp-time{grid-column:1/-1}}.cp-summary{border-radius:var(--cp-radius);border:1px solid var(--cp-line);background:var(--cp-surface);gap:2px;padding:12px 14px;display:grid}.cp-summary h2{margin:0;font-size:17px;font-weight:600}.cp-summary p{color:var(--cp-ink);margin:0}.cp-summary p.cp-hint{color:var(--cp-muted)}@media (width<=359px){.msm-customer .cp-nav button{white-space:normal}}.cp-flow-head{justify-content:flex-end;padding-top:12px;display:flex}.msm-customer button.cp-option{text-align:left;background:var(--cp-surface);width:100%;color:var(--cp-ink);border:1px solid var(--cp-line);border-radius:var(--cp-card-radius);gap:4px;padding:14px 16px;display:grid}.msm-customer button.cp-option:hover{border-color:var(--cp-accent)}.cp-option strong{font-weight:600}.cp-option span{color:var(--cp-muted);font-weight:400}
2
2
  /*$vite$:1*/
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@msm-platform/customer-react",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "MSM's customer screens for React, and their server half for a partner's server",
5
5
  "license": "MIT",
6
6
  "repository": {