@riverbankcms/sdk 0.108.0 → 0.111.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -1
- package/dist/{PreviewEditorSidebar-BBT-kZAM.mjs → PreviewEditorSidebar-CTR6LUhN.mjs} +181 -135
- package/dist/{PreviewEditorUI-D69xNKT2.mjs → PreviewEditorUI-DZg15Zip.mjs} +3 -4
- package/dist/{PreviewQueryProvider-RRu7wyQ5.mjs → PreviewQueryProvider-kkmjklLG.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-CuDjXH6o.mjs → SdkPreviewModeRuntime-DeOTAFvR.mjs} +436 -367
- package/dist/{SiteChromeCustomizeContext-BQUY2dEk.mjs → SiteChromeCustomizeContext-DOSDLCiJ.mjs} +3442 -3029
- package/dist/_dts/ai/src/contracts/proposals.d.ts +12633 -10490
- package/dist/_dts/api/src/bookingAdjustments.d.ts +5 -0
- package/dist/_dts/api/src/bookingOperations.d.ts +4 -0
- package/dist/_dts/api/src/bookingRecords.d.ts +2 -17
- package/dist/_dts/api/src/bookingRefundOutcomes.d.ts +6 -6
- package/dist/_dts/api/src/commercePortalEndpoints.d.ts +5 -5
- package/dist/_dts/api/src/common/envelope.d.ts +7 -0
- package/dist/_dts/api/src/contentRuntime.d.ts +4 -1
- package/dist/_dts/api/src/courses.d.ts +31 -15
- package/dist/_dts/api/src/customerMembershipOutcomes.d.ts +5 -5
- package/dist/_dts/api/src/endpoints.d.ts +49 -4
- package/dist/_dts/api/src/index.d.ts +3 -3
- package/dist/_dts/api/src/participantMessaging.d.ts +18 -12
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +1 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +259 -1
- package/dist/_dts/api/src/siteInfrastructure.d.ts +13 -0
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +6 -6
- package/dist/_dts/api/src/siteOperations.d.ts +11 -19
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +29 -1
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +37 -31
- package/dist/_dts/api/src/webhooks.d.ts +98 -1
- package/dist/_dts/billing/src/site-arrangements.d.ts +3 -0
- package/dist/_dts/block-form/src/widgets/BackgroundGradientWidget/BackgroundGradientField.d.ts +9 -0
- package/dist/_dts/block-form/src/widgets/BackgroundGradientWidget/BackgroundGradientWidget.d.ts +3 -4
- package/dist/_dts/blocks/src/client/course-registration.d.ts +4 -1
- package/dist/_dts/blocks/src/client.d.ts +4 -1
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +8 -8
- package/dist/_dts/blocks/src/index.d.ts +4 -2
- package/dist/_dts/blocks/src/system/blocks/audio-player.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/body-text.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/contact-newsletter.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/course-registration.d.ts +3 -23
- package/dist/_dts/blocks/src/system/blocks/courses/shared/types.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/cta-full.d.ts +5 -4
- package/dist/_dts/blocks/src/system/blocks/event-registration.d.ts +3 -23
- package/dist/_dts/blocks/src/system/blocks/events/event-listing.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/events/event-spotlight.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/events/recurring-schedule.d.ts +3 -2
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/file-download.d.ts +5 -1
- package/dist/_dts/blocks/src/system/blocks/form.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/image-gallery.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/newsletter-signup.d.ts +5 -1
- package/dist/_dts/blocks/src/system/blocks/shop.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/single-button.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/site-header.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/team-members.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/testimonials.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/video-grid.d.ts +3 -0
- package/dist/_dts/blocks/src/system/constants/background.d.ts +1 -1
- package/dist/_dts/blocks/src/system/constants/buttonRoles.d.ts +35 -0
- package/dist/_dts/blocks/src/system/customize/backgrounds.d.ts +16 -6
- package/dist/_dts/blocks/src/system/defineBlock.d.ts +9 -1
- package/dist/_dts/blocks/src/system/fields/button.d.ts +10 -21
- package/dist/_dts/blocks/src/system/fields/ctas.d.ts +10 -1
- package/dist/_dts/blocks/src/system/fragments/library/heroCtaRow.d.ts +9 -5
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +31 -0
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +24 -24
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +12 -12
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessWholeSeriesRegistrationFlow.d.ts +29 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/buttonAffordance.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/ErrorStep.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/PaymentFailedStep.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/VerifyingTimeoutStep.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/types.d.ts +21 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCourseRegistrationWizard.d.ts +4 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/whole-series-registration.headless.contract.d.ts +326 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/whole-series-registration.headless.planning.d.ts +27 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration.interactive.d.ts +5 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +5 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/file-download.d.ts +2 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.types.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/shared/contract-schemas.d.ts +7 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/shop.interactive.d.ts +7 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/shop.types.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/shared/types.d.ts +2 -1
- package/dist/_dts/content-editor/src/FooterComposerPanel.d.ts +4 -2
- package/dist/_dts/content-editor/src/index.d.ts +12 -12
- package/dist/_dts/content-editor/src/ui/editorUiStore.d.ts +17 -2
- package/dist/_dts/content-model/src/content-types/entryValidation.d.ts +31 -0
- package/dist/_dts/content-model/src/content-types/scaffold.d.ts +58 -0
- package/dist/_dts/content-model/src/content-types/sentinels.d.ts +36 -0
- package/dist/_dts/content-model/src/index.d.ts +3 -0
- package/dist/_dts/core/src/booking-date-time.d.ts +8 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +3278 -3196
- package/dist/_dts/editor-blocks/src/widgets/button/context.d.ts +3 -2
- package/dist/_dts/media-core/src/fileMimeDetection.d.ts +16 -0
- package/dist/_dts/media-core/src/fileStorage.d.ts +8 -0
- package/dist/_dts/media-core/src/storagePathDomain.d.ts +2 -0
- package/dist/_dts/media-core/src/uploadVerificationContract.d.ts +3 -0
- package/dist/_dts/preview-next/src/client/blocks/BlockToolbar.d.ts +2 -0
- package/dist/_dts/preview-next/src/client/index.d.ts +3 -2
- package/dist/_dts/preview-next/src/client/preview/ButtonStylePicker.d.ts +16 -0
- package/dist/_dts/preview-next/src/client/preview/PageBlockEditorPanel.d.ts +2 -3
- package/dist/_dts/preview-next/src/client/preview/PreviewDesignOpenRequestContext.d.ts +7 -0
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +5 -11
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +5 -6
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +6 -7
- package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeContext.d.ts +7 -9
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.d.ts +4 -11
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +8 -7
- package/dist/_dts/preview-next/src/client/preview/sidebarTabPreference.d.ts +0 -8
- package/dist/_dts/preview-next/src/client/preview/siteChromeLookRows.d.ts +1 -11
- package/dist/_dts/preview-next/src/client/preview/siteChromeQuickControlHistoryState.d.ts +1 -5
- package/dist/_dts/preview-next/src/client/preview/siteChromeSavePlan.d.ts +2 -3
- package/dist/_dts/preview-next/src/client/preview/siteStylePreviewPlanner.d.ts +3 -4
- package/dist/_dts/preview-next/src/client/preview/styleConfiguratorApplyPayload.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/styleConfiguratorSnapshot.d.ts +3 -5
- package/dist/_dts/sdk/src/bookings/index.d.ts +5 -4
- package/dist/_dts/sdk/src/bookings/types.d.ts +3 -3
- package/dist/_dts/sdk/src/cli/commands/audit.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/commands/compare.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/commands/deploy.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/commands/drafts.d.ts +18 -0
- package/dist/_dts/sdk/src/cli/commands/entry.d.ts +15 -0
- package/dist/_dts/sdk/src/cli/commands/init-docs.d.ts +2 -2
- package/dist/_dts/sdk/src/cli/commands/publish-all.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/commands/pull.d.ts +1 -0
- package/dist/_dts/sdk/src/cli/commands/push/execute/diff.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/commands/push/options.d.ts +3 -0
- package/dist/_dts/sdk/src/cli/commands/push-execute.d.ts +12 -1
- package/dist/_dts/sdk/src/cli/commands/setup.d.ts +1 -0
- package/dist/_dts/sdk/src/cli/commands/style.d.ts +3 -2
- package/dist/_dts/sdk/src/cli/commands/verify.d.ts +1 -0
- package/dist/_dts/sdk/src/cli/helpers.d.ts +22 -1
- package/dist/_dts/sdk/src/cli/index.d.ts +4 -0
- package/dist/_dts/sdk/src/cli/output.d.ts +88 -0
- package/dist/_dts/sdk/src/cli/program.d.ts +29 -0
- package/dist/_dts/sdk/src/cli/push-config.d.ts +1 -1
- package/dist/_dts/sdk/src/client/management/catalog.d.ts +10 -0
- package/dist/_dts/sdk/src/client/management/http.d.ts +7 -1
- package/dist/_dts/sdk/src/client/management/index.d.ts +1 -1
- package/dist/_dts/sdk/src/client/management/types.d.ts +45 -20
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +12 -15
- package/dist/_dts/sdk/src/date-time/index.d.ts +68 -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/sdk/src/webhooks/index.d.ts +1 -1
- package/dist/_dts/sdk/src/webhooks/verify.d.ts +3 -3
- package/dist/_dts/site-commands/src/commands.d.ts +1010 -817
- package/dist/_dts/theme-core/src/accordions/types.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/core.d.ts +15 -46
- package/dist/_dts/theme-core/src/buttons/effectClassification.d.ts +147 -0
- package/dist/_dts/theme-core/src/buttons/effects/types.d.ts +2 -3
- package/dist/_dts/theme-core/src/buttons/generateDefaultButtonSystem.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/index.d.ts +2 -1
- package/dist/_dts/theme-core/src/buttons/presets.d.ts +4 -25
- package/dist/_dts/theme-core/src/buttons/resolveButtonColourStates.d.ts +100 -0
- package/dist/_dts/theme-core/src/buttons/resolvedButtonCss.d.ts +16 -0
- package/dist/_dts/theme-core/src/buttons/styles/domain.d.ts +80 -0
- package/dist/_dts/theme-core/src/buttons/styles/index.d.ts +3 -0
- package/dist/_dts/theme-core/src/buttons/styles/recipes/defineStaticButtonStyleRecipe.d.ts +49 -0
- package/dist/_dts/theme-core/src/buttons/styles/recipes/quietArrow.d.ts +67 -0
- package/dist/_dts/theme-core/src/buttons/styles/recipes/staticRecipes.d.ts +649 -0
- package/dist/_dts/theme-core/src/buttons/styles/registry.d.ts +753 -0
- package/dist/_dts/theme-core/src/buttons/styles/selection.d.ts +69 -0
- package/dist/_dts/theme-core/src/buttons/types.d.ts +101 -83
- package/dist/_dts/theme-core/src/cards/types.d.ts +16 -16
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/gradients/presets.d.ts +200 -8
- package/dist/_dts/theme-core/src/gradients/utils.d.ts +6 -2
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +87 -126
- package/dist/_dts/theme-core/src/mock-themes/modern-minimal.d.ts +1 -1
- package/dist/_dts/theme-core/src/navigation/types.d.ts +2 -2
- package/dist/_dts/theme-core/src/palette/curated/index.d.ts +2 -2
- package/dist/_dts/theme-core/src/palette/curated/types.d.ts +5 -8
- package/dist/_dts/theme-core/src/palette/index.d.ts +0 -1
- package/dist/_dts/theme-core/src/schema.d.ts +112 -138
- package/dist/_dts/theme-core/src/site-styles/backgroundAppearance.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +26 -24
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +10 -10
- package/dist/_dts/theme-core/src/site-styles/footerLooks.d.ts +19 -153
- package/dist/_dts/theme-core/src/site-styles/headerCtaVariants.d.ts +3 -1
- package/dist/_dts/theme-core/src/site-styles/pageDesignEditorModel.d.ts +3 -2
- package/dist/_dts/theme-core/src/site-styles/pageDesignIntent.d.ts +13 -6
- package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +8 -9
- package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +33 -12
- package/dist/_dts/theme-core/src/site-styles/styleTags.d.ts +2 -2
- package/dist/_dts/ui/src/palette/hex.d.ts +3 -3
- package/dist/cli/index.mjs +68396 -67339
- package/dist/cli/init-docs/content/cli-reference.md +50 -7
- package/dist/cli/init-docs/content/content-management.md +7 -4
- package/dist/cli/init-docs/content/workflow-isr-revalidation.md +1 -1
- package/dist/cli/init-docs/content/workflow-publish.md +5 -1
- package/dist/client/{DiscountCodeDisclosure-D6TOf6Hi.mjs → DiscountCodeDisclosure-C4xvTBux.mjs} +1 -1
- package/dist/client/{EventCombined.client-Dao3zxRk.mjs → EventCombined.client-Cr7G131j.mjs} +2 -3
- package/dist/client/{EventListing.client-B2NNt4y1.mjs → EventListing.client-CAjbseNy.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-BhwFo16w.mjs → LeafletStaticMap-BMlWfwz3.mjs} +1 -1
- package/dist/client/{MagicLinkForm-BWnB7cMR.mjs → MagicLinkForm-ChdFz96y.mjs} +1 -2
- package/dist/client/{StepIndicator-TzRiQ0BY.mjs → StepIndicator-7D3GaBeM.mjs} +2 -2
- package/dist/client/{accordion-BPy-AJ4_.mjs → accordion-D8JTs2Si.mjs} +1 -1
- package/dist/client/{bookingForm-BL4PGZds.mjs → bookingForm-H3DCRBHs.mjs} +6 -7
- package/dist/client/bookings.mjs +4649 -2767
- package/dist/client/{carousel-C2b7Cn9-.mjs → carousel-DMr_QWlz.mjs} +1 -1
- package/dist/client/{cart-BQcbXIVD.mjs → cart-DWMbfBdR.mjs} +3 -3
- package/dist/client/{checkout-DEmpGRJu.mjs → checkout-zmfdkXLx.mjs} +3 -3
- package/dist/client/client.mjs +3195 -2488
- package/dist/client/{colorStyles-jZS6KfkP.mjs → colorStyles-gcTh5yZT.mjs} +2 -41
- package/dist/client/{colorTokenParts-CMugwvX_.mjs → colorTokenParts-FSS3al6l.mjs} +31 -1
- package/dist/client/{courseRegistration-BqRZPmsq.mjs → courseRegistration-Z_mn18jy.mjs} +100 -37
- package/dist/client/{eventCalendar-B8N_tSl5.mjs → eventCalendar-CYp0YJGF.mjs} +4 -5
- package/dist/client/{eventCombined-Gjn6gtq7.mjs → eventCombined-rKyYZUa9.mjs} +2 -2
- package/dist/client/{eventDetails-M-VCxA-r.mjs → eventDetails-X0ZaUuMj.mjs} +3 -3
- package/dist/client/{eventListing-DR19hqYi.mjs → eventListing-W1SuL7EP.mjs} +2 -2
- package/dist/client/{eventRegistration-BR02a0k3.mjs → eventRegistration-ClWricui.mjs} +6 -7
- package/dist/client/{form-LY2xIbwg.mjs → form--eKPwAAD.mjs} +1 -2
- package/dist/client/{headerSection-CYwwXJfh.mjs → headerSection-BSeGr-FS.mjs} +2 -3
- package/dist/client/hooks.mjs +2169 -2093
- package/dist/client/{locationMap-DWnBXrFq.mjs → locationMap-BpOrtNYn.mjs} +8 -5
- package/dist/client/{media-DHtSxS5V.mjs → media-DoF0dcVx.mjs} +4 -3
- package/dist/client/{newsletterForm-D9s-fQ2P.mjs → newsletterForm-Bt7it7Dy.mjs} +1 -2
- package/dist/client/{pricing-DDq80oYc.mjs → pricing-BTjSDDr4.mjs} +1 -1
- package/dist/client/{productDetail-B0SbWd45.mjs → productDetail-ICnVTcCg.mjs} +3 -3
- package/dist/client/{productList-PwYlZn0y.mjs → productList-ZHr6D604.mjs} +3 -3
- package/dist/client/{propsDecoder-BRWBiH7i.mjs → propsDecoder-wWN0tBDF.mjs} +2484 -223
- package/dist/client/rendering/client.mjs +2532 -2144
- package/dist/client/rendering/islands.mjs +20 -20
- package/dist/client/rendering.mjs +3322 -2462
- package/dist/client/{shop-CMwZPYME.mjs → shop-C1u_BUn0.mjs} +5 -6
- package/dist/client/{shop-commerce-BuxsFate.mjs → shop-commerce-CleZdRha.mjs} +5 -6
- package/dist/client/{shop-commerce-store-boYlEJ91.mjs → shop-commerce-store-ycnoB2Ce.mjs} +1 -1
- package/dist/client/{shopShared-D2naaOes.mjs → shopShared-CPhByt2a.mjs} +3 -3
- package/dist/client/{useDiscountCodeUi-D9RHpVoj.mjs → useDiscountCodeUi-cStSQI6C.mjs} +1 -1
- package/dist/client/{useEventFilters-igGiK1re.mjs → useEventFilters-DKPN7hSY.mjs} +46 -70
- package/dist/client/{usePolling-CI7MbsFB.mjs → usePolling-BKAd6pkZ.mjs} +2 -2
- package/dist/preview-next/before-render.mjs +72 -6
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/middleware.mjs +72 -6
- package/dist/{previewAuthStore-a_cBD28m.mjs → previewAuthStore-BkT1D06A.mjs} +72 -6
- package/dist/{sdk-runtime-MBzD-GmP.mjs → sdk-runtime-hu3wr3ng.mjs} +2 -2
- package/dist/{separator-5ahRBC85.mjs → separator-Bln8izQ9.mjs} +1 -1
- package/dist/server/components.mjs +3123 -2391
- package/dist/server/config-validation.mjs +2169 -2093
- package/dist/server/config.mjs +2169 -2093
- package/dist/server/data.mjs +2169 -2093
- package/dist/server/date-time.mjs +386 -0
- package/dist/server/index.mjs +73 -7
- package/dist/server/next/revalidate.mjs +53 -1
- package/dist/server/next.mjs +3195 -2397
- package/dist/server/page-converter.mjs +2192 -1945
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +2844 -2325
- package/dist/server/rendering.mjs +3123 -2391
- package/dist/server/routing.mjs +2269 -2149
- package/dist/server/server.mjs +2244 -2102
- package/dist/server/theme-bridge.mjs +2720 -1887
- package/dist/server/theme.mjs +1669 -1322
- package/dist/server/webhooks.mjs +54 -2
- package/dist/styles/index.css +5 -0
- package/package.json +7 -1
- package/dist/_dts/theme-core/src/buttons/personalities/brushed-wash.d.ts +0 -16
- package/dist/_dts/theme-core/src/buttons/personalities/confident-chip.d.ts +0 -16
- package/dist/_dts/theme-core/src/buttons/personalities/earth-pill.d.ts +0 -16
- package/dist/_dts/theme-core/src/buttons/personalities/editorial-link.d.ts +0 -16
- package/dist/_dts/theme-core/src/buttons/personalities/flat-ink.d.ts +0 -20
- package/dist/_dts/theme-core/src/buttons/personalities/index.d.ts +0 -172
- package/dist/_dts/theme-core/src/buttons/personalities/ink-stamp.d.ts +0 -16
- package/dist/_dts/theme-core/src/buttons/personalities/joy-stamp.d.ts +0 -22
- package/dist/_dts/theme-core/src/buttons/personalities/ornate-ritual.d.ts +0 -16
- package/dist/_dts/theme-core/src/buttons/personalities/pebble.d.ts +0 -16
- package/dist/_dts/theme-core/src/buttons/personalities/quiet-arrow.d.ts +0 -17
- package/dist/_dts/theme-core/src/buttons/personalities/showtime-pill.d.ts +0 -17
- package/dist/_dts/theme-core/src/buttons/personalities/soft-pill.d.ts +0 -16
- package/dist/_dts/theme-core/src/buttons/personalities/two-tone-pill.d.ts +0 -17
- package/dist/_dts/theme-core/src/buttons/personalities/types.d.ts +0 -273
- package/dist/_dts/theme-core/src/buttons/presets/types.d.ts +0 -88
- package/dist/_dts/theme-core/src/buttons/utils/contrast.d.ts +0 -38
- package/dist/_dts/theme-core/src/palette/themePaletteCompatibility.d.ts +0 -57
- package/dist/client/buttons-EBjyslaX.mjs +0 -1852
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as err$1, a as parseAspectRatioValue, c as parseEventSeriesId, s as parseEventOfferingId, t as parseColorTokenParts, v as ok$1 } from "./colorTokenParts-FSS3al6l.mjs";
|
|
2
2
|
import z, { z as z$1 } from "zod";
|
|
3
3
|
//#region ../core/src/assert-never.ts
|
|
4
4
|
function assertNever$2(value, message = "Unexpected variant") {
|
|
@@ -201,19 +201,29 @@ const DEFAULT_BOOKING_DATE_TIME_FORMAT = {
|
|
|
201
201
|
minute: "2-digit"
|
|
202
202
|
};
|
|
203
203
|
const LOCAL_DATE_PATTERN = /^(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})$/u;
|
|
204
|
+
const DATE_TIME_FORMATTER_CACHE_LIMIT = 100;
|
|
205
|
+
const dateTimeFormatterCache = /* @__PURE__ */ new Map();
|
|
206
|
+
const timeZoneValidityCache = /* @__PURE__ */ new Map();
|
|
204
207
|
function isValidTimeZone$1(timeZone) {
|
|
208
|
+
const cached = timeZoneValidityCache.get(timeZone);
|
|
209
|
+
if (cached !== void 0) return cached;
|
|
210
|
+
let isValid;
|
|
205
211
|
try {
|
|
206
212
|
new Intl.DateTimeFormat(DEFAULT_LOCALE, { timeZone }).format(/* @__PURE__ */ new Date());
|
|
207
|
-
|
|
213
|
+
isValid = true;
|
|
208
214
|
} catch {
|
|
209
|
-
|
|
215
|
+
isValid = false;
|
|
210
216
|
}
|
|
217
|
+
if (timeZoneValidityCache.size >= DATE_TIME_FORMATTER_CACHE_LIMIT) timeZoneValidityCache.clear();
|
|
218
|
+
timeZoneValidityCache.set(timeZone, isValid);
|
|
219
|
+
return isValid;
|
|
211
220
|
}
|
|
212
221
|
function getSafeTimeZone(timeZone) {
|
|
213
222
|
const normalized = typeof timeZone === "string" ? timeZone.trim() : "";
|
|
214
223
|
return normalized.length > 0 && isValidTimeZone$1(normalized) ? normalized : FALLBACK_TIMEZONE;
|
|
215
224
|
}
|
|
216
225
|
function parseStrictBookingTimeZone(timeZone) {
|
|
226
|
+
if (typeof timeZone !== "string") return null;
|
|
217
227
|
const normalized = timeZone.trim();
|
|
218
228
|
if (normalized.length === 0 || !isValidTimeZone$1(normalized)) return null;
|
|
219
229
|
return normalized;
|
|
@@ -226,10 +236,19 @@ function formatParseError(error) {
|
|
|
226
236
|
}
|
|
227
237
|
}
|
|
228
238
|
function formatToPartsLookup(date, locale, timeZone, format) {
|
|
229
|
-
return new Map(
|
|
239
|
+
return new Map(getCachedDateTimeFormatter(locale, timeZone, format).formatToParts(date).map((part) => [part.type, part.value]));
|
|
240
|
+
}
|
|
241
|
+
function getCachedDateTimeFormatter(locale, timeZone, format) {
|
|
242
|
+
const key = `${locale}\u0000${timeZone}\u0000${JSON.stringify(Object.entries(format).sort(([left], [right]) => left.localeCompare(right)))}`;
|
|
243
|
+
const cached = dateTimeFormatterCache.get(key);
|
|
244
|
+
if (cached !== void 0) return cached;
|
|
245
|
+
const formatter = new Intl.DateTimeFormat(locale, {
|
|
230
246
|
...format,
|
|
231
247
|
timeZone
|
|
232
|
-
})
|
|
248
|
+
});
|
|
249
|
+
if (dateTimeFormatterCache.size >= DATE_TIME_FORMATTER_CACHE_LIMIT) dateTimeFormatterCache.clear();
|
|
250
|
+
dateTimeFormatterCache.set(key, formatter);
|
|
251
|
+
return formatter;
|
|
233
252
|
}
|
|
234
253
|
function getZonedDateTimeParts(date, timeZone) {
|
|
235
254
|
const parts = formatToPartsLookup(date, "en-GB", timeZone, {
|
|
@@ -282,23 +301,9 @@ function toUtcIsoDateTimeString(value) {
|
|
|
282
301
|
return parsed.value;
|
|
283
302
|
}
|
|
284
303
|
function parseScheduledBookingDateTime(input) {
|
|
304
|
+
let startsAt;
|
|
285
305
|
try {
|
|
286
|
-
|
|
287
|
-
const timeZone = parseStrictBookingTimeZone(input.timeZone);
|
|
288
|
-
if (timeZone === null) return {
|
|
289
|
-
ok: false,
|
|
290
|
-
field: "timeZone",
|
|
291
|
-
reason: "invalid_time_zone",
|
|
292
|
-
value: input.timeZone
|
|
293
|
-
};
|
|
294
|
-
return {
|
|
295
|
-
ok: true,
|
|
296
|
-
value: {
|
|
297
|
-
startsAt,
|
|
298
|
-
timeZone,
|
|
299
|
-
locale: input.locale
|
|
300
|
-
}
|
|
301
|
-
};
|
|
306
|
+
startsAt = toUtcIsoDateTimeString(input.startsAt);
|
|
302
307
|
} catch {
|
|
303
308
|
return {
|
|
304
309
|
ok: false,
|
|
@@ -307,6 +312,21 @@ function parseScheduledBookingDateTime(input) {
|
|
|
307
312
|
value: input.startsAt
|
|
308
313
|
};
|
|
309
314
|
}
|
|
315
|
+
const timeZone = parseStrictBookingTimeZone(input.timeZone);
|
|
316
|
+
if (timeZone === null) return {
|
|
317
|
+
ok: false,
|
|
318
|
+
field: "timeZone",
|
|
319
|
+
reason: "invalid_time_zone",
|
|
320
|
+
value: typeof input.timeZone === "string" ? input.timeZone : ""
|
|
321
|
+
};
|
|
322
|
+
return {
|
|
323
|
+
ok: true,
|
|
324
|
+
value: {
|
|
325
|
+
startsAt,
|
|
326
|
+
timeZone,
|
|
327
|
+
locale: input.locale
|
|
328
|
+
}
|
|
329
|
+
};
|
|
310
330
|
}
|
|
311
331
|
function parseScheduledBookingDateRange(input) {
|
|
312
332
|
const start = parseScheduledBookingDateTime(input);
|
|
@@ -345,10 +365,7 @@ function toScheduledBookingDateRange(input) {
|
|
|
345
365
|
function formatBookingInstant(isoString, options) {
|
|
346
366
|
const date = new Date(isoString);
|
|
347
367
|
if (Number.isNaN(date.getTime())) return isoString;
|
|
348
|
-
return
|
|
349
|
-
...options.format,
|
|
350
|
-
timeZone: getSafeTimeZone(options.timeZone)
|
|
351
|
-
}).format(date);
|
|
368
|
+
return getCachedDateTimeFormatter(options.locale ?? DEFAULT_LOCALE, getSafeTimeZone(options.timeZone), options.format).format(date);
|
|
352
369
|
}
|
|
353
370
|
function formatBookingDate(input, format = {
|
|
354
371
|
weekday: "long",
|
|
@@ -1402,98 +1419,2433 @@ const coursePricingSchema = z$1.object({
|
|
|
1402
1419
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
1403
1420
|
options: z$1.array(coursePricingOptionSchema)
|
|
1404
1421
|
});
|
|
1405
|
-
/**
|
|
1406
|
-
* Zod schema for public course data
|
|
1407
|
-
*/
|
|
1408
|
-
const publicCourseSchema = z$1.object({
|
|
1409
|
-
id: z$1.string(),
|
|
1410
|
-
seriesId: z$1.string(),
|
|
1411
|
-
title: z$1.string(),
|
|
1412
|
-
slug: z$1.string(),
|
|
1413
|
-
description: z$1.unknown().nullable(),
|
|
1414
|
-
teamMembers: z$1.array(courseTeamMemberSummarySchema).optional(),
|
|
1415
|
-
enrollmentOpen: z$1.boolean(),
|
|
1416
|
-
pricing: coursePricingSchema.optional(),
|
|
1417
|
-
priceCents: z$1.number().nullable(),
|
|
1418
|
-
currency: z$1.string(),
|
|
1419
|
-
paymentTerms: blockBookingPaymentTermsSchema,
|
|
1420
|
-
enrollmentCapacity: z$1.number().nullable(),
|
|
1421
|
-
acceptsMemberships: z$1.boolean(),
|
|
1422
|
-
status: z$1.enum([
|
|
1423
|
-
"active",
|
|
1424
|
-
"draft",
|
|
1425
|
-
"cancelled"
|
|
1426
|
-
]),
|
|
1427
|
-
sessionsCount: z$1.number(),
|
|
1428
|
-
enrolledCount: z$1.number(),
|
|
1429
|
-
availableSpots: z$1.number().nullable(),
|
|
1430
|
-
sessions: z$1.array(courseSessionSchema),
|
|
1431
|
-
venue: courseVenueSchema.nullable(),
|
|
1432
|
-
contentEntryId: z$1.string().nullable()
|
|
1422
|
+
/**
|
|
1423
|
+
* Zod schema for public course data
|
|
1424
|
+
*/
|
|
1425
|
+
const publicCourseSchema = z$1.object({
|
|
1426
|
+
id: z$1.string(),
|
|
1427
|
+
seriesId: z$1.string(),
|
|
1428
|
+
title: z$1.string(),
|
|
1429
|
+
slug: z$1.string(),
|
|
1430
|
+
description: z$1.unknown().nullable(),
|
|
1431
|
+
teamMembers: z$1.array(courseTeamMemberSummarySchema).optional(),
|
|
1432
|
+
enrollmentOpen: z$1.boolean(),
|
|
1433
|
+
pricing: coursePricingSchema.optional(),
|
|
1434
|
+
priceCents: z$1.number().nullable(),
|
|
1435
|
+
currency: z$1.string(),
|
|
1436
|
+
paymentTerms: blockBookingPaymentTermsSchema,
|
|
1437
|
+
enrollmentCapacity: z$1.number().nullable(),
|
|
1438
|
+
acceptsMemberships: z$1.boolean(),
|
|
1439
|
+
status: z$1.enum([
|
|
1440
|
+
"active",
|
|
1441
|
+
"draft",
|
|
1442
|
+
"cancelled"
|
|
1443
|
+
]),
|
|
1444
|
+
sessionsCount: z$1.number(),
|
|
1445
|
+
enrolledCount: z$1.number(),
|
|
1446
|
+
availableSpots: z$1.number().nullable(),
|
|
1447
|
+
sessions: z$1.array(courseSessionSchema),
|
|
1448
|
+
venue: courseVenueSchema.nullable(),
|
|
1449
|
+
contentEntryId: z$1.string().nullable()
|
|
1450
|
+
});
|
|
1451
|
+
z$1.array(publicCourseSchema);
|
|
1452
|
+
//#endregion
|
|
1453
|
+
//#region ../blocks/src/system/blocks/event-registration.shared.ts
|
|
1454
|
+
/**
|
|
1455
|
+
* Flat occurrence context passed from `PageRenderer.$root.occurrenceContext`.
|
|
1456
|
+
* Kept in a shared module so the block definition and runtime contracts can
|
|
1457
|
+
* depend on the same schema without creating an initialization cycle.
|
|
1458
|
+
*/
|
|
1459
|
+
const occurrenceContextSchema$1 = z$1.object({
|
|
1460
|
+
id: z$1.string(),
|
|
1461
|
+
seriesId: z$1.string(),
|
|
1462
|
+
startsAt: z$1.string(),
|
|
1463
|
+
endsAt: z$1.string(),
|
|
1464
|
+
timeZone: z$1.string(),
|
|
1465
|
+
capacityOverride: z$1.number().nullable().optional(),
|
|
1466
|
+
overrides: z$1.record(z$1.string(), z$1.unknown()).nullable().optional()
|
|
1467
|
+
}).nullable();
|
|
1468
|
+
//#endregion
|
|
1469
|
+
//#region ../blocks/src/system/constants/events.ts
|
|
1470
|
+
/**
|
|
1471
|
+
* Content type slugs that represent event content.
|
|
1472
|
+
* These are the standard slugs used when creating event content types in the CMS.
|
|
1473
|
+
*
|
|
1474
|
+
* Used by:
|
|
1475
|
+
* - Occurrence resolution to detect event pages
|
|
1476
|
+
* - Event Calendar block to identify event content
|
|
1477
|
+
* - Content type definitions
|
|
1478
|
+
*/
|
|
1479
|
+
const EVENT_CONTENT_TYPE_SLUGS = ["event", "events"];
|
|
1480
|
+
const eventCalendarDisplayModeValues = [
|
|
1481
|
+
"combined",
|
|
1482
|
+
"calendar",
|
|
1483
|
+
"list",
|
|
1484
|
+
"timetable",
|
|
1485
|
+
"week-board"
|
|
1486
|
+
];
|
|
1487
|
+
const eventCalendarDefaultViewValues = ["month", "week"];
|
|
1488
|
+
const eventCalendarListLayoutValues = [
|
|
1489
|
+
"stack",
|
|
1490
|
+
"grid",
|
|
1491
|
+
"compact"
|
|
1492
|
+
];
|
|
1493
|
+
/**
|
|
1494
|
+
* Check if a content type slug represents an event type
|
|
1495
|
+
*/
|
|
1496
|
+
function isEventContentType(slug) {
|
|
1497
|
+
if (!slug) return false;
|
|
1498
|
+
return EVENT_CONTENT_TYPE_SLUGS.includes(slug);
|
|
1499
|
+
}
|
|
1500
|
+
//#endregion
|
|
1501
|
+
//#region ../theme-core/src/buttons/effectClassification.ts
|
|
1502
|
+
/**
|
|
1503
|
+
* Exhaustive live policy for every registered effect id.
|
|
1504
|
+
*
|
|
1505
|
+
* The resolver consumes the transition payload directly, so adding an effect
|
|
1506
|
+
* cannot update classification without also defining its runtime behavior.
|
|
1507
|
+
*/
|
|
1508
|
+
const BUTTON_EFFECT_POLICIES = {
|
|
1509
|
+
"darken-background": {
|
|
1510
|
+
classification: "colour-transition",
|
|
1511
|
+
transition: {
|
|
1512
|
+
kind: "adjust-shade",
|
|
1513
|
+
direction: "darker"
|
|
1514
|
+
}
|
|
1515
|
+
},
|
|
1516
|
+
"lighten-background": {
|
|
1517
|
+
classification: "colour-transition",
|
|
1518
|
+
transition: {
|
|
1519
|
+
kind: "adjust-shade",
|
|
1520
|
+
direction: "lighter"
|
|
1521
|
+
}
|
|
1522
|
+
},
|
|
1523
|
+
"background-on-hover": {
|
|
1524
|
+
classification: "colour-transition",
|
|
1525
|
+
transition: { kind: "replace-background" }
|
|
1526
|
+
},
|
|
1527
|
+
"background-on-hover-alpha": {
|
|
1528
|
+
classification: "unsupported-colour",
|
|
1529
|
+
reason: "alpha_requires_surface"
|
|
1530
|
+
},
|
|
1531
|
+
"fade-background": {
|
|
1532
|
+
classification: "unsupported-colour",
|
|
1533
|
+
reason: "changes_element_opacity"
|
|
1534
|
+
},
|
|
1535
|
+
"opacity-reduce": {
|
|
1536
|
+
classification: "unsupported-colour",
|
|
1537
|
+
reason: "changes_element_opacity"
|
|
1538
|
+
},
|
|
1539
|
+
"gradient-text": {
|
|
1540
|
+
classification: "unsupported-colour",
|
|
1541
|
+
reason: "changes_foreground"
|
|
1542
|
+
},
|
|
1543
|
+
"text-color-change": {
|
|
1544
|
+
classification: "unsupported-colour",
|
|
1545
|
+
reason: "changes_foreground"
|
|
1546
|
+
},
|
|
1547
|
+
"border-color-change": {
|
|
1548
|
+
classification: "unsupported-colour",
|
|
1549
|
+
reason: "changes_border"
|
|
1550
|
+
},
|
|
1551
|
+
"aurora-glow": {
|
|
1552
|
+
classification: "unsupported-background-overlay",
|
|
1553
|
+
reason: "unresolved_background_overlay"
|
|
1554
|
+
},
|
|
1555
|
+
"cosmic-stardust": {
|
|
1556
|
+
classification: "unsupported-background-overlay",
|
|
1557
|
+
reason: "unresolved_background_overlay"
|
|
1558
|
+
},
|
|
1559
|
+
"gradient-border-fill": {
|
|
1560
|
+
classification: "unsupported-background-overlay",
|
|
1561
|
+
reason: "unresolved_background_overlay"
|
|
1562
|
+
},
|
|
1563
|
+
"animated-gradient-border-fill": {
|
|
1564
|
+
classification: "unsupported-background-overlay",
|
|
1565
|
+
reason: "unresolved_background_overlay"
|
|
1566
|
+
},
|
|
1567
|
+
"nav-underline": {
|
|
1568
|
+
classification: "not-button",
|
|
1569
|
+
reason: "not_button_effect"
|
|
1570
|
+
},
|
|
1571
|
+
"nav-frosted-base": {
|
|
1572
|
+
classification: "not-button",
|
|
1573
|
+
reason: "not_button_effect"
|
|
1574
|
+
},
|
|
1575
|
+
"nav-frosted-hover": {
|
|
1576
|
+
classification: "not-button",
|
|
1577
|
+
reason: "not_button_effect"
|
|
1578
|
+
},
|
|
1579
|
+
"nav-frosted-active": {
|
|
1580
|
+
classification: "not-button",
|
|
1581
|
+
reason: "not_button_effect"
|
|
1582
|
+
},
|
|
1583
|
+
"animated-gradient": { classification: "non-colour" },
|
|
1584
|
+
"border-glow": { classification: "non-colour" },
|
|
1585
|
+
"drop-shadow": { classification: "non-colour" },
|
|
1586
|
+
"inner-shadow": { classification: "non-colour" },
|
|
1587
|
+
"neumorphic-shadow": { classification: "non-colour" },
|
|
1588
|
+
"outer-glow": { classification: "non-colour" },
|
|
1589
|
+
"retro-3d-shadow": { classification: "non-colour" },
|
|
1590
|
+
"scale-up": { classification: "non-colour" },
|
|
1591
|
+
"scale-down": { classification: "non-colour" },
|
|
1592
|
+
lift: { classification: "non-colour" },
|
|
1593
|
+
"press-down": { classification: "non-colour" },
|
|
1594
|
+
pop: { classification: "non-colour" },
|
|
1595
|
+
"border-bottom-grow": { classification: "non-colour" },
|
|
1596
|
+
"sketchy-border": { classification: "non-colour" },
|
|
1597
|
+
"pulse-animation": { classification: "non-colour" }
|
|
1598
|
+
};
|
|
1599
|
+
function getButtonEffectPolicy(effectId) {
|
|
1600
|
+
return Object.prototype.hasOwnProperty.call(BUTTON_EFFECT_POLICIES, effectId) ? BUTTON_EFFECT_POLICIES[effectId] : null;
|
|
1601
|
+
}
|
|
1602
|
+
function classifyButtonEffectId(effectId) {
|
|
1603
|
+
return getButtonEffectPolicy(effectId)?.classification ?? "unknown";
|
|
1604
|
+
}
|
|
1605
|
+
//#endregion
|
|
1606
|
+
//#region ../theme-core/src/tokens/blockColorTokens.ts
|
|
1607
|
+
const blockColorTokenNames = [
|
|
1608
|
+
"text",
|
|
1609
|
+
"heading",
|
|
1610
|
+
"mutedText",
|
|
1611
|
+
"surface",
|
|
1612
|
+
"background",
|
|
1613
|
+
"foreground",
|
|
1614
|
+
"border",
|
|
1615
|
+
"primary",
|
|
1616
|
+
"secondary",
|
|
1617
|
+
"accent",
|
|
1618
|
+
"success",
|
|
1619
|
+
"warning",
|
|
1620
|
+
"info",
|
|
1621
|
+
"error",
|
|
1622
|
+
"destructive",
|
|
1623
|
+
"scrim",
|
|
1624
|
+
"shadow",
|
|
1625
|
+
"onPrimary",
|
|
1626
|
+
"onSecondary",
|
|
1627
|
+
"onAccent",
|
|
1628
|
+
"onSuccess",
|
|
1629
|
+
"onWarning",
|
|
1630
|
+
"onInfo",
|
|
1631
|
+
"onError",
|
|
1632
|
+
"onDestructive",
|
|
1633
|
+
"onSurface"
|
|
1634
|
+
];
|
|
1635
|
+
new Set(blockColorTokenNames);
|
|
1636
|
+
//#endregion
|
|
1637
|
+
//#region ../theme-core/src/tokens/themeColorTokens.ts
|
|
1638
|
+
/**
|
|
1639
|
+
* Known palette role token names. This is the low-level source of truth for
|
|
1640
|
+
* palette roles used by palette variants, Theme V2 schemas, and runtime color
|
|
1641
|
+
* reference parsing.
|
|
1642
|
+
*/
|
|
1643
|
+
const PALETTE_TOKEN_NAMES = [
|
|
1644
|
+
"primary",
|
|
1645
|
+
"primaryForeground",
|
|
1646
|
+
"secondary",
|
|
1647
|
+
"accent",
|
|
1648
|
+
"success",
|
|
1649
|
+
"warning",
|
|
1650
|
+
"destructive",
|
|
1651
|
+
"background",
|
|
1652
|
+
"surface",
|
|
1653
|
+
"surfaceAlt",
|
|
1654
|
+
"muted",
|
|
1655
|
+
"text",
|
|
1656
|
+
"border"
|
|
1657
|
+
];
|
|
1658
|
+
z$1.enum(PALETTE_TOKEN_NAMES);
|
|
1659
|
+
const themeColorBaseTokenNames = [
|
|
1660
|
+
...PALETTE_TOKEN_NAMES,
|
|
1661
|
+
...blockColorTokenNames,
|
|
1662
|
+
"white",
|
|
1663
|
+
"neutral",
|
|
1664
|
+
"primaryText",
|
|
1665
|
+
"secondaryForeground",
|
|
1666
|
+
"accentForeground"
|
|
1667
|
+
];
|
|
1668
|
+
const themeColorBaseTokenSet = new Set(themeColorBaseTokenNames);
|
|
1669
|
+
const shadeStepSet = /* @__PURE__ */ new Set([
|
|
1670
|
+
"50",
|
|
1671
|
+
"100",
|
|
1672
|
+
"200",
|
|
1673
|
+
"300",
|
|
1674
|
+
"400",
|
|
1675
|
+
"500",
|
|
1676
|
+
"600",
|
|
1677
|
+
"700",
|
|
1678
|
+
"800",
|
|
1679
|
+
"900",
|
|
1680
|
+
"950"
|
|
1681
|
+
]);
|
|
1682
|
+
function isKnownBaseToken(value) {
|
|
1683
|
+
return themeColorBaseTokenSet.has(value);
|
|
1684
|
+
}
|
|
1685
|
+
function isKnownShadeToken(value) {
|
|
1686
|
+
const match = value.match(/^([a-zA-Z][a-zA-Z0-9]*)(?:-([0-9]{2,3}))$/);
|
|
1687
|
+
if (!match) return false;
|
|
1688
|
+
const [, base, shade] = match;
|
|
1689
|
+
return Boolean(base && shade && isKnownBaseToken(base) && shadeStepSet.has(shade));
|
|
1690
|
+
}
|
|
1691
|
+
function isThemeColorTokenBase(value) {
|
|
1692
|
+
return isKnownBaseToken(value) || isKnownShadeToken(value);
|
|
1693
|
+
}
|
|
1694
|
+
function isThemeColorToken(value) {
|
|
1695
|
+
if (typeof value !== "string") return false;
|
|
1696
|
+
const parts = parseColorTokenParts(value);
|
|
1697
|
+
return parts.kind === "token" && isThemeColorTokenBase(parts.token);
|
|
1698
|
+
}
|
|
1699
|
+
function parseThemeColorToken(value) {
|
|
1700
|
+
if (!isThemeColorToken(value)) return null;
|
|
1701
|
+
return value.trim();
|
|
1702
|
+
}
|
|
1703
|
+
const themeColorTokenSchema = z$1.string().min(1).refine((value) => Boolean(isThemeColorToken(value)), "Expected a known Theme V2 color token");
|
|
1704
|
+
//#endregion
|
|
1705
|
+
//#region ../theme-core/src/buttons/types.ts
|
|
1706
|
+
/**
|
|
1707
|
+
* Standard semantic variant roles a theme exposes.
|
|
1708
|
+
*
|
|
1709
|
+
* Block content references variants by role; the active theme determines
|
|
1710
|
+
* what each role looks like.
|
|
1711
|
+
*/
|
|
1712
|
+
const VARIANT_ROLES = [
|
|
1713
|
+
"primary",
|
|
1714
|
+
"secondary",
|
|
1715
|
+
"outline",
|
|
1716
|
+
"ghost",
|
|
1717
|
+
"link",
|
|
1718
|
+
"tertiary",
|
|
1719
|
+
"accent"
|
|
1720
|
+
];
|
|
1721
|
+
function parseOpaqueButtonColourToken(value) {
|
|
1722
|
+
const token = parseThemeColorToken(value);
|
|
1723
|
+
if (token === null) return null;
|
|
1724
|
+
const parts = parseColorTokenParts(token);
|
|
1725
|
+
return parts.kind === "token" && parts.opacityPercent === null ? token : null;
|
|
1726
|
+
}
|
|
1727
|
+
function unsafeAsOpaqueButtonColourToken(value) {
|
|
1728
|
+
return value;
|
|
1729
|
+
}
|
|
1730
|
+
const opaqueButtonColourTokenSchema = themeColorTokenSchema.refine((value) => parseOpaqueButtonColourToken(value) !== null, "Button colour tokens must be opaque").transform((value) => {
|
|
1731
|
+
const token = parseOpaqueButtonColourToken(value);
|
|
1732
|
+
if (token === null) throw new Error("Invariant: opaque button token passed its schema");
|
|
1733
|
+
return token;
|
|
1734
|
+
});
|
|
1735
|
+
const cornerStyleSchema = z$1.enum([
|
|
1736
|
+
"square",
|
|
1737
|
+
"rounded",
|
|
1738
|
+
"pill"
|
|
1739
|
+
]);
|
|
1740
|
+
const shadowSizeSchema = z$1.enum([
|
|
1741
|
+
"none",
|
|
1742
|
+
"low",
|
|
1743
|
+
"medium",
|
|
1744
|
+
"high"
|
|
1745
|
+
]);
|
|
1746
|
+
const textTransformSchema = z$1.enum([
|
|
1747
|
+
"none",
|
|
1748
|
+
"uppercase",
|
|
1749
|
+
"lowercase",
|
|
1750
|
+
"capitalize"
|
|
1751
|
+
]);
|
|
1752
|
+
const fontWeightSchema = z$1.union([
|
|
1753
|
+
z$1.literal(500),
|
|
1754
|
+
z$1.literal(600),
|
|
1755
|
+
z$1.literal(700)
|
|
1756
|
+
]);
|
|
1757
|
+
const buttonTypographySchema = z$1.enum(["body", "heading"]);
|
|
1758
|
+
const letterSpacingSchema = z$1.enum([
|
|
1759
|
+
"tight",
|
|
1760
|
+
"normal",
|
|
1761
|
+
"loose"
|
|
1762
|
+
]);
|
|
1763
|
+
const hoverTransformSchema = z$1.enum([
|
|
1764
|
+
"none",
|
|
1765
|
+
"lift",
|
|
1766
|
+
"scale",
|
|
1767
|
+
"press"
|
|
1768
|
+
]);
|
|
1769
|
+
const hoverColorSchema = z$1.enum([
|
|
1770
|
+
"none",
|
|
1771
|
+
"brighten",
|
|
1772
|
+
"darken",
|
|
1773
|
+
"saturate",
|
|
1774
|
+
"token"
|
|
1775
|
+
]);
|
|
1776
|
+
const buttonPaddingPresetSchema = z$1.enum([
|
|
1777
|
+
"compact",
|
|
1778
|
+
"default",
|
|
1779
|
+
"spacious"
|
|
1780
|
+
]);
|
|
1781
|
+
const gradientStyleSchema = z$1.enum([
|
|
1782
|
+
"linear",
|
|
1783
|
+
"radial",
|
|
1784
|
+
"conic"
|
|
1785
|
+
]);
|
|
1786
|
+
const gradientSharpnessSchema = z$1.enum([
|
|
1787
|
+
"smooth",
|
|
1788
|
+
"medium",
|
|
1789
|
+
"hard"
|
|
1790
|
+
]);
|
|
1791
|
+
const prioritySchema = z$1.union([
|
|
1792
|
+
z$1.literal(1),
|
|
1793
|
+
z$1.literal(2),
|
|
1794
|
+
z$1.literal(3)
|
|
1795
|
+
]);
|
|
1796
|
+
z$1.enum(VARIANT_ROLES);
|
|
1797
|
+
const buttonSizeNameSchema = z$1.enum([
|
|
1798
|
+
"sm",
|
|
1799
|
+
"md",
|
|
1800
|
+
"lg",
|
|
1801
|
+
"xl"
|
|
1802
|
+
]);
|
|
1803
|
+
/**
|
|
1804
|
+
* CSS padding string in `"<vertical> <horizontal>"` shorthand form.
|
|
1805
|
+
*
|
|
1806
|
+
* Exactly two space-separated CSS length tokens. Each token is either the
|
|
1807
|
+
* literal `0` or a number followed by `rem`/`em`/`px`/`%`. This lets the
|
|
1808
|
+
* generator trust the shape rather than defensively defaulting downstream.
|
|
1809
|
+
*/
|
|
1810
|
+
const PADDING_TOKEN_PATTERN = /^(?:0|\d+(?:\.\d+)?(?:rem|em|px|%))$/;
|
|
1811
|
+
const paddingShorthandSchema = z$1.string().refine((value) => {
|
|
1812
|
+
const parts = value.split(/\s+/).filter(Boolean);
|
|
1813
|
+
return parts.length === 2 && parts.every((token) => PADDING_TOKEN_PATTERN.test(token));
|
|
1814
|
+
}, { message: "Padding must be two space-separated CSS length tokens (e.g. \"0.5rem 1rem\"). Use `0` for zero." });
|
|
1815
|
+
const buttonSizeConfigSchema = z$1.object({
|
|
1816
|
+
padding: paddingShorthandSchema,
|
|
1817
|
+
fontSize: z$1.string().optional()
|
|
1818
|
+
});
|
|
1819
|
+
/**
|
|
1820
|
+
* `xl` is optional on the wire so themes persisted before the `xl` size was
|
|
1821
|
+
* added (e.g. SWTS) continue to parse. When `xl` is missing the schema
|
|
1822
|
+
* backfills it from `lg`, keeping `ButtonSizes` a complete `sm/md/lg/xl` map
|
|
1823
|
+
* downstream — generators never need to deal with an undefined `xl`.
|
|
1824
|
+
*/
|
|
1825
|
+
const buttonSizesSchema = z$1.object({
|
|
1826
|
+
sm: buttonSizeConfigSchema,
|
|
1827
|
+
md: buttonSizeConfigSchema,
|
|
1828
|
+
lg: buttonSizeConfigSchema,
|
|
1829
|
+
xl: buttonSizeConfigSchema.optional()
|
|
1830
|
+
}).transform(({ sm, md, lg, xl }) => ({
|
|
1831
|
+
sm,
|
|
1832
|
+
md,
|
|
1833
|
+
lg,
|
|
1834
|
+
xl: xl ?? lg
|
|
1835
|
+
}));
|
|
1836
|
+
const canonicalButtonGlobalSettingsSchema = z$1.object({
|
|
1837
|
+
cornerStyle: cornerStyleSchema,
|
|
1838
|
+
cornerRadius: z$1.number().min(0).max(24).optional(),
|
|
1839
|
+
/**
|
|
1840
|
+
* Family-level shadow inherited by variants that don't set their own.
|
|
1841
|
+
* Optional and flat-by-default: when omitted, buttons carry no drop shadow
|
|
1842
|
+
* (`elevation: 'none'`). A personality opts the whole family into a shadow by
|
|
1843
|
+
* setting this; individual variants still override. There is no system-level
|
|
1844
|
+
* shadow-by-default — shadows only appear when explicitly declared.
|
|
1845
|
+
*/
|
|
1846
|
+
shadow: shadowSizeSchema.optional(),
|
|
1847
|
+
textTransform: textTransformSchema,
|
|
1848
|
+
fontWeight: fontWeightSchema,
|
|
1849
|
+
/**
|
|
1850
|
+
* @deprecated Set per-variant via `variant.border.widthClass` instead.
|
|
1851
|
+
* Schema field is preserved so existing presets parse; the value is unread
|
|
1852
|
+
* by the current generator and will be removed once the legacy
|
|
1853
|
+
* `primitives/content/components/Button.tsx` slot exports are deleted.
|
|
1854
|
+
*/
|
|
1855
|
+
borderWidth: z$1.union([
|
|
1856
|
+
z$1.literal(1),
|
|
1857
|
+
z$1.literal(2),
|
|
1858
|
+
z$1.literal(3)
|
|
1859
|
+
]),
|
|
1860
|
+
typography: buttonTypographySchema.optional(),
|
|
1861
|
+
fontSize: z$1.string().optional(),
|
|
1862
|
+
letterSpacing: letterSpacingSchema.optional(),
|
|
1863
|
+
italic: z$1.boolean().optional(),
|
|
1864
|
+
paddingPreset: buttonPaddingPresetSchema.optional(),
|
|
1865
|
+
hoverTransform: hoverTransformSchema,
|
|
1866
|
+
hoverColor: hoverColorSchema,
|
|
1867
|
+
hoverColorToken: opaqueButtonColourTokenSchema.optional(),
|
|
1868
|
+
gradientStyle: gradientStyleSchema.optional(),
|
|
1869
|
+
gradientAngle: z$1.number().min(0).max(360).optional(),
|
|
1870
|
+
gradientSharpness: gradientSharpnessSchema.optional()
|
|
1871
|
+
});
|
|
1872
|
+
const buttonGlobalSettingsSchema = z$1.preprocess(normalizeLegacyButtonGlobalInput, canonicalButtonGlobalSettingsSchema);
|
|
1873
|
+
const gradientDirectionSchema$1 = z$1.enum([
|
|
1874
|
+
"to-r",
|
|
1875
|
+
"to-l",
|
|
1876
|
+
"to-t",
|
|
1877
|
+
"to-b",
|
|
1878
|
+
"to-tr",
|
|
1879
|
+
"to-tl",
|
|
1880
|
+
"to-br",
|
|
1881
|
+
"to-bl"
|
|
1882
|
+
]);
|
|
1883
|
+
const buttonColourTreatmentSchema = z$1.discriminatedUnion("type", [
|
|
1884
|
+
z$1.object({
|
|
1885
|
+
type: z$1.literal("solid"),
|
|
1886
|
+
colorToken: opaqueButtonColourTokenSchema
|
|
1887
|
+
}),
|
|
1888
|
+
z$1.object({
|
|
1889
|
+
type: z$1.literal("gradient"),
|
|
1890
|
+
stops: z$1.array(opaqueButtonColourTokenSchema).min(2).transform((stops) => {
|
|
1891
|
+
const [first, second, ...rest] = stops;
|
|
1892
|
+
if (first === void 0 || second === void 0) throw new Error("Invariant: gradient stops passed the minimum length schema");
|
|
1893
|
+
return [
|
|
1894
|
+
first,
|
|
1895
|
+
second,
|
|
1896
|
+
...rest
|
|
1897
|
+
];
|
|
1898
|
+
}),
|
|
1899
|
+
direction: gradientDirectionSchema$1,
|
|
1900
|
+
foregroundToken: opaqueButtonColourTokenSchema
|
|
1901
|
+
}),
|
|
1902
|
+
z$1.object({
|
|
1903
|
+
type: z$1.literal("surface"),
|
|
1904
|
+
role: z$1.literal("link")
|
|
1905
|
+
})
|
|
1906
|
+
]);
|
|
1907
|
+
const buttonBackgroundSchema = buttonColourTreatmentSchema;
|
|
1908
|
+
const effectApplicationSchema = z$1.object({
|
|
1909
|
+
effectId: z$1.string(),
|
|
1910
|
+
options: z$1.record(z$1.string(), z$1.json()).optional()
|
|
1911
|
+
});
|
|
1912
|
+
const buttonBorderSchema = z$1.object({ widthClass: z$1.string() });
|
|
1913
|
+
const buttonVariantAffordanceSchema = z$1.object({ iconId: z$1.string().min(1) });
|
|
1914
|
+
const variantShadowSchema = z$1.object({
|
|
1915
|
+
elevation: z$1.enum([
|
|
1916
|
+
"none",
|
|
1917
|
+
"low",
|
|
1918
|
+
"medium",
|
|
1919
|
+
"high"
|
|
1920
|
+
]),
|
|
1921
|
+
softness: z$1.enum([
|
|
1922
|
+
"crisp",
|
|
1923
|
+
"soft",
|
|
1924
|
+
"hard"
|
|
1925
|
+
]).nullable(),
|
|
1926
|
+
position: z$1.enum(["bottom", "bottom-right"]).default("bottom"),
|
|
1927
|
+
colorToken: themeColorTokenSchema.optional()
|
|
1928
|
+
});
|
|
1929
|
+
const variantEffectsSchema = z$1.object({
|
|
1930
|
+
base: z$1.array(effectApplicationSchema).optional(),
|
|
1931
|
+
hover: z$1.array(effectApplicationSchema).optional(),
|
|
1932
|
+
active: z$1.array(effectApplicationSchema).optional(),
|
|
1933
|
+
focus: z$1.array(effectApplicationSchema).optional()
|
|
1934
|
+
});
|
|
1935
|
+
/**
|
|
1936
|
+
* Per-variant size overrides schema — every entry is optional.
|
|
1937
|
+
*
|
|
1938
|
+
* For each size key present, the values override the theme's `sizes` config
|
|
1939
|
+
* for that size on this variant. Missing sizes fall through to theme.sizes,
|
|
1940
|
+
* then system defaults.
|
|
1941
|
+
*/
|
|
1942
|
+
const variantSizeOverridesSchema = z$1.object({
|
|
1943
|
+
sm: buttonSizeConfigSchema.optional(),
|
|
1944
|
+
md: buttonSizeConfigSchema.optional(),
|
|
1945
|
+
lg: buttonSizeConfigSchema.optional(),
|
|
1946
|
+
xl: buttonSizeConfigSchema.optional()
|
|
1947
|
+
});
|
|
1948
|
+
/**
|
|
1949
|
+
* Unified variant schema. Every variant participates in the size system; the
|
|
1950
|
+
* optional `sizes` field lets a variant scale differently than the theme
|
|
1951
|
+
* default (e.g. link-style variants declaring zero horizontal padding at
|
|
1952
|
+
* every size).
|
|
1953
|
+
*/
|
|
1954
|
+
const canonicalButtonVariantSchema = z$1.object({
|
|
1955
|
+
id: z$1.string(),
|
|
1956
|
+
name: z$1.string().min(1).max(20),
|
|
1957
|
+
enabled: z$1.boolean(),
|
|
1958
|
+
priority: prioritySchema,
|
|
1959
|
+
background: buttonBackgroundSchema,
|
|
1960
|
+
/** Tailwind radius token (e.g. `'rounded-md'`). Omit to inherit from `global.cornerStyle`. */
|
|
1961
|
+
borderRadius: z$1.string().optional(),
|
|
1962
|
+
shadow: variantShadowSchema.optional(),
|
|
1963
|
+
border: buttonBorderSchema.optional(),
|
|
1964
|
+
hoverBackgroundToken: opaqueButtonColourTokenSchema.optional(),
|
|
1965
|
+
effects: variantEffectsSchema.optional(),
|
|
1966
|
+
sizes: variantSizeOverridesSchema.optional(),
|
|
1967
|
+
affordance: buttonVariantAffordanceSchema.optional()
|
|
1968
|
+
});
|
|
1969
|
+
/**
|
|
1970
|
+
* Temporary persisted-theme admission boundary for issue #1206.
|
|
1971
|
+
*
|
|
1972
|
+
* Production inventory on 2026-07-22 found 22 rows using the old independent
|
|
1973
|
+
* `textColorToken`/border colour shape. New source and all downstream code use
|
|
1974
|
+
* only the canonical relationship. Delete this preprocessor after the reviewed
|
|
1975
|
+
* production rewrite reports zero legacy rows.
|
|
1976
|
+
*/
|
|
1977
|
+
const buttonVariantSchema = z$1.preprocess(normalizeLegacyButtonVariantInput, canonicalButtonVariantSchema);
|
|
1978
|
+
const buttonSystemSchema = z$1.object({
|
|
1979
|
+
global: buttonGlobalSettingsSchema,
|
|
1980
|
+
variants: z$1.array(buttonVariantSchema).min(1).max(6),
|
|
1981
|
+
sizes: buttonSizesSchema.optional()
|
|
1982
|
+
});
|
|
1983
|
+
function normalizeLegacyButtonVariantInput(input) {
|
|
1984
|
+
if (!isUnknownRecord(input)) return input;
|
|
1985
|
+
const background = input.background;
|
|
1986
|
+
if (!isUnknownRecord(background)) return input;
|
|
1987
|
+
if (!(background.type === "transparent" || Object.prototype.hasOwnProperty.call(input, "textColorToken") || isUnknownRecord(input.border) && Object.prototype.hasOwnProperty.call(input.border, "colorToken") || hasLegacyButtonEffects(input.effects) || hasLegacyAlphaToken(input, background))) return input;
|
|
1988
|
+
const { textColorToken, ...withoutLegacyText } = input;
|
|
1989
|
+
const normalizedBorder = isUnknownRecord(input.border) && typeof input.border.widthClass === "string" ? { widthClass: input.border.widthClass } : input.border;
|
|
1990
|
+
const normalizedAffordance = isUnknownRecord(input.affordance) && typeof input.affordance.iconId === "string" ? { iconId: input.affordance.iconId } : input.affordance;
|
|
1991
|
+
const normalizedEffects = normalizeLegacyButtonEffects(input.effects, background.type);
|
|
1992
|
+
const hoverBackgroundToken = stripLegacyTokenAlpha(input.hoverBackgroundToken);
|
|
1993
|
+
if (background.type === "transparent") return {
|
|
1994
|
+
...withoutLegacyText,
|
|
1995
|
+
background: {
|
|
1996
|
+
type: "surface",
|
|
1997
|
+
role: "link"
|
|
1998
|
+
},
|
|
1999
|
+
border: normalizedBorder,
|
|
2000
|
+
affordance: normalizedAffordance,
|
|
2001
|
+
effects: normalizedEffects,
|
|
2002
|
+
hoverBackgroundToken
|
|
2003
|
+
};
|
|
2004
|
+
if (background.type === "gradient") {
|
|
2005
|
+
const stops = Array.isArray(background.stops) ? background.stops.map(stripLegacyTokenAlpha) : background.stops;
|
|
2006
|
+
return {
|
|
2007
|
+
...withoutLegacyText,
|
|
2008
|
+
background: {
|
|
2009
|
+
...background,
|
|
2010
|
+
stops,
|
|
2011
|
+
foregroundToken: stripLegacyTokenAlpha(background.foregroundToken ?? textColorToken)
|
|
2012
|
+
},
|
|
2013
|
+
border: normalizedBorder,
|
|
2014
|
+
affordance: normalizedAffordance,
|
|
2015
|
+
effects: normalizedEffects,
|
|
2016
|
+
hoverBackgroundToken
|
|
2017
|
+
};
|
|
2018
|
+
}
|
|
2019
|
+
return {
|
|
2020
|
+
...withoutLegacyText,
|
|
2021
|
+
background: background.type === "solid" ? {
|
|
2022
|
+
...background,
|
|
2023
|
+
colorToken: stripLegacyTokenAlpha(background.colorToken)
|
|
2024
|
+
} : background,
|
|
2025
|
+
border: normalizedBorder,
|
|
2026
|
+
affordance: normalizedAffordance,
|
|
2027
|
+
effects: normalizedEffects,
|
|
2028
|
+
hoverBackgroundToken
|
|
2029
|
+
};
|
|
2030
|
+
}
|
|
2031
|
+
function normalizeLegacyButtonGlobalInput(input) {
|
|
2032
|
+
if (!isUnknownRecord(input)) return input;
|
|
2033
|
+
const hoverColorToken = stripLegacyTokenAlpha(input.hoverColorToken);
|
|
2034
|
+
return hoverColorToken === input.hoverColorToken ? input : {
|
|
2035
|
+
...input,
|
|
2036
|
+
hoverColorToken
|
|
2037
|
+
};
|
|
2038
|
+
}
|
|
2039
|
+
function hasLegacyAlphaToken(input, background) {
|
|
2040
|
+
const stops = isUnknownArray(background.stops) ? background.stops : [];
|
|
2041
|
+
return [
|
|
2042
|
+
input.hoverBackgroundToken,
|
|
2043
|
+
background.colorToken,
|
|
2044
|
+
background.foregroundToken,
|
|
2045
|
+
...stops
|
|
2046
|
+
].some((token) => stripLegacyTokenAlpha(token) !== token);
|
|
2047
|
+
}
|
|
2048
|
+
function stripLegacyTokenAlpha(value) {
|
|
2049
|
+
if (typeof value !== "string") return value;
|
|
2050
|
+
const slashIndex = value.indexOf("/");
|
|
2051
|
+
return slashIndex < 0 ? value : value.slice(0, slashIndex);
|
|
2052
|
+
}
|
|
2053
|
+
function hasLegacyButtonEffects(input) {
|
|
2054
|
+
if (!isUnknownRecord(input)) return false;
|
|
2055
|
+
return [
|
|
2056
|
+
"base",
|
|
2057
|
+
"hover",
|
|
2058
|
+
"active",
|
|
2059
|
+
"focus"
|
|
2060
|
+
].some((state) => {
|
|
2061
|
+
const effects = input[state];
|
|
2062
|
+
return Array.isArray(effects) && effects.some((effect) => {
|
|
2063
|
+
if (!isUnknownRecord(effect) || typeof effect.effectId !== "string") return true;
|
|
2064
|
+
const classification = classifyButtonEffectId(effect.effectId);
|
|
2065
|
+
if (classification !== "colour-transition" && classification !== "non-colour") return true;
|
|
2066
|
+
return effect.effectId === "background-on-hover" && isUnknownRecord(effect.options) && stripLegacyTokenAlpha(effect.options.colorToken) !== effect.options.colorToken;
|
|
2067
|
+
});
|
|
2068
|
+
});
|
|
2069
|
+
}
|
|
2070
|
+
function normalizeLegacyButtonEffects(input, backgroundType) {
|
|
2071
|
+
if (!isUnknownRecord(input)) return input;
|
|
2072
|
+
const normalized = {};
|
|
2073
|
+
for (const state of [
|
|
2074
|
+
"base",
|
|
2075
|
+
"hover",
|
|
2076
|
+
"active",
|
|
2077
|
+
"focus"
|
|
2078
|
+
]) {
|
|
2079
|
+
const effects = input[state];
|
|
2080
|
+
if (!Array.isArray(effects)) continue;
|
|
2081
|
+
const safeEffects = effects.flatMap((effect) => {
|
|
2082
|
+
if (!isUnknownRecord(effect) || typeof effect.effectId !== "string") return [];
|
|
2083
|
+
const classification = classifyButtonEffectId(effect.effectId);
|
|
2084
|
+
if (classification === "non-colour") return [effect];
|
|
2085
|
+
if (classification !== "colour-transition") return [];
|
|
2086
|
+
if (effect.effectId === "background-on-hover") {
|
|
2087
|
+
const options = isUnknownRecord(effect.options) ? effect.options : null;
|
|
2088
|
+
const colorToken = options === null ? null : parseOpaqueButtonColourToken(stripLegacyTokenAlpha(options.colorToken));
|
|
2089
|
+
return colorToken === null ? [] : [{
|
|
2090
|
+
...effect,
|
|
2091
|
+
options: {
|
|
2092
|
+
...options,
|
|
2093
|
+
colorToken
|
|
2094
|
+
}
|
|
2095
|
+
}];
|
|
2096
|
+
}
|
|
2097
|
+
if (backgroundType !== "solid") return [];
|
|
2098
|
+
const rawAmount = isUnknownRecord(effect.options) ? effect.options.amount : void 0;
|
|
2099
|
+
const amount = typeof rawAmount === "number" && rawAmount > 0 ? Math.max(100, Math.round(rawAmount / 100) * 100) : 100;
|
|
2100
|
+
return [{
|
|
2101
|
+
...effect,
|
|
2102
|
+
options: {
|
|
2103
|
+
...isUnknownRecord(effect.options) ? effect.options : {},
|
|
2104
|
+
amount
|
|
2105
|
+
}
|
|
2106
|
+
}];
|
|
2107
|
+
});
|
|
2108
|
+
if (safeEffects.length > 0) normalized[state] = safeEffects;
|
|
2109
|
+
}
|
|
2110
|
+
return Object.keys(normalized).length === 0 ? void 0 : normalized;
|
|
2111
|
+
}
|
|
2112
|
+
function isUnknownRecord(value) {
|
|
2113
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
2114
|
+
}
|
|
2115
|
+
function isUnknownArray(value) {
|
|
2116
|
+
return Array.isArray(value);
|
|
2117
|
+
}
|
|
2118
|
+
//#endregion
|
|
2119
|
+
//#region ../theme-core/src/buttons/classNames.ts
|
|
2120
|
+
function themeButtonVariantClassNames(variant) {
|
|
2121
|
+
if (variant === "default") return [variant];
|
|
2122
|
+
return [variant, `button-${variant}`];
|
|
2123
|
+
}
|
|
2124
|
+
function themeButtonSizeClassName(size) {
|
|
2125
|
+
return `btn-${size}`;
|
|
2126
|
+
}
|
|
2127
|
+
function themeButtonClassName(spec) {
|
|
2128
|
+
return [
|
|
2129
|
+
...themeButtonVariantClassNames(spec.variant),
|
|
2130
|
+
themeButtonSizeClassName(spec.size),
|
|
2131
|
+
spec.extraClassName
|
|
2132
|
+
].filter(Boolean).join(" ");
|
|
2133
|
+
}
|
|
2134
|
+
//#endregion
|
|
2135
|
+
//#region ../theme-core/src/palette/utils/colorConversion.ts
|
|
2136
|
+
function hexToRgb(hex) {
|
|
2137
|
+
const h = hex.replace(/^#/, "");
|
|
2138
|
+
const m = h.length === 3 ? h.split("").map((c) => c + c).join("") : h;
|
|
2139
|
+
if (m.length !== 6) throw new Error("Bad hex");
|
|
2140
|
+
const int = parseInt(m, 16);
|
|
2141
|
+
return {
|
|
2142
|
+
r: int >> 16 & 255,
|
|
2143
|
+
g: int >> 8 & 255,
|
|
2144
|
+
b: int & 255
|
|
2145
|
+
};
|
|
2146
|
+
}
|
|
2147
|
+
function srgbToLinear(u) {
|
|
2148
|
+
const x = u / 255;
|
|
2149
|
+
return x <= .04045 ? x / 12.92 : Math.pow((x + .055) / 1.055, 2.4);
|
|
2150
|
+
}
|
|
2151
|
+
//#endregion
|
|
2152
|
+
//#region ../theme-core/src/palette/utils/contrast.ts
|
|
2153
|
+
function relativeLuminance(r, g, b) {
|
|
2154
|
+
const R = srgbToLinear(r), G = srgbToLinear(g), B = srgbToLinear(b);
|
|
2155
|
+
return .2126 * R + .7152 * G + .0722 * B;
|
|
2156
|
+
}
|
|
2157
|
+
buttonSizeNameSchema.options;
|
|
2158
|
+
//#endregion
|
|
2159
|
+
//#region ../theme-core/src/buttons/styles/domain.ts
|
|
2160
|
+
const PUBLIC_BUTTON_ROLES = [
|
|
2161
|
+
"primary",
|
|
2162
|
+
"secondary",
|
|
2163
|
+
"outline",
|
|
2164
|
+
"ghost",
|
|
2165
|
+
"accent"
|
|
2166
|
+
];
|
|
2167
|
+
function defineButtonStyleRecipe(recipe) {
|
|
2168
|
+
return recipe;
|
|
2169
|
+
}
|
|
2170
|
+
function materializeButtonRoles(definitions) {
|
|
2171
|
+
const primary = materializeCompleteRole("primary", definitions.primary.appearance);
|
|
2172
|
+
const secondary = materializeCompleteRole("secondary", definitions.secondary.appearance);
|
|
2173
|
+
const completeRoles = {
|
|
2174
|
+
primary,
|
|
2175
|
+
secondary
|
|
2176
|
+
};
|
|
2177
|
+
return {
|
|
2178
|
+
primary,
|
|
2179
|
+
secondary,
|
|
2180
|
+
outline: materializeSupportingRole("outline", definitions.outline, completeRoles),
|
|
2181
|
+
ghost: materializeSupportingRole("ghost", definitions.ghost, completeRoles),
|
|
2182
|
+
accent: materializeSupportingRole("accent", definitions.accent, completeRoles)
|
|
2183
|
+
};
|
|
2184
|
+
}
|
|
2185
|
+
function resolveButtonStyleRecipe(recipe, parameters) {
|
|
2186
|
+
const parsedParameters = recipe.parameterSchema.safeParse(parameters);
|
|
2187
|
+
if (!parsedParameters.success) return {
|
|
2188
|
+
kind: "error",
|
|
2189
|
+
error: {
|
|
2190
|
+
kind: "invalid-parameters",
|
|
2191
|
+
styleId: recipe.id,
|
|
2192
|
+
issues: parsedParameters.error.issues.map((issue) => issue.message)
|
|
2193
|
+
}
|
|
2194
|
+
};
|
|
2195
|
+
const definition = recipe.defineSystem(parsedParameters.data);
|
|
2196
|
+
const roles = materializeButtonRoles(definition.roles);
|
|
2197
|
+
const buttonSystem = {
|
|
2198
|
+
global: definition.global,
|
|
2199
|
+
variants: PUBLIC_BUTTON_ROLES.map((role) => roles[role]),
|
|
2200
|
+
...definition.sizes ? { sizes: definition.sizes } : {}
|
|
2201
|
+
};
|
|
2202
|
+
const parsedButtonSystem = buttonSystemSchema.safeParse(buttonSystem);
|
|
2203
|
+
if (!parsedButtonSystem.success) return {
|
|
2204
|
+
kind: "error",
|
|
2205
|
+
error: {
|
|
2206
|
+
kind: "invalid-button-system",
|
|
2207
|
+
styleId: recipe.id,
|
|
2208
|
+
issues: parsedButtonSystem.error.issues.map((issue) => issue.message)
|
|
2209
|
+
}
|
|
2210
|
+
};
|
|
2211
|
+
return {
|
|
2212
|
+
kind: "resolved",
|
|
2213
|
+
buttonSystem: parsedButtonSystem.data
|
|
2214
|
+
};
|
|
2215
|
+
}
|
|
2216
|
+
function materializeSupportingRole(role, definition, completeRoles) {
|
|
2217
|
+
if (definition.kind === "complete") return materializeCompleteRole(role, definition.appearance);
|
|
2218
|
+
return {
|
|
2219
|
+
...completeRoles[definition.from],
|
|
2220
|
+
...definition.overrides,
|
|
2221
|
+
id: role,
|
|
2222
|
+
name: roleName(role),
|
|
2223
|
+
enabled: true,
|
|
2224
|
+
priority: 3
|
|
2225
|
+
};
|
|
2226
|
+
}
|
|
2227
|
+
function materializeCompleteRole(role, appearance) {
|
|
2228
|
+
return {
|
|
2229
|
+
...appearance,
|
|
2230
|
+
id: role,
|
|
2231
|
+
name: roleName(role),
|
|
2232
|
+
enabled: true,
|
|
2233
|
+
priority: rolePriority(role)
|
|
2234
|
+
};
|
|
2235
|
+
}
|
|
2236
|
+
function roleName(role) {
|
|
2237
|
+
return role.charAt(0).toUpperCase() + role.slice(1);
|
|
2238
|
+
}
|
|
2239
|
+
function rolePriority(role) {
|
|
2240
|
+
if (role === "primary") return 1;
|
|
2241
|
+
if (role === "secondary") return 2;
|
|
2242
|
+
return 3;
|
|
2243
|
+
}
|
|
2244
|
+
//#endregion
|
|
2245
|
+
//#region ../theme-core/src/buttons/styles/selection.ts
|
|
2246
|
+
const BUTTON_STYLE_IDS = [
|
|
2247
|
+
"soft-pill",
|
|
2248
|
+
"earth-pill",
|
|
2249
|
+
"confident-chip",
|
|
2250
|
+
"editorial-link",
|
|
2251
|
+
"pebble",
|
|
2252
|
+
"ink-stamp",
|
|
2253
|
+
"flat-ink",
|
|
2254
|
+
"brushed-wash",
|
|
2255
|
+
"showtime-pill",
|
|
2256
|
+
"joy-stamp",
|
|
2257
|
+
"ornate-ritual",
|
|
2258
|
+
"quiet-arrow"
|
|
2259
|
+
];
|
|
2260
|
+
const quietArrowParametersSchema = z$1.object({ secondaryTreatment: z$1.enum(["outlined", "solid-accent"]) }).strict();
|
|
2261
|
+
const emptyParametersSchema$1 = z$1.object({}).strict();
|
|
2262
|
+
function selectionBranch(styleId, parameters) {
|
|
2263
|
+
return z$1.object({
|
|
2264
|
+
styleId: z$1.literal(styleId),
|
|
2265
|
+
parameters
|
|
2266
|
+
}).strict();
|
|
2267
|
+
}
|
|
2268
|
+
z$1.discriminatedUnion("styleId", [
|
|
2269
|
+
selectionBranch("soft-pill", emptyParametersSchema$1),
|
|
2270
|
+
selectionBranch("earth-pill", emptyParametersSchema$1),
|
|
2271
|
+
selectionBranch("confident-chip", emptyParametersSchema$1),
|
|
2272
|
+
selectionBranch("editorial-link", emptyParametersSchema$1),
|
|
2273
|
+
selectionBranch("pebble", emptyParametersSchema$1),
|
|
2274
|
+
selectionBranch("ink-stamp", emptyParametersSchema$1),
|
|
2275
|
+
selectionBranch("flat-ink", emptyParametersSchema$1),
|
|
2276
|
+
selectionBranch("brushed-wash", emptyParametersSchema$1),
|
|
2277
|
+
selectionBranch("showtime-pill", emptyParametersSchema$1),
|
|
2278
|
+
selectionBranch("joy-stamp", emptyParametersSchema$1),
|
|
2279
|
+
selectionBranch("ornate-ritual", emptyParametersSchema$1),
|
|
2280
|
+
selectionBranch("quiet-arrow", quietArrowParametersSchema)
|
|
2281
|
+
]);
|
|
2282
|
+
//#endregion
|
|
2283
|
+
//#region ../theme-core/src/buttons/styles/recipes/quietArrow.ts
|
|
2284
|
+
const quietArrowRecipe = defineButtonStyleRecipe({
|
|
2285
|
+
id: "quiet-arrow",
|
|
2286
|
+
accessibilityLabel: "Wide uppercase buttons with trailing arrows",
|
|
2287
|
+
tags: {
|
|
2288
|
+
tone: "classic",
|
|
2289
|
+
energy: "calm",
|
|
2290
|
+
motion: "subtle",
|
|
2291
|
+
era: "editorial"
|
|
2292
|
+
},
|
|
2293
|
+
parameterSchema: quietArrowParametersSchema,
|
|
2294
|
+
defaultParameters: { secondaryTreatment: "outlined" },
|
|
2295
|
+
controls: [{
|
|
2296
|
+
kind: "choice",
|
|
2297
|
+
parameter: "secondaryTreatment",
|
|
2298
|
+
label: "Secondary button treatment",
|
|
2299
|
+
options: [{
|
|
2300
|
+
value: "outlined",
|
|
2301
|
+
label: "Outlined"
|
|
2302
|
+
}, {
|
|
2303
|
+
value: "solid-accent",
|
|
2304
|
+
label: "Solid accent"
|
|
2305
|
+
}]
|
|
2306
|
+
}],
|
|
2307
|
+
defineSystem: (parameters) => ({
|
|
2308
|
+
global: {
|
|
2309
|
+
cornerStyle: "rounded",
|
|
2310
|
+
textTransform: "uppercase",
|
|
2311
|
+
fontWeight: 500,
|
|
2312
|
+
borderWidth: 1,
|
|
2313
|
+
typography: "body",
|
|
2314
|
+
fontSize: "text-sm",
|
|
2315
|
+
letterSpacing: "loose",
|
|
2316
|
+
hoverTransform: "none",
|
|
2317
|
+
hoverColor: "none"
|
|
2318
|
+
},
|
|
2319
|
+
sizes: {
|
|
2320
|
+
sm: {
|
|
2321
|
+
padding: "0.625rem 1.25rem",
|
|
2322
|
+
fontSize: "text-xs"
|
|
2323
|
+
},
|
|
2324
|
+
md: {
|
|
2325
|
+
padding: "0.8125rem 1.75rem",
|
|
2326
|
+
fontSize: "text-sm"
|
|
2327
|
+
},
|
|
2328
|
+
lg: {
|
|
2329
|
+
padding: "0.9375rem 2.125rem",
|
|
2330
|
+
fontSize: "text-sm"
|
|
2331
|
+
},
|
|
2332
|
+
xl: {
|
|
2333
|
+
padding: "1.0625rem 2.5rem",
|
|
2334
|
+
fontSize: "text-base"
|
|
2335
|
+
}
|
|
2336
|
+
},
|
|
2337
|
+
roles: {
|
|
2338
|
+
primary: {
|
|
2339
|
+
kind: "complete",
|
|
2340
|
+
appearance: {
|
|
2341
|
+
background: {
|
|
2342
|
+
type: "solid",
|
|
2343
|
+
colorToken: unsafeAsOpaqueButtonColourToken("primary")
|
|
2344
|
+
},
|
|
2345
|
+
borderRadius: "rounded-xl",
|
|
2346
|
+
affordance: { iconId: "ArrowRight" },
|
|
2347
|
+
effects: { hover: [{
|
|
2348
|
+
effectId: "darken-background",
|
|
2349
|
+
options: { amount: 100 }
|
|
2350
|
+
}] }
|
|
2351
|
+
}
|
|
2352
|
+
},
|
|
2353
|
+
secondary: {
|
|
2354
|
+
kind: "complete",
|
|
2355
|
+
appearance: parameters.secondaryTreatment === "solid-accent" ? {
|
|
2356
|
+
background: {
|
|
2357
|
+
type: "solid",
|
|
2358
|
+
colorToken: unsafeAsOpaqueButtonColourToken("accent")
|
|
2359
|
+
},
|
|
2360
|
+
borderRadius: "rounded-xl",
|
|
2361
|
+
affordance: { iconId: "ArrowRight" },
|
|
2362
|
+
effects: { hover: [{
|
|
2363
|
+
effectId: "darken-background",
|
|
2364
|
+
options: { amount: 100 }
|
|
2365
|
+
}] }
|
|
2366
|
+
} : {
|
|
2367
|
+
background: {
|
|
2368
|
+
type: "surface",
|
|
2369
|
+
role: "link"
|
|
2370
|
+
},
|
|
2371
|
+
borderRadius: "rounded-xl",
|
|
2372
|
+
border: { widthClass: "border" },
|
|
2373
|
+
affordance: { iconId: "ArrowRight" },
|
|
2374
|
+
effects: { hover: [{
|
|
2375
|
+
effectId: "background-on-hover",
|
|
2376
|
+
options: { colorToken: "surfaceAlt" }
|
|
2377
|
+
}] }
|
|
2378
|
+
}
|
|
2379
|
+
},
|
|
2380
|
+
outline: {
|
|
2381
|
+
kind: "complete",
|
|
2382
|
+
appearance: {
|
|
2383
|
+
background: {
|
|
2384
|
+
type: "surface",
|
|
2385
|
+
role: "link"
|
|
2386
|
+
},
|
|
2387
|
+
borderRadius: "rounded-xl",
|
|
2388
|
+
border: { widthClass: "border" }
|
|
2389
|
+
}
|
|
2390
|
+
},
|
|
2391
|
+
ghost: {
|
|
2392
|
+
kind: "complete",
|
|
2393
|
+
appearance: {
|
|
2394
|
+
background: {
|
|
2395
|
+
type: "surface",
|
|
2396
|
+
role: "link"
|
|
2397
|
+
},
|
|
2398
|
+
borderRadius: "rounded-xl"
|
|
2399
|
+
}
|
|
2400
|
+
},
|
|
2401
|
+
accent: {
|
|
2402
|
+
kind: "derive",
|
|
2403
|
+
from: "primary",
|
|
2404
|
+
overrides: { background: {
|
|
2405
|
+
type: "solid",
|
|
2406
|
+
colorToken: unsafeAsOpaqueButtonColourToken("accent")
|
|
2407
|
+
} }
|
|
2408
|
+
}
|
|
2409
|
+
}
|
|
2410
|
+
})
|
|
2411
|
+
});
|
|
2412
|
+
//#endregion
|
|
2413
|
+
//#region ../theme-core/src/buttons/styles/recipes/defineStaticButtonStyleRecipe.ts
|
|
2414
|
+
const emptyParametersSchema = z$1.object({}).strict();
|
|
2415
|
+
function defineStaticButtonStyleRecipe(input) {
|
|
2416
|
+
const system = normalizeSystem(input.system);
|
|
2417
|
+
return defineButtonStyleRecipe({
|
|
2418
|
+
id: input.id,
|
|
2419
|
+
accessibilityLabel: input.accessibilityLabel,
|
|
2420
|
+
tags: input.tags,
|
|
2421
|
+
parameterSchema: emptyParametersSchema,
|
|
2422
|
+
defaultParameters: {},
|
|
2423
|
+
controls: [],
|
|
2424
|
+
defineSystem: () => system
|
|
2425
|
+
});
|
|
2426
|
+
}
|
|
2427
|
+
function normalizeSystem(input) {
|
|
2428
|
+
return {
|
|
2429
|
+
global: buttonGlobalSettingsSchema.parse(input.global),
|
|
2430
|
+
...input.sizes ? { sizes: input.sizes } : {},
|
|
2431
|
+
roles: {
|
|
2432
|
+
primary: normalizeCompleteRole(input.roles.primary),
|
|
2433
|
+
secondary: normalizeCompleteRole(input.roles.secondary),
|
|
2434
|
+
outline: normalizeSupportingRole(input.roles.outline),
|
|
2435
|
+
ghost: normalizeSupportingRole(input.roles.ghost),
|
|
2436
|
+
accent: normalizeSupportingRole(input.roles.accent)
|
|
2437
|
+
}
|
|
2438
|
+
};
|
|
2439
|
+
}
|
|
2440
|
+
function normalizeCompleteRole(role) {
|
|
2441
|
+
return {
|
|
2442
|
+
kind: "complete",
|
|
2443
|
+
appearance: normalizeAppearance(role.appearance)
|
|
2444
|
+
};
|
|
2445
|
+
}
|
|
2446
|
+
function normalizeSupportingRole(role) {
|
|
2447
|
+
if (role.kind === "complete") return normalizeCompleteRole(role);
|
|
2448
|
+
return {
|
|
2449
|
+
kind: "derive",
|
|
2450
|
+
from: role.from,
|
|
2451
|
+
...role.overrides ? { overrides: normalizeAppearanceOverrides(role.overrides) } : {}
|
|
2452
|
+
};
|
|
2453
|
+
}
|
|
2454
|
+
function normalizeAppearance(appearance) {
|
|
2455
|
+
const { background, hoverBackgroundToken, ...rest } = appearance;
|
|
2456
|
+
return {
|
|
2457
|
+
...rest,
|
|
2458
|
+
background: buttonColourTreatmentSchema.parse(background),
|
|
2459
|
+
...hoverBackgroundToken ? { hoverBackgroundToken: opaqueButtonColourTokenSchema.parse(hoverBackgroundToken) } : {}
|
|
2460
|
+
};
|
|
2461
|
+
}
|
|
2462
|
+
function normalizeAppearanceOverrides(overrides) {
|
|
2463
|
+
const { background, hoverBackgroundToken, ...rest } = overrides;
|
|
2464
|
+
return {
|
|
2465
|
+
...rest,
|
|
2466
|
+
...background ? { background: buttonColourTreatmentSchema.parse(background) } : {},
|
|
2467
|
+
...hoverBackgroundToken ? { hoverBackgroundToken: opaqueButtonColourTokenSchema.parse(hoverBackgroundToken) } : {}
|
|
2468
|
+
};
|
|
2469
|
+
}
|
|
2470
|
+
//#endregion
|
|
2471
|
+
//#region ../theme-core/src/buttons/styles/recipes/staticRecipes.ts
|
|
2472
|
+
const softPillRecipe = defineStaticButtonStyleRecipe({
|
|
2473
|
+
id: "soft-pill",
|
|
2474
|
+
accessibilityLabel: "Rounded pill buttons with a gentle hover lift",
|
|
2475
|
+
tags: {
|
|
2476
|
+
tone: "classic",
|
|
2477
|
+
energy: "calm",
|
|
2478
|
+
motion: "subtle",
|
|
2479
|
+
era: "organic"
|
|
2480
|
+
},
|
|
2481
|
+
system: {
|
|
2482
|
+
global: {
|
|
2483
|
+
cornerStyle: "pill",
|
|
2484
|
+
shadow: "low",
|
|
2485
|
+
textTransform: "none",
|
|
2486
|
+
fontWeight: 500,
|
|
2487
|
+
borderWidth: 2,
|
|
2488
|
+
hoverTransform: "lift",
|
|
2489
|
+
hoverColor: "none"
|
|
2490
|
+
},
|
|
2491
|
+
roles: {
|
|
2492
|
+
primary: {
|
|
2493
|
+
kind: "complete",
|
|
2494
|
+
appearance: {
|
|
2495
|
+
background: {
|
|
2496
|
+
type: "solid",
|
|
2497
|
+
colorToken: "primary"
|
|
2498
|
+
},
|
|
2499
|
+
borderRadius: "rounded-full",
|
|
2500
|
+
shadow: {
|
|
2501
|
+
elevation: "low",
|
|
2502
|
+
softness: "soft",
|
|
2503
|
+
position: "bottom"
|
|
2504
|
+
},
|
|
2505
|
+
effects: {
|
|
2506
|
+
hover: [{
|
|
2507
|
+
effectId: "lift",
|
|
2508
|
+
options: { translateY: "-1px" }
|
|
2509
|
+
}],
|
|
2510
|
+
active: [{
|
|
2511
|
+
effectId: "scale-down",
|
|
2512
|
+
options: { scale: "0.98" }
|
|
2513
|
+
}]
|
|
2514
|
+
}
|
|
2515
|
+
}
|
|
2516
|
+
},
|
|
2517
|
+
secondary: {
|
|
2518
|
+
kind: "complete",
|
|
2519
|
+
appearance: {
|
|
2520
|
+
background: {
|
|
2521
|
+
type: "surface",
|
|
2522
|
+
role: "link"
|
|
2523
|
+
},
|
|
2524
|
+
borderRadius: "rounded-full",
|
|
2525
|
+
border: { widthClass: "border-2" },
|
|
2526
|
+
effects: { hover: [{
|
|
2527
|
+
effectId: "background-on-hover",
|
|
2528
|
+
options: { colorToken: "surface" }
|
|
2529
|
+
}] }
|
|
2530
|
+
}
|
|
2531
|
+
},
|
|
2532
|
+
outline: {
|
|
2533
|
+
kind: "complete",
|
|
2534
|
+
appearance: {
|
|
2535
|
+
background: {
|
|
2536
|
+
type: "surface",
|
|
2537
|
+
role: "link"
|
|
2538
|
+
},
|
|
2539
|
+
borderRadius: "rounded-full",
|
|
2540
|
+
border: { widthClass: "border" },
|
|
2541
|
+
effects: { hover: [{
|
|
2542
|
+
effectId: "background-on-hover",
|
|
2543
|
+
options: { colorToken: "surface" }
|
|
2544
|
+
}] }
|
|
2545
|
+
}
|
|
2546
|
+
},
|
|
2547
|
+
ghost: {
|
|
2548
|
+
kind: "complete",
|
|
2549
|
+
appearance: {
|
|
2550
|
+
background: {
|
|
2551
|
+
type: "surface",
|
|
2552
|
+
role: "link"
|
|
2553
|
+
},
|
|
2554
|
+
borderRadius: "rounded-full",
|
|
2555
|
+
effects: { hover: [{
|
|
2556
|
+
effectId: "background-on-hover",
|
|
2557
|
+
options: { colorToken: "surface" }
|
|
2558
|
+
}] }
|
|
2559
|
+
}
|
|
2560
|
+
},
|
|
2561
|
+
accent: {
|
|
2562
|
+
kind: "derive",
|
|
2563
|
+
from: "primary",
|
|
2564
|
+
overrides: { background: {
|
|
2565
|
+
type: "solid",
|
|
2566
|
+
colorToken: "accent"
|
|
2567
|
+
} }
|
|
2568
|
+
}
|
|
2569
|
+
}
|
|
2570
|
+
}
|
|
2571
|
+
});
|
|
2572
|
+
const earthPillRecipe = defineStaticButtonStyleRecipe({
|
|
2573
|
+
id: "earth-pill",
|
|
2574
|
+
accessibilityLabel: "Compact rounded buttons with a quiet hover lift",
|
|
2575
|
+
tags: {
|
|
2576
|
+
tone: "classic",
|
|
2577
|
+
energy: "calm",
|
|
2578
|
+
motion: "subtle",
|
|
2579
|
+
era: "organic"
|
|
2580
|
+
},
|
|
2581
|
+
system: {
|
|
2582
|
+
global: {
|
|
2583
|
+
cornerStyle: "pill",
|
|
2584
|
+
shadow: "low",
|
|
2585
|
+
textTransform: "none",
|
|
2586
|
+
fontWeight: 500,
|
|
2587
|
+
borderWidth: 1,
|
|
2588
|
+
hoverTransform: "lift",
|
|
2589
|
+
hoverColor: "none",
|
|
2590
|
+
typography: "body",
|
|
2591
|
+
paddingPreset: "default"
|
|
2592
|
+
},
|
|
2593
|
+
sizes: {
|
|
2594
|
+
sm: {
|
|
2595
|
+
padding: "0.5rem 1rem",
|
|
2596
|
+
fontSize: "text-sm"
|
|
2597
|
+
},
|
|
2598
|
+
md: { padding: "0.625rem 1.35rem" },
|
|
2599
|
+
lg: {
|
|
2600
|
+
padding: "0.75rem 1.65rem",
|
|
2601
|
+
fontSize: "text-lg"
|
|
2602
|
+
},
|
|
2603
|
+
xl: {
|
|
2604
|
+
padding: "0.875rem 2rem",
|
|
2605
|
+
fontSize: "text-xl"
|
|
2606
|
+
}
|
|
2607
|
+
},
|
|
2608
|
+
roles: {
|
|
2609
|
+
primary: {
|
|
2610
|
+
kind: "complete",
|
|
2611
|
+
appearance: {
|
|
2612
|
+
background: {
|
|
2613
|
+
type: "solid",
|
|
2614
|
+
colorToken: "primary"
|
|
2615
|
+
},
|
|
2616
|
+
borderRadius: "rounded-full",
|
|
2617
|
+
shadow: {
|
|
2618
|
+
elevation: "low",
|
|
2619
|
+
softness: "soft",
|
|
2620
|
+
position: "bottom"
|
|
2621
|
+
},
|
|
2622
|
+
effects: {
|
|
2623
|
+
hover: [{
|
|
2624
|
+
effectId: "lift",
|
|
2625
|
+
options: { translateY: "-1px" }
|
|
2626
|
+
}, {
|
|
2627
|
+
effectId: "background-on-hover",
|
|
2628
|
+
options: { colorToken: "accent" }
|
|
2629
|
+
}],
|
|
2630
|
+
active: [{
|
|
2631
|
+
effectId: "scale-down",
|
|
2632
|
+
options: { scale: "0.98" }
|
|
2633
|
+
}]
|
|
2634
|
+
}
|
|
2635
|
+
}
|
|
2636
|
+
},
|
|
2637
|
+
secondary: {
|
|
2638
|
+
kind: "complete",
|
|
2639
|
+
appearance: {
|
|
2640
|
+
background: {
|
|
2641
|
+
type: "surface",
|
|
2642
|
+
role: "link"
|
|
2643
|
+
},
|
|
2644
|
+
borderRadius: "rounded-full",
|
|
2645
|
+
border: { widthClass: "border" },
|
|
2646
|
+
effects: { hover: [{
|
|
2647
|
+
effectId: "background-on-hover",
|
|
2648
|
+
options: { colorToken: "muted" }
|
|
2649
|
+
}] }
|
|
2650
|
+
}
|
|
2651
|
+
},
|
|
2652
|
+
outline: {
|
|
2653
|
+
kind: "complete",
|
|
2654
|
+
appearance: {
|
|
2655
|
+
background: {
|
|
2656
|
+
type: "surface",
|
|
2657
|
+
role: "link"
|
|
2658
|
+
},
|
|
2659
|
+
borderRadius: "rounded-full",
|
|
2660
|
+
border: { widthClass: "border" },
|
|
2661
|
+
effects: { hover: [{
|
|
2662
|
+
effectId: "background-on-hover",
|
|
2663
|
+
options: { colorToken: "surfaceAlt" }
|
|
2664
|
+
}] }
|
|
2665
|
+
}
|
|
2666
|
+
},
|
|
2667
|
+
ghost: {
|
|
2668
|
+
kind: "complete",
|
|
2669
|
+
appearance: {
|
|
2670
|
+
background: {
|
|
2671
|
+
type: "surface",
|
|
2672
|
+
role: "link"
|
|
2673
|
+
},
|
|
2674
|
+
borderRadius: "rounded-full",
|
|
2675
|
+
shadow: {
|
|
2676
|
+
elevation: "none",
|
|
2677
|
+
softness: null,
|
|
2678
|
+
position: "bottom"
|
|
2679
|
+
},
|
|
2680
|
+
sizes: {
|
|
2681
|
+
sm: {
|
|
2682
|
+
padding: "0.25rem 0",
|
|
2683
|
+
fontSize: "text-sm"
|
|
2684
|
+
},
|
|
2685
|
+
md: { padding: "0.375rem 0" },
|
|
2686
|
+
lg: {
|
|
2687
|
+
padding: "0.5rem 0",
|
|
2688
|
+
fontSize: "text-lg"
|
|
2689
|
+
},
|
|
2690
|
+
xl: {
|
|
2691
|
+
padding: "0.625rem 0",
|
|
2692
|
+
fontSize: "text-xl"
|
|
2693
|
+
}
|
|
2694
|
+
}
|
|
2695
|
+
}
|
|
2696
|
+
},
|
|
2697
|
+
accent: {
|
|
2698
|
+
kind: "derive",
|
|
2699
|
+
from: "primary",
|
|
2700
|
+
overrides: { background: {
|
|
2701
|
+
type: "solid",
|
|
2702
|
+
colorToken: "accent"
|
|
2703
|
+
} }
|
|
2704
|
+
}
|
|
2705
|
+
}
|
|
2706
|
+
}
|
|
2707
|
+
});
|
|
2708
|
+
const confidentChipRecipe = defineStaticButtonStyleRecipe({
|
|
2709
|
+
id: "confident-chip",
|
|
2710
|
+
accessibilityLabel: "Moderately rounded solid buttons with a crisp hover",
|
|
2711
|
+
tags: {
|
|
2712
|
+
tone: "classic",
|
|
2713
|
+
energy: "calm",
|
|
2714
|
+
motion: "standard",
|
|
2715
|
+
era: "modern"
|
|
2716
|
+
},
|
|
2717
|
+
system: {
|
|
2718
|
+
global: {
|
|
2719
|
+
cornerStyle: "rounded",
|
|
2720
|
+
shadow: "medium",
|
|
2721
|
+
textTransform: "none",
|
|
2722
|
+
fontWeight: 600,
|
|
2723
|
+
borderWidth: 1,
|
|
2724
|
+
hoverTransform: "none",
|
|
2725
|
+
hoverColor: "none"
|
|
2726
|
+
},
|
|
2727
|
+
roles: {
|
|
2728
|
+
primary: {
|
|
2729
|
+
kind: "complete",
|
|
2730
|
+
appearance: {
|
|
2731
|
+
background: {
|
|
2732
|
+
type: "solid",
|
|
2733
|
+
colorToken: "primary"
|
|
2734
|
+
},
|
|
2735
|
+
borderRadius: "rounded-md",
|
|
2736
|
+
shadow: {
|
|
2737
|
+
elevation: "medium",
|
|
2738
|
+
softness: "soft",
|
|
2739
|
+
position: "bottom"
|
|
2740
|
+
},
|
|
2741
|
+
effects: {
|
|
2742
|
+
hover: [{
|
|
2743
|
+
effectId: "darken-background",
|
|
2744
|
+
options: { amount: 100 }
|
|
2745
|
+
}],
|
|
2746
|
+
active: [{
|
|
2747
|
+
effectId: "scale-down",
|
|
2748
|
+
options: { scale: "0.97" }
|
|
2749
|
+
}]
|
|
2750
|
+
}
|
|
2751
|
+
}
|
|
2752
|
+
},
|
|
2753
|
+
secondary: {
|
|
2754
|
+
kind: "complete",
|
|
2755
|
+
appearance: {
|
|
2756
|
+
background: {
|
|
2757
|
+
type: "solid",
|
|
2758
|
+
colorToken: "surface"
|
|
2759
|
+
},
|
|
2760
|
+
borderRadius: "rounded-md",
|
|
2761
|
+
border: { widthClass: "border" },
|
|
2762
|
+
effects: { hover: [{
|
|
2763
|
+
effectId: "background-on-hover",
|
|
2764
|
+
options: { colorToken: "background" }
|
|
2765
|
+
}] }
|
|
2766
|
+
}
|
|
2767
|
+
},
|
|
2768
|
+
outline: {
|
|
2769
|
+
kind: "complete",
|
|
2770
|
+
appearance: {
|
|
2771
|
+
background: {
|
|
2772
|
+
type: "surface",
|
|
2773
|
+
role: "link"
|
|
2774
|
+
},
|
|
2775
|
+
borderRadius: "rounded-md",
|
|
2776
|
+
border: { widthClass: "border" },
|
|
2777
|
+
effects: { hover: [{
|
|
2778
|
+
effectId: "background-on-hover",
|
|
2779
|
+
options: { colorToken: "surface" }
|
|
2780
|
+
}] }
|
|
2781
|
+
}
|
|
2782
|
+
},
|
|
2783
|
+
ghost: {
|
|
2784
|
+
kind: "complete",
|
|
2785
|
+
appearance: {
|
|
2786
|
+
background: {
|
|
2787
|
+
type: "surface",
|
|
2788
|
+
role: "link"
|
|
2789
|
+
},
|
|
2790
|
+
borderRadius: "rounded-md",
|
|
2791
|
+
effects: { hover: [{
|
|
2792
|
+
effectId: "background-on-hover",
|
|
2793
|
+
options: { colorToken: "surface" }
|
|
2794
|
+
}] }
|
|
2795
|
+
}
|
|
2796
|
+
},
|
|
2797
|
+
accent: {
|
|
2798
|
+
kind: "derive",
|
|
2799
|
+
from: "primary",
|
|
2800
|
+
overrides: { background: {
|
|
2801
|
+
type: "solid",
|
|
2802
|
+
colorToken: "accent"
|
|
2803
|
+
} }
|
|
2804
|
+
}
|
|
2805
|
+
}
|
|
2806
|
+
}
|
|
2807
|
+
});
|
|
2808
|
+
const editorialSizes = {
|
|
2809
|
+
sm: { padding: "0.25rem 0" },
|
|
2810
|
+
md: { padding: "0.5rem 0" },
|
|
2811
|
+
lg: { padding: "0.625rem 0" },
|
|
2812
|
+
xl: { padding: "0.75rem 0" }
|
|
2813
|
+
};
|
|
2814
|
+
const editorialLinkRecipe = defineStaticButtonStyleRecipe({
|
|
2815
|
+
id: "editorial-link",
|
|
2816
|
+
accessibilityLabel: "Flat typographic buttons with an underline treatment",
|
|
2817
|
+
tags: {
|
|
2818
|
+
tone: "minimal",
|
|
2819
|
+
energy: "calm",
|
|
2820
|
+
motion: "subtle",
|
|
2821
|
+
era: "editorial"
|
|
2822
|
+
},
|
|
2823
|
+
system: {
|
|
2824
|
+
global: {
|
|
2825
|
+
cornerStyle: "square",
|
|
2826
|
+
textTransform: "none",
|
|
2827
|
+
fontWeight: 500,
|
|
2828
|
+
borderWidth: 1,
|
|
2829
|
+
hoverTransform: "none",
|
|
2830
|
+
hoverColor: "none"
|
|
2831
|
+
},
|
|
2832
|
+
roles: {
|
|
2833
|
+
primary: {
|
|
2834
|
+
kind: "complete",
|
|
2835
|
+
appearance: {
|
|
2836
|
+
background: {
|
|
2837
|
+
type: "surface",
|
|
2838
|
+
role: "link"
|
|
2839
|
+
},
|
|
2840
|
+
borderRadius: "rounded-none",
|
|
2841
|
+
sizes: editorialSizes,
|
|
2842
|
+
effects: { base: [{
|
|
2843
|
+
effectId: "border-bottom-grow",
|
|
2844
|
+
options: {
|
|
2845
|
+
height: 2,
|
|
2846
|
+
colorToken: "text",
|
|
2847
|
+
origin: "left"
|
|
2848
|
+
}
|
|
2849
|
+
}] }
|
|
2850
|
+
}
|
|
2851
|
+
},
|
|
2852
|
+
secondary: {
|
|
2853
|
+
kind: "complete",
|
|
2854
|
+
appearance: {
|
|
2855
|
+
background: {
|
|
2856
|
+
type: "surface",
|
|
2857
|
+
role: "link"
|
|
2858
|
+
},
|
|
2859
|
+
borderRadius: "rounded-none",
|
|
2860
|
+
sizes: editorialSizes,
|
|
2861
|
+
effects: { base: [{
|
|
2862
|
+
effectId: "border-bottom-grow",
|
|
2863
|
+
options: {
|
|
2864
|
+
height: 1,
|
|
2865
|
+
colorToken: "mutedText",
|
|
2866
|
+
origin: "left"
|
|
2867
|
+
}
|
|
2868
|
+
}] }
|
|
2869
|
+
}
|
|
2870
|
+
},
|
|
2871
|
+
outline: {
|
|
2872
|
+
kind: "complete",
|
|
2873
|
+
appearance: {
|
|
2874
|
+
background: {
|
|
2875
|
+
type: "surface",
|
|
2876
|
+
role: "link"
|
|
2877
|
+
},
|
|
2878
|
+
borderRadius: "rounded-none",
|
|
2879
|
+
sizes: editorialSizes,
|
|
2880
|
+
effects: { base: [{
|
|
2881
|
+
effectId: "border-bottom-grow",
|
|
2882
|
+
options: {
|
|
2883
|
+
height: 1,
|
|
2884
|
+
colorToken: "accent",
|
|
2885
|
+
origin: "left"
|
|
2886
|
+
}
|
|
2887
|
+
}] }
|
|
2888
|
+
}
|
|
2889
|
+
},
|
|
2890
|
+
ghost: {
|
|
2891
|
+
kind: "complete",
|
|
2892
|
+
appearance: {
|
|
2893
|
+
background: {
|
|
2894
|
+
type: "surface",
|
|
2895
|
+
role: "link"
|
|
2896
|
+
},
|
|
2897
|
+
borderRadius: "rounded-none",
|
|
2898
|
+
sizes: editorialSizes
|
|
2899
|
+
}
|
|
2900
|
+
},
|
|
2901
|
+
accent: {
|
|
2902
|
+
kind: "derive",
|
|
2903
|
+
from: "primary",
|
|
2904
|
+
overrides: { effects: { base: [{
|
|
2905
|
+
effectId: "border-bottom-grow",
|
|
2906
|
+
options: {
|
|
2907
|
+
height: 2,
|
|
2908
|
+
colorToken: "accent",
|
|
2909
|
+
origin: "left"
|
|
2910
|
+
}
|
|
2911
|
+
}] } }
|
|
2912
|
+
}
|
|
2913
|
+
}
|
|
2914
|
+
}
|
|
2915
|
+
});
|
|
2916
|
+
const pebbleRecipe = defineStaticButtonStyleRecipe({
|
|
2917
|
+
id: "pebble",
|
|
2918
|
+
accessibilityLabel: "Generously padded pill buttons",
|
|
2919
|
+
tags: {
|
|
2920
|
+
tone: "classic",
|
|
2921
|
+
energy: "calm",
|
|
2922
|
+
motion: "standard",
|
|
2923
|
+
era: "organic"
|
|
2924
|
+
},
|
|
2925
|
+
system: {
|
|
2926
|
+
global: {
|
|
2927
|
+
cornerStyle: "pill",
|
|
2928
|
+
textTransform: "none",
|
|
2929
|
+
fontWeight: 500,
|
|
2930
|
+
borderWidth: 2,
|
|
2931
|
+
hoverTransform: "none",
|
|
2932
|
+
hoverColor: "none"
|
|
2933
|
+
},
|
|
2934
|
+
sizes: {
|
|
2935
|
+
sm: {
|
|
2936
|
+
padding: "0.625rem 1.75rem",
|
|
2937
|
+
fontSize: "text-sm"
|
|
2938
|
+
},
|
|
2939
|
+
md: { padding: "0.875rem 2.25rem" },
|
|
2940
|
+
lg: {
|
|
2941
|
+
padding: "1.125rem 2.75rem",
|
|
2942
|
+
fontSize: "text-lg"
|
|
2943
|
+
},
|
|
2944
|
+
xl: {
|
|
2945
|
+
padding: "1.5rem 3.5rem",
|
|
2946
|
+
fontSize: "text-xl"
|
|
2947
|
+
}
|
|
2948
|
+
},
|
|
2949
|
+
roles: {
|
|
2950
|
+
primary: {
|
|
2951
|
+
kind: "complete",
|
|
2952
|
+
appearance: {
|
|
2953
|
+
background: {
|
|
2954
|
+
type: "solid",
|
|
2955
|
+
colorToken: "primary"
|
|
2956
|
+
},
|
|
2957
|
+
borderRadius: "rounded-full",
|
|
2958
|
+
effects: { hover: [{
|
|
2959
|
+
effectId: "darken-background",
|
|
2960
|
+
options: { amount: 100 }
|
|
2961
|
+
}] }
|
|
2962
|
+
}
|
|
2963
|
+
},
|
|
2964
|
+
secondary: {
|
|
2965
|
+
kind: "complete",
|
|
2966
|
+
appearance: {
|
|
2967
|
+
background: {
|
|
2968
|
+
type: "surface",
|
|
2969
|
+
role: "link"
|
|
2970
|
+
},
|
|
2971
|
+
borderRadius: "rounded-full",
|
|
2972
|
+
border: { widthClass: "border-2" },
|
|
2973
|
+
effects: { hover: [{
|
|
2974
|
+
effectId: "background-on-hover",
|
|
2975
|
+
options: { colorToken: "accent" }
|
|
2976
|
+
}] }
|
|
2977
|
+
}
|
|
2978
|
+
},
|
|
2979
|
+
outline: {
|
|
2980
|
+
kind: "complete",
|
|
2981
|
+
appearance: {
|
|
2982
|
+
background: {
|
|
2983
|
+
type: "surface",
|
|
2984
|
+
role: "link"
|
|
2985
|
+
},
|
|
2986
|
+
borderRadius: "rounded-full",
|
|
2987
|
+
border: { widthClass: "border" },
|
|
2988
|
+
effects: { hover: [{
|
|
2989
|
+
effectId: "background-on-hover",
|
|
2990
|
+
options: { colorToken: "surface" }
|
|
2991
|
+
}] }
|
|
2992
|
+
}
|
|
2993
|
+
},
|
|
2994
|
+
ghost: {
|
|
2995
|
+
kind: "complete",
|
|
2996
|
+
appearance: {
|
|
2997
|
+
background: {
|
|
2998
|
+
type: "surface",
|
|
2999
|
+
role: "link"
|
|
3000
|
+
},
|
|
3001
|
+
borderRadius: "rounded-full",
|
|
3002
|
+
sizes: {
|
|
3003
|
+
sm: {
|
|
3004
|
+
padding: "0.375rem 0.875rem",
|
|
3005
|
+
fontSize: "text-sm"
|
|
3006
|
+
},
|
|
3007
|
+
md: { padding: "0.5rem 1rem" },
|
|
3008
|
+
lg: {
|
|
3009
|
+
padding: "0.625rem 1.25rem",
|
|
3010
|
+
fontSize: "text-lg"
|
|
3011
|
+
},
|
|
3012
|
+
xl: {
|
|
3013
|
+
padding: "0.75rem 1.5rem",
|
|
3014
|
+
fontSize: "text-xl"
|
|
3015
|
+
}
|
|
3016
|
+
}
|
|
3017
|
+
}
|
|
3018
|
+
},
|
|
3019
|
+
accent: {
|
|
3020
|
+
kind: "derive",
|
|
3021
|
+
from: "primary",
|
|
3022
|
+
overrides: { background: {
|
|
3023
|
+
type: "solid",
|
|
3024
|
+
colorToken: "accent"
|
|
3025
|
+
} }
|
|
3026
|
+
}
|
|
3027
|
+
}
|
|
3028
|
+
}
|
|
3029
|
+
});
|
|
3030
|
+
const brushedWashRecipe = defineStaticButtonStyleRecipe({
|
|
3031
|
+
id: "brushed-wash",
|
|
3032
|
+
accessibilityLabel: "Generously padded gradient buttons with soft shadows",
|
|
3033
|
+
tags: {
|
|
3034
|
+
tone: "classic",
|
|
3035
|
+
energy: "vibrant",
|
|
3036
|
+
motion: "standard",
|
|
3037
|
+
era: "organic"
|
|
3038
|
+
},
|
|
3039
|
+
system: {
|
|
3040
|
+
global: {
|
|
3041
|
+
cornerStyle: "rounded",
|
|
3042
|
+
shadow: "low",
|
|
3043
|
+
textTransform: "none",
|
|
3044
|
+
fontWeight: 500,
|
|
3045
|
+
borderWidth: 1,
|
|
3046
|
+
hoverTransform: "none",
|
|
3047
|
+
hoverColor: "none"
|
|
3048
|
+
},
|
|
3049
|
+
sizes: {
|
|
3050
|
+
sm: {
|
|
3051
|
+
padding: "0.75rem 2rem",
|
|
3052
|
+
fontSize: "text-sm"
|
|
3053
|
+
},
|
|
3054
|
+
md: { padding: "1rem 2.5rem" },
|
|
3055
|
+
lg: {
|
|
3056
|
+
padding: "1.25rem 3rem",
|
|
3057
|
+
fontSize: "text-lg"
|
|
3058
|
+
},
|
|
3059
|
+
xl: {
|
|
3060
|
+
padding: "1.625rem 3.75rem",
|
|
3061
|
+
fontSize: "text-xl"
|
|
3062
|
+
}
|
|
3063
|
+
},
|
|
3064
|
+
roles: {
|
|
3065
|
+
primary: {
|
|
3066
|
+
kind: "complete",
|
|
3067
|
+
appearance: {
|
|
3068
|
+
background: {
|
|
3069
|
+
type: "gradient",
|
|
3070
|
+
stops: ["primary", "accent"],
|
|
3071
|
+
direction: "to-r",
|
|
3072
|
+
foregroundToken: "primaryForeground"
|
|
3073
|
+
},
|
|
3074
|
+
borderRadius: "rounded-lg",
|
|
3075
|
+
shadow: {
|
|
3076
|
+
elevation: "low",
|
|
3077
|
+
softness: "soft",
|
|
3078
|
+
position: "bottom"
|
|
3079
|
+
}
|
|
3080
|
+
}
|
|
3081
|
+
},
|
|
3082
|
+
secondary: {
|
|
3083
|
+
kind: "complete",
|
|
3084
|
+
appearance: {
|
|
3085
|
+
background: {
|
|
3086
|
+
type: "gradient",
|
|
3087
|
+
stops: ["secondary", "accent"],
|
|
3088
|
+
direction: "to-br",
|
|
3089
|
+
foregroundToken: "primaryForeground"
|
|
3090
|
+
},
|
|
3091
|
+
borderRadius: "rounded-lg",
|
|
3092
|
+
shadow: {
|
|
3093
|
+
elevation: "low",
|
|
3094
|
+
softness: "soft",
|
|
3095
|
+
position: "bottom"
|
|
3096
|
+
}
|
|
3097
|
+
}
|
|
3098
|
+
},
|
|
3099
|
+
outline: {
|
|
3100
|
+
kind: "complete",
|
|
3101
|
+
appearance: {
|
|
3102
|
+
background: {
|
|
3103
|
+
type: "surface",
|
|
3104
|
+
role: "link"
|
|
3105
|
+
},
|
|
3106
|
+
borderRadius: "rounded-lg",
|
|
3107
|
+
border: { widthClass: "border" },
|
|
3108
|
+
effects: { hover: [{
|
|
3109
|
+
effectId: "background-on-hover",
|
|
3110
|
+
options: { colorToken: "surface" }
|
|
3111
|
+
}] }
|
|
3112
|
+
}
|
|
3113
|
+
},
|
|
3114
|
+
ghost: {
|
|
3115
|
+
kind: "complete",
|
|
3116
|
+
appearance: {
|
|
3117
|
+
background: {
|
|
3118
|
+
type: "surface",
|
|
3119
|
+
role: "link"
|
|
3120
|
+
},
|
|
3121
|
+
borderRadius: "rounded-lg",
|
|
3122
|
+
effects: { hover: [{
|
|
3123
|
+
effectId: "background-on-hover",
|
|
3124
|
+
options: { colorToken: "surface" }
|
|
3125
|
+
}] }
|
|
3126
|
+
}
|
|
3127
|
+
},
|
|
3128
|
+
accent: {
|
|
3129
|
+
kind: "derive",
|
|
3130
|
+
from: "primary",
|
|
3131
|
+
overrides: { background: {
|
|
3132
|
+
type: "solid",
|
|
3133
|
+
colorToken: "accent"
|
|
3134
|
+
} }
|
|
3135
|
+
}
|
|
3136
|
+
}
|
|
3137
|
+
}
|
|
3138
|
+
});
|
|
3139
|
+
const inkStampRecipe = defineStaticButtonStyleRecipe({
|
|
3140
|
+
id: "ink-stamp",
|
|
3141
|
+
accessibilityLabel: "Uppercase block-print buttons with a playful hover",
|
|
3142
|
+
tags: {
|
|
3143
|
+
tone: "bold",
|
|
3144
|
+
energy: "vibrant",
|
|
3145
|
+
motion: "standard",
|
|
3146
|
+
era: "organic"
|
|
3147
|
+
},
|
|
3148
|
+
system: {
|
|
3149
|
+
global: {
|
|
3150
|
+
cornerStyle: "rounded",
|
|
3151
|
+
textTransform: "uppercase",
|
|
3152
|
+
fontWeight: 600,
|
|
3153
|
+
borderWidth: 1,
|
|
3154
|
+
hoverTransform: "none",
|
|
3155
|
+
hoverColor: "none",
|
|
3156
|
+
letterSpacing: "loose"
|
|
3157
|
+
},
|
|
3158
|
+
sizes: {
|
|
3159
|
+
sm: {
|
|
3160
|
+
padding: "0.5rem 1.25rem",
|
|
3161
|
+
fontSize: "text-xs"
|
|
3162
|
+
},
|
|
3163
|
+
md: {
|
|
3164
|
+
padding: "0.75rem 1.75rem",
|
|
3165
|
+
fontSize: "text-sm"
|
|
3166
|
+
},
|
|
3167
|
+
lg: {
|
|
3168
|
+
padding: "0.875rem 2.25rem",
|
|
3169
|
+
fontSize: "text-base"
|
|
3170
|
+
},
|
|
3171
|
+
xl: {
|
|
3172
|
+
padding: "1.125rem 2.75rem",
|
|
3173
|
+
fontSize: "text-lg"
|
|
3174
|
+
}
|
|
3175
|
+
},
|
|
3176
|
+
roles: {
|
|
3177
|
+
primary: {
|
|
3178
|
+
kind: "complete",
|
|
3179
|
+
appearance: {
|
|
3180
|
+
background: {
|
|
3181
|
+
type: "solid",
|
|
3182
|
+
colorToken: "primary"
|
|
3183
|
+
},
|
|
3184
|
+
borderRadius: "rounded-md",
|
|
3185
|
+
effects: {
|
|
3186
|
+
hover: [{
|
|
3187
|
+
effectId: "drop-shadow",
|
|
3188
|
+
options: { intensity: "medium" }
|
|
3189
|
+
}, {
|
|
3190
|
+
effectId: "scale-up",
|
|
3191
|
+
options: { scale: "1.02" }
|
|
3192
|
+
}],
|
|
3193
|
+
active: [{
|
|
3194
|
+
effectId: "scale-down",
|
|
3195
|
+
options: { scale: "0.98" }
|
|
3196
|
+
}]
|
|
3197
|
+
}
|
|
3198
|
+
}
|
|
3199
|
+
},
|
|
3200
|
+
secondary: {
|
|
3201
|
+
kind: "complete",
|
|
3202
|
+
appearance: {
|
|
3203
|
+
background: {
|
|
3204
|
+
type: "surface",
|
|
3205
|
+
role: "link"
|
|
3206
|
+
},
|
|
3207
|
+
borderRadius: "rounded-md",
|
|
3208
|
+
border: { widthClass: "border-2" },
|
|
3209
|
+
effects: { hover: [{
|
|
3210
|
+
effectId: "background-on-hover",
|
|
3211
|
+
options: { colorToken: "surface" }
|
|
3212
|
+
}] }
|
|
3213
|
+
}
|
|
3214
|
+
},
|
|
3215
|
+
outline: {
|
|
3216
|
+
kind: "complete",
|
|
3217
|
+
appearance: {
|
|
3218
|
+
background: {
|
|
3219
|
+
type: "surface",
|
|
3220
|
+
role: "link"
|
|
3221
|
+
},
|
|
3222
|
+
borderRadius: "rounded-md",
|
|
3223
|
+
border: { widthClass: "border-2" },
|
|
3224
|
+
effects: { hover: [{
|
|
3225
|
+
effectId: "background-on-hover",
|
|
3226
|
+
options: { colorToken: "surface" }
|
|
3227
|
+
}] }
|
|
3228
|
+
}
|
|
3229
|
+
},
|
|
3230
|
+
ghost: {
|
|
3231
|
+
kind: "complete",
|
|
3232
|
+
appearance: {
|
|
3233
|
+
background: {
|
|
3234
|
+
type: "surface",
|
|
3235
|
+
role: "link"
|
|
3236
|
+
},
|
|
3237
|
+
borderRadius: "rounded-none",
|
|
3238
|
+
sizes: {
|
|
3239
|
+
sm: {
|
|
3240
|
+
padding: "0.375rem 0",
|
|
3241
|
+
fontSize: "text-xs"
|
|
3242
|
+
},
|
|
3243
|
+
md: {
|
|
3244
|
+
padding: "0.5rem 0",
|
|
3245
|
+
fontSize: "text-sm"
|
|
3246
|
+
},
|
|
3247
|
+
lg: {
|
|
3248
|
+
padding: "0.625rem 0",
|
|
3249
|
+
fontSize: "text-base"
|
|
3250
|
+
},
|
|
3251
|
+
xl: {
|
|
3252
|
+
padding: "0.75rem 0",
|
|
3253
|
+
fontSize: "text-lg"
|
|
3254
|
+
}
|
|
3255
|
+
},
|
|
3256
|
+
effects: { base: [{
|
|
3257
|
+
effectId: "border-bottom-grow",
|
|
3258
|
+
options: {
|
|
3259
|
+
height: 1,
|
|
3260
|
+
colorToken: "accent",
|
|
3261
|
+
origin: "left"
|
|
3262
|
+
}
|
|
3263
|
+
}] }
|
|
3264
|
+
}
|
|
3265
|
+
},
|
|
3266
|
+
accent: {
|
|
3267
|
+
kind: "derive",
|
|
3268
|
+
from: "primary",
|
|
3269
|
+
overrides: { background: {
|
|
3270
|
+
type: "solid",
|
|
3271
|
+
colorToken: "accent"
|
|
3272
|
+
} }
|
|
3273
|
+
}
|
|
3274
|
+
}
|
|
3275
|
+
}
|
|
3276
|
+
});
|
|
3277
|
+
const flatInkRecipe = defineStaticButtonStyleRecipe({
|
|
3278
|
+
id: "flat-ink",
|
|
3279
|
+
accessibilityLabel: "Flat rounded buttons with arrow affordances",
|
|
3280
|
+
tags: {
|
|
3281
|
+
tone: "classic",
|
|
3282
|
+
energy: "calm",
|
|
3283
|
+
motion: "subtle",
|
|
3284
|
+
era: "editorial"
|
|
3285
|
+
},
|
|
3286
|
+
system: {
|
|
3287
|
+
global: {
|
|
3288
|
+
cornerStyle: "rounded",
|
|
3289
|
+
textTransform: "none",
|
|
3290
|
+
fontWeight: 600,
|
|
3291
|
+
borderWidth: 1,
|
|
3292
|
+
typography: "body",
|
|
3293
|
+
letterSpacing: "tight",
|
|
3294
|
+
paddingPreset: "default",
|
|
3295
|
+
hoverTransform: "lift",
|
|
3296
|
+
hoverColor: "none"
|
|
3297
|
+
},
|
|
3298
|
+
sizes: {
|
|
3299
|
+
sm: {
|
|
3300
|
+
padding: "0.625rem 1.125rem",
|
|
3301
|
+
fontSize: "text-sm"
|
|
3302
|
+
},
|
|
3303
|
+
md: { padding: "0.8125rem 1.375rem" },
|
|
3304
|
+
lg: {
|
|
3305
|
+
padding: "0.9375rem 1.625rem",
|
|
3306
|
+
fontSize: "text-lg"
|
|
3307
|
+
},
|
|
3308
|
+
xl: {
|
|
3309
|
+
padding: "1.0625rem 2rem",
|
|
3310
|
+
fontSize: "text-xl"
|
|
3311
|
+
}
|
|
3312
|
+
},
|
|
3313
|
+
roles: {
|
|
3314
|
+
primary: {
|
|
3315
|
+
kind: "complete",
|
|
3316
|
+
appearance: {
|
|
3317
|
+
background: {
|
|
3318
|
+
type: "solid",
|
|
3319
|
+
colorToken: "primary"
|
|
3320
|
+
},
|
|
3321
|
+
borderRadius: "rounded-lg",
|
|
3322
|
+
affordance: { iconId: "ArrowRight" },
|
|
3323
|
+
effects: { hover: [{
|
|
3324
|
+
effectId: "lift",
|
|
3325
|
+
options: { translateY: "-2px" }
|
|
3326
|
+
}, {
|
|
3327
|
+
effectId: "background-on-hover",
|
|
3328
|
+
options: { colorToken: "secondary" }
|
|
3329
|
+
}] }
|
|
3330
|
+
}
|
|
3331
|
+
},
|
|
3332
|
+
secondary: {
|
|
3333
|
+
kind: "complete",
|
|
3334
|
+
appearance: {
|
|
3335
|
+
background: {
|
|
3336
|
+
type: "surface",
|
|
3337
|
+
role: "link"
|
|
3338
|
+
},
|
|
3339
|
+
borderRadius: "rounded-lg",
|
|
3340
|
+
border: { widthClass: "border" },
|
|
3341
|
+
effects: { hover: [{
|
|
3342
|
+
effectId: "lift",
|
|
3343
|
+
options: { translateY: "-2px" }
|
|
3344
|
+
}, {
|
|
3345
|
+
effectId: "background-on-hover",
|
|
3346
|
+
options: { colorToken: "surfaceAlt" }
|
|
3347
|
+
}] }
|
|
3348
|
+
}
|
|
3349
|
+
},
|
|
3350
|
+
outline: {
|
|
3351
|
+
kind: "complete",
|
|
3352
|
+
appearance: {
|
|
3353
|
+
background: {
|
|
3354
|
+
type: "surface",
|
|
3355
|
+
role: "link"
|
|
3356
|
+
},
|
|
3357
|
+
borderRadius: "rounded-lg",
|
|
3358
|
+
border: { widthClass: "border" },
|
|
3359
|
+
effects: { hover: [{
|
|
3360
|
+
effectId: "lift",
|
|
3361
|
+
options: { translateY: "-2px" }
|
|
3362
|
+
}, {
|
|
3363
|
+
effectId: "background-on-hover",
|
|
3364
|
+
options: { colorToken: "surfaceAlt" }
|
|
3365
|
+
}] }
|
|
3366
|
+
}
|
|
3367
|
+
},
|
|
3368
|
+
ghost: {
|
|
3369
|
+
kind: "complete",
|
|
3370
|
+
appearance: {
|
|
3371
|
+
background: {
|
|
3372
|
+
type: "surface",
|
|
3373
|
+
role: "link"
|
|
3374
|
+
},
|
|
3375
|
+
borderRadius: "rounded-lg",
|
|
3376
|
+
effects: { hover: [{
|
|
3377
|
+
effectId: "lift",
|
|
3378
|
+
options: { translateY: "-2px" }
|
|
3379
|
+
}] }
|
|
3380
|
+
}
|
|
3381
|
+
},
|
|
3382
|
+
accent: {
|
|
3383
|
+
kind: "complete",
|
|
3384
|
+
appearance: {
|
|
3385
|
+
background: {
|
|
3386
|
+
type: "solid",
|
|
3387
|
+
colorToken: "accent"
|
|
3388
|
+
},
|
|
3389
|
+
borderRadius: "rounded-lg",
|
|
3390
|
+
affordance: { iconId: "ArrowRight" },
|
|
3391
|
+
effects: { hover: [{
|
|
3392
|
+
effectId: "lift",
|
|
3393
|
+
options: { translateY: "-2px" }
|
|
3394
|
+
}] }
|
|
3395
|
+
}
|
|
3396
|
+
}
|
|
3397
|
+
}
|
|
3398
|
+
}
|
|
3399
|
+
});
|
|
3400
|
+
const showtimePillRecipe = defineStaticButtonStyleRecipe({
|
|
3401
|
+
id: "showtime-pill",
|
|
3402
|
+
accessibilityLabel: "Bold uppercase pill buttons with playful movement",
|
|
3403
|
+
tags: {
|
|
3404
|
+
tone: "bold",
|
|
3405
|
+
energy: "vibrant",
|
|
3406
|
+
motion: "expressive",
|
|
3407
|
+
era: "modern"
|
|
3408
|
+
},
|
|
3409
|
+
system: {
|
|
3410
|
+
global: {
|
|
3411
|
+
cornerStyle: "pill",
|
|
3412
|
+
shadow: "low",
|
|
3413
|
+
textTransform: "uppercase",
|
|
3414
|
+
fontWeight: 700,
|
|
3415
|
+
borderWidth: 2,
|
|
3416
|
+
hoverTransform: "lift",
|
|
3417
|
+
hoverColor: "darken",
|
|
3418
|
+
typography: "body",
|
|
3419
|
+
paddingPreset: "spacious",
|
|
3420
|
+
italic: false
|
|
3421
|
+
},
|
|
3422
|
+
sizes: {
|
|
3423
|
+
sm: {
|
|
3424
|
+
padding: "0.625rem 1.25rem",
|
|
3425
|
+
fontSize: "0.875rem"
|
|
3426
|
+
},
|
|
3427
|
+
md: {
|
|
3428
|
+
padding: "0.875rem 1.75rem",
|
|
3429
|
+
fontSize: "1rem"
|
|
3430
|
+
},
|
|
3431
|
+
lg: {
|
|
3432
|
+
padding: "1.125rem 2.25rem",
|
|
3433
|
+
fontSize: "1.125rem"
|
|
3434
|
+
},
|
|
3435
|
+
xl: {
|
|
3436
|
+
padding: "1.125rem 2.25rem",
|
|
3437
|
+
fontSize: "1.125rem"
|
|
3438
|
+
}
|
|
3439
|
+
},
|
|
3440
|
+
roles: {
|
|
3441
|
+
primary: {
|
|
3442
|
+
kind: "complete",
|
|
3443
|
+
appearance: {
|
|
3444
|
+
background: {
|
|
3445
|
+
type: "solid",
|
|
3446
|
+
colorToken: "primary"
|
|
3447
|
+
},
|
|
3448
|
+
borderRadius: "rounded-full",
|
|
3449
|
+
effects: { hover: [{ effectId: "pop" }] }
|
|
3450
|
+
}
|
|
3451
|
+
},
|
|
3452
|
+
secondary: {
|
|
3453
|
+
kind: "complete",
|
|
3454
|
+
appearance: {
|
|
3455
|
+
background: {
|
|
3456
|
+
type: "surface",
|
|
3457
|
+
role: "link"
|
|
3458
|
+
},
|
|
3459
|
+
borderRadius: "rounded-full",
|
|
3460
|
+
border: { widthClass: "border-2" },
|
|
3461
|
+
effects: { hover: [{ effectId: "pop" }] }
|
|
3462
|
+
}
|
|
3463
|
+
},
|
|
3464
|
+
outline: {
|
|
3465
|
+
kind: "complete",
|
|
3466
|
+
appearance: {
|
|
3467
|
+
background: {
|
|
3468
|
+
type: "surface",
|
|
3469
|
+
role: "link"
|
|
3470
|
+
},
|
|
3471
|
+
borderRadius: "rounded-full",
|
|
3472
|
+
border: { widthClass: "border-2" },
|
|
3473
|
+
effects: { hover: [{
|
|
3474
|
+
effectId: "background-on-hover",
|
|
3475
|
+
options: { colorToken: "background" }
|
|
3476
|
+
}] }
|
|
3477
|
+
}
|
|
3478
|
+
},
|
|
3479
|
+
ghost: {
|
|
3480
|
+
kind: "complete",
|
|
3481
|
+
appearance: {
|
|
3482
|
+
background: {
|
|
3483
|
+
type: "surface",
|
|
3484
|
+
role: "link"
|
|
3485
|
+
},
|
|
3486
|
+
borderRadius: "rounded-full",
|
|
3487
|
+
effects: { hover: [{
|
|
3488
|
+
effectId: "background-on-hover",
|
|
3489
|
+
options: { colorToken: "surface" }
|
|
3490
|
+
}] }
|
|
3491
|
+
}
|
|
3492
|
+
},
|
|
3493
|
+
accent: {
|
|
3494
|
+
kind: "complete",
|
|
3495
|
+
appearance: {
|
|
3496
|
+
background: {
|
|
3497
|
+
type: "solid",
|
|
3498
|
+
colorToken: "secondary"
|
|
3499
|
+
},
|
|
3500
|
+
borderRadius: "rounded-full",
|
|
3501
|
+
effects: { hover: [{ effectId: "pop" }] }
|
|
3502
|
+
}
|
|
3503
|
+
}
|
|
3504
|
+
}
|
|
3505
|
+
}
|
|
3506
|
+
});
|
|
3507
|
+
const joyStampRecipe = defineStaticButtonStyleRecipe({
|
|
3508
|
+
id: "joy-stamp",
|
|
3509
|
+
accessibilityLabel: "Bold pill buttons with a hard offset shadow",
|
|
3510
|
+
tags: {
|
|
3511
|
+
tone: "bold",
|
|
3512
|
+
energy: "vibrant",
|
|
3513
|
+
motion: "expressive",
|
|
3514
|
+
era: "organic"
|
|
3515
|
+
},
|
|
3516
|
+
system: {
|
|
3517
|
+
global: {
|
|
3518
|
+
cornerStyle: "pill",
|
|
3519
|
+
shadow: "high",
|
|
3520
|
+
textTransform: "none",
|
|
3521
|
+
typography: "heading",
|
|
3522
|
+
fontWeight: 700,
|
|
3523
|
+
fontSize: "text-lg",
|
|
3524
|
+
borderWidth: 2,
|
|
3525
|
+
hoverTransform: "none",
|
|
3526
|
+
hoverColor: "none"
|
|
3527
|
+
},
|
|
3528
|
+
sizes: {
|
|
3529
|
+
sm: {
|
|
3530
|
+
padding: "0.625rem 1.25rem",
|
|
3531
|
+
fontSize: "text-base"
|
|
3532
|
+
},
|
|
3533
|
+
md: {
|
|
3534
|
+
padding: "0.875rem 1.75rem",
|
|
3535
|
+
fontSize: "text-lg"
|
|
3536
|
+
},
|
|
3537
|
+
lg: {
|
|
3538
|
+
padding: "1.125rem 2.25rem",
|
|
3539
|
+
fontSize: "text-xl"
|
|
3540
|
+
},
|
|
3541
|
+
xl: {
|
|
3542
|
+
padding: "1.25rem 2.75rem",
|
|
3543
|
+
fontSize: "text-2xl"
|
|
3544
|
+
}
|
|
3545
|
+
},
|
|
3546
|
+
roles: {
|
|
3547
|
+
primary: {
|
|
3548
|
+
kind: "complete",
|
|
3549
|
+
appearance: {
|
|
3550
|
+
background: {
|
|
3551
|
+
type: "solid",
|
|
3552
|
+
colorToken: "primary"
|
|
3553
|
+
},
|
|
3554
|
+
borderRadius: "rounded-full",
|
|
3555
|
+
shadow: {
|
|
3556
|
+
elevation: "high",
|
|
3557
|
+
softness: "hard",
|
|
3558
|
+
position: "bottom-right",
|
|
3559
|
+
colorToken: "text"
|
|
3560
|
+
},
|
|
3561
|
+
effects: { hover: [{ effectId: "press-down" }] }
|
|
3562
|
+
}
|
|
3563
|
+
},
|
|
3564
|
+
secondary: {
|
|
3565
|
+
kind: "complete",
|
|
3566
|
+
appearance: {
|
|
3567
|
+
background: {
|
|
3568
|
+
type: "surface",
|
|
3569
|
+
role: "link"
|
|
3570
|
+
},
|
|
3571
|
+
borderRadius: "rounded-full",
|
|
3572
|
+
border: { widthClass: "border-2" },
|
|
3573
|
+
shadow: {
|
|
3574
|
+
elevation: "high",
|
|
3575
|
+
softness: "hard",
|
|
3576
|
+
position: "bottom-right",
|
|
3577
|
+
colorToken: "secondary"
|
|
3578
|
+
},
|
|
3579
|
+
effects: { hover: [{ effectId: "press-down" }] }
|
|
3580
|
+
}
|
|
3581
|
+
},
|
|
3582
|
+
outline: {
|
|
3583
|
+
kind: "derive",
|
|
3584
|
+
from: "secondary"
|
|
3585
|
+
},
|
|
3586
|
+
ghost: {
|
|
3587
|
+
kind: "complete",
|
|
3588
|
+
appearance: {
|
|
3589
|
+
background: {
|
|
3590
|
+
type: "surface",
|
|
3591
|
+
role: "link"
|
|
3592
|
+
},
|
|
3593
|
+
borderRadius: "rounded-full",
|
|
3594
|
+
effects: { hover: [{ effectId: "press-down" }] }
|
|
3595
|
+
}
|
|
3596
|
+
},
|
|
3597
|
+
accent: {
|
|
3598
|
+
kind: "derive",
|
|
3599
|
+
from: "primary",
|
|
3600
|
+
overrides: { background: {
|
|
3601
|
+
type: "solid",
|
|
3602
|
+
colorToken: "accent"
|
|
3603
|
+
} }
|
|
3604
|
+
}
|
|
3605
|
+
}
|
|
3606
|
+
}
|
|
3607
|
+
});
|
|
3608
|
+
const ornateRitualRecipe = defineStaticButtonStyleRecipe({
|
|
3609
|
+
id: "ornate-ritual",
|
|
3610
|
+
accessibilityLabel: "Uppercase framed buttons with restrained movement",
|
|
3611
|
+
tags: {
|
|
3612
|
+
tone: "classic",
|
|
3613
|
+
energy: "vibrant",
|
|
3614
|
+
motion: "subtle",
|
|
3615
|
+
era: "organic"
|
|
3616
|
+
},
|
|
3617
|
+
system: {
|
|
3618
|
+
global: {
|
|
3619
|
+
cornerStyle: "rounded",
|
|
3620
|
+
textTransform: "uppercase",
|
|
3621
|
+
fontWeight: 600,
|
|
3622
|
+
borderWidth: 1,
|
|
3623
|
+
hoverTransform: "none",
|
|
3624
|
+
hoverColor: "none",
|
|
3625
|
+
letterSpacing: "loose"
|
|
3626
|
+
},
|
|
3627
|
+
sizes: {
|
|
3628
|
+
sm: {
|
|
3629
|
+
padding: "0.5625rem 1.25rem",
|
|
3630
|
+
fontSize: "text-xs"
|
|
3631
|
+
},
|
|
3632
|
+
md: {
|
|
3633
|
+
padding: "0.75rem 1.75rem",
|
|
3634
|
+
fontSize: "text-xs"
|
|
3635
|
+
},
|
|
3636
|
+
lg: {
|
|
3637
|
+
padding: "0.875rem 2.25rem",
|
|
3638
|
+
fontSize: "text-sm"
|
|
3639
|
+
},
|
|
3640
|
+
xl: {
|
|
3641
|
+
padding: "1rem 2.75rem",
|
|
3642
|
+
fontSize: "text-base"
|
|
3643
|
+
}
|
|
3644
|
+
},
|
|
3645
|
+
roles: {
|
|
3646
|
+
primary: {
|
|
3647
|
+
kind: "complete",
|
|
3648
|
+
appearance: {
|
|
3649
|
+
background: {
|
|
3650
|
+
type: "solid",
|
|
3651
|
+
colorToken: "primary"
|
|
3652
|
+
},
|
|
3653
|
+
borderRadius: "rounded-md",
|
|
3654
|
+
border: { widthClass: "border" },
|
|
3655
|
+
effects: {
|
|
3656
|
+
hover: [{
|
|
3657
|
+
effectId: "background-on-hover",
|
|
3658
|
+
options: { colorToken: "primary-100" }
|
|
3659
|
+
}],
|
|
3660
|
+
active: [{
|
|
3661
|
+
effectId: "scale-down",
|
|
3662
|
+
options: { scale: "0.98" }
|
|
3663
|
+
}]
|
|
3664
|
+
}
|
|
3665
|
+
}
|
|
3666
|
+
},
|
|
3667
|
+
secondary: {
|
|
3668
|
+
kind: "complete",
|
|
3669
|
+
appearance: {
|
|
3670
|
+
background: {
|
|
3671
|
+
type: "solid",
|
|
3672
|
+
colorToken: "secondary"
|
|
3673
|
+
},
|
|
3674
|
+
borderRadius: "rounded-md",
|
|
3675
|
+
border: { widthClass: "border" },
|
|
3676
|
+
effects: { hover: [{
|
|
3677
|
+
effectId: "background-on-hover",
|
|
3678
|
+
options: { colorToken: "surface" }
|
|
3679
|
+
}] }
|
|
3680
|
+
}
|
|
3681
|
+
},
|
|
3682
|
+
outline: {
|
|
3683
|
+
kind: "complete",
|
|
3684
|
+
appearance: {
|
|
3685
|
+
background: {
|
|
3686
|
+
type: "surface",
|
|
3687
|
+
role: "link"
|
|
3688
|
+
},
|
|
3689
|
+
borderRadius: "rounded-md",
|
|
3690
|
+
border: { widthClass: "border" },
|
|
3691
|
+
effects: { hover: [{
|
|
3692
|
+
effectId: "background-on-hover",
|
|
3693
|
+
options: { colorToken: "muted" }
|
|
3694
|
+
}] }
|
|
3695
|
+
}
|
|
3696
|
+
},
|
|
3697
|
+
ghost: {
|
|
3698
|
+
kind: "complete",
|
|
3699
|
+
appearance: {
|
|
3700
|
+
background: {
|
|
3701
|
+
type: "surface",
|
|
3702
|
+
role: "link"
|
|
3703
|
+
},
|
|
3704
|
+
borderRadius: "rounded-none",
|
|
3705
|
+
sizes: {
|
|
3706
|
+
sm: {
|
|
3707
|
+
padding: "0.375rem 0",
|
|
3708
|
+
fontSize: "text-xs"
|
|
3709
|
+
},
|
|
3710
|
+
md: {
|
|
3711
|
+
padding: "0.5rem 0",
|
|
3712
|
+
fontSize: "text-sm"
|
|
3713
|
+
},
|
|
3714
|
+
lg: {
|
|
3715
|
+
padding: "0.625rem 0",
|
|
3716
|
+
fontSize: "text-base"
|
|
3717
|
+
},
|
|
3718
|
+
xl: {
|
|
3719
|
+
padding: "0.75rem 0",
|
|
3720
|
+
fontSize: "text-lg"
|
|
3721
|
+
}
|
|
3722
|
+
},
|
|
3723
|
+
effects: { base: [{
|
|
3724
|
+
effectId: "border-bottom-grow",
|
|
3725
|
+
options: {
|
|
3726
|
+
height: 1,
|
|
3727
|
+
colorToken: "accent",
|
|
3728
|
+
origin: "left"
|
|
3729
|
+
}
|
|
3730
|
+
}] }
|
|
3731
|
+
}
|
|
3732
|
+
},
|
|
3733
|
+
accent: {
|
|
3734
|
+
kind: "derive",
|
|
3735
|
+
from: "primary",
|
|
3736
|
+
overrides: { background: {
|
|
3737
|
+
type: "solid",
|
|
3738
|
+
colorToken: "accent"
|
|
3739
|
+
} }
|
|
3740
|
+
}
|
|
3741
|
+
}
|
|
3742
|
+
}
|
|
1433
3743
|
});
|
|
1434
|
-
z$1.array(publicCourseSchema);
|
|
1435
3744
|
//#endregion
|
|
1436
|
-
//#region ../
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
3745
|
+
//#region ../theme-core/src/buttons/styles/registry.ts
|
|
3746
|
+
const buttonStyleRecipes = [
|
|
3747
|
+
softPillRecipe,
|
|
3748
|
+
earthPillRecipe,
|
|
3749
|
+
confidentChipRecipe,
|
|
3750
|
+
editorialLinkRecipe,
|
|
3751
|
+
pebbleRecipe,
|
|
3752
|
+
inkStampRecipe,
|
|
3753
|
+
flatInkRecipe,
|
|
3754
|
+
brushedWashRecipe,
|
|
3755
|
+
showtimePillRecipe,
|
|
3756
|
+
joyStampRecipe,
|
|
3757
|
+
ornateRitualRecipe,
|
|
3758
|
+
quietArrowRecipe
|
|
3759
|
+
];
|
|
3760
|
+
const recipesById = new Map(buttonStyleRecipes.map((recipe) => [recipe.id, recipe]));
|
|
3761
|
+
function findButtonStyleRecipe(id) {
|
|
3762
|
+
const recipe = recipesById.get(id);
|
|
3763
|
+
if (recipe === void 0) throw new Error(`Button style registry is missing known style ${id}`);
|
|
3764
|
+
return recipe;
|
|
3765
|
+
}
|
|
3766
|
+
function resolveButtonStyleSelection(selection) {
|
|
3767
|
+
switch (selection.styleId) {
|
|
3768
|
+
case "soft-pill": return resolveButtonStyleRecipe(softPillRecipe, selection.parameters);
|
|
3769
|
+
case "earth-pill": return resolveButtonStyleRecipe(earthPillRecipe, selection.parameters);
|
|
3770
|
+
case "confident-chip": return resolveButtonStyleRecipe(confidentChipRecipe, selection.parameters);
|
|
3771
|
+
case "editorial-link": return resolveButtonStyleRecipe(editorialLinkRecipe, selection.parameters);
|
|
3772
|
+
case "pebble": return resolveButtonStyleRecipe(pebbleRecipe, selection.parameters);
|
|
3773
|
+
case "ink-stamp": return resolveButtonStyleRecipe(inkStampRecipe, selection.parameters);
|
|
3774
|
+
case "flat-ink": return resolveButtonStyleRecipe(flatInkRecipe, selection.parameters);
|
|
3775
|
+
case "brushed-wash": return resolveButtonStyleRecipe(brushedWashRecipe, selection.parameters);
|
|
3776
|
+
case "showtime-pill": return resolveButtonStyleRecipe(showtimePillRecipe, selection.parameters);
|
|
3777
|
+
case "joy-stamp": return resolveButtonStyleRecipe(joyStampRecipe, selection.parameters);
|
|
3778
|
+
case "ornate-ritual": return resolveButtonStyleRecipe(ornateRitualRecipe, selection.parameters);
|
|
3779
|
+
case "quiet-arrow": return resolveButtonStyleRecipe(quietArrowRecipe, selection.parameters);
|
|
3780
|
+
}
|
|
3781
|
+
}
|
|
3782
|
+
function defaultButtonStyleSelectionFor(styleId) {
|
|
3783
|
+
return {
|
|
3784
|
+
styleId,
|
|
3785
|
+
parameters: findButtonStyleRecipe(styleId).defaultParameters
|
|
3786
|
+
};
|
|
3787
|
+
}
|
|
3788
|
+
if (buttonStyleRecipes.map((recipe) => recipe.id).length !== BUTTON_STYLE_IDS.length || BUTTON_STYLE_IDS.some((id) => !recipesById.has(id))) throw new Error("Button style registry and ButtonStyleId catalog are out of sync");
|
|
3789
|
+
buttonStyleRecipes.map((recipe) => {
|
|
3790
|
+
const resolved = resolveButtonStyleSelection(defaultButtonStyleSelectionFor(recipe.id));
|
|
3791
|
+
if (resolved.kind === "error") throw new Error(`Invalid registered button style ${recipe.id}: ${resolved.error.issues.join(", ")}`);
|
|
3792
|
+
return {
|
|
3793
|
+
id: recipe.id,
|
|
3794
|
+
name: recipe.accessibilityLabel,
|
|
3795
|
+
description: recipe.accessibilityLabel,
|
|
3796
|
+
category: presetCategory(recipe),
|
|
3797
|
+
buttonSystem: resolved.buttonSystem,
|
|
3798
|
+
compatibility: {
|
|
3799
|
+
...recipe.tags.tone ? { tones: [recipe.tags.tone] } : {},
|
|
3800
|
+
...recipe.tags.energy ? { energies: [recipe.tags.energy] } : {}
|
|
3801
|
+
}
|
|
3802
|
+
};
|
|
3803
|
+
});
|
|
3804
|
+
function presetCategory(recipe) {
|
|
3805
|
+
switch (recipe.tags.era) {
|
|
3806
|
+
case "retro": return "retro";
|
|
3807
|
+
case "editorial": return "minimal";
|
|
3808
|
+
case "organic": return "artistic";
|
|
3809
|
+
case "modern": return recipe.tags.tone === "bold" ? "modern" : "technical";
|
|
3810
|
+
case "technical": return "technical";
|
|
3811
|
+
case void 0: return "modern";
|
|
3812
|
+
}
|
|
3813
|
+
}
|
|
1451
3814
|
//#endregion
|
|
1452
|
-
//#region ../blocks/src/system/constants/
|
|
3815
|
+
//#region ../blocks/src/system/constants/buttonRoles.ts
|
|
1453
3816
|
/**
|
|
1454
|
-
*
|
|
1455
|
-
* These are the standard slugs used when creating event content types in the CMS.
|
|
3817
|
+
* Semantic button roles available to block authors.
|
|
1456
3818
|
*
|
|
1457
|
-
*
|
|
1458
|
-
*
|
|
1459
|
-
* - Event Calendar block to identify event content
|
|
1460
|
-
* - Content type definitions
|
|
3819
|
+
* These roles are deliberately independent of a site's visual button style:
|
|
3820
|
+
* the active theme owns how each role looks.
|
|
1461
3821
|
*/
|
|
1462
|
-
const
|
|
1463
|
-
const
|
|
1464
|
-
"combined",
|
|
1465
|
-
"calendar",
|
|
1466
|
-
"list",
|
|
1467
|
-
"timetable",
|
|
1468
|
-
"week-board"
|
|
1469
|
-
];
|
|
1470
|
-
const eventCalendarDefaultViewValues = ["month", "week"];
|
|
1471
|
-
const eventCalendarListLayoutValues = [
|
|
1472
|
-
"stack",
|
|
1473
|
-
"grid",
|
|
1474
|
-
"compact"
|
|
1475
|
-
];
|
|
3822
|
+
const BLOCK_BUTTON_ROLES = PUBLIC_BUTTON_ROLES;
|
|
3823
|
+
const blockButtonRoleSchema = z$1.enum(BLOCK_BUTTON_ROLES);
|
|
1476
3824
|
/**
|
|
1477
|
-
*
|
|
3825
|
+
* Temporary rollout boundary for persisted content written before issue #1220.
|
|
3826
|
+
* Authoring remains strict through `blockButtonRoleSchema`; this parser exists
|
|
3827
|
+
* only until the post-deploy role rewrite has been audited in production.
|
|
1478
3828
|
*/
|
|
1479
|
-
function
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
3829
|
+
function canonicalizePersistedBlockButtonRole(value) {
|
|
3830
|
+
return value === "link" || value === "tertiary" ? "ghost" : value;
|
|
3831
|
+
}
|
|
3832
|
+
const persistedBlockButtonRoleSchema = z$1.preprocess((value) => typeof value === "string" ? canonicalizePersistedBlockButtonRole(value) : value, blockButtonRoleSchema);
|
|
3833
|
+
const BLOCK_BUTTON_ROLE_LABELS = {
|
|
3834
|
+
primary: "Primary",
|
|
3835
|
+
secondary: "Secondary",
|
|
3836
|
+
outline: "Outline",
|
|
3837
|
+
ghost: "Ghost",
|
|
3838
|
+
accent: "Accent"
|
|
3839
|
+
};
|
|
3840
|
+
BLOCK_BUTTON_ROLES.map((value) => ({
|
|
3841
|
+
value,
|
|
3842
|
+
label: BLOCK_BUTTON_ROLE_LABELS[value]
|
|
3843
|
+
}));
|
|
1483
3844
|
//#endregion
|
|
1484
3845
|
//#region ../blocks/src/system/runtime/nodes/shared/contract-schemas.ts
|
|
1485
3846
|
const previewStageSchema = z$1.enum(["preview", "published"]);
|
|
1486
|
-
const registrationButtonVariantSchema =
|
|
1487
|
-
|
|
1488
|
-
"secondary",
|
|
1489
|
-
"outline"
|
|
1490
|
-
]);
|
|
1491
|
-
const eventButtonVariantSchema = z$1.enum([
|
|
1492
|
-
"primary",
|
|
1493
|
-
"secondary",
|
|
1494
|
-
"outline",
|
|
1495
|
-
"link"
|
|
1496
|
-
]);
|
|
3847
|
+
const registrationButtonVariantSchema = blockButtonRoleSchema;
|
|
3848
|
+
const eventButtonVariantSchema = persistedBlockButtonRoleSchema;
|
|
1497
3849
|
const eventLayoutSchema = z$1.enum(eventCalendarListLayoutValues);
|
|
1498
3850
|
const eventCalendarDisplayModeSchema = z$1.enum(eventCalendarDisplayModeValues);
|
|
1499
3851
|
const eventCalendarDefaultViewSchema = z$1.enum(eventCalendarDefaultViewValues);
|
|
@@ -1689,105 +4041,6 @@ const courseRegistrationInteractiveIslandPropsCodec = createInteractiveIslandCod
|
|
|
1689
4041
|
})
|
|
1690
4042
|
});
|
|
1691
4043
|
//#endregion
|
|
1692
|
-
//#region ../theme-core/src/tokens/blockColorTokens.ts
|
|
1693
|
-
const blockColorTokenNames = [
|
|
1694
|
-
"text",
|
|
1695
|
-
"heading",
|
|
1696
|
-
"mutedText",
|
|
1697
|
-
"surface",
|
|
1698
|
-
"background",
|
|
1699
|
-
"foreground",
|
|
1700
|
-
"border",
|
|
1701
|
-
"primary",
|
|
1702
|
-
"secondary",
|
|
1703
|
-
"accent",
|
|
1704
|
-
"success",
|
|
1705
|
-
"warning",
|
|
1706
|
-
"info",
|
|
1707
|
-
"error",
|
|
1708
|
-
"destructive",
|
|
1709
|
-
"scrim",
|
|
1710
|
-
"shadow",
|
|
1711
|
-
"onPrimary",
|
|
1712
|
-
"onSecondary",
|
|
1713
|
-
"onAccent",
|
|
1714
|
-
"onSuccess",
|
|
1715
|
-
"onWarning",
|
|
1716
|
-
"onInfo",
|
|
1717
|
-
"onError",
|
|
1718
|
-
"onDestructive",
|
|
1719
|
-
"onSurface"
|
|
1720
|
-
];
|
|
1721
|
-
new Set(blockColorTokenNames);
|
|
1722
|
-
//#endregion
|
|
1723
|
-
//#region ../theme-core/src/tokens/themeColorTokens.ts
|
|
1724
|
-
/**
|
|
1725
|
-
* Known palette role token names. This is the low-level source of truth for
|
|
1726
|
-
* palette roles used by palette variants, Theme V2 schemas, and runtime color
|
|
1727
|
-
* reference parsing.
|
|
1728
|
-
*/
|
|
1729
|
-
const PALETTE_TOKEN_NAMES = [
|
|
1730
|
-
"primary",
|
|
1731
|
-
"primaryForeground",
|
|
1732
|
-
"secondary",
|
|
1733
|
-
"accent",
|
|
1734
|
-
"success",
|
|
1735
|
-
"warning",
|
|
1736
|
-
"destructive",
|
|
1737
|
-
"background",
|
|
1738
|
-
"surface",
|
|
1739
|
-
"surfaceAlt",
|
|
1740
|
-
"muted",
|
|
1741
|
-
"text",
|
|
1742
|
-
"border"
|
|
1743
|
-
];
|
|
1744
|
-
z$1.enum(PALETTE_TOKEN_NAMES);
|
|
1745
|
-
const themeColorBaseTokenNames = [
|
|
1746
|
-
...PALETTE_TOKEN_NAMES,
|
|
1747
|
-
...blockColorTokenNames,
|
|
1748
|
-
"white",
|
|
1749
|
-
"neutral",
|
|
1750
|
-
"primaryText",
|
|
1751
|
-
"secondaryForeground",
|
|
1752
|
-
"accentForeground"
|
|
1753
|
-
];
|
|
1754
|
-
const themeColorBaseTokenSet = new Set(themeColorBaseTokenNames);
|
|
1755
|
-
const shadeStepSet = /* @__PURE__ */ new Set([
|
|
1756
|
-
"50",
|
|
1757
|
-
"100",
|
|
1758
|
-
"200",
|
|
1759
|
-
"300",
|
|
1760
|
-
"400",
|
|
1761
|
-
"500",
|
|
1762
|
-
"600",
|
|
1763
|
-
"700",
|
|
1764
|
-
"800",
|
|
1765
|
-
"900",
|
|
1766
|
-
"950"
|
|
1767
|
-
]);
|
|
1768
|
-
function isKnownBaseToken(value) {
|
|
1769
|
-
return themeColorBaseTokenSet.has(value);
|
|
1770
|
-
}
|
|
1771
|
-
function isKnownShadeToken(value) {
|
|
1772
|
-
const match = value.match(/^([a-zA-Z][a-zA-Z0-9]*)(?:-([0-9]{2,3}))$/);
|
|
1773
|
-
if (!match) return false;
|
|
1774
|
-
const [, base, shade] = match;
|
|
1775
|
-
return Boolean(base && shade && isKnownBaseToken(base) && shadeStepSet.has(shade));
|
|
1776
|
-
}
|
|
1777
|
-
function isThemeColorTokenBase(value) {
|
|
1778
|
-
return isKnownBaseToken(value) || isKnownShadeToken(value);
|
|
1779
|
-
}
|
|
1780
|
-
function isThemeColorToken(value) {
|
|
1781
|
-
if (typeof value !== "string") return false;
|
|
1782
|
-
const parts = parseColorTokenParts(value);
|
|
1783
|
-
return parts.kind === "token" && isThemeColorTokenBase(parts.token);
|
|
1784
|
-
}
|
|
1785
|
-
function parseThemeColorToken(value) {
|
|
1786
|
-
if (!isThemeColorToken(value)) return null;
|
|
1787
|
-
return value.trim();
|
|
1788
|
-
}
|
|
1789
|
-
const themeColorTokenSchema = z$1.string().min(1).refine((value) => Boolean(isThemeColorToken(value)), "Expected a known Theme V2 color token");
|
|
1790
|
-
//#endregion
|
|
1791
4044
|
//#region ../theme-core/src/cards/types.ts
|
|
1792
4045
|
const cardVariantRoleValues = ["default", "alternative"];
|
|
1793
4046
|
const boxlessCardVariantValue = "none";
|
|
@@ -4450,6 +6703,20 @@ const blockCategoryEnum = z$1.enum([
|
|
|
4450
6703
|
"layout",
|
|
4451
6704
|
"interactive"
|
|
4452
6705
|
]);
|
|
6706
|
+
const blockContentSourceSchema = z$1.object({
|
|
6707
|
+
kind: z$1.enum([
|
|
6708
|
+
"inline",
|
|
6709
|
+
"entries",
|
|
6710
|
+
"mixed"
|
|
6711
|
+
]),
|
|
6712
|
+
contentType: z$1.string().min(1).optional()
|
|
6713
|
+
}).superRefine((value, ctx) => {
|
|
6714
|
+
if (value.kind === "inline" && value.contentType) ctx.addIssue({
|
|
6715
|
+
code: z$1.ZodIssueCode.custom,
|
|
6716
|
+
path: ["contentType"],
|
|
6717
|
+
message: "contentType is not allowed when contentSource.kind is \"inline\""
|
|
6718
|
+
});
|
|
6719
|
+
});
|
|
4453
6720
|
z$1.object({
|
|
4454
6721
|
name: z$1.string().min(1),
|
|
4455
6722
|
version: z$1.string().min(1),
|
|
@@ -4480,6 +6747,12 @@ z$1.object({
|
|
|
4480
6747
|
}).optional()).optional(),
|
|
4481
6748
|
category: blockCategoryEnum.optional(),
|
|
4482
6749
|
contentTypes: z$1.array(z$1.string()).optional(),
|
|
6750
|
+
/**
|
|
6751
|
+
* Explicit content-source classification (inline / entries / mixed). Optional at the
|
|
6752
|
+
* schema level for backward compatibility with SDK-defined custom blocks, but every
|
|
6753
|
+
* registered SYSTEM block must declare it (enforced by a registry-wide test).
|
|
6754
|
+
*/
|
|
6755
|
+
contentSource: blockContentSourceSchema.optional(),
|
|
4483
6756
|
tags: z$1.array(z$1.string()).optional(),
|
|
4484
6757
|
icon: z$1.string().optional()
|
|
4485
6758
|
});
|
|
@@ -5515,6 +7788,7 @@ function createBlockManifest(config) {
|
|
|
5515
7788
|
previewCustomize: config.previewCustomize,
|
|
5516
7789
|
category: config.category,
|
|
5517
7790
|
contentTypes: config.contentTypes ? [...config.contentTypes] : void 0,
|
|
7791
|
+
contentSource: config.contentSource,
|
|
5518
7792
|
tags: config.tags ? [...config.tags] : [],
|
|
5519
7793
|
icon: config.icon ?? "Box",
|
|
5520
7794
|
layout,
|
|
@@ -5551,6 +7825,7 @@ createBlockManifest({
|
|
|
5551
7825
|
titleSource: "heading",
|
|
5552
7826
|
description: "Date/time, venue, map, and other dates for an event",
|
|
5553
7827
|
category: "content",
|
|
7828
|
+
contentSource: { kind: "entries" },
|
|
5554
7829
|
tags: [
|
|
5555
7830
|
"events",
|
|
5556
7831
|
"venue",
|
|
@@ -6863,11 +9138,7 @@ const newsletterPresetSchema = z$1.enum([
|
|
|
6863
9138
|
"emailNameCompany"
|
|
6864
9139
|
]);
|
|
6865
9140
|
const newsletterDestinationProviderSchema = z$1.enum(["riverbank", "mailchimp"]);
|
|
6866
|
-
const newsletterButtonVariantSchema =
|
|
6867
|
-
"primary",
|
|
6868
|
-
"secondary",
|
|
6869
|
-
"outline"
|
|
6870
|
-
]);
|
|
9141
|
+
const newsletterButtonVariantSchema = blockButtonRoleSchema;
|
|
6871
9142
|
const newsletterFieldSchema = z$1.object({
|
|
6872
9143
|
id: z$1.string(),
|
|
6873
9144
|
type: z$1.enum(["email", "text"]),
|
|
@@ -7444,12 +9715,7 @@ const shopSourceSchema = z$1.object({
|
|
|
7444
9715
|
showPrices: z$1.boolean().optional(),
|
|
7445
9716
|
showValidityPeriod: z$1.boolean().optional(),
|
|
7446
9717
|
showPricePerCredit: z$1.boolean().nullable().optional(),
|
|
7447
|
-
buttonVariant:
|
|
7448
|
-
"primary",
|
|
7449
|
-
"secondary",
|
|
7450
|
-
"outline",
|
|
7451
|
-
"link"
|
|
7452
|
-
]).optional(),
|
|
9718
|
+
buttonVariant: blockButtonRoleSchema.optional(),
|
|
7453
9719
|
passesHeading: z$1.string().optional(),
|
|
7454
9720
|
membershipsHeading: z$1.string().optional(),
|
|
7455
9721
|
buyButtonText: z$1.string().optional(),
|
|
@@ -7594,12 +9860,7 @@ const passesMembershipsHydrationSchema = z$1.object({
|
|
|
7594
9860
|
passes: z$1.array(publicPassProductSchema),
|
|
7595
9861
|
memberships: z$1.array(publicMembershipProductSchema),
|
|
7596
9862
|
passPurchaseMode: z$1.enum(["add_to_cart", "buy_now"]),
|
|
7597
|
-
buttonVariant:
|
|
7598
|
-
"primary",
|
|
7599
|
-
"secondary",
|
|
7600
|
-
"outline",
|
|
7601
|
-
"link"
|
|
7602
|
-
])
|
|
9863
|
+
buttonVariant: blockButtonRoleSchema
|
|
7603
9864
|
});
|
|
7604
9865
|
const productListHydrationSchema = z$1.object({
|
|
7605
9866
|
products: z$1.array(publicProductSchema),
|
|
@@ -7880,4 +10141,4 @@ function defineIslandPropsDecoder(kind) {
|
|
|
7880
10141
|
};
|
|
7881
10142
|
}
|
|
7882
10143
|
//#endregion
|
|
7883
|
-
export {
|
|
10144
|
+
export { relativeLuminance as $, formatDate as A, formatBookingTime as At, resolveEventCta as B, publicEventPricingMode as Bt, getWizardStepsForContext as C, okWith as Ct, normalizeCsvIds as D, formatBookingDate as Dt, getEventRuntimeFiltersKey as E, addLocalScheduleDays as Et, formatEventTeacherLine as F, toBookingTimeZone as Ft, getLocalDateKey as G, assertNever$2 as Gt, resolveRuntimeEventPricing as H, publicEventScalarPrice as Ht, formatTime as I, toScheduledBookingDateTime as It, createRichTextDocFromMarkdown as J, getLocalMinuteOfDay as K, getCardOrientation as L, parseEventPageSurfaceSubject as Lt, formatEventDateParts as M, getBookingLocalDateKey as Mt, formatEventPrice as N, parseBookingLocalDate as Nt, normalizeCsvString as O, formatBookingDateTime as Ot, formatEventPriceDisplay as P, resolveBookingTimeZoneId as Pt, resolveEventRegistrationScopedEvents as Q, getContainerClass as R, formatBookingPriceDisplay as Rt, getStepNumber as S, ok as St, buildEventRuntimeFilters as T, reportWorkflowSuccess as Tt, getEventAvailability as U, publicEventTicketTypes as Ut, resolveEventLinkProps as V, publicEventPricingType as Vt, getEventAvailabilityStatus as W, formatCurrencyAmount as Wt, isRecord$3 as X, unwrapRichTextRoot as Y, normalizeCardVariantRole as Z, findPreSelectedEvent as _, toSelectedCollectionOptionKind as _t, buildProductDetailDisplay as a, formatBookingCentsAsCurrencyInput as at, resolveRegistrationTarget as b, clearWorkflowFeedback as bt, EMPTY_COMMERCE_CART_STATE as c, getBookingServiceSlidingScale as ct, deriveCommerceCheckoutState as d, parseBookingCurrencyInputToCents as dt, hexToRgb as et, parseStoredCommerceCartState as f, prepareBookingSubmission as ft, findEventByOccurrenceId as g, resolveDefaultBookingServiceId as gt, toRegistrationEvents as h, resolveBookingSiteId as ht, buildProductCardDisplay as i, deriveBookingFormViewState as it, formatEventCompactDateRail as j, formatLocalScheduleDate as jt, normalizeOptionalId as k, formatBookingInstant as kt, buildPassCartItem as l, getBookingSuccessMessage as lt, reduceCommerceCart as m, resolveBookingPaymentStep as mt, getShopDisplayForItems as n, parseThemeColorToken as nt, formatCommercePrice as o, formatBookingSubmissionPreparationError as ot, productItemKey as p, resolveAppointmentCheckoutVerificationState as pt, normalizeEventBlockKind as q, buildCartDisplay as r, logger as rt, formatInterval as s, getBookingRedirectStateFromLocation as st, defineIslandPropsDecoder as t, themeButtonClassName as tt, buildProductCartItem as u, isBookingServiceSlidingAmountInRange as ut, resolveDiscountContext as v, BOOKING_FORM_DATA_RESERVED_KEYS as vt, buildEventCalendarListingRender as w, reportWorkflowError as wt, WIZARD_STEPS as x, err as xt, resolveEventRequiresPayment as y, assertNever$1 as yt, groupEventsByDate as z, publicEventPricingCurrency as zt };
|