@riverbankcms/sdk 0.107.0 → 0.109.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-DpAbAl08.mjs → PreviewEditorSidebar-DWqwfy3_.mjs} +48 -28
- package/dist/{PreviewEditorUI-O7cn6Xxv.mjs → PreviewEditorUI-B7OL4sfR.mjs} +10 -9
- package/dist/{PreviewQueryProvider-D0tnKl0t.mjs → PreviewQueryProvider-D0y2l8JN.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-CVB7urtl.mjs → SdkPreviewModeRuntime-D8Gt9Gbe.mjs} +633 -220
- package/dist/{SiteChromeCustomizeContext-C_sizso-.mjs → SiteChromeCustomizeContext-DUpalEdL.mjs} +5764 -1556
- package/dist/_dts/ai/src/contracts/proposals.d.ts +15383 -11388
- package/dist/_dts/api/src/blocks.d.ts +41 -7
- 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 +177 -127
- package/dist/_dts/api/src/bookingRefundOutcomes.d.ts +6 -6
- package/dist/_dts/api/src/cache-tags.d.ts +3 -0
- package/dist/_dts/api/src/common/envelope.d.ts +7 -0
- package/dist/_dts/api/src/contentRuntime.d.ts +19 -1
- package/dist/_dts/api/src/courses.d.ts +1 -0
- package/dist/_dts/api/src/customerMembershipOutcomes.d.ts +5 -5
- package/dist/_dts/api/src/endpoints.d.ts +134 -0
- package/dist/_dts/api/src/footer-settings.d.ts +1 -0
- package/dist/_dts/api/src/footerSettings.d.ts +8 -0
- package/dist/_dts/api/src/index.d.ts +7 -4
- package/dist/_dts/api/src/navigation/contracts.d.ts +3 -3
- package/dist/_dts/api/src/participantMessaging.d.ts +18 -12
- package/dist/_dts/api/src/previewContentContract.d.ts +4 -0
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +1 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +309 -1
- package/dist/_dts/api/src/siteBanner.d.ts +2 -2
- package/dist/_dts/api/src/siteInfrastructure.d.ts +13 -0
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +144 -60
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +35 -1
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +74 -28
- 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/contracts/proof-block-islands.d.ts +4 -4
- package/dist/_dts/blocks/src/index.d.ts +1 -1
- package/dist/_dts/blocks/src/primitives/layout/Section.d.ts +0 -1
- package/dist/_dts/blocks/src/rendering/server.d.ts +1 -0
- 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 +1 -22
- package/dist/_dts/blocks/src/system/blocks/cta-full.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/event-registration.d.ts +1 -22
- package/dist/_dts/blocks/src/system/blocks/file-download.d.ts +3 -0
- 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 +3 -0
- package/dist/_dts/blocks/src/system/blocks/site-footer-runtime.d.ts +50 -0
- package/dist/_dts/blocks/src/system/blocks/site-footer.d.ts +9 -48
- 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/customize/backgrounds.d.ts +16 -6
- package/dist/_dts/blocks/src/system/defineBlock.d.ts +9 -1
- package/dist/_dts/blocks/src/system/fields/ctas.d.ts +8 -0
- package/dist/_dts/blocks/src/system/icons/registry.d.ts +2 -1
- package/dist/_dts/blocks/src/system/icons/social.d.ts +5 -0
- package/dist/_dts/blocks/src/system/icons/svg.d.ts +1 -0
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +33 -2
- package/dist/_dts/blocks/src/system/node/fragments/backgroundLayer.d.ts +13 -0
- package/dist/_dts/blocks/src/system/node/fragments/footerNav.d.ts +2 -0
- package/dist/_dts/blocks/src/system/node/fragments/styledContainer.d.ts +4 -4
- package/dist/_dts/blocks/src/system/node/fragments/styledSection.d.ts +3 -12
- package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +6 -6
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/shared/contract-schemas.d.ts +2 -2
- package/dist/_dts/blocks/src/system/types/link.d.ts +3 -3
- package/dist/_dts/content-editor/src/FooterComposerPanel.d.ts +14 -0
- package/dist/_dts/content-editor/src/controller/EntryControllerProvider.d.ts +27 -8
- package/dist/_dts/content-editor/src/footerComposer.d.ts +56 -0
- package/dist/_dts/content-editor/src/hooks/useEntryActions.d.ts +1 -1
- package/dist/_dts/content-editor/src/hooks/useEntryMutations.d.ts +5 -5
- package/dist/_dts/content-editor/src/index.d.ts +2 -0
- package/dist/_dts/content-editor/src/primitives/PreviewRichTextEditor.d.ts +3 -1
- package/dist/_dts/content-editor/src/services/contentEntryServices.d.ts +20 -36
- package/dist/_dts/content-editor/src/ui/editorSnapshot.d.ts +5 -1
- package/dist/_dts/content-editor/src/ui/editorUiStore.d.ts +11 -0
- 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/schema.d.ts +1 -1
- package/dist/_dts/content-model/src/content-types/sentinels.d.ts +36 -0
- package/dist/_dts/content-model/src/definitions/shared.d.ts +3 -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/core/src/branded.d.ts +3 -0
- package/dist/_dts/core/src/editor-state.d.ts +4 -0
- package/dist/_dts/core/src/footer-composition.d.ts +143 -0
- package/dist/_dts/core/src/index.d.ts +2 -0
- package/dist/_dts/core/src/public-profile.d.ts +73 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +221 -205
- package/dist/_dts/db/src/schemas/forms.d.ts +10 -10
- package/dist/_dts/editor/src/primitives/rich-text/RichTextEditorSurface.d.ts +5 -0
- package/dist/_dts/editor-blocks/src/BlockEditor.d.ts +1 -0
- package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockCreation.d.ts +2 -1
- package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockDuplication.d.ts +2 -1
- package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockReorder.d.ts +2 -1
- package/dist/_dts/editor-blocks/src/block-editor/owner.d.ts +10 -0
- package/dist/_dts/editor-blocks/src/block-editor/types.d.ts +1 -0
- 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/path-utils/src/index.d.ts +5 -0
- package/dist/_dts/preview-next/src/client/blocks/BlockToolbar.d.ts +2 -0
- package/dist/_dts/preview-next/src/client/preview/PreviewChromeLayer.d.ts +5 -0
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewEntryControllerProvider.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/preview/previewErrorMessages.d.ts +4 -0
- package/dist/_dts/preview-next/src/client/preview/styleConfiguratorApplyPayload.d.ts +1 -1
- 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/verify.d.ts +1 -0
- package/dist/_dts/sdk/src/cli/content/reader.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/blocks.d.ts +14 -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 +2 -1
- package/dist/_dts/sdk/src/client/management/types.d.ts +58 -20
- package/dist/_dts/sdk/src/config/content-types.d.ts +2 -0
- package/dist/_dts/sdk/src/config/content-validation.d.ts +4 -0
- package/dist/_dts/sdk/src/date-time/index.d.ts +68 -0
- package/dist/_dts/sdk/src/navigation/index.d.ts +2 -0
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +5 -2
- package/dist/_dts/sdk/src/rendering/components/Layout.d.ts +2 -1
- package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +1 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/site-commands/src/commands.d.ts +900 -827
- package/dist/_dts/theme-core/src/accordions/types.d.ts +2 -2
- 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 +1 -0
- package/dist/_dts/theme-core/src/buttons/personalities/index.d.ts +11 -0
- package/dist/_dts/theme-core/src/buttons/personalities/two-tone-pill.d.ts +17 -0
- package/dist/_dts/theme-core/src/buttons/personalities/types.d.ts +45 -33
- 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/types.d.ts +104 -86
- package/dist/_dts/theme-core/src/cards/types.d.ts +16 -16
- package/dist/_dts/theme-core/src/footer/mode.d.ts +15 -0
- 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/interactive/baseSchema.d.ts +1 -1
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +117 -150
- package/dist/_dts/theme-core/src/mock-themes/modern-minimal.d.ts +1 -1
- package/dist/_dts/theme-core/src/navigation/types.d.ts +3 -3
- 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 +1264 -138
- package/dist/_dts/theme-core/src/site-styles/backgroundAppearance.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +10 -10
- package/dist/_dts/theme-core/src/site-styles/headerLooks.d.ts +12 -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/runtimeCompiler.d.ts +29 -8
- package/dist/_dts/theme-core/src/site-styles/siteChromeNavPreferences.d.ts +15 -0
- package/dist/_dts/theme-core/src/site-styles/styleTags.d.ts +2 -2
- package/dist/cli/index.mjs +68552 -66955
- 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-publish.md +5 -1
- package/dist/client/{DiscountCodeDisclosure-BwGkvmVH.mjs → DiscountCodeDisclosure-DU1ygxU2.mjs} +1 -1
- package/dist/client/{EventCombined.client-JnWE6Hzc.mjs → EventCombined.client-DB5zagCo.mjs} +3 -3
- package/dist/client/{EventListing.client-DQewc_kg.mjs → EventListing.client-CTX9JHBL.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-DPAU3SFt.mjs → LeafletStaticMap-BYImhgiB.mjs} +1 -1
- package/dist/client/{MagicLinkForm-D4kpWCbW.mjs → MagicLinkForm-CRkw_M3l.mjs} +2 -2
- package/dist/client/{StepIndicator-CBlkb4rA.mjs → StepIndicator-BnmVBJJh.mjs} +2 -2
- package/dist/client/{accordion-DAIBVpTS.mjs → accordion-CeGreumd.mjs} +1 -1
- package/dist/client/{bookingForm-DZ-4l5_1.mjs → bookingForm-CSzFNrpN.mjs} +6 -6
- package/dist/client/bookings.mjs +637 -328
- package/dist/client/{buttons-DJgynGHQ.mjs → buttons-DoFV7KDL.mjs} +618 -306
- package/dist/client/{carousel-D-SLfX8r.mjs → carousel-B2jDtogf.mjs} +1 -1
- package/dist/client/{cart-CEgbgJhX.mjs → cart-D-jZ-vaY.mjs} +3 -3
- package/dist/client/{checkout-CXWrCRAA.mjs → checkout-Dza-LA7N.mjs} +3 -3
- package/dist/client/client.mjs +2497 -1216
- package/dist/client/{colorStyles-jZS6KfkP.mjs → colorStyles-CrgzoXsm.mjs} +1 -30
- package/dist/client/{courseRegistration-DVmLrRVz.mjs → courseRegistration-TYkNychb.mjs} +7 -7
- package/dist/client/{eventCalendar-DCuyPY_c.mjs → eventCalendar-BI_90SsT.mjs} +5 -5
- package/dist/client/{eventCombined-kP2CA2D4.mjs → eventCombined-mNrpryE9.mjs} +2 -2
- package/dist/client/{eventDetails-DU0LeF5e.mjs → eventDetails-D4GVlCIY.mjs} +3 -3
- package/dist/client/{eventListing-CcHF87BI.mjs → eventListing-YhKN018y.mjs} +2 -2
- package/dist/client/{eventRegistration-DJnR0yFH.mjs → eventRegistration-CdHGtilr.mjs} +7 -7
- package/dist/client/foregroundContract-xICPq59x.mjs +31 -0
- package/dist/client/{form-CH1lCusH.mjs → form-AcAL45rA.mjs} +2 -2
- package/dist/client/{headerSection-CBPFZoku.mjs → headerSection-uEC52ueD.mjs} +3 -3
- package/dist/client/hooks.mjs +1249 -841
- package/dist/client/{locationMap-Cx1hBg5n.mjs → locationMap-_wJDSUYe.mjs} +3 -3
- package/dist/client/{media-DHtSxS5V.mjs → media-BK0O3b-U.mjs} +3 -2
- package/dist/client/{newsletterForm-1ZL_ti9u.mjs → newsletterForm-DrArsb2B.mjs} +2 -2
- package/dist/client/{pricing-BIbzmV0G.mjs → pricing-BSYVghwo.mjs} +1 -1
- package/dist/client/{productDetail-BTh5gHBV.mjs → productDetail-Dyk90sMs.mjs} +3 -3
- package/dist/client/{productList-Cc7OMrqN.mjs → productList-BCKThwAI.mjs} +3 -3
- package/dist/client/{propsDecoder-oR-M-ISN.mjs → propsDecoder-CkXxkdSR.mjs} +96 -33
- package/dist/client/rendering/client.mjs +1278 -523
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +2308 -1028
- package/dist/client/{shop-CQ_YbCnn.mjs → shop-DeltVH10.mjs} +6 -6
- package/dist/client/{shop-commerce-BM-AoD3M.mjs → shop-commerce-BD9Jsm2Z.mjs} +6 -6
- package/dist/client/{shop-commerce-store-DFMQhU5p.mjs → shop-commerce-store-CmXD6FDS.mjs} +1 -1
- package/dist/client/{shopShared-D0SKO2Cu.mjs → shopShared-B8v-lH_F.mjs} +2 -2
- package/dist/client/{useDiscountCodeUi-CrG4_ARt.mjs → useDiscountCodeUi-DbWJN8ld.mjs} +1 -1
- package/dist/client/{useEventFilters-CxK8Fekl.mjs → useEventFilters-EJIMUnqT.mjs} +46 -69
- package/dist/client/{usePolling-jcVryNgZ.mjs → usePolling-Cmh14fc7.mjs} +2 -2
- package/dist/preview-next/before-render.mjs +213 -0
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/middleware.mjs +213 -0
- package/dist/{previewAuthStore-BPcJPzdz.mjs → previewAuthStore-CTO7CRPk.mjs} +213 -0
- package/dist/{sdk-runtime-C39Rsk-x.mjs → sdk-runtime-Dou0GAav.mjs} +2 -2
- package/dist/{separator-BoMSQnsP.mjs → separator-CI5wZNXT.mjs} +1 -1
- package/dist/server/components.mjs +2370 -1132
- package/dist/server/config-validation.mjs +1256 -842
- package/dist/server/config.mjs +1256 -843
- package/dist/server/data.mjs +1249 -841
- package/dist/server/date-time.mjs +386 -0
- package/dist/server/index.mjs +214 -1
- package/dist/server/navigation.mjs +9 -3
- package/dist/server/next.mjs +3421 -1949
- package/dist/server/page-converter.mjs +1236 -659
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +2074 -1060
- package/dist/server/rendering.mjs +2370 -1132
- package/dist/server/routing.mjs +1543 -1062
- package/dist/server/server.mjs +1464 -843
- package/dist/server/theme-bridge.mjs +1581 -474
- package/dist/server/theme.mjs +614 -305
- package/dist/styles/index.css +12 -1
- package/package.json +7 -1
- 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/bookings.mjs
CHANGED
|
@@ -3961,19 +3961,29 @@ function assertNever$1(value) {
|
|
|
3961
3961
|
const DEFAULT_LOCALE = "en-US";
|
|
3962
3962
|
const FALLBACK_TIMEZONE = "UTC";
|
|
3963
3963
|
const LOCAL_DATE_PATTERN = /^(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})$/u;
|
|
3964
|
+
const DATE_TIME_FORMATTER_CACHE_LIMIT = 100;
|
|
3965
|
+
const dateTimeFormatterCache = /* @__PURE__ */ new Map();
|
|
3966
|
+
const timeZoneValidityCache = /* @__PURE__ */ new Map();
|
|
3964
3967
|
function isValidTimeZone(timeZone) {
|
|
3968
|
+
const cached = timeZoneValidityCache.get(timeZone);
|
|
3969
|
+
if (cached !== void 0) return cached;
|
|
3970
|
+
let isValid;
|
|
3965
3971
|
try {
|
|
3966
3972
|
new Intl.DateTimeFormat(DEFAULT_LOCALE, { timeZone }).format(/* @__PURE__ */ new Date());
|
|
3967
|
-
|
|
3973
|
+
isValid = true;
|
|
3968
3974
|
} catch {
|
|
3969
|
-
|
|
3975
|
+
isValid = false;
|
|
3970
3976
|
}
|
|
3977
|
+
if (timeZoneValidityCache.size >= DATE_TIME_FORMATTER_CACHE_LIMIT) timeZoneValidityCache.clear();
|
|
3978
|
+
timeZoneValidityCache.set(timeZone, isValid);
|
|
3979
|
+
return isValid;
|
|
3971
3980
|
}
|
|
3972
3981
|
function getSafeTimeZone(timeZone) {
|
|
3973
3982
|
const normalized = typeof timeZone === "string" ? timeZone.trim() : "";
|
|
3974
3983
|
return normalized.length > 0 && isValidTimeZone(normalized) ? normalized : FALLBACK_TIMEZONE;
|
|
3975
3984
|
}
|
|
3976
3985
|
function parseStrictBookingTimeZone(timeZone) {
|
|
3986
|
+
if (typeof timeZone !== "string") return null;
|
|
3977
3987
|
const normalized = timeZone.trim();
|
|
3978
3988
|
if (normalized.length === 0 || !isValidTimeZone(normalized)) return null;
|
|
3979
3989
|
return normalized;
|
|
@@ -3986,10 +3996,19 @@ function formatParseError(error) {
|
|
|
3986
3996
|
}
|
|
3987
3997
|
}
|
|
3988
3998
|
function formatToPartsLookup(date, locale, timeZone, format) {
|
|
3989
|
-
return new Map(
|
|
3999
|
+
return new Map(getCachedDateTimeFormatter(locale, timeZone, format).formatToParts(date).map((part) => [part.type, part.value]));
|
|
4000
|
+
}
|
|
4001
|
+
function getCachedDateTimeFormatter(locale, timeZone, format) {
|
|
4002
|
+
const key = `${locale}\u0000${timeZone}\u0000${JSON.stringify(Object.entries(format).sort(([left], [right]) => left.localeCompare(right)))}`;
|
|
4003
|
+
const cached = dateTimeFormatterCache.get(key);
|
|
4004
|
+
if (cached !== void 0) return cached;
|
|
4005
|
+
const formatter = new Intl.DateTimeFormat(locale, {
|
|
3990
4006
|
...format,
|
|
3991
4007
|
timeZone
|
|
3992
|
-
})
|
|
4008
|
+
});
|
|
4009
|
+
if (dateTimeFormatterCache.size >= DATE_TIME_FORMATTER_CACHE_LIMIT) dateTimeFormatterCache.clear();
|
|
4010
|
+
dateTimeFormatterCache.set(key, formatter);
|
|
4011
|
+
return formatter;
|
|
3993
4012
|
}
|
|
3994
4013
|
function getZonedDateTimeParts(date, timeZone) {
|
|
3995
4014
|
const parts = formatToPartsLookup(date, "en-GB", timeZone, {
|
|
@@ -4042,23 +4061,9 @@ function toUtcIsoDateTimeString(value) {
|
|
|
4042
4061
|
return parsed.value;
|
|
4043
4062
|
}
|
|
4044
4063
|
function parseScheduledBookingDateTime(input) {
|
|
4064
|
+
let startsAt;
|
|
4045
4065
|
try {
|
|
4046
|
-
|
|
4047
|
-
const timeZone = parseStrictBookingTimeZone(input.timeZone);
|
|
4048
|
-
if (timeZone === null) return {
|
|
4049
|
-
ok: false,
|
|
4050
|
-
field: "timeZone",
|
|
4051
|
-
reason: "invalid_time_zone",
|
|
4052
|
-
value: input.timeZone
|
|
4053
|
-
};
|
|
4054
|
-
return {
|
|
4055
|
-
ok: true,
|
|
4056
|
-
value: {
|
|
4057
|
-
startsAt,
|
|
4058
|
-
timeZone,
|
|
4059
|
-
locale: input.locale
|
|
4060
|
-
}
|
|
4061
|
-
};
|
|
4066
|
+
startsAt = toUtcIsoDateTimeString(input.startsAt);
|
|
4062
4067
|
} catch {
|
|
4063
4068
|
return {
|
|
4064
4069
|
ok: false,
|
|
@@ -4067,6 +4072,21 @@ function parseScheduledBookingDateTime(input) {
|
|
|
4067
4072
|
value: input.startsAt
|
|
4068
4073
|
};
|
|
4069
4074
|
}
|
|
4075
|
+
const timeZone = parseStrictBookingTimeZone(input.timeZone);
|
|
4076
|
+
if (timeZone === null) return {
|
|
4077
|
+
ok: false,
|
|
4078
|
+
field: "timeZone",
|
|
4079
|
+
reason: "invalid_time_zone",
|
|
4080
|
+
value: typeof input.timeZone === "string" ? input.timeZone : ""
|
|
4081
|
+
};
|
|
4082
|
+
return {
|
|
4083
|
+
ok: true,
|
|
4084
|
+
value: {
|
|
4085
|
+
startsAt,
|
|
4086
|
+
timeZone,
|
|
4087
|
+
locale: input.locale
|
|
4088
|
+
}
|
|
4089
|
+
};
|
|
4070
4090
|
}
|
|
4071
4091
|
function toScheduledBookingDateTime(input) {
|
|
4072
4092
|
const result = parseScheduledBookingDateTime(input);
|
|
@@ -4076,10 +4096,7 @@ function toScheduledBookingDateTime(input) {
|
|
|
4076
4096
|
function formatBookingInstant(isoString, options) {
|
|
4077
4097
|
const date = new Date(isoString);
|
|
4078
4098
|
if (Number.isNaN(date.getTime())) return isoString;
|
|
4079
|
-
return
|
|
4080
|
-
...options.format,
|
|
4081
|
-
timeZone: getSafeTimeZone(options.timeZone)
|
|
4082
|
-
}).format(date);
|
|
4099
|
+
return getCachedDateTimeFormatter(options.locale ?? DEFAULT_LOCALE, getSafeTimeZone(options.timeZone), options.format).format(date);
|
|
4083
4100
|
}
|
|
4084
4101
|
function getBookingLocalDateKey(input) {
|
|
4085
4102
|
return formatDateKey(getLocalScheduleDate(new Date(input.startsAt), input.timeZone));
|
|
@@ -7288,6 +7305,111 @@ function useAppointmentCheckoutVerificationWithDeps(config, deps) {
|
|
|
7288
7305
|
};
|
|
7289
7306
|
}
|
|
7290
7307
|
//#endregion
|
|
7308
|
+
//#region ../theme-core/src/buttons/effectClassification.ts
|
|
7309
|
+
/**
|
|
7310
|
+
* Exhaustive live policy for every registered effect id.
|
|
7311
|
+
*
|
|
7312
|
+
* The resolver consumes the transition payload directly, so adding an effect
|
|
7313
|
+
* cannot update classification without also defining its runtime behavior.
|
|
7314
|
+
*/
|
|
7315
|
+
const BUTTON_EFFECT_POLICIES = {
|
|
7316
|
+
"darken-background": {
|
|
7317
|
+
classification: "colour-transition",
|
|
7318
|
+
transition: {
|
|
7319
|
+
kind: "adjust-shade",
|
|
7320
|
+
direction: "darker"
|
|
7321
|
+
}
|
|
7322
|
+
},
|
|
7323
|
+
"lighten-background": {
|
|
7324
|
+
classification: "colour-transition",
|
|
7325
|
+
transition: {
|
|
7326
|
+
kind: "adjust-shade",
|
|
7327
|
+
direction: "lighter"
|
|
7328
|
+
}
|
|
7329
|
+
},
|
|
7330
|
+
"background-on-hover": {
|
|
7331
|
+
classification: "colour-transition",
|
|
7332
|
+
transition: { kind: "replace-background" }
|
|
7333
|
+
},
|
|
7334
|
+
"background-on-hover-alpha": {
|
|
7335
|
+
classification: "unsupported-colour",
|
|
7336
|
+
reason: "alpha_requires_surface"
|
|
7337
|
+
},
|
|
7338
|
+
"fade-background": {
|
|
7339
|
+
classification: "unsupported-colour",
|
|
7340
|
+
reason: "changes_element_opacity"
|
|
7341
|
+
},
|
|
7342
|
+
"opacity-reduce": {
|
|
7343
|
+
classification: "unsupported-colour",
|
|
7344
|
+
reason: "changes_element_opacity"
|
|
7345
|
+
},
|
|
7346
|
+
"gradient-text": {
|
|
7347
|
+
classification: "unsupported-colour",
|
|
7348
|
+
reason: "changes_foreground"
|
|
7349
|
+
},
|
|
7350
|
+
"text-color-change": {
|
|
7351
|
+
classification: "unsupported-colour",
|
|
7352
|
+
reason: "changes_foreground"
|
|
7353
|
+
},
|
|
7354
|
+
"border-color-change": {
|
|
7355
|
+
classification: "unsupported-colour",
|
|
7356
|
+
reason: "changes_border"
|
|
7357
|
+
},
|
|
7358
|
+
"aurora-glow": {
|
|
7359
|
+
classification: "unsupported-background-overlay",
|
|
7360
|
+
reason: "unresolved_background_overlay"
|
|
7361
|
+
},
|
|
7362
|
+
"cosmic-stardust": {
|
|
7363
|
+
classification: "unsupported-background-overlay",
|
|
7364
|
+
reason: "unresolved_background_overlay"
|
|
7365
|
+
},
|
|
7366
|
+
"gradient-border-fill": {
|
|
7367
|
+
classification: "unsupported-background-overlay",
|
|
7368
|
+
reason: "unresolved_background_overlay"
|
|
7369
|
+
},
|
|
7370
|
+
"animated-gradient-border-fill": {
|
|
7371
|
+
classification: "unsupported-background-overlay",
|
|
7372
|
+
reason: "unresolved_background_overlay"
|
|
7373
|
+
},
|
|
7374
|
+
"nav-underline": {
|
|
7375
|
+
classification: "not-button",
|
|
7376
|
+
reason: "not_button_effect"
|
|
7377
|
+
},
|
|
7378
|
+
"nav-frosted-base": {
|
|
7379
|
+
classification: "not-button",
|
|
7380
|
+
reason: "not_button_effect"
|
|
7381
|
+
},
|
|
7382
|
+
"nav-frosted-hover": {
|
|
7383
|
+
classification: "not-button",
|
|
7384
|
+
reason: "not_button_effect"
|
|
7385
|
+
},
|
|
7386
|
+
"nav-frosted-active": {
|
|
7387
|
+
classification: "not-button",
|
|
7388
|
+
reason: "not_button_effect"
|
|
7389
|
+
},
|
|
7390
|
+
"animated-gradient": { classification: "non-colour" },
|
|
7391
|
+
"border-glow": { classification: "non-colour" },
|
|
7392
|
+
"drop-shadow": { classification: "non-colour" },
|
|
7393
|
+
"inner-shadow": { classification: "non-colour" },
|
|
7394
|
+
"neumorphic-shadow": { classification: "non-colour" },
|
|
7395
|
+
"outer-glow": { classification: "non-colour" },
|
|
7396
|
+
"retro-3d-shadow": { classification: "non-colour" },
|
|
7397
|
+
"scale-up": { classification: "non-colour" },
|
|
7398
|
+
"scale-down": { classification: "non-colour" },
|
|
7399
|
+
lift: { classification: "non-colour" },
|
|
7400
|
+
"press-down": { classification: "non-colour" },
|
|
7401
|
+
pop: { classification: "non-colour" },
|
|
7402
|
+
"border-bottom-grow": { classification: "non-colour" },
|
|
7403
|
+
"sketchy-border": { classification: "non-colour" },
|
|
7404
|
+
"pulse-animation": { classification: "non-colour" }
|
|
7405
|
+
};
|
|
7406
|
+
function getButtonEffectPolicy(effectId) {
|
|
7407
|
+
return Object.prototype.hasOwnProperty.call(BUTTON_EFFECT_POLICIES, effectId) ? BUTTON_EFFECT_POLICIES[effectId] : null;
|
|
7408
|
+
}
|
|
7409
|
+
function classifyButtonEffectId(effectId) {
|
|
7410
|
+
return getButtonEffectPolicy(effectId)?.classification ?? "unknown";
|
|
7411
|
+
}
|
|
7412
|
+
//#endregion
|
|
7291
7413
|
//#region ../theme-core/src/tokens/colorTokenParts.ts
|
|
7292
7414
|
function parseOpacityPercent(source) {
|
|
7293
7415
|
const trimmed = source.trim();
|
|
@@ -7419,6 +7541,10 @@ function isThemeColorToken(value) {
|
|
|
7419
7541
|
const parts = parseColorTokenParts(value);
|
|
7420
7542
|
return parts.kind === "token" && isThemeColorTokenBase(parts.token);
|
|
7421
7543
|
}
|
|
7544
|
+
function parseThemeColorToken(value) {
|
|
7545
|
+
if (!isThemeColorToken(value)) return null;
|
|
7546
|
+
return value.trim();
|
|
7547
|
+
}
|
|
7422
7548
|
const themeColorTokenSchema = z$1.string().min(1).refine((value) => Boolean(isThemeColorToken(value)), "Expected a known Theme V2 color token");
|
|
7423
7549
|
//#endregion
|
|
7424
7550
|
//#region ../theme-core/src/buttons/types.ts
|
|
@@ -7437,6 +7563,20 @@ const VARIANT_ROLES = [
|
|
|
7437
7563
|
"tertiary",
|
|
7438
7564
|
"accent"
|
|
7439
7565
|
];
|
|
7566
|
+
function parseOpaqueButtonColourToken(value) {
|
|
7567
|
+
const token = parseThemeColorToken(value);
|
|
7568
|
+
if (token === null) return null;
|
|
7569
|
+
const parts = parseColorTokenParts(token);
|
|
7570
|
+
return parts.kind === "token" && parts.opacityPercent === null ? token : null;
|
|
7571
|
+
}
|
|
7572
|
+
function unsafeAsOpaqueButtonColourToken(value) {
|
|
7573
|
+
return value;
|
|
7574
|
+
}
|
|
7575
|
+
const opaqueButtonColourTokenSchema = themeColorTokenSchema.refine((value) => parseOpaqueButtonColourToken(value) !== null, "Button colour tokens must be opaque").transform((value) => {
|
|
7576
|
+
const token = parseOpaqueButtonColourToken(value);
|
|
7577
|
+
if (token === null) throw new Error("Invariant: opaque button token passed its schema");
|
|
7578
|
+
return token;
|
|
7579
|
+
});
|
|
7440
7580
|
const cornerStyleSchema = z$1.enum([
|
|
7441
7581
|
"square",
|
|
7442
7582
|
"rounded",
|
|
@@ -7538,7 +7678,7 @@ const buttonSizesSchema = z$1.object({
|
|
|
7538
7678
|
lg,
|
|
7539
7679
|
xl: xl ?? lg
|
|
7540
7680
|
}));
|
|
7541
|
-
const
|
|
7681
|
+
const canonicalButtonGlobalSettingsSchema = z$1.object({
|
|
7542
7682
|
cornerStyle: cornerStyleSchema,
|
|
7543
7683
|
cornerRadius: z$1.number().min(0).max(24).optional(),
|
|
7544
7684
|
/**
|
|
@@ -7569,11 +7709,12 @@ const buttonGlobalSettingsSchema = z$1.object({
|
|
|
7569
7709
|
paddingPreset: buttonPaddingPresetSchema.optional(),
|
|
7570
7710
|
hoverTransform: hoverTransformSchema,
|
|
7571
7711
|
hoverColor: hoverColorSchema,
|
|
7572
|
-
hoverColorToken:
|
|
7712
|
+
hoverColorToken: opaqueButtonColourTokenSchema.optional(),
|
|
7573
7713
|
gradientStyle: gradientStyleSchema.optional(),
|
|
7574
7714
|
gradientAngle: z$1.number().min(0).max(360).optional(),
|
|
7575
7715
|
gradientSharpness: gradientSharpnessSchema.optional()
|
|
7576
7716
|
});
|
|
7717
|
+
const buttonGlobalSettingsSchema = z$1.preprocess(normalizeLegacyButtonGlobalInput, canonicalButtonGlobalSettingsSchema);
|
|
7577
7718
|
const gradientDirectionSchema = z$1.enum([
|
|
7578
7719
|
"to-r",
|
|
7579
7720
|
"to-l",
|
|
@@ -7587,27 +7728,33 @@ const gradientDirectionSchema = z$1.enum([
|
|
|
7587
7728
|
const buttonBackgroundSchema = z$1.discriminatedUnion("type", [
|
|
7588
7729
|
z$1.object({
|
|
7589
7730
|
type: z$1.literal("solid"),
|
|
7590
|
-
colorToken:
|
|
7731
|
+
colorToken: opaqueButtonColourTokenSchema
|
|
7591
7732
|
}),
|
|
7592
7733
|
z$1.object({
|
|
7593
7734
|
type: z$1.literal("gradient"),
|
|
7594
|
-
stops: z$1.array(
|
|
7595
|
-
|
|
7735
|
+
stops: z$1.array(opaqueButtonColourTokenSchema).min(2).transform((stops) => {
|
|
7736
|
+
const [first, second, ...rest] = stops;
|
|
7737
|
+
if (first === void 0 || second === void 0) throw new Error("Invariant: gradient stops passed the minimum length schema");
|
|
7738
|
+
return [
|
|
7739
|
+
first,
|
|
7740
|
+
second,
|
|
7741
|
+
...rest
|
|
7742
|
+
];
|
|
7743
|
+
}),
|
|
7744
|
+
direction: gradientDirectionSchema,
|
|
7745
|
+
foregroundToken: opaqueButtonColourTokenSchema
|
|
7596
7746
|
}),
|
|
7597
|
-
z$1.object({
|
|
7747
|
+
z$1.object({
|
|
7748
|
+
type: z$1.literal("surface"),
|
|
7749
|
+
role: z$1.literal("link")
|
|
7750
|
+
})
|
|
7598
7751
|
]);
|
|
7599
7752
|
const effectApplicationSchema = z$1.object({
|
|
7600
7753
|
effectId: z$1.string(),
|
|
7601
|
-
options: z$1.record(z$1.string(), z$1.
|
|
7602
|
-
});
|
|
7603
|
-
const buttonBorderSchema = z$1.object({
|
|
7604
|
-
widthClass: z$1.string(),
|
|
7605
|
-
colorToken: themeColorTokenSchema
|
|
7606
|
-
});
|
|
7607
|
-
const buttonVariantAffordanceSchema = z$1.object({
|
|
7608
|
-
iconId: z$1.string().min(1),
|
|
7609
|
-
colorToken: themeColorTokenSchema.optional()
|
|
7754
|
+
options: z$1.record(z$1.string(), z$1.json()).optional()
|
|
7610
7755
|
});
|
|
7756
|
+
const buttonBorderSchema = z$1.object({ widthClass: z$1.string() });
|
|
7757
|
+
const buttonVariantAffordanceSchema = z$1.object({ iconId: z$1.string().min(1) });
|
|
7611
7758
|
const variantShadowSchema = z$1.object({
|
|
7612
7759
|
elevation: z$1.enum([
|
|
7613
7760
|
"none",
|
|
@@ -7648,27 +7795,170 @@ const variantSizeOverridesSchema = z$1.object({
|
|
|
7648
7795
|
* default (e.g. link-style variants declaring zero horizontal padding at
|
|
7649
7796
|
* every size).
|
|
7650
7797
|
*/
|
|
7651
|
-
const
|
|
7798
|
+
const canonicalButtonVariantSchema = z$1.object({
|
|
7652
7799
|
id: z$1.string(),
|
|
7653
7800
|
name: z$1.string().min(1).max(20),
|
|
7654
7801
|
enabled: z$1.boolean(),
|
|
7655
7802
|
priority: prioritySchema,
|
|
7656
7803
|
background: buttonBackgroundSchema,
|
|
7657
|
-
textColorToken: themeColorTokenSchema,
|
|
7658
7804
|
/** Tailwind radius token (e.g. `'rounded-md'`). Omit to inherit from `global.cornerStyle`. */
|
|
7659
7805
|
borderRadius: z$1.string().optional(),
|
|
7660
7806
|
shadow: variantShadowSchema.optional(),
|
|
7661
7807
|
border: buttonBorderSchema.optional(),
|
|
7662
|
-
hoverBackgroundToken:
|
|
7808
|
+
hoverBackgroundToken: opaqueButtonColourTokenSchema.optional(),
|
|
7663
7809
|
effects: variantEffectsSchema.optional(),
|
|
7664
7810
|
sizes: variantSizeOverridesSchema.optional(),
|
|
7665
7811
|
affordance: buttonVariantAffordanceSchema.optional()
|
|
7666
7812
|
});
|
|
7813
|
+
/**
|
|
7814
|
+
* Temporary persisted-theme admission boundary for issue #1206.
|
|
7815
|
+
*
|
|
7816
|
+
* Production inventory on 2026-07-22 found 22 rows using the old independent
|
|
7817
|
+
* `textColorToken`/border colour shape. New source and all downstream code use
|
|
7818
|
+
* only the canonical relationship. Delete this preprocessor after the reviewed
|
|
7819
|
+
* production rewrite reports zero legacy rows.
|
|
7820
|
+
*/
|
|
7821
|
+
const buttonVariantSchema = z$1.preprocess(normalizeLegacyButtonVariantInput, canonicalButtonVariantSchema);
|
|
7667
7822
|
const buttonSystemSchema = z$1.object({
|
|
7668
7823
|
global: buttonGlobalSettingsSchema,
|
|
7669
7824
|
variants: z$1.array(buttonVariantSchema).min(1).max(6),
|
|
7670
7825
|
sizes: buttonSizesSchema.optional()
|
|
7671
7826
|
});
|
|
7827
|
+
function normalizeLegacyButtonVariantInput(input) {
|
|
7828
|
+
if (!isUnknownRecord(input)) return input;
|
|
7829
|
+
const background = input.background;
|
|
7830
|
+
if (!isUnknownRecord(background)) return input;
|
|
7831
|
+
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;
|
|
7832
|
+
const { textColorToken, ...withoutLegacyText } = input;
|
|
7833
|
+
const normalizedBorder = isUnknownRecord(input.border) && typeof input.border.widthClass === "string" ? { widthClass: input.border.widthClass } : input.border;
|
|
7834
|
+
const normalizedAffordance = isUnknownRecord(input.affordance) && typeof input.affordance.iconId === "string" ? { iconId: input.affordance.iconId } : input.affordance;
|
|
7835
|
+
const normalizedEffects = normalizeLegacyButtonEffects(input.effects, background.type);
|
|
7836
|
+
const hoverBackgroundToken = stripLegacyTokenAlpha(input.hoverBackgroundToken);
|
|
7837
|
+
if (background.type === "transparent") return {
|
|
7838
|
+
...withoutLegacyText,
|
|
7839
|
+
background: {
|
|
7840
|
+
type: "surface",
|
|
7841
|
+
role: "link"
|
|
7842
|
+
},
|
|
7843
|
+
border: normalizedBorder,
|
|
7844
|
+
affordance: normalizedAffordance,
|
|
7845
|
+
effects: normalizedEffects,
|
|
7846
|
+
hoverBackgroundToken
|
|
7847
|
+
};
|
|
7848
|
+
if (background.type === "gradient") {
|
|
7849
|
+
const stops = Array.isArray(background.stops) ? background.stops.map(stripLegacyTokenAlpha) : background.stops;
|
|
7850
|
+
return {
|
|
7851
|
+
...withoutLegacyText,
|
|
7852
|
+
background: {
|
|
7853
|
+
...background,
|
|
7854
|
+
stops,
|
|
7855
|
+
foregroundToken: stripLegacyTokenAlpha(background.foregroundToken ?? textColorToken)
|
|
7856
|
+
},
|
|
7857
|
+
border: normalizedBorder,
|
|
7858
|
+
affordance: normalizedAffordance,
|
|
7859
|
+
effects: normalizedEffects,
|
|
7860
|
+
hoverBackgroundToken
|
|
7861
|
+
};
|
|
7862
|
+
}
|
|
7863
|
+
return {
|
|
7864
|
+
...withoutLegacyText,
|
|
7865
|
+
background: background.type === "solid" ? {
|
|
7866
|
+
...background,
|
|
7867
|
+
colorToken: stripLegacyTokenAlpha(background.colorToken)
|
|
7868
|
+
} : background,
|
|
7869
|
+
border: normalizedBorder,
|
|
7870
|
+
affordance: normalizedAffordance,
|
|
7871
|
+
effects: normalizedEffects,
|
|
7872
|
+
hoverBackgroundToken
|
|
7873
|
+
};
|
|
7874
|
+
}
|
|
7875
|
+
function normalizeLegacyButtonGlobalInput(input) {
|
|
7876
|
+
if (!isUnknownRecord(input)) return input;
|
|
7877
|
+
const hoverColorToken = stripLegacyTokenAlpha(input.hoverColorToken);
|
|
7878
|
+
return hoverColorToken === input.hoverColorToken ? input : {
|
|
7879
|
+
...input,
|
|
7880
|
+
hoverColorToken
|
|
7881
|
+
};
|
|
7882
|
+
}
|
|
7883
|
+
function hasLegacyAlphaToken(input, background) {
|
|
7884
|
+
const stops = isUnknownArray(background.stops) ? background.stops : [];
|
|
7885
|
+
return [
|
|
7886
|
+
input.hoverBackgroundToken,
|
|
7887
|
+
background.colorToken,
|
|
7888
|
+
background.foregroundToken,
|
|
7889
|
+
...stops
|
|
7890
|
+
].some((token) => stripLegacyTokenAlpha(token) !== token);
|
|
7891
|
+
}
|
|
7892
|
+
function stripLegacyTokenAlpha(value) {
|
|
7893
|
+
if (typeof value !== "string") return value;
|
|
7894
|
+
const slashIndex = value.indexOf("/");
|
|
7895
|
+
return slashIndex < 0 ? value : value.slice(0, slashIndex);
|
|
7896
|
+
}
|
|
7897
|
+
function hasLegacyButtonEffects(input) {
|
|
7898
|
+
if (!isUnknownRecord(input)) return false;
|
|
7899
|
+
return [
|
|
7900
|
+
"base",
|
|
7901
|
+
"hover",
|
|
7902
|
+
"active",
|
|
7903
|
+
"focus"
|
|
7904
|
+
].some((state) => {
|
|
7905
|
+
const effects = input[state];
|
|
7906
|
+
return Array.isArray(effects) && effects.some((effect) => {
|
|
7907
|
+
if (!isUnknownRecord(effect) || typeof effect.effectId !== "string") return true;
|
|
7908
|
+
const classification = classifyButtonEffectId(effect.effectId);
|
|
7909
|
+
if (classification !== "colour-transition" && classification !== "non-colour") return true;
|
|
7910
|
+
return effect.effectId === "background-on-hover" && isUnknownRecord(effect.options) && stripLegacyTokenAlpha(effect.options.colorToken) !== effect.options.colorToken;
|
|
7911
|
+
});
|
|
7912
|
+
});
|
|
7913
|
+
}
|
|
7914
|
+
function normalizeLegacyButtonEffects(input, backgroundType) {
|
|
7915
|
+
if (!isUnknownRecord(input)) return input;
|
|
7916
|
+
const normalized = {};
|
|
7917
|
+
for (const state of [
|
|
7918
|
+
"base",
|
|
7919
|
+
"hover",
|
|
7920
|
+
"active",
|
|
7921
|
+
"focus"
|
|
7922
|
+
]) {
|
|
7923
|
+
const effects = input[state];
|
|
7924
|
+
if (!Array.isArray(effects)) continue;
|
|
7925
|
+
const safeEffects = effects.flatMap((effect) => {
|
|
7926
|
+
if (!isUnknownRecord(effect) || typeof effect.effectId !== "string") return [];
|
|
7927
|
+
const classification = classifyButtonEffectId(effect.effectId);
|
|
7928
|
+
if (classification === "non-colour") return [effect];
|
|
7929
|
+
if (classification !== "colour-transition") return [];
|
|
7930
|
+
if (effect.effectId === "background-on-hover") {
|
|
7931
|
+
const options = isUnknownRecord(effect.options) ? effect.options : null;
|
|
7932
|
+
const colorToken = options === null ? null : parseOpaqueButtonColourToken(stripLegacyTokenAlpha(options.colorToken));
|
|
7933
|
+
return colorToken === null ? [] : [{
|
|
7934
|
+
...effect,
|
|
7935
|
+
options: {
|
|
7936
|
+
...options,
|
|
7937
|
+
colorToken
|
|
7938
|
+
}
|
|
7939
|
+
}];
|
|
7940
|
+
}
|
|
7941
|
+
if (backgroundType !== "solid") return [];
|
|
7942
|
+
const rawAmount = isUnknownRecord(effect.options) ? effect.options.amount : void 0;
|
|
7943
|
+
const amount = typeof rawAmount === "number" && rawAmount > 0 ? Math.max(100, Math.round(rawAmount / 100) * 100) : 100;
|
|
7944
|
+
return [{
|
|
7945
|
+
...effect,
|
|
7946
|
+
options: {
|
|
7947
|
+
...isUnknownRecord(effect.options) ? effect.options : {},
|
|
7948
|
+
amount
|
|
7949
|
+
}
|
|
7950
|
+
}];
|
|
7951
|
+
});
|
|
7952
|
+
if (safeEffects.length > 0) normalized[state] = safeEffects;
|
|
7953
|
+
}
|
|
7954
|
+
return Object.keys(normalized).length === 0 ? void 0 : normalized;
|
|
7955
|
+
}
|
|
7956
|
+
function isUnknownRecord(value) {
|
|
7957
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
7958
|
+
}
|
|
7959
|
+
function isUnknownArray(value) {
|
|
7960
|
+
return Array.isArray(value);
|
|
7961
|
+
}
|
|
7672
7962
|
//#endregion
|
|
7673
7963
|
//#region ../theme-core/src/buttons/classNames.ts
|
|
7674
7964
|
function themeButtonVariantClassNames(variant) {
|
|
@@ -7744,7 +8034,7 @@ function defineButtonPersonality(input) {
|
|
|
7744
8034
|
name: input.name,
|
|
7745
8035
|
description: input.description,
|
|
7746
8036
|
tags: input.tags,
|
|
7747
|
-
buttonSystem: input.buttonSystem
|
|
8037
|
+
buttonSystem: buttonSystemSchema.parse(input.buttonSystem)
|
|
7748
8038
|
};
|
|
7749
8039
|
}
|
|
7750
8040
|
//#endregion
|
|
@@ -7797,19 +8087,15 @@ const brushedWash = defineButtonPersonality({
|
|
|
7797
8087
|
background: {
|
|
7798
8088
|
type: "gradient",
|
|
7799
8089
|
stops: ["primary", "accent"],
|
|
7800
|
-
direction: "to-r"
|
|
8090
|
+
direction: "to-r",
|
|
8091
|
+
foregroundToken: "primaryForeground"
|
|
7801
8092
|
},
|
|
7802
|
-
textColorToken: "primaryForeground",
|
|
7803
8093
|
borderRadius: "rounded-lg",
|
|
7804
8094
|
shadow: {
|
|
7805
8095
|
elevation: "low",
|
|
7806
8096
|
softness: "soft",
|
|
7807
8097
|
position: "bottom"
|
|
7808
|
-
}
|
|
7809
|
-
effects: { hover: [{
|
|
7810
|
-
effectId: "opacity-reduce",
|
|
7811
|
-
options: { reduction: -15 }
|
|
7812
|
-
}] }
|
|
8098
|
+
}
|
|
7813
8099
|
},
|
|
7814
8100
|
{
|
|
7815
8101
|
id: "secondary",
|
|
@@ -7819,32 +8105,27 @@ const brushedWash = defineButtonPersonality({
|
|
|
7819
8105
|
background: {
|
|
7820
8106
|
type: "gradient",
|
|
7821
8107
|
stops: ["secondary", "accent"],
|
|
7822
|
-
direction: "to-br"
|
|
8108
|
+
direction: "to-br",
|
|
8109
|
+
foregroundToken: "primaryForeground"
|
|
7823
8110
|
},
|
|
7824
|
-
textColorToken: "primaryForeground",
|
|
7825
8111
|
borderRadius: "rounded-lg",
|
|
7826
8112
|
shadow: {
|
|
7827
8113
|
elevation: "low",
|
|
7828
8114
|
softness: "soft",
|
|
7829
8115
|
position: "bottom"
|
|
7830
|
-
}
|
|
7831
|
-
effects: { hover: [{
|
|
7832
|
-
effectId: "opacity-reduce",
|
|
7833
|
-
options: { reduction: -15 }
|
|
7834
|
-
}] }
|
|
8116
|
+
}
|
|
7835
8117
|
},
|
|
7836
8118
|
{
|
|
7837
8119
|
id: "outline",
|
|
7838
8120
|
name: "Outline",
|
|
7839
8121
|
enabled: true,
|
|
7840
8122
|
priority: 3,
|
|
7841
|
-
background: {
|
|
7842
|
-
|
|
7843
|
-
|
|
7844
|
-
border: {
|
|
7845
|
-
widthClass: "border",
|
|
7846
|
-
colorToken: "primary"
|
|
8123
|
+
background: {
|
|
8124
|
+
type: "surface",
|
|
8125
|
+
role: "link"
|
|
7847
8126
|
},
|
|
8127
|
+
borderRadius: "rounded-lg",
|
|
8128
|
+
border: { widthClass: "border" },
|
|
7848
8129
|
effects: { hover: [{
|
|
7849
8130
|
effectId: "background-on-hover",
|
|
7850
8131
|
options: { colorToken: "surface" }
|
|
@@ -7855,8 +8136,10 @@ const brushedWash = defineButtonPersonality({
|
|
|
7855
8136
|
name: "Ghost",
|
|
7856
8137
|
enabled: true,
|
|
7857
8138
|
priority: 3,
|
|
7858
|
-
background: {
|
|
7859
|
-
|
|
8139
|
+
background: {
|
|
8140
|
+
type: "surface",
|
|
8141
|
+
role: "link"
|
|
8142
|
+
},
|
|
7860
8143
|
borderRadius: "rounded-lg",
|
|
7861
8144
|
effects: { hover: [{
|
|
7862
8145
|
effectId: "background-on-hover",
|
|
@@ -7902,7 +8185,6 @@ const confidentChip = defineButtonPersonality({
|
|
|
7902
8185
|
type: "solid",
|
|
7903
8186
|
colorToken: "primary"
|
|
7904
8187
|
},
|
|
7905
|
-
textColorToken: "primaryForeground",
|
|
7906
8188
|
borderRadius: "rounded-md",
|
|
7907
8189
|
shadow: {
|
|
7908
8190
|
elevation: "medium",
|
|
@@ -7912,7 +8194,7 @@ const confidentChip = defineButtonPersonality({
|
|
|
7912
8194
|
effects: {
|
|
7913
8195
|
hover: [{
|
|
7914
8196
|
effectId: "darken-background",
|
|
7915
|
-
options: { amount:
|
|
8197
|
+
options: { amount: 100 }
|
|
7916
8198
|
}],
|
|
7917
8199
|
active: [{
|
|
7918
8200
|
effectId: "scale-down",
|
|
@@ -7929,12 +8211,8 @@ const confidentChip = defineButtonPersonality({
|
|
|
7929
8211
|
type: "solid",
|
|
7930
8212
|
colorToken: "surface"
|
|
7931
8213
|
},
|
|
7932
|
-
textColorToken: "text",
|
|
7933
8214
|
borderRadius: "rounded-md",
|
|
7934
|
-
border: {
|
|
7935
|
-
widthClass: "border",
|
|
7936
|
-
colorToken: "border"
|
|
7937
|
-
},
|
|
8215
|
+
border: { widthClass: "border" },
|
|
7938
8216
|
effects: { hover: [{
|
|
7939
8217
|
effectId: "background-on-hover",
|
|
7940
8218
|
options: { colorToken: "background" }
|
|
@@ -7945,13 +8223,12 @@ const confidentChip = defineButtonPersonality({
|
|
|
7945
8223
|
name: "Outline",
|
|
7946
8224
|
enabled: true,
|
|
7947
8225
|
priority: 3,
|
|
7948
|
-
background: {
|
|
7949
|
-
|
|
7950
|
-
|
|
7951
|
-
border: {
|
|
7952
|
-
widthClass: "border",
|
|
7953
|
-
colorToken: "primary"
|
|
8226
|
+
background: {
|
|
8227
|
+
type: "surface",
|
|
8228
|
+
role: "link"
|
|
7954
8229
|
},
|
|
8230
|
+
borderRadius: "rounded-md",
|
|
8231
|
+
border: { widthClass: "border" },
|
|
7955
8232
|
effects: { hover: [{
|
|
7956
8233
|
effectId: "background-on-hover",
|
|
7957
8234
|
options: { colorToken: "surface" }
|
|
@@ -7962,8 +8239,10 @@ const confidentChip = defineButtonPersonality({
|
|
|
7962
8239
|
name: "Ghost",
|
|
7963
8240
|
enabled: true,
|
|
7964
8241
|
priority: 3,
|
|
7965
|
-
background: {
|
|
7966
|
-
|
|
8242
|
+
background: {
|
|
8243
|
+
type: "surface",
|
|
8244
|
+
role: "link"
|
|
8245
|
+
},
|
|
7967
8246
|
borderRadius: "rounded-md",
|
|
7968
8247
|
effects: { hover: [{
|
|
7969
8248
|
effectId: "background-on-hover",
|
|
@@ -8026,7 +8305,6 @@ const earthPill = defineButtonPersonality({
|
|
|
8026
8305
|
type: "solid",
|
|
8027
8306
|
colorToken: "primary"
|
|
8028
8307
|
},
|
|
8029
|
-
textColorToken: "primaryForeground",
|
|
8030
8308
|
borderRadius: "rounded-full",
|
|
8031
8309
|
shadow: {
|
|
8032
8310
|
elevation: "low",
|
|
@@ -8052,13 +8330,12 @@ const earthPill = defineButtonPersonality({
|
|
|
8052
8330
|
name: "Secondary",
|
|
8053
8331
|
enabled: true,
|
|
8054
8332
|
priority: 2,
|
|
8055
|
-
background: {
|
|
8056
|
-
|
|
8057
|
-
|
|
8058
|
-
border: {
|
|
8059
|
-
widthClass: "border",
|
|
8060
|
-
colorToken: "primary"
|
|
8333
|
+
background: {
|
|
8334
|
+
type: "surface",
|
|
8335
|
+
role: "link"
|
|
8061
8336
|
},
|
|
8337
|
+
borderRadius: "rounded-full",
|
|
8338
|
+
border: { widthClass: "border" },
|
|
8062
8339
|
effects: { hover: [{
|
|
8063
8340
|
effectId: "background-on-hover",
|
|
8064
8341
|
options: { colorToken: "muted" }
|
|
@@ -8069,13 +8346,12 @@ const earthPill = defineButtonPersonality({
|
|
|
8069
8346
|
name: "Outline",
|
|
8070
8347
|
enabled: true,
|
|
8071
8348
|
priority: 3,
|
|
8072
|
-
background: {
|
|
8073
|
-
|
|
8074
|
-
|
|
8075
|
-
border: {
|
|
8076
|
-
widthClass: "border",
|
|
8077
|
-
colorToken: "border"
|
|
8349
|
+
background: {
|
|
8350
|
+
type: "surface",
|
|
8351
|
+
role: "link"
|
|
8078
8352
|
},
|
|
8353
|
+
borderRadius: "rounded-full",
|
|
8354
|
+
border: { widthClass: "border" },
|
|
8079
8355
|
effects: { hover: [{
|
|
8080
8356
|
effectId: "background-on-hover",
|
|
8081
8357
|
options: { colorToken: "surfaceAlt" }
|
|
@@ -8086,8 +8362,10 @@ const earthPill = defineButtonPersonality({
|
|
|
8086
8362
|
name: "Ghost",
|
|
8087
8363
|
enabled: true,
|
|
8088
8364
|
priority: 3,
|
|
8089
|
-
background: {
|
|
8090
|
-
|
|
8365
|
+
background: {
|
|
8366
|
+
type: "surface",
|
|
8367
|
+
role: "link"
|
|
8368
|
+
},
|
|
8091
8369
|
borderRadius: "rounded-full",
|
|
8092
8370
|
shadow: {
|
|
8093
8371
|
elevation: "none",
|
|
@@ -8108,11 +8386,7 @@ const earthPill = defineButtonPersonality({
|
|
|
8108
8386
|
padding: "0.625rem 0",
|
|
8109
8387
|
fontSize: "text-xl"
|
|
8110
8388
|
}
|
|
8111
|
-
}
|
|
8112
|
-
effects: { hover: [{
|
|
8113
|
-
effectId: "opacity-reduce",
|
|
8114
|
-
options: { reduction: 25 }
|
|
8115
|
-
}] }
|
|
8389
|
+
}
|
|
8116
8390
|
}
|
|
8117
8391
|
]
|
|
8118
8392
|
}
|
|
@@ -8148,8 +8422,10 @@ const editorialLink = defineButtonPersonality({
|
|
|
8148
8422
|
name: "Primary",
|
|
8149
8423
|
enabled: true,
|
|
8150
8424
|
priority: 1,
|
|
8151
|
-
background: {
|
|
8152
|
-
|
|
8425
|
+
background: {
|
|
8426
|
+
type: "surface",
|
|
8427
|
+
role: "link"
|
|
8428
|
+
},
|
|
8153
8429
|
borderRadius: "rounded-none",
|
|
8154
8430
|
sizes: {
|
|
8155
8431
|
sm: { padding: "0.25rem 0" },
|
|
@@ -8171,8 +8447,10 @@ const editorialLink = defineButtonPersonality({
|
|
|
8171
8447
|
name: "Secondary",
|
|
8172
8448
|
enabled: true,
|
|
8173
8449
|
priority: 2,
|
|
8174
|
-
background: {
|
|
8175
|
-
|
|
8450
|
+
background: {
|
|
8451
|
+
type: "surface",
|
|
8452
|
+
role: "link"
|
|
8453
|
+
},
|
|
8176
8454
|
borderRadius: "rounded-none",
|
|
8177
8455
|
sizes: {
|
|
8178
8456
|
sm: { padding: "0.25rem 0" },
|
|
@@ -8194,8 +8472,10 @@ const editorialLink = defineButtonPersonality({
|
|
|
8194
8472
|
name: "Outline",
|
|
8195
8473
|
enabled: true,
|
|
8196
8474
|
priority: 3,
|
|
8197
|
-
background: {
|
|
8198
|
-
|
|
8475
|
+
background: {
|
|
8476
|
+
type: "surface",
|
|
8477
|
+
role: "link"
|
|
8478
|
+
},
|
|
8199
8479
|
borderRadius: "rounded-none",
|
|
8200
8480
|
sizes: {
|
|
8201
8481
|
sm: { padding: "0.25rem 0" },
|
|
@@ -8217,19 +8497,17 @@ const editorialLink = defineButtonPersonality({
|
|
|
8217
8497
|
name: "Ghost",
|
|
8218
8498
|
enabled: true,
|
|
8219
8499
|
priority: 3,
|
|
8220
|
-
background: {
|
|
8221
|
-
|
|
8500
|
+
background: {
|
|
8501
|
+
type: "surface",
|
|
8502
|
+
role: "link"
|
|
8503
|
+
},
|
|
8222
8504
|
borderRadius: "rounded-none",
|
|
8223
8505
|
sizes: {
|
|
8224
8506
|
sm: { padding: "0.25rem 0" },
|
|
8225
8507
|
md: { padding: "0.5rem 0" },
|
|
8226
8508
|
lg: { padding: "0.625rem 0" },
|
|
8227
8509
|
xl: { padding: "0.75rem 0" }
|
|
8228
|
-
}
|
|
8229
|
-
effects: { hover: [{
|
|
8230
|
-
effectId: "opacity-reduce",
|
|
8231
|
-
options: { reduction: -20 }
|
|
8232
|
-
}] }
|
|
8510
|
+
}
|
|
8233
8511
|
}
|
|
8234
8512
|
]
|
|
8235
8513
|
}
|
|
@@ -8291,12 +8569,8 @@ const flatInk = defineButtonPersonality({
|
|
|
8291
8569
|
type: "solid",
|
|
8292
8570
|
colorToken: "primary"
|
|
8293
8571
|
},
|
|
8294
|
-
textColorToken: "primaryForeground",
|
|
8295
8572
|
borderRadius: "rounded-lg",
|
|
8296
|
-
affordance: {
|
|
8297
|
-
iconId: "ArrowRight",
|
|
8298
|
-
colorToken: "accent"
|
|
8299
|
-
},
|
|
8573
|
+
affordance: { iconId: "ArrowRight" },
|
|
8300
8574
|
effects: { hover: [{
|
|
8301
8575
|
effectId: "lift",
|
|
8302
8576
|
options: { translateY: "-2px" }
|
|
@@ -8310,13 +8584,12 @@ const flatInk = defineButtonPersonality({
|
|
|
8310
8584
|
name: "Secondary",
|
|
8311
8585
|
enabled: true,
|
|
8312
8586
|
priority: 2,
|
|
8313
|
-
background: {
|
|
8314
|
-
|
|
8315
|
-
|
|
8316
|
-
border: {
|
|
8317
|
-
widthClass: "border",
|
|
8318
|
-
colorToken: "border"
|
|
8587
|
+
background: {
|
|
8588
|
+
type: "surface",
|
|
8589
|
+
role: "link"
|
|
8319
8590
|
},
|
|
8591
|
+
borderRadius: "rounded-lg",
|
|
8592
|
+
border: { widthClass: "border" },
|
|
8320
8593
|
effects: { hover: [{
|
|
8321
8594
|
effectId: "lift",
|
|
8322
8595
|
options: { translateY: "-2px" }
|
|
@@ -8334,12 +8607,8 @@ const flatInk = defineButtonPersonality({
|
|
|
8334
8607
|
type: "solid",
|
|
8335
8608
|
colorToken: "accent"
|
|
8336
8609
|
},
|
|
8337
|
-
textColorToken: "accentForeground",
|
|
8338
8610
|
borderRadius: "rounded-lg",
|
|
8339
|
-
affordance: {
|
|
8340
|
-
iconId: "ArrowRight",
|
|
8341
|
-
colorToken: "accentForeground"
|
|
8342
|
-
},
|
|
8611
|
+
affordance: { iconId: "ArrowRight" },
|
|
8343
8612
|
effects: { hover: [{
|
|
8344
8613
|
effectId: "lift",
|
|
8345
8614
|
options: { translateY: "-2px" }
|
|
@@ -8402,7 +8671,6 @@ const inkStamp = defineButtonPersonality({
|
|
|
8402
8671
|
type: "solid",
|
|
8403
8672
|
colorToken: "primary"
|
|
8404
8673
|
},
|
|
8405
|
-
textColorToken: "primaryForeground",
|
|
8406
8674
|
borderRadius: "rounded-md",
|
|
8407
8675
|
effects: {
|
|
8408
8676
|
hover: [{
|
|
@@ -8423,13 +8691,12 @@ const inkStamp = defineButtonPersonality({
|
|
|
8423
8691
|
name: "Secondary",
|
|
8424
8692
|
enabled: true,
|
|
8425
8693
|
priority: 2,
|
|
8426
|
-
background: {
|
|
8427
|
-
|
|
8428
|
-
|
|
8429
|
-
border: {
|
|
8430
|
-
widthClass: "border-2",
|
|
8431
|
-
colorToken: "primary"
|
|
8694
|
+
background: {
|
|
8695
|
+
type: "surface",
|
|
8696
|
+
role: "link"
|
|
8432
8697
|
},
|
|
8698
|
+
borderRadius: "rounded-md",
|
|
8699
|
+
border: { widthClass: "border-2" },
|
|
8433
8700
|
effects: { hover: [{
|
|
8434
8701
|
effectId: "background-on-hover",
|
|
8435
8702
|
options: { colorToken: "surface" }
|
|
@@ -8440,13 +8707,12 @@ const inkStamp = defineButtonPersonality({
|
|
|
8440
8707
|
name: "Outline",
|
|
8441
8708
|
enabled: true,
|
|
8442
8709
|
priority: 3,
|
|
8443
|
-
background: {
|
|
8444
|
-
|
|
8445
|
-
|
|
8446
|
-
border: {
|
|
8447
|
-
widthClass: "border-2",
|
|
8448
|
-
colorToken: "border"
|
|
8710
|
+
background: {
|
|
8711
|
+
type: "surface",
|
|
8712
|
+
role: "link"
|
|
8449
8713
|
},
|
|
8714
|
+
borderRadius: "rounded-md",
|
|
8715
|
+
border: { widthClass: "border-2" },
|
|
8450
8716
|
effects: { hover: [{
|
|
8451
8717
|
effectId: "background-on-hover",
|
|
8452
8718
|
options: { colorToken: "surface" }
|
|
@@ -8457,8 +8723,10 @@ const inkStamp = defineButtonPersonality({
|
|
|
8457
8723
|
name: "Ghost",
|
|
8458
8724
|
enabled: true,
|
|
8459
8725
|
priority: 3,
|
|
8460
|
-
background: {
|
|
8461
|
-
|
|
8726
|
+
background: {
|
|
8727
|
+
type: "surface",
|
|
8728
|
+
role: "link"
|
|
8729
|
+
},
|
|
8462
8730
|
borderRadius: "rounded-none",
|
|
8463
8731
|
sizes: {
|
|
8464
8732
|
sm: {
|
|
@@ -8551,7 +8819,6 @@ const joyStamp = defineButtonPersonality({
|
|
|
8551
8819
|
type: "solid",
|
|
8552
8820
|
colorToken: "primary"
|
|
8553
8821
|
},
|
|
8554
|
-
textColorToken: "primaryForeground",
|
|
8555
8822
|
borderRadius: "rounded-full",
|
|
8556
8823
|
shadow: {
|
|
8557
8824
|
elevation: "high",
|
|
@@ -8565,13 +8832,12 @@ const joyStamp = defineButtonPersonality({
|
|
|
8565
8832
|
name: "Secondary",
|
|
8566
8833
|
enabled: true,
|
|
8567
8834
|
priority: 2,
|
|
8568
|
-
background: {
|
|
8569
|
-
|
|
8570
|
-
|
|
8571
|
-
border: {
|
|
8572
|
-
widthClass: "border-2",
|
|
8573
|
-
colorToken: "text"
|
|
8835
|
+
background: {
|
|
8836
|
+
type: "surface",
|
|
8837
|
+
role: "link"
|
|
8574
8838
|
},
|
|
8839
|
+
borderRadius: "rounded-full",
|
|
8840
|
+
border: { widthClass: "border-2" },
|
|
8575
8841
|
shadow: {
|
|
8576
8842
|
elevation: "high",
|
|
8577
8843
|
softness: "hard",
|
|
@@ -8636,12 +8902,8 @@ const ornateRitual = defineButtonPersonality({
|
|
|
8636
8902
|
type: "solid",
|
|
8637
8903
|
colorToken: "primary"
|
|
8638
8904
|
},
|
|
8639
|
-
textColorToken: "primaryForeground",
|
|
8640
8905
|
borderRadius: "rounded-md",
|
|
8641
|
-
border: {
|
|
8642
|
-
widthClass: "border",
|
|
8643
|
-
colorToken: "primary"
|
|
8644
|
-
},
|
|
8906
|
+
border: { widthClass: "border" },
|
|
8645
8907
|
effects: {
|
|
8646
8908
|
hover: [{
|
|
8647
8909
|
effectId: "background-on-hover",
|
|
@@ -8662,12 +8924,8 @@ const ornateRitual = defineButtonPersonality({
|
|
|
8662
8924
|
type: "solid",
|
|
8663
8925
|
colorToken: "secondary"
|
|
8664
8926
|
},
|
|
8665
|
-
textColorToken: "primaryForeground",
|
|
8666
8927
|
borderRadius: "rounded-md",
|
|
8667
|
-
border: {
|
|
8668
|
-
widthClass: "border",
|
|
8669
|
-
colorToken: "primary"
|
|
8670
|
-
},
|
|
8928
|
+
border: { widthClass: "border" },
|
|
8671
8929
|
effects: { hover: [{
|
|
8672
8930
|
effectId: "background-on-hover",
|
|
8673
8931
|
options: { colorToken: "surface" }
|
|
@@ -8678,13 +8936,12 @@ const ornateRitual = defineButtonPersonality({
|
|
|
8678
8936
|
name: "Outline",
|
|
8679
8937
|
enabled: true,
|
|
8680
8938
|
priority: 3,
|
|
8681
|
-
background: {
|
|
8682
|
-
|
|
8683
|
-
|
|
8684
|
-
border: {
|
|
8685
|
-
widthClass: "border",
|
|
8686
|
-
colorToken: "primary"
|
|
8939
|
+
background: {
|
|
8940
|
+
type: "surface",
|
|
8941
|
+
role: "link"
|
|
8687
8942
|
},
|
|
8943
|
+
borderRadius: "rounded-md",
|
|
8944
|
+
border: { widthClass: "border" },
|
|
8688
8945
|
effects: { hover: [{
|
|
8689
8946
|
effectId: "background-on-hover",
|
|
8690
8947
|
options: { colorToken: "muted" }
|
|
@@ -8695,8 +8952,10 @@ const ornateRitual = defineButtonPersonality({
|
|
|
8695
8952
|
name: "Ghost",
|
|
8696
8953
|
enabled: true,
|
|
8697
8954
|
priority: 3,
|
|
8698
|
-
background: {
|
|
8699
|
-
|
|
8955
|
+
background: {
|
|
8956
|
+
type: "surface",
|
|
8957
|
+
role: "link"
|
|
8958
|
+
},
|
|
8700
8959
|
borderRadius: "rounded-none",
|
|
8701
8960
|
sizes: {
|
|
8702
8961
|
sm: {
|
|
@@ -8778,14 +9037,10 @@ const pebble = defineButtonPersonality({
|
|
|
8778
9037
|
type: "solid",
|
|
8779
9038
|
colorToken: "primary"
|
|
8780
9039
|
},
|
|
8781
|
-
textColorToken: "primaryForeground",
|
|
8782
9040
|
borderRadius: "rounded-full",
|
|
8783
9041
|
effects: { hover: [{
|
|
8784
|
-
effectId: "background
|
|
8785
|
-
options: {
|
|
8786
|
-
colorToken: "primary",
|
|
8787
|
-
opacity: 88
|
|
8788
|
-
}
|
|
9042
|
+
effectId: "darken-background",
|
|
9043
|
+
options: { amount: 100 }
|
|
8789
9044
|
}] }
|
|
8790
9045
|
},
|
|
8791
9046
|
{
|
|
@@ -8793,13 +9048,12 @@ const pebble = defineButtonPersonality({
|
|
|
8793
9048
|
name: "Secondary",
|
|
8794
9049
|
enabled: true,
|
|
8795
9050
|
priority: 2,
|
|
8796
|
-
background: {
|
|
8797
|
-
|
|
8798
|
-
|
|
8799
|
-
border: {
|
|
8800
|
-
widthClass: "border-2",
|
|
8801
|
-
colorToken: "accent"
|
|
9051
|
+
background: {
|
|
9052
|
+
type: "surface",
|
|
9053
|
+
role: "link"
|
|
8802
9054
|
},
|
|
9055
|
+
borderRadius: "rounded-full",
|
|
9056
|
+
border: { widthClass: "border-2" },
|
|
8803
9057
|
effects: { hover: [{
|
|
8804
9058
|
effectId: "background-on-hover",
|
|
8805
9059
|
options: { colorToken: "accent" }
|
|
@@ -8810,13 +9064,12 @@ const pebble = defineButtonPersonality({
|
|
|
8810
9064
|
name: "Outline",
|
|
8811
9065
|
enabled: true,
|
|
8812
9066
|
priority: 3,
|
|
8813
|
-
background: {
|
|
8814
|
-
|
|
8815
|
-
|
|
8816
|
-
border: {
|
|
8817
|
-
widthClass: "border",
|
|
8818
|
-
colorToken: "border"
|
|
9067
|
+
background: {
|
|
9068
|
+
type: "surface",
|
|
9069
|
+
role: "link"
|
|
8819
9070
|
},
|
|
9071
|
+
borderRadius: "rounded-full",
|
|
9072
|
+
border: { widthClass: "border" },
|
|
8820
9073
|
effects: { hover: [{
|
|
8821
9074
|
effectId: "background-on-hover",
|
|
8822
9075
|
options: { colorToken: "surface" }
|
|
@@ -8827,8 +9080,10 @@ const pebble = defineButtonPersonality({
|
|
|
8827
9080
|
name: "Ghost",
|
|
8828
9081
|
enabled: true,
|
|
8829
9082
|
priority: 3,
|
|
8830
|
-
background: {
|
|
8831
|
-
|
|
9083
|
+
background: {
|
|
9084
|
+
type: "surface",
|
|
9085
|
+
role: "link"
|
|
9086
|
+
},
|
|
8832
9087
|
borderRadius: "rounded-full",
|
|
8833
9088
|
sizes: {
|
|
8834
9089
|
sm: {
|
|
@@ -8844,11 +9099,7 @@ const pebble = defineButtonPersonality({
|
|
|
8844
9099
|
padding: "0.75rem 1.5rem",
|
|
8845
9100
|
fontSize: "text-xl"
|
|
8846
9101
|
}
|
|
8847
|
-
}
|
|
8848
|
-
effects: { hover: [{
|
|
8849
|
-
effectId: "opacity-reduce",
|
|
8850
|
-
options: { reduction: 30 }
|
|
8851
|
-
}] }
|
|
9102
|
+
}
|
|
8852
9103
|
}
|
|
8853
9104
|
]
|
|
8854
9105
|
}
|
|
@@ -8910,15 +9161,11 @@ const quietArrow = defineButtonPersonality({
|
|
|
8910
9161
|
type: "solid",
|
|
8911
9162
|
colorToken: "primary"
|
|
8912
9163
|
},
|
|
8913
|
-
textColorToken: "primaryForeground",
|
|
8914
9164
|
borderRadius: "rounded-xl",
|
|
8915
9165
|
affordance: { iconId: "ArrowRight" },
|
|
8916
9166
|
effects: { hover: [{
|
|
8917
|
-
effectId: "background
|
|
8918
|
-
options: {
|
|
8919
|
-
colorToken: "primary",
|
|
8920
|
-
opacity: 90
|
|
8921
|
-
}
|
|
9167
|
+
effectId: "darken-background",
|
|
9168
|
+
options: { amount: 100 }
|
|
8922
9169
|
}] }
|
|
8923
9170
|
},
|
|
8924
9171
|
{
|
|
@@ -8926,13 +9173,12 @@ const quietArrow = defineButtonPersonality({
|
|
|
8926
9173
|
name: "Secondary",
|
|
8927
9174
|
enabled: true,
|
|
8928
9175
|
priority: 2,
|
|
8929
|
-
background: {
|
|
8930
|
-
|
|
8931
|
-
|
|
8932
|
-
border: {
|
|
8933
|
-
widthClass: "border",
|
|
8934
|
-
colorToken: "primary"
|
|
9176
|
+
background: {
|
|
9177
|
+
type: "surface",
|
|
9178
|
+
role: "link"
|
|
8935
9179
|
},
|
|
9180
|
+
borderRadius: "rounded-xl",
|
|
9181
|
+
border: { widthClass: "border" },
|
|
8936
9182
|
affordance: { iconId: "ArrowRight" },
|
|
8937
9183
|
effects: { hover: [{
|
|
8938
9184
|
effectId: "background-on-hover",
|
|
@@ -8944,21 +9190,22 @@ const quietArrow = defineButtonPersonality({
|
|
|
8944
9190
|
name: "Outline",
|
|
8945
9191
|
enabled: true,
|
|
8946
9192
|
priority: 3,
|
|
8947
|
-
background: {
|
|
8948
|
-
|
|
9193
|
+
background: {
|
|
9194
|
+
type: "surface",
|
|
9195
|
+
role: "link"
|
|
9196
|
+
},
|
|
8949
9197
|
borderRadius: "rounded-xl",
|
|
8950
|
-
border: {
|
|
8951
|
-
widthClass: "border",
|
|
8952
|
-
colorToken: "primary"
|
|
8953
|
-
}
|
|
9198
|
+
border: { widthClass: "border" }
|
|
8954
9199
|
},
|
|
8955
9200
|
{
|
|
8956
9201
|
id: "ghost",
|
|
8957
9202
|
name: "Ghost",
|
|
8958
9203
|
enabled: true,
|
|
8959
9204
|
priority: 3,
|
|
8960
|
-
background: {
|
|
8961
|
-
|
|
9205
|
+
background: {
|
|
9206
|
+
type: "surface",
|
|
9207
|
+
role: "link"
|
|
9208
|
+
},
|
|
8962
9209
|
borderRadius: "rounded-xl"
|
|
8963
9210
|
}
|
|
8964
9211
|
]
|
|
@@ -9022,7 +9269,6 @@ const showtimePill = defineButtonPersonality({
|
|
|
9022
9269
|
type: "solid",
|
|
9023
9270
|
colorToken: "primary"
|
|
9024
9271
|
},
|
|
9025
|
-
textColorToken: "background",
|
|
9026
9272
|
borderRadius: "rounded-full",
|
|
9027
9273
|
effects: { hover: [{ effectId: "pop" }] }
|
|
9028
9274
|
},
|
|
@@ -9031,13 +9277,12 @@ const showtimePill = defineButtonPersonality({
|
|
|
9031
9277
|
name: "Secondary",
|
|
9032
9278
|
enabled: true,
|
|
9033
9279
|
priority: 2,
|
|
9034
|
-
background: {
|
|
9035
|
-
|
|
9036
|
-
|
|
9037
|
-
border: {
|
|
9038
|
-
widthClass: "border-2",
|
|
9039
|
-
colorToken: "primary"
|
|
9280
|
+
background: {
|
|
9281
|
+
type: "surface",
|
|
9282
|
+
role: "link"
|
|
9040
9283
|
},
|
|
9284
|
+
borderRadius: "rounded-full",
|
|
9285
|
+
border: { widthClass: "border-2" },
|
|
9041
9286
|
effects: { hover: [{ effectId: "pop" }] }
|
|
9042
9287
|
},
|
|
9043
9288
|
{
|
|
@@ -9049,7 +9294,6 @@ const showtimePill = defineButtonPersonality({
|
|
|
9049
9294
|
type: "solid",
|
|
9050
9295
|
colorToken: "secondary"
|
|
9051
9296
|
},
|
|
9052
|
-
textColorToken: "primary",
|
|
9053
9297
|
borderRadius: "rounded-full",
|
|
9054
9298
|
effects: { hover: [{ effectId: "pop" }] }
|
|
9055
9299
|
},
|
|
@@ -9062,12 +9306,8 @@ const showtimePill = defineButtonPersonality({
|
|
|
9062
9306
|
type: "solid",
|
|
9063
9307
|
colorToken: "background"
|
|
9064
9308
|
},
|
|
9065
|
-
textColorToken: "primary",
|
|
9066
9309
|
borderRadius: "rounded-full",
|
|
9067
|
-
border: {
|
|
9068
|
-
widthClass: "border-2",
|
|
9069
|
-
colorToken: "primary"
|
|
9070
|
-
},
|
|
9310
|
+
border: { widthClass: "border-2" },
|
|
9071
9311
|
effects: { hover: [{
|
|
9072
9312
|
effectId: "background-on-hover",
|
|
9073
9313
|
options: { colorToken: "surface" }
|
|
@@ -9078,13 +9318,12 @@ const showtimePill = defineButtonPersonality({
|
|
|
9078
9318
|
name: "Outline",
|
|
9079
9319
|
enabled: true,
|
|
9080
9320
|
priority: 3,
|
|
9081
|
-
background: {
|
|
9082
|
-
|
|
9083
|
-
|
|
9084
|
-
border: {
|
|
9085
|
-
widthClass: "border-2",
|
|
9086
|
-
colorToken: "primary"
|
|
9321
|
+
background: {
|
|
9322
|
+
type: "surface",
|
|
9323
|
+
role: "link"
|
|
9087
9324
|
},
|
|
9325
|
+
borderRadius: "rounded-full",
|
|
9326
|
+
border: { widthClass: "border-2" },
|
|
9088
9327
|
effects: { hover: [{
|
|
9089
9328
|
effectId: "background-on-hover",
|
|
9090
9329
|
options: { colorToken: "background" }
|
|
@@ -9095,8 +9334,10 @@ const showtimePill = defineButtonPersonality({
|
|
|
9095
9334
|
name: "Ghost",
|
|
9096
9335
|
enabled: true,
|
|
9097
9336
|
priority: 3,
|
|
9098
|
-
background: {
|
|
9099
|
-
|
|
9337
|
+
background: {
|
|
9338
|
+
type: "surface",
|
|
9339
|
+
role: "link"
|
|
9340
|
+
},
|
|
9100
9341
|
borderRadius: "rounded-full",
|
|
9101
9342
|
effects: { hover: [{
|
|
9102
9343
|
effectId: "background-on-hover",
|
|
@@ -9107,104 +9348,151 @@ const showtimePill = defineButtonPersonality({
|
|
|
9107
9348
|
}
|
|
9108
9349
|
});
|
|
9109
9350
|
//#endregion
|
|
9110
|
-
//#region ../theme-core/src/buttons/personalities/
|
|
9111
|
-
|
|
9112
|
-
|
|
9113
|
-
|
|
9114
|
-
|
|
9115
|
-
|
|
9116
|
-
|
|
9117
|
-
|
|
9118
|
-
|
|
9119
|
-
|
|
9120
|
-
|
|
9351
|
+
//#region ../theme-core/src/buttons/personalities/soft-pill.ts
|
|
9352
|
+
/**
|
|
9353
|
+
* Soft Pill — rounded-full pill buttons with a hover lift. The default for
|
|
9354
|
+
* Calm Studio and Modern Wellness; reads as quietly modern and welcoming.
|
|
9355
|
+
*/
|
|
9356
|
+
const softPill = defineButtonPersonality({
|
|
9357
|
+
id: "soft-pill",
|
|
9358
|
+
name: "Soft Pill",
|
|
9359
|
+
description: "Rounded pills with a gentle lift on hover. Quietly modern.",
|
|
9360
|
+
tags: {
|
|
9361
|
+
tone: "classic",
|
|
9362
|
+
energy: "calm",
|
|
9363
|
+
motion: "subtle",
|
|
9364
|
+
era: "organic"
|
|
9365
|
+
},
|
|
9366
|
+
buttonSystem: {
|
|
9367
|
+
global: {
|
|
9368
|
+
cornerStyle: "pill",
|
|
9369
|
+
shadow: "low",
|
|
9370
|
+
textTransform: "none",
|
|
9371
|
+
fontWeight: 500,
|
|
9372
|
+
borderWidth: 2,
|
|
9373
|
+
hoverTransform: "lift",
|
|
9374
|
+
hoverColor: "none"
|
|
9121
9375
|
},
|
|
9122
|
-
|
|
9123
|
-
|
|
9124
|
-
|
|
9125
|
-
|
|
9126
|
-
|
|
9127
|
-
|
|
9128
|
-
|
|
9129
|
-
|
|
9130
|
-
|
|
9376
|
+
variants: [
|
|
9377
|
+
{
|
|
9378
|
+
id: "primary",
|
|
9379
|
+
name: "Primary",
|
|
9380
|
+
enabled: true,
|
|
9381
|
+
priority: 1,
|
|
9382
|
+
background: {
|
|
9383
|
+
type: "solid",
|
|
9384
|
+
colorToken: "primary"
|
|
9385
|
+
},
|
|
9386
|
+
borderRadius: "rounded-full",
|
|
9387
|
+
shadow: {
|
|
9388
|
+
elevation: "low",
|
|
9389
|
+
softness: "soft",
|
|
9390
|
+
position: "bottom"
|
|
9391
|
+
},
|
|
9392
|
+
effects: {
|
|
9393
|
+
hover: [{
|
|
9394
|
+
effectId: "lift",
|
|
9395
|
+
options: { translateY: "-1px" }
|
|
9396
|
+
}],
|
|
9397
|
+
active: [{
|
|
9398
|
+
effectId: "scale-down",
|
|
9399
|
+
options: { scale: "0.98" }
|
|
9400
|
+
}]
|
|
9401
|
+
}
|
|
9131
9402
|
},
|
|
9132
|
-
|
|
9133
|
-
|
|
9134
|
-
|
|
9135
|
-
|
|
9136
|
-
|
|
9137
|
-
|
|
9138
|
-
|
|
9139
|
-
|
|
9140
|
-
colorToken: "primary"
|
|
9141
|
-
},
|
|
9142
|
-
textColorToken: "primaryForeground",
|
|
9143
|
-
borderRadius: "rounded-full",
|
|
9144
|
-
shadow: {
|
|
9145
|
-
elevation: "low",
|
|
9146
|
-
softness: "soft",
|
|
9147
|
-
position: "bottom"
|
|
9148
|
-
},
|
|
9149
|
-
effects: {
|
|
9150
|
-
hover: [{
|
|
9151
|
-
effectId: "lift",
|
|
9152
|
-
options: { translateY: "-1px" }
|
|
9153
|
-
}],
|
|
9154
|
-
active: [{
|
|
9155
|
-
effectId: "scale-down",
|
|
9156
|
-
options: { scale: "0.98" }
|
|
9157
|
-
}]
|
|
9158
|
-
}
|
|
9403
|
+
{
|
|
9404
|
+
id: "secondary",
|
|
9405
|
+
name: "Secondary",
|
|
9406
|
+
enabled: true,
|
|
9407
|
+
priority: 2,
|
|
9408
|
+
background: {
|
|
9409
|
+
type: "surface",
|
|
9410
|
+
role: "link"
|
|
9159
9411
|
},
|
|
9160
|
-
|
|
9161
|
-
|
|
9162
|
-
|
|
9163
|
-
|
|
9164
|
-
|
|
9165
|
-
|
|
9166
|
-
|
|
9167
|
-
|
|
9168
|
-
|
|
9169
|
-
|
|
9170
|
-
|
|
9171
|
-
|
|
9172
|
-
|
|
9173
|
-
|
|
9174
|
-
|
|
9175
|
-
}] }
|
|
9412
|
+
borderRadius: "rounded-full",
|
|
9413
|
+
border: { widthClass: "border-2" },
|
|
9414
|
+
effects: { hover: [{
|
|
9415
|
+
effectId: "background-on-hover",
|
|
9416
|
+
options: { colorToken: "surface" }
|
|
9417
|
+
}] }
|
|
9418
|
+
},
|
|
9419
|
+
{
|
|
9420
|
+
id: "outline",
|
|
9421
|
+
name: "Outline",
|
|
9422
|
+
enabled: true,
|
|
9423
|
+
priority: 3,
|
|
9424
|
+
background: {
|
|
9425
|
+
type: "surface",
|
|
9426
|
+
role: "link"
|
|
9176
9427
|
},
|
|
9177
|
-
|
|
9178
|
-
|
|
9179
|
-
|
|
9180
|
-
|
|
9181
|
-
|
|
9182
|
-
|
|
9183
|
-
|
|
9184
|
-
|
|
9185
|
-
|
|
9186
|
-
|
|
9187
|
-
|
|
9188
|
-
|
|
9189
|
-
|
|
9190
|
-
|
|
9191
|
-
|
|
9192
|
-
}] }
|
|
9428
|
+
borderRadius: "rounded-full",
|
|
9429
|
+
border: { widthClass: "border" },
|
|
9430
|
+
effects: { hover: [{
|
|
9431
|
+
effectId: "background-on-hover",
|
|
9432
|
+
options: { colorToken: "surface" }
|
|
9433
|
+
}] }
|
|
9434
|
+
},
|
|
9435
|
+
{
|
|
9436
|
+
id: "ghost",
|
|
9437
|
+
name: "Ghost",
|
|
9438
|
+
enabled: true,
|
|
9439
|
+
priority: 3,
|
|
9440
|
+
background: {
|
|
9441
|
+
type: "surface",
|
|
9442
|
+
role: "link"
|
|
9193
9443
|
},
|
|
9194
|
-
|
|
9195
|
-
|
|
9196
|
-
|
|
9197
|
-
|
|
9198
|
-
|
|
9199
|
-
|
|
9200
|
-
|
|
9201
|
-
|
|
9202
|
-
|
|
9203
|
-
|
|
9204
|
-
|
|
9205
|
-
|
|
9206
|
-
|
|
9207
|
-
|
|
9444
|
+
borderRadius: "rounded-full",
|
|
9445
|
+
effects: { hover: [{
|
|
9446
|
+
effectId: "background-on-hover",
|
|
9447
|
+
options: { colorToken: "surface" }
|
|
9448
|
+
}] }
|
|
9449
|
+
}
|
|
9450
|
+
]
|
|
9451
|
+
}
|
|
9452
|
+
});
|
|
9453
|
+
//#endregion
|
|
9454
|
+
//#region ../theme-core/src/buttons/personalities/two-tone-pill.ts
|
|
9455
|
+
const solidSecondary = {
|
|
9456
|
+
id: "secondary",
|
|
9457
|
+
name: "Secondary",
|
|
9458
|
+
enabled: true,
|
|
9459
|
+
priority: 2,
|
|
9460
|
+
background: {
|
|
9461
|
+
type: "solid",
|
|
9462
|
+
colorToken: unsafeAsOpaqueButtonColourToken("secondary")
|
|
9463
|
+
},
|
|
9464
|
+
borderRadius: "rounded-full",
|
|
9465
|
+
shadow: {
|
|
9466
|
+
elevation: "none",
|
|
9467
|
+
softness: null,
|
|
9468
|
+
position: "bottom"
|
|
9469
|
+
},
|
|
9470
|
+
effects: {
|
|
9471
|
+
hover: [{
|
|
9472
|
+
effectId: "background-on-hover-alpha",
|
|
9473
|
+
options: {
|
|
9474
|
+
colorToken: "secondary",
|
|
9475
|
+
opacity: 88
|
|
9476
|
+
}
|
|
9477
|
+
}],
|
|
9478
|
+
active: [{
|
|
9479
|
+
effectId: "scale-down",
|
|
9480
|
+
options: { scale: "0.98" }
|
|
9481
|
+
}]
|
|
9482
|
+
}
|
|
9483
|
+
};
|
|
9484
|
+
//#endregion
|
|
9485
|
+
//#region ../theme-core/src/buttons/personalities/index.ts
|
|
9486
|
+
const buttonPersonalities = [
|
|
9487
|
+
softPill,
|
|
9488
|
+
defineButtonPersonality({
|
|
9489
|
+
id: "two-tone-pill",
|
|
9490
|
+
name: "Two-tone Pill",
|
|
9491
|
+
description: "Rounded pills with distinct solid primary and secondary brand colours.",
|
|
9492
|
+
tags: softPill.tags,
|
|
9493
|
+
buttonSystem: {
|
|
9494
|
+
...softPill.buttonSystem,
|
|
9495
|
+
variants: softPill.buttonSystem.variants.map((variant) => variant.id === "secondary" ? solidSecondary : variant)
|
|
9208
9496
|
}
|
|
9209
9497
|
}),
|
|
9210
9498
|
earthPill,
|
|
@@ -9220,6 +9508,27 @@ const buttonPersonalities = [
|
|
|
9220
9508
|
quietArrow
|
|
9221
9509
|
];
|
|
9222
9510
|
new Map(buttonPersonalities.map((p) => [p.id, p]));
|
|
9511
|
+
buttonPersonalities.map((personality) => ({
|
|
9512
|
+
id: personality.id,
|
|
9513
|
+
name: personality.name,
|
|
9514
|
+
description: personality.description,
|
|
9515
|
+
category: presetCategory(personality),
|
|
9516
|
+
buttonSystem: personality.buttonSystem,
|
|
9517
|
+
compatibility: {
|
|
9518
|
+
...personality.tags.tone ? { tones: [personality.tags.tone] } : {},
|
|
9519
|
+
...personality.tags.energy ? { energies: [personality.tags.energy] } : {}
|
|
9520
|
+
}
|
|
9521
|
+
}));
|
|
9522
|
+
function presetCategory(personality) {
|
|
9523
|
+
switch (personality.tags.era) {
|
|
9524
|
+
case "retro": return "retro";
|
|
9525
|
+
case "editorial": return "minimal";
|
|
9526
|
+
case "organic": return "artistic";
|
|
9527
|
+
case "modern": return personality.tags.tone === "bold" ? "modern" : "technical";
|
|
9528
|
+
case "technical": return "technical";
|
|
9529
|
+
case void 0: return "modern";
|
|
9530
|
+
}
|
|
9531
|
+
}
|
|
9223
9532
|
//#endregion
|
|
9224
9533
|
//#region ../blocks/src/system/runtime/shared/components/FeedbackMessage.tsx
|
|
9225
9534
|
function joinClasses(...parts) {
|