@riverbankcms/sdk 0.109.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/dist/{PreviewEditorSidebar-DWqwfy3_.mjs → PreviewEditorSidebar-CTR6LUhN.mjs} +178 -117
- package/dist/{PreviewEditorUI-B7OL4sfR.mjs → PreviewEditorUI-DZg15Zip.mjs} +3 -4
- package/dist/{PreviewQueryProvider-D0y2l8JN.mjs → PreviewQueryProvider-kkmjklLG.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-D8Gt9Gbe.mjs → SdkPreviewModeRuntime-DeOTAFvR.mjs} +229 -219
- package/dist/{SiteChromeCustomizeContext-DUpalEdL.mjs → SiteChromeCustomizeContext-DOSDLCiJ.mjs} +1695 -2169
- package/dist/_dts/ai/src/contracts/proposals.d.ts +1716 -76
- package/dist/_dts/api/src/commercePortalEndpoints.d.ts +5 -5
- package/dist/_dts/api/src/contentRuntime.d.ts +4 -1
- package/dist/_dts/api/src/courses.d.ts +30 -15
- package/dist/_dts/api/src/endpoints.d.ts +14 -4
- package/dist/_dts/api/src/index.d.ts +2 -2
- package/dist/_dts/api/src/sdkContracts.d.ts +23 -11
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +5 -1
- package/dist/_dts/api/src/siteOperations.d.ts +11 -19
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +6 -6
- package/dist/_dts/api/src/webhooks.d.ts +98 -1
- package/dist/_dts/billing/src/site-arrangements.d.ts +3 -0
- 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 +4 -4
- package/dist/_dts/blocks/src/index.d.ts +3 -1
- package/dist/_dts/blocks/src/system/blocks/course-registration.d.ts +2 -1
- 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 +2 -4
- package/dist/_dts/blocks/src/system/blocks/event-registration.d.ts +2 -1
- 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 +2 -1
- package/dist/_dts/blocks/src/system/blocks/newsletter-signup.d.ts +2 -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/constants/buttonRoles.d.ts +35 -0
- package/dist/_dts/blocks/src/system/fields/button.d.ts +10 -21
- package/dist/_dts/blocks/src/system/fields/ctas.d.ts +2 -1
- package/dist/_dts/blocks/src/system/fragments/library/heroCtaRow.d.ts +9 -5
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +18 -18
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +9 -9
- 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 +6 -3
- 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/db/src/generated/supabase/database.types.d.ts +221 -53
- package/dist/_dts/editor-blocks/src/widgets/button/context.d.ts +3 -2
- 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 +7 -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/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/style.d.ts +3 -2
- package/dist/_dts/sdk/src/client/management/types.d.ts +2 -1
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +12 -15
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +1 -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 +129 -6
- package/dist/_dts/theme-core/src/buttons/index.d.ts +1 -1
- 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/site-styles/curatedSiteStyles.d.ts +26 -24
- 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/previewCompiler.d.ts +8 -9
- package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +4 -4
- package/dist/_dts/ui/src/palette/hex.d.ts +3 -3
- package/dist/cli/index.mjs +1760 -1914
- package/dist/cli/init-docs/content/workflow-isr-revalidation.md +1 -1
- package/dist/client/{DiscountCodeDisclosure-DU1ygxU2.mjs → DiscountCodeDisclosure-C4xvTBux.mjs} +1 -1
- package/dist/client/{EventCombined.client-DB5zagCo.mjs → EventCombined.client-Cr7G131j.mjs} +2 -3
- package/dist/client/{EventListing.client-CTX9JHBL.mjs → EventListing.client-CAjbseNy.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-BYImhgiB.mjs → LeafletStaticMap-BMlWfwz3.mjs} +1 -1
- package/dist/client/{MagicLinkForm-CRkw_M3l.mjs → MagicLinkForm-ChdFz96y.mjs} +1 -2
- package/dist/client/{StepIndicator-BnmVBJJh.mjs → StepIndicator-7D3GaBeM.mjs} +2 -2
- package/dist/client/{accordion-CeGreumd.mjs → accordion-D8JTs2Si.mjs} +1 -1
- package/dist/client/{bookingForm-CSzFNrpN.mjs → bookingForm-H3DCRBHs.mjs} +6 -7
- package/dist/client/bookings.mjs +3069 -1447
- package/dist/client/{carousel-B2jDtogf.mjs → carousel-DMr_QWlz.mjs} +1 -1
- package/dist/client/{cart-D-jZ-vaY.mjs → cart-DWMbfBdR.mjs} +3 -3
- package/dist/client/{checkout-Dza-LA7N.mjs → checkout-zmfdkXLx.mjs} +3 -3
- package/dist/client/client.mjs +1732 -1913
- package/dist/client/{colorStyles-CrgzoXsm.mjs → colorStyles-gcTh5yZT.mjs} +2 -12
- package/dist/client/{colorTokenParts-CMugwvX_.mjs → colorTokenParts-FSS3al6l.mjs} +31 -1
- package/dist/client/{courseRegistration-TYkNychb.mjs → courseRegistration-Z_mn18jy.mjs} +100 -37
- package/dist/client/{eventCalendar-BI_90SsT.mjs → eventCalendar-CYp0YJGF.mjs} +4 -5
- package/dist/client/{eventCombined-mNrpryE9.mjs → eventCombined-rKyYZUa9.mjs} +2 -2
- package/dist/client/{eventDetails-D4GVlCIY.mjs → eventDetails-X0ZaUuMj.mjs} +3 -3
- package/dist/client/{eventListing-YhKN018y.mjs → eventListing-W1SuL7EP.mjs} +2 -2
- package/dist/client/{eventRegistration-CdHGtilr.mjs → eventRegistration-ClWricui.mjs} +6 -7
- package/dist/client/{form-AcAL45rA.mjs → form--eKPwAAD.mjs} +1 -2
- package/dist/client/{headerSection-uEC52ueD.mjs → headerSection-BSeGr-FS.mjs} +2 -3
- package/dist/client/hooks.mjs +1554 -1871
- package/dist/client/{locationMap-_wJDSUYe.mjs → locationMap-BpOrtNYn.mjs} +8 -5
- package/dist/client/{media-BK0O3b-U.mjs → media-DoF0dcVx.mjs} +2 -2
- package/dist/client/{newsletterForm-DrArsb2B.mjs → newsletterForm-Bt7it7Dy.mjs} +1 -2
- package/dist/client/{pricing-BSYVghwo.mjs → pricing-BTjSDDr4.mjs} +1 -1
- package/dist/client/{productDetail-Dyk90sMs.mjs → productDetail-ICnVTcCg.mjs} +3 -3
- package/dist/client/{productList-BCKThwAI.mjs → productList-ZHr6D604.mjs} +3 -3
- package/dist/client/{propsDecoder-CkXxkdSR.mjs → propsDecoder-wWN0tBDF.mjs} +2351 -129
- package/dist/client/rendering/client.mjs +1664 -1824
- package/dist/client/rendering/islands.mjs +20 -20
- package/dist/client/rendering.mjs +1697 -1909
- package/dist/client/{shop-DeltVH10.mjs → shop-C1u_BUn0.mjs} +5 -6
- package/dist/client/{shop-commerce-BD9Jsm2Z.mjs → shop-commerce-CleZdRha.mjs} +5 -6
- package/dist/client/{shop-commerce-store-CmXD6FDS.mjs → shop-commerce-store-ycnoB2Ce.mjs} +1 -1
- package/dist/client/{shopShared-B8v-lH_F.mjs → shopShared-CPhByt2a.mjs} +3 -3
- package/dist/client/{useDiscountCodeUi-DbWJN8ld.mjs → useDiscountCodeUi-cStSQI6C.mjs} +1 -1
- package/dist/client/{useEventFilters-EJIMUnqT.mjs → useEventFilters-DKPN7hSY.mjs} +26 -27
- package/dist/client/{usePolling-Cmh14fc7.mjs → usePolling-BKAd6pkZ.mjs} +2 -2
- package/dist/preview-next/before-render.mjs +37 -6
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/middleware.mjs +37 -6
- package/dist/{previewAuthStore-CTO7CRPk.mjs → previewAuthStore-BkT1D06A.mjs} +37 -6
- package/dist/{sdk-runtime-Dou0GAav.mjs → sdk-runtime-hu3wr3ng.mjs} +2 -2
- package/dist/{separator-CI5wZNXT.mjs → separator-Bln8izQ9.mjs} +1 -1
- package/dist/server/components.mjs +1472 -1788
- package/dist/server/config-validation.mjs +1559 -1876
- package/dist/server/config.mjs +1559 -1876
- package/dist/server/data.mjs +1554 -1871
- package/dist/server/index.mjs +38 -7
- package/dist/server/next/revalidate.mjs +53 -1
- package/dist/server/next.mjs +1584 -1869
- package/dist/server/page-converter.mjs +1543 -1860
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +1472 -1788
- package/dist/server/rendering.mjs +1472 -1788
- package/dist/server/routing.mjs +1600 -1891
- package/dist/server/server.mjs +1574 -1860
- package/dist/server/theme-bridge.mjs +1436 -1619
- package/dist/server/theme.mjs +1345 -1241
- package/dist/server/webhooks.mjs +54 -2
- package/package.json +1 -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 -285
- package/dist/client/buttons-DoFV7KDL.mjs +0 -2115
- package/dist/client/foregroundContract-xICPq59x.mjs +0 -31
|
@@ -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") {
|
|
@@ -1498,19 +1498,2354 @@ function isEventContentType(slug) {
|
|
|
1498
1498
|
return EVENT_CONTENT_TYPE_SLUGS.includes(slug);
|
|
1499
1499
|
}
|
|
1500
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
|
+
}
|
|
3743
|
+
});
|
|
3744
|
+
//#endregion
|
|
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
|
+
}
|
|
3814
|
+
//#endregion
|
|
3815
|
+
//#region ../blocks/src/system/constants/buttonRoles.ts
|
|
3816
|
+
/**
|
|
3817
|
+
* Semantic button roles available to block authors.
|
|
3818
|
+
*
|
|
3819
|
+
* These roles are deliberately independent of a site's visual button style:
|
|
3820
|
+
* the active theme owns how each role looks.
|
|
3821
|
+
*/
|
|
3822
|
+
const BLOCK_BUTTON_ROLES = PUBLIC_BUTTON_ROLES;
|
|
3823
|
+
const blockButtonRoleSchema = z$1.enum(BLOCK_BUTTON_ROLES);
|
|
3824
|
+
/**
|
|
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.
|
|
3828
|
+
*/
|
|
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
|
+
}));
|
|
3844
|
+
//#endregion
|
|
1501
3845
|
//#region ../blocks/src/system/runtime/nodes/shared/contract-schemas.ts
|
|
1502
3846
|
const previewStageSchema = z$1.enum(["preview", "published"]);
|
|
1503
|
-
const registrationButtonVariantSchema =
|
|
1504
|
-
|
|
1505
|
-
"secondary",
|
|
1506
|
-
"outline"
|
|
1507
|
-
]);
|
|
1508
|
-
const eventButtonVariantSchema = z$1.enum([
|
|
1509
|
-
"primary",
|
|
1510
|
-
"secondary",
|
|
1511
|
-
"outline",
|
|
1512
|
-
"link"
|
|
1513
|
-
]);
|
|
3847
|
+
const registrationButtonVariantSchema = blockButtonRoleSchema;
|
|
3848
|
+
const eventButtonVariantSchema = persistedBlockButtonRoleSchema;
|
|
1514
3849
|
const eventLayoutSchema = z$1.enum(eventCalendarListLayoutValues);
|
|
1515
3850
|
const eventCalendarDisplayModeSchema = z$1.enum(eventCalendarDisplayModeValues);
|
|
1516
3851
|
const eventCalendarDefaultViewSchema = z$1.enum(eventCalendarDefaultViewValues);
|
|
@@ -1706,105 +4041,6 @@ const courseRegistrationInteractiveIslandPropsCodec = createInteractiveIslandCod
|
|
|
1706
4041
|
})
|
|
1707
4042
|
});
|
|
1708
4043
|
//#endregion
|
|
1709
|
-
//#region ../theme-core/src/tokens/blockColorTokens.ts
|
|
1710
|
-
const blockColorTokenNames = [
|
|
1711
|
-
"text",
|
|
1712
|
-
"heading",
|
|
1713
|
-
"mutedText",
|
|
1714
|
-
"surface",
|
|
1715
|
-
"background",
|
|
1716
|
-
"foreground",
|
|
1717
|
-
"border",
|
|
1718
|
-
"primary",
|
|
1719
|
-
"secondary",
|
|
1720
|
-
"accent",
|
|
1721
|
-
"success",
|
|
1722
|
-
"warning",
|
|
1723
|
-
"info",
|
|
1724
|
-
"error",
|
|
1725
|
-
"destructive",
|
|
1726
|
-
"scrim",
|
|
1727
|
-
"shadow",
|
|
1728
|
-
"onPrimary",
|
|
1729
|
-
"onSecondary",
|
|
1730
|
-
"onAccent",
|
|
1731
|
-
"onSuccess",
|
|
1732
|
-
"onWarning",
|
|
1733
|
-
"onInfo",
|
|
1734
|
-
"onError",
|
|
1735
|
-
"onDestructive",
|
|
1736
|
-
"onSurface"
|
|
1737
|
-
];
|
|
1738
|
-
new Set(blockColorTokenNames);
|
|
1739
|
-
//#endregion
|
|
1740
|
-
//#region ../theme-core/src/tokens/themeColorTokens.ts
|
|
1741
|
-
/**
|
|
1742
|
-
* Known palette role token names. This is the low-level source of truth for
|
|
1743
|
-
* palette roles used by palette variants, Theme V2 schemas, and runtime color
|
|
1744
|
-
* reference parsing.
|
|
1745
|
-
*/
|
|
1746
|
-
const PALETTE_TOKEN_NAMES = [
|
|
1747
|
-
"primary",
|
|
1748
|
-
"primaryForeground",
|
|
1749
|
-
"secondary",
|
|
1750
|
-
"accent",
|
|
1751
|
-
"success",
|
|
1752
|
-
"warning",
|
|
1753
|
-
"destructive",
|
|
1754
|
-
"background",
|
|
1755
|
-
"surface",
|
|
1756
|
-
"surfaceAlt",
|
|
1757
|
-
"muted",
|
|
1758
|
-
"text",
|
|
1759
|
-
"border"
|
|
1760
|
-
];
|
|
1761
|
-
z$1.enum(PALETTE_TOKEN_NAMES);
|
|
1762
|
-
const themeColorBaseTokenNames = [
|
|
1763
|
-
...PALETTE_TOKEN_NAMES,
|
|
1764
|
-
...blockColorTokenNames,
|
|
1765
|
-
"white",
|
|
1766
|
-
"neutral",
|
|
1767
|
-
"primaryText",
|
|
1768
|
-
"secondaryForeground",
|
|
1769
|
-
"accentForeground"
|
|
1770
|
-
];
|
|
1771
|
-
const themeColorBaseTokenSet = new Set(themeColorBaseTokenNames);
|
|
1772
|
-
const shadeStepSet = /* @__PURE__ */ new Set([
|
|
1773
|
-
"50",
|
|
1774
|
-
"100",
|
|
1775
|
-
"200",
|
|
1776
|
-
"300",
|
|
1777
|
-
"400",
|
|
1778
|
-
"500",
|
|
1779
|
-
"600",
|
|
1780
|
-
"700",
|
|
1781
|
-
"800",
|
|
1782
|
-
"900",
|
|
1783
|
-
"950"
|
|
1784
|
-
]);
|
|
1785
|
-
function isKnownBaseToken(value) {
|
|
1786
|
-
return themeColorBaseTokenSet.has(value);
|
|
1787
|
-
}
|
|
1788
|
-
function isKnownShadeToken(value) {
|
|
1789
|
-
const match = value.match(/^([a-zA-Z][a-zA-Z0-9]*)(?:-([0-9]{2,3}))$/);
|
|
1790
|
-
if (!match) return false;
|
|
1791
|
-
const [, base, shade] = match;
|
|
1792
|
-
return Boolean(base && shade && isKnownBaseToken(base) && shadeStepSet.has(shade));
|
|
1793
|
-
}
|
|
1794
|
-
function isThemeColorTokenBase(value) {
|
|
1795
|
-
return isKnownBaseToken(value) || isKnownShadeToken(value);
|
|
1796
|
-
}
|
|
1797
|
-
function isThemeColorToken(value) {
|
|
1798
|
-
if (typeof value !== "string") return false;
|
|
1799
|
-
const parts = parseColorTokenParts(value);
|
|
1800
|
-
return parts.kind === "token" && isThemeColorTokenBase(parts.token);
|
|
1801
|
-
}
|
|
1802
|
-
function parseThemeColorToken(value) {
|
|
1803
|
-
if (!isThemeColorToken(value)) return null;
|
|
1804
|
-
return value.trim();
|
|
1805
|
-
}
|
|
1806
|
-
const themeColorTokenSchema = z$1.string().min(1).refine((value) => Boolean(isThemeColorToken(value)), "Expected a known Theme V2 color token");
|
|
1807
|
-
//#endregion
|
|
1808
4044
|
//#region ../theme-core/src/cards/types.ts
|
|
1809
4045
|
const cardVariantRoleValues = ["default", "alternative"];
|
|
1810
4046
|
const boxlessCardVariantValue = "none";
|
|
@@ -6902,11 +9138,7 @@ const newsletterPresetSchema = z$1.enum([
|
|
|
6902
9138
|
"emailNameCompany"
|
|
6903
9139
|
]);
|
|
6904
9140
|
const newsletterDestinationProviderSchema = z$1.enum(["riverbank", "mailchimp"]);
|
|
6905
|
-
const newsletterButtonVariantSchema =
|
|
6906
|
-
"primary",
|
|
6907
|
-
"secondary",
|
|
6908
|
-
"outline"
|
|
6909
|
-
]);
|
|
9141
|
+
const newsletterButtonVariantSchema = blockButtonRoleSchema;
|
|
6910
9142
|
const newsletterFieldSchema = z$1.object({
|
|
6911
9143
|
id: z$1.string(),
|
|
6912
9144
|
type: z$1.enum(["email", "text"]),
|
|
@@ -7483,12 +9715,7 @@ const shopSourceSchema = z$1.object({
|
|
|
7483
9715
|
showPrices: z$1.boolean().optional(),
|
|
7484
9716
|
showValidityPeriod: z$1.boolean().optional(),
|
|
7485
9717
|
showPricePerCredit: z$1.boolean().nullable().optional(),
|
|
7486
|
-
buttonVariant:
|
|
7487
|
-
"primary",
|
|
7488
|
-
"secondary",
|
|
7489
|
-
"outline",
|
|
7490
|
-
"link"
|
|
7491
|
-
]).optional(),
|
|
9718
|
+
buttonVariant: blockButtonRoleSchema.optional(),
|
|
7492
9719
|
passesHeading: z$1.string().optional(),
|
|
7493
9720
|
membershipsHeading: z$1.string().optional(),
|
|
7494
9721
|
buyButtonText: z$1.string().optional(),
|
|
@@ -7633,12 +9860,7 @@ const passesMembershipsHydrationSchema = z$1.object({
|
|
|
7633
9860
|
passes: z$1.array(publicPassProductSchema),
|
|
7634
9861
|
memberships: z$1.array(publicMembershipProductSchema),
|
|
7635
9862
|
passPurchaseMode: z$1.enum(["add_to_cart", "buy_now"]),
|
|
7636
|
-
buttonVariant:
|
|
7637
|
-
"primary",
|
|
7638
|
-
"secondary",
|
|
7639
|
-
"outline",
|
|
7640
|
-
"link"
|
|
7641
|
-
])
|
|
9863
|
+
buttonVariant: blockButtonRoleSchema
|
|
7642
9864
|
});
|
|
7643
9865
|
const productListHydrationSchema = z$1.object({
|
|
7644
9866
|
products: z$1.array(publicProductSchema),
|
|
@@ -7919,4 +10141,4 @@ function defineIslandPropsDecoder(kind) {
|
|
|
7919
10141
|
};
|
|
7920
10142
|
}
|
|
7921
10143
|
//#endregion
|
|
7922
|
-
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 };
|