@riverbankcms/sdk 0.62.2 → 0.62.4
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/_dts/api/src/accessAdmin.d.ts +7 -0
- package/dist/_dts/api/src/bookingClosures.d.ts +106 -0
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +18 -0
- package/dist/_dts/api/src/bookingRecords.d.ts +1 -1
- package/dist/_dts/api/src/calendar.d.ts +11 -1
- package/dist/_dts/api/src/contentRuntime.d.ts +2 -0
- package/dist/_dts/api/src/contentVersionHistory.d.ts +52 -0
- package/dist/_dts/api/src/contentVersionHistoryClient.d.ts +45 -0
- package/dist/_dts/api/src/endpoints.d.ts +110 -6
- package/dist/_dts/api/src/index.d.ts +4 -1
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +31 -7
- package/dist/_dts/api/src/siteMembers.d.ts +10 -1
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +33 -12
- package/dist/_dts/api/src/types.d.ts +2 -1
- package/dist/_dts/api/src/url.d.ts +3 -3
- package/dist/_dts/blocks/src/bindings/index.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.client.state.d.ts +12 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/FieldValidationMessage.d.ts +19 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/TerminalPanel.d.ts +8 -2
- package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/shared/index.d.ts +2 -2
- package/dist/_dts/blocks/src/system/transforms/registry/_utils/themeColorResolution.d.ts +7 -0
- package/dist/_dts/content-editor/src/hooks/useDebouncedLatestSave.d.ts +24 -0
- package/dist/_dts/content-editor/src/index.d.ts +1 -0
- package/dist/_dts/content-editor/src/ui/stores/autosaveStore.d.ts +1 -0
- package/dist/_dts/content-editor/src/ui/stores/types.d.ts +1 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +208 -0
- package/dist/_dts/db/src/schemas/forms.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/blocks/BlockToolbar.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/blocks/composer/composePageFromBlocks.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/blocks/composer/index.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/blocks/composer/mergeDrafts.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/blocks/composer/types.d.ts +31 -8
- package/dist/_dts/preview-next/src/client/blocks/pageDesignRuntimePreview.d.ts +6 -5
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/aiProposalProjection.d.ts +7 -0
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/applyPreviewProjections.d.ts +7 -0
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/index.d.ts +4 -0
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/runtimeContentDecoration.d.ts +5 -0
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/types.d.ts +72 -0
- package/dist/_dts/preview-next/src/client/index.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/layout/PreviewLayoutContext.d.ts +6 -5
- package/dist/_dts/preview-next/src/client/preview/PageDesignEditorStateContext.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +11 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +9 -5
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +6 -1
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.d.ts +13 -2
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +7 -1
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeControlStyles.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeHistory.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeRuntimePatch.d.ts +9 -1
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeWorkflowState.d.ts +13 -0
- package/dist/_dts/preview-next/src/client/preview/sidebarTabPreference.d.ts +8 -2
- package/dist/_dts/preview-next/src/client/preview/siteChromeLookRows.d.ts +49 -0
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +3 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/surfaces/src/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/index.d.ts +1 -1
- package/dist/_dts/theme-core/src/palette/variants/types.d.ts +2 -21
- package/dist/_dts/theme-core/src/site-styles/appearancePresetCatalog.d.ts +3 -67
- package/dist/_dts/theme-core/src/site-styles/appearancePresetTypes.d.ts +4 -62
- package/dist/_dts/theme-core/src/site-styles/appearancePresets.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +24 -0
- package/dist/_dts/theme-core/src/site-styles/customizableSurfaces.d.ts +94 -0
- package/dist/_dts/theme-core/src/site-styles/footerLooks.d.ts +59 -0
- package/dist/_dts/theme-core/src/site-styles/generatedDesignPipeline.d.ts +4 -0
- package/dist/_dts/theme-core/src/site-styles/headerCtaVariants.d.ts +3 -0
- package/dist/_dts/theme-core/src/site-styles/headerLooks.d.ts +155 -0
- package/dist/_dts/theme-core/src/site-styles/headerOpeningSection.d.ts +15 -0
- package/dist/_dts/theme-core/src/site-styles/index.d.ts +6 -0
- package/dist/_dts/theme-core/src/site-styles/pageDesignAuthority.d.ts +7 -0
- package/dist/_dts/theme-core/src/site-styles/pageDesignEditorModel.d.ts +25 -0
- package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +15 -1
- package/dist/_dts/theme-core/src/site-styles/records.d.ts +1 -0
- package/dist/_dts/theme-core/src/site-styles/siteStyleBlockPolicies.d.ts +96 -0
- package/dist/_dts/theme-core/src/site-styles/types.d.ts +1 -2
- package/dist/_dts/theme-core/src/siteChrome.d.ts +44 -2
- package/dist/_dts/theme-core/src/tokens/colorTokenParts.d.ts +13 -0
- package/dist/_dts/theme-core/src/tokens/index.d.ts +2 -0
- package/dist/_dts/theme-core/src/tokens/themeColorTokens.d.ts +29 -0
- package/dist/_dts/theme-core/src/utils/tokenOrColor.d.ts +27 -1
- package/dist/cli/index.mjs +1139 -471
- package/dist/client/bookings.mjs +519 -368
- package/dist/client/client.mjs +4507 -3535
- package/dist/client/hooks.mjs +2634 -2035
- package/dist/client/rendering/client.mjs +4413 -3549
- package/dist/client/rendering/islands.mjs +3456 -2589
- package/dist/client/rendering.mjs +4921 -3949
- package/dist/preview-next/before-render.mjs +138 -6
- package/dist/preview-next/client/runtime.mjs +3541 -1573
- package/dist/preview-next/editor-base.css +31 -0
- package/dist/preview-next/middleware.mjs +131 -6
- package/dist/server/components.mjs +3214 -2560
- package/dist/server/config-validation.mjs +2859 -2260
- package/dist/server/config.mjs +2859 -2260
- package/dist/server/data.mjs +2634 -2035
- package/dist/server/index.mjs +132 -7
- package/dist/server/next.mjs +2983 -2329
- package/dist/server/page-converter.mjs +2478 -2029
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +3214 -2560
- package/dist/server/rendering.mjs +3233 -2579
- package/dist/server/routing.mjs +2725 -2028
- package/dist/server/server.mjs +2636 -2037
- package/dist/server/theme-bridge.mjs +1250 -767
- package/dist/server/theme.mjs +623 -498
- package/dist/styles/index.css +33 -0
- package/package.json +1 -1
- package/dist/_dts/blocks/src/system/transforms/registry/_utils/colorResolution.d.ts +0 -13
- package/dist/_dts/preview-next/src/client/blocks/overlay.d.ts +0 -30
- package/dist/_dts/theme-core/src/site-styles/siteChromeAppearancePresets.d.ts +0 -67
package/dist/client/bookings.mjs
CHANGED
|
@@ -86,7 +86,7 @@ function ze() {
|
|
|
86
86
|
/* @__PURE__ */ Te(P)
|
|
87
87
|
);
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function z12(e) {
|
|
90
90
|
if (L) {
|
|
91
91
|
if (/* @__PURE__ */ Te(P) !== null)
|
|
92
92
|
throw Tt(), Je;
|
|
@@ -2115,12 +2115,12 @@ function ha(e, t) {
|
|
|
2115
2115
|
var mt = we(Dr, 2);
|
|
2116
2116
|
let Pr;
|
|
2117
2117
|
var We = X(mt);
|
|
2118
|
-
en(We), We.__change = ui,
|
|
2118
|
+
en(We), We.__change = ui, z12(mt);
|
|
2119
2119
|
var Ut = we(mt, 2), wi = X(Ut);
|
|
2120
2120
|
{
|
|
2121
2121
|
var pi = (n) => {
|
|
2122
2122
|
var u = na(), _ = Gr(u), y = X(_);
|
|
2123
|
-
Ge(y, () => c(re).verified),
|
|
2123
|
+
Ge(y, () => c(re).verified), z12(_);
|
|
2124
2124
|
var T = we(_, 2);
|
|
2125
2125
|
en(T), Pe(() => {
|
|
2126
2126
|
se(T, "name", V()), jo(T, c(Le));
|
|
@@ -2129,10 +2129,10 @@ function ha(e, t) {
|
|
|
2129
2129
|
{
|
|
2130
2130
|
var _ = (T) => {
|
|
2131
2131
|
var E = ia(), p = X(E);
|
|
2132
|
-
Ge(p, () => c(re).verifying),
|
|
2132
|
+
Ge(p, () => c(re).verifying), z12(E), ne(T, E);
|
|
2133
2133
|
}, y = (T) => {
|
|
2134
2134
|
var E = oa(), p = X(E);
|
|
2135
|
-
Ge(p, () => c(re).label),
|
|
2135
|
+
Ge(p, () => c(re).label), z12(E), Pe(() => se(E, "for", c(cr))), ne(T, E);
|
|
2136
2136
|
};
|
|
2137
2137
|
$e(
|
|
2138
2138
|
n,
|
|
@@ -2147,18 +2147,18 @@ function ha(e, t) {
|
|
|
2147
2147
|
c(C) === b.VERIFIED ? n(pi) : n(bi, false);
|
|
2148
2148
|
});
|
|
2149
2149
|
}
|
|
2150
|
-
|
|
2150
|
+
z12(Ut);
|
|
2151
2151
|
var yi = we(Ut, 2);
|
|
2152
2152
|
{
|
|
2153
2153
|
var Ei = (n) => {
|
|
2154
2154
|
var u = aa(), _ = X(u);
|
|
2155
|
-
se(_, "href", sr),
|
|
2155
|
+
se(_, "href", sr), z12(u), Pe(() => se(_, "aria-label", c(re).ariaLinkLabel)), ne(n, u);
|
|
2156
2156
|
};
|
|
2157
2157
|
$e(yi, (n) => {
|
|
2158
2158
|
(N() !== true || c(Dt)) && n(Ei);
|
|
2159
2159
|
});
|
|
2160
2160
|
}
|
|
2161
|
-
|
|
2161
|
+
z12(Mt);
|
|
2162
2162
|
var Or = we(Mt, 2);
|
|
2163
2163
|
{
|
|
2164
2164
|
var xi = (n) => {
|
|
@@ -2166,16 +2166,16 @@ function ha(e, t) {
|
|
|
2166
2166
|
{
|
|
2167
2167
|
var y = (E) => {
|
|
2168
2168
|
var p = la(), x = X(p);
|
|
2169
|
-
Ge(x, () => c(re).expired),
|
|
2169
|
+
Ge(x, () => c(re).expired), z12(p), Pe(() => se(p, "title", c(He))), ne(E, p);
|
|
2170
2170
|
}, T = (E) => {
|
|
2171
2171
|
var p = sa(), x = X(p);
|
|
2172
|
-
Ge(x, () => c(re).error),
|
|
2172
|
+
Ge(x, () => c(re).error), z12(p), Pe(() => se(p, "title", c(He))), ne(E, p);
|
|
2173
2173
|
};
|
|
2174
2174
|
$e(_, (E) => {
|
|
2175
2175
|
c(C) === b.EXPIRED ? E(y) : E(T, false);
|
|
2176
2176
|
});
|
|
2177
2177
|
}
|
|
2178
|
-
|
|
2178
|
+
z12(u), ne(n, u);
|
|
2179
2179
|
};
|
|
2180
2180
|
$e(Or, (n) => {
|
|
2181
2181
|
(c(He) || c(C) === b.EXPIRED) && n(xi);
|
|
@@ -2185,7 +2185,7 @@ function ha(e, t) {
|
|
|
2185
2185
|
{
|
|
2186
2186
|
var $i = (n) => {
|
|
2187
2187
|
var u = ua(), _ = X(u), y = X(_);
|
|
2188
|
-
Ge(y, () => c(re).footer),
|
|
2188
|
+
Ge(y, () => c(re).footer), z12(_), z12(u), ne(n, u);
|
|
2189
2189
|
};
|
|
2190
2190
|
$e(Fr, (n) => {
|
|
2191
2191
|
c(re).footer && (k() !== true || c(Dt)) && n($i);
|
|
@@ -2201,7 +2201,7 @@ function ha(e, t) {
|
|
|
2201
2201
|
v() && n(Ci);
|
|
2202
2202
|
});
|
|
2203
2203
|
}
|
|
2204
|
-
return
|
|
2204
|
+
return z12(ot), nn(ot, (n) => D(B, n), () => c(B)), Pe(
|
|
2205
2205
|
(n) => {
|
|
2206
2206
|
se(ot, "data-state", c(C)), se(ot, "data-floating", v()), Pr = Fo(mt, 1, "altcha-checkbox", null, Pr, n), se(We, "id", c(cr)), We.required = r2() !== "onsubmit" && (!v() || r2() !== "off");
|
|
2207
2207
|
},
|
|
@@ -2806,8 +2806,139 @@ function clsx() {
|
|
|
2806
2806
|
}
|
|
2807
2807
|
var clsx_default = clsx;
|
|
2808
2808
|
|
|
2809
|
+
// ../theme-core/src/tokens/colorTokenParts.ts
|
|
2810
|
+
function parseOpacityPercent(source) {
|
|
2811
|
+
const trimmed = source.trim();
|
|
2812
|
+
if (!trimmed) return null;
|
|
2813
|
+
if (!/^\d{1,3}(?:\.\d+)?$/.test(trimmed)) return null;
|
|
2814
|
+
const value = Number(trimmed);
|
|
2815
|
+
if (!Number.isFinite(value)) return null;
|
|
2816
|
+
if (value < 0 || value > 100) return null;
|
|
2817
|
+
return value;
|
|
2818
|
+
}
|
|
2819
|
+
function parseColorTokenParts(source) {
|
|
2820
|
+
const trimmed = source.trim();
|
|
2821
|
+
if (trimmed.startsWith("raw:")) {
|
|
2822
|
+
return { kind: "raw", value: trimmed.slice(4) };
|
|
2823
|
+
}
|
|
2824
|
+
const [token, opacityRaw, extra] = trimmed.split("/");
|
|
2825
|
+
if (!token || extra !== void 0) {
|
|
2826
|
+
return { kind: "invalid", token: trimmed };
|
|
2827
|
+
}
|
|
2828
|
+
if (opacityRaw === void 0) {
|
|
2829
|
+
return { kind: "token", token, opacityPercent: null };
|
|
2830
|
+
}
|
|
2831
|
+
const opacityPercent = parseOpacityPercent(opacityRaw);
|
|
2832
|
+
if (opacityPercent === null) {
|
|
2833
|
+
return { kind: "invalid", token: trimmed };
|
|
2834
|
+
}
|
|
2835
|
+
return { kind: "token", token, opacityPercent };
|
|
2836
|
+
}
|
|
2837
|
+
|
|
2809
2838
|
// ../theme-core/src/buttons/types.ts
|
|
2839
|
+
import { z as z2 } from "zod";
|
|
2840
|
+
|
|
2841
|
+
// ../theme-core/src/tokens/themeColorTokens.ts
|
|
2810
2842
|
import { z } from "zod";
|
|
2843
|
+
|
|
2844
|
+
// ../theme-core/src/tokens/blockColorTokens.ts
|
|
2845
|
+
var blockColorTokenNames = [
|
|
2846
|
+
"text",
|
|
2847
|
+
"heading",
|
|
2848
|
+
"mutedText",
|
|
2849
|
+
"surface",
|
|
2850
|
+
"background",
|
|
2851
|
+
"foreground",
|
|
2852
|
+
"border",
|
|
2853
|
+
"primary",
|
|
2854
|
+
"secondary",
|
|
2855
|
+
"accent",
|
|
2856
|
+
"success",
|
|
2857
|
+
"warning",
|
|
2858
|
+
"info",
|
|
2859
|
+
"error",
|
|
2860
|
+
"destructive",
|
|
2861
|
+
"scrim",
|
|
2862
|
+
"shadow",
|
|
2863
|
+
// Common "on*" tokens used when rendering colored chips/badges.
|
|
2864
|
+
"onPrimary",
|
|
2865
|
+
"onSecondary",
|
|
2866
|
+
"onAccent",
|
|
2867
|
+
"onSuccess",
|
|
2868
|
+
"onWarning",
|
|
2869
|
+
"onInfo",
|
|
2870
|
+
"onError",
|
|
2871
|
+
"onDestructive",
|
|
2872
|
+
"onSurface"
|
|
2873
|
+
];
|
|
2874
|
+
var blockColorTokenNameSet = new Set(
|
|
2875
|
+
blockColorTokenNames
|
|
2876
|
+
);
|
|
2877
|
+
|
|
2878
|
+
// ../theme-core/src/tokens/themeColorTokens.ts
|
|
2879
|
+
var PALETTE_TOKEN_NAMES = [
|
|
2880
|
+
"primary",
|
|
2881
|
+
"primaryForeground",
|
|
2882
|
+
"secondary",
|
|
2883
|
+
"accent",
|
|
2884
|
+
"success",
|
|
2885
|
+
"warning",
|
|
2886
|
+
"destructive",
|
|
2887
|
+
"background",
|
|
2888
|
+
"surface",
|
|
2889
|
+
"surfaceAlt",
|
|
2890
|
+
"muted",
|
|
2891
|
+
"text",
|
|
2892
|
+
"border"
|
|
2893
|
+
];
|
|
2894
|
+
var paletteTokenNameSchema = z.enum(PALETTE_TOKEN_NAMES);
|
|
2895
|
+
var themeColorBaseTokenNames = [
|
|
2896
|
+
...PALETTE_TOKEN_NAMES,
|
|
2897
|
+
...blockColorTokenNames,
|
|
2898
|
+
// Existing generated themes can carry palette-local "white" tokens in
|
|
2899
|
+
// token-only component fields. Keep it explicit until those rows are
|
|
2900
|
+
// migrated to canonical foreground/background roles.
|
|
2901
|
+
"white",
|
|
2902
|
+
"neutral",
|
|
2903
|
+
"primaryText",
|
|
2904
|
+
"secondaryForeground",
|
|
2905
|
+
"accentForeground"
|
|
2906
|
+
];
|
|
2907
|
+
var themeColorBaseTokenSet = new Set(themeColorBaseTokenNames);
|
|
2908
|
+
var SHADE_STEPS = [
|
|
2909
|
+
"50",
|
|
2910
|
+
"100",
|
|
2911
|
+
"200",
|
|
2912
|
+
"300",
|
|
2913
|
+
"400",
|
|
2914
|
+
"500",
|
|
2915
|
+
"600",
|
|
2916
|
+
"700",
|
|
2917
|
+
"800",
|
|
2918
|
+
"900",
|
|
2919
|
+
"950"
|
|
2920
|
+
];
|
|
2921
|
+
var shadeStepSet = new Set(SHADE_STEPS);
|
|
2922
|
+
function isKnownBaseToken(value) {
|
|
2923
|
+
return themeColorBaseTokenSet.has(value);
|
|
2924
|
+
}
|
|
2925
|
+
function isKnownShadeToken(value) {
|
|
2926
|
+
const match = value.match(/^([a-zA-Z][a-zA-Z0-9]*)(?:-([0-9]{2,3}))$/);
|
|
2927
|
+
if (!match) return false;
|
|
2928
|
+
const [, base, shade] = match;
|
|
2929
|
+
return Boolean(base && shade && isKnownBaseToken(base) && shadeStepSet.has(shade));
|
|
2930
|
+
}
|
|
2931
|
+
function isThemeColorTokenBase(value) {
|
|
2932
|
+
return isKnownBaseToken(value) || isKnownShadeToken(value);
|
|
2933
|
+
}
|
|
2934
|
+
function isThemeColorToken(value) {
|
|
2935
|
+
if (typeof value !== "string") return false;
|
|
2936
|
+
const parts = parseColorTokenParts(value);
|
|
2937
|
+
return parts.kind === "token" && isThemeColorTokenBase(parts.token);
|
|
2938
|
+
}
|
|
2939
|
+
var themeColorTokenSchema = z.string().min(1).refine((value) => Boolean(isThemeColorToken(value)), "Expected a known Theme V2 color token");
|
|
2940
|
+
|
|
2941
|
+
// ../theme-core/src/buttons/types.ts
|
|
2811
2942
|
var VARIANT_ROLES = [
|
|
2812
2943
|
"primary",
|
|
2813
2944
|
"secondary",
|
|
@@ -2818,22 +2949,22 @@ var VARIANT_ROLES = [
|
|
|
2818
2949
|
"accent"
|
|
2819
2950
|
];
|
|
2820
2951
|
var DEFAULT_VARIANT_ALIAS_ID = "default";
|
|
2821
|
-
var cornerStyleSchema =
|
|
2822
|
-
var shadowSizeSchema =
|
|
2823
|
-
var textTransformSchema =
|
|
2824
|
-
var fontWeightSchema =
|
|
2825
|
-
var buttonTypographySchema =
|
|
2826
|
-
var letterSpacingSchema =
|
|
2827
|
-
var hoverTransformSchema =
|
|
2828
|
-
var hoverColorSchema =
|
|
2829
|
-
var buttonPaddingPresetSchema =
|
|
2830
|
-
var gradientStyleSchema =
|
|
2831
|
-
var gradientSharpnessSchema =
|
|
2832
|
-
var prioritySchema =
|
|
2833
|
-
var variantRoleSchema =
|
|
2834
|
-
var buttonSizeNameSchema =
|
|
2952
|
+
var cornerStyleSchema = z2.enum(["square", "rounded", "pill"]);
|
|
2953
|
+
var shadowSizeSchema = z2.enum(["none", "low", "medium", "high"]);
|
|
2954
|
+
var textTransformSchema = z2.enum(["none", "uppercase", "lowercase", "capitalize"]);
|
|
2955
|
+
var fontWeightSchema = z2.union([z2.literal(500), z2.literal(600), z2.literal(700)]);
|
|
2956
|
+
var buttonTypographySchema = z2.enum(["body", "heading"]);
|
|
2957
|
+
var letterSpacingSchema = z2.enum(["tight", "normal", "loose"]);
|
|
2958
|
+
var hoverTransformSchema = z2.enum(["none", "lift", "scale", "press"]);
|
|
2959
|
+
var hoverColorSchema = z2.enum(["none", "brighten", "darken", "saturate", "token"]);
|
|
2960
|
+
var buttonPaddingPresetSchema = z2.enum(["compact", "default", "spacious"]);
|
|
2961
|
+
var gradientStyleSchema = z2.enum(["linear", "radial", "conic"]);
|
|
2962
|
+
var gradientSharpnessSchema = z2.enum(["smooth", "medium", "hard"]);
|
|
2963
|
+
var prioritySchema = z2.union([z2.literal(1), z2.literal(2), z2.literal(3)]);
|
|
2964
|
+
var variantRoleSchema = z2.enum(VARIANT_ROLES);
|
|
2965
|
+
var buttonSizeNameSchema = z2.enum(["sm", "md", "lg", "xl"]);
|
|
2835
2966
|
var PADDING_TOKEN_PATTERN = /^(?:0|\d+(?:\.\d+)?(?:rem|em|px|%))$/;
|
|
2836
|
-
var paddingShorthandSchema =
|
|
2967
|
+
var paddingShorthandSchema = z2.string().refine(
|
|
2837
2968
|
(value) => {
|
|
2838
2969
|
const parts = value.split(/\s+/).filter(Boolean);
|
|
2839
2970
|
return parts.length === 2 && parts.every((token) => PADDING_TOKEN_PATTERN.test(token));
|
|
@@ -2842,11 +2973,11 @@ var paddingShorthandSchema = z.string().refine(
|
|
|
2842
2973
|
message: 'Padding must be two space-separated CSS length tokens (e.g. "0.5rem 1rem"). Use `0` for zero.'
|
|
2843
2974
|
}
|
|
2844
2975
|
);
|
|
2845
|
-
var buttonSizeConfigSchema =
|
|
2976
|
+
var buttonSizeConfigSchema = z2.object({
|
|
2846
2977
|
padding: paddingShorthandSchema,
|
|
2847
|
-
fontSize:
|
|
2978
|
+
fontSize: z2.string().optional()
|
|
2848
2979
|
});
|
|
2849
|
-
var buttonSizesSchema =
|
|
2980
|
+
var buttonSizesSchema = z2.object({
|
|
2850
2981
|
sm: buttonSizeConfigSchema,
|
|
2851
2982
|
md: buttonSizeConfigSchema,
|
|
2852
2983
|
lg: buttonSizeConfigSchema,
|
|
@@ -2857,9 +2988,9 @@ var buttonSizesSchema = z.object({
|
|
|
2857
2988
|
lg,
|
|
2858
2989
|
xl: xl ?? lg
|
|
2859
2990
|
}));
|
|
2860
|
-
var buttonGlobalSettingsSchema =
|
|
2991
|
+
var buttonGlobalSettingsSchema = z2.object({
|
|
2861
2992
|
cornerStyle: cornerStyleSchema,
|
|
2862
|
-
cornerRadius:
|
|
2993
|
+
cornerRadius: z2.number().min(0).max(24).optional(),
|
|
2863
2994
|
shadow: shadowSizeSchema,
|
|
2864
2995
|
textTransform: textTransformSchema,
|
|
2865
2996
|
fontWeight: fontWeightSchema,
|
|
@@ -2869,88 +3000,88 @@ var buttonGlobalSettingsSchema = z.object({
|
|
|
2869
3000
|
* by the current generator and will be removed once the legacy
|
|
2870
3001
|
* `primitives/content/components/Button.tsx` slot exports are deleted.
|
|
2871
3002
|
*/
|
|
2872
|
-
borderWidth:
|
|
3003
|
+
borderWidth: z2.union([z2.literal(1), z2.literal(2), z2.literal(3)]),
|
|
2873
3004
|
// === Family-level typography ===
|
|
2874
3005
|
// Typography source (body or heading) — selects which theme typography pool to inherit
|
|
2875
3006
|
typography: buttonTypographySchema.optional(),
|
|
2876
3007
|
// Font size for all variants in the family (Tailwind token, e.g. "text-xs", "text-sm")
|
|
2877
3008
|
// Sized variants get this as default; fixed variants inherit unless they override.
|
|
2878
3009
|
// Size class CSS may still override at run time for sized variants.
|
|
2879
|
-
fontSize:
|
|
3010
|
+
fontSize: z2.string().optional(),
|
|
2880
3011
|
// Letter spacing applied to all variants
|
|
2881
3012
|
letterSpacing: letterSpacingSchema.optional(),
|
|
2882
3013
|
// Italic style
|
|
2883
|
-
italic:
|
|
3014
|
+
italic: z2.boolean().optional(),
|
|
2884
3015
|
// Padding preset (applies to sized variants without a sizes config)
|
|
2885
3016
|
paddingPreset: buttonPaddingPresetSchema.optional(),
|
|
2886
3017
|
hoverTransform: hoverTransformSchema,
|
|
2887
3018
|
hoverColor: hoverColorSchema,
|
|
2888
3019
|
// When hoverColor is 'token', this specifies which token to use
|
|
2889
|
-
hoverColorToken:
|
|
3020
|
+
hoverColorToken: themeColorTokenSchema.optional(),
|
|
2890
3021
|
// Gradient settings (if any variant uses gradients)
|
|
2891
3022
|
gradientStyle: gradientStyleSchema.optional(),
|
|
2892
|
-
gradientAngle:
|
|
3023
|
+
gradientAngle: z2.number().min(0).max(360).optional(),
|
|
2893
3024
|
gradientSharpness: gradientSharpnessSchema.optional()
|
|
2894
3025
|
});
|
|
2895
|
-
var gradientDirectionSchema =
|
|
2896
|
-
var buttonBackgroundSchema =
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
type:
|
|
2900
|
-
stops:
|
|
3026
|
+
var gradientDirectionSchema = z2.enum(["to-r", "to-l", "to-t", "to-b", "to-tr", "to-tl", "to-br", "to-bl"]);
|
|
3027
|
+
var buttonBackgroundSchema = z2.discriminatedUnion("type", [
|
|
3028
|
+
z2.object({ type: z2.literal("solid"), colorToken: themeColorTokenSchema }),
|
|
3029
|
+
z2.object({
|
|
3030
|
+
type: z2.literal("gradient"),
|
|
3031
|
+
stops: z2.array(themeColorTokenSchema).min(2),
|
|
2901
3032
|
direction: gradientDirectionSchema
|
|
2902
3033
|
}),
|
|
2903
|
-
|
|
3034
|
+
z2.object({ type: z2.literal("transparent") })
|
|
2904
3035
|
]);
|
|
2905
|
-
var effectApplicationSchema =
|
|
2906
|
-
effectId:
|
|
2907
|
-
options:
|
|
3036
|
+
var effectApplicationSchema = z2.object({
|
|
3037
|
+
effectId: z2.string(),
|
|
3038
|
+
options: z2.record(z2.string(), z2.any()).optional()
|
|
2908
3039
|
});
|
|
2909
|
-
var buttonBorderSchema =
|
|
2910
|
-
widthClass:
|
|
2911
|
-
colorToken:
|
|
3040
|
+
var buttonBorderSchema = z2.object({
|
|
3041
|
+
widthClass: z2.string(),
|
|
3042
|
+
colorToken: themeColorTokenSchema
|
|
2912
3043
|
});
|
|
2913
|
-
var variantShadowSchema =
|
|
2914
|
-
elevation:
|
|
2915
|
-
softness:
|
|
2916
|
-
position:
|
|
3044
|
+
var variantShadowSchema = z2.object({
|
|
3045
|
+
elevation: z2.enum(["none", "low", "medium", "high"]),
|
|
3046
|
+
softness: z2.enum(["crisp", "soft", "hard"]).nullable(),
|
|
3047
|
+
position: z2.enum(["bottom", "bottom-right"]).default("bottom")
|
|
2917
3048
|
});
|
|
2918
|
-
var variantEffectsSchema =
|
|
2919
|
-
base:
|
|
2920
|
-
hover:
|
|
2921
|
-
active:
|
|
2922
|
-
focus:
|
|
3049
|
+
var variantEffectsSchema = z2.object({
|
|
3050
|
+
base: z2.array(effectApplicationSchema).optional(),
|
|
3051
|
+
hover: z2.array(effectApplicationSchema).optional(),
|
|
3052
|
+
active: z2.array(effectApplicationSchema).optional(),
|
|
3053
|
+
focus: z2.array(effectApplicationSchema).optional()
|
|
2923
3054
|
});
|
|
2924
|
-
var variantSizeOverridesSchema =
|
|
3055
|
+
var variantSizeOverridesSchema = z2.object({
|
|
2925
3056
|
sm: buttonSizeConfigSchema.optional(),
|
|
2926
3057
|
md: buttonSizeConfigSchema.optional(),
|
|
2927
3058
|
lg: buttonSizeConfigSchema.optional(),
|
|
2928
3059
|
xl: buttonSizeConfigSchema.optional()
|
|
2929
3060
|
});
|
|
2930
|
-
var buttonVariantSchema =
|
|
2931
|
-
id:
|
|
2932
|
-
name:
|
|
2933
|
-
enabled:
|
|
3061
|
+
var buttonVariantSchema = z2.object({
|
|
3062
|
+
id: z2.string(),
|
|
3063
|
+
name: z2.string().min(1).max(20),
|
|
3064
|
+
enabled: z2.boolean(),
|
|
2934
3065
|
priority: prioritySchema,
|
|
2935
3066
|
// Base appearance (token-based)
|
|
2936
3067
|
background: buttonBackgroundSchema,
|
|
2937
|
-
textColorToken:
|
|
3068
|
+
textColorToken: themeColorTokenSchema,
|
|
2938
3069
|
/** Tailwind radius token (e.g. `'rounded-md'`). Omit to inherit from `global.cornerStyle`. */
|
|
2939
|
-
borderRadius:
|
|
3070
|
+
borderRadius: z2.string().optional(),
|
|
2940
3071
|
// Optional shadow override (uses theme.shadow if not specified)
|
|
2941
3072
|
shadow: variantShadowSchema.optional(),
|
|
2942
3073
|
// Border (optional)
|
|
2943
3074
|
border: buttonBorderSchema.optional(),
|
|
2944
3075
|
// Hover background token (per-variant override, takes precedence over global hoverColorToken)
|
|
2945
|
-
hoverBackgroundToken:
|
|
3076
|
+
hoverBackgroundToken: z2.string().optional(),
|
|
2946
3077
|
// Effect composition
|
|
2947
3078
|
effects: variantEffectsSchema.optional(),
|
|
2948
3079
|
// Per-variant size overrides — see VariantSizeOverrides
|
|
2949
3080
|
sizes: variantSizeOverridesSchema.optional()
|
|
2950
3081
|
});
|
|
2951
|
-
var buttonSystemSchema =
|
|
3082
|
+
var buttonSystemSchema = z2.object({
|
|
2952
3083
|
global: buttonGlobalSettingsSchema,
|
|
2953
|
-
variants:
|
|
3084
|
+
variants: z2.array(buttonVariantSchema).min(1).max(6),
|
|
2954
3085
|
sizes: buttonSizesSchema.optional()
|
|
2955
3086
|
});
|
|
2956
3087
|
|
|
@@ -2977,21 +3108,21 @@ function themeButtonClassName(spec) {
|
|
|
2977
3108
|
var BUTTON_SIZE_NAMES = buttonSizeNameSchema.options;
|
|
2978
3109
|
|
|
2979
3110
|
// ../theme-core/src/buttons/personalities/types.ts
|
|
2980
|
-
import { z as
|
|
3111
|
+
import { z as z4 } from "zod";
|
|
2981
3112
|
|
|
2982
3113
|
// ../theme-core/src/site-styles/styleTags.ts
|
|
2983
|
-
import { z as
|
|
3114
|
+
import { z as z3 } from "zod";
|
|
2984
3115
|
var STYLE_AXIS_VALUES = {
|
|
2985
3116
|
tone: ["minimal", "classic", "bold"],
|
|
2986
3117
|
energy: ["calm", "vibrant"],
|
|
2987
3118
|
motion: ["subtle", "standard", "expressive"],
|
|
2988
3119
|
era: ["editorial", "modern", "organic", "technical", "retro"]
|
|
2989
3120
|
};
|
|
2990
|
-
var styleTagsSchema =
|
|
2991
|
-
tone:
|
|
2992
|
-
energy:
|
|
2993
|
-
motion:
|
|
2994
|
-
era:
|
|
3121
|
+
var styleTagsSchema = z3.object({
|
|
3122
|
+
tone: z3.enum(STYLE_AXIS_VALUES.tone).optional(),
|
|
3123
|
+
energy: z3.enum(STYLE_AXIS_VALUES.energy).optional(),
|
|
3124
|
+
motion: z3.enum(STYLE_AXIS_VALUES.motion).optional(),
|
|
3125
|
+
era: z3.enum(STYLE_AXIS_VALUES.era).optional()
|
|
2995
3126
|
});
|
|
2996
3127
|
|
|
2997
3128
|
// ../theme-core/src/buttons/personalities/types.ts
|
|
@@ -3001,11 +3132,11 @@ function asButtonPersonalityId(value) {
|
|
|
3001
3132
|
}
|
|
3002
3133
|
return value;
|
|
3003
3134
|
}
|
|
3004
|
-
var buttonPersonalityIdSchema =
|
|
3005
|
-
var buttonPersonalitySchema =
|
|
3135
|
+
var buttonPersonalityIdSchema = z4.string().min(1).transform((value) => asButtonPersonalityId(value));
|
|
3136
|
+
var buttonPersonalitySchema = z4.object({
|
|
3006
3137
|
id: buttonPersonalityIdSchema,
|
|
3007
|
-
name:
|
|
3008
|
-
description:
|
|
3138
|
+
name: z4.string().min(1),
|
|
3139
|
+
description: z4.string().min(1),
|
|
3009
3140
|
tags: styleTagsSchema,
|
|
3010
3141
|
buttonSystem: buttonSystemSchema
|
|
3011
3142
|
});
|
|
@@ -3859,8 +3990,8 @@ function addLocalScheduleDays(date, days) {
|
|
|
3859
3990
|
}
|
|
3860
3991
|
|
|
3861
3992
|
// ../theme-core/src/accordions/types.ts
|
|
3862
|
-
import { z as
|
|
3863
|
-
var accordionIconSchema =
|
|
3993
|
+
import { z as z5 } from "zod";
|
|
3994
|
+
var accordionIconSchema = z5.enum([
|
|
3864
3995
|
"plus-minus",
|
|
3865
3996
|
// + becomes - (swap or rotate 90°)
|
|
3866
3997
|
"chevron",
|
|
@@ -3872,49 +4003,49 @@ var accordionIconSchema = z4.enum([
|
|
|
3872
4003
|
"circle-plus-minus"
|
|
3873
4004
|
// ⊕ becomes ⊖ (swap with fade)
|
|
3874
4005
|
]);
|
|
3875
|
-
var accordionSystemSchema =
|
|
4006
|
+
var accordionSystemSchema = z5.object({
|
|
3876
4007
|
// Visual styling (solid color only - gradients can be added later if needed)
|
|
3877
|
-
background:
|
|
3878
|
-
type:
|
|
3879
|
-
colorToken:
|
|
4008
|
+
background: z5.object({
|
|
4009
|
+
type: z5.literal("solid"),
|
|
4010
|
+
colorToken: themeColorTokenSchema
|
|
3880
4011
|
}),
|
|
3881
4012
|
// Spacing (padding inside items)
|
|
3882
|
-
spacing:
|
|
4013
|
+
spacing: z5.enum(["none", "compact", "cozy", "medium", "comfortable", "spacious"]),
|
|
3883
4014
|
// Border radius (null = inherit from theme.corners)
|
|
3884
|
-
corners:
|
|
4015
|
+
corners: z5.enum(["square", "soft", "rounded", "pill"]).nullable(),
|
|
3885
4016
|
// Border styling (null = inherit from theme.border)
|
|
3886
|
-
border:
|
|
3887
|
-
widthClass:
|
|
4017
|
+
border: z5.object({
|
|
4018
|
+
widthClass: z5.string(),
|
|
3888
4019
|
// e.g., 'border', 'border-2', 'border-0'
|
|
3889
|
-
colorToken:
|
|
4020
|
+
colorToken: themeColorTokenSchema
|
|
3890
4021
|
}).nullable(),
|
|
3891
4022
|
// Shadow (null = inherit from theme.shadow)
|
|
3892
|
-
shadow:
|
|
3893
|
-
elevation:
|
|
3894
|
-
softness:
|
|
3895
|
-
position:
|
|
4023
|
+
shadow: z5.object({
|
|
4024
|
+
elevation: z5.enum(["none", "low", "medium", "high"]),
|
|
4025
|
+
softness: z5.enum(["soft", "crisp", "hard"]).nullable(),
|
|
4026
|
+
position: z5.enum(["bottom", "bottom-right"])
|
|
3896
4027
|
}).nullable(),
|
|
3897
4028
|
// Icon style and animation
|
|
3898
|
-
icon:
|
|
4029
|
+
icon: z5.object({
|
|
3899
4030
|
style: accordionIconSchema,
|
|
3900
|
-
position:
|
|
3901
|
-
size:
|
|
4031
|
+
position: z5.enum(["left", "right"]),
|
|
4032
|
+
size: z5.enum(["sm", "md", "lg"])
|
|
3902
4033
|
}),
|
|
3903
4034
|
// Trigger (question) styling
|
|
3904
|
-
trigger:
|
|
3905
|
-
textColorToken:
|
|
3906
|
-
fontWeight:
|
|
4035
|
+
trigger: z5.object({
|
|
4036
|
+
textColorToken: themeColorTokenSchema,
|
|
4037
|
+
fontWeight: z5.enum(["regular", "medium", "semibold", "bold"]).nullable()
|
|
3907
4038
|
// null = inherit from theme
|
|
3908
4039
|
}),
|
|
3909
4040
|
// Hover state styling
|
|
3910
|
-
hover:
|
|
3911
|
-
backgroundColorToken:
|
|
3912
|
-
textColorToken:
|
|
3913
|
-
borderColorToken:
|
|
4041
|
+
hover: z5.object({
|
|
4042
|
+
backgroundColorToken: themeColorTokenSchema.optional(),
|
|
4043
|
+
textColorToken: themeColorTokenSchema.optional(),
|
|
4044
|
+
borderColorToken: themeColorTokenSchema.optional()
|
|
3914
4045
|
}),
|
|
3915
4046
|
// Content (answer) styling
|
|
3916
|
-
content:
|
|
3917
|
-
textColorToken:
|
|
4047
|
+
content: z5.object({
|
|
4048
|
+
textColorToken: themeColorTokenSchema
|
|
3918
4049
|
})
|
|
3919
4050
|
});
|
|
3920
4051
|
|
|
@@ -4398,116 +4529,116 @@ function getBookingSuccessMessage(successMessage) {
|
|
|
4398
4529
|
}
|
|
4399
4530
|
|
|
4400
4531
|
// ../theme-core/src/inputs/types.ts
|
|
4401
|
-
import { z as
|
|
4402
|
-
var inputSystemSchema =
|
|
4532
|
+
import { z as z6 } from "zod";
|
|
4533
|
+
var inputSystemSchema = z6.object({
|
|
4403
4534
|
// Base styling (applied to all inputs)
|
|
4404
|
-
base:
|
|
4405
|
-
background:
|
|
4406
|
-
|
|
4407
|
-
type:
|
|
4408
|
-
colorToken:
|
|
4535
|
+
base: z6.object({
|
|
4536
|
+
background: z6.union([
|
|
4537
|
+
z6.object({
|
|
4538
|
+
type: z6.literal("solid"),
|
|
4539
|
+
colorToken: themeColorTokenSchema
|
|
4409
4540
|
}),
|
|
4410
|
-
|
|
4411
|
-
type:
|
|
4541
|
+
z6.object({
|
|
4542
|
+
type: z6.literal("transparent")
|
|
4412
4543
|
})
|
|
4413
4544
|
]),
|
|
4414
|
-
textColorToken:
|
|
4415
|
-
border:
|
|
4416
|
-
widthClass:
|
|
4545
|
+
textColorToken: themeColorTokenSchema,
|
|
4546
|
+
border: z6.object({
|
|
4547
|
+
widthClass: z6.string(),
|
|
4417
4548
|
// e.g., 'border', 'border-2'
|
|
4418
|
-
colorToken:
|
|
4419
|
-
style:
|
|
4549
|
+
colorToken: themeColorTokenSchema,
|
|
4550
|
+
style: z6.enum(["all", "underline"]).optional()
|
|
4420
4551
|
}),
|
|
4421
|
-
corners:
|
|
4552
|
+
corners: z6.enum(["square", "soft", "rounded", "pill"]).nullable(),
|
|
4422
4553
|
// null = inherit from theme.corners
|
|
4423
|
-
shadow:
|
|
4424
|
-
elevation:
|
|
4425
|
-
softness:
|
|
4554
|
+
shadow: z6.object({
|
|
4555
|
+
elevation: z6.enum(["none", "low", "medium"]),
|
|
4556
|
+
softness: z6.enum(["soft", "crisp", "hard"]).nullable()
|
|
4426
4557
|
}).nullable(),
|
|
4427
|
-
spacing:
|
|
4558
|
+
spacing: z6.enum(["compact", "cozy", "medium", "comfortable"]),
|
|
4428
4559
|
// padding inside inputs
|
|
4429
|
-
fontSize:
|
|
4560
|
+
fontSize: z6.enum(["sm", "base", "lg"])
|
|
4430
4561
|
}),
|
|
4431
4562
|
// Label styling
|
|
4432
|
-
label:
|
|
4433
|
-
textColorToken:
|
|
4434
|
-
fontWeight:
|
|
4435
|
-
fontSize:
|
|
4436
|
-
textTransform:
|
|
4437
|
-
letterSpacing:
|
|
4438
|
-
opacity:
|
|
4563
|
+
label: z6.object({
|
|
4564
|
+
textColorToken: themeColorTokenSchema,
|
|
4565
|
+
fontWeight: z6.enum(["regular", "medium", "semibold", "bold", "black"]),
|
|
4566
|
+
fontSize: z6.enum(["2xs", "xs", "sm", "base"]),
|
|
4567
|
+
textTransform: z6.enum(["none", "uppercase", "lowercase", "capitalize"]).optional(),
|
|
4568
|
+
letterSpacing: z6.enum(["normal", "wide", "wider", "widest"]).optional(),
|
|
4569
|
+
opacity: z6.number().min(0.2).max(1).optional()
|
|
4439
4570
|
}),
|
|
4440
4571
|
// Focus state
|
|
4441
|
-
focus:
|
|
4442
|
-
ringColorToken:
|
|
4443
|
-
ringWidth:
|
|
4444
|
-
borderColorToken:
|
|
4572
|
+
focus: z6.object({
|
|
4573
|
+
ringColorToken: themeColorTokenSchema,
|
|
4574
|
+
ringWidth: z6.enum(["0", "1", "2", "3"]),
|
|
4575
|
+
borderColorToken: themeColorTokenSchema.optional()
|
|
4445
4576
|
// Change border color on focus
|
|
4446
4577
|
}),
|
|
4447
4578
|
// Error state (for validation feedback)
|
|
4448
|
-
error:
|
|
4449
|
-
borderColorToken:
|
|
4450
|
-
textColorToken:
|
|
4579
|
+
error: z6.object({
|
|
4580
|
+
borderColorToken: themeColorTokenSchema,
|
|
4581
|
+
textColorToken: themeColorTokenSchema
|
|
4451
4582
|
}),
|
|
4452
4583
|
// Disabled state
|
|
4453
|
-
disabled:
|
|
4454
|
-
backgroundColorToken:
|
|
4455
|
-
textColorToken:
|
|
4456
|
-
opacity:
|
|
4584
|
+
disabled: z6.object({
|
|
4585
|
+
backgroundColorToken: themeColorTokenSchema,
|
|
4586
|
+
textColorToken: themeColorTokenSchema,
|
|
4587
|
+
opacity: z6.number().min(0.3).max(0.7)
|
|
4457
4588
|
})
|
|
4458
4589
|
});
|
|
4459
4590
|
|
|
4460
4591
|
// ../theme-core/src/navigation/types.ts
|
|
4461
|
-
import { z as
|
|
4592
|
+
import { z as z8 } from "zod";
|
|
4462
4593
|
|
|
4463
4594
|
// ../theme-core/src/interactive/baseSchema.ts
|
|
4464
|
-
import { z as
|
|
4465
|
-
var interactiveTypographySchema =
|
|
4595
|
+
import { z as z7 } from "zod";
|
|
4596
|
+
var interactiveTypographySchema = z7.object({
|
|
4466
4597
|
/** Font family source */
|
|
4467
|
-
typography:
|
|
4598
|
+
typography: z7.enum(["body", "heading"]).default("body"),
|
|
4468
4599
|
/** Font weight */
|
|
4469
|
-
fontWeight:
|
|
4600
|
+
fontWeight: z7.enum(["regular", "medium", "semibold", "bold"]).default("medium"),
|
|
4470
4601
|
/** Text transform */
|
|
4471
|
-
textTransform:
|
|
4602
|
+
textTransform: z7.enum(["none", "uppercase", "capitalize"]).default("none"),
|
|
4472
4603
|
/** Italic style */
|
|
4473
|
-
italic:
|
|
4604
|
+
italic: z7.boolean().default(false)
|
|
4474
4605
|
});
|
|
4475
|
-
var effectApplicationSchema2 =
|
|
4606
|
+
var effectApplicationSchema2 = z7.object({
|
|
4476
4607
|
/** Effect preset ID */
|
|
4477
|
-
effectId:
|
|
4608
|
+
effectId: z7.string(),
|
|
4478
4609
|
/** User-provided customization options */
|
|
4479
|
-
options:
|
|
4610
|
+
options: z7.record(z7.string(), z7.any()).optional()
|
|
4480
4611
|
});
|
|
4481
|
-
var effectCompositionSchema =
|
|
4612
|
+
var effectCompositionSchema = z7.object({
|
|
4482
4613
|
/** Effects always applied */
|
|
4483
|
-
base:
|
|
4614
|
+
base: z7.array(effectApplicationSchema2).optional(),
|
|
4484
4615
|
/** Effects applied on hover */
|
|
4485
|
-
hover:
|
|
4616
|
+
hover: z7.array(effectApplicationSchema2).optional(),
|
|
4486
4617
|
/** Effects applied on active/pressed */
|
|
4487
|
-
active:
|
|
4618
|
+
active: z7.array(effectApplicationSchema2).optional(),
|
|
4488
4619
|
/** Effects applied on focus */
|
|
4489
|
-
focus:
|
|
4620
|
+
focus: z7.array(effectApplicationSchema2).optional()
|
|
4490
4621
|
});
|
|
4491
4622
|
|
|
4492
4623
|
// ../theme-core/src/navigation/types.ts
|
|
4493
|
-
var navLinkPaddingSchema =
|
|
4494
|
-
var navLinkPaddingXSchema =
|
|
4495
|
-
var navLinkBorderRadiusSchema =
|
|
4496
|
-
var navLinkTextSizeSchema =
|
|
4497
|
-
var navLinkLetterSpacingSchema =
|
|
4498
|
-
var navLinkStyleSchema =
|
|
4624
|
+
var navLinkPaddingSchema = z8.enum(["none", "compact", "default"]);
|
|
4625
|
+
var navLinkPaddingXSchema = z8.enum(["none", "tight", "compact", "default", "relaxed", "spacious"]);
|
|
4626
|
+
var navLinkBorderRadiusSchema = z8.enum(["none", "sm", "md", "full"]);
|
|
4627
|
+
var navLinkTextSizeSchema = z8.enum(["xs", "sm", "base", "lg"]);
|
|
4628
|
+
var navLinkLetterSpacingSchema = z8.enum(["normal", "wide", "wider", "widest"]);
|
|
4629
|
+
var navLinkStyleSchema = z8.object({
|
|
4499
4630
|
/** Display name for the style */
|
|
4500
|
-
name:
|
|
4631
|
+
name: z8.string().min(1).max(30).optional(),
|
|
4501
4632
|
/** Typography settings (inherited from interactive base) */
|
|
4502
4633
|
...interactiveTypographySchema.shape,
|
|
4503
4634
|
/** Text color token */
|
|
4504
|
-
colorToken:
|
|
4635
|
+
colorToken: themeColorTokenSchema.default("text"),
|
|
4505
4636
|
/** Optional text size override */
|
|
4506
4637
|
textSize: navLinkTextSizeSchema.optional(),
|
|
4507
4638
|
/** Optional letter spacing override */
|
|
4508
4639
|
letterSpacing: navLinkLetterSpacingSchema.optional(),
|
|
4509
4640
|
/** Hover/active color token (for color-change effects) */
|
|
4510
|
-
hoverColorToken:
|
|
4641
|
+
hoverColorToken: themeColorTokenSchema.nullable().optional(),
|
|
4511
4642
|
/** Padding preset */
|
|
4512
4643
|
padding: navLinkPaddingSchema.default("compact"),
|
|
4513
4644
|
/** Horizontal padding override (overrides horizontal component of padding preset) */
|
|
@@ -4519,7 +4650,7 @@ var navLinkStyleSchema = z7.object({
|
|
|
4519
4650
|
});
|
|
4520
4651
|
|
|
4521
4652
|
// ../theme-core/src/customCss/validation.ts
|
|
4522
|
-
import { z as
|
|
4653
|
+
import { z as z9 } from "zod";
|
|
4523
4654
|
var FORBIDDEN_SELECTORS = [":root", "html", "body"];
|
|
4524
4655
|
var UNIVERSAL_SELECTOR = "*";
|
|
4525
4656
|
var REMOTE_URL_PATTERN = /url\s*\(\s*['"]?(https?:|\/\/)/i;
|
|
@@ -4561,7 +4692,7 @@ function containsForbiddenSelector(selector) {
|
|
|
4561
4692
|
}
|
|
4562
4693
|
return false;
|
|
4563
4694
|
}
|
|
4564
|
-
var selectorSchema =
|
|
4695
|
+
var selectorSchema = z9.string().min(1, "Selector cannot be empty").max(200, "Selector too long (max 200 characters)").refine(
|
|
4565
4696
|
(s) => !containsForbiddenSelector(s),
|
|
4566
4697
|
{ message: "Global selectors (:root, html, body, *) are not allowed" }
|
|
4567
4698
|
);
|
|
@@ -4571,38 +4702,38 @@ function containsRemoteUrl(value) {
|
|
|
4571
4702
|
function containsJavascriptUrl(value) {
|
|
4572
4703
|
return JAVASCRIPT_URL_PATTERN.test(value);
|
|
4573
4704
|
}
|
|
4574
|
-
var declarationValueSchema =
|
|
4705
|
+
var declarationValueSchema = z9.string().max(500, "Declaration value too long (max 500 characters)").refine(
|
|
4575
4706
|
(v) => !containsRemoteUrl(v),
|
|
4576
4707
|
{ message: "Remote url() references are not allowed. Use local paths, data URIs, or fragment IDs." }
|
|
4577
4708
|
).refine(
|
|
4578
4709
|
(v) => !containsJavascriptUrl(v),
|
|
4579
4710
|
{ message: "javascript: URLs are not allowed" }
|
|
4580
4711
|
);
|
|
4581
|
-
var declarationsSchema =
|
|
4582
|
-
|
|
4712
|
+
var declarationsSchema = z9.record(
|
|
4713
|
+
z9.string().min(1).max(100),
|
|
4583
4714
|
// property name
|
|
4584
4715
|
declarationValueSchema
|
|
4585
4716
|
// property value
|
|
4586
4717
|
);
|
|
4587
|
-
var customCssRuleSchema =
|
|
4588
|
-
id:
|
|
4718
|
+
var customCssRuleSchema = z9.object({
|
|
4719
|
+
id: z9.string().min(1, "Rule ID is required").max(50, "Rule ID too long"),
|
|
4589
4720
|
selector: selectorSchema,
|
|
4590
4721
|
declarations: declarationsSchema
|
|
4591
4722
|
});
|
|
4592
4723
|
var blockCustomCssRuleSchema = customCssRuleSchema.extend({
|
|
4593
|
-
blockKind:
|
|
4724
|
+
blockKind: z9.string().min(1, "Block kind is required").max(50, "Block kind too long")
|
|
4594
4725
|
});
|
|
4595
|
-
var customCssRulesSchema =
|
|
4596
|
-
var blockCustomCssRulesSchema =
|
|
4726
|
+
var customCssRulesSchema = z9.array(customCssRuleSchema).optional();
|
|
4727
|
+
var blockCustomCssRulesSchema = z9.array(blockCustomCssRuleSchema).optional();
|
|
4597
4728
|
|
|
4598
4729
|
// ../theme-core/src/customCss/atRuleValidation.ts
|
|
4599
|
-
import { z as
|
|
4730
|
+
import { z as z10 } from "zod";
|
|
4600
4731
|
var KEYFRAME_OFFSET_PATTERN = /^(from|to|\d{1,3}%)$/i;
|
|
4601
4732
|
var ANIMATION_NAME_PATTERN = /^[a-zA-Z_-][a-zA-Z0-9_-]*$/;
|
|
4602
4733
|
var BLOCKED_AT_RULES = ["@import", "@charset"];
|
|
4603
4734
|
var BLOCKED_AT_RULE_PATTERN = /@(?:import|charset)\b/i;
|
|
4604
|
-
var ruleIdSchema =
|
|
4605
|
-
var nestedRuleSchema =
|
|
4735
|
+
var ruleIdSchema = z10.string().min(1, "Rule ID is required").max(50, "Rule ID too long");
|
|
4736
|
+
var nestedRuleSchema = z10.object({
|
|
4606
4737
|
selector: selectorSchema,
|
|
4607
4738
|
declarations: declarationsSchema
|
|
4608
4739
|
});
|
|
@@ -4614,120 +4745,86 @@ function isValidKeyframeOffset(offset) {
|
|
|
4614
4745
|
const value = parseInt(match[1], 10);
|
|
4615
4746
|
return value >= 0 && value <= 100;
|
|
4616
4747
|
}
|
|
4617
|
-
var keyframeOffsetSchema =
|
|
4748
|
+
var keyframeOffsetSchema = z10.string().transform((offset) => offset.trim()).refine(
|
|
4618
4749
|
(offset) => KEYFRAME_OFFSET_PATTERN.test(offset),
|
|
4619
4750
|
{ message: 'Invalid keyframe offset. Use percentages (0%, 50%, 100%) or "from"/"to"' }
|
|
4620
4751
|
).refine(
|
|
4621
4752
|
isValidKeyframeOffset,
|
|
4622
4753
|
{ message: "Keyframe offset must be between 0% and 100%" }
|
|
4623
4754
|
);
|
|
4624
|
-
var animationNameSchema =
|
|
4755
|
+
var animationNameSchema = z10.string().min(1, "Animation name is required").max(50, "Animation name too long").refine(
|
|
4625
4756
|
(name) => ANIMATION_NAME_PATTERN.test(name),
|
|
4626
4757
|
{ message: "Invalid animation name. Use letters, numbers, dashes, underscores (start with letter, dash, or underscore)" }
|
|
4627
4758
|
);
|
|
4628
|
-
var keyframeSchema =
|
|
4759
|
+
var keyframeSchema = z10.object({
|
|
4629
4760
|
offset: keyframeOffsetSchema,
|
|
4630
4761
|
declarations: declarationsSchema
|
|
4631
4762
|
});
|
|
4632
|
-
var keyframesAtRuleSchema =
|
|
4763
|
+
var keyframesAtRuleSchema = z10.object({
|
|
4633
4764
|
id: ruleIdSchema,
|
|
4634
|
-
type:
|
|
4765
|
+
type: z10.literal("keyframes"),
|
|
4635
4766
|
name: animationNameSchema,
|
|
4636
|
-
frames:
|
|
4767
|
+
frames: z10.array(keyframeSchema).min(1, "At least one keyframe is required")
|
|
4637
4768
|
});
|
|
4638
|
-
var fontFaceDeclarationsSchema =
|
|
4769
|
+
var fontFaceDeclarationsSchema = z10.record(z10.string().min(1).max(100), declarationValueSchema).refine(
|
|
4639
4770
|
(decls) => "fontFamily" in decls || "font-family" in decls,
|
|
4640
4771
|
{ message: "font-family is required in @font-face" }
|
|
4641
4772
|
);
|
|
4642
|
-
var fontFaceAtRuleSchema =
|
|
4773
|
+
var fontFaceAtRuleSchema = z10.object({
|
|
4643
4774
|
id: ruleIdSchema,
|
|
4644
|
-
type:
|
|
4775
|
+
type: z10.literal("font-face"),
|
|
4645
4776
|
declarations: fontFaceDeclarationsSchema
|
|
4646
4777
|
});
|
|
4647
|
-
var mediaQuerySchema =
|
|
4648
|
-
var mediaAtRuleSchema =
|
|
4778
|
+
var mediaQuerySchema = z10.string().min(1, "Media query is required").max(200, "Media query too long");
|
|
4779
|
+
var mediaAtRuleSchema = z10.object({
|
|
4649
4780
|
id: ruleIdSchema,
|
|
4650
|
-
type:
|
|
4781
|
+
type: z10.literal("media"),
|
|
4651
4782
|
query: mediaQuerySchema,
|
|
4652
|
-
rules:
|
|
4783
|
+
rules: z10.array(nestedRuleSchema).min(1, "At least one rule is required")
|
|
4653
4784
|
});
|
|
4654
|
-
var supportsConditionSchema =
|
|
4655
|
-
var supportsAtRuleSchema =
|
|
4785
|
+
var supportsConditionSchema = z10.string().min(1, "Supports condition is required").max(200, "Supports condition too long");
|
|
4786
|
+
var supportsAtRuleSchema = z10.object({
|
|
4656
4787
|
id: ruleIdSchema,
|
|
4657
|
-
type:
|
|
4788
|
+
type: z10.literal("supports"),
|
|
4658
4789
|
condition: supportsConditionSchema,
|
|
4659
|
-
rules:
|
|
4790
|
+
rules: z10.array(nestedRuleSchema).min(1, "At least one rule is required")
|
|
4660
4791
|
});
|
|
4661
4792
|
function containsBlockedAtRule(css) {
|
|
4662
4793
|
return BLOCKED_AT_RULE_PATTERN.test(css);
|
|
4663
4794
|
}
|
|
4664
|
-
var rawCssSchema =
|
|
4795
|
+
var rawCssSchema = z10.string().min(1, "CSS is required").max(5e3, "Raw CSS too long (max 5000 characters)").refine(
|
|
4665
4796
|
(css) => css.trim().startsWith("@"),
|
|
4666
4797
|
{ message: "Raw at-rule must start with @" }
|
|
4667
4798
|
).refine(
|
|
4668
4799
|
(css) => !containsBlockedAtRule(css),
|
|
4669
4800
|
{ message: `Blocked at-rules: ${BLOCKED_AT_RULES.join(", ")}. Use typed at-rules or local assets instead.` }
|
|
4670
4801
|
);
|
|
4671
|
-
var rawAtRuleSchema =
|
|
4802
|
+
var rawAtRuleSchema = z10.object({
|
|
4672
4803
|
id: ruleIdSchema,
|
|
4673
|
-
type:
|
|
4804
|
+
type: z10.literal("raw"),
|
|
4674
4805
|
css: rawCssSchema
|
|
4675
4806
|
});
|
|
4676
|
-
var customCssAtRuleSchema =
|
|
4807
|
+
var customCssAtRuleSchema = z10.discriminatedUnion("type", [
|
|
4677
4808
|
keyframesAtRuleSchema,
|
|
4678
4809
|
fontFaceAtRuleSchema,
|
|
4679
4810
|
mediaAtRuleSchema,
|
|
4680
4811
|
supportsAtRuleSchema,
|
|
4681
4812
|
rawAtRuleSchema
|
|
4682
4813
|
]);
|
|
4683
|
-
var customCssAtRulesSchema =
|
|
4814
|
+
var customCssAtRulesSchema = z10.array(customCssAtRuleSchema).optional();
|
|
4684
4815
|
|
|
4685
4816
|
// ../theme-core/src/shared/componentStyles.ts
|
|
4686
|
-
import { z as
|
|
4687
|
-
var componentBorderSchema =
|
|
4688
|
-
width:
|
|
4689
|
-
style:
|
|
4690
|
-
colorToken:
|
|
4817
|
+
import { z as z11 } from "zod";
|
|
4818
|
+
var componentBorderSchema = z11.object({
|
|
4819
|
+
width: z11.enum(["none", "hairline", "thin", "medium", "thick"]).default("none"),
|
|
4820
|
+
style: z11.enum(["solid", "dashed"]).default("solid"),
|
|
4821
|
+
colorToken: themeColorTokenSchema.optional()
|
|
4691
4822
|
// defaults to "border" if not set
|
|
4692
4823
|
});
|
|
4693
|
-
var componentShadowSchema =
|
|
4694
|
-
elevation:
|
|
4824
|
+
var componentShadowSchema = z11.object({
|
|
4825
|
+
elevation: z11.enum(["none", "sm", "md", "lg", "xl", "2xl"]).default("sm")
|
|
4695
4826
|
});
|
|
4696
4827
|
|
|
4697
|
-
// ../theme-core/src/tokens/blockColorTokens.ts
|
|
4698
|
-
var blockColorTokenNames = [
|
|
4699
|
-
"text",
|
|
4700
|
-
"heading",
|
|
4701
|
-
"mutedText",
|
|
4702
|
-
"surface",
|
|
4703
|
-
"background",
|
|
4704
|
-
"foreground",
|
|
4705
|
-
"border",
|
|
4706
|
-
"primary",
|
|
4707
|
-
"secondary",
|
|
4708
|
-
"accent",
|
|
4709
|
-
"success",
|
|
4710
|
-
"warning",
|
|
4711
|
-
"info",
|
|
4712
|
-
"error",
|
|
4713
|
-
"destructive",
|
|
4714
|
-
"scrim",
|
|
4715
|
-
"shadow",
|
|
4716
|
-
// Common "on*" tokens used when rendering colored chips/badges.
|
|
4717
|
-
"onPrimary",
|
|
4718
|
-
"onSecondary",
|
|
4719
|
-
"onAccent",
|
|
4720
|
-
"onSuccess",
|
|
4721
|
-
"onWarning",
|
|
4722
|
-
"onInfo",
|
|
4723
|
-
"onError",
|
|
4724
|
-
"onDestructive",
|
|
4725
|
-
"onSurface"
|
|
4726
|
-
];
|
|
4727
|
-
var blockColorTokenNameSet = new Set(
|
|
4728
|
-
blockColorTokenNames
|
|
4729
|
-
);
|
|
4730
|
-
|
|
4731
4828
|
// ../theme-core/src/responsive/breakpoints.ts
|
|
4732
4829
|
var BREAKPOINT_SM = 640;
|
|
4733
4830
|
var BREAKPOINT_MD = 768;
|
|
@@ -4756,6 +4853,38 @@ var MQ_TABLET_ONLY = mqBetween(BREAKPOINT_SM, BREAKPOINT_LG_DOWN);
|
|
|
4756
4853
|
var MQ_MAX_640 = mqDown(BREAKPOINT_SM);
|
|
4757
4854
|
var MQ_MAX_768 = mqDown(BREAKPOINT_MD);
|
|
4758
4855
|
|
|
4856
|
+
// ../blocks/src/system/runtime/shared/components/FeedbackMessage.tsx
|
|
4857
|
+
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
4858
|
+
function joinClasses(...parts) {
|
|
4859
|
+
return parts.filter((part) => typeof part === "string" && part.length > 0).join(" ");
|
|
4860
|
+
}
|
|
4861
|
+
function FeedbackMessage({
|
|
4862
|
+
tone,
|
|
4863
|
+
children,
|
|
4864
|
+
className,
|
|
4865
|
+
title,
|
|
4866
|
+
titleClassName,
|
|
4867
|
+
bodyClassName,
|
|
4868
|
+
role = "status",
|
|
4869
|
+
live
|
|
4870
|
+
}) {
|
|
4871
|
+
const resolvedLive = live ?? (role === "alert" ? "assertive" : "polite");
|
|
4872
|
+
const shouldWrapBody = Boolean(title || bodyClassName);
|
|
4873
|
+
return /* @__PURE__ */ jsxs2(
|
|
4874
|
+
"div",
|
|
4875
|
+
{
|
|
4876
|
+
className,
|
|
4877
|
+
"data-feedback-tone": tone,
|
|
4878
|
+
role,
|
|
4879
|
+
"aria-live": resolvedLive === "off" ? void 0 : resolvedLive,
|
|
4880
|
+
children: [
|
|
4881
|
+
title ? /* @__PURE__ */ jsx3("p", { className: joinClasses(titleClassName), "data-feedback-title": true, children: title }) : null,
|
|
4882
|
+
shouldWrapBody ? /* @__PURE__ */ jsx3("div", { className: joinClasses(bodyClassName), "data-feedback-body": true, children }) : children
|
|
4883
|
+
]
|
|
4884
|
+
}
|
|
4885
|
+
);
|
|
4886
|
+
}
|
|
4887
|
+
|
|
4759
4888
|
// ../blocks/src/system/runtime/nodes/booking-form.client.tsx
|
|
4760
4889
|
import React7, { useCallback as useCallback6, useRef as useRef6, useState as useState7 } from "react";
|
|
4761
4890
|
|
|
@@ -4772,7 +4901,7 @@ var logger = {
|
|
|
4772
4901
|
|
|
4773
4902
|
// ../altcha/src/AltchaWidget.tsx
|
|
4774
4903
|
import { useEffect, useRef, useState } from "react";
|
|
4775
|
-
import { jsx as
|
|
4904
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
4776
4905
|
function AltchaWidget({
|
|
4777
4906
|
challengeUrl,
|
|
4778
4907
|
onSolutionChange,
|
|
@@ -4818,7 +4947,7 @@ function AltchaWidget({
|
|
|
4818
4947
|
}
|
|
4819
4948
|
};
|
|
4820
4949
|
}, [challengeUrl, auto, hidelogo, className, onSolutionChange]);
|
|
4821
|
-
return /* @__PURE__ */
|
|
4950
|
+
return /* @__PURE__ */ jsx4("div", { ref: containerRef });
|
|
4822
4951
|
}
|
|
4823
4952
|
|
|
4824
4953
|
// ../altcha/src/client.ts
|
|
@@ -5137,7 +5266,7 @@ function useMultiStep({
|
|
|
5137
5266
|
}
|
|
5138
5267
|
|
|
5139
5268
|
// ../blocks/src/system/runtime/components/multi-step/MultiStepForm.tsx
|
|
5140
|
-
import { jsx as
|
|
5269
|
+
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
5141
5270
|
function MultiStepForm({
|
|
5142
5271
|
steps,
|
|
5143
5272
|
initialData,
|
|
@@ -5173,7 +5302,7 @@ function MultiStepForm({
|
|
|
5173
5302
|
} = context;
|
|
5174
5303
|
const currentStep = visibleSteps[currentStepIndex];
|
|
5175
5304
|
if (!currentStep) {
|
|
5176
|
-
return /* @__PURE__ */
|
|
5305
|
+
return /* @__PURE__ */ jsx5("div", { className: "rb-text-center rb-py-12", children: /* @__PURE__ */ jsx5("p", { className: "status-muted", children: "No steps available" }) });
|
|
5177
5306
|
}
|
|
5178
5307
|
const stepComponent = isValidElement(currentStep.component) ? cloneElement(
|
|
5179
5308
|
currentStep.component,
|
|
@@ -5187,8 +5316,8 @@ function MultiStepForm({
|
|
|
5187
5316
|
const showNextButton = !currentStep.isTerminal;
|
|
5188
5317
|
const nextButtonLabel = isLastStep ? currentStep.nextLabel || "Complete" : currentStep.nextLabel || "Continue";
|
|
5189
5318
|
const backButtonLabel = currentStep.backLabel || "Back";
|
|
5190
|
-
return /* @__PURE__ */
|
|
5191
|
-
progressStyle !== "none" && /* @__PURE__ */
|
|
5319
|
+
return /* @__PURE__ */ jsx5(MultiStepContext.Provider, { value: context, children: /* @__PURE__ */ jsxs3("div", { className: `multi-step-form ${className}`, children: [
|
|
5320
|
+
progressStyle !== "none" && /* @__PURE__ */ jsx5("div", { className: "rb-mb-8", children: /* @__PURE__ */ jsx5(
|
|
5192
5321
|
ProgressIndicator,
|
|
5193
5322
|
{
|
|
5194
5323
|
steps: visibleSteps,
|
|
@@ -5197,13 +5326,13 @@ function MultiStepForm({
|
|
|
5197
5326
|
onStepClick: allowSkip ? goToStep : void 0
|
|
5198
5327
|
}
|
|
5199
5328
|
) }),
|
|
5200
|
-
/* @__PURE__ */
|
|
5201
|
-
Object.keys(errors).length > 0 && /* @__PURE__ */
|
|
5202
|
-
errors._form && /* @__PURE__ */
|
|
5203
|
-
Object.entries(errors).filter(([key]) => key !== "_form").map(([key, message]) => /* @__PURE__ */
|
|
5329
|
+
/* @__PURE__ */ jsx5("div", { className: "step-content", children: stepComponent }),
|
|
5330
|
+
Object.keys(errors).length > 0 && /* @__PURE__ */ jsxs3(FeedbackMessage, { tone: "error", className: "rb-mt-6 alert alert-error", role: "alert", children: [
|
|
5331
|
+
errors._form && /* @__PURE__ */ jsx5("p", { className: "rb-caption", children: /* @__PURE__ */ jsx5("strong", { children: errors._form }) }),
|
|
5332
|
+
Object.entries(errors).filter(([key]) => key !== "_form").map(([key, message]) => /* @__PURE__ */ jsx5("p", { className: "rb-caption", children: message }, key))
|
|
5204
5333
|
] }),
|
|
5205
|
-
(showBackButton || showNextButton) && /* @__PURE__ */
|
|
5206
|
-
showBackButton && /* @__PURE__ */
|
|
5334
|
+
(showBackButton || showNextButton) && /* @__PURE__ */ jsxs3("div", { className: "rb-flex rb-gap-3 rb-mt-8", children: [
|
|
5335
|
+
showBackButton && /* @__PURE__ */ jsx5(
|
|
5207
5336
|
"button",
|
|
5208
5337
|
{
|
|
5209
5338
|
type: "button",
|
|
@@ -5213,7 +5342,7 @@ function MultiStepForm({
|
|
|
5213
5342
|
children: backButtonLabel
|
|
5214
5343
|
}
|
|
5215
5344
|
),
|
|
5216
|
-
showNextButton && /* @__PURE__ */
|
|
5345
|
+
showNextButton && /* @__PURE__ */ jsxs3(
|
|
5217
5346
|
"button",
|
|
5218
5347
|
{
|
|
5219
5348
|
type: "button",
|
|
@@ -5225,7 +5354,7 @@ function MultiStepForm({
|
|
|
5225
5354
|
extraClassName: "rb-flex-1"
|
|
5226
5355
|
}),
|
|
5227
5356
|
children: [
|
|
5228
|
-
(isValidating || isSubmitting) && /* @__PURE__ */
|
|
5357
|
+
(isValidating || isSubmitting) && /* @__PURE__ */ jsx5(
|
|
5229
5358
|
SpinnerNode,
|
|
5230
5359
|
{
|
|
5231
5360
|
size: "sm",
|
|
@@ -5250,11 +5379,11 @@ function ProgressIndicator({
|
|
|
5250
5379
|
onStepClick
|
|
5251
5380
|
}) {
|
|
5252
5381
|
if (style === "dots") {
|
|
5253
|
-
return /* @__PURE__ */
|
|
5382
|
+
return /* @__PURE__ */ jsx5("div", { className: "rb-flex rb-items-center rb-justify-center rb-gap-2", children: steps.map((step, index) => {
|
|
5254
5383
|
const isActive = index === currentIndex;
|
|
5255
5384
|
const isCompleted = index < currentIndex;
|
|
5256
5385
|
const isClickable = onStepClick && index <= currentIndex;
|
|
5257
|
-
return /* @__PURE__ */
|
|
5386
|
+
return /* @__PURE__ */ jsx5(
|
|
5258
5387
|
"button",
|
|
5259
5388
|
{
|
|
5260
5389
|
type: "button",
|
|
@@ -5273,13 +5402,13 @@ function ProgressIndicator({
|
|
|
5273
5402
|
}) });
|
|
5274
5403
|
}
|
|
5275
5404
|
if (style === "steps") {
|
|
5276
|
-
return /* @__PURE__ */
|
|
5405
|
+
return /* @__PURE__ */ jsx5("div", { className: "rb-flex rb-items-center rb-justify-between", children: steps.map((step, index) => {
|
|
5277
5406
|
const isActive = index === currentIndex;
|
|
5278
5407
|
const isCompleted = index < currentIndex;
|
|
5279
5408
|
const isClickable = onStepClick && index <= currentIndex;
|
|
5280
5409
|
const isLast = index === steps.length - 1;
|
|
5281
|
-
return /* @__PURE__ */
|
|
5282
|
-
/* @__PURE__ */
|
|
5410
|
+
return /* @__PURE__ */ jsxs3("div", { className: "rb-flex rb-items-center rb-flex-1", children: [
|
|
5411
|
+
/* @__PURE__ */ jsxs3(
|
|
5283
5412
|
"button",
|
|
5284
5413
|
{
|
|
5285
5414
|
type: "button",
|
|
@@ -5290,7 +5419,7 @@ function ProgressIndicator({
|
|
|
5290
5419
|
${isClickable ? "rb-cursor-pointer" : "rb-cursor-default"}
|
|
5291
5420
|
`,
|
|
5292
5421
|
children: [
|
|
5293
|
-
/* @__PURE__ */
|
|
5422
|
+
/* @__PURE__ */ jsx5(
|
|
5294
5423
|
"div",
|
|
5295
5424
|
{
|
|
5296
5425
|
className: `
|
|
@@ -5301,7 +5430,7 @@ function ProgressIndicator({
|
|
|
5301
5430
|
children: isCompleted ? "\u2713" : index + 1
|
|
5302
5431
|
}
|
|
5303
5432
|
),
|
|
5304
|
-
/* @__PURE__ */
|
|
5433
|
+
/* @__PURE__ */ jsx5(
|
|
5305
5434
|
"span",
|
|
5306
5435
|
{
|
|
5307
5436
|
className: `
|
|
@@ -5314,59 +5443,28 @@ function ProgressIndicator({
|
|
|
5314
5443
|
]
|
|
5315
5444
|
}
|
|
5316
5445
|
),
|
|
5317
|
-
!isLast && /* @__PURE__ */
|
|
5446
|
+
!isLast && /* @__PURE__ */ jsx5("div", { className: "step-connector rb-ml-2 rb-mr-2 rb-hidden rb-sm-block" })
|
|
5318
5447
|
] }, step.id);
|
|
5319
5448
|
}) });
|
|
5320
5449
|
}
|
|
5321
5450
|
const progress = (currentIndex + 1) / steps.length * 100;
|
|
5322
|
-
return /* @__PURE__ */
|
|
5323
|
-
/* @__PURE__ */
|
|
5324
|
-
/* @__PURE__ */
|
|
5451
|
+
return /* @__PURE__ */ jsxs3("div", { className: "rb-space-y-2", children: [
|
|
5452
|
+
/* @__PURE__ */ jsxs3("div", { className: "rb-flex rb-justify-between rb-caption status-muted", children: [
|
|
5453
|
+
/* @__PURE__ */ jsxs3("span", { children: [
|
|
5325
5454
|
"Step ",
|
|
5326
5455
|
currentIndex + 1,
|
|
5327
5456
|
" of ",
|
|
5328
5457
|
steps.length
|
|
5329
5458
|
] }),
|
|
5330
|
-
/* @__PURE__ */
|
|
5459
|
+
/* @__PURE__ */ jsxs3("span", { children: [
|
|
5331
5460
|
Math.round(progress),
|
|
5332
5461
|
"%"
|
|
5333
5462
|
] })
|
|
5334
5463
|
] }),
|
|
5335
|
-
/* @__PURE__ */
|
|
5464
|
+
/* @__PURE__ */ jsx5("div", { className: "progress-bar", children: /* @__PURE__ */ jsx5("div", { className: "progress-fill", style: { width: `${progress}%` } }) })
|
|
5336
5465
|
] });
|
|
5337
5466
|
}
|
|
5338
5467
|
|
|
5339
|
-
// ../blocks/src/system/runtime/shared/components/FeedbackMessage.tsx
|
|
5340
|
-
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
5341
|
-
function joinClasses(...parts) {
|
|
5342
|
-
return parts.filter((part) => typeof part === "string" && part.length > 0).join(" ");
|
|
5343
|
-
}
|
|
5344
|
-
function FeedbackMessage({
|
|
5345
|
-
tone,
|
|
5346
|
-
children,
|
|
5347
|
-
className,
|
|
5348
|
-
title,
|
|
5349
|
-
titleClassName,
|
|
5350
|
-
bodyClassName,
|
|
5351
|
-
role = "status",
|
|
5352
|
-
live
|
|
5353
|
-
}) {
|
|
5354
|
-
const resolvedLive = live ?? (role === "alert" ? "assertive" : "polite");
|
|
5355
|
-
return /* @__PURE__ */ jsxs3(
|
|
5356
|
-
"div",
|
|
5357
|
-
{
|
|
5358
|
-
className,
|
|
5359
|
-
"data-feedback-tone": tone,
|
|
5360
|
-
role,
|
|
5361
|
-
"aria-live": resolvedLive === "off" ? void 0 : resolvedLive,
|
|
5362
|
-
children: [
|
|
5363
|
-
title ? /* @__PURE__ */ jsx5("p", { className: joinClasses(titleClassName), "data-feedback-title": true, children: title }) : null,
|
|
5364
|
-
/* @__PURE__ */ jsx5("div", { className: joinClasses(bodyClassName), "data-feedback-body": true, children })
|
|
5365
|
-
]
|
|
5366
|
-
}
|
|
5367
|
-
);
|
|
5368
|
-
}
|
|
5369
|
-
|
|
5370
5468
|
// ../blocks/src/system/runtime/components/booking/SuccessMessage.tsx
|
|
5371
5469
|
import { Fragment, jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
5372
5470
|
var SuccessMessage = ({
|
|
@@ -5644,7 +5742,7 @@ function ServiceResourceSelector({
|
|
|
5644
5742
|
/* @__PURE__ */ jsx7(SpinnerNode, { size: "md", srLabel: "Loading practitioners" }),
|
|
5645
5743
|
/* @__PURE__ */ jsx7("p", { className: "ab-text ab-text--muted", children: "Loading practitioners..." })
|
|
5646
5744
|
] }),
|
|
5647
|
-
resourceError && /* @__PURE__ */ jsx7("
|
|
5745
|
+
resourceError && /* @__PURE__ */ jsx7(FeedbackMessage, { tone: "error", className: "ab-alert ab-alert--error", role: "alert", children: resourceError }),
|
|
5648
5746
|
/* @__PURE__ */ jsxs5("div", { className: "ab-actions", children: [
|
|
5649
5747
|
onBack && /* @__PURE__ */ jsx7(
|
|
5650
5748
|
"button",
|
|
@@ -5790,7 +5888,7 @@ var DatePicker = ({
|
|
|
5790
5888
|
"Select Date",
|
|
5791
5889
|
required && /* @__PURE__ */ jsx9("span", { className: "ab-required", children: "*" })
|
|
5792
5890
|
] }),
|
|
5793
|
-
/* @__PURE__ */ jsx9("
|
|
5891
|
+
/* @__PURE__ */ jsx9(FeedbackMessage, { tone: "warning", className: "ab-alert ab-alert--warning", role: "status", children: /* @__PURE__ */ jsxs6("p", { className: "ab-text", children: [
|
|
5794
5892
|
"No available dates in this period.",
|
|
5795
5893
|
hasMore && onLoadMore && /* @__PURE__ */ jsx9(
|
|
5796
5894
|
"button",
|
|
@@ -5849,7 +5947,7 @@ var TimeSlotSelector = ({
|
|
|
5849
5947
|
"Select Time",
|
|
5850
5948
|
required && /* @__PURE__ */ jsx10("span", { className: "ab-required", children: "*" })
|
|
5851
5949
|
] }),
|
|
5852
|
-
isLoading ? /* @__PURE__ */ jsx10("
|
|
5950
|
+
isLoading ? /* @__PURE__ */ jsx10(FeedbackMessage, { tone: "info", className: "ab-alert ab-alert--info ab-center", role: "status", children: "Loading available times..." }) : slots.length === 0 ? /* @__PURE__ */ jsx10(FeedbackMessage, { tone: "info", className: "ab-alert ab-alert--info ab-center", role: "status", children: "No available times for this date" }) : /* @__PURE__ */ jsxs7(
|
|
5853
5951
|
"select",
|
|
5854
5952
|
{
|
|
5855
5953
|
id: "booking-slot",
|
|
@@ -6089,7 +6187,7 @@ function DateTimeSelectionStep({
|
|
|
6089
6187
|
" minutes"
|
|
6090
6188
|
] })
|
|
6091
6189
|
] }),
|
|
6092
|
-
error && /* @__PURE__ */ jsx11("
|
|
6190
|
+
error && /* @__PURE__ */ jsx11(FeedbackMessage, { tone: "error", className: "ab-alert ab-alert--error", role: "alert", children: error }),
|
|
6093
6191
|
/* @__PURE__ */ jsx11(
|
|
6094
6192
|
DatePicker,
|
|
6095
6193
|
{
|
|
@@ -6469,7 +6567,7 @@ function PaymentOptionSelectionStep({
|
|
|
6469
6567
|
}
|
|
6470
6568
|
}, [appointmentPackages, data.selectedAppointmentPackageId, updateData]);
|
|
6471
6569
|
if (resolution.mode === "unsupported" || !service) {
|
|
6472
|
-
return /* @__PURE__ */ jsx12("
|
|
6570
|
+
return /* @__PURE__ */ jsx12(FeedbackMessage, { tone: "error", className: "ab-alert ab-alert--error", role: "alert", children: resolution.errorMessage ?? "Payment options are unavailable for this service right now." });
|
|
6473
6571
|
}
|
|
6474
6572
|
const viewModel = buildBookingPaymentSelectionViewModel({
|
|
6475
6573
|
serviceTitle: service.title,
|
|
@@ -6485,8 +6583,8 @@ function PaymentOptionSelectionStep({
|
|
|
6485
6583
|
/* @__PURE__ */ jsx12("h3", { className: "ab-subtitle", children: viewModel.sectionTitle }),
|
|
6486
6584
|
/* @__PURE__ */ jsx12("p", { className: "ab-text ab-text--muted", children: service.title })
|
|
6487
6585
|
] }),
|
|
6488
|
-
appointmentPackages.tag === "loading" ? /* @__PURE__ */ jsx12("
|
|
6489
|
-
appointmentPackages.tag === "error" ? /* @__PURE__ */ jsxs9("
|
|
6586
|
+
appointmentPackages.tag === "loading" ? /* @__PURE__ */ jsx12(FeedbackMessage, { tone: "info", className: "ab-alert ab-alert--info", role: "status", children: "Checking package credits..." }) : null,
|
|
6587
|
+
appointmentPackages.tag === "error" ? /* @__PURE__ */ jsxs9(FeedbackMessage, { tone: "info", className: "ab-alert ab-alert--info", role: "status", children: [
|
|
6490
6588
|
appointmentPackages.message,
|
|
6491
6589
|
" You can continue with the normal payment option."
|
|
6492
6590
|
] }) : null,
|
|
@@ -6579,7 +6677,43 @@ function PaymentOptionSelectionStep({
|
|
|
6579
6677
|
|
|
6580
6678
|
// ../blocks/src/system/runtime/components/multi-step/DynamicFormFields.tsx
|
|
6581
6679
|
import { useState as useState5, useCallback as useCallback4 } from "react";
|
|
6582
|
-
|
|
6680
|
+
|
|
6681
|
+
// ../blocks/src/system/runtime/shared/components/FieldValidationMessage.tsx
|
|
6682
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
6683
|
+
function getFieldValidationControlProps({
|
|
6684
|
+
message,
|
|
6685
|
+
messageId,
|
|
6686
|
+
describedBy
|
|
6687
|
+
}) {
|
|
6688
|
+
const hasMessage = Boolean(message);
|
|
6689
|
+
const ariaDescribedBy = [describedBy, hasMessage ? messageId : void 0].filter((part) => typeof part === "string" && part.length > 0).join(" ");
|
|
6690
|
+
return {
|
|
6691
|
+
"aria-invalid": hasMessage ? "true" : void 0,
|
|
6692
|
+
"aria-describedby": ariaDescribedBy || void 0
|
|
6693
|
+
};
|
|
6694
|
+
}
|
|
6695
|
+
function FieldValidationMessage({
|
|
6696
|
+
id,
|
|
6697
|
+
children,
|
|
6698
|
+
className,
|
|
6699
|
+
live = "assertive"
|
|
6700
|
+
}) {
|
|
6701
|
+
return /* @__PURE__ */ jsx13(
|
|
6702
|
+
"p",
|
|
6703
|
+
{
|
|
6704
|
+
id,
|
|
6705
|
+
className,
|
|
6706
|
+
"data-field-validation-message": true,
|
|
6707
|
+
"data-field-validation-tone": "error",
|
|
6708
|
+
role: "alert",
|
|
6709
|
+
"aria-live": live === "off" ? void 0 : live,
|
|
6710
|
+
children
|
|
6711
|
+
}
|
|
6712
|
+
);
|
|
6713
|
+
}
|
|
6714
|
+
|
|
6715
|
+
// ../blocks/src/system/runtime/components/multi-step/DynamicFormFields.tsx
|
|
6716
|
+
import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
6583
6717
|
function DynamicFormFields({
|
|
6584
6718
|
fields,
|
|
6585
6719
|
showLabels = true,
|
|
@@ -6656,26 +6790,30 @@ function DynamicFormFields({
|
|
|
6656
6790
|
},
|
|
6657
6791
|
[data, touched]
|
|
6658
6792
|
);
|
|
6659
|
-
return /* @__PURE__ */
|
|
6793
|
+
return /* @__PURE__ */ jsx14("div", { className: `rb-space-y-6 ${className}`, children: fields.map((field) => {
|
|
6660
6794
|
const error = getFieldError(field);
|
|
6661
6795
|
const value = data[field.id] ?? "";
|
|
6796
|
+
const helpId = field.helpText ? `${field.id}-help` : void 0;
|
|
6797
|
+
const errorId = `${field.id}-error`;
|
|
6662
6798
|
return /* @__PURE__ */ jsxs10("div", { className: "rb-space-y-2", children: [
|
|
6663
6799
|
showLabels && /* @__PURE__ */ jsxs10("label", { htmlFor: field.id, className: "form-label", children: [
|
|
6664
6800
|
field.label,
|
|
6665
|
-
field.required && /* @__PURE__ */
|
|
6801
|
+
field.required && /* @__PURE__ */ jsx14("span", { className: "required-marker", children: "*" })
|
|
6666
6802
|
] }),
|
|
6667
|
-
field.helpText && /* @__PURE__ */
|
|
6668
|
-
/* @__PURE__ */
|
|
6803
|
+
field.helpText && /* @__PURE__ */ jsx14("p", { id: helpId, className: "rb-caption status-muted", children: field.helpText }),
|
|
6804
|
+
/* @__PURE__ */ jsx14(
|
|
6669
6805
|
FieldInput,
|
|
6670
6806
|
{
|
|
6671
6807
|
field,
|
|
6672
6808
|
value,
|
|
6673
6809
|
onChange: (val) => handleChange(field.id, val),
|
|
6674
6810
|
onBlur: () => handleBlur(field.id),
|
|
6675
|
-
error
|
|
6811
|
+
error,
|
|
6812
|
+
errorId,
|
|
6813
|
+
describedBy: helpId
|
|
6676
6814
|
}
|
|
6677
6815
|
),
|
|
6678
|
-
error && /* @__PURE__ */
|
|
6816
|
+
error && /* @__PURE__ */ jsx14(FieldValidationMessage, { id: errorId, className: "rb-caption status-error", children: error })
|
|
6679
6817
|
] }, field.id);
|
|
6680
6818
|
}) });
|
|
6681
6819
|
}
|
|
@@ -6684,7 +6822,9 @@ function FieldInput({
|
|
|
6684
6822
|
value,
|
|
6685
6823
|
onChange,
|
|
6686
6824
|
onBlur,
|
|
6687
|
-
error
|
|
6825
|
+
error,
|
|
6826
|
+
errorId,
|
|
6827
|
+
describedBy
|
|
6688
6828
|
}) {
|
|
6689
6829
|
const inputClass = "form-input";
|
|
6690
6830
|
const textareaClass = "form-textarea";
|
|
@@ -6692,9 +6832,14 @@ function FieldInput({
|
|
|
6692
6832
|
const checkboxClass = "form-checkbox";
|
|
6693
6833
|
const radioClass = "form-radio";
|
|
6694
6834
|
const strValue = typeof value === "string" ? value : String(value ?? "");
|
|
6835
|
+
const validationProps = getFieldValidationControlProps({
|
|
6836
|
+
message: error,
|
|
6837
|
+
messageId: errorId,
|
|
6838
|
+
describedBy
|
|
6839
|
+
});
|
|
6695
6840
|
switch (field.type) {
|
|
6696
6841
|
case "textarea":
|
|
6697
|
-
return /* @__PURE__ */
|
|
6842
|
+
return /* @__PURE__ */ jsx14(
|
|
6698
6843
|
"textarea",
|
|
6699
6844
|
{
|
|
6700
6845
|
id: field.id,
|
|
@@ -6707,13 +6852,13 @@ function FieldInput({
|
|
|
6707
6852
|
minLength: field.minLength,
|
|
6708
6853
|
maxLength: field.maxLength,
|
|
6709
6854
|
rows: 4,
|
|
6710
|
-
|
|
6855
|
+
...validationProps,
|
|
6711
6856
|
className: textareaClass
|
|
6712
6857
|
}
|
|
6713
6858
|
);
|
|
6714
6859
|
case "select":
|
|
6715
6860
|
if (field.multiple) {
|
|
6716
|
-
return /* @__PURE__ */
|
|
6861
|
+
return /* @__PURE__ */ jsx14(
|
|
6717
6862
|
"select",
|
|
6718
6863
|
{
|
|
6719
6864
|
id: field.id,
|
|
@@ -6726,9 +6871,9 @@ function FieldInput({
|
|
|
6726
6871
|
onBlur,
|
|
6727
6872
|
required: field.required,
|
|
6728
6873
|
multiple: true,
|
|
6729
|
-
|
|
6874
|
+
...validationProps,
|
|
6730
6875
|
className: `${selectClass} rb-h-32`,
|
|
6731
|
-
children: field.options?.map((opt) => /* @__PURE__ */
|
|
6876
|
+
children: field.options?.map((opt) => /* @__PURE__ */ jsx14("option", { value: opt.value, children: opt.label }, opt.value))
|
|
6732
6877
|
}
|
|
6733
6878
|
);
|
|
6734
6879
|
}
|
|
@@ -6741,17 +6886,17 @@ function FieldInput({
|
|
|
6741
6886
|
onChange: (e) => onChange(e.target.value),
|
|
6742
6887
|
onBlur,
|
|
6743
6888
|
required: field.required,
|
|
6744
|
-
|
|
6889
|
+
...validationProps,
|
|
6745
6890
|
className: selectClass,
|
|
6746
6891
|
children: [
|
|
6747
|
-
/* @__PURE__ */
|
|
6748
|
-
field.options?.map((opt) => /* @__PURE__ */
|
|
6892
|
+
/* @__PURE__ */ jsx14("option", { value: "", children: "Select an option..." }),
|
|
6893
|
+
field.options?.map((opt) => /* @__PURE__ */ jsx14("option", { value: opt.value, children: opt.label }, opt.value))
|
|
6749
6894
|
]
|
|
6750
6895
|
}
|
|
6751
6896
|
);
|
|
6752
6897
|
case "radio":
|
|
6753
|
-
return /* @__PURE__ */
|
|
6754
|
-
/* @__PURE__ */
|
|
6898
|
+
return /* @__PURE__ */ jsx14("div", { className: "rb-space-y-2", children: field.options?.map((opt) => /* @__PURE__ */ jsxs10("label", { className: "rb-flex rb-items-center rb-gap-2 rb-cursor-pointer", children: [
|
|
6899
|
+
/* @__PURE__ */ jsx14(
|
|
6755
6900
|
"input",
|
|
6756
6901
|
{
|
|
6757
6902
|
type: "radio",
|
|
@@ -6761,16 +6906,17 @@ function FieldInput({
|
|
|
6761
6906
|
onChange: (e) => onChange(e.target.value),
|
|
6762
6907
|
onBlur,
|
|
6763
6908
|
required: field.required,
|
|
6909
|
+
...validationProps,
|
|
6764
6910
|
className: radioClass
|
|
6765
6911
|
}
|
|
6766
6912
|
),
|
|
6767
|
-
/* @__PURE__ */
|
|
6913
|
+
/* @__PURE__ */ jsx14("span", { className: "rb-caption", children: opt.label })
|
|
6768
6914
|
] }, opt.value)) });
|
|
6769
6915
|
case "checkbox":
|
|
6770
6916
|
if (field.options && field.options.length > 1) {
|
|
6771
6917
|
const checkedValues = Array.isArray(value) ? value : [];
|
|
6772
|
-
return /* @__PURE__ */
|
|
6773
|
-
/* @__PURE__ */
|
|
6918
|
+
return /* @__PURE__ */ jsx14("div", { className: "rb-space-y-2", children: field.options.map((opt) => /* @__PURE__ */ jsxs10("label", { className: "rb-flex rb-items-center rb-gap-2 rb-cursor-pointer", children: [
|
|
6919
|
+
/* @__PURE__ */ jsx14(
|
|
6774
6920
|
"input",
|
|
6775
6921
|
{
|
|
6776
6922
|
type: "checkbox",
|
|
@@ -6782,14 +6928,15 @@ function FieldInput({
|
|
|
6782
6928
|
onChange(newValues);
|
|
6783
6929
|
},
|
|
6784
6930
|
onBlur,
|
|
6931
|
+
...validationProps,
|
|
6785
6932
|
className: checkboxClass
|
|
6786
6933
|
}
|
|
6787
6934
|
),
|
|
6788
|
-
/* @__PURE__ */
|
|
6935
|
+
/* @__PURE__ */ jsx14("span", { className: "rb-caption", children: opt.label })
|
|
6789
6936
|
] }, opt.value)) });
|
|
6790
6937
|
}
|
|
6791
6938
|
return /* @__PURE__ */ jsxs10("label", { className: "rb-flex rb-items-center rb-gap-2 rb-cursor-pointer", children: [
|
|
6792
|
-
/* @__PURE__ */
|
|
6939
|
+
/* @__PURE__ */ jsx14(
|
|
6793
6940
|
"input",
|
|
6794
6941
|
{
|
|
6795
6942
|
type: "checkbox",
|
|
@@ -6799,14 +6946,15 @@ function FieldInput({
|
|
|
6799
6946
|
onChange: (e) => onChange(e.target.checked),
|
|
6800
6947
|
onBlur,
|
|
6801
6948
|
required: field.required,
|
|
6949
|
+
...validationProps,
|
|
6802
6950
|
className: checkboxClass
|
|
6803
6951
|
}
|
|
6804
6952
|
),
|
|
6805
|
-
/* @__PURE__ */
|
|
6953
|
+
/* @__PURE__ */ jsx14("span", { className: "rb-caption", children: field.placeholder || field.label })
|
|
6806
6954
|
] });
|
|
6807
6955
|
case "booking_requirement_consent":
|
|
6808
6956
|
return /* @__PURE__ */ jsxs10("label", { className: "rb-flex rb-items-start rb-gap-2 rb-cursor-pointer", children: [
|
|
6809
|
-
/* @__PURE__ */
|
|
6957
|
+
/* @__PURE__ */ jsx14(
|
|
6810
6958
|
"input",
|
|
6811
6959
|
{
|
|
6812
6960
|
type: "checkbox",
|
|
@@ -6816,13 +6964,14 @@ function FieldInput({
|
|
|
6816
6964
|
onChange: (e) => onChange(e.target.checked),
|
|
6817
6965
|
onBlur,
|
|
6818
6966
|
required: field.required,
|
|
6967
|
+
...validationProps,
|
|
6819
6968
|
className: `${checkboxClass} rb-mt-0.5`
|
|
6820
6969
|
}
|
|
6821
6970
|
),
|
|
6822
|
-
/* @__PURE__ */
|
|
6971
|
+
/* @__PURE__ */ jsx14("span", { className: "rb-caption", children: field.placeholder || field.label })
|
|
6823
6972
|
] });
|
|
6824
6973
|
case "number":
|
|
6825
|
-
return /* @__PURE__ */
|
|
6974
|
+
return /* @__PURE__ */ jsx14(
|
|
6826
6975
|
"input",
|
|
6827
6976
|
{
|
|
6828
6977
|
type: "number",
|
|
@@ -6835,12 +6984,12 @@ function FieldInput({
|
|
|
6835
6984
|
required: field.required,
|
|
6836
6985
|
min: field.min,
|
|
6837
6986
|
max: field.max,
|
|
6838
|
-
|
|
6987
|
+
...validationProps,
|
|
6839
6988
|
className: inputClass
|
|
6840
6989
|
}
|
|
6841
6990
|
);
|
|
6842
6991
|
case "date":
|
|
6843
|
-
return /* @__PURE__ */
|
|
6992
|
+
return /* @__PURE__ */ jsx14(
|
|
6844
6993
|
"input",
|
|
6845
6994
|
{
|
|
6846
6995
|
type: "date",
|
|
@@ -6852,12 +7001,12 @@ function FieldInput({
|
|
|
6852
7001
|
required: field.required,
|
|
6853
7002
|
min: field.min ? String(field.min) : void 0,
|
|
6854
7003
|
max: field.max ? String(field.max) : void 0,
|
|
6855
|
-
|
|
7004
|
+
...validationProps,
|
|
6856
7005
|
className: inputClass
|
|
6857
7006
|
}
|
|
6858
7007
|
);
|
|
6859
7008
|
case "time":
|
|
6860
|
-
return /* @__PURE__ */
|
|
7009
|
+
return /* @__PURE__ */ jsx14(
|
|
6861
7010
|
"input",
|
|
6862
7011
|
{
|
|
6863
7012
|
type: "time",
|
|
@@ -6867,13 +7016,13 @@ function FieldInput({
|
|
|
6867
7016
|
onChange: (e) => onChange(e.target.value),
|
|
6868
7017
|
onBlur,
|
|
6869
7018
|
required: field.required,
|
|
6870
|
-
|
|
7019
|
+
...validationProps,
|
|
6871
7020
|
className: inputClass
|
|
6872
7021
|
}
|
|
6873
7022
|
);
|
|
6874
7023
|
// text, email, tel, url
|
|
6875
7024
|
default:
|
|
6876
|
-
return /* @__PURE__ */
|
|
7025
|
+
return /* @__PURE__ */ jsx14(
|
|
6877
7026
|
"input",
|
|
6878
7027
|
{
|
|
6879
7028
|
type: field.type,
|
|
@@ -6887,7 +7036,7 @@ function FieldInput({
|
|
|
6887
7036
|
minLength: field.minLength,
|
|
6888
7037
|
maxLength: field.maxLength,
|
|
6889
7038
|
pattern: field.pattern,
|
|
6890
|
-
|
|
7039
|
+
...validationProps,
|
|
6891
7040
|
className: inputClass
|
|
6892
7041
|
}
|
|
6893
7042
|
);
|
|
@@ -7345,7 +7494,7 @@ function useBookingSubmission(_siteId) {
|
|
|
7345
7494
|
}
|
|
7346
7495
|
|
|
7347
7496
|
// ../blocks/src/system/runtime/nodes/course-registration/DiscountCodeSection.tsx
|
|
7348
|
-
import { jsx as
|
|
7497
|
+
import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
7349
7498
|
function DiscountCodeSection({
|
|
7350
7499
|
isOpen,
|
|
7351
7500
|
code,
|
|
@@ -7353,10 +7502,10 @@ function DiscountCodeSection({
|
|
|
7353
7502
|
onChange,
|
|
7354
7503
|
onRemove
|
|
7355
7504
|
}) {
|
|
7356
|
-
return /* @__PURE__ */
|
|
7357
|
-
/* @__PURE__ */
|
|
7505
|
+
return /* @__PURE__ */ jsx15("div", { className: "cr-discount", children: !isOpen ? /* @__PURE__ */ jsx15("button", { type: "button", className: "cr-discount__toggle", onClick: onOpen, children: "Have a discount code?" }) : /* @__PURE__ */ jsxs11("div", { className: "cr-discount__form", children: [
|
|
7506
|
+
/* @__PURE__ */ jsx15("label", { htmlFor: "cr-discount-code", className: "cr-discount__label", children: "Discount code" }),
|
|
7358
7507
|
/* @__PURE__ */ jsxs11("div", { className: "cr-discount__row", children: [
|
|
7359
|
-
/* @__PURE__ */
|
|
7508
|
+
/* @__PURE__ */ jsx15(
|
|
7360
7509
|
"input",
|
|
7361
7510
|
{
|
|
7362
7511
|
id: "cr-discount-code",
|
|
@@ -7367,9 +7516,9 @@ function DiscountCodeSection({
|
|
|
7367
7516
|
autoComplete: "off"
|
|
7368
7517
|
}
|
|
7369
7518
|
),
|
|
7370
|
-
/* @__PURE__ */
|
|
7519
|
+
/* @__PURE__ */ jsx15("button", { type: "button", className: "cr-discount__remove", onClick: onRemove, children: "Remove" })
|
|
7371
7520
|
] }),
|
|
7372
|
-
/* @__PURE__ */
|
|
7521
|
+
/* @__PURE__ */ jsx15("p", { className: "cr-discount__hint", children: "Applied at checkout." })
|
|
7373
7522
|
] }) });
|
|
7374
7523
|
}
|
|
7375
7524
|
|
|
@@ -7457,7 +7606,7 @@ function scrollToBlock(anchorId) {
|
|
|
7457
7606
|
}
|
|
7458
7607
|
|
|
7459
7608
|
// ../blocks/src/system/runtime/nodes/booking-form.client.tsx
|
|
7460
|
-
import { jsx as
|
|
7609
|
+
import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
7461
7610
|
var PORTAL_REBOOK_QUERY_PARAM = "rebook";
|
|
7462
7611
|
var PORTAL_REBOOK_QUERY_VALUE = "1";
|
|
7463
7612
|
var REBOOK_COMPLETION_MODE_VERIFIED_CHECKOUT = "verified_checkout";
|
|
@@ -7593,11 +7742,13 @@ var BookingFormClient = ({
|
|
|
7593
7742
|
viewState.kind
|
|
7594
7743
|
]);
|
|
7595
7744
|
if (render.display.state === "missing" || !form || !render.hydration.formId) {
|
|
7596
|
-
return /* @__PURE__ */
|
|
7597
|
-
|
|
7745
|
+
return /* @__PURE__ */ jsx16(
|
|
7746
|
+
FeedbackMessage,
|
|
7598
7747
|
{
|
|
7748
|
+
tone: "error",
|
|
7599
7749
|
className: `ab-alert ab-alert--error ${render.display.className ?? ""}`.trim(),
|
|
7600
|
-
|
|
7750
|
+
role: "alert",
|
|
7751
|
+
children: /* @__PURE__ */ jsx16("p", { className: "ab-text", children: render.display.message ?? "Booking form not found. Please check your configuration." })
|
|
7601
7752
|
}
|
|
7602
7753
|
);
|
|
7603
7754
|
}
|
|
@@ -7639,7 +7790,7 @@ var BookingFormClient = ({
|
|
|
7639
7790
|
window.location.href = result.data.checkoutUrl;
|
|
7640
7791
|
};
|
|
7641
7792
|
if (viewState.kind === "success") {
|
|
7642
|
-
return /* @__PURE__ */
|
|
7793
|
+
return /* @__PURE__ */ jsx16(
|
|
7643
7794
|
SuccessMessage,
|
|
7644
7795
|
{
|
|
7645
7796
|
message: getBookingSuccessMessage(render.display.successMessage),
|
|
@@ -7649,18 +7800,18 @@ var BookingFormClient = ({
|
|
|
7649
7800
|
);
|
|
7650
7801
|
}
|
|
7651
7802
|
if (viewState.kind === "verifying") {
|
|
7652
|
-
return /* @__PURE__ */
|
|
7803
|
+
return /* @__PURE__ */ jsx16(
|
|
7653
7804
|
"div",
|
|
7654
7805
|
{
|
|
7655
7806
|
id: bookingAnchorId,
|
|
7656
7807
|
className: render.display.className ?? void 0,
|
|
7657
|
-
children: /* @__PURE__ */
|
|
7808
|
+
children: /* @__PURE__ */ jsx16(FeedbackMessage, { tone: "info", className: "ab-alert ab-alert--info", role: "status", children: /* @__PURE__ */ jsx16("p", { className: "ab-text", children: viewState.message }) })
|
|
7658
7809
|
}
|
|
7659
7810
|
);
|
|
7660
7811
|
}
|
|
7661
7812
|
return /* @__PURE__ */ jsxs12("div", { id: bookingAnchorId, className: render.display.className ?? void 0, children: [
|
|
7662
|
-
render.hydration.noticeMessage ? /* @__PURE__ */
|
|
7663
|
-
/* @__PURE__ */
|
|
7813
|
+
render.hydration.noticeMessage ? /* @__PURE__ */ jsx16(FeedbackMessage, { tone: "info", className: "ab-alert ab-alert--info rb-mb-4", role: "status", children: /* @__PURE__ */ jsx16("p", { className: "ab-text", children: render.hydration.noticeMessage }) }) : null,
|
|
7814
|
+
/* @__PURE__ */ jsx16(
|
|
7664
7815
|
MultiStepForm,
|
|
7665
7816
|
{
|
|
7666
7817
|
steps,
|
|
@@ -7677,7 +7828,7 @@ var BookingFormClient = ({
|
|
|
7677
7828
|
}
|
|
7678
7829
|
),
|
|
7679
7830
|
shouldShowDiscountSection ? /* @__PURE__ */ jsxs12("div", { className: "rb-mt-6", children: [
|
|
7680
|
-
discountUi.manualCodeEntryAllowed ? /* @__PURE__ */
|
|
7831
|
+
discountUi.manualCodeEntryAllowed ? /* @__PURE__ */ jsx16(
|
|
7681
7832
|
DiscountCodeSection,
|
|
7682
7833
|
{
|
|
7683
7834
|
isOpen: discountUi.discountUiOpen,
|
|
@@ -7690,16 +7841,16 @@ var BookingFormClient = ({
|
|
|
7690
7841
|
}
|
|
7691
7842
|
}
|
|
7692
7843
|
) : null,
|
|
7693
|
-
discountUi.autoAppliedDiscount && discountUi.discountCode.trim().length === 0 ? /* @__PURE__ */
|
|
7844
|
+
discountUi.autoAppliedDiscount && discountUi.discountCode.trim().length === 0 ? /* @__PURE__ */ jsx16(FeedbackMessage, { tone: "info", className: "ab-alert ab-alert--info rb-mt-4", role: "status", children: /* @__PURE__ */ jsxs12("p", { className: "ab-text", children: [
|
|
7694
7845
|
"Discount available: ",
|
|
7695
7846
|
discountUi.autoAppliedDiscount.publicLabel,
|
|
7696
7847
|
" ",
|
|
7697
7848
|
"will apply automatically at checkout."
|
|
7698
7849
|
] }) }) : null
|
|
7699
7850
|
] }) : null,
|
|
7700
|
-
feedback.tag === "error" ? /* @__PURE__ */ jsxs12("
|
|
7701
|
-
/* @__PURE__ */
|
|
7702
|
-
/* @__PURE__ */
|
|
7851
|
+
feedback.tag === "error" ? /* @__PURE__ */ jsxs12(FeedbackMessage, { tone: "error", className: "ab-alert ab-alert--error", role: "alert", children: [
|
|
7852
|
+
/* @__PURE__ */ jsx16("p", { className: "ab-text", children: feedback.message }),
|
|
7853
|
+
/* @__PURE__ */ jsx16(
|
|
7703
7854
|
"button",
|
|
7704
7855
|
{
|
|
7705
7856
|
type: "button",
|
|
@@ -7709,7 +7860,7 @@ var BookingFormClient = ({
|
|
|
7709
7860
|
}
|
|
7710
7861
|
)
|
|
7711
7862
|
] }) : null,
|
|
7712
|
-
showSpamProtection && /* @__PURE__ */
|
|
7863
|
+
showSpamProtection && /* @__PURE__ */ jsx16("div", { className: "ab-altcha", children: /* @__PURE__ */ jsx16(
|
|
7713
7864
|
AltchaWidget,
|
|
7714
7865
|
{
|
|
7715
7866
|
challengeUrl: getChallengeUrl(),
|
|
@@ -8351,10 +8502,10 @@ function buildResponsiveScopeRulePatternSource() {
|
|
|
8351
8502
|
}
|
|
8352
8503
|
|
|
8353
8504
|
// ../theme-core/src/ThemeScopeCore.tsx
|
|
8354
|
-
import { jsx as
|
|
8505
|
+
import { jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
8355
8506
|
|
|
8356
8507
|
// ../theme-core/src/ClientThemeScope.tsx
|
|
8357
|
-
import { jsx as
|
|
8508
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
8358
8509
|
|
|
8359
8510
|
// ../blocks/src/system/runtime/hooks/useBookingFormConfig.ts
|
|
8360
8511
|
import { useState as useState8, useEffect as useEffect9 } from "react";
|