@riverbankcms/sdk 0.158.0 → 0.160.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -6
- package/dist/_dts/{BlocksIslandsHydrator-BgNBtEai.d.ts → BlocksIslandsHydrator-CoqeotCL.d.ts} +1 -1
- package/dist/_dts/{Page-DpCo8zXD.d.ts → Page-C0ENVLCF.d.ts} +13 -6
- package/dist/_dts/{SdkPreviewMode-Bv2TMscG.d.ts → SdkPreviewMode-jZK0A49V.d.ts} +54 -126
- package/dist/_dts/{client-B960v2gW.d.ts → client-uMMuPq9V.d.ts} +23 -1
- package/dist/_dts/{content-types-CN0Wy8V6.d.ts → content-types-D6nXGqdQ.d.ts} +18 -18
- package/dist/_dts/{contracts-BFUrby76.d.ts → contracts-Bnmj1nxu.d.ts} +6 -5
- package/dist/_dts/{footerPageOutline-CmoqleLS.d.ts → footerPageOutline-CeLjFX8b.d.ts} +6 -6
- package/dist/_dts/{generatePageMetadata-Dkvivc3R.d.ts → generatePageMetadata-nyU8q02J.d.ts} +5 -2
- package/dist/_dts/{index-DPfI2t5A.d.ts → index-BaaGBY1v.d.ts} +2 -2
- package/dist/_dts/{index-DCNu_8it.d.ts → index-Bg64CkV-.d.ts} +4 -4
- package/dist/_dts/index-Blwl7yl6.d.ts +13 -0
- package/dist/_dts/{index-DaS_z6ir.d.ts → index-C5xslEBn.d.ts} +2 -2
- package/dist/_dts/{index-DpgkhY-a.d.ts → index-CEaKil7G.d.ts} +2 -2
- package/dist/_dts/{index-Ba6RmuxX.d.ts → index-DahMwisK.d.ts} +3 -3
- package/dist/_dts/index-lkpjIg5i.d.ts +66 -0
- package/dist/_dts/{index-DfkFWUxt.d.ts → index-nVoi_74l.d.ts} +2 -2
- package/dist/_dts/{loadContent-DvvKF4nB.d.ts → loadContent-CYLmzvLq.d.ts} +16 -7
- package/dist/_dts/{resolvePageContent-D0lGwVD6.d.ts → resolvePageContent-DqnxChOs.d.ts} +2 -2
- package/dist/_dts/{constants-DkcKHMX-.d.ts → runtime-BY8DQBbT.d.ts} +10 -16
- package/dist/_dts/{hosted-booking-appearance-BIbit60h.d.ts → schema-D0bNcPWK.d.ts} +6921 -6768
- package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
- package/dist/_dts/sdk/src/client/types.d.ts +2 -2
- package/dist/_dts/sdk/src/client.d.ts +12 -6
- package/dist/_dts/sdk/src/config/index.d.ts +6 -6
- package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
- package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
- package/dist/_dts/sdk/src/index.d.ts +8 -8
- package/dist/_dts/sdk/src/manifest/index.d.ts +6 -6
- package/dist/_dts/sdk/src/metadata/index.d.ts +8 -2
- package/dist/_dts/sdk/src/navigation/index.d.ts +2 -2
- package/dist/_dts/sdk/src/next/index.d.ts +7 -7
- package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
- package/dist/_dts/sdk/src/page-converter/index.d.ts +10 -28
- package/dist/_dts/sdk/src/portal/client.d.ts +1 -1
- package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
- package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
- package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
- package/dist/_dts/sdk/src/routing/index.d.ts +5 -5
- package/dist/_dts/sdk/src/server.d.ts +5 -5
- package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
- package/dist/_dts/{types-BJrRUaY7.d.ts → types-CFrYuXYP.d.ts} +2 -2
- package/dist/_dts/{navigation-n-eTVTIQ.d.ts → types-D8czmbQF.d.ts} +15430 -16836
- package/dist/_dts/{types-BY7PgnDi.d.ts → types-DSgmJ15W.d.ts} +7 -7
- package/dist/_dts/{types-maEnXL6Z.d.ts → types-Dm-KW7nj.d.ts} +10 -13
- package/dist/_dts/{validation-BjuVrMrs.d.ts → validation-Bmb4WnHg.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-WRLS96Ev.mjs → BlocksIslandsHydrator-DZRKi6tT.mjs} +17 -17
- package/dist/client/{BookingMailingListNote-eovghMPa.mjs → BookingMailingListNote-C00sLLdL.mjs} +2 -2
- package/dist/client/{CalendarNavigationChevron-CIcMQRc1.mjs → CalendarNavigationChevron-CHSi9b3E.mjs} +6 -6
- package/dist/client/{CheckboxChoice-BF9eCNno.mjs → CheckboxChoice-Bhm6RAUL.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-CdnFgDyQ.mjs → DemoBookingPortalAccess-CaN-7ui7.mjs} +6 -6
- package/dist/client/{DemoPortalSignInLink-DHxYgkT6.mjs → DemoPortalSignInLink-ClxN5_xZ.mjs} +1 -1
- package/dist/client/{EventCalendar.client-Dc-ZLxKo.mjs → EventCalendar.client-BncvSa1n.mjs} +10 -9
- package/dist/client/{EventCombined.client-C93XqRIv.mjs → EventCombined.client-DluBxVVu.mjs} +8 -8
- package/dist/client/{EventEmbeddedCheckoutStep-B3XUyNY9.mjs → EventEmbeddedCheckoutStep-BiJrMtfp.mjs} +1 -1
- package/dist/client/{EventItem-DnCTygqk.mjs → EventItem-CXhnT9pF.mjs} +11 -6
- package/dist/client/{EventListWeekNavigation-9h97heuQ.mjs → EventListWeekNavigation-V-dtoDlD.mjs} +1 -1
- package/dist/client/{EventListing.client-DFKlQvvs.mjs → EventListing.client-DPO6SZbx.mjs} +3 -3
- package/dist/client/{EventListing.view-pAuTDyrP.mjs → EventListing.view-B-Yi5JZS.mjs} +7 -7
- package/dist/client/{EventRegistrationPayment-rgKlBvhP.mjs → EventRegistrationPayment-Dc3Fnlnw.mjs} +189 -176
- package/dist/client/{LeafletStaticMap-3XiWSgy0.mjs → LeafletStaticMap-ClZCCzAm.mjs} +1 -1
- package/dist/client/{Page-BmpeAwID.mjs → Page-7PkzO04N.mjs} +1949 -2074
- package/dist/client/{StepIndicator-qEq6X5zP.mjs → StepIndicator-DiD6euZ8.mjs} +3 -3
- package/dist/client/{TabBarFragment-DvzIV75f.mjs → TabBarFragment-BHd8GN8y.mjs} +1 -1
- package/dist/client/{ThemedButton-DVBC_pS9.mjs → ThemedButton-C22C9cCF.mjs} +174 -93
- package/dist/client/{accordion-DeObOasQ.mjs → accordion-2m27DsIk.mjs} +1 -1
- package/dist/client/{booking-form.client-DfWeF0lj.mjs → booking-form.client-BddWV5w1.mjs} +12 -12
- package/dist/client/{bookingForm-TnzIBHx2.mjs → bookingForm-bcdXQjmw.mjs} +4 -4
- package/dist/client/bookings.mjs +6 -6
- package/dist/client/{carousel-kkFnbr5Z.mjs → carousel-D7nj9I0y.mjs} +2 -2
- package/dist/client/{carousel.client-BJGoJVtg.mjs → carousel.client-AffDJo_s.mjs} +1 -1
- package/dist/client/{cart-BAXNbFux.mjs → cart-PN6yCw1H.mjs} +3 -3
- package/dist/client/{cart.client-BczxUF70.mjs → cart.client-D4t1f0cJ.mjs} +1 -1
- package/dist/client/{checkout-C5NRhPeP.mjs → checkout-CsTwXVSb.mjs} +3 -3
- package/dist/client/{checkout.client-BuDk3Td9.mjs → checkout.client-BhQE3zY7.mjs} +1 -1
- package/dist/client/client.mjs +25 -13
- package/dist/client/{context-CVsgML69.mjs → context-BLAvalAa.mjs} +1 -1
- package/dist/client/{cta-BWnUuJce.mjs → cta-CUXhX_D7.mjs} +2 -1
- package/dist/client/dateFormatting-BHIHxNuo.mjs +61 -0
- package/dist/client/{demoPortalMagicLink-CUlwvmxf.mjs → demoPortalMagicLink-R-awbk_0.mjs} +1 -1
- package/dist/client/{enhanceHeaderSection-Cw8nnFj-.mjs → enhanceHeaderSection-9Q93uvTo.mjs} +3 -3
- package/dist/client/{event-details.client-Bl0E_6Vi.mjs → event-details.client-BS1WtG-a.mjs} +2 -2
- package/dist/client/{event-registration.client-DmfLg_LC.mjs → event-registration.client-BXndwsET.mjs} +35 -21
- package/dist/client/{eventCalendar-D1Dwb9VA.mjs → eventCalendar-HyoOt1Qz.mjs} +4 -4
- package/dist/client/{eventCombined-DfsqY1qR.mjs → eventCombined-sdG5oEaH.mjs} +4 -4
- package/dist/client/{eventDetails-BmugDVoa.mjs → eventDetails-FFAknE4w.mjs} +2 -2
- package/dist/client/{eventListing-BPAGJi3C.mjs → eventListing-CGK6urk3.mjs} +4 -4
- package/dist/client/{eventRegistration-DBlz_x6u.mjs → eventRegistration-VhrvCs4l.mjs} +4 -4
- package/dist/client/{form-DVu3ZMjx.mjs → form-C-B5O_ko.mjs} +3 -3
- package/dist/client/{form.client-QZUyABIY.mjs → form.client-DoZVcl8d.mjs} +5 -5
- package/dist/client/{form.parts-Bs0F3v08.mjs → form.parts-mttKpgif.mjs} +3 -3
- package/dist/client/{formatDate-BD9D3dgo.mjs → formatDate-xUSCknEO.mjs} +1 -1
- package/dist/client/gifting/client.mjs +3 -3
- package/dist/client/{headerSection-BQwWW4Yy.mjs → headerSection-BHUEXsaI.mjs} +2 -2
- package/dist/client/{location-map.client-upKuwABk.mjs → location-map.client-Cylb_MHw.mjs} +2 -2
- package/dist/client/{location-map.view-RuBCD10O.mjs → location-map.view-Cx4Bl7ij.mjs} +69 -6
- package/dist/client/{locationMap-1sCbsk0V.mjs → locationMap-QnKJi-nZ.mjs} +2 -2
- package/dist/client/{newsletter-form.client-DBTU3oNv.mjs → newsletter-form.client-D_n0rftg.mjs} +8 -8
- package/dist/client/{newsletter-form.parts-C9I9JBhe.mjs → newsletter-form.parts-DKHye4IE.mjs} +2 -2
- package/dist/client/{newsletterForm-DTPtTxxG.mjs → newsletterForm-tEaYelzx.mjs} +3 -3
- package/dist/client/{noop-DMFt3KdC.mjs → noop-B610YKEx.mjs} +12 -5
- package/dist/client/portal/client.mjs +4562 -174
- package/dist/client/{product-detail.client-BX7M5o6p.mjs → product-detail.client-DUf5x5Jt.mjs} +1 -1
- package/dist/client/{product-list.client-i32QNY4c.mjs → product-list.client-Cqp1BPTV.mjs} +1 -1
- package/dist/client/{productDetail-DWjE9zm7.mjs → productDetail-B8bBiogP.mjs} +3 -3
- package/dist/client/{productList-DZH9_brv.mjs → productList-BKN4D-1z.mjs} +3 -3
- package/dist/client/{propsDecoder-CTzHkEkh.mjs → propsDecoder-2nNZh2Oe.mjs} +3 -3
- package/dist/client/{registry.server-vJ5FlscU.mjs → registry.server-BAm4RPNJ.mjs} +856 -872
- package/dist/client/rendering/client.mjs +27 -26
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +47 -28
- package/dist/client/{richText-coerce-DXAmC72p.mjs → richText-coerce-Cv-qomNB.mjs} +1 -1
- package/dist/client/{routeIslandApiConfig-CmC7ygin.mjs → routeIslandApiConfig-C5u8MbAA.mjs} +1 -1
- package/dist/client/{shop-C7eL3B37.mjs → shop-DZNC0VKk.mjs} +3 -3
- package/dist/client/{shop-commerce-D8oRN0QJ.mjs → shop-commerce-DdX4LSa3.mjs} +12 -12
- package/dist/client/{shop-commerce-store-CRnQ4M18.mjs → shop-commerce-store-BJtrZov9.mjs} +1 -1
- package/dist/client/{shop.client-X6d6KVmA.mjs → shop.client-DmDd-igg.mjs} +16 -15
- package/dist/client/{shop.interactive-DBMeM8VD.mjs → shop.interactive-5SnnDHz3.mjs} +402 -35
- package/dist/client/{shopShared-Y182kN_s.mjs → shopShared-CPqUlAh9.mjs} +2 -2
- package/dist/client/{src-7cXhT0G_.mjs → src-VIsPY-kw.mjs} +6 -1
- package/dist/client/timetableModel-C19rcHEw.mjs +960 -0
- package/dist/client/{useAvailableSlots-BDV6MHgJ.mjs → useAvailableSlots-BjbJXotk.mjs} +3 -3
- package/dist/client/{useBookingNowIso-DgJEv3ZY.mjs → useBookingNowIso-CMgfL7YJ.mjs} +1 -1
- package/dist/client/{useDiscountApply-BTu9EeT7.mjs → useDiscountApply-KG8jB7WC.mjs} +2 -2
- package/dist/client/{useDiscountCodeUi-BfZxdxI-.mjs → useDiscountCodeUi-DK2w_i0a.mjs} +1 -1
- package/dist/client/{useEventPagination-pnvdHGeQ.mjs → useEventPagination-DW6MCirb.mjs} +11 -10
- package/dist/client/uuid-BETKW8rS.mjs +12 -0
- package/dist/client/{view-hJr_L4QC2.mjs → view-CkUn3Y0Y.mjs} +4 -4
- package/dist/client/{view-BPEa6Okm.mjs → view-CseyBW07.mjs} +15 -70
- package/dist/client/{wizardSteps-HdyGoIG3.mjs → wizardSteps-zgq10lN1.mjs} +262 -65
- package/dist/preview-next/before-render.mjs +1 -1
- package/dist/preview-next/client/{EventEmbeddedCheckoutStep-BFlBqSu4.mjs → EventEmbeddedCheckoutStep-lUHBrzHv.mjs} +1 -1
- package/dist/preview-next/client/{PreviewEditorSidebar-CXRUbqMp.mjs → PreviewEditorSidebar-DWyUGCAG.mjs} +1217 -107
- package/dist/preview-next/client/{PreviewEditorUI-CxjEV0Fm.mjs → PreviewEditorUI-Wq0b3Daw.mjs} +52 -79
- package/dist/preview-next/client/{SdkPreviewModeRuntime-XdQSGGj_.mjs → SdkPreviewModeRuntime-BtZPcwYV.mjs} +1 -1
- package/dist/preview-next/client/{SdkPreviewModeRuntime-BxI12BBS.mjs → SdkPreviewModeRuntime-wSI_R361.mjs} +720 -2035
- package/dist/preview-next/client/{SiteChromeCustomizeContext-CfRQRwpH.mjs → SiteChromeCustomizeContext-Hc4pYnNe.mjs} +14365 -8155
- package/dist/preview-next/client/{ThemedButton-BEOPss9H.mjs → ThemedButton-DzeycIlD.mjs} +204 -93
- package/dist/preview-next/client/{previewChromeSurface-CH7hd5n7.mjs → previewChromeSurface-Corq4AG7.mjs} +3 -8
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/{sdk-runtime-C6xEU1LI.mjs → sdk-runtime-CWymRWhK.mjs} +1 -1
- package/dist/preview-next/client/siteStyleAccess-QZkJRHl5.mjs +1359 -0
- package/dist/preview-next/client/{spinner-BTf1CZmy.mjs → spinner-C4If5Y-O.mjs} +1 -1
- package/dist/preview-next/editor-base.css +62 -0
- package/dist/preview-next/editor-chrome.css +85 -0
- package/dist/preview-next/keepAlive.mjs +1 -1
- package/dist/preview-next/middleware.mjs +1 -1
- package/dist/preview-next/{route-contract-DM22uOXM.mjs → route-contract-8csADeIT.mjs} +149 -112
- package/dist/server/{Block.shared-DLoilC2J.mjs → Block.shared-D1_gonwM.mjs} +6 -6
- package/dist/server/{bindings-C7DKLVx_.mjs → bindings-CFmJg5lm.mjs} +2 -2
- package/dist/server/{client-CU4wlMLE.mjs → client-DPsi0Dai.mjs} +9 -7
- package/dist/server/config-template-validation.mjs +50 -10
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +2 -2
- package/dist/server/{generatePageMetadata-CPvssVOp.mjs → generatePageMetadata-DB_lbrZ7.mjs} +28 -2
- package/dist/server/index.mjs +2 -2
- package/dist/server/{loadContent-DmQ4BiiQ.mjs → loadContent-RMCcuVU_.mjs} +33 -20
- package/dist/server/loadPage-DUPP51C-.mjs +2 -0
- package/dist/server/{loadPage-BBkDQA57.mjs → loadPage-DhDGzj7t.mjs} +8 -5
- package/dist/server/manifest.mjs +1 -1
- package/dist/server/metadata.mjs +2 -2
- package/dist/server/next.mjs +13 -12
- package/dist/server/{overrideResolution-ByeAbLSO.mjs → overrideResolution-OxY5FMuy.mjs} +1 -1
- package/dist/server/{overrides-BcA6ZPWf.mjs → overrides-Bz_A6sB9.mjs} +586 -518
- package/dist/server/page-converter.mjs +8 -10
- package/dist/server/{prebuild-8T-m7XjB.mjs → prebuild-B_1vrSru.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-Bjya-X9t.mjs → prefetchBlockData-B7ukYXXR.mjs} +841 -887
- package/dist/server/{publicProducts-C3meXS2o.mjs → publicProducts-Djbpc81A.mjs} +166 -129
- package/dist/server/{blocks-jlIm0PWc.mjs → registry-eFjKtEhF.mjs} +2349 -1716
- package/dist/server/rendering/server.mjs +4 -4
- package/dist/server/rendering.mjs +7 -7
- package/dist/server/{resolveBlockData-D0ow8PRJ.mjs → resolveBlockData-DYvEa9c5.mjs} +6 -3
- package/dist/server/routing.mjs +1 -1
- package/dist/server/{schema-Bs735S27.mjs → schema-C3dJ5UkL.mjs} +148 -88
- package/dist/server/server.mjs +3 -3
- package/dist/server/{siteChromeOverlayClearance-BangtD8A.mjs → siteChromeOverlayClearance-DALIAMwo.mjs} +108 -11
- package/dist/server/{src-B935_bzN.mjs → src-C5Mu-z0F.mjs} +268 -189
- package/dist/server/theme-bridge.mjs +1 -1
- package/dist/server/theme.mjs +1 -1
- package/dist/server/{themeAdmission-D2-BnmDO.mjs → themeAdmission-ruoyXb_0.mjs} +9 -7
- package/dist/server/{three-pass-converter-CmmchOFC.mjs → three-pass-converter-Chnb1XD-.mjs} +2 -58
- package/dist/server/{validation-Cm41pDUB.mjs → validation-B-Xar8QS.mjs} +22 -63
- package/dist/server/{version-Bo9C3McI.mjs → version-Bg7VHK3i.mjs} +1 -1
- package/dist/styles/index.css +78 -0
- package/package.json +8 -3
- package/dist/_dts/index-CXsnaCGe.d.ts +0 -10
- package/dist/_dts/index-cnymEAZY.d.ts +0 -1
- package/dist/client/timetableModel-D7PwpaBY.mjs +0 -480
- package/dist/preview-next/client/siteStyleAccess-CRXaC2oL.mjs +0 -1326
- package/dist/server/loadPage-ZrcfjG3X.mjs +0 -2
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client";
|
|
3
3
|
import { h as unsafeAsAppointmentResourceId } from "../renderableMediaAssetAdmission-DGjBr_e-.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { t as
|
|
4
|
+
import { C as clsx, Mr as parsePositiveMoneyInputToCents, Nr as formatCurrencyAmount, i as ThemedButtonLink, jr as resolveFlexibleBalancePaymentEligibility, kr as formatOrderInstalmentStatusLabel$1, o as ThemedFileChooser, r as ThemedButton, t as ThemedActionsButton, u as SpinnerNode } from "../ThemedButton-C22C9cCF.mjs";
|
|
5
|
+
import { c as assertNever$1, t as assertNever } from "../src-VIsPY-kw.mjs";
|
|
6
|
+
import { t as logger } from "../noop-B610YKEx.mjs";
|
|
7
|
+
import { t as generateUuidV4 } from "../uuid-BETKW8rS.mjs";
|
|
7
8
|
import { t as resolveDedicatedBookingHref } from "../bookingRoute-Bqlyu5Vb.mjs";
|
|
8
|
-
import { t as CheckboxChoice } from "../CheckboxChoice-
|
|
9
|
-
import { t as DemoPortalSignInLink } from "../DemoPortalSignInLink-
|
|
9
|
+
import { t as CheckboxChoice } from "../CheckboxChoice-Bhm6RAUL.mjs";
|
|
10
|
+
import { t as DemoPortalSignInLink } from "../DemoPortalSignInLink-ClxN5_xZ.mjs";
|
|
10
11
|
import { t as ModalShell } from "../ModalShell-B_fHWK71.mjs";
|
|
11
|
-
import { t as TabBarFragment } from "../TabBarFragment-
|
|
12
|
+
import { t as TabBarFragment } from "../TabBarFragment-BHd8GN8y.mjs";
|
|
12
13
|
import { i as getPortalCreditProductCreditNoun, r as getCreditProductTypeLabel, t as deriveCreditProductLabels } from "../creditProducts-BOWi1QLp.mjs";
|
|
13
|
-
import { t as formatDate
|
|
14
|
-
import { i as createBlockApi, n as useBlockApi, t as BlockApiProvider } from "../context-
|
|
15
|
-
import { n as useAvailableDates, t as useAvailableSlots } from "../useAvailableSlots-
|
|
16
|
-
import { t as useBookingNowIso } from "../useBookingNowIso-
|
|
17
|
-
import { n as buildPortalCallbackUrl, r as requestDemoPortalMagicLink } from "../demoPortalMagicLink-
|
|
14
|
+
import { t as formatDate } from "../formatDate-xUSCknEO.mjs";
|
|
15
|
+
import { i as createBlockApi, n as useBlockApi, t as BlockApiProvider } from "../context-BLAvalAa.mjs";
|
|
16
|
+
import { n as useAvailableDates, t as useAvailableSlots } from "../useAvailableSlots-BjbJXotk.mjs";
|
|
17
|
+
import { t as useBookingNowIso } from "../useBookingNowIso-CMgfL7YJ.mjs";
|
|
18
|
+
import { n as buildPortalCallbackUrl, r as requestDemoPortalMagicLink } from "../demoPortalMagicLink-R-awbk_0.mjs";
|
|
19
|
+
import { a as isPast, i as formatPortalSession, n as formatDateTime, o as portalSessionDisplay, r as formatEntitlementEnd, t as formatDate$1 } from "../dateFormatting-BHIHxNuo.mjs";
|
|
18
20
|
import * as React$1 from "react";
|
|
19
|
-
import React, { createContext, useCallback, useContext, useEffect, useMemo, useReducer, useState } from "react";
|
|
21
|
+
import React, { createContext, forwardRef, useCallback, useContext, useEffect, useId, useMemo, useReducer, useRef, useState } from "react";
|
|
20
22
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
21
23
|
//#region ../core/src/appointment-lifecycle.ts
|
|
22
24
|
const appointmentStatusLabels = {
|
|
@@ -31,64 +33,6 @@ function appointmentStatusLabel(status) {
|
|
|
31
33
|
return appointmentStatusLabels[status];
|
|
32
34
|
}
|
|
33
35
|
//#endregion
|
|
34
|
-
//#region ../blocks/src/portal/dateFormatting.ts
|
|
35
|
-
/** Optional API timestamps enter the display model here; invalid values never render a Date. */
|
|
36
|
-
function readInstant(value) {
|
|
37
|
-
const result = value ? parseUtcIsoDateTimeString(value) : null;
|
|
38
|
-
return result?.ok ? result.value : null;
|
|
39
|
-
}
|
|
40
|
-
function formatDate(value, context, style = "short") {
|
|
41
|
-
const instant = readInstant(value);
|
|
42
|
-
return instant ? formatDate$1({
|
|
43
|
-
kind: "instant",
|
|
44
|
-
value: instant
|
|
45
|
-
}, context, { date: style }) : "—";
|
|
46
|
-
}
|
|
47
|
-
function formatEntitlementEnd(value, context, style = "short") {
|
|
48
|
-
const instant = readInstant(value);
|
|
49
|
-
const lastValid = instant ? /* @__PURE__ */ new Date(Date.parse(instant) - 1) : null;
|
|
50
|
-
return lastValid && Number.isFinite(lastValid.getTime()) ? formatDate$1({
|
|
51
|
-
kind: "instant",
|
|
52
|
-
value: toUtcIsoDateTimeString(lastValid.toISOString())
|
|
53
|
-
}, context, { date: style }) : "—";
|
|
54
|
-
}
|
|
55
|
-
function formatDateTime(value, context, style = "short", zone = "omit") {
|
|
56
|
-
const instant = readInstant(value);
|
|
57
|
-
return instant ? formatDateTime$1(instant, context, {
|
|
58
|
-
date: style,
|
|
59
|
-
zone
|
|
60
|
-
}) : "—";
|
|
61
|
-
}
|
|
62
|
-
function portalSessionDisplay(facts, site) {
|
|
63
|
-
return resolveBookingDisplayContext({
|
|
64
|
-
sessionTimeZone: resolveBookingTimeZoneId(facts.timeZone, site.timeZone),
|
|
65
|
-
siteTimeZone: site.timeZone,
|
|
66
|
-
locale: site.locale,
|
|
67
|
-
isOnline: facts.isOnline ?? false,
|
|
68
|
-
surface: "public"
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
function formatPortalSession(start, end, facts, site) {
|
|
72
|
-
const { context, zone } = portalSessionDisplay(facts, site);
|
|
73
|
-
const startsAt = readInstant(start);
|
|
74
|
-
const endsAt = readInstant(end);
|
|
75
|
-
if (!startsAt) return "—";
|
|
76
|
-
return endsAt && Date.parse(endsAt) >= Date.parse(startsAt) ? formatDateTimeRange({
|
|
77
|
-
start: startsAt,
|
|
78
|
-
end: endsAt
|
|
79
|
-
}, context, {
|
|
80
|
-
date: "short",
|
|
81
|
-
zone
|
|
82
|
-
}) : formatDateTime$1(startsAt, context, {
|
|
83
|
-
date: "short",
|
|
84
|
-
zone
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
function isPast(value, now) {
|
|
88
|
-
const instant = readInstant(value);
|
|
89
|
-
return instant !== null && Date.parse(instant) < Date.parse(now);
|
|
90
|
-
}
|
|
91
|
-
//#endregion
|
|
92
36
|
//#region ../blocks/src/customer-portal/dateDisplay.tsx
|
|
93
37
|
const PortalDateContext = createContext(null);
|
|
94
38
|
/** Hosts supply business context and one SSR snapshot; the existing clock owns reconciliation. */
|
|
@@ -112,7 +56,7 @@ function usePortalDateFormatting() {
|
|
|
112
56
|
return {
|
|
113
57
|
context,
|
|
114
58
|
now,
|
|
115
|
-
formatDate: (value, style = "short") => formatDate(value, context, style),
|
|
59
|
+
formatDate: (value, style = "short") => formatDate$1(value, context, style),
|
|
116
60
|
formatDateTime: (value, style = "short") => formatDateTime(value, context, style),
|
|
117
61
|
formatEntitlementEnd: (value, style = "short") => formatEntitlementEnd(value, context, style),
|
|
118
62
|
isPast: (value) => isPast(value, now)
|
|
@@ -901,13 +845,4528 @@ function PortalModal({ title, titleId, onClose, children }) {
|
|
|
901
845
|
});
|
|
902
846
|
}
|
|
903
847
|
//#endregion
|
|
904
|
-
//#region ../
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
848
|
+
//#region ../uploads-react/src/uploadQueue.ts
|
|
849
|
+
function isUploadActive(item) {
|
|
850
|
+
switch (item.status) {
|
|
851
|
+
case "preparing":
|
|
852
|
+
case "sending":
|
|
853
|
+
case "processing":
|
|
854
|
+
case "cancelling": return true;
|
|
855
|
+
case "queued":
|
|
856
|
+
case "done":
|
|
857
|
+
case "failed": return false;
|
|
858
|
+
default: return assertNever$1(item.status);
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
const isUploadBusy = (item) => item.status === "queued" || isUploadActive(item);
|
|
862
|
+
function cancelItems(queue) {
|
|
863
|
+
return {
|
|
864
|
+
queue: queue.filter(isUploadActive).map((item) => ({
|
|
865
|
+
...item,
|
|
866
|
+
status: "cancelling"
|
|
867
|
+
})),
|
|
868
|
+
effects: queue.filter(isUploadActive).map((item) => ({
|
|
869
|
+
tag: "abort",
|
|
870
|
+
id: item.id
|
|
871
|
+
}))
|
|
872
|
+
};
|
|
873
|
+
}
|
|
874
|
+
function applyUploadEvent(queue, event) {
|
|
875
|
+
if (event.tag === "enqueue") {
|
|
876
|
+
const base = event.admission === "replace" ? cancelItems(queue) : {
|
|
877
|
+
queue,
|
|
878
|
+
effects: []
|
|
879
|
+
};
|
|
880
|
+
return {
|
|
881
|
+
queue: [...base.queue, ...event.items],
|
|
882
|
+
effects: [...base.effects, ...event.items.flatMap((item) => item.status === "failed" ? [{
|
|
883
|
+
tag: "announce",
|
|
884
|
+
text: `${item.file.name} didn't upload`
|
|
885
|
+
}] : [])]
|
|
886
|
+
};
|
|
887
|
+
}
|
|
888
|
+
if (event.tag === "reset") return cancelItems(queue);
|
|
889
|
+
const item = queue.find((row) => row.id === event.id);
|
|
890
|
+
if (!item || "attempt" in event && event.attempt !== item.attempt) return {
|
|
891
|
+
queue,
|
|
892
|
+
effects: []
|
|
893
|
+
};
|
|
894
|
+
const transition = transitionItem(item, event);
|
|
895
|
+
const nextQueue = queue.flatMap((row) => row.id === item.id ? transition.queue : [row]);
|
|
896
|
+
const batchFinished = queue.some(isUploadBusy) && !nextQueue.some(isUploadBusy);
|
|
897
|
+
return {
|
|
898
|
+
queue: nextQueue,
|
|
899
|
+
effects: transition.effects.map((effect) => effect.tag === "announce" && batchFinished ? {
|
|
900
|
+
...effect,
|
|
901
|
+
text: `${effect.text}. ${summariseUploads(nextQueue).label}`
|
|
902
|
+
} : effect)
|
|
903
|
+
};
|
|
904
|
+
}
|
|
905
|
+
function transitionItem(item, event) {
|
|
906
|
+
const unchanged = {
|
|
907
|
+
queue: [item],
|
|
908
|
+
effects: []
|
|
909
|
+
};
|
|
910
|
+
switch (event.tag) {
|
|
911
|
+
case "start": return startItem(item);
|
|
912
|
+
case "retry": return retryItem(item);
|
|
913
|
+
case "cancel":
|
|
914
|
+
if (item.status === "queued") return {
|
|
915
|
+
queue: [],
|
|
916
|
+
effects: []
|
|
917
|
+
};
|
|
918
|
+
return item.status === "preparing" || item.status === "sending" ? cancelItems([item]) : unchanged;
|
|
919
|
+
case "dismiss": return item.status === "done" || item.status === "failed" ? {
|
|
920
|
+
queue: [],
|
|
921
|
+
effects: []
|
|
922
|
+
} : unchanged;
|
|
923
|
+
case "settled": return item.status === "cancelling" ? {
|
|
924
|
+
queue: [],
|
|
925
|
+
effects: []
|
|
926
|
+
} : unchanged;
|
|
927
|
+
case "progress": return progressItem(item, event.progress);
|
|
928
|
+
case "sent": return sentItem(item, event.handle);
|
|
929
|
+
case "done": return finishItem(item, event.result);
|
|
930
|
+
case "failed": return failItem(item, event);
|
|
931
|
+
default: return assertNever$1(event);
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
function startItem(item) {
|
|
935
|
+
if (item.status !== "queued") return {
|
|
936
|
+
queue: [item],
|
|
937
|
+
effects: []
|
|
938
|
+
};
|
|
939
|
+
const running = item.operation.tag === "complete" ? {
|
|
940
|
+
...item,
|
|
941
|
+
status: "processing",
|
|
942
|
+
handle: item.operation.handle,
|
|
943
|
+
attempt: item.attempt + 1
|
|
944
|
+
} : {
|
|
945
|
+
...item,
|
|
946
|
+
status: "sending",
|
|
947
|
+
fraction: 0,
|
|
948
|
+
attempt: item.attempt + 1
|
|
949
|
+
};
|
|
950
|
+
return {
|
|
951
|
+
queue: [running],
|
|
952
|
+
effects: [{
|
|
953
|
+
tag: "run",
|
|
954
|
+
item: running,
|
|
955
|
+
operation: item.operation
|
|
956
|
+
}]
|
|
957
|
+
};
|
|
958
|
+
}
|
|
959
|
+
function retryItem(item) {
|
|
960
|
+
if (item.status !== "failed") return {
|
|
961
|
+
queue: [item],
|
|
962
|
+
effects: []
|
|
963
|
+
};
|
|
964
|
+
switch (item.recovery.tag) {
|
|
965
|
+
case "none":
|
|
966
|
+
case "upgrade":
|
|
967
|
+
case "sign-in": return {
|
|
968
|
+
queue: [item],
|
|
969
|
+
effects: []
|
|
970
|
+
};
|
|
971
|
+
case "restart": return queueRetry(item, { tag: "send" });
|
|
972
|
+
case "retry-completion": return queueRetry(item, {
|
|
973
|
+
tag: "complete",
|
|
974
|
+
handle: item.recovery.handle
|
|
975
|
+
});
|
|
976
|
+
default: return assertNever$1(item.recovery);
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
function queueRetry(item, operation) {
|
|
980
|
+
return {
|
|
981
|
+
queue: [{
|
|
982
|
+
...item,
|
|
983
|
+
status: "queued",
|
|
984
|
+
operation
|
|
985
|
+
}],
|
|
986
|
+
effects: []
|
|
987
|
+
};
|
|
988
|
+
}
|
|
989
|
+
function nextToStart(queue, maxParallel) {
|
|
990
|
+
return queue.filter((item) => item.status === "queued").slice(0, Math.max(0, maxParallel - queue.filter(isUploadActive).length));
|
|
991
|
+
}
|
|
992
|
+
function summariseUploads(queue) {
|
|
993
|
+
const visible = queue.filter((item) => item.status !== "cancelling");
|
|
994
|
+
const running = visible.filter(isUploadBusy).length;
|
|
995
|
+
const added = visible.filter((item) => item.status === "done").length;
|
|
996
|
+
const failed = visible.filter((item) => item.status === "failed").length;
|
|
997
|
+
const measurable = visible.filter((item) => item.status !== "failed");
|
|
998
|
+
const totalFraction = measurable.reduce((sum, item) => sum + summaryFraction(item), 0);
|
|
999
|
+
return {
|
|
1000
|
+
running,
|
|
1001
|
+
added,
|
|
1002
|
+
failed,
|
|
1003
|
+
fraction: measurable.length ? totalFraction / measurable.length : 0,
|
|
1004
|
+
...describeUploadCounts({
|
|
1005
|
+
running,
|
|
1006
|
+
added,
|
|
1007
|
+
failed
|
|
1008
|
+
}, queue[0]?.workflow?.doneLabel ?? "Added")
|
|
1009
|
+
};
|
|
1010
|
+
}
|
|
1011
|
+
function describeUploadCounts({ running, added, failed }, doneLabel) {
|
|
1012
|
+
const completed = `${added} ${doneLabel.toLowerCase()}`;
|
|
1013
|
+
const rejected = `${failed} didn't upload`;
|
|
1014
|
+
const detail = [added ? completed : "", failed ? rejected : ""].filter(Boolean).join(" · ");
|
|
1015
|
+
return {
|
|
1016
|
+
label: running ? `Uploading ${running} ${running === 1 ? "file" : "files"}` : failed ? rejected : completed,
|
|
1017
|
+
detail: running ? detail : failed && added ? completed : ""
|
|
1018
|
+
};
|
|
1019
|
+
}
|
|
1020
|
+
function summaryFraction(item) {
|
|
1021
|
+
switch (item.status) {
|
|
1022
|
+
case "processing":
|
|
1023
|
+
case "done": return 1;
|
|
1024
|
+
case "sending": return item.fraction ?? 0;
|
|
1025
|
+
case "queued":
|
|
1026
|
+
case "preparing":
|
|
1027
|
+
case "failed":
|
|
1028
|
+
case "cancelling": return 0;
|
|
1029
|
+
default: return assertNever$1(item);
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
/** Preserve input order and evaluate each file's admission once, before queue effects. */
|
|
1033
|
+
function admitFiles(files, rule) {
|
|
1034
|
+
return files.map((file) => ({
|
|
1035
|
+
file,
|
|
1036
|
+
admission: rule?.(file) ?? { tag: "accepted" }
|
|
1037
|
+
}));
|
|
1038
|
+
}
|
|
1039
|
+
function uploadFailureMessage(failure, filename) {
|
|
1040
|
+
switch (failure.tag) {
|
|
1041
|
+
case "connection": return "The connection dropped before this finished.";
|
|
1042
|
+
case "server": return "Something went wrong on our side.";
|
|
1043
|
+
case "storage-full": return "Your media storage is full.";
|
|
1044
|
+
case "signed-out": return "You've been signed out. Sign in again, then try this upload.";
|
|
1045
|
+
case "rejected": return failure.message;
|
|
1046
|
+
case "unknown": return "This file didn't upload. Try again, or choose a different file.";
|
|
1047
|
+
case "not-allowed": return notAllowedMessage(failure, filename);
|
|
1048
|
+
default: return assertNever$1(failure);
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
function notAllowedMessage(failure, filename) {
|
|
1052
|
+
switch (failure.reason) {
|
|
1053
|
+
case "kind": return failure.allowed === "fonts" ? "Fonts need to be WOFF2, TTF or OTF files." : failure.allowed ? `Only ${failure.allowed} can be used here.` : "This type of file can't be used here.";
|
|
1054
|
+
case "size": return failure.kindLabel === "logos" ? `${filename} is over the 5 MB limit for logos. Try a smaller copy, like the one you use on your website.` : `This file is over the ${Math.round(failure.limitBytes / 1024 / 1024)} MB limit for ${failure.kindLabel}. Try saving a smaller copy.`;
|
|
1055
|
+
default: return assertNever$1(failure);
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
function uploadRowView(item) {
|
|
1059
|
+
const base = {
|
|
1060
|
+
status: item.status,
|
|
1061
|
+
message: null,
|
|
1062
|
+
retry: false,
|
|
1063
|
+
link: null,
|
|
1064
|
+
suffix: ""
|
|
1065
|
+
};
|
|
1066
|
+
switch (item.status) {
|
|
1067
|
+
case "cancelling": return null;
|
|
1068
|
+
case "queued": return {
|
|
1069
|
+
...base,
|
|
1070
|
+
label: "Waiting",
|
|
1071
|
+
progress: {
|
|
1072
|
+
fraction: 0,
|
|
1073
|
+
waiting: true
|
|
1074
|
+
},
|
|
1075
|
+
action: "cancel"
|
|
1076
|
+
};
|
|
1077
|
+
case "preparing": return {
|
|
1078
|
+
...base,
|
|
1079
|
+
label: "Preparing video",
|
|
1080
|
+
progress: { fraction: item.fraction },
|
|
1081
|
+
action: "cancel"
|
|
1082
|
+
};
|
|
1083
|
+
case "sending": return {
|
|
1084
|
+
...base,
|
|
1085
|
+
label: item.fraction === null ? "Processing…" : `${Math.round(item.fraction * 100)}%`,
|
|
1086
|
+
progress: { fraction: item.fraction },
|
|
1087
|
+
action: "cancel"
|
|
1088
|
+
};
|
|
1089
|
+
case "processing": return {
|
|
1090
|
+
...base,
|
|
1091
|
+
label: item.workflow.processingLabel ?? "Processing…",
|
|
1092
|
+
progress: { fraction: null },
|
|
1093
|
+
action: null
|
|
1094
|
+
};
|
|
1095
|
+
case "done": return {
|
|
1096
|
+
...base,
|
|
1097
|
+
label: item.workflow.doneLabel ?? "Added",
|
|
1098
|
+
progress: null,
|
|
1099
|
+
action: "dismiss"
|
|
1100
|
+
};
|
|
1101
|
+
case "failed": return {
|
|
1102
|
+
...base,
|
|
1103
|
+
label: "Didn't upload",
|
|
1104
|
+
progress: null,
|
|
1105
|
+
action: "dismiss",
|
|
1106
|
+
...failedRowMessage(item.failure, item.file.name),
|
|
1107
|
+
retry: item.recovery.tag === "restart" || item.recovery.tag === "retry-completion",
|
|
1108
|
+
link: rowLink(item.recovery)
|
|
1109
|
+
};
|
|
1110
|
+
default: return assertNever$1(item);
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
function rowLink(recovery) {
|
|
1114
|
+
switch (recovery.tag) {
|
|
1115
|
+
case "upgrade": return "upgrade";
|
|
1116
|
+
case "sign-in": return "sign-in";
|
|
1117
|
+
case "none":
|
|
1118
|
+
case "restart":
|
|
1119
|
+
case "retry-completion": return null;
|
|
1120
|
+
default: return assertNever$1(recovery);
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
/** The row splits its sentence around the link ("…signed out. [Sign in again], then try this upload."). */
|
|
1124
|
+
function failedRowMessage(failure, filename) {
|
|
1125
|
+
switch (failure.tag) {
|
|
1126
|
+
case "server": return {
|
|
1127
|
+
message: uploadFailureMessage(failure, filename),
|
|
1128
|
+
suffix: " in a moment."
|
|
1129
|
+
};
|
|
1130
|
+
case "storage-full": return {
|
|
1131
|
+
message: uploadFailureMessage(failure, filename),
|
|
1132
|
+
suffix: " or delete files you no longer use."
|
|
1133
|
+
};
|
|
1134
|
+
case "signed-out": return {
|
|
1135
|
+
message: "You've been signed out.",
|
|
1136
|
+
suffix: ", then try this upload."
|
|
1137
|
+
};
|
|
1138
|
+
case "connection":
|
|
1139
|
+
case "not-allowed":
|
|
1140
|
+
case "rejected":
|
|
1141
|
+
case "unknown": return {
|
|
1142
|
+
message: uploadFailureMessage(failure, filename),
|
|
1143
|
+
suffix: ""
|
|
1144
|
+
};
|
|
1145
|
+
default: return assertNever$1(failure);
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
function progressItem(item, progress) {
|
|
1149
|
+
if (item.status !== "preparing" && item.status !== "sending") return {
|
|
1150
|
+
queue: [item],
|
|
1151
|
+
effects: []
|
|
1152
|
+
};
|
|
1153
|
+
if (progress.phase === "preparing" && item.status === "sending" && item.fraction !== 0) return {
|
|
1154
|
+
queue: [item],
|
|
1155
|
+
effects: []
|
|
1156
|
+
};
|
|
1157
|
+
return {
|
|
1158
|
+
queue: [progress.phase === "preparing" ? {
|
|
1159
|
+
...item,
|
|
1160
|
+
status: "preparing",
|
|
1161
|
+
fraction: progress.fraction
|
|
1162
|
+
} : {
|
|
1163
|
+
...item,
|
|
1164
|
+
status: "sending",
|
|
1165
|
+
fraction: progress.fraction
|
|
1166
|
+
}],
|
|
1167
|
+
effects: []
|
|
1168
|
+
};
|
|
1169
|
+
}
|
|
1170
|
+
function sentItem(item, handle) {
|
|
1171
|
+
return item.status === "sending" || item.status === "preparing" ? {
|
|
1172
|
+
queue: [{
|
|
1173
|
+
...item,
|
|
1174
|
+
status: "processing",
|
|
1175
|
+
handle
|
|
1176
|
+
}],
|
|
1177
|
+
effects: []
|
|
1178
|
+
} : {
|
|
1179
|
+
queue: [item],
|
|
1180
|
+
effects: []
|
|
1181
|
+
};
|
|
1182
|
+
}
|
|
1183
|
+
function finishItem(item, result) {
|
|
1184
|
+
return item.status === "processing" ? {
|
|
1185
|
+
queue: [{
|
|
1186
|
+
...item,
|
|
1187
|
+
status: "done",
|
|
1188
|
+
result
|
|
1189
|
+
}],
|
|
1190
|
+
effects: [{
|
|
1191
|
+
tag: "completed",
|
|
1192
|
+
item,
|
|
1193
|
+
handle: item.handle,
|
|
1194
|
+
result
|
|
1195
|
+
}, {
|
|
1196
|
+
tag: "announce",
|
|
1197
|
+
text: `${item.workflow.doneLabel ?? "Added"} ${item.file.name}`
|
|
1198
|
+
}]
|
|
1199
|
+
} : {
|
|
1200
|
+
queue: [item],
|
|
1201
|
+
effects: []
|
|
1202
|
+
};
|
|
1203
|
+
}
|
|
1204
|
+
function failItem(item, failure) {
|
|
1205
|
+
return isUploadActive(item) && item.status !== "cancelling" ? {
|
|
1206
|
+
queue: [{
|
|
1207
|
+
...item,
|
|
1208
|
+
status: "failed",
|
|
1209
|
+
failure: failure.failure,
|
|
1210
|
+
recovery: failure.recovery
|
|
1211
|
+
}],
|
|
1212
|
+
effects: [{
|
|
1213
|
+
tag: "announce",
|
|
1214
|
+
text: `${item.file.name} didn't upload`
|
|
1215
|
+
}]
|
|
1216
|
+
} : {
|
|
1217
|
+
queue: [item],
|
|
1218
|
+
effects: []
|
|
1219
|
+
};
|
|
1220
|
+
}
|
|
1221
|
+
//#endregion
|
|
1222
|
+
//#region ../uploads-react/src/putBlobToSignedUrl.ts
|
|
1223
|
+
var TransferError = class extends Error {
|
|
1224
|
+
constructor(detail) {
|
|
1225
|
+
super(`Signed URL transfer: ${detail.tag}`);
|
|
1226
|
+
this.detail = detail;
|
|
1227
|
+
this.name = "TransferError";
|
|
1228
|
+
}
|
|
1229
|
+
};
|
|
1230
|
+
function putBlobToSignedUrl({ signedUrl, body, contentType, onProgress, signal }) {
|
|
1231
|
+
if (signal?.aborted) return Promise.reject(new TransferError({ tag: "aborted" }));
|
|
1232
|
+
return new Promise((resolve, reject) => {
|
|
1233
|
+
const xhr = new XMLHttpRequest();
|
|
1234
|
+
const abort = () => xhr.abort();
|
|
1235
|
+
const finish = (error) => {
|
|
1236
|
+
signal?.removeEventListener("abort", abort);
|
|
1237
|
+
if (error) reject(error);
|
|
1238
|
+
else resolve();
|
|
1239
|
+
};
|
|
1240
|
+
xhr.upload.addEventListener("progress", (event) => onProgress?.(event.lengthComputable ? Math.min(1, event.loaded / event.total) : null));
|
|
1241
|
+
xhr.addEventListener("load", () => finish(xhr.status >= 200 && xhr.status < 300 ? void 0 : new TransferError({
|
|
1242
|
+
tag: "http",
|
|
1243
|
+
status: xhr.status
|
|
1244
|
+
})));
|
|
1245
|
+
xhr.addEventListener("error", () => finish(new TransferError({ tag: "network" })));
|
|
1246
|
+
xhr.addEventListener("abort", () => finish(new TransferError({ tag: "aborted" })));
|
|
1247
|
+
xhr.open("PUT", signedUrl);
|
|
1248
|
+
xhr.setRequestHeader("Content-Type", contentType);
|
|
1249
|
+
signal?.addEventListener("abort", abort, { once: true });
|
|
1250
|
+
xhr.send(body);
|
|
1251
|
+
});
|
|
1252
|
+
}
|
|
1253
|
+
//#endregion
|
|
1254
|
+
//#region ../uploads-react/src/hooks/useUploads.ts
|
|
1255
|
+
async function runAttempt(item, operation, io, dispatch) {
|
|
1256
|
+
const identity = {
|
|
1257
|
+
id: item.id,
|
|
1258
|
+
attempt: item.attempt
|
|
1259
|
+
};
|
|
1260
|
+
const handle = await (operation.tag === "complete" ? Promise.resolve(operation.handle) : item.workflow.send(item.file, io)).catch((error) => {
|
|
1261
|
+
dispatch({
|
|
1262
|
+
tag: "failed",
|
|
1263
|
+
...identity,
|
|
1264
|
+
...item.workflow.classify(error, { step: "send" })
|
|
1265
|
+
});
|
|
1266
|
+
throw error;
|
|
1267
|
+
});
|
|
1268
|
+
if (io.signal.aborted) throw new TransferError({ tag: "aborted" });
|
|
1269
|
+
if (operation.tag === "send") dispatch({
|
|
1270
|
+
tag: "sent",
|
|
1271
|
+
...identity,
|
|
1272
|
+
handle
|
|
1273
|
+
});
|
|
1274
|
+
try {
|
|
1275
|
+
const result = await item.workflow.complete(handle, io);
|
|
1276
|
+
dispatch({
|
|
1277
|
+
tag: "done",
|
|
1278
|
+
...identity,
|
|
1279
|
+
result
|
|
1280
|
+
});
|
|
1281
|
+
} catch (error) {
|
|
1282
|
+
dispatch({
|
|
1283
|
+
tag: "failed",
|
|
1284
|
+
...identity,
|
|
1285
|
+
...item.workflow.classify(error, {
|
|
1286
|
+
step: "complete",
|
|
1287
|
+
handle
|
|
1288
|
+
})
|
|
1289
|
+
});
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1292
|
+
async function publishAcceptedUpload(effect, isCurrent) {
|
|
1293
|
+
if (!isCurrent()) return;
|
|
1294
|
+
try {
|
|
1295
|
+
const publication = await effect.item.workflow.prepareAccepted?.(effect.result, effect.handle);
|
|
1296
|
+
if (isCurrent()) publication?.publish();
|
|
1297
|
+
} catch {}
|
|
1298
|
+
}
|
|
1299
|
+
function executeEffect(effect, context) {
|
|
1300
|
+
switch (effect.tag) {
|
|
1301
|
+
case "announce":
|
|
1302
|
+
if (context.mounted) context.announce(effect.text);
|
|
1303
|
+
return;
|
|
1304
|
+
case "completed":
|
|
1305
|
+
if (context.mounted && context.isCurrent(effect.item)) {
|
|
1306
|
+
publishAcceptedUpload(effect, () => context.isCurrent(effect.item));
|
|
1307
|
+
if (context.isCurrent(effect.item)) effect.item.onComplete?.(effect.result, effect.item);
|
|
1308
|
+
}
|
|
1309
|
+
return;
|
|
1310
|
+
case "abort":
|
|
1311
|
+
context.controllers.get(effect.id)?.abort();
|
|
1312
|
+
return;
|
|
1313
|
+
case "run": {
|
|
1314
|
+
const { item } = effect;
|
|
1315
|
+
const controller = new AbortController();
|
|
1316
|
+
context.controllers.set(item.id, controller);
|
|
1317
|
+
const io = {
|
|
1318
|
+
signal: controller.signal,
|
|
1319
|
+
report: (progress) => context.dispatch({
|
|
1320
|
+
tag: "progress",
|
|
1321
|
+
id: item.id,
|
|
1322
|
+
attempt: item.attempt,
|
|
1323
|
+
progress
|
|
1324
|
+
})
|
|
1325
|
+
};
|
|
1326
|
+
runAttempt(item, effect.operation, io, context.dispatch).catch(() => void 0).finally(() => {
|
|
1327
|
+
if (context.controllers.get(item.id) === controller) context.controllers.delete(item.id);
|
|
1328
|
+
context.dispatch({
|
|
1329
|
+
tag: "settled",
|
|
1330
|
+
id: item.id,
|
|
1331
|
+
attempt: item.attempt
|
|
1332
|
+
});
|
|
1333
|
+
});
|
|
1334
|
+
return;
|
|
1335
|
+
}
|
|
1336
|
+
default: return assertNever$1(effect);
|
|
1337
|
+
}
|
|
1338
|
+
}
|
|
1339
|
+
function useUploads(options) {
|
|
1340
|
+
const [items, setItems] = useState([]);
|
|
1341
|
+
const [announcement, setAnnouncement] = useState("");
|
|
1342
|
+
const queue = useRef([]);
|
|
1343
|
+
const controllers = useRef(/* @__PURE__ */ new Map());
|
|
1344
|
+
const mounted = useRef(true);
|
|
1345
|
+
const optionsRef = useRef(options);
|
|
1346
|
+
optionsRef.current = options;
|
|
1347
|
+
const dispatch = useCallback((event) => {
|
|
1348
|
+
const transition = applyUploadEvent(queue.current, event);
|
|
1349
|
+
queue.current = transition.queue;
|
|
1350
|
+
if (mounted.current) setItems(transition.queue);
|
|
1351
|
+
transition.effects.forEach((effect) => executeEffect(effect, {
|
|
1352
|
+
controllers: controllers.current,
|
|
1353
|
+
mounted: mounted.current,
|
|
1354
|
+
dispatch,
|
|
1355
|
+
isCurrent: (item) => mounted.current && queue.current.some((row) => row.id === item.id && row.attempt === item.attempt && row.status === "done"),
|
|
1356
|
+
announce: setAnnouncement
|
|
1357
|
+
}));
|
|
1358
|
+
if (mounted.current && event.tag !== "start") nextToStart(queue.current, optionsRef.current.maxParallel ?? 3).forEach((item) => dispatch({
|
|
1359
|
+
tag: "start",
|
|
1360
|
+
id: item.id
|
|
1361
|
+
}));
|
|
1362
|
+
}, []);
|
|
1363
|
+
useEffect(() => {
|
|
1364
|
+
mounted.current = true;
|
|
1365
|
+
return () => {
|
|
1366
|
+
mounted.current = false;
|
|
1367
|
+
if (optionsRef.current.onUnmount === "continue-active") {
|
|
1368
|
+
queue.current.filter((item) => item.status === "preparing").forEach((item) => dispatch({
|
|
1369
|
+
tag: "cancel",
|
|
1370
|
+
id: item.id
|
|
1371
|
+
}));
|
|
1372
|
+
queue.current = queue.current.filter((item) => item.status !== "queued");
|
|
1373
|
+
} else dispatch({ tag: "reset" });
|
|
1374
|
+
};
|
|
1375
|
+
}, [dispatch]);
|
|
1376
|
+
return {
|
|
1377
|
+
items,
|
|
1378
|
+
announcement,
|
|
1379
|
+
enqueue: useCallback((files, admit) => {
|
|
1380
|
+
const current = optionsRef.current;
|
|
1381
|
+
const additions = admitFiles(Array.from(files), admit ?? current.admit).map(({ file, admission: verdict }) => {
|
|
1382
|
+
const base = {
|
|
1383
|
+
id: generateUuidV4(),
|
|
1384
|
+
attempt: 0,
|
|
1385
|
+
file,
|
|
1386
|
+
workflow: current.workflow,
|
|
1387
|
+
onComplete: current.onComplete
|
|
1388
|
+
};
|
|
1389
|
+
return verdict.tag === "rejected" ? {
|
|
1390
|
+
...base,
|
|
1391
|
+
status: "failed",
|
|
1392
|
+
failure: verdict.failure,
|
|
1393
|
+
recovery: { tag: "none" }
|
|
1394
|
+
} : {
|
|
1395
|
+
...base,
|
|
1396
|
+
status: "queued",
|
|
1397
|
+
operation: { tag: "send" }
|
|
1398
|
+
};
|
|
1399
|
+
});
|
|
1400
|
+
if (additions.length) dispatch({
|
|
1401
|
+
tag: "enqueue",
|
|
1402
|
+
items: additions,
|
|
1403
|
+
admission: current.admission ?? "append"
|
|
1404
|
+
});
|
|
1405
|
+
return additions.map((item) => item.id);
|
|
1406
|
+
}, [dispatch]),
|
|
1407
|
+
...useMemo(() => ({
|
|
1408
|
+
cancel: (id) => dispatch({
|
|
1409
|
+
tag: "cancel",
|
|
1410
|
+
id
|
|
1411
|
+
}),
|
|
1412
|
+
retry: (id) => dispatch({
|
|
1413
|
+
tag: "retry",
|
|
1414
|
+
id
|
|
1415
|
+
}),
|
|
1416
|
+
dismiss: (id) => dispatch({
|
|
1417
|
+
tag: "dismiss",
|
|
1418
|
+
id
|
|
1419
|
+
}),
|
|
1420
|
+
reset: () => dispatch({ tag: "reset" })
|
|
1421
|
+
}), [dispatch])
|
|
1422
|
+
};
|
|
1423
|
+
}
|
|
1424
|
+
//#endregion
|
|
1425
|
+
//#region ../uploads-react/src/uploadFailure.ts
|
|
1426
|
+
/** Block API errors retain public metadata directly on the error. */
|
|
1427
|
+
function transportErrorDetails(error) {
|
|
1428
|
+
if (!(error instanceof Error) || !("status" in error) || typeof error.status !== "number") return null;
|
|
1429
|
+
return {
|
|
1430
|
+
status: error.status,
|
|
1431
|
+
message: error.message,
|
|
1432
|
+
code: "code" in error && typeof error.code === "string" ? error.code : null,
|
|
1433
|
+
tag: "tag" in error && typeof error.tag === "string" ? error.tag : null
|
|
1434
|
+
};
|
|
1435
|
+
}
|
|
1436
|
+
function classifyPublicUploadError(detail) {
|
|
1437
|
+
if (detail.tag === "VERIFY_UPLOAD_FAILED") return {
|
|
1438
|
+
failure: {
|
|
1439
|
+
tag: "rejected",
|
|
1440
|
+
message: "We couldn't read this file. It may be damaged, or it isn't the kind of file it says it is."
|
|
1441
|
+
},
|
|
1442
|
+
recovery: { tag: "none" }
|
|
1443
|
+
};
|
|
1444
|
+
if (detail.status === 401) return {
|
|
1445
|
+
failure: { tag: "signed-out" },
|
|
1446
|
+
recovery: { tag: "sign-in" }
|
|
1447
|
+
};
|
|
1448
|
+
if (detail.code === "billing:storage_quota_exceeded") return {
|
|
1449
|
+
failure: { tag: "storage-full" },
|
|
1450
|
+
recovery: { tag: "upgrade" }
|
|
1451
|
+
};
|
|
1452
|
+
if (detail.status && (detail.status >= 500 || detail.status === 409)) return {
|
|
1453
|
+
failure: { tag: "server" },
|
|
1454
|
+
recovery: { tag: "restart" }
|
|
1455
|
+
};
|
|
1456
|
+
return detail.message ? {
|
|
1457
|
+
failure: {
|
|
1458
|
+
tag: "rejected",
|
|
1459
|
+
message: detail.message
|
|
1460
|
+
},
|
|
1461
|
+
recovery: { tag: "none" }
|
|
1462
|
+
} : {
|
|
1463
|
+
failure: { tag: "server" },
|
|
1464
|
+
recovery: { tag: "restart" }
|
|
1465
|
+
};
|
|
1466
|
+
}
|
|
1467
|
+
function uploadFailureCause(caught) {
|
|
1468
|
+
return caught instanceof Error && "cause" in caught && caught.cause ? caught.cause : caught;
|
|
1469
|
+
}
|
|
1470
|
+
/** Classify typed transport errors before a surface loses their public metadata. */
|
|
1471
|
+
function classifyUploadFailure(caught, detail = transportErrorDetails(uploadFailureCause(caught))) {
|
|
1472
|
+
const error = uploadFailureCause(caught);
|
|
1473
|
+
if (error instanceof TransferError) return {
|
|
1474
|
+
failure: { tag: error.detail.tag === "network" ? "connection" : "server" },
|
|
1475
|
+
recovery: { tag: "restart" }
|
|
1476
|
+
};
|
|
1477
|
+
if (error instanceof TypeError) return {
|
|
1478
|
+
failure: { tag: "connection" },
|
|
1479
|
+
recovery: { tag: "restart" }
|
|
1480
|
+
};
|
|
1481
|
+
return detail ? classifyPublicUploadError(detail) : {
|
|
1482
|
+
failure: { tag: "unknown" },
|
|
1483
|
+
recovery: { tag: "restart" }
|
|
1484
|
+
};
|
|
1485
|
+
}
|
|
1486
|
+
function classifyUploadFailureWithLimit(caught, limit, detail = transportErrorDetails(uploadFailureCause(caught))) {
|
|
1487
|
+
return detail?.status === 413 ? {
|
|
1488
|
+
failure: {
|
|
1489
|
+
tag: "not-allowed",
|
|
1490
|
+
reason: "size",
|
|
1491
|
+
...limit
|
|
1492
|
+
},
|
|
1493
|
+
recovery: { tag: "none" }
|
|
1494
|
+
} : classifyUploadFailure(caught, detail);
|
|
1495
|
+
}
|
|
1496
|
+
//#endregion
|
|
1497
|
+
//#region ../../node_modules/.pnpm/tailwind-merge@3.6.0/node_modules/tailwind-merge/dist/bundle-mjs.mjs
|
|
1498
|
+
/**
|
|
1499
|
+
* Concatenates two arrays faster than the array spread operator.
|
|
1500
|
+
*/
|
|
1501
|
+
const concatArrays = (array1, array2) => {
|
|
1502
|
+
const combinedArray = new Array(array1.length + array2.length);
|
|
1503
|
+
for (let i = 0; i < array1.length; i++) combinedArray[i] = array1[i];
|
|
1504
|
+
for (let i = 0; i < array2.length; i++) combinedArray[array1.length + i] = array2[i];
|
|
1505
|
+
return combinedArray;
|
|
1506
|
+
};
|
|
1507
|
+
const createClassValidatorObject = (classGroupId, validator) => ({
|
|
1508
|
+
classGroupId,
|
|
1509
|
+
validator
|
|
1510
|
+
});
|
|
1511
|
+
const createClassPartObject = (nextPart = /* @__PURE__ */ new Map(), validators = null, classGroupId) => ({
|
|
1512
|
+
nextPart,
|
|
1513
|
+
validators,
|
|
1514
|
+
classGroupId
|
|
1515
|
+
});
|
|
1516
|
+
const CLASS_PART_SEPARATOR = "-";
|
|
1517
|
+
const EMPTY_CONFLICTS = [];
|
|
1518
|
+
const ARBITRARY_PROPERTY_PREFIX = "arbitrary..";
|
|
1519
|
+
const createClassGroupUtils = (config) => {
|
|
1520
|
+
const classMap = createClassMap(config);
|
|
1521
|
+
const { conflictingClassGroups, conflictingClassGroupModifiers } = config;
|
|
1522
|
+
const getClassGroupId = (className) => {
|
|
1523
|
+
if (className.startsWith("[") && className.endsWith("]")) return getGroupIdForArbitraryProperty(className);
|
|
1524
|
+
const classParts = className.split(CLASS_PART_SEPARATOR);
|
|
1525
|
+
return getGroupRecursive(classParts, classParts[0] === "" && classParts.length > 1 ? 1 : 0, classMap);
|
|
1526
|
+
};
|
|
1527
|
+
const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
|
|
1528
|
+
if (hasPostfixModifier) {
|
|
1529
|
+
const modifierConflicts = conflictingClassGroupModifiers[classGroupId];
|
|
1530
|
+
const baseConflicts = conflictingClassGroups[classGroupId];
|
|
1531
|
+
if (modifierConflicts) {
|
|
1532
|
+
if (baseConflicts) return concatArrays(baseConflicts, modifierConflicts);
|
|
1533
|
+
return modifierConflicts;
|
|
1534
|
+
}
|
|
1535
|
+
return baseConflicts || EMPTY_CONFLICTS;
|
|
1536
|
+
}
|
|
1537
|
+
return conflictingClassGroups[classGroupId] || EMPTY_CONFLICTS;
|
|
1538
|
+
};
|
|
1539
|
+
return {
|
|
1540
|
+
getClassGroupId,
|
|
1541
|
+
getConflictingClassGroupIds
|
|
1542
|
+
};
|
|
1543
|
+
};
|
|
1544
|
+
const getGroupRecursive = (classParts, startIndex, classPartObject) => {
|
|
1545
|
+
if (classParts.length - startIndex === 0) return classPartObject.classGroupId;
|
|
1546
|
+
const currentClassPart = classParts[startIndex];
|
|
1547
|
+
const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
|
|
1548
|
+
if (nextClassPartObject) {
|
|
1549
|
+
const result = getGroupRecursive(classParts, startIndex + 1, nextClassPartObject);
|
|
1550
|
+
if (result) return result;
|
|
1551
|
+
}
|
|
1552
|
+
const validators = classPartObject.validators;
|
|
1553
|
+
if (validators === null) return;
|
|
1554
|
+
const classRest = startIndex === 0 ? classParts.join(CLASS_PART_SEPARATOR) : classParts.slice(startIndex).join(CLASS_PART_SEPARATOR);
|
|
1555
|
+
const validatorsLength = validators.length;
|
|
1556
|
+
for (let i = 0; i < validatorsLength; i++) {
|
|
1557
|
+
const validatorObj = validators[i];
|
|
1558
|
+
if (validatorObj.validator(classRest)) return validatorObj.classGroupId;
|
|
1559
|
+
}
|
|
1560
|
+
};
|
|
1561
|
+
/**
|
|
1562
|
+
* Get the class group ID for an arbitrary property.
|
|
1563
|
+
*
|
|
1564
|
+
* @param className - The class name to get the group ID for. Is expected to be string starting with `[` and ending with `]`.
|
|
1565
|
+
*/
|
|
1566
|
+
const getGroupIdForArbitraryProperty = (className) => className.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
|
|
1567
|
+
const content = className.slice(1, -1);
|
|
1568
|
+
const colonIndex = content.indexOf(":");
|
|
1569
|
+
const property = content.slice(0, colonIndex);
|
|
1570
|
+
return property ? ARBITRARY_PROPERTY_PREFIX + property : void 0;
|
|
1571
|
+
})();
|
|
1572
|
+
/**
|
|
1573
|
+
* Exported for testing only
|
|
1574
|
+
*/
|
|
1575
|
+
const createClassMap = (config) => {
|
|
1576
|
+
const { theme, classGroups } = config;
|
|
1577
|
+
return processClassGroups(classGroups, theme);
|
|
1578
|
+
};
|
|
1579
|
+
const processClassGroups = (classGroups, theme) => {
|
|
1580
|
+
const classMap = createClassPartObject();
|
|
1581
|
+
for (const classGroupId in classGroups) {
|
|
1582
|
+
const group = classGroups[classGroupId];
|
|
1583
|
+
processClassesRecursively(group, classMap, classGroupId, theme);
|
|
1584
|
+
}
|
|
1585
|
+
return classMap;
|
|
1586
|
+
};
|
|
1587
|
+
const processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {
|
|
1588
|
+
const len = classGroup.length;
|
|
1589
|
+
for (let i = 0; i < len; i++) {
|
|
1590
|
+
const classDefinition = classGroup[i];
|
|
1591
|
+
processClassDefinition(classDefinition, classPartObject, classGroupId, theme);
|
|
1592
|
+
}
|
|
1593
|
+
};
|
|
1594
|
+
const processClassDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
|
|
1595
|
+
if (typeof classDefinition === "string") {
|
|
1596
|
+
processStringDefinition(classDefinition, classPartObject, classGroupId);
|
|
1597
|
+
return;
|
|
1598
|
+
}
|
|
1599
|
+
if (typeof classDefinition === "function") {
|
|
1600
|
+
processFunctionDefinition(classDefinition, classPartObject, classGroupId, theme);
|
|
1601
|
+
return;
|
|
1602
|
+
}
|
|
1603
|
+
processObjectDefinition(classDefinition, classPartObject, classGroupId, theme);
|
|
1604
|
+
};
|
|
1605
|
+
const processStringDefinition = (classDefinition, classPartObject, classGroupId) => {
|
|
1606
|
+
const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
|
|
1607
|
+
classPartObjectToEdit.classGroupId = classGroupId;
|
|
1608
|
+
};
|
|
1609
|
+
const processFunctionDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
|
|
1610
|
+
if (isThemeGetter(classDefinition)) {
|
|
1611
|
+
processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
|
|
1612
|
+
return;
|
|
1613
|
+
}
|
|
1614
|
+
if (classPartObject.validators === null) classPartObject.validators = [];
|
|
1615
|
+
classPartObject.validators.push(createClassValidatorObject(classGroupId, classDefinition));
|
|
1616
|
+
};
|
|
1617
|
+
const processObjectDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
|
|
1618
|
+
const entries = Object.entries(classDefinition);
|
|
1619
|
+
const len = entries.length;
|
|
1620
|
+
for (let i = 0; i < len; i++) {
|
|
1621
|
+
const [key, value] = entries[i];
|
|
1622
|
+
processClassesRecursively(value, getPart(classPartObject, key), classGroupId, theme);
|
|
1623
|
+
}
|
|
1624
|
+
};
|
|
1625
|
+
const getPart = (classPartObject, path) => {
|
|
1626
|
+
let current = classPartObject;
|
|
1627
|
+
const parts = path.split(CLASS_PART_SEPARATOR);
|
|
1628
|
+
const len = parts.length;
|
|
1629
|
+
for (let i = 0; i < len; i++) {
|
|
1630
|
+
const part = parts[i];
|
|
1631
|
+
let next = current.nextPart.get(part);
|
|
1632
|
+
if (!next) {
|
|
1633
|
+
next = createClassPartObject();
|
|
1634
|
+
current.nextPart.set(part, next);
|
|
1635
|
+
}
|
|
1636
|
+
current = next;
|
|
1637
|
+
}
|
|
1638
|
+
return current;
|
|
1639
|
+
};
|
|
1640
|
+
const isThemeGetter = (func) => "isThemeGetter" in func && func.isThemeGetter === true;
|
|
1641
|
+
const createLruCache = (maxCacheSize) => {
|
|
1642
|
+
if (maxCacheSize < 1) return {
|
|
1643
|
+
get: () => void 0,
|
|
1644
|
+
set: () => {}
|
|
1645
|
+
};
|
|
1646
|
+
let cacheSize = 0;
|
|
1647
|
+
let cache = Object.create(null);
|
|
1648
|
+
let previousCache = Object.create(null);
|
|
1649
|
+
const update = (key, value) => {
|
|
1650
|
+
cache[key] = value;
|
|
1651
|
+
cacheSize++;
|
|
1652
|
+
if (cacheSize > maxCacheSize) {
|
|
1653
|
+
cacheSize = 0;
|
|
1654
|
+
previousCache = cache;
|
|
1655
|
+
cache = Object.create(null);
|
|
1656
|
+
}
|
|
1657
|
+
};
|
|
1658
|
+
return {
|
|
1659
|
+
get(key) {
|
|
1660
|
+
let value = cache[key];
|
|
1661
|
+
if (value !== void 0) return value;
|
|
1662
|
+
if ((value = previousCache[key]) !== void 0) {
|
|
1663
|
+
update(key, value);
|
|
1664
|
+
return value;
|
|
1665
|
+
}
|
|
1666
|
+
},
|
|
1667
|
+
set(key, value) {
|
|
1668
|
+
if (key in cache) cache[key] = value;
|
|
1669
|
+
else update(key, value);
|
|
1670
|
+
}
|
|
1671
|
+
};
|
|
1672
|
+
};
|
|
1673
|
+
const IMPORTANT_MODIFIER = "!";
|
|
1674
|
+
const MODIFIER_SEPARATOR = ":";
|
|
1675
|
+
const EMPTY_MODIFIERS = [];
|
|
1676
|
+
const createResultObject = (modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition, isExternal) => ({
|
|
1677
|
+
modifiers,
|
|
1678
|
+
hasImportantModifier,
|
|
1679
|
+
baseClassName,
|
|
1680
|
+
maybePostfixModifierPosition,
|
|
1681
|
+
isExternal
|
|
1682
|
+
});
|
|
1683
|
+
const createParseClassName = (config) => {
|
|
1684
|
+
const { prefix, experimentalParseClassName } = config;
|
|
1685
|
+
/**
|
|
1686
|
+
* Parse class name into parts.
|
|
1687
|
+
*
|
|
1688
|
+
* Inspired by `splitAtTopLevelOnly` used in Tailwind CSS
|
|
1689
|
+
* @see https://github.com/tailwindlabs/tailwindcss/blob/v3.2.2/src/util/splitAtTopLevelOnly.js
|
|
1690
|
+
*/
|
|
1691
|
+
let parseClassName = (className) => {
|
|
1692
|
+
const modifiers = [];
|
|
1693
|
+
let bracketDepth = 0;
|
|
1694
|
+
let parenDepth = 0;
|
|
1695
|
+
let modifierStart = 0;
|
|
1696
|
+
let postfixModifierPosition;
|
|
1697
|
+
const len = className.length;
|
|
1698
|
+
for (let index = 0; index < len; index++) {
|
|
1699
|
+
const currentCharacter = className[index];
|
|
1700
|
+
if (bracketDepth === 0 && parenDepth === 0) {
|
|
1701
|
+
if (currentCharacter === MODIFIER_SEPARATOR) {
|
|
1702
|
+
modifiers.push(className.slice(modifierStart, index));
|
|
1703
|
+
modifierStart = index + 1;
|
|
1704
|
+
continue;
|
|
1705
|
+
}
|
|
1706
|
+
if (currentCharacter === "/") {
|
|
1707
|
+
postfixModifierPosition = index;
|
|
1708
|
+
continue;
|
|
1709
|
+
}
|
|
1710
|
+
}
|
|
1711
|
+
if (currentCharacter === "[") bracketDepth++;
|
|
1712
|
+
else if (currentCharacter === "]") bracketDepth--;
|
|
1713
|
+
else if (currentCharacter === "(") parenDepth++;
|
|
1714
|
+
else if (currentCharacter === ")") parenDepth--;
|
|
1715
|
+
}
|
|
1716
|
+
const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.slice(modifierStart);
|
|
1717
|
+
let baseClassName = baseClassNameWithImportantModifier;
|
|
1718
|
+
let hasImportantModifier = false;
|
|
1719
|
+
if (baseClassNameWithImportantModifier.endsWith(IMPORTANT_MODIFIER)) {
|
|
1720
|
+
baseClassName = baseClassNameWithImportantModifier.slice(0, -1);
|
|
1721
|
+
hasImportantModifier = true;
|
|
1722
|
+
} else if (baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER)) {
|
|
1723
|
+
baseClassName = baseClassNameWithImportantModifier.slice(1);
|
|
1724
|
+
hasImportantModifier = true;
|
|
1725
|
+
}
|
|
1726
|
+
const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : void 0;
|
|
1727
|
+
return createResultObject(modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition);
|
|
1728
|
+
};
|
|
1729
|
+
if (prefix) {
|
|
1730
|
+
const fullPrefix = prefix + MODIFIER_SEPARATOR;
|
|
1731
|
+
const parseClassNameOriginal = parseClassName;
|
|
1732
|
+
parseClassName = (className) => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.slice(fullPrefix.length)) : createResultObject(EMPTY_MODIFIERS, false, className, void 0, true);
|
|
1733
|
+
}
|
|
1734
|
+
if (experimentalParseClassName) {
|
|
1735
|
+
const parseClassNameOriginal = parseClassName;
|
|
1736
|
+
parseClassName = (className) => experimentalParseClassName({
|
|
1737
|
+
className,
|
|
1738
|
+
parseClassName: parseClassNameOriginal
|
|
1739
|
+
});
|
|
1740
|
+
}
|
|
1741
|
+
return parseClassName;
|
|
1742
|
+
};
|
|
1743
|
+
/**
|
|
1744
|
+
* Sorts modifiers according to following schema:
|
|
1745
|
+
* - Predefined modifiers are sorted alphabetically
|
|
1746
|
+
* - When an arbitrary variant appears, it must be preserved which modifiers are before and after it
|
|
1747
|
+
*/
|
|
1748
|
+
const createSortModifiers = (config) => {
|
|
1749
|
+
const modifierWeights = /* @__PURE__ */ new Map();
|
|
1750
|
+
config.orderSensitiveModifiers.forEach((mod, index) => {
|
|
1751
|
+
modifierWeights.set(mod, 1e6 + index);
|
|
1752
|
+
});
|
|
1753
|
+
return (modifiers) => {
|
|
1754
|
+
const result = [];
|
|
1755
|
+
let currentSegment = [];
|
|
1756
|
+
for (let i = 0; i < modifiers.length; i++) {
|
|
1757
|
+
const modifier = modifiers[i];
|
|
1758
|
+
const isArbitrary = modifier[0] === "[";
|
|
1759
|
+
const isOrderSensitive = modifierWeights.has(modifier);
|
|
1760
|
+
if (isArbitrary || isOrderSensitive) {
|
|
1761
|
+
if (currentSegment.length > 0) {
|
|
1762
|
+
currentSegment.sort();
|
|
1763
|
+
result.push(...currentSegment);
|
|
1764
|
+
currentSegment = [];
|
|
1765
|
+
}
|
|
1766
|
+
result.push(modifier);
|
|
1767
|
+
} else currentSegment.push(modifier);
|
|
1768
|
+
}
|
|
1769
|
+
if (currentSegment.length > 0) {
|
|
1770
|
+
currentSegment.sort();
|
|
1771
|
+
result.push(...currentSegment);
|
|
1772
|
+
}
|
|
1773
|
+
return result;
|
|
1774
|
+
};
|
|
1775
|
+
};
|
|
1776
|
+
const createConfigUtils = (config) => ({
|
|
1777
|
+
cache: createLruCache(config.cacheSize),
|
|
1778
|
+
parseClassName: createParseClassName(config),
|
|
1779
|
+
sortModifiers: createSortModifiers(config),
|
|
1780
|
+
postfixLookupClassGroupIds: createPostfixLookupClassGroupIds(config),
|
|
1781
|
+
...createClassGroupUtils(config)
|
|
1782
|
+
});
|
|
1783
|
+
const createPostfixLookupClassGroupIds = (config) => {
|
|
1784
|
+
const lookup = Object.create(null);
|
|
1785
|
+
const classGroupIds = config.postfixLookupClassGroups;
|
|
1786
|
+
if (classGroupIds) for (let i = 0; i < classGroupIds.length; i++) lookup[classGroupIds[i]] = true;
|
|
1787
|
+
return lookup;
|
|
1788
|
+
};
|
|
1789
|
+
const SPLIT_CLASSES_REGEX = /\s+/;
|
|
1790
|
+
const mergeClassList = (classList, configUtils) => {
|
|
1791
|
+
const { parseClassName, getClassGroupId, getConflictingClassGroupIds, sortModifiers, postfixLookupClassGroupIds } = configUtils;
|
|
1792
|
+
/**
|
|
1793
|
+
* Set of classGroupIds in following format:
|
|
1794
|
+
* `{importantModifier}{variantModifiers}{classGroupId}`
|
|
1795
|
+
* @example 'float'
|
|
1796
|
+
* @example 'hover:focus:bg-color'
|
|
1797
|
+
* @example 'md:!pr'
|
|
1798
|
+
*/
|
|
1799
|
+
const classGroupsInConflict = [];
|
|
1800
|
+
const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);
|
|
1801
|
+
let result = "";
|
|
1802
|
+
for (let index = classNames.length - 1; index >= 0; index -= 1) {
|
|
1803
|
+
const originalClassName = classNames[index];
|
|
1804
|
+
const { isExternal, modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition } = parseClassName(originalClassName);
|
|
1805
|
+
if (isExternal) {
|
|
1806
|
+
result = originalClassName + (result.length > 0 ? " " + result : result);
|
|
1807
|
+
continue;
|
|
1808
|
+
}
|
|
1809
|
+
let hasPostfixModifier = !!maybePostfixModifierPosition;
|
|
1810
|
+
let classGroupId;
|
|
1811
|
+
if (hasPostfixModifier) {
|
|
1812
|
+
classGroupId = getClassGroupId(baseClassName.substring(0, maybePostfixModifierPosition));
|
|
1813
|
+
const classGroupIdWithPostfix = classGroupId && postfixLookupClassGroupIds[classGroupId] ? getClassGroupId(baseClassName) : void 0;
|
|
1814
|
+
if (classGroupIdWithPostfix && classGroupIdWithPostfix !== classGroupId) {
|
|
1815
|
+
classGroupId = classGroupIdWithPostfix;
|
|
1816
|
+
hasPostfixModifier = false;
|
|
1817
|
+
}
|
|
1818
|
+
} else classGroupId = getClassGroupId(baseClassName);
|
|
1819
|
+
if (!classGroupId) {
|
|
1820
|
+
if (!hasPostfixModifier) {
|
|
1821
|
+
result = originalClassName + (result.length > 0 ? " " + result : result);
|
|
1822
|
+
continue;
|
|
1823
|
+
}
|
|
1824
|
+
classGroupId = getClassGroupId(baseClassName);
|
|
1825
|
+
if (!classGroupId) {
|
|
1826
|
+
result = originalClassName + (result.length > 0 ? " " + result : result);
|
|
1827
|
+
continue;
|
|
1828
|
+
}
|
|
1829
|
+
hasPostfixModifier = false;
|
|
1830
|
+
}
|
|
1831
|
+
const variantModifier = modifiers.length === 0 ? "" : modifiers.length === 1 ? modifiers[0] : sortModifiers(modifiers).join(":");
|
|
1832
|
+
const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
|
|
1833
|
+
const classId = modifierId + classGroupId;
|
|
1834
|
+
if (classGroupsInConflict.indexOf(classId) > -1) continue;
|
|
1835
|
+
classGroupsInConflict.push(classId);
|
|
1836
|
+
const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier);
|
|
1837
|
+
for (let i = 0; i < conflictGroups.length; ++i) {
|
|
1838
|
+
const group = conflictGroups[i];
|
|
1839
|
+
classGroupsInConflict.push(modifierId + group);
|
|
1840
|
+
}
|
|
1841
|
+
result = originalClassName + (result.length > 0 ? " " + result : result);
|
|
1842
|
+
}
|
|
1843
|
+
return result;
|
|
1844
|
+
};
|
|
1845
|
+
/**
|
|
1846
|
+
* The code in this file is copied from https://github.com/lukeed/clsx and modified to suit the needs of tailwind-merge better.
|
|
1847
|
+
*
|
|
1848
|
+
* Specifically:
|
|
1849
|
+
* - Runtime code from https://github.com/lukeed/clsx/blob/v1.2.1/src/index.js
|
|
1850
|
+
* - TypeScript types from https://github.com/lukeed/clsx/blob/v1.2.1/clsx.d.ts
|
|
1851
|
+
*
|
|
1852
|
+
* Original code has MIT license: Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
|
|
1853
|
+
*/
|
|
1854
|
+
const twJoin = (...classLists) => {
|
|
1855
|
+
let index = 0;
|
|
1856
|
+
let argument;
|
|
1857
|
+
let resolvedValue;
|
|
1858
|
+
let string = "";
|
|
1859
|
+
while (index < classLists.length) if (argument = classLists[index++]) {
|
|
1860
|
+
if (resolvedValue = toValue(argument)) {
|
|
1861
|
+
string && (string += " ");
|
|
1862
|
+
string += resolvedValue;
|
|
1863
|
+
}
|
|
1864
|
+
}
|
|
1865
|
+
return string;
|
|
1866
|
+
};
|
|
1867
|
+
const toValue = (mix) => {
|
|
1868
|
+
if (typeof mix === "string") return mix;
|
|
1869
|
+
let resolvedValue;
|
|
1870
|
+
let string = "";
|
|
1871
|
+
for (let k = 0; k < mix.length; k++) if (mix[k]) {
|
|
1872
|
+
if (resolvedValue = toValue(mix[k])) {
|
|
1873
|
+
string && (string += " ");
|
|
1874
|
+
string += resolvedValue;
|
|
1875
|
+
}
|
|
1876
|
+
}
|
|
1877
|
+
return string;
|
|
1878
|
+
};
|
|
1879
|
+
const createTailwindMerge = (createConfigFirst, ...createConfigRest) => {
|
|
1880
|
+
let configUtils;
|
|
1881
|
+
let cacheGet;
|
|
1882
|
+
let cacheSet;
|
|
1883
|
+
let functionToCall;
|
|
1884
|
+
const initTailwindMerge = (classList) => {
|
|
1885
|
+
configUtils = createConfigUtils(createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst()));
|
|
1886
|
+
cacheGet = configUtils.cache.get;
|
|
1887
|
+
cacheSet = configUtils.cache.set;
|
|
1888
|
+
functionToCall = tailwindMerge;
|
|
1889
|
+
return tailwindMerge(classList);
|
|
1890
|
+
};
|
|
1891
|
+
const tailwindMerge = (classList) => {
|
|
1892
|
+
const cachedResult = cacheGet(classList);
|
|
1893
|
+
if (cachedResult) return cachedResult;
|
|
1894
|
+
const result = mergeClassList(classList, configUtils);
|
|
1895
|
+
cacheSet(classList, result);
|
|
1896
|
+
return result;
|
|
1897
|
+
};
|
|
1898
|
+
functionToCall = initTailwindMerge;
|
|
1899
|
+
return (...args) => functionToCall(twJoin(...args));
|
|
1900
|
+
};
|
|
1901
|
+
const fallbackThemeArr = [];
|
|
1902
|
+
const fromTheme = (key) => {
|
|
1903
|
+
const themeGetter = (theme) => theme[key] || fallbackThemeArr;
|
|
1904
|
+
themeGetter.isThemeGetter = true;
|
|
1905
|
+
return themeGetter;
|
|
1906
|
+
};
|
|
1907
|
+
const arbitraryValueRegex = /^\[(?:(\w[\w-]*):)?(.+)\]$/i;
|
|
1908
|
+
const arbitraryVariableRegex = /^\((?:(\w[\w-]*):)?(.+)\)$/i;
|
|
1909
|
+
const fractionRegex = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/;
|
|
1910
|
+
const tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
|
|
1911
|
+
const lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/;
|
|
1912
|
+
const colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/;
|
|
1913
|
+
const shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
|
|
1914
|
+
const imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
|
|
1915
|
+
const isFraction = (value) => fractionRegex.test(value);
|
|
1916
|
+
const isNumber = (value) => !!value && !Number.isNaN(Number(value));
|
|
1917
|
+
const isInteger = (value) => !!value && Number.isInteger(Number(value));
|
|
1918
|
+
const isPercent = (value) => value.endsWith("%") && isNumber(value.slice(0, -1));
|
|
1919
|
+
const isTshirtSize = (value) => tshirtUnitRegex.test(value);
|
|
1920
|
+
const isAny = () => true;
|
|
1921
|
+
const isLengthOnly = (value) => lengthUnitRegex.test(value) && !colorFunctionRegex.test(value);
|
|
1922
|
+
const isNever = () => false;
|
|
1923
|
+
const isShadow = (value) => shadowRegex.test(value);
|
|
1924
|
+
const isImage = (value) => imageRegex.test(value);
|
|
1925
|
+
const isAnyNonArbitrary = (value) => !isArbitraryValue(value) && !isArbitraryVariable(value);
|
|
1926
|
+
const isNamedContainerQuery = (value) => value.startsWith("@container") && (value[10] === "/" && value[11] !== void 0 || value[11] === "s" && value[16] !== void 0 && value.startsWith("-size/", 10) || value[11] === "n" && value[18] !== void 0 && value.startsWith("-normal/", 10));
|
|
1927
|
+
const isArbitrarySize = (value) => getIsArbitraryValue(value, isLabelSize, isNever);
|
|
1928
|
+
const isArbitraryValue = (value) => arbitraryValueRegex.test(value);
|
|
1929
|
+
const isArbitraryLength = (value) => getIsArbitraryValue(value, isLabelLength, isLengthOnly);
|
|
1930
|
+
const isArbitraryNumber = (value) => getIsArbitraryValue(value, isLabelNumber, isNumber);
|
|
1931
|
+
const isArbitraryWeight = (value) => getIsArbitraryValue(value, isLabelWeight, isAny);
|
|
1932
|
+
const isArbitraryFamilyName = (value) => getIsArbitraryValue(value, isLabelFamilyName, isNever);
|
|
1933
|
+
const isArbitraryPosition = (value) => getIsArbitraryValue(value, isLabelPosition, isNever);
|
|
1934
|
+
const isArbitraryImage = (value) => getIsArbitraryValue(value, isLabelImage, isImage);
|
|
1935
|
+
const isArbitraryShadow = (value) => getIsArbitraryValue(value, isLabelShadow, isShadow);
|
|
1936
|
+
const isArbitraryVariable = (value) => arbitraryVariableRegex.test(value);
|
|
1937
|
+
const isArbitraryVariableLength = (value) => getIsArbitraryVariable(value, isLabelLength);
|
|
1938
|
+
const isArbitraryVariableFamilyName = (value) => getIsArbitraryVariable(value, isLabelFamilyName);
|
|
1939
|
+
const isArbitraryVariablePosition = (value) => getIsArbitraryVariable(value, isLabelPosition);
|
|
1940
|
+
const isArbitraryVariableSize = (value) => getIsArbitraryVariable(value, isLabelSize);
|
|
1941
|
+
const isArbitraryVariableImage = (value) => getIsArbitraryVariable(value, isLabelImage);
|
|
1942
|
+
const isArbitraryVariableShadow = (value) => getIsArbitraryVariable(value, isLabelShadow, true);
|
|
1943
|
+
const isArbitraryVariableWeight = (value) => getIsArbitraryVariable(value, isLabelWeight, true);
|
|
1944
|
+
const getIsArbitraryValue = (value, testLabel, testValue) => {
|
|
1945
|
+
const result = arbitraryValueRegex.exec(value);
|
|
1946
|
+
if (result) {
|
|
1947
|
+
if (result[1]) return testLabel(result[1]);
|
|
1948
|
+
return testValue(result[2]);
|
|
1949
|
+
}
|
|
1950
|
+
return false;
|
|
1951
|
+
};
|
|
1952
|
+
const getIsArbitraryVariable = (value, testLabel, shouldMatchNoLabel = false) => {
|
|
1953
|
+
const result = arbitraryVariableRegex.exec(value);
|
|
1954
|
+
if (result) {
|
|
1955
|
+
if (result[1]) return testLabel(result[1]);
|
|
1956
|
+
return shouldMatchNoLabel;
|
|
1957
|
+
}
|
|
1958
|
+
return false;
|
|
1959
|
+
};
|
|
1960
|
+
const isLabelPosition = (label) => label === "position" || label === "percentage";
|
|
1961
|
+
const isLabelImage = (label) => label === "image" || label === "url";
|
|
1962
|
+
const isLabelSize = (label) => label === "length" || label === "size" || label === "bg-size";
|
|
1963
|
+
const isLabelLength = (label) => label === "length";
|
|
1964
|
+
const isLabelNumber = (label) => label === "number";
|
|
1965
|
+
const isLabelFamilyName = (label) => label === "family-name";
|
|
1966
|
+
const isLabelWeight = (label) => label === "number" || label === "weight";
|
|
1967
|
+
const isLabelShadow = (label) => label === "shadow";
|
|
1968
|
+
const getDefaultConfig = () => {
|
|
1969
|
+
/**
|
|
1970
|
+
* Theme getters for theme variable namespaces
|
|
1971
|
+
* @see https://tailwindcss.com/docs/theme#theme-variable-namespaces
|
|
1972
|
+
*/
|
|
1973
|
+
const themeColor = fromTheme("color");
|
|
1974
|
+
const themeFont = fromTheme("font");
|
|
1975
|
+
const themeText = fromTheme("text");
|
|
1976
|
+
const themeFontWeight = fromTheme("font-weight");
|
|
1977
|
+
const themeTracking = fromTheme("tracking");
|
|
1978
|
+
const themeLeading = fromTheme("leading");
|
|
1979
|
+
const themeBreakpoint = fromTheme("breakpoint");
|
|
1980
|
+
const themeContainer = fromTheme("container");
|
|
1981
|
+
const themeSpacing = fromTheme("spacing");
|
|
1982
|
+
const themeRadius = fromTheme("radius");
|
|
1983
|
+
const themeShadow = fromTheme("shadow");
|
|
1984
|
+
const themeInsetShadow = fromTheme("inset-shadow");
|
|
1985
|
+
const themeTextShadow = fromTheme("text-shadow");
|
|
1986
|
+
const themeDropShadow = fromTheme("drop-shadow");
|
|
1987
|
+
const themeBlur = fromTheme("blur");
|
|
1988
|
+
const themePerspective = fromTheme("perspective");
|
|
1989
|
+
const themeAspect = fromTheme("aspect");
|
|
1990
|
+
const themeEase = fromTheme("ease");
|
|
1991
|
+
const themeAnimate = fromTheme("animate");
|
|
1992
|
+
/**
|
|
1993
|
+
* Helpers to avoid repeating the same scales
|
|
1994
|
+
*
|
|
1995
|
+
* We use functions that create a new array every time they're called instead of static arrays.
|
|
1996
|
+
* This ensures that users who modify any scale by mutating the array (e.g. with `array.push(element)`) don't accidentally mutate arrays in other parts of the config.
|
|
1997
|
+
*/
|
|
1998
|
+
const scaleBreak = () => [
|
|
1999
|
+
"auto",
|
|
2000
|
+
"avoid",
|
|
2001
|
+
"all",
|
|
2002
|
+
"avoid-page",
|
|
2003
|
+
"page",
|
|
2004
|
+
"left",
|
|
2005
|
+
"right",
|
|
2006
|
+
"column"
|
|
2007
|
+
];
|
|
2008
|
+
const scalePosition = () => [
|
|
2009
|
+
"center",
|
|
2010
|
+
"top",
|
|
2011
|
+
"bottom",
|
|
2012
|
+
"left",
|
|
2013
|
+
"right",
|
|
2014
|
+
"top-left",
|
|
2015
|
+
"left-top",
|
|
2016
|
+
"top-right",
|
|
2017
|
+
"right-top",
|
|
2018
|
+
"bottom-right",
|
|
2019
|
+
"right-bottom",
|
|
2020
|
+
"bottom-left",
|
|
2021
|
+
"left-bottom"
|
|
2022
|
+
];
|
|
2023
|
+
const scalePositionWithArbitrary = () => [
|
|
2024
|
+
...scalePosition(),
|
|
2025
|
+
isArbitraryVariable,
|
|
2026
|
+
isArbitraryValue
|
|
2027
|
+
];
|
|
2028
|
+
const scaleOverflow = () => [
|
|
2029
|
+
"auto",
|
|
2030
|
+
"hidden",
|
|
2031
|
+
"clip",
|
|
2032
|
+
"visible",
|
|
2033
|
+
"scroll"
|
|
2034
|
+
];
|
|
2035
|
+
const scaleOverscroll = () => [
|
|
2036
|
+
"auto",
|
|
2037
|
+
"contain",
|
|
2038
|
+
"none"
|
|
2039
|
+
];
|
|
2040
|
+
const scaleUnambiguousSpacing = () => [
|
|
2041
|
+
isArbitraryVariable,
|
|
2042
|
+
isArbitraryValue,
|
|
2043
|
+
themeSpacing
|
|
2044
|
+
];
|
|
2045
|
+
const scaleInset = () => [
|
|
2046
|
+
isFraction,
|
|
2047
|
+
"full",
|
|
2048
|
+
"auto",
|
|
2049
|
+
...scaleUnambiguousSpacing()
|
|
2050
|
+
];
|
|
2051
|
+
const scaleGridTemplateColsRows = () => [
|
|
2052
|
+
isInteger,
|
|
2053
|
+
"none",
|
|
2054
|
+
"subgrid",
|
|
2055
|
+
isArbitraryVariable,
|
|
2056
|
+
isArbitraryValue
|
|
2057
|
+
];
|
|
2058
|
+
const scaleGridColRowStartAndEnd = () => [
|
|
2059
|
+
"auto",
|
|
2060
|
+
{ span: [
|
|
2061
|
+
"full",
|
|
2062
|
+
isInteger,
|
|
2063
|
+
isArbitraryVariable,
|
|
2064
|
+
isArbitraryValue
|
|
2065
|
+
] },
|
|
2066
|
+
isInteger,
|
|
2067
|
+
isArbitraryVariable,
|
|
2068
|
+
isArbitraryValue
|
|
2069
|
+
];
|
|
2070
|
+
const scaleGridColRowStartOrEnd = () => [
|
|
2071
|
+
isInteger,
|
|
2072
|
+
"auto",
|
|
2073
|
+
isArbitraryVariable,
|
|
2074
|
+
isArbitraryValue
|
|
2075
|
+
];
|
|
2076
|
+
const scaleGridAutoColsRows = () => [
|
|
2077
|
+
"auto",
|
|
2078
|
+
"min",
|
|
2079
|
+
"max",
|
|
2080
|
+
"fr",
|
|
2081
|
+
isArbitraryVariable,
|
|
2082
|
+
isArbitraryValue
|
|
2083
|
+
];
|
|
2084
|
+
const scaleAlignPrimaryAxis = () => [
|
|
2085
|
+
"start",
|
|
2086
|
+
"end",
|
|
2087
|
+
"center",
|
|
2088
|
+
"between",
|
|
2089
|
+
"around",
|
|
2090
|
+
"evenly",
|
|
2091
|
+
"stretch",
|
|
2092
|
+
"baseline",
|
|
2093
|
+
"center-safe",
|
|
2094
|
+
"end-safe"
|
|
2095
|
+
];
|
|
2096
|
+
const scaleAlignSecondaryAxis = () => [
|
|
2097
|
+
"start",
|
|
2098
|
+
"end",
|
|
2099
|
+
"center",
|
|
2100
|
+
"stretch",
|
|
2101
|
+
"center-safe",
|
|
2102
|
+
"end-safe"
|
|
2103
|
+
];
|
|
2104
|
+
const scaleMargin = () => ["auto", ...scaleUnambiguousSpacing()];
|
|
2105
|
+
const scaleSizing = () => [
|
|
2106
|
+
isFraction,
|
|
2107
|
+
"auto",
|
|
2108
|
+
"full",
|
|
2109
|
+
"dvw",
|
|
2110
|
+
"dvh",
|
|
2111
|
+
"lvw",
|
|
2112
|
+
"lvh",
|
|
2113
|
+
"svw",
|
|
2114
|
+
"svh",
|
|
2115
|
+
"min",
|
|
2116
|
+
"max",
|
|
2117
|
+
"fit",
|
|
2118
|
+
...scaleUnambiguousSpacing()
|
|
2119
|
+
];
|
|
2120
|
+
const scaleSizingInline = () => [
|
|
2121
|
+
isFraction,
|
|
2122
|
+
"screen",
|
|
2123
|
+
"full",
|
|
2124
|
+
"dvw",
|
|
2125
|
+
"lvw",
|
|
2126
|
+
"svw",
|
|
2127
|
+
"min",
|
|
2128
|
+
"max",
|
|
2129
|
+
"fit",
|
|
2130
|
+
...scaleUnambiguousSpacing()
|
|
2131
|
+
];
|
|
2132
|
+
const scaleSizingBlock = () => [
|
|
2133
|
+
isFraction,
|
|
2134
|
+
"screen",
|
|
2135
|
+
"full",
|
|
2136
|
+
"lh",
|
|
2137
|
+
"dvh",
|
|
2138
|
+
"lvh",
|
|
2139
|
+
"svh",
|
|
2140
|
+
"min",
|
|
2141
|
+
"max",
|
|
2142
|
+
"fit",
|
|
2143
|
+
...scaleUnambiguousSpacing()
|
|
2144
|
+
];
|
|
2145
|
+
const scaleColor = () => [
|
|
2146
|
+
themeColor,
|
|
2147
|
+
isArbitraryVariable,
|
|
2148
|
+
isArbitraryValue
|
|
2149
|
+
];
|
|
2150
|
+
const scaleBgPosition = () => [
|
|
2151
|
+
...scalePosition(),
|
|
2152
|
+
isArbitraryVariablePosition,
|
|
2153
|
+
isArbitraryPosition,
|
|
2154
|
+
{ position: [isArbitraryVariable, isArbitraryValue] }
|
|
2155
|
+
];
|
|
2156
|
+
const scaleBgRepeat = () => ["no-repeat", { repeat: [
|
|
2157
|
+
"",
|
|
2158
|
+
"x",
|
|
2159
|
+
"y",
|
|
2160
|
+
"space",
|
|
2161
|
+
"round"
|
|
2162
|
+
] }];
|
|
2163
|
+
const scaleBgSize = () => [
|
|
2164
|
+
"auto",
|
|
2165
|
+
"cover",
|
|
2166
|
+
"contain",
|
|
2167
|
+
isArbitraryVariableSize,
|
|
2168
|
+
isArbitrarySize,
|
|
2169
|
+
{ size: [isArbitraryVariable, isArbitraryValue] }
|
|
2170
|
+
];
|
|
2171
|
+
const scaleGradientStopPosition = () => [
|
|
2172
|
+
isPercent,
|
|
2173
|
+
isArbitraryVariableLength,
|
|
2174
|
+
isArbitraryLength
|
|
2175
|
+
];
|
|
2176
|
+
const scaleRadius = () => [
|
|
2177
|
+
"",
|
|
2178
|
+
"none",
|
|
2179
|
+
"full",
|
|
2180
|
+
themeRadius,
|
|
2181
|
+
isArbitraryVariable,
|
|
2182
|
+
isArbitraryValue
|
|
2183
|
+
];
|
|
2184
|
+
const scaleBorderWidth = () => [
|
|
2185
|
+
"",
|
|
2186
|
+
isNumber,
|
|
2187
|
+
isArbitraryVariableLength,
|
|
2188
|
+
isArbitraryLength
|
|
2189
|
+
];
|
|
2190
|
+
const scaleLineStyle = () => [
|
|
2191
|
+
"solid",
|
|
2192
|
+
"dashed",
|
|
2193
|
+
"dotted",
|
|
2194
|
+
"double"
|
|
2195
|
+
];
|
|
2196
|
+
const scaleBlendMode = () => [
|
|
2197
|
+
"normal",
|
|
2198
|
+
"multiply",
|
|
2199
|
+
"screen",
|
|
2200
|
+
"overlay",
|
|
2201
|
+
"darken",
|
|
2202
|
+
"lighten",
|
|
2203
|
+
"color-dodge",
|
|
2204
|
+
"color-burn",
|
|
2205
|
+
"hard-light",
|
|
2206
|
+
"soft-light",
|
|
2207
|
+
"difference",
|
|
2208
|
+
"exclusion",
|
|
2209
|
+
"hue",
|
|
2210
|
+
"saturation",
|
|
2211
|
+
"color",
|
|
2212
|
+
"luminosity"
|
|
2213
|
+
];
|
|
2214
|
+
const scaleMaskImagePosition = () => [
|
|
2215
|
+
isNumber,
|
|
2216
|
+
isPercent,
|
|
2217
|
+
isArbitraryVariablePosition,
|
|
2218
|
+
isArbitraryPosition
|
|
2219
|
+
];
|
|
2220
|
+
const scaleBlur = () => [
|
|
2221
|
+
"",
|
|
2222
|
+
"none",
|
|
2223
|
+
themeBlur,
|
|
2224
|
+
isArbitraryVariable,
|
|
2225
|
+
isArbitraryValue
|
|
2226
|
+
];
|
|
2227
|
+
const scaleRotate = () => [
|
|
2228
|
+
"none",
|
|
2229
|
+
isNumber,
|
|
2230
|
+
isArbitraryVariable,
|
|
2231
|
+
isArbitraryValue
|
|
2232
|
+
];
|
|
2233
|
+
const scaleScale = () => [
|
|
2234
|
+
"none",
|
|
2235
|
+
isNumber,
|
|
2236
|
+
isArbitraryVariable,
|
|
2237
|
+
isArbitraryValue
|
|
2238
|
+
];
|
|
2239
|
+
const scaleSkew = () => [
|
|
2240
|
+
isNumber,
|
|
2241
|
+
isArbitraryVariable,
|
|
2242
|
+
isArbitraryValue
|
|
2243
|
+
];
|
|
2244
|
+
const scaleTranslate = () => [
|
|
2245
|
+
isFraction,
|
|
2246
|
+
"full",
|
|
2247
|
+
...scaleUnambiguousSpacing()
|
|
2248
|
+
];
|
|
2249
|
+
return {
|
|
2250
|
+
cacheSize: 500,
|
|
2251
|
+
theme: {
|
|
2252
|
+
animate: [
|
|
2253
|
+
"spin",
|
|
2254
|
+
"ping",
|
|
2255
|
+
"pulse",
|
|
2256
|
+
"bounce"
|
|
2257
|
+
],
|
|
2258
|
+
aspect: ["video"],
|
|
2259
|
+
blur: [isTshirtSize],
|
|
2260
|
+
breakpoint: [isTshirtSize],
|
|
2261
|
+
color: [isAny],
|
|
2262
|
+
container: [isTshirtSize],
|
|
2263
|
+
"drop-shadow": [isTshirtSize],
|
|
2264
|
+
ease: [
|
|
2265
|
+
"in",
|
|
2266
|
+
"out",
|
|
2267
|
+
"in-out"
|
|
2268
|
+
],
|
|
2269
|
+
font: [isAnyNonArbitrary],
|
|
2270
|
+
"font-weight": [
|
|
2271
|
+
"thin",
|
|
2272
|
+
"extralight",
|
|
2273
|
+
"light",
|
|
2274
|
+
"normal",
|
|
2275
|
+
"medium",
|
|
2276
|
+
"semibold",
|
|
2277
|
+
"bold",
|
|
2278
|
+
"extrabold",
|
|
2279
|
+
"black"
|
|
2280
|
+
],
|
|
2281
|
+
"inset-shadow": [isTshirtSize],
|
|
2282
|
+
leading: [
|
|
2283
|
+
"none",
|
|
2284
|
+
"tight",
|
|
2285
|
+
"snug",
|
|
2286
|
+
"normal",
|
|
2287
|
+
"relaxed",
|
|
2288
|
+
"loose"
|
|
2289
|
+
],
|
|
2290
|
+
perspective: [
|
|
2291
|
+
"dramatic",
|
|
2292
|
+
"near",
|
|
2293
|
+
"normal",
|
|
2294
|
+
"midrange",
|
|
2295
|
+
"distant",
|
|
2296
|
+
"none"
|
|
2297
|
+
],
|
|
2298
|
+
radius: [isTshirtSize],
|
|
2299
|
+
shadow: [isTshirtSize],
|
|
2300
|
+
spacing: ["px", isNumber],
|
|
2301
|
+
text: [isTshirtSize],
|
|
2302
|
+
"text-shadow": [isTshirtSize],
|
|
2303
|
+
tracking: [
|
|
2304
|
+
"tighter",
|
|
2305
|
+
"tight",
|
|
2306
|
+
"normal",
|
|
2307
|
+
"wide",
|
|
2308
|
+
"wider",
|
|
2309
|
+
"widest"
|
|
2310
|
+
]
|
|
2311
|
+
},
|
|
2312
|
+
classGroups: {
|
|
2313
|
+
/**
|
|
2314
|
+
* Aspect Ratio
|
|
2315
|
+
* @see https://tailwindcss.com/docs/aspect-ratio
|
|
2316
|
+
*/
|
|
2317
|
+
aspect: [{ aspect: [
|
|
2318
|
+
"auto",
|
|
2319
|
+
"square",
|
|
2320
|
+
isFraction,
|
|
2321
|
+
isArbitraryValue,
|
|
2322
|
+
isArbitraryVariable,
|
|
2323
|
+
themeAspect
|
|
2324
|
+
] }],
|
|
2325
|
+
/**
|
|
2326
|
+
* Container
|
|
2327
|
+
* @see https://tailwindcss.com/docs/container
|
|
2328
|
+
* @deprecated since Tailwind CSS v4.0.0
|
|
2329
|
+
*/
|
|
2330
|
+
container: ["container"],
|
|
2331
|
+
/**
|
|
2332
|
+
* Container Type
|
|
2333
|
+
* @see https://tailwindcss.com/docs/responsive-design#container-queries
|
|
2334
|
+
*/
|
|
2335
|
+
"container-type": [{ "@container": [
|
|
2336
|
+
"",
|
|
2337
|
+
"normal",
|
|
2338
|
+
"size",
|
|
2339
|
+
isArbitraryVariable,
|
|
2340
|
+
isArbitraryValue
|
|
2341
|
+
] }],
|
|
2342
|
+
/**
|
|
2343
|
+
* Container Name
|
|
2344
|
+
* @see https://tailwindcss.com/docs/responsive-design#named-containers
|
|
2345
|
+
*/
|
|
2346
|
+
"container-named": [isNamedContainerQuery],
|
|
2347
|
+
/**
|
|
2348
|
+
* Columns
|
|
2349
|
+
* @see https://tailwindcss.com/docs/columns
|
|
2350
|
+
*/
|
|
2351
|
+
columns: [{ columns: [
|
|
2352
|
+
isNumber,
|
|
2353
|
+
isArbitraryValue,
|
|
2354
|
+
isArbitraryVariable,
|
|
2355
|
+
themeContainer
|
|
2356
|
+
] }],
|
|
2357
|
+
/**
|
|
2358
|
+
* Break After
|
|
2359
|
+
* @see https://tailwindcss.com/docs/break-after
|
|
2360
|
+
*/
|
|
2361
|
+
"break-after": [{ "break-after": scaleBreak() }],
|
|
2362
|
+
/**
|
|
2363
|
+
* Break Before
|
|
2364
|
+
* @see https://tailwindcss.com/docs/break-before
|
|
2365
|
+
*/
|
|
2366
|
+
"break-before": [{ "break-before": scaleBreak() }],
|
|
2367
|
+
/**
|
|
2368
|
+
* Break Inside
|
|
2369
|
+
* @see https://tailwindcss.com/docs/break-inside
|
|
2370
|
+
*/
|
|
2371
|
+
"break-inside": [{ "break-inside": [
|
|
2372
|
+
"auto",
|
|
2373
|
+
"avoid",
|
|
2374
|
+
"avoid-page",
|
|
2375
|
+
"avoid-column"
|
|
2376
|
+
] }],
|
|
2377
|
+
/**
|
|
2378
|
+
* Box Decoration Break
|
|
2379
|
+
* @see https://tailwindcss.com/docs/box-decoration-break
|
|
2380
|
+
*/
|
|
2381
|
+
"box-decoration": [{ "box-decoration": ["slice", "clone"] }],
|
|
2382
|
+
/**
|
|
2383
|
+
* Box Sizing
|
|
2384
|
+
* @see https://tailwindcss.com/docs/box-sizing
|
|
2385
|
+
*/
|
|
2386
|
+
box: [{ box: ["border", "content"] }],
|
|
2387
|
+
/**
|
|
2388
|
+
* Display
|
|
2389
|
+
* @see https://tailwindcss.com/docs/display
|
|
2390
|
+
*/
|
|
2391
|
+
display: [
|
|
2392
|
+
"block",
|
|
2393
|
+
"inline-block",
|
|
2394
|
+
"inline",
|
|
2395
|
+
"flex",
|
|
2396
|
+
"inline-flex",
|
|
2397
|
+
"table",
|
|
2398
|
+
"inline-table",
|
|
2399
|
+
"table-caption",
|
|
2400
|
+
"table-cell",
|
|
2401
|
+
"table-column",
|
|
2402
|
+
"table-column-group",
|
|
2403
|
+
"table-footer-group",
|
|
2404
|
+
"table-header-group",
|
|
2405
|
+
"table-row-group",
|
|
2406
|
+
"table-row",
|
|
2407
|
+
"flow-root",
|
|
2408
|
+
"grid",
|
|
2409
|
+
"inline-grid",
|
|
2410
|
+
"contents",
|
|
2411
|
+
"list-item",
|
|
2412
|
+
"hidden"
|
|
2413
|
+
],
|
|
2414
|
+
/**
|
|
2415
|
+
* Screen Reader Only
|
|
2416
|
+
* @see https://tailwindcss.com/docs/display#screen-reader-only
|
|
2417
|
+
*/
|
|
2418
|
+
sr: ["sr-only", "not-sr-only"],
|
|
2419
|
+
/**
|
|
2420
|
+
* Floats
|
|
2421
|
+
* @see https://tailwindcss.com/docs/float
|
|
2422
|
+
*/
|
|
2423
|
+
float: [{ float: [
|
|
2424
|
+
"right",
|
|
2425
|
+
"left",
|
|
2426
|
+
"none",
|
|
2427
|
+
"start",
|
|
2428
|
+
"end"
|
|
2429
|
+
] }],
|
|
2430
|
+
/**
|
|
2431
|
+
* Clear
|
|
2432
|
+
* @see https://tailwindcss.com/docs/clear
|
|
2433
|
+
*/
|
|
2434
|
+
clear: [{ clear: [
|
|
2435
|
+
"left",
|
|
2436
|
+
"right",
|
|
2437
|
+
"both",
|
|
2438
|
+
"none",
|
|
2439
|
+
"start",
|
|
2440
|
+
"end"
|
|
2441
|
+
] }],
|
|
2442
|
+
/**
|
|
2443
|
+
* Isolation
|
|
2444
|
+
* @see https://tailwindcss.com/docs/isolation
|
|
2445
|
+
*/
|
|
2446
|
+
isolation: ["isolate", "isolation-auto"],
|
|
2447
|
+
/**
|
|
2448
|
+
* Object Fit
|
|
2449
|
+
* @see https://tailwindcss.com/docs/object-fit
|
|
2450
|
+
*/
|
|
2451
|
+
"object-fit": [{ object: [
|
|
2452
|
+
"contain",
|
|
2453
|
+
"cover",
|
|
2454
|
+
"fill",
|
|
2455
|
+
"none",
|
|
2456
|
+
"scale-down"
|
|
2457
|
+
] }],
|
|
2458
|
+
/**
|
|
2459
|
+
* Object Position
|
|
2460
|
+
* @see https://tailwindcss.com/docs/object-position
|
|
2461
|
+
*/
|
|
2462
|
+
"object-position": [{ object: scalePositionWithArbitrary() }],
|
|
2463
|
+
/**
|
|
2464
|
+
* Overflow
|
|
2465
|
+
* @see https://tailwindcss.com/docs/overflow
|
|
2466
|
+
*/
|
|
2467
|
+
overflow: [{ overflow: scaleOverflow() }],
|
|
2468
|
+
/**
|
|
2469
|
+
* Overflow X
|
|
2470
|
+
* @see https://tailwindcss.com/docs/overflow
|
|
2471
|
+
*/
|
|
2472
|
+
"overflow-x": [{ "overflow-x": scaleOverflow() }],
|
|
2473
|
+
/**
|
|
2474
|
+
* Overflow Y
|
|
2475
|
+
* @see https://tailwindcss.com/docs/overflow
|
|
2476
|
+
*/
|
|
2477
|
+
"overflow-y": [{ "overflow-y": scaleOverflow() }],
|
|
2478
|
+
/**
|
|
2479
|
+
* Overscroll Behavior
|
|
2480
|
+
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
2481
|
+
*/
|
|
2482
|
+
overscroll: [{ overscroll: scaleOverscroll() }],
|
|
2483
|
+
/**
|
|
2484
|
+
* Overscroll Behavior X
|
|
2485
|
+
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
2486
|
+
*/
|
|
2487
|
+
"overscroll-x": [{ "overscroll-x": scaleOverscroll() }],
|
|
2488
|
+
/**
|
|
2489
|
+
* Overscroll Behavior Y
|
|
2490
|
+
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
2491
|
+
*/
|
|
2492
|
+
"overscroll-y": [{ "overscroll-y": scaleOverscroll() }],
|
|
2493
|
+
/**
|
|
2494
|
+
* Position
|
|
2495
|
+
* @see https://tailwindcss.com/docs/position
|
|
2496
|
+
*/
|
|
2497
|
+
position: [
|
|
2498
|
+
"static",
|
|
2499
|
+
"fixed",
|
|
2500
|
+
"absolute",
|
|
2501
|
+
"relative",
|
|
2502
|
+
"sticky"
|
|
2503
|
+
],
|
|
2504
|
+
/**
|
|
2505
|
+
* Inset
|
|
2506
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2507
|
+
*/
|
|
2508
|
+
inset: [{ inset: scaleInset() }],
|
|
2509
|
+
/**
|
|
2510
|
+
* Inset Inline
|
|
2511
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2512
|
+
*/
|
|
2513
|
+
"inset-x": [{ "inset-x": scaleInset() }],
|
|
2514
|
+
/**
|
|
2515
|
+
* Inset Block
|
|
2516
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2517
|
+
*/
|
|
2518
|
+
"inset-y": [{ "inset-y": scaleInset() }],
|
|
2519
|
+
/**
|
|
2520
|
+
* Inset Inline Start
|
|
2521
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2522
|
+
* @todo class group will be renamed to `inset-s` in next major release
|
|
2523
|
+
*/
|
|
2524
|
+
start: [{
|
|
2525
|
+
"inset-s": scaleInset(),
|
|
2526
|
+
/**
|
|
2527
|
+
* @deprecated since Tailwind CSS v4.2.0 in favor of `inset-s-*` utilities.
|
|
2528
|
+
* @see https://github.com/tailwindlabs/tailwindcss/pull/19613
|
|
2529
|
+
*/
|
|
2530
|
+
start: scaleInset()
|
|
2531
|
+
}],
|
|
2532
|
+
/**
|
|
2533
|
+
* Inset Inline End
|
|
2534
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2535
|
+
* @todo class group will be renamed to `inset-e` in next major release
|
|
2536
|
+
*/
|
|
2537
|
+
end: [{
|
|
2538
|
+
"inset-e": scaleInset(),
|
|
2539
|
+
/**
|
|
2540
|
+
* @deprecated since Tailwind CSS v4.2.0 in favor of `inset-e-*` utilities.
|
|
2541
|
+
* @see https://github.com/tailwindlabs/tailwindcss/pull/19613
|
|
2542
|
+
*/
|
|
2543
|
+
end: scaleInset()
|
|
2544
|
+
}],
|
|
2545
|
+
/**
|
|
2546
|
+
* Inset Block Start
|
|
2547
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2548
|
+
*/
|
|
2549
|
+
"inset-bs": [{ "inset-bs": scaleInset() }],
|
|
2550
|
+
/**
|
|
2551
|
+
* Inset Block End
|
|
2552
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2553
|
+
*/
|
|
2554
|
+
"inset-be": [{ "inset-be": scaleInset() }],
|
|
2555
|
+
/**
|
|
2556
|
+
* Top
|
|
2557
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2558
|
+
*/
|
|
2559
|
+
top: [{ top: scaleInset() }],
|
|
2560
|
+
/**
|
|
2561
|
+
* Right
|
|
2562
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2563
|
+
*/
|
|
2564
|
+
right: [{ right: scaleInset() }],
|
|
2565
|
+
/**
|
|
2566
|
+
* Bottom
|
|
2567
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2568
|
+
*/
|
|
2569
|
+
bottom: [{ bottom: scaleInset() }],
|
|
2570
|
+
/**
|
|
2571
|
+
* Left
|
|
2572
|
+
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
2573
|
+
*/
|
|
2574
|
+
left: [{ left: scaleInset() }],
|
|
2575
|
+
/**
|
|
2576
|
+
* Visibility
|
|
2577
|
+
* @see https://tailwindcss.com/docs/visibility
|
|
2578
|
+
*/
|
|
2579
|
+
visibility: [
|
|
2580
|
+
"visible",
|
|
2581
|
+
"invisible",
|
|
2582
|
+
"collapse"
|
|
2583
|
+
],
|
|
2584
|
+
/**
|
|
2585
|
+
* Z-Index
|
|
2586
|
+
* @see https://tailwindcss.com/docs/z-index
|
|
2587
|
+
*/
|
|
2588
|
+
z: [{ z: [
|
|
2589
|
+
isInteger,
|
|
2590
|
+
"auto",
|
|
2591
|
+
isArbitraryVariable,
|
|
2592
|
+
isArbitraryValue
|
|
2593
|
+
] }],
|
|
2594
|
+
/**
|
|
2595
|
+
* Flex Basis
|
|
2596
|
+
* @see https://tailwindcss.com/docs/flex-basis
|
|
2597
|
+
*/
|
|
2598
|
+
basis: [{ basis: [
|
|
2599
|
+
isFraction,
|
|
2600
|
+
"full",
|
|
2601
|
+
"auto",
|
|
2602
|
+
themeContainer,
|
|
2603
|
+
...scaleUnambiguousSpacing()
|
|
2604
|
+
] }],
|
|
2605
|
+
/**
|
|
2606
|
+
* Flex Direction
|
|
2607
|
+
* @see https://tailwindcss.com/docs/flex-direction
|
|
2608
|
+
*/
|
|
2609
|
+
"flex-direction": [{ flex: [
|
|
2610
|
+
"row",
|
|
2611
|
+
"row-reverse",
|
|
2612
|
+
"col",
|
|
2613
|
+
"col-reverse"
|
|
2614
|
+
] }],
|
|
2615
|
+
/**
|
|
2616
|
+
* Flex Wrap
|
|
2617
|
+
* @see https://tailwindcss.com/docs/flex-wrap
|
|
2618
|
+
*/
|
|
2619
|
+
"flex-wrap": [{ flex: [
|
|
2620
|
+
"nowrap",
|
|
2621
|
+
"wrap",
|
|
2622
|
+
"wrap-reverse"
|
|
2623
|
+
] }],
|
|
2624
|
+
/**
|
|
2625
|
+
* Flex
|
|
2626
|
+
* @see https://tailwindcss.com/docs/flex
|
|
2627
|
+
*/
|
|
2628
|
+
flex: [{ flex: [
|
|
2629
|
+
isNumber,
|
|
2630
|
+
isFraction,
|
|
2631
|
+
"auto",
|
|
2632
|
+
"initial",
|
|
2633
|
+
"none",
|
|
2634
|
+
isArbitraryValue
|
|
2635
|
+
] }],
|
|
2636
|
+
/**
|
|
2637
|
+
* Flex Grow
|
|
2638
|
+
* @see https://tailwindcss.com/docs/flex-grow
|
|
2639
|
+
*/
|
|
2640
|
+
grow: [{ grow: [
|
|
2641
|
+
"",
|
|
2642
|
+
isNumber,
|
|
2643
|
+
isArbitraryVariable,
|
|
2644
|
+
isArbitraryValue
|
|
2645
|
+
] }],
|
|
2646
|
+
/**
|
|
2647
|
+
* Flex Shrink
|
|
2648
|
+
* @see https://tailwindcss.com/docs/flex-shrink
|
|
2649
|
+
*/
|
|
2650
|
+
shrink: [{ shrink: [
|
|
2651
|
+
"",
|
|
2652
|
+
isNumber,
|
|
2653
|
+
isArbitraryVariable,
|
|
2654
|
+
isArbitraryValue
|
|
2655
|
+
] }],
|
|
2656
|
+
/**
|
|
2657
|
+
* Order
|
|
2658
|
+
* @see https://tailwindcss.com/docs/order
|
|
2659
|
+
*/
|
|
2660
|
+
order: [{ order: [
|
|
2661
|
+
isInteger,
|
|
2662
|
+
"first",
|
|
2663
|
+
"last",
|
|
2664
|
+
"none",
|
|
2665
|
+
isArbitraryVariable,
|
|
2666
|
+
isArbitraryValue
|
|
2667
|
+
] }],
|
|
2668
|
+
/**
|
|
2669
|
+
* Grid Template Columns
|
|
2670
|
+
* @see https://tailwindcss.com/docs/grid-template-columns
|
|
2671
|
+
*/
|
|
2672
|
+
"grid-cols": [{ "grid-cols": scaleGridTemplateColsRows() }],
|
|
2673
|
+
/**
|
|
2674
|
+
* Grid Column Start / End
|
|
2675
|
+
* @see https://tailwindcss.com/docs/grid-column
|
|
2676
|
+
*/
|
|
2677
|
+
"col-start-end": [{ col: scaleGridColRowStartAndEnd() }],
|
|
2678
|
+
/**
|
|
2679
|
+
* Grid Column Start
|
|
2680
|
+
* @see https://tailwindcss.com/docs/grid-column
|
|
2681
|
+
*/
|
|
2682
|
+
"col-start": [{ "col-start": scaleGridColRowStartOrEnd() }],
|
|
2683
|
+
/**
|
|
2684
|
+
* Grid Column End
|
|
2685
|
+
* @see https://tailwindcss.com/docs/grid-column
|
|
2686
|
+
*/
|
|
2687
|
+
"col-end": [{ "col-end": scaleGridColRowStartOrEnd() }],
|
|
2688
|
+
/**
|
|
2689
|
+
* Grid Template Rows
|
|
2690
|
+
* @see https://tailwindcss.com/docs/grid-template-rows
|
|
2691
|
+
*/
|
|
2692
|
+
"grid-rows": [{ "grid-rows": scaleGridTemplateColsRows() }],
|
|
2693
|
+
/**
|
|
2694
|
+
* Grid Row Start / End
|
|
2695
|
+
* @see https://tailwindcss.com/docs/grid-row
|
|
2696
|
+
*/
|
|
2697
|
+
"row-start-end": [{ row: scaleGridColRowStartAndEnd() }],
|
|
2698
|
+
/**
|
|
2699
|
+
* Grid Row Start
|
|
2700
|
+
* @see https://tailwindcss.com/docs/grid-row
|
|
2701
|
+
*/
|
|
2702
|
+
"row-start": [{ "row-start": scaleGridColRowStartOrEnd() }],
|
|
2703
|
+
/**
|
|
2704
|
+
* Grid Row End
|
|
2705
|
+
* @see https://tailwindcss.com/docs/grid-row
|
|
2706
|
+
*/
|
|
2707
|
+
"row-end": [{ "row-end": scaleGridColRowStartOrEnd() }],
|
|
2708
|
+
/**
|
|
2709
|
+
* Grid Auto Flow
|
|
2710
|
+
* @see https://tailwindcss.com/docs/grid-auto-flow
|
|
2711
|
+
*/
|
|
2712
|
+
"grid-flow": [{ "grid-flow": [
|
|
2713
|
+
"row",
|
|
2714
|
+
"col",
|
|
2715
|
+
"dense",
|
|
2716
|
+
"row-dense",
|
|
2717
|
+
"col-dense"
|
|
2718
|
+
] }],
|
|
2719
|
+
/**
|
|
2720
|
+
* Grid Auto Columns
|
|
2721
|
+
* @see https://tailwindcss.com/docs/grid-auto-columns
|
|
2722
|
+
*/
|
|
2723
|
+
"auto-cols": [{ "auto-cols": scaleGridAutoColsRows() }],
|
|
2724
|
+
/**
|
|
2725
|
+
* Grid Auto Rows
|
|
2726
|
+
* @see https://tailwindcss.com/docs/grid-auto-rows
|
|
2727
|
+
*/
|
|
2728
|
+
"auto-rows": [{ "auto-rows": scaleGridAutoColsRows() }],
|
|
2729
|
+
/**
|
|
2730
|
+
* Gap
|
|
2731
|
+
* @see https://tailwindcss.com/docs/gap
|
|
2732
|
+
*/
|
|
2733
|
+
gap: [{ gap: scaleUnambiguousSpacing() }],
|
|
2734
|
+
/**
|
|
2735
|
+
* Gap X
|
|
2736
|
+
* @see https://tailwindcss.com/docs/gap
|
|
2737
|
+
*/
|
|
2738
|
+
"gap-x": [{ "gap-x": scaleUnambiguousSpacing() }],
|
|
2739
|
+
/**
|
|
2740
|
+
* Gap Y
|
|
2741
|
+
* @see https://tailwindcss.com/docs/gap
|
|
2742
|
+
*/
|
|
2743
|
+
"gap-y": [{ "gap-y": scaleUnambiguousSpacing() }],
|
|
2744
|
+
/**
|
|
2745
|
+
* Justify Content
|
|
2746
|
+
* @see https://tailwindcss.com/docs/justify-content
|
|
2747
|
+
*/
|
|
2748
|
+
"justify-content": [{ justify: [...scaleAlignPrimaryAxis(), "normal"] }],
|
|
2749
|
+
/**
|
|
2750
|
+
* Justify Items
|
|
2751
|
+
* @see https://tailwindcss.com/docs/justify-items
|
|
2752
|
+
*/
|
|
2753
|
+
"justify-items": [{ "justify-items": [...scaleAlignSecondaryAxis(), "normal"] }],
|
|
2754
|
+
/**
|
|
2755
|
+
* Justify Self
|
|
2756
|
+
* @see https://tailwindcss.com/docs/justify-self
|
|
2757
|
+
*/
|
|
2758
|
+
"justify-self": [{ "justify-self": ["auto", ...scaleAlignSecondaryAxis()] }],
|
|
2759
|
+
/**
|
|
2760
|
+
* Align Content
|
|
2761
|
+
* @see https://tailwindcss.com/docs/align-content
|
|
2762
|
+
*/
|
|
2763
|
+
"align-content": [{ content: ["normal", ...scaleAlignPrimaryAxis()] }],
|
|
2764
|
+
/**
|
|
2765
|
+
* Align Items
|
|
2766
|
+
* @see https://tailwindcss.com/docs/align-items
|
|
2767
|
+
*/
|
|
2768
|
+
"align-items": [{ items: [...scaleAlignSecondaryAxis(), { baseline: ["", "last"] }] }],
|
|
2769
|
+
/**
|
|
2770
|
+
* Align Self
|
|
2771
|
+
* @see https://tailwindcss.com/docs/align-self
|
|
2772
|
+
*/
|
|
2773
|
+
"align-self": [{ self: [
|
|
2774
|
+
"auto",
|
|
2775
|
+
...scaleAlignSecondaryAxis(),
|
|
2776
|
+
{ baseline: ["", "last"] }
|
|
2777
|
+
] }],
|
|
2778
|
+
/**
|
|
2779
|
+
* Place Content
|
|
2780
|
+
* @see https://tailwindcss.com/docs/place-content
|
|
2781
|
+
*/
|
|
2782
|
+
"place-content": [{ "place-content": scaleAlignPrimaryAxis() }],
|
|
2783
|
+
/**
|
|
2784
|
+
* Place Items
|
|
2785
|
+
* @see https://tailwindcss.com/docs/place-items
|
|
2786
|
+
*/
|
|
2787
|
+
"place-items": [{ "place-items": [...scaleAlignSecondaryAxis(), "baseline"] }],
|
|
2788
|
+
/**
|
|
2789
|
+
* Place Self
|
|
2790
|
+
* @see https://tailwindcss.com/docs/place-self
|
|
2791
|
+
*/
|
|
2792
|
+
"place-self": [{ "place-self": ["auto", ...scaleAlignSecondaryAxis()] }],
|
|
2793
|
+
/**
|
|
2794
|
+
* Padding
|
|
2795
|
+
* @see https://tailwindcss.com/docs/padding
|
|
2796
|
+
*/
|
|
2797
|
+
p: [{ p: scaleUnambiguousSpacing() }],
|
|
2798
|
+
/**
|
|
2799
|
+
* Padding Inline
|
|
2800
|
+
* @see https://tailwindcss.com/docs/padding
|
|
2801
|
+
*/
|
|
2802
|
+
px: [{ px: scaleUnambiguousSpacing() }],
|
|
2803
|
+
/**
|
|
2804
|
+
* Padding Block
|
|
2805
|
+
* @see https://tailwindcss.com/docs/padding
|
|
2806
|
+
*/
|
|
2807
|
+
py: [{ py: scaleUnambiguousSpacing() }],
|
|
2808
|
+
/**
|
|
2809
|
+
* Padding Inline Start
|
|
2810
|
+
* @see https://tailwindcss.com/docs/padding
|
|
2811
|
+
*/
|
|
2812
|
+
ps: [{ ps: scaleUnambiguousSpacing() }],
|
|
2813
|
+
/**
|
|
2814
|
+
* Padding Inline End
|
|
2815
|
+
* @see https://tailwindcss.com/docs/padding
|
|
2816
|
+
*/
|
|
2817
|
+
pe: [{ pe: scaleUnambiguousSpacing() }],
|
|
2818
|
+
/**
|
|
2819
|
+
* Padding Block Start
|
|
2820
|
+
* @see https://tailwindcss.com/docs/padding
|
|
2821
|
+
*/
|
|
2822
|
+
pbs: [{ pbs: scaleUnambiguousSpacing() }],
|
|
2823
|
+
/**
|
|
2824
|
+
* Padding Block End
|
|
2825
|
+
* @see https://tailwindcss.com/docs/padding
|
|
2826
|
+
*/
|
|
2827
|
+
pbe: [{ pbe: scaleUnambiguousSpacing() }],
|
|
2828
|
+
/**
|
|
2829
|
+
* Padding Top
|
|
2830
|
+
* @see https://tailwindcss.com/docs/padding
|
|
2831
|
+
*/
|
|
2832
|
+
pt: [{ pt: scaleUnambiguousSpacing() }],
|
|
2833
|
+
/**
|
|
2834
|
+
* Padding Right
|
|
2835
|
+
* @see https://tailwindcss.com/docs/padding
|
|
2836
|
+
*/
|
|
2837
|
+
pr: [{ pr: scaleUnambiguousSpacing() }],
|
|
2838
|
+
/**
|
|
2839
|
+
* Padding Bottom
|
|
2840
|
+
* @see https://tailwindcss.com/docs/padding
|
|
2841
|
+
*/
|
|
2842
|
+
pb: [{ pb: scaleUnambiguousSpacing() }],
|
|
2843
|
+
/**
|
|
2844
|
+
* Padding Left
|
|
2845
|
+
* @see https://tailwindcss.com/docs/padding
|
|
2846
|
+
*/
|
|
2847
|
+
pl: [{ pl: scaleUnambiguousSpacing() }],
|
|
2848
|
+
/**
|
|
2849
|
+
* Margin
|
|
2850
|
+
* @see https://tailwindcss.com/docs/margin
|
|
2851
|
+
*/
|
|
2852
|
+
m: [{ m: scaleMargin() }],
|
|
2853
|
+
/**
|
|
2854
|
+
* Margin Inline
|
|
2855
|
+
* @see https://tailwindcss.com/docs/margin
|
|
2856
|
+
*/
|
|
2857
|
+
mx: [{ mx: scaleMargin() }],
|
|
2858
|
+
/**
|
|
2859
|
+
* Margin Block
|
|
2860
|
+
* @see https://tailwindcss.com/docs/margin
|
|
2861
|
+
*/
|
|
2862
|
+
my: [{ my: scaleMargin() }],
|
|
2863
|
+
/**
|
|
2864
|
+
* Margin Inline Start
|
|
2865
|
+
* @see https://tailwindcss.com/docs/margin
|
|
2866
|
+
*/
|
|
2867
|
+
ms: [{ ms: scaleMargin() }],
|
|
2868
|
+
/**
|
|
2869
|
+
* Margin Inline End
|
|
2870
|
+
* @see https://tailwindcss.com/docs/margin
|
|
2871
|
+
*/
|
|
2872
|
+
me: [{ me: scaleMargin() }],
|
|
2873
|
+
/**
|
|
2874
|
+
* Margin Block Start
|
|
2875
|
+
* @see https://tailwindcss.com/docs/margin
|
|
2876
|
+
*/
|
|
2877
|
+
mbs: [{ mbs: scaleMargin() }],
|
|
2878
|
+
/**
|
|
2879
|
+
* Margin Block End
|
|
2880
|
+
* @see https://tailwindcss.com/docs/margin
|
|
2881
|
+
*/
|
|
2882
|
+
mbe: [{ mbe: scaleMargin() }],
|
|
2883
|
+
/**
|
|
2884
|
+
* Margin Top
|
|
2885
|
+
* @see https://tailwindcss.com/docs/margin
|
|
2886
|
+
*/
|
|
2887
|
+
mt: [{ mt: scaleMargin() }],
|
|
2888
|
+
/**
|
|
2889
|
+
* Margin Right
|
|
2890
|
+
* @see https://tailwindcss.com/docs/margin
|
|
2891
|
+
*/
|
|
2892
|
+
mr: [{ mr: scaleMargin() }],
|
|
2893
|
+
/**
|
|
2894
|
+
* Margin Bottom
|
|
2895
|
+
* @see https://tailwindcss.com/docs/margin
|
|
2896
|
+
*/
|
|
2897
|
+
mb: [{ mb: scaleMargin() }],
|
|
2898
|
+
/**
|
|
2899
|
+
* Margin Left
|
|
2900
|
+
* @see https://tailwindcss.com/docs/margin
|
|
2901
|
+
*/
|
|
2902
|
+
ml: [{ ml: scaleMargin() }],
|
|
2903
|
+
/**
|
|
2904
|
+
* Space Between X
|
|
2905
|
+
* @see https://tailwindcss.com/docs/margin#adding-space-between-children
|
|
2906
|
+
*/
|
|
2907
|
+
"space-x": [{ "space-x": scaleUnambiguousSpacing() }],
|
|
2908
|
+
/**
|
|
2909
|
+
* Space Between X Reverse
|
|
2910
|
+
* @see https://tailwindcss.com/docs/margin#adding-space-between-children
|
|
2911
|
+
*/
|
|
2912
|
+
"space-x-reverse": ["space-x-reverse"],
|
|
2913
|
+
/**
|
|
2914
|
+
* Space Between Y
|
|
2915
|
+
* @see https://tailwindcss.com/docs/margin#adding-space-between-children
|
|
2916
|
+
*/
|
|
2917
|
+
"space-y": [{ "space-y": scaleUnambiguousSpacing() }],
|
|
2918
|
+
/**
|
|
2919
|
+
* Space Between Y Reverse
|
|
2920
|
+
* @see https://tailwindcss.com/docs/margin#adding-space-between-children
|
|
2921
|
+
*/
|
|
2922
|
+
"space-y-reverse": ["space-y-reverse"],
|
|
2923
|
+
/**
|
|
2924
|
+
* Size
|
|
2925
|
+
* @see https://tailwindcss.com/docs/width#setting-both-width-and-height
|
|
2926
|
+
*/
|
|
2927
|
+
size: [{ size: scaleSizing() }],
|
|
2928
|
+
/**
|
|
2929
|
+
* Inline Size
|
|
2930
|
+
* @see https://tailwindcss.com/docs/width
|
|
2931
|
+
*/
|
|
2932
|
+
"inline-size": [{ inline: ["auto", ...scaleSizingInline()] }],
|
|
2933
|
+
/**
|
|
2934
|
+
* Min-Inline Size
|
|
2935
|
+
* @see https://tailwindcss.com/docs/min-width
|
|
2936
|
+
*/
|
|
2937
|
+
"min-inline-size": [{ "min-inline": ["auto", ...scaleSizingInline()] }],
|
|
2938
|
+
/**
|
|
2939
|
+
* Max-Inline Size
|
|
2940
|
+
* @see https://tailwindcss.com/docs/max-width
|
|
2941
|
+
*/
|
|
2942
|
+
"max-inline-size": [{ "max-inline": ["none", ...scaleSizingInline()] }],
|
|
2943
|
+
/**
|
|
2944
|
+
* Block Size
|
|
2945
|
+
* @see https://tailwindcss.com/docs/height
|
|
2946
|
+
*/
|
|
2947
|
+
"block-size": [{ block: ["auto", ...scaleSizingBlock()] }],
|
|
2948
|
+
/**
|
|
2949
|
+
* Min-Block Size
|
|
2950
|
+
* @see https://tailwindcss.com/docs/min-height
|
|
2951
|
+
*/
|
|
2952
|
+
"min-block-size": [{ "min-block": ["auto", ...scaleSizingBlock()] }],
|
|
2953
|
+
/**
|
|
2954
|
+
* Max-Block Size
|
|
2955
|
+
* @see https://tailwindcss.com/docs/max-height
|
|
2956
|
+
*/
|
|
2957
|
+
"max-block-size": [{ "max-block": ["none", ...scaleSizingBlock()] }],
|
|
2958
|
+
/**
|
|
2959
|
+
* Width
|
|
2960
|
+
* @see https://tailwindcss.com/docs/width
|
|
2961
|
+
*/
|
|
2962
|
+
w: [{ w: [
|
|
2963
|
+
themeContainer,
|
|
2964
|
+
"screen",
|
|
2965
|
+
...scaleSizing()
|
|
2966
|
+
] }],
|
|
2967
|
+
/**
|
|
2968
|
+
* Min-Width
|
|
2969
|
+
* @see https://tailwindcss.com/docs/min-width
|
|
2970
|
+
*/
|
|
2971
|
+
"min-w": [{ "min-w": [
|
|
2972
|
+
themeContainer,
|
|
2973
|
+
"screen",
|
|
2974
|
+
"none",
|
|
2975
|
+
...scaleSizing()
|
|
2976
|
+
] }],
|
|
2977
|
+
/**
|
|
2978
|
+
* Max-Width
|
|
2979
|
+
* @see https://tailwindcss.com/docs/max-width
|
|
2980
|
+
*/
|
|
2981
|
+
"max-w": [{ "max-w": [
|
|
2982
|
+
themeContainer,
|
|
2983
|
+
"screen",
|
|
2984
|
+
"none",
|
|
2985
|
+
"prose",
|
|
2986
|
+
{ screen: [themeBreakpoint] },
|
|
2987
|
+
...scaleSizing()
|
|
2988
|
+
] }],
|
|
2989
|
+
/**
|
|
2990
|
+
* Height
|
|
2991
|
+
* @see https://tailwindcss.com/docs/height
|
|
2992
|
+
*/
|
|
2993
|
+
h: [{ h: [
|
|
2994
|
+
"screen",
|
|
2995
|
+
"lh",
|
|
2996
|
+
...scaleSizing()
|
|
2997
|
+
] }],
|
|
2998
|
+
/**
|
|
2999
|
+
* Min-Height
|
|
3000
|
+
* @see https://tailwindcss.com/docs/min-height
|
|
3001
|
+
*/
|
|
3002
|
+
"min-h": [{ "min-h": [
|
|
3003
|
+
"screen",
|
|
3004
|
+
"lh",
|
|
3005
|
+
"none",
|
|
3006
|
+
...scaleSizing()
|
|
3007
|
+
] }],
|
|
3008
|
+
/**
|
|
3009
|
+
* Max-Height
|
|
3010
|
+
* @see https://tailwindcss.com/docs/max-height
|
|
3011
|
+
*/
|
|
3012
|
+
"max-h": [{ "max-h": [
|
|
3013
|
+
"screen",
|
|
3014
|
+
"lh",
|
|
3015
|
+
...scaleSizing()
|
|
3016
|
+
] }],
|
|
3017
|
+
/**
|
|
3018
|
+
* Font Size
|
|
3019
|
+
* @see https://tailwindcss.com/docs/font-size
|
|
3020
|
+
*/
|
|
3021
|
+
"font-size": [{ text: [
|
|
3022
|
+
"base",
|
|
3023
|
+
themeText,
|
|
3024
|
+
isArbitraryVariableLength,
|
|
3025
|
+
isArbitraryLength
|
|
3026
|
+
] }],
|
|
3027
|
+
/**
|
|
3028
|
+
* Font Smoothing
|
|
3029
|
+
* @see https://tailwindcss.com/docs/font-smoothing
|
|
3030
|
+
*/
|
|
3031
|
+
"font-smoothing": ["antialiased", "subpixel-antialiased"],
|
|
3032
|
+
/**
|
|
3033
|
+
* Font Style
|
|
3034
|
+
* @see https://tailwindcss.com/docs/font-style
|
|
3035
|
+
*/
|
|
3036
|
+
"font-style": ["italic", "not-italic"],
|
|
3037
|
+
/**
|
|
3038
|
+
* Font Weight
|
|
3039
|
+
* @see https://tailwindcss.com/docs/font-weight
|
|
3040
|
+
*/
|
|
3041
|
+
"font-weight": [{ font: [
|
|
3042
|
+
themeFontWeight,
|
|
3043
|
+
isArbitraryVariableWeight,
|
|
3044
|
+
isArbitraryWeight
|
|
3045
|
+
] }],
|
|
3046
|
+
/**
|
|
3047
|
+
* Font Stretch
|
|
3048
|
+
* @see https://tailwindcss.com/docs/font-stretch
|
|
3049
|
+
*/
|
|
3050
|
+
"font-stretch": [{ "font-stretch": [
|
|
3051
|
+
"ultra-condensed",
|
|
3052
|
+
"extra-condensed",
|
|
3053
|
+
"condensed",
|
|
3054
|
+
"semi-condensed",
|
|
3055
|
+
"normal",
|
|
3056
|
+
"semi-expanded",
|
|
3057
|
+
"expanded",
|
|
3058
|
+
"extra-expanded",
|
|
3059
|
+
"ultra-expanded",
|
|
3060
|
+
isPercent,
|
|
3061
|
+
isArbitraryValue
|
|
3062
|
+
] }],
|
|
3063
|
+
/**
|
|
3064
|
+
* Font Family
|
|
3065
|
+
* @see https://tailwindcss.com/docs/font-family
|
|
3066
|
+
*/
|
|
3067
|
+
"font-family": [{ font: [
|
|
3068
|
+
isArbitraryVariableFamilyName,
|
|
3069
|
+
isArbitraryFamilyName,
|
|
3070
|
+
themeFont
|
|
3071
|
+
] }],
|
|
3072
|
+
/**
|
|
3073
|
+
* Font Feature Settings
|
|
3074
|
+
* @see https://tailwindcss.com/docs/font-feature-settings
|
|
3075
|
+
*/
|
|
3076
|
+
"font-features": [{ "font-features": [isArbitraryValue] }],
|
|
3077
|
+
/**
|
|
3078
|
+
* Font Variant Numeric
|
|
3079
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
3080
|
+
*/
|
|
3081
|
+
"fvn-normal": ["normal-nums"],
|
|
3082
|
+
/**
|
|
3083
|
+
* Font Variant Numeric
|
|
3084
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
3085
|
+
*/
|
|
3086
|
+
"fvn-ordinal": ["ordinal"],
|
|
3087
|
+
/**
|
|
3088
|
+
* Font Variant Numeric
|
|
3089
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
3090
|
+
*/
|
|
3091
|
+
"fvn-slashed-zero": ["slashed-zero"],
|
|
3092
|
+
/**
|
|
3093
|
+
* Font Variant Numeric
|
|
3094
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
3095
|
+
*/
|
|
3096
|
+
"fvn-figure": ["lining-nums", "oldstyle-nums"],
|
|
3097
|
+
/**
|
|
3098
|
+
* Font Variant Numeric
|
|
3099
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
3100
|
+
*/
|
|
3101
|
+
"fvn-spacing": ["proportional-nums", "tabular-nums"],
|
|
3102
|
+
/**
|
|
3103
|
+
* Font Variant Numeric
|
|
3104
|
+
* @see https://tailwindcss.com/docs/font-variant-numeric
|
|
3105
|
+
*/
|
|
3106
|
+
"fvn-fraction": ["diagonal-fractions", "stacked-fractions"],
|
|
3107
|
+
/**
|
|
3108
|
+
* Letter Spacing
|
|
3109
|
+
* @see https://tailwindcss.com/docs/letter-spacing
|
|
3110
|
+
*/
|
|
3111
|
+
tracking: [{ tracking: [
|
|
3112
|
+
themeTracking,
|
|
3113
|
+
isArbitraryVariable,
|
|
3114
|
+
isArbitraryValue
|
|
3115
|
+
] }],
|
|
3116
|
+
/**
|
|
3117
|
+
* Line Clamp
|
|
3118
|
+
* @see https://tailwindcss.com/docs/line-clamp
|
|
3119
|
+
*/
|
|
3120
|
+
"line-clamp": [{ "line-clamp": [
|
|
3121
|
+
isNumber,
|
|
3122
|
+
"none",
|
|
3123
|
+
isArbitraryVariable,
|
|
3124
|
+
isArbitraryNumber
|
|
3125
|
+
] }],
|
|
3126
|
+
/**
|
|
3127
|
+
* Line Height
|
|
3128
|
+
* @see https://tailwindcss.com/docs/line-height
|
|
3129
|
+
*/
|
|
3130
|
+
leading: [{ leading: [themeLeading, ...scaleUnambiguousSpacing()] }],
|
|
3131
|
+
/**
|
|
3132
|
+
* List Style Image
|
|
3133
|
+
* @see https://tailwindcss.com/docs/list-style-image
|
|
3134
|
+
*/
|
|
3135
|
+
"list-image": [{ "list-image": [
|
|
3136
|
+
"none",
|
|
3137
|
+
isArbitraryVariable,
|
|
3138
|
+
isArbitraryValue
|
|
3139
|
+
] }],
|
|
3140
|
+
/**
|
|
3141
|
+
* List Style Position
|
|
3142
|
+
* @see https://tailwindcss.com/docs/list-style-position
|
|
3143
|
+
*/
|
|
3144
|
+
"list-style-position": [{ list: ["inside", "outside"] }],
|
|
3145
|
+
/**
|
|
3146
|
+
* List Style Type
|
|
3147
|
+
* @see https://tailwindcss.com/docs/list-style-type
|
|
3148
|
+
*/
|
|
3149
|
+
"list-style-type": [{ list: [
|
|
3150
|
+
"disc",
|
|
3151
|
+
"decimal",
|
|
3152
|
+
"none",
|
|
3153
|
+
isArbitraryVariable,
|
|
3154
|
+
isArbitraryValue
|
|
3155
|
+
] }],
|
|
3156
|
+
/**
|
|
3157
|
+
* Text Alignment
|
|
3158
|
+
* @see https://tailwindcss.com/docs/text-align
|
|
3159
|
+
*/
|
|
3160
|
+
"text-alignment": [{ text: [
|
|
3161
|
+
"left",
|
|
3162
|
+
"center",
|
|
3163
|
+
"right",
|
|
3164
|
+
"justify",
|
|
3165
|
+
"start",
|
|
3166
|
+
"end"
|
|
3167
|
+
] }],
|
|
3168
|
+
/**
|
|
3169
|
+
* Placeholder Color
|
|
3170
|
+
* @deprecated since Tailwind CSS v3.0.0
|
|
3171
|
+
* @see https://v3.tailwindcss.com/docs/placeholder-color
|
|
3172
|
+
*/
|
|
3173
|
+
"placeholder-color": [{ placeholder: scaleColor() }],
|
|
3174
|
+
/**
|
|
3175
|
+
* Text Color
|
|
3176
|
+
* @see https://tailwindcss.com/docs/text-color
|
|
3177
|
+
*/
|
|
3178
|
+
"text-color": [{ text: scaleColor() }],
|
|
3179
|
+
/**
|
|
3180
|
+
* Text Decoration
|
|
3181
|
+
* @see https://tailwindcss.com/docs/text-decoration
|
|
3182
|
+
*/
|
|
3183
|
+
"text-decoration": [
|
|
3184
|
+
"underline",
|
|
3185
|
+
"overline",
|
|
3186
|
+
"line-through",
|
|
3187
|
+
"no-underline"
|
|
3188
|
+
],
|
|
3189
|
+
/**
|
|
3190
|
+
* Text Decoration Style
|
|
3191
|
+
* @see https://tailwindcss.com/docs/text-decoration-style
|
|
3192
|
+
*/
|
|
3193
|
+
"text-decoration-style": [{ decoration: [...scaleLineStyle(), "wavy"] }],
|
|
3194
|
+
/**
|
|
3195
|
+
* Text Decoration Thickness
|
|
3196
|
+
* @see https://tailwindcss.com/docs/text-decoration-thickness
|
|
3197
|
+
*/
|
|
3198
|
+
"text-decoration-thickness": [{ decoration: [
|
|
3199
|
+
isNumber,
|
|
3200
|
+
"from-font",
|
|
3201
|
+
"auto",
|
|
3202
|
+
isArbitraryVariable,
|
|
3203
|
+
isArbitraryLength
|
|
3204
|
+
] }],
|
|
3205
|
+
/**
|
|
3206
|
+
* Text Decoration Color
|
|
3207
|
+
* @see https://tailwindcss.com/docs/text-decoration-color
|
|
3208
|
+
*/
|
|
3209
|
+
"text-decoration-color": [{ decoration: scaleColor() }],
|
|
3210
|
+
/**
|
|
3211
|
+
* Text Underline Offset
|
|
3212
|
+
* @see https://tailwindcss.com/docs/text-underline-offset
|
|
3213
|
+
*/
|
|
3214
|
+
"underline-offset": [{ "underline-offset": [
|
|
3215
|
+
isNumber,
|
|
3216
|
+
"auto",
|
|
3217
|
+
isArbitraryVariable,
|
|
3218
|
+
isArbitraryValue
|
|
3219
|
+
] }],
|
|
3220
|
+
/**
|
|
3221
|
+
* Text Transform
|
|
3222
|
+
* @see https://tailwindcss.com/docs/text-transform
|
|
3223
|
+
*/
|
|
3224
|
+
"text-transform": [
|
|
3225
|
+
"uppercase",
|
|
3226
|
+
"lowercase",
|
|
3227
|
+
"capitalize",
|
|
3228
|
+
"normal-case"
|
|
3229
|
+
],
|
|
3230
|
+
/**
|
|
3231
|
+
* Text Overflow
|
|
3232
|
+
* @see https://tailwindcss.com/docs/text-overflow
|
|
3233
|
+
*/
|
|
3234
|
+
"text-overflow": [
|
|
3235
|
+
"truncate",
|
|
3236
|
+
"text-ellipsis",
|
|
3237
|
+
"text-clip"
|
|
3238
|
+
],
|
|
3239
|
+
/**
|
|
3240
|
+
* Text Wrap
|
|
3241
|
+
* @see https://tailwindcss.com/docs/text-wrap
|
|
3242
|
+
*/
|
|
3243
|
+
"text-wrap": [{ text: [
|
|
3244
|
+
"wrap",
|
|
3245
|
+
"nowrap",
|
|
3246
|
+
"balance",
|
|
3247
|
+
"pretty"
|
|
3248
|
+
] }],
|
|
3249
|
+
/**
|
|
3250
|
+
* Text Indent
|
|
3251
|
+
* @see https://tailwindcss.com/docs/text-indent
|
|
3252
|
+
*/
|
|
3253
|
+
indent: [{ indent: scaleUnambiguousSpacing() }],
|
|
3254
|
+
/**
|
|
3255
|
+
* Tab Size
|
|
3256
|
+
* @see https://tailwindcss.com/docs/tab-size
|
|
3257
|
+
*/
|
|
3258
|
+
"tab-size": [{ tab: [
|
|
3259
|
+
isInteger,
|
|
3260
|
+
isArbitraryVariable,
|
|
3261
|
+
isArbitraryValue
|
|
3262
|
+
] }],
|
|
3263
|
+
/**
|
|
3264
|
+
* Vertical Alignment
|
|
3265
|
+
* @see https://tailwindcss.com/docs/vertical-align
|
|
3266
|
+
*/
|
|
3267
|
+
"vertical-align": [{ align: [
|
|
3268
|
+
"baseline",
|
|
3269
|
+
"top",
|
|
3270
|
+
"middle",
|
|
3271
|
+
"bottom",
|
|
3272
|
+
"text-top",
|
|
3273
|
+
"text-bottom",
|
|
3274
|
+
"sub",
|
|
3275
|
+
"super",
|
|
3276
|
+
isArbitraryVariable,
|
|
3277
|
+
isArbitraryValue
|
|
3278
|
+
] }],
|
|
3279
|
+
/**
|
|
3280
|
+
* Whitespace
|
|
3281
|
+
* @see https://tailwindcss.com/docs/whitespace
|
|
3282
|
+
*/
|
|
3283
|
+
whitespace: [{ whitespace: [
|
|
3284
|
+
"normal",
|
|
3285
|
+
"nowrap",
|
|
3286
|
+
"pre",
|
|
3287
|
+
"pre-line",
|
|
3288
|
+
"pre-wrap",
|
|
3289
|
+
"break-spaces"
|
|
3290
|
+
] }],
|
|
3291
|
+
/**
|
|
3292
|
+
* Word Break
|
|
3293
|
+
* @see https://tailwindcss.com/docs/word-break
|
|
3294
|
+
*/
|
|
3295
|
+
break: [{ break: [
|
|
3296
|
+
"normal",
|
|
3297
|
+
"words",
|
|
3298
|
+
"all",
|
|
3299
|
+
"keep"
|
|
3300
|
+
] }],
|
|
3301
|
+
/**
|
|
3302
|
+
* Overflow Wrap
|
|
3303
|
+
* @see https://tailwindcss.com/docs/overflow-wrap
|
|
3304
|
+
*/
|
|
3305
|
+
wrap: [{ wrap: [
|
|
3306
|
+
"break-word",
|
|
3307
|
+
"anywhere",
|
|
3308
|
+
"normal"
|
|
3309
|
+
] }],
|
|
3310
|
+
/**
|
|
3311
|
+
* Hyphens
|
|
3312
|
+
* @see https://tailwindcss.com/docs/hyphens
|
|
3313
|
+
*/
|
|
3314
|
+
hyphens: [{ hyphens: [
|
|
3315
|
+
"none",
|
|
3316
|
+
"manual",
|
|
3317
|
+
"auto"
|
|
3318
|
+
] }],
|
|
3319
|
+
/**
|
|
3320
|
+
* Content
|
|
3321
|
+
* @see https://tailwindcss.com/docs/content
|
|
3322
|
+
*/
|
|
3323
|
+
content: [{ content: [
|
|
3324
|
+
"none",
|
|
3325
|
+
isArbitraryVariable,
|
|
3326
|
+
isArbitraryValue
|
|
3327
|
+
] }],
|
|
3328
|
+
/**
|
|
3329
|
+
* Background Attachment
|
|
3330
|
+
* @see https://tailwindcss.com/docs/background-attachment
|
|
3331
|
+
*/
|
|
3332
|
+
"bg-attachment": [{ bg: [
|
|
3333
|
+
"fixed",
|
|
3334
|
+
"local",
|
|
3335
|
+
"scroll"
|
|
3336
|
+
] }],
|
|
3337
|
+
/**
|
|
3338
|
+
* Background Clip
|
|
3339
|
+
* @see https://tailwindcss.com/docs/background-clip
|
|
3340
|
+
*/
|
|
3341
|
+
"bg-clip": [{ "bg-clip": [
|
|
3342
|
+
"border",
|
|
3343
|
+
"padding",
|
|
3344
|
+
"content",
|
|
3345
|
+
"text"
|
|
3346
|
+
] }],
|
|
3347
|
+
/**
|
|
3348
|
+
* Background Origin
|
|
3349
|
+
* @see https://tailwindcss.com/docs/background-origin
|
|
3350
|
+
*/
|
|
3351
|
+
"bg-origin": [{ "bg-origin": [
|
|
3352
|
+
"border",
|
|
3353
|
+
"padding",
|
|
3354
|
+
"content"
|
|
3355
|
+
] }],
|
|
3356
|
+
/**
|
|
3357
|
+
* Background Position
|
|
3358
|
+
* @see https://tailwindcss.com/docs/background-position
|
|
3359
|
+
*/
|
|
3360
|
+
"bg-position": [{ bg: scaleBgPosition() }],
|
|
3361
|
+
/**
|
|
3362
|
+
* Background Repeat
|
|
3363
|
+
* @see https://tailwindcss.com/docs/background-repeat
|
|
3364
|
+
*/
|
|
3365
|
+
"bg-repeat": [{ bg: scaleBgRepeat() }],
|
|
3366
|
+
/**
|
|
3367
|
+
* Background Size
|
|
3368
|
+
* @see https://tailwindcss.com/docs/background-size
|
|
3369
|
+
*/
|
|
3370
|
+
"bg-size": [{ bg: scaleBgSize() }],
|
|
3371
|
+
/**
|
|
3372
|
+
* Background Image
|
|
3373
|
+
* @see https://tailwindcss.com/docs/background-image
|
|
3374
|
+
*/
|
|
3375
|
+
"bg-image": [{ bg: [
|
|
3376
|
+
"none",
|
|
3377
|
+
{
|
|
3378
|
+
linear: [
|
|
3379
|
+
{ to: [
|
|
3380
|
+
"t",
|
|
3381
|
+
"tr",
|
|
3382
|
+
"r",
|
|
3383
|
+
"br",
|
|
3384
|
+
"b",
|
|
3385
|
+
"bl",
|
|
3386
|
+
"l",
|
|
3387
|
+
"tl"
|
|
3388
|
+
] },
|
|
3389
|
+
isInteger,
|
|
3390
|
+
isArbitraryVariable,
|
|
3391
|
+
isArbitraryValue
|
|
3392
|
+
],
|
|
3393
|
+
radial: [
|
|
3394
|
+
"",
|
|
3395
|
+
isArbitraryVariable,
|
|
3396
|
+
isArbitraryValue
|
|
3397
|
+
],
|
|
3398
|
+
conic: [
|
|
3399
|
+
isInteger,
|
|
3400
|
+
isArbitraryVariable,
|
|
3401
|
+
isArbitraryValue
|
|
3402
|
+
]
|
|
3403
|
+
},
|
|
3404
|
+
isArbitraryVariableImage,
|
|
3405
|
+
isArbitraryImage
|
|
3406
|
+
] }],
|
|
3407
|
+
/**
|
|
3408
|
+
* Background Color
|
|
3409
|
+
* @see https://tailwindcss.com/docs/background-color
|
|
3410
|
+
*/
|
|
3411
|
+
"bg-color": [{ bg: scaleColor() }],
|
|
3412
|
+
/**
|
|
3413
|
+
* Gradient Color Stops From Position
|
|
3414
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3415
|
+
*/
|
|
3416
|
+
"gradient-from-pos": [{ from: scaleGradientStopPosition() }],
|
|
3417
|
+
/**
|
|
3418
|
+
* Gradient Color Stops Via Position
|
|
3419
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3420
|
+
*/
|
|
3421
|
+
"gradient-via-pos": [{ via: scaleGradientStopPosition() }],
|
|
3422
|
+
/**
|
|
3423
|
+
* Gradient Color Stops To Position
|
|
3424
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3425
|
+
*/
|
|
3426
|
+
"gradient-to-pos": [{ to: scaleGradientStopPosition() }],
|
|
3427
|
+
/**
|
|
3428
|
+
* Gradient Color Stops From
|
|
3429
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3430
|
+
*/
|
|
3431
|
+
"gradient-from": [{ from: scaleColor() }],
|
|
3432
|
+
/**
|
|
3433
|
+
* Gradient Color Stops Via
|
|
3434
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3435
|
+
*/
|
|
3436
|
+
"gradient-via": [{ via: scaleColor() }],
|
|
3437
|
+
/**
|
|
3438
|
+
* Gradient Color Stops To
|
|
3439
|
+
* @see https://tailwindcss.com/docs/gradient-color-stops
|
|
3440
|
+
*/
|
|
3441
|
+
"gradient-to": [{ to: scaleColor() }],
|
|
3442
|
+
/**
|
|
3443
|
+
* Border Radius
|
|
3444
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
3445
|
+
*/
|
|
3446
|
+
rounded: [{ rounded: scaleRadius() }],
|
|
3447
|
+
/**
|
|
3448
|
+
* Border Radius Start
|
|
3449
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
3450
|
+
*/
|
|
3451
|
+
"rounded-s": [{ "rounded-s": scaleRadius() }],
|
|
3452
|
+
/**
|
|
3453
|
+
* Border Radius End
|
|
3454
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
3455
|
+
*/
|
|
3456
|
+
"rounded-e": [{ "rounded-e": scaleRadius() }],
|
|
3457
|
+
/**
|
|
3458
|
+
* Border Radius Top
|
|
3459
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
3460
|
+
*/
|
|
3461
|
+
"rounded-t": [{ "rounded-t": scaleRadius() }],
|
|
3462
|
+
/**
|
|
3463
|
+
* Border Radius Right
|
|
3464
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
3465
|
+
*/
|
|
3466
|
+
"rounded-r": [{ "rounded-r": scaleRadius() }],
|
|
3467
|
+
/**
|
|
3468
|
+
* Border Radius Bottom
|
|
3469
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
3470
|
+
*/
|
|
3471
|
+
"rounded-b": [{ "rounded-b": scaleRadius() }],
|
|
3472
|
+
/**
|
|
3473
|
+
* Border Radius Left
|
|
3474
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
3475
|
+
*/
|
|
3476
|
+
"rounded-l": [{ "rounded-l": scaleRadius() }],
|
|
3477
|
+
/**
|
|
3478
|
+
* Border Radius Start Start
|
|
3479
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
3480
|
+
*/
|
|
3481
|
+
"rounded-ss": [{ "rounded-ss": scaleRadius() }],
|
|
3482
|
+
/**
|
|
3483
|
+
* Border Radius Start End
|
|
3484
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
3485
|
+
*/
|
|
3486
|
+
"rounded-se": [{ "rounded-se": scaleRadius() }],
|
|
3487
|
+
/**
|
|
3488
|
+
* Border Radius End End
|
|
3489
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
3490
|
+
*/
|
|
3491
|
+
"rounded-ee": [{ "rounded-ee": scaleRadius() }],
|
|
3492
|
+
/**
|
|
3493
|
+
* Border Radius End Start
|
|
3494
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
3495
|
+
*/
|
|
3496
|
+
"rounded-es": [{ "rounded-es": scaleRadius() }],
|
|
3497
|
+
/**
|
|
3498
|
+
* Border Radius Top Left
|
|
3499
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
3500
|
+
*/
|
|
3501
|
+
"rounded-tl": [{ "rounded-tl": scaleRadius() }],
|
|
3502
|
+
/**
|
|
3503
|
+
* Border Radius Top Right
|
|
3504
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
3505
|
+
*/
|
|
3506
|
+
"rounded-tr": [{ "rounded-tr": scaleRadius() }],
|
|
3507
|
+
/**
|
|
3508
|
+
* Border Radius Bottom Right
|
|
3509
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
3510
|
+
*/
|
|
3511
|
+
"rounded-br": [{ "rounded-br": scaleRadius() }],
|
|
3512
|
+
/**
|
|
3513
|
+
* Border Radius Bottom Left
|
|
3514
|
+
* @see https://tailwindcss.com/docs/border-radius
|
|
3515
|
+
*/
|
|
3516
|
+
"rounded-bl": [{ "rounded-bl": scaleRadius() }],
|
|
3517
|
+
/**
|
|
3518
|
+
* Border Width
|
|
3519
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
3520
|
+
*/
|
|
3521
|
+
"border-w": [{ border: scaleBorderWidth() }],
|
|
3522
|
+
/**
|
|
3523
|
+
* Border Width Inline
|
|
3524
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
3525
|
+
*/
|
|
3526
|
+
"border-w-x": [{ "border-x": scaleBorderWidth() }],
|
|
3527
|
+
/**
|
|
3528
|
+
* Border Width Block
|
|
3529
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
3530
|
+
*/
|
|
3531
|
+
"border-w-y": [{ "border-y": scaleBorderWidth() }],
|
|
3532
|
+
/**
|
|
3533
|
+
* Border Width Inline Start
|
|
3534
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
3535
|
+
*/
|
|
3536
|
+
"border-w-s": [{ "border-s": scaleBorderWidth() }],
|
|
3537
|
+
/**
|
|
3538
|
+
* Border Width Inline End
|
|
3539
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
3540
|
+
*/
|
|
3541
|
+
"border-w-e": [{ "border-e": scaleBorderWidth() }],
|
|
3542
|
+
/**
|
|
3543
|
+
* Border Width Block Start
|
|
3544
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
3545
|
+
*/
|
|
3546
|
+
"border-w-bs": [{ "border-bs": scaleBorderWidth() }],
|
|
3547
|
+
/**
|
|
3548
|
+
* Border Width Block End
|
|
3549
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
3550
|
+
*/
|
|
3551
|
+
"border-w-be": [{ "border-be": scaleBorderWidth() }],
|
|
3552
|
+
/**
|
|
3553
|
+
* Border Width Top
|
|
3554
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
3555
|
+
*/
|
|
3556
|
+
"border-w-t": [{ "border-t": scaleBorderWidth() }],
|
|
3557
|
+
/**
|
|
3558
|
+
* Border Width Right
|
|
3559
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
3560
|
+
*/
|
|
3561
|
+
"border-w-r": [{ "border-r": scaleBorderWidth() }],
|
|
3562
|
+
/**
|
|
3563
|
+
* Border Width Bottom
|
|
3564
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
3565
|
+
*/
|
|
3566
|
+
"border-w-b": [{ "border-b": scaleBorderWidth() }],
|
|
3567
|
+
/**
|
|
3568
|
+
* Border Width Left
|
|
3569
|
+
* @see https://tailwindcss.com/docs/border-width
|
|
3570
|
+
*/
|
|
3571
|
+
"border-w-l": [{ "border-l": scaleBorderWidth() }],
|
|
3572
|
+
/**
|
|
3573
|
+
* Divide Width X
|
|
3574
|
+
* @see https://tailwindcss.com/docs/border-width#between-children
|
|
3575
|
+
*/
|
|
3576
|
+
"divide-x": [{ "divide-x": scaleBorderWidth() }],
|
|
3577
|
+
/**
|
|
3578
|
+
* Divide Width X Reverse
|
|
3579
|
+
* @see https://tailwindcss.com/docs/border-width#between-children
|
|
3580
|
+
*/
|
|
3581
|
+
"divide-x-reverse": ["divide-x-reverse"],
|
|
3582
|
+
/**
|
|
3583
|
+
* Divide Width Y
|
|
3584
|
+
* @see https://tailwindcss.com/docs/border-width#between-children
|
|
3585
|
+
*/
|
|
3586
|
+
"divide-y": [{ "divide-y": scaleBorderWidth() }],
|
|
3587
|
+
/**
|
|
3588
|
+
* Divide Width Y Reverse
|
|
3589
|
+
* @see https://tailwindcss.com/docs/border-width#between-children
|
|
3590
|
+
*/
|
|
3591
|
+
"divide-y-reverse": ["divide-y-reverse"],
|
|
3592
|
+
/**
|
|
3593
|
+
* Border Style
|
|
3594
|
+
* @see https://tailwindcss.com/docs/border-style
|
|
3595
|
+
*/
|
|
3596
|
+
"border-style": [{ border: [
|
|
3597
|
+
...scaleLineStyle(),
|
|
3598
|
+
"hidden",
|
|
3599
|
+
"none"
|
|
3600
|
+
] }],
|
|
3601
|
+
/**
|
|
3602
|
+
* Divide Style
|
|
3603
|
+
* @see https://tailwindcss.com/docs/border-style#setting-the-divider-style
|
|
3604
|
+
*/
|
|
3605
|
+
"divide-style": [{ divide: [
|
|
3606
|
+
...scaleLineStyle(),
|
|
3607
|
+
"hidden",
|
|
3608
|
+
"none"
|
|
3609
|
+
] }],
|
|
3610
|
+
/**
|
|
3611
|
+
* Border Color
|
|
3612
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
3613
|
+
*/
|
|
3614
|
+
"border-color": [{ border: scaleColor() }],
|
|
3615
|
+
/**
|
|
3616
|
+
* Border Color Inline
|
|
3617
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
3618
|
+
*/
|
|
3619
|
+
"border-color-x": [{ "border-x": scaleColor() }],
|
|
3620
|
+
/**
|
|
3621
|
+
* Border Color Block
|
|
3622
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
3623
|
+
*/
|
|
3624
|
+
"border-color-y": [{ "border-y": scaleColor() }],
|
|
3625
|
+
/**
|
|
3626
|
+
* Border Color Inline Start
|
|
3627
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
3628
|
+
*/
|
|
3629
|
+
"border-color-s": [{ "border-s": scaleColor() }],
|
|
3630
|
+
/**
|
|
3631
|
+
* Border Color Inline End
|
|
3632
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
3633
|
+
*/
|
|
3634
|
+
"border-color-e": [{ "border-e": scaleColor() }],
|
|
3635
|
+
/**
|
|
3636
|
+
* Border Color Block Start
|
|
3637
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
3638
|
+
*/
|
|
3639
|
+
"border-color-bs": [{ "border-bs": scaleColor() }],
|
|
3640
|
+
/**
|
|
3641
|
+
* Border Color Block End
|
|
3642
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
3643
|
+
*/
|
|
3644
|
+
"border-color-be": [{ "border-be": scaleColor() }],
|
|
3645
|
+
/**
|
|
3646
|
+
* Border Color Top
|
|
3647
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
3648
|
+
*/
|
|
3649
|
+
"border-color-t": [{ "border-t": scaleColor() }],
|
|
3650
|
+
/**
|
|
3651
|
+
* Border Color Right
|
|
3652
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
3653
|
+
*/
|
|
3654
|
+
"border-color-r": [{ "border-r": scaleColor() }],
|
|
3655
|
+
/**
|
|
3656
|
+
* Border Color Bottom
|
|
3657
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
3658
|
+
*/
|
|
3659
|
+
"border-color-b": [{ "border-b": scaleColor() }],
|
|
3660
|
+
/**
|
|
3661
|
+
* Border Color Left
|
|
3662
|
+
* @see https://tailwindcss.com/docs/border-color
|
|
3663
|
+
*/
|
|
3664
|
+
"border-color-l": [{ "border-l": scaleColor() }],
|
|
3665
|
+
/**
|
|
3666
|
+
* Divide Color
|
|
3667
|
+
* @see https://tailwindcss.com/docs/divide-color
|
|
3668
|
+
*/
|
|
3669
|
+
"divide-color": [{ divide: scaleColor() }],
|
|
3670
|
+
/**
|
|
3671
|
+
* Outline Style
|
|
3672
|
+
* @see https://tailwindcss.com/docs/outline-style
|
|
3673
|
+
*/
|
|
3674
|
+
"outline-style": [{ outline: [
|
|
3675
|
+
...scaleLineStyle(),
|
|
3676
|
+
"none",
|
|
3677
|
+
"hidden"
|
|
3678
|
+
] }],
|
|
3679
|
+
/**
|
|
3680
|
+
* Outline Offset
|
|
3681
|
+
* @see https://tailwindcss.com/docs/outline-offset
|
|
3682
|
+
*/
|
|
3683
|
+
"outline-offset": [{ "outline-offset": [
|
|
3684
|
+
isNumber,
|
|
3685
|
+
isArbitraryVariable,
|
|
3686
|
+
isArbitraryValue
|
|
3687
|
+
] }],
|
|
3688
|
+
/**
|
|
3689
|
+
* Outline Width
|
|
3690
|
+
* @see https://tailwindcss.com/docs/outline-width
|
|
3691
|
+
*/
|
|
3692
|
+
"outline-w": [{ outline: [
|
|
3693
|
+
"",
|
|
3694
|
+
isNumber,
|
|
3695
|
+
isArbitraryVariableLength,
|
|
3696
|
+
isArbitraryLength
|
|
3697
|
+
] }],
|
|
3698
|
+
/**
|
|
3699
|
+
* Outline Color
|
|
3700
|
+
* @see https://tailwindcss.com/docs/outline-color
|
|
3701
|
+
*/
|
|
3702
|
+
"outline-color": [{ outline: scaleColor() }],
|
|
3703
|
+
/**
|
|
3704
|
+
* Box Shadow
|
|
3705
|
+
* @see https://tailwindcss.com/docs/box-shadow
|
|
3706
|
+
*/
|
|
3707
|
+
shadow: [{ shadow: [
|
|
3708
|
+
"",
|
|
3709
|
+
"none",
|
|
3710
|
+
themeShadow,
|
|
3711
|
+
isArbitraryVariableShadow,
|
|
3712
|
+
isArbitraryShadow
|
|
3713
|
+
] }],
|
|
3714
|
+
/**
|
|
3715
|
+
* Box Shadow Color
|
|
3716
|
+
* @see https://tailwindcss.com/docs/box-shadow#setting-the-shadow-color
|
|
3717
|
+
*/
|
|
3718
|
+
"shadow-color": [{ shadow: scaleColor() }],
|
|
3719
|
+
/**
|
|
3720
|
+
* Inset Box Shadow
|
|
3721
|
+
* @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow
|
|
3722
|
+
*/
|
|
3723
|
+
"inset-shadow": [{ "inset-shadow": [
|
|
3724
|
+
"none",
|
|
3725
|
+
themeInsetShadow,
|
|
3726
|
+
isArbitraryVariableShadow,
|
|
3727
|
+
isArbitraryShadow
|
|
3728
|
+
] }],
|
|
3729
|
+
/**
|
|
3730
|
+
* Inset Box Shadow Color
|
|
3731
|
+
* @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-shadow-color
|
|
3732
|
+
*/
|
|
3733
|
+
"inset-shadow-color": [{ "inset-shadow": scaleColor() }],
|
|
3734
|
+
/**
|
|
3735
|
+
* Ring Width
|
|
3736
|
+
* @see https://tailwindcss.com/docs/box-shadow#adding-a-ring
|
|
3737
|
+
*/
|
|
3738
|
+
"ring-w": [{ ring: scaleBorderWidth() }],
|
|
3739
|
+
/**
|
|
3740
|
+
* Ring Width Inset
|
|
3741
|
+
* @see https://v3.tailwindcss.com/docs/ring-width#inset-rings
|
|
3742
|
+
* @deprecated since Tailwind CSS v4.0.0
|
|
3743
|
+
* @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
|
|
3744
|
+
*/
|
|
3745
|
+
"ring-w-inset": ["ring-inset"],
|
|
3746
|
+
/**
|
|
3747
|
+
* Ring Color
|
|
3748
|
+
* @see https://tailwindcss.com/docs/box-shadow#setting-the-ring-color
|
|
3749
|
+
*/
|
|
3750
|
+
"ring-color": [{ ring: scaleColor() }],
|
|
3751
|
+
/**
|
|
3752
|
+
* Ring Offset Width
|
|
3753
|
+
* @see https://v3.tailwindcss.com/docs/ring-offset-width
|
|
3754
|
+
* @deprecated since Tailwind CSS v4.0.0
|
|
3755
|
+
* @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
|
|
3756
|
+
*/
|
|
3757
|
+
"ring-offset-w": [{ "ring-offset": [isNumber, isArbitraryLength] }],
|
|
3758
|
+
/**
|
|
3759
|
+
* Ring Offset Color
|
|
3760
|
+
* @see https://v3.tailwindcss.com/docs/ring-offset-color
|
|
3761
|
+
* @deprecated since Tailwind CSS v4.0.0
|
|
3762
|
+
* @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
|
|
3763
|
+
*/
|
|
3764
|
+
"ring-offset-color": [{ "ring-offset": scaleColor() }],
|
|
3765
|
+
/**
|
|
3766
|
+
* Inset Ring Width
|
|
3767
|
+
* @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-ring
|
|
3768
|
+
*/
|
|
3769
|
+
"inset-ring-w": [{ "inset-ring": scaleBorderWidth() }],
|
|
3770
|
+
/**
|
|
3771
|
+
* Inset Ring Color
|
|
3772
|
+
* @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-ring-color
|
|
3773
|
+
*/
|
|
3774
|
+
"inset-ring-color": [{ "inset-ring": scaleColor() }],
|
|
3775
|
+
/**
|
|
3776
|
+
* Text Shadow
|
|
3777
|
+
* @see https://tailwindcss.com/docs/text-shadow
|
|
3778
|
+
*/
|
|
3779
|
+
"text-shadow": [{ "text-shadow": [
|
|
3780
|
+
"none",
|
|
3781
|
+
themeTextShadow,
|
|
3782
|
+
isArbitraryVariableShadow,
|
|
3783
|
+
isArbitraryShadow
|
|
3784
|
+
] }],
|
|
3785
|
+
/**
|
|
3786
|
+
* Text Shadow Color
|
|
3787
|
+
* @see https://tailwindcss.com/docs/text-shadow#setting-the-shadow-color
|
|
3788
|
+
*/
|
|
3789
|
+
"text-shadow-color": [{ "text-shadow": scaleColor() }],
|
|
3790
|
+
/**
|
|
3791
|
+
* Opacity
|
|
3792
|
+
* @see https://tailwindcss.com/docs/opacity
|
|
3793
|
+
*/
|
|
3794
|
+
opacity: [{ opacity: [
|
|
3795
|
+
isNumber,
|
|
3796
|
+
isArbitraryVariable,
|
|
3797
|
+
isArbitraryValue
|
|
3798
|
+
] }],
|
|
3799
|
+
/**
|
|
3800
|
+
* Mix Blend Mode
|
|
3801
|
+
* @see https://tailwindcss.com/docs/mix-blend-mode
|
|
3802
|
+
*/
|
|
3803
|
+
"mix-blend": [{ "mix-blend": [
|
|
3804
|
+
...scaleBlendMode(),
|
|
3805
|
+
"plus-darker",
|
|
3806
|
+
"plus-lighter"
|
|
3807
|
+
] }],
|
|
3808
|
+
/**
|
|
3809
|
+
* Background Blend Mode
|
|
3810
|
+
* @see https://tailwindcss.com/docs/background-blend-mode
|
|
3811
|
+
*/
|
|
3812
|
+
"bg-blend": [{ "bg-blend": scaleBlendMode() }],
|
|
3813
|
+
/**
|
|
3814
|
+
* Mask Clip
|
|
3815
|
+
* @see https://tailwindcss.com/docs/mask-clip
|
|
3816
|
+
*/
|
|
3817
|
+
"mask-clip": [{ "mask-clip": [
|
|
3818
|
+
"border",
|
|
3819
|
+
"padding",
|
|
3820
|
+
"content",
|
|
3821
|
+
"fill",
|
|
3822
|
+
"stroke",
|
|
3823
|
+
"view"
|
|
3824
|
+
] }, "mask-no-clip"],
|
|
3825
|
+
/**
|
|
3826
|
+
* Mask Composite
|
|
3827
|
+
* @see https://tailwindcss.com/docs/mask-composite
|
|
3828
|
+
*/
|
|
3829
|
+
"mask-composite": [{ mask: [
|
|
3830
|
+
"add",
|
|
3831
|
+
"subtract",
|
|
3832
|
+
"intersect",
|
|
3833
|
+
"exclude"
|
|
3834
|
+
] }],
|
|
3835
|
+
/**
|
|
3836
|
+
* Mask Image
|
|
3837
|
+
* @see https://tailwindcss.com/docs/mask-image
|
|
3838
|
+
*/
|
|
3839
|
+
"mask-image-linear-pos": [{ "mask-linear": [isNumber] }],
|
|
3840
|
+
"mask-image-linear-from-pos": [{ "mask-linear-from": scaleMaskImagePosition() }],
|
|
3841
|
+
"mask-image-linear-to-pos": [{ "mask-linear-to": scaleMaskImagePosition() }],
|
|
3842
|
+
"mask-image-linear-from-color": [{ "mask-linear-from": scaleColor() }],
|
|
3843
|
+
"mask-image-linear-to-color": [{ "mask-linear-to": scaleColor() }],
|
|
3844
|
+
"mask-image-t-from-pos": [{ "mask-t-from": scaleMaskImagePosition() }],
|
|
3845
|
+
"mask-image-t-to-pos": [{ "mask-t-to": scaleMaskImagePosition() }],
|
|
3846
|
+
"mask-image-t-from-color": [{ "mask-t-from": scaleColor() }],
|
|
3847
|
+
"mask-image-t-to-color": [{ "mask-t-to": scaleColor() }],
|
|
3848
|
+
"mask-image-r-from-pos": [{ "mask-r-from": scaleMaskImagePosition() }],
|
|
3849
|
+
"mask-image-r-to-pos": [{ "mask-r-to": scaleMaskImagePosition() }],
|
|
3850
|
+
"mask-image-r-from-color": [{ "mask-r-from": scaleColor() }],
|
|
3851
|
+
"mask-image-r-to-color": [{ "mask-r-to": scaleColor() }],
|
|
3852
|
+
"mask-image-b-from-pos": [{ "mask-b-from": scaleMaskImagePosition() }],
|
|
3853
|
+
"mask-image-b-to-pos": [{ "mask-b-to": scaleMaskImagePosition() }],
|
|
3854
|
+
"mask-image-b-from-color": [{ "mask-b-from": scaleColor() }],
|
|
3855
|
+
"mask-image-b-to-color": [{ "mask-b-to": scaleColor() }],
|
|
3856
|
+
"mask-image-l-from-pos": [{ "mask-l-from": scaleMaskImagePosition() }],
|
|
3857
|
+
"mask-image-l-to-pos": [{ "mask-l-to": scaleMaskImagePosition() }],
|
|
3858
|
+
"mask-image-l-from-color": [{ "mask-l-from": scaleColor() }],
|
|
3859
|
+
"mask-image-l-to-color": [{ "mask-l-to": scaleColor() }],
|
|
3860
|
+
"mask-image-x-from-pos": [{ "mask-x-from": scaleMaskImagePosition() }],
|
|
3861
|
+
"mask-image-x-to-pos": [{ "mask-x-to": scaleMaskImagePosition() }],
|
|
3862
|
+
"mask-image-x-from-color": [{ "mask-x-from": scaleColor() }],
|
|
3863
|
+
"mask-image-x-to-color": [{ "mask-x-to": scaleColor() }],
|
|
3864
|
+
"mask-image-y-from-pos": [{ "mask-y-from": scaleMaskImagePosition() }],
|
|
3865
|
+
"mask-image-y-to-pos": [{ "mask-y-to": scaleMaskImagePosition() }],
|
|
3866
|
+
"mask-image-y-from-color": [{ "mask-y-from": scaleColor() }],
|
|
3867
|
+
"mask-image-y-to-color": [{ "mask-y-to": scaleColor() }],
|
|
3868
|
+
"mask-image-radial": [{ "mask-radial": [isArbitraryVariable, isArbitraryValue] }],
|
|
3869
|
+
"mask-image-radial-from-pos": [{ "mask-radial-from": scaleMaskImagePosition() }],
|
|
3870
|
+
"mask-image-radial-to-pos": [{ "mask-radial-to": scaleMaskImagePosition() }],
|
|
3871
|
+
"mask-image-radial-from-color": [{ "mask-radial-from": scaleColor() }],
|
|
3872
|
+
"mask-image-radial-to-color": [{ "mask-radial-to": scaleColor() }],
|
|
3873
|
+
"mask-image-radial-shape": [{ "mask-radial": ["circle", "ellipse"] }],
|
|
3874
|
+
"mask-image-radial-size": [{ "mask-radial": [{
|
|
3875
|
+
closest: ["side", "corner"],
|
|
3876
|
+
farthest: ["side", "corner"]
|
|
3877
|
+
}] }],
|
|
3878
|
+
"mask-image-radial-pos": [{ "mask-radial-at": scalePosition() }],
|
|
3879
|
+
"mask-image-conic-pos": [{ "mask-conic": [isNumber] }],
|
|
3880
|
+
"mask-image-conic-from-pos": [{ "mask-conic-from": scaleMaskImagePosition() }],
|
|
3881
|
+
"mask-image-conic-to-pos": [{ "mask-conic-to": scaleMaskImagePosition() }],
|
|
3882
|
+
"mask-image-conic-from-color": [{ "mask-conic-from": scaleColor() }],
|
|
3883
|
+
"mask-image-conic-to-color": [{ "mask-conic-to": scaleColor() }],
|
|
3884
|
+
/**
|
|
3885
|
+
* Mask Mode
|
|
3886
|
+
* @see https://tailwindcss.com/docs/mask-mode
|
|
3887
|
+
*/
|
|
3888
|
+
"mask-mode": [{ mask: [
|
|
3889
|
+
"alpha",
|
|
3890
|
+
"luminance",
|
|
3891
|
+
"match"
|
|
3892
|
+
] }],
|
|
3893
|
+
/**
|
|
3894
|
+
* Mask Origin
|
|
3895
|
+
* @see https://tailwindcss.com/docs/mask-origin
|
|
3896
|
+
*/
|
|
3897
|
+
"mask-origin": [{ "mask-origin": [
|
|
3898
|
+
"border",
|
|
3899
|
+
"padding",
|
|
3900
|
+
"content",
|
|
3901
|
+
"fill",
|
|
3902
|
+
"stroke",
|
|
3903
|
+
"view"
|
|
3904
|
+
] }],
|
|
3905
|
+
/**
|
|
3906
|
+
* Mask Position
|
|
3907
|
+
* @see https://tailwindcss.com/docs/mask-position
|
|
3908
|
+
*/
|
|
3909
|
+
"mask-position": [{ mask: scaleBgPosition() }],
|
|
3910
|
+
/**
|
|
3911
|
+
* Mask Repeat
|
|
3912
|
+
* @see https://tailwindcss.com/docs/mask-repeat
|
|
3913
|
+
*/
|
|
3914
|
+
"mask-repeat": [{ mask: scaleBgRepeat() }],
|
|
3915
|
+
/**
|
|
3916
|
+
* Mask Size
|
|
3917
|
+
* @see https://tailwindcss.com/docs/mask-size
|
|
3918
|
+
*/
|
|
3919
|
+
"mask-size": [{ mask: scaleBgSize() }],
|
|
3920
|
+
/**
|
|
3921
|
+
* Mask Type
|
|
3922
|
+
* @see https://tailwindcss.com/docs/mask-type
|
|
3923
|
+
*/
|
|
3924
|
+
"mask-type": [{ "mask-type": ["alpha", "luminance"] }],
|
|
3925
|
+
/**
|
|
3926
|
+
* Mask Image
|
|
3927
|
+
* @see https://tailwindcss.com/docs/mask-image
|
|
3928
|
+
*/
|
|
3929
|
+
"mask-image": [{ mask: [
|
|
3930
|
+
"none",
|
|
3931
|
+
isArbitraryVariable,
|
|
3932
|
+
isArbitraryValue
|
|
3933
|
+
] }],
|
|
3934
|
+
/**
|
|
3935
|
+
* Filter
|
|
3936
|
+
* @see https://tailwindcss.com/docs/filter
|
|
3937
|
+
*/
|
|
3938
|
+
filter: [{ filter: [
|
|
3939
|
+
"",
|
|
3940
|
+
"none",
|
|
3941
|
+
isArbitraryVariable,
|
|
3942
|
+
isArbitraryValue
|
|
3943
|
+
] }],
|
|
3944
|
+
/**
|
|
3945
|
+
* Blur
|
|
3946
|
+
* @see https://tailwindcss.com/docs/blur
|
|
3947
|
+
*/
|
|
3948
|
+
blur: [{ blur: scaleBlur() }],
|
|
3949
|
+
/**
|
|
3950
|
+
* Brightness
|
|
3951
|
+
* @see https://tailwindcss.com/docs/brightness
|
|
3952
|
+
*/
|
|
3953
|
+
brightness: [{ brightness: [
|
|
3954
|
+
isNumber,
|
|
3955
|
+
isArbitraryVariable,
|
|
3956
|
+
isArbitraryValue
|
|
3957
|
+
] }],
|
|
3958
|
+
/**
|
|
3959
|
+
* Contrast
|
|
3960
|
+
* @see https://tailwindcss.com/docs/contrast
|
|
3961
|
+
*/
|
|
3962
|
+
contrast: [{ contrast: [
|
|
3963
|
+
isNumber,
|
|
3964
|
+
isArbitraryVariable,
|
|
3965
|
+
isArbitraryValue
|
|
3966
|
+
] }],
|
|
3967
|
+
/**
|
|
3968
|
+
* Drop Shadow
|
|
3969
|
+
* @see https://tailwindcss.com/docs/drop-shadow
|
|
3970
|
+
*/
|
|
3971
|
+
"drop-shadow": [{ "drop-shadow": [
|
|
3972
|
+
"",
|
|
3973
|
+
"none",
|
|
3974
|
+
themeDropShadow,
|
|
3975
|
+
isArbitraryVariableShadow,
|
|
3976
|
+
isArbitraryShadow
|
|
3977
|
+
] }],
|
|
3978
|
+
/**
|
|
3979
|
+
* Drop Shadow Color
|
|
3980
|
+
* @see https://tailwindcss.com/docs/filter-drop-shadow#setting-the-shadow-color
|
|
3981
|
+
*/
|
|
3982
|
+
"drop-shadow-color": [{ "drop-shadow": scaleColor() }],
|
|
3983
|
+
/**
|
|
3984
|
+
* Grayscale
|
|
3985
|
+
* @see https://tailwindcss.com/docs/grayscale
|
|
3986
|
+
*/
|
|
3987
|
+
grayscale: [{ grayscale: [
|
|
3988
|
+
"",
|
|
3989
|
+
isNumber,
|
|
3990
|
+
isArbitraryVariable,
|
|
3991
|
+
isArbitraryValue
|
|
3992
|
+
] }],
|
|
3993
|
+
/**
|
|
3994
|
+
* Hue Rotate
|
|
3995
|
+
* @see https://tailwindcss.com/docs/hue-rotate
|
|
3996
|
+
*/
|
|
3997
|
+
"hue-rotate": [{ "hue-rotate": [
|
|
3998
|
+
isNumber,
|
|
3999
|
+
isArbitraryVariable,
|
|
4000
|
+
isArbitraryValue
|
|
4001
|
+
] }],
|
|
4002
|
+
/**
|
|
4003
|
+
* Invert
|
|
4004
|
+
* @see https://tailwindcss.com/docs/invert
|
|
4005
|
+
*/
|
|
4006
|
+
invert: [{ invert: [
|
|
4007
|
+
"",
|
|
4008
|
+
isNumber,
|
|
4009
|
+
isArbitraryVariable,
|
|
4010
|
+
isArbitraryValue
|
|
4011
|
+
] }],
|
|
4012
|
+
/**
|
|
4013
|
+
* Saturate
|
|
4014
|
+
* @see https://tailwindcss.com/docs/saturate
|
|
4015
|
+
*/
|
|
4016
|
+
saturate: [{ saturate: [
|
|
4017
|
+
isNumber,
|
|
4018
|
+
isArbitraryVariable,
|
|
4019
|
+
isArbitraryValue
|
|
4020
|
+
] }],
|
|
4021
|
+
/**
|
|
4022
|
+
* Sepia
|
|
4023
|
+
* @see https://tailwindcss.com/docs/sepia
|
|
4024
|
+
*/
|
|
4025
|
+
sepia: [{ sepia: [
|
|
4026
|
+
"",
|
|
4027
|
+
isNumber,
|
|
4028
|
+
isArbitraryVariable,
|
|
4029
|
+
isArbitraryValue
|
|
4030
|
+
] }],
|
|
4031
|
+
/**
|
|
4032
|
+
* Backdrop Filter
|
|
4033
|
+
* @see https://tailwindcss.com/docs/backdrop-filter
|
|
4034
|
+
*/
|
|
4035
|
+
"backdrop-filter": [{ "backdrop-filter": [
|
|
4036
|
+
"",
|
|
4037
|
+
"none",
|
|
4038
|
+
isArbitraryVariable,
|
|
4039
|
+
isArbitraryValue
|
|
4040
|
+
] }],
|
|
4041
|
+
/**
|
|
4042
|
+
* Backdrop Blur
|
|
4043
|
+
* @see https://tailwindcss.com/docs/backdrop-blur
|
|
4044
|
+
*/
|
|
4045
|
+
"backdrop-blur": [{ "backdrop-blur": scaleBlur() }],
|
|
4046
|
+
/**
|
|
4047
|
+
* Backdrop Brightness
|
|
4048
|
+
* @see https://tailwindcss.com/docs/backdrop-brightness
|
|
4049
|
+
*/
|
|
4050
|
+
"backdrop-brightness": [{ "backdrop-brightness": [
|
|
4051
|
+
isNumber,
|
|
4052
|
+
isArbitraryVariable,
|
|
4053
|
+
isArbitraryValue
|
|
4054
|
+
] }],
|
|
4055
|
+
/**
|
|
4056
|
+
* Backdrop Contrast
|
|
4057
|
+
* @see https://tailwindcss.com/docs/backdrop-contrast
|
|
4058
|
+
*/
|
|
4059
|
+
"backdrop-contrast": [{ "backdrop-contrast": [
|
|
4060
|
+
isNumber,
|
|
4061
|
+
isArbitraryVariable,
|
|
4062
|
+
isArbitraryValue
|
|
4063
|
+
] }],
|
|
4064
|
+
/**
|
|
4065
|
+
* Backdrop Grayscale
|
|
4066
|
+
* @see https://tailwindcss.com/docs/backdrop-grayscale
|
|
4067
|
+
*/
|
|
4068
|
+
"backdrop-grayscale": [{ "backdrop-grayscale": [
|
|
4069
|
+
"",
|
|
4070
|
+
isNumber,
|
|
4071
|
+
isArbitraryVariable,
|
|
4072
|
+
isArbitraryValue
|
|
4073
|
+
] }],
|
|
4074
|
+
/**
|
|
4075
|
+
* Backdrop Hue Rotate
|
|
4076
|
+
* @see https://tailwindcss.com/docs/backdrop-hue-rotate
|
|
4077
|
+
*/
|
|
4078
|
+
"backdrop-hue-rotate": [{ "backdrop-hue-rotate": [
|
|
4079
|
+
isNumber,
|
|
4080
|
+
isArbitraryVariable,
|
|
4081
|
+
isArbitraryValue
|
|
4082
|
+
] }],
|
|
4083
|
+
/**
|
|
4084
|
+
* Backdrop Invert
|
|
4085
|
+
* @see https://tailwindcss.com/docs/backdrop-invert
|
|
4086
|
+
*/
|
|
4087
|
+
"backdrop-invert": [{ "backdrop-invert": [
|
|
4088
|
+
"",
|
|
4089
|
+
isNumber,
|
|
4090
|
+
isArbitraryVariable,
|
|
4091
|
+
isArbitraryValue
|
|
4092
|
+
] }],
|
|
4093
|
+
/**
|
|
4094
|
+
* Backdrop Opacity
|
|
4095
|
+
* @see https://tailwindcss.com/docs/backdrop-opacity
|
|
4096
|
+
*/
|
|
4097
|
+
"backdrop-opacity": [{ "backdrop-opacity": [
|
|
4098
|
+
isNumber,
|
|
4099
|
+
isArbitraryVariable,
|
|
4100
|
+
isArbitraryValue
|
|
4101
|
+
] }],
|
|
4102
|
+
/**
|
|
4103
|
+
* Backdrop Saturate
|
|
4104
|
+
* @see https://tailwindcss.com/docs/backdrop-saturate
|
|
4105
|
+
*/
|
|
4106
|
+
"backdrop-saturate": [{ "backdrop-saturate": [
|
|
4107
|
+
isNumber,
|
|
4108
|
+
isArbitraryVariable,
|
|
4109
|
+
isArbitraryValue
|
|
4110
|
+
] }],
|
|
4111
|
+
/**
|
|
4112
|
+
* Backdrop Sepia
|
|
4113
|
+
* @see https://tailwindcss.com/docs/backdrop-sepia
|
|
4114
|
+
*/
|
|
4115
|
+
"backdrop-sepia": [{ "backdrop-sepia": [
|
|
4116
|
+
"",
|
|
4117
|
+
isNumber,
|
|
4118
|
+
isArbitraryVariable,
|
|
4119
|
+
isArbitraryValue
|
|
4120
|
+
] }],
|
|
4121
|
+
/**
|
|
4122
|
+
* Border Collapse
|
|
4123
|
+
* @see https://tailwindcss.com/docs/border-collapse
|
|
4124
|
+
*/
|
|
4125
|
+
"border-collapse": [{ border: ["collapse", "separate"] }],
|
|
4126
|
+
/**
|
|
4127
|
+
* Border Spacing
|
|
4128
|
+
* @see https://tailwindcss.com/docs/border-spacing
|
|
4129
|
+
*/
|
|
4130
|
+
"border-spacing": [{ "border-spacing": scaleUnambiguousSpacing() }],
|
|
4131
|
+
/**
|
|
4132
|
+
* Border Spacing X
|
|
4133
|
+
* @see https://tailwindcss.com/docs/border-spacing
|
|
4134
|
+
*/
|
|
4135
|
+
"border-spacing-x": [{ "border-spacing-x": scaleUnambiguousSpacing() }],
|
|
4136
|
+
/**
|
|
4137
|
+
* Border Spacing Y
|
|
4138
|
+
* @see https://tailwindcss.com/docs/border-spacing
|
|
4139
|
+
*/
|
|
4140
|
+
"border-spacing-y": [{ "border-spacing-y": scaleUnambiguousSpacing() }],
|
|
4141
|
+
/**
|
|
4142
|
+
* Table Layout
|
|
4143
|
+
* @see https://tailwindcss.com/docs/table-layout
|
|
4144
|
+
*/
|
|
4145
|
+
"table-layout": [{ table: ["auto", "fixed"] }],
|
|
4146
|
+
/**
|
|
4147
|
+
* Caption Side
|
|
4148
|
+
* @see https://tailwindcss.com/docs/caption-side
|
|
4149
|
+
*/
|
|
4150
|
+
caption: [{ caption: ["top", "bottom"] }],
|
|
4151
|
+
/**
|
|
4152
|
+
* Transition Property
|
|
4153
|
+
* @see https://tailwindcss.com/docs/transition-property
|
|
4154
|
+
*/
|
|
4155
|
+
transition: [{ transition: [
|
|
4156
|
+
"",
|
|
4157
|
+
"all",
|
|
4158
|
+
"colors",
|
|
4159
|
+
"opacity",
|
|
4160
|
+
"shadow",
|
|
4161
|
+
"transform",
|
|
4162
|
+
"none",
|
|
4163
|
+
isArbitraryVariable,
|
|
4164
|
+
isArbitraryValue
|
|
4165
|
+
] }],
|
|
4166
|
+
/**
|
|
4167
|
+
* Transition Behavior
|
|
4168
|
+
* @see https://tailwindcss.com/docs/transition-behavior
|
|
4169
|
+
*/
|
|
4170
|
+
"transition-behavior": [{ transition: ["normal", "discrete"] }],
|
|
4171
|
+
/**
|
|
4172
|
+
* Transition Duration
|
|
4173
|
+
* @see https://tailwindcss.com/docs/transition-duration
|
|
4174
|
+
*/
|
|
4175
|
+
duration: [{ duration: [
|
|
4176
|
+
isNumber,
|
|
4177
|
+
"initial",
|
|
4178
|
+
isArbitraryVariable,
|
|
4179
|
+
isArbitraryValue
|
|
4180
|
+
] }],
|
|
4181
|
+
/**
|
|
4182
|
+
* Transition Timing Function
|
|
4183
|
+
* @see https://tailwindcss.com/docs/transition-timing-function
|
|
4184
|
+
*/
|
|
4185
|
+
ease: [{ ease: [
|
|
4186
|
+
"linear",
|
|
4187
|
+
"initial",
|
|
4188
|
+
themeEase,
|
|
4189
|
+
isArbitraryVariable,
|
|
4190
|
+
isArbitraryValue
|
|
4191
|
+
] }],
|
|
4192
|
+
/**
|
|
4193
|
+
* Transition Delay
|
|
4194
|
+
* @see https://tailwindcss.com/docs/transition-delay
|
|
4195
|
+
*/
|
|
4196
|
+
delay: [{ delay: [
|
|
4197
|
+
isNumber,
|
|
4198
|
+
isArbitraryVariable,
|
|
4199
|
+
isArbitraryValue
|
|
4200
|
+
] }],
|
|
4201
|
+
/**
|
|
4202
|
+
* Animation
|
|
4203
|
+
* @see https://tailwindcss.com/docs/animation
|
|
4204
|
+
*/
|
|
4205
|
+
animate: [{ animate: [
|
|
4206
|
+
"none",
|
|
4207
|
+
themeAnimate,
|
|
4208
|
+
isArbitraryVariable,
|
|
4209
|
+
isArbitraryValue
|
|
4210
|
+
] }],
|
|
4211
|
+
/**
|
|
4212
|
+
* Backface Visibility
|
|
4213
|
+
* @see https://tailwindcss.com/docs/backface-visibility
|
|
4214
|
+
*/
|
|
4215
|
+
backface: [{ backface: ["hidden", "visible"] }],
|
|
4216
|
+
/**
|
|
4217
|
+
* Perspective
|
|
4218
|
+
* @see https://tailwindcss.com/docs/perspective
|
|
4219
|
+
*/
|
|
4220
|
+
perspective: [{ perspective: [
|
|
4221
|
+
themePerspective,
|
|
4222
|
+
isArbitraryVariable,
|
|
4223
|
+
isArbitraryValue
|
|
4224
|
+
] }],
|
|
4225
|
+
/**
|
|
4226
|
+
* Perspective Origin
|
|
4227
|
+
* @see https://tailwindcss.com/docs/perspective-origin
|
|
4228
|
+
*/
|
|
4229
|
+
"perspective-origin": [{ "perspective-origin": scalePositionWithArbitrary() }],
|
|
4230
|
+
/**
|
|
4231
|
+
* Rotate
|
|
4232
|
+
* @see https://tailwindcss.com/docs/rotate
|
|
4233
|
+
*/
|
|
4234
|
+
rotate: [{ rotate: scaleRotate() }],
|
|
4235
|
+
/**
|
|
4236
|
+
* Rotate X
|
|
4237
|
+
* @see https://tailwindcss.com/docs/rotate
|
|
4238
|
+
*/
|
|
4239
|
+
"rotate-x": [{ "rotate-x": scaleRotate() }],
|
|
4240
|
+
/**
|
|
4241
|
+
* Rotate Y
|
|
4242
|
+
* @see https://tailwindcss.com/docs/rotate
|
|
4243
|
+
*/
|
|
4244
|
+
"rotate-y": [{ "rotate-y": scaleRotate() }],
|
|
4245
|
+
/**
|
|
4246
|
+
* Rotate Z
|
|
4247
|
+
* @see https://tailwindcss.com/docs/rotate
|
|
4248
|
+
*/
|
|
4249
|
+
"rotate-z": [{ "rotate-z": scaleRotate() }],
|
|
4250
|
+
/**
|
|
4251
|
+
* Scale
|
|
4252
|
+
* @see https://tailwindcss.com/docs/scale
|
|
4253
|
+
*/
|
|
4254
|
+
scale: [{ scale: scaleScale() }],
|
|
4255
|
+
/**
|
|
4256
|
+
* Scale X
|
|
4257
|
+
* @see https://tailwindcss.com/docs/scale
|
|
4258
|
+
*/
|
|
4259
|
+
"scale-x": [{ "scale-x": scaleScale() }],
|
|
4260
|
+
/**
|
|
4261
|
+
* Scale Y
|
|
4262
|
+
* @see https://tailwindcss.com/docs/scale
|
|
4263
|
+
*/
|
|
4264
|
+
"scale-y": [{ "scale-y": scaleScale() }],
|
|
4265
|
+
/**
|
|
4266
|
+
* Scale Z
|
|
4267
|
+
* @see https://tailwindcss.com/docs/scale
|
|
4268
|
+
*/
|
|
4269
|
+
"scale-z": [{ "scale-z": scaleScale() }],
|
|
4270
|
+
/**
|
|
4271
|
+
* Scale 3D
|
|
4272
|
+
* @see https://tailwindcss.com/docs/scale
|
|
4273
|
+
*/
|
|
4274
|
+
"scale-3d": ["scale-3d"],
|
|
4275
|
+
/**
|
|
4276
|
+
* Skew
|
|
4277
|
+
* @see https://tailwindcss.com/docs/skew
|
|
4278
|
+
*/
|
|
4279
|
+
skew: [{ skew: scaleSkew() }],
|
|
4280
|
+
/**
|
|
4281
|
+
* Skew X
|
|
4282
|
+
* @see https://tailwindcss.com/docs/skew
|
|
4283
|
+
*/
|
|
4284
|
+
"skew-x": [{ "skew-x": scaleSkew() }],
|
|
4285
|
+
/**
|
|
4286
|
+
* Skew Y
|
|
4287
|
+
* @see https://tailwindcss.com/docs/skew
|
|
4288
|
+
*/
|
|
4289
|
+
"skew-y": [{ "skew-y": scaleSkew() }],
|
|
4290
|
+
/**
|
|
4291
|
+
* Transform
|
|
4292
|
+
* @see https://tailwindcss.com/docs/transform
|
|
4293
|
+
*/
|
|
4294
|
+
transform: [{ transform: [
|
|
4295
|
+
isArbitraryVariable,
|
|
4296
|
+
isArbitraryValue,
|
|
4297
|
+
"",
|
|
4298
|
+
"none",
|
|
4299
|
+
"gpu",
|
|
4300
|
+
"cpu"
|
|
4301
|
+
] }],
|
|
4302
|
+
/**
|
|
4303
|
+
* Transform Origin
|
|
4304
|
+
* @see https://tailwindcss.com/docs/transform-origin
|
|
4305
|
+
*/
|
|
4306
|
+
"transform-origin": [{ origin: scalePositionWithArbitrary() }],
|
|
4307
|
+
/**
|
|
4308
|
+
* Transform Style
|
|
4309
|
+
* @see https://tailwindcss.com/docs/transform-style
|
|
4310
|
+
*/
|
|
4311
|
+
"transform-style": [{ transform: ["3d", "flat"] }],
|
|
4312
|
+
/**
|
|
4313
|
+
* Translate
|
|
4314
|
+
* @see https://tailwindcss.com/docs/translate
|
|
4315
|
+
*/
|
|
4316
|
+
translate: [{ translate: scaleTranslate() }],
|
|
4317
|
+
/**
|
|
4318
|
+
* Translate X
|
|
4319
|
+
* @see https://tailwindcss.com/docs/translate
|
|
4320
|
+
*/
|
|
4321
|
+
"translate-x": [{ "translate-x": scaleTranslate() }],
|
|
4322
|
+
/**
|
|
4323
|
+
* Translate Y
|
|
4324
|
+
* @see https://tailwindcss.com/docs/translate
|
|
4325
|
+
*/
|
|
4326
|
+
"translate-y": [{ "translate-y": scaleTranslate() }],
|
|
4327
|
+
/**
|
|
4328
|
+
* Translate Z
|
|
4329
|
+
* @see https://tailwindcss.com/docs/translate
|
|
4330
|
+
*/
|
|
4331
|
+
"translate-z": [{ "translate-z": scaleTranslate() }],
|
|
4332
|
+
/**
|
|
4333
|
+
* Translate None
|
|
4334
|
+
* @see https://tailwindcss.com/docs/translate
|
|
4335
|
+
*/
|
|
4336
|
+
"translate-none": ["translate-none"],
|
|
4337
|
+
/**
|
|
4338
|
+
* Zoom
|
|
4339
|
+
* @see https://tailwindcss.com/docs/zoom
|
|
4340
|
+
*/
|
|
4341
|
+
zoom: [{ zoom: [
|
|
4342
|
+
isInteger,
|
|
4343
|
+
isArbitraryVariable,
|
|
4344
|
+
isArbitraryValue
|
|
4345
|
+
] }],
|
|
4346
|
+
/**
|
|
4347
|
+
* Accent Color
|
|
4348
|
+
* @see https://tailwindcss.com/docs/accent-color
|
|
4349
|
+
*/
|
|
4350
|
+
accent: [{ accent: scaleColor() }],
|
|
4351
|
+
/**
|
|
4352
|
+
* Appearance
|
|
4353
|
+
* @see https://tailwindcss.com/docs/appearance
|
|
4354
|
+
*/
|
|
4355
|
+
appearance: [{ appearance: ["none", "auto"] }],
|
|
4356
|
+
/**
|
|
4357
|
+
* Caret Color
|
|
4358
|
+
* @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
|
|
4359
|
+
*/
|
|
4360
|
+
"caret-color": [{ caret: scaleColor() }],
|
|
4361
|
+
/**
|
|
4362
|
+
* Color Scheme
|
|
4363
|
+
* @see https://tailwindcss.com/docs/color-scheme
|
|
4364
|
+
*/
|
|
4365
|
+
"color-scheme": [{ scheme: [
|
|
4366
|
+
"normal",
|
|
4367
|
+
"dark",
|
|
4368
|
+
"light",
|
|
4369
|
+
"light-dark",
|
|
4370
|
+
"only-dark",
|
|
4371
|
+
"only-light"
|
|
4372
|
+
] }],
|
|
4373
|
+
/**
|
|
4374
|
+
* Cursor
|
|
4375
|
+
* @see https://tailwindcss.com/docs/cursor
|
|
4376
|
+
*/
|
|
4377
|
+
cursor: [{ cursor: [
|
|
4378
|
+
"auto",
|
|
4379
|
+
"default",
|
|
4380
|
+
"pointer",
|
|
4381
|
+
"wait",
|
|
4382
|
+
"text",
|
|
4383
|
+
"move",
|
|
4384
|
+
"help",
|
|
4385
|
+
"not-allowed",
|
|
4386
|
+
"none",
|
|
4387
|
+
"context-menu",
|
|
4388
|
+
"progress",
|
|
4389
|
+
"cell",
|
|
4390
|
+
"crosshair",
|
|
4391
|
+
"vertical-text",
|
|
4392
|
+
"alias",
|
|
4393
|
+
"copy",
|
|
4394
|
+
"no-drop",
|
|
4395
|
+
"grab",
|
|
4396
|
+
"grabbing",
|
|
4397
|
+
"all-scroll",
|
|
4398
|
+
"col-resize",
|
|
4399
|
+
"row-resize",
|
|
4400
|
+
"n-resize",
|
|
4401
|
+
"e-resize",
|
|
4402
|
+
"s-resize",
|
|
4403
|
+
"w-resize",
|
|
4404
|
+
"ne-resize",
|
|
4405
|
+
"nw-resize",
|
|
4406
|
+
"se-resize",
|
|
4407
|
+
"sw-resize",
|
|
4408
|
+
"ew-resize",
|
|
4409
|
+
"ns-resize",
|
|
4410
|
+
"nesw-resize",
|
|
4411
|
+
"nwse-resize",
|
|
4412
|
+
"zoom-in",
|
|
4413
|
+
"zoom-out",
|
|
4414
|
+
isArbitraryVariable,
|
|
4415
|
+
isArbitraryValue
|
|
4416
|
+
] }],
|
|
4417
|
+
/**
|
|
4418
|
+
* Field Sizing
|
|
4419
|
+
* @see https://tailwindcss.com/docs/field-sizing
|
|
4420
|
+
*/
|
|
4421
|
+
"field-sizing": [{ "field-sizing": ["fixed", "content"] }],
|
|
4422
|
+
/**
|
|
4423
|
+
* Pointer Events
|
|
4424
|
+
* @see https://tailwindcss.com/docs/pointer-events
|
|
4425
|
+
*/
|
|
4426
|
+
"pointer-events": [{ "pointer-events": ["auto", "none"] }],
|
|
4427
|
+
/**
|
|
4428
|
+
* Resize
|
|
4429
|
+
* @see https://tailwindcss.com/docs/resize
|
|
4430
|
+
*/
|
|
4431
|
+
resize: [{ resize: [
|
|
4432
|
+
"none",
|
|
4433
|
+
"",
|
|
4434
|
+
"y",
|
|
4435
|
+
"x"
|
|
4436
|
+
] }],
|
|
4437
|
+
/**
|
|
4438
|
+
* Scroll Behavior
|
|
4439
|
+
* @see https://tailwindcss.com/docs/scroll-behavior
|
|
4440
|
+
*/
|
|
4441
|
+
"scroll-behavior": [{ scroll: ["auto", "smooth"] }],
|
|
4442
|
+
/**
|
|
4443
|
+
* Scrollbar Thumb Color
|
|
4444
|
+
* @see https://tailwindcss.com/docs/scrollbar-color
|
|
4445
|
+
*/
|
|
4446
|
+
"scrollbar-thumb-color": [{ "scrollbar-thumb": scaleColor() }],
|
|
4447
|
+
/**
|
|
4448
|
+
* Scrollbar Track Color
|
|
4449
|
+
* @see https://tailwindcss.com/docs/scrollbar-color
|
|
4450
|
+
*/
|
|
4451
|
+
"scrollbar-track-color": [{ "scrollbar-track": scaleColor() }],
|
|
4452
|
+
/**
|
|
4453
|
+
* Scrollbar Gutter
|
|
4454
|
+
* @see https://tailwindcss.com/docs/scrollbar-gutter
|
|
4455
|
+
*/
|
|
4456
|
+
"scrollbar-gutter": [{ "scrollbar-gutter": [
|
|
4457
|
+
"auto",
|
|
4458
|
+
"stable",
|
|
4459
|
+
"both"
|
|
4460
|
+
] }],
|
|
4461
|
+
/**
|
|
4462
|
+
* Scrollbar Width
|
|
4463
|
+
* @see https://tailwindcss.com/docs/scrollbar-width
|
|
4464
|
+
*/
|
|
4465
|
+
"scrollbar-w": [{ scrollbar: [
|
|
4466
|
+
"auto",
|
|
4467
|
+
"thin",
|
|
4468
|
+
"none"
|
|
4469
|
+
] }],
|
|
4470
|
+
/**
|
|
4471
|
+
* Scroll Margin
|
|
4472
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4473
|
+
*/
|
|
4474
|
+
"scroll-m": [{ "scroll-m": scaleUnambiguousSpacing() }],
|
|
4475
|
+
/**
|
|
4476
|
+
* Scroll Margin Inline
|
|
4477
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4478
|
+
*/
|
|
4479
|
+
"scroll-mx": [{ "scroll-mx": scaleUnambiguousSpacing() }],
|
|
4480
|
+
/**
|
|
4481
|
+
* Scroll Margin Block
|
|
4482
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4483
|
+
*/
|
|
4484
|
+
"scroll-my": [{ "scroll-my": scaleUnambiguousSpacing() }],
|
|
4485
|
+
/**
|
|
4486
|
+
* Scroll Margin Inline Start
|
|
4487
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4488
|
+
*/
|
|
4489
|
+
"scroll-ms": [{ "scroll-ms": scaleUnambiguousSpacing() }],
|
|
4490
|
+
/**
|
|
4491
|
+
* Scroll Margin Inline End
|
|
4492
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4493
|
+
*/
|
|
4494
|
+
"scroll-me": [{ "scroll-me": scaleUnambiguousSpacing() }],
|
|
4495
|
+
/**
|
|
4496
|
+
* Scroll Margin Block Start
|
|
4497
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4498
|
+
*/
|
|
4499
|
+
"scroll-mbs": [{ "scroll-mbs": scaleUnambiguousSpacing() }],
|
|
4500
|
+
/**
|
|
4501
|
+
* Scroll Margin Block End
|
|
4502
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4503
|
+
*/
|
|
4504
|
+
"scroll-mbe": [{ "scroll-mbe": scaleUnambiguousSpacing() }],
|
|
4505
|
+
/**
|
|
4506
|
+
* Scroll Margin Top
|
|
4507
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4508
|
+
*/
|
|
4509
|
+
"scroll-mt": [{ "scroll-mt": scaleUnambiguousSpacing() }],
|
|
4510
|
+
/**
|
|
4511
|
+
* Scroll Margin Right
|
|
4512
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4513
|
+
*/
|
|
4514
|
+
"scroll-mr": [{ "scroll-mr": scaleUnambiguousSpacing() }],
|
|
4515
|
+
/**
|
|
4516
|
+
* Scroll Margin Bottom
|
|
4517
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4518
|
+
*/
|
|
4519
|
+
"scroll-mb": [{ "scroll-mb": scaleUnambiguousSpacing() }],
|
|
4520
|
+
/**
|
|
4521
|
+
* Scroll Margin Left
|
|
4522
|
+
* @see https://tailwindcss.com/docs/scroll-margin
|
|
4523
|
+
*/
|
|
4524
|
+
"scroll-ml": [{ "scroll-ml": scaleUnambiguousSpacing() }],
|
|
4525
|
+
/**
|
|
4526
|
+
* Scroll Padding
|
|
4527
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4528
|
+
*/
|
|
4529
|
+
"scroll-p": [{ "scroll-p": scaleUnambiguousSpacing() }],
|
|
4530
|
+
/**
|
|
4531
|
+
* Scroll Padding Inline
|
|
4532
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4533
|
+
*/
|
|
4534
|
+
"scroll-px": [{ "scroll-px": scaleUnambiguousSpacing() }],
|
|
4535
|
+
/**
|
|
4536
|
+
* Scroll Padding Block
|
|
4537
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4538
|
+
*/
|
|
4539
|
+
"scroll-py": [{ "scroll-py": scaleUnambiguousSpacing() }],
|
|
4540
|
+
/**
|
|
4541
|
+
* Scroll Padding Inline Start
|
|
4542
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4543
|
+
*/
|
|
4544
|
+
"scroll-ps": [{ "scroll-ps": scaleUnambiguousSpacing() }],
|
|
4545
|
+
/**
|
|
4546
|
+
* Scroll Padding Inline End
|
|
4547
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4548
|
+
*/
|
|
4549
|
+
"scroll-pe": [{ "scroll-pe": scaleUnambiguousSpacing() }],
|
|
4550
|
+
/**
|
|
4551
|
+
* Scroll Padding Block Start
|
|
4552
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4553
|
+
*/
|
|
4554
|
+
"scroll-pbs": [{ "scroll-pbs": scaleUnambiguousSpacing() }],
|
|
4555
|
+
/**
|
|
4556
|
+
* Scroll Padding Block End
|
|
4557
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4558
|
+
*/
|
|
4559
|
+
"scroll-pbe": [{ "scroll-pbe": scaleUnambiguousSpacing() }],
|
|
4560
|
+
/**
|
|
4561
|
+
* Scroll Padding Top
|
|
4562
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4563
|
+
*/
|
|
4564
|
+
"scroll-pt": [{ "scroll-pt": scaleUnambiguousSpacing() }],
|
|
4565
|
+
/**
|
|
4566
|
+
* Scroll Padding Right
|
|
4567
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4568
|
+
*/
|
|
4569
|
+
"scroll-pr": [{ "scroll-pr": scaleUnambiguousSpacing() }],
|
|
4570
|
+
/**
|
|
4571
|
+
* Scroll Padding Bottom
|
|
4572
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4573
|
+
*/
|
|
4574
|
+
"scroll-pb": [{ "scroll-pb": scaleUnambiguousSpacing() }],
|
|
4575
|
+
/**
|
|
4576
|
+
* Scroll Padding Left
|
|
4577
|
+
* @see https://tailwindcss.com/docs/scroll-padding
|
|
4578
|
+
*/
|
|
4579
|
+
"scroll-pl": [{ "scroll-pl": scaleUnambiguousSpacing() }],
|
|
4580
|
+
/**
|
|
4581
|
+
* Scroll Snap Align
|
|
4582
|
+
* @see https://tailwindcss.com/docs/scroll-snap-align
|
|
4583
|
+
*/
|
|
4584
|
+
"snap-align": [{ snap: [
|
|
4585
|
+
"start",
|
|
4586
|
+
"end",
|
|
4587
|
+
"center",
|
|
4588
|
+
"align-none"
|
|
4589
|
+
] }],
|
|
4590
|
+
/**
|
|
4591
|
+
* Scroll Snap Stop
|
|
4592
|
+
* @see https://tailwindcss.com/docs/scroll-snap-stop
|
|
4593
|
+
*/
|
|
4594
|
+
"snap-stop": [{ snap: ["normal", "always"] }],
|
|
4595
|
+
/**
|
|
4596
|
+
* Scroll Snap Type
|
|
4597
|
+
* @see https://tailwindcss.com/docs/scroll-snap-type
|
|
4598
|
+
*/
|
|
4599
|
+
"snap-type": [{ snap: [
|
|
4600
|
+
"none",
|
|
4601
|
+
"x",
|
|
4602
|
+
"y",
|
|
4603
|
+
"both"
|
|
4604
|
+
] }],
|
|
4605
|
+
/**
|
|
4606
|
+
* Scroll Snap Type Strictness
|
|
4607
|
+
* @see https://tailwindcss.com/docs/scroll-snap-type
|
|
4608
|
+
*/
|
|
4609
|
+
"snap-strictness": [{ snap: ["mandatory", "proximity"] }],
|
|
4610
|
+
/**
|
|
4611
|
+
* Touch Action
|
|
4612
|
+
* @see https://tailwindcss.com/docs/touch-action
|
|
4613
|
+
*/
|
|
4614
|
+
touch: [{ touch: [
|
|
4615
|
+
"auto",
|
|
4616
|
+
"none",
|
|
4617
|
+
"manipulation"
|
|
4618
|
+
] }],
|
|
4619
|
+
/**
|
|
4620
|
+
* Touch Action X
|
|
4621
|
+
* @see https://tailwindcss.com/docs/touch-action
|
|
4622
|
+
*/
|
|
4623
|
+
"touch-x": [{ "touch-pan": [
|
|
4624
|
+
"x",
|
|
4625
|
+
"left",
|
|
4626
|
+
"right"
|
|
4627
|
+
] }],
|
|
4628
|
+
/**
|
|
4629
|
+
* Touch Action Y
|
|
4630
|
+
* @see https://tailwindcss.com/docs/touch-action
|
|
4631
|
+
*/
|
|
4632
|
+
"touch-y": [{ "touch-pan": [
|
|
4633
|
+
"y",
|
|
4634
|
+
"up",
|
|
4635
|
+
"down"
|
|
4636
|
+
] }],
|
|
4637
|
+
/**
|
|
4638
|
+
* Touch Action Pinch Zoom
|
|
4639
|
+
* @see https://tailwindcss.com/docs/touch-action
|
|
4640
|
+
*/
|
|
4641
|
+
"touch-pz": ["touch-pinch-zoom"],
|
|
4642
|
+
/**
|
|
4643
|
+
* User Select
|
|
4644
|
+
* @see https://tailwindcss.com/docs/user-select
|
|
4645
|
+
*/
|
|
4646
|
+
select: [{ select: [
|
|
4647
|
+
"none",
|
|
4648
|
+
"text",
|
|
4649
|
+
"all",
|
|
4650
|
+
"auto"
|
|
4651
|
+
] }],
|
|
4652
|
+
/**
|
|
4653
|
+
* Will Change
|
|
4654
|
+
* @see https://tailwindcss.com/docs/will-change
|
|
4655
|
+
*/
|
|
4656
|
+
"will-change": [{ "will-change": [
|
|
4657
|
+
"auto",
|
|
4658
|
+
"scroll",
|
|
4659
|
+
"contents",
|
|
4660
|
+
"transform",
|
|
4661
|
+
isArbitraryVariable,
|
|
4662
|
+
isArbitraryValue
|
|
4663
|
+
] }],
|
|
4664
|
+
/**
|
|
4665
|
+
* Fill
|
|
4666
|
+
* @see https://tailwindcss.com/docs/fill
|
|
4667
|
+
*/
|
|
4668
|
+
fill: [{ fill: ["none", ...scaleColor()] }],
|
|
4669
|
+
/**
|
|
4670
|
+
* Stroke Width
|
|
4671
|
+
* @see https://tailwindcss.com/docs/stroke-width
|
|
4672
|
+
*/
|
|
4673
|
+
"stroke-w": [{ stroke: [
|
|
4674
|
+
isNumber,
|
|
4675
|
+
isArbitraryVariableLength,
|
|
4676
|
+
isArbitraryLength,
|
|
4677
|
+
isArbitraryNumber
|
|
4678
|
+
] }],
|
|
4679
|
+
/**
|
|
4680
|
+
* Stroke
|
|
4681
|
+
* @see https://tailwindcss.com/docs/stroke
|
|
4682
|
+
*/
|
|
4683
|
+
stroke: [{ stroke: ["none", ...scaleColor()] }],
|
|
4684
|
+
/**
|
|
4685
|
+
* Forced Color Adjust
|
|
4686
|
+
* @see https://tailwindcss.com/docs/forced-color-adjust
|
|
4687
|
+
*/
|
|
4688
|
+
"forced-color-adjust": [{ "forced-color-adjust": ["auto", "none"] }]
|
|
4689
|
+
},
|
|
4690
|
+
conflictingClassGroups: {
|
|
4691
|
+
"container-named": ["container-type"],
|
|
4692
|
+
overflow: ["overflow-x", "overflow-y"],
|
|
4693
|
+
overscroll: ["overscroll-x", "overscroll-y"],
|
|
4694
|
+
inset: [
|
|
4695
|
+
"inset-x",
|
|
4696
|
+
"inset-y",
|
|
4697
|
+
"inset-bs",
|
|
4698
|
+
"inset-be",
|
|
4699
|
+
"start",
|
|
4700
|
+
"end",
|
|
4701
|
+
"top",
|
|
4702
|
+
"right",
|
|
4703
|
+
"bottom",
|
|
4704
|
+
"left"
|
|
4705
|
+
],
|
|
4706
|
+
"inset-x": ["right", "left"],
|
|
4707
|
+
"inset-y": ["top", "bottom"],
|
|
4708
|
+
flex: [
|
|
4709
|
+
"basis",
|
|
4710
|
+
"grow",
|
|
4711
|
+
"shrink"
|
|
4712
|
+
],
|
|
4713
|
+
gap: ["gap-x", "gap-y"],
|
|
4714
|
+
p: [
|
|
4715
|
+
"px",
|
|
4716
|
+
"py",
|
|
4717
|
+
"ps",
|
|
4718
|
+
"pe",
|
|
4719
|
+
"pbs",
|
|
4720
|
+
"pbe",
|
|
4721
|
+
"pt",
|
|
4722
|
+
"pr",
|
|
4723
|
+
"pb",
|
|
4724
|
+
"pl"
|
|
4725
|
+
],
|
|
4726
|
+
px: ["pr", "pl"],
|
|
4727
|
+
py: ["pt", "pb"],
|
|
4728
|
+
m: [
|
|
4729
|
+
"mx",
|
|
4730
|
+
"my",
|
|
4731
|
+
"ms",
|
|
4732
|
+
"me",
|
|
4733
|
+
"mbs",
|
|
4734
|
+
"mbe",
|
|
4735
|
+
"mt",
|
|
4736
|
+
"mr",
|
|
4737
|
+
"mb",
|
|
4738
|
+
"ml"
|
|
4739
|
+
],
|
|
4740
|
+
mx: ["mr", "ml"],
|
|
4741
|
+
my: ["mt", "mb"],
|
|
4742
|
+
size: ["w", "h"],
|
|
4743
|
+
"font-size": ["leading"],
|
|
4744
|
+
"fvn-normal": [
|
|
4745
|
+
"fvn-ordinal",
|
|
4746
|
+
"fvn-slashed-zero",
|
|
4747
|
+
"fvn-figure",
|
|
4748
|
+
"fvn-spacing",
|
|
4749
|
+
"fvn-fraction"
|
|
4750
|
+
],
|
|
4751
|
+
"fvn-ordinal": ["fvn-normal"],
|
|
4752
|
+
"fvn-slashed-zero": ["fvn-normal"],
|
|
4753
|
+
"fvn-figure": ["fvn-normal"],
|
|
4754
|
+
"fvn-spacing": ["fvn-normal"],
|
|
4755
|
+
"fvn-fraction": ["fvn-normal"],
|
|
4756
|
+
"line-clamp": ["display", "overflow"],
|
|
4757
|
+
rounded: [
|
|
4758
|
+
"rounded-s",
|
|
4759
|
+
"rounded-e",
|
|
4760
|
+
"rounded-t",
|
|
4761
|
+
"rounded-r",
|
|
4762
|
+
"rounded-b",
|
|
4763
|
+
"rounded-l",
|
|
4764
|
+
"rounded-ss",
|
|
4765
|
+
"rounded-se",
|
|
4766
|
+
"rounded-ee",
|
|
4767
|
+
"rounded-es",
|
|
4768
|
+
"rounded-tl",
|
|
4769
|
+
"rounded-tr",
|
|
4770
|
+
"rounded-br",
|
|
4771
|
+
"rounded-bl"
|
|
4772
|
+
],
|
|
4773
|
+
"rounded-s": ["rounded-ss", "rounded-es"],
|
|
4774
|
+
"rounded-e": ["rounded-se", "rounded-ee"],
|
|
4775
|
+
"rounded-t": ["rounded-tl", "rounded-tr"],
|
|
4776
|
+
"rounded-r": ["rounded-tr", "rounded-br"],
|
|
4777
|
+
"rounded-b": ["rounded-br", "rounded-bl"],
|
|
4778
|
+
"rounded-l": ["rounded-tl", "rounded-bl"],
|
|
4779
|
+
"border-spacing": ["border-spacing-x", "border-spacing-y"],
|
|
4780
|
+
"border-w": [
|
|
4781
|
+
"border-w-x",
|
|
4782
|
+
"border-w-y",
|
|
4783
|
+
"border-w-s",
|
|
4784
|
+
"border-w-e",
|
|
4785
|
+
"border-w-bs",
|
|
4786
|
+
"border-w-be",
|
|
4787
|
+
"border-w-t",
|
|
4788
|
+
"border-w-r",
|
|
4789
|
+
"border-w-b",
|
|
4790
|
+
"border-w-l"
|
|
4791
|
+
],
|
|
4792
|
+
"border-w-x": ["border-w-r", "border-w-l"],
|
|
4793
|
+
"border-w-y": ["border-w-t", "border-w-b"],
|
|
4794
|
+
"border-color": [
|
|
4795
|
+
"border-color-x",
|
|
4796
|
+
"border-color-y",
|
|
4797
|
+
"border-color-s",
|
|
4798
|
+
"border-color-e",
|
|
4799
|
+
"border-color-bs",
|
|
4800
|
+
"border-color-be",
|
|
4801
|
+
"border-color-t",
|
|
4802
|
+
"border-color-r",
|
|
4803
|
+
"border-color-b",
|
|
4804
|
+
"border-color-l"
|
|
4805
|
+
],
|
|
4806
|
+
"border-color-x": ["border-color-r", "border-color-l"],
|
|
4807
|
+
"border-color-y": ["border-color-t", "border-color-b"],
|
|
4808
|
+
translate: [
|
|
4809
|
+
"translate-x",
|
|
4810
|
+
"translate-y",
|
|
4811
|
+
"translate-none"
|
|
4812
|
+
],
|
|
4813
|
+
"translate-none": [
|
|
4814
|
+
"translate",
|
|
4815
|
+
"translate-x",
|
|
4816
|
+
"translate-y",
|
|
4817
|
+
"translate-z"
|
|
4818
|
+
],
|
|
4819
|
+
"scroll-m": [
|
|
4820
|
+
"scroll-mx",
|
|
4821
|
+
"scroll-my",
|
|
4822
|
+
"scroll-ms",
|
|
4823
|
+
"scroll-me",
|
|
4824
|
+
"scroll-mbs",
|
|
4825
|
+
"scroll-mbe",
|
|
4826
|
+
"scroll-mt",
|
|
4827
|
+
"scroll-mr",
|
|
4828
|
+
"scroll-mb",
|
|
4829
|
+
"scroll-ml"
|
|
4830
|
+
],
|
|
4831
|
+
"scroll-mx": ["scroll-mr", "scroll-ml"],
|
|
4832
|
+
"scroll-my": ["scroll-mt", "scroll-mb"],
|
|
4833
|
+
"scroll-p": [
|
|
4834
|
+
"scroll-px",
|
|
4835
|
+
"scroll-py",
|
|
4836
|
+
"scroll-ps",
|
|
4837
|
+
"scroll-pe",
|
|
4838
|
+
"scroll-pbs",
|
|
4839
|
+
"scroll-pbe",
|
|
4840
|
+
"scroll-pt",
|
|
4841
|
+
"scroll-pr",
|
|
4842
|
+
"scroll-pb",
|
|
4843
|
+
"scroll-pl"
|
|
4844
|
+
],
|
|
4845
|
+
"scroll-px": ["scroll-pr", "scroll-pl"],
|
|
4846
|
+
"scroll-py": ["scroll-pt", "scroll-pb"],
|
|
4847
|
+
touch: [
|
|
4848
|
+
"touch-x",
|
|
4849
|
+
"touch-y",
|
|
4850
|
+
"touch-pz"
|
|
4851
|
+
],
|
|
4852
|
+
"touch-x": ["touch"],
|
|
4853
|
+
"touch-y": ["touch"],
|
|
4854
|
+
"touch-pz": ["touch"]
|
|
4855
|
+
},
|
|
4856
|
+
conflictingClassGroupModifiers: { "font-size": ["leading"] },
|
|
4857
|
+
postfixLookupClassGroups: ["container-type"],
|
|
4858
|
+
orderSensitiveModifiers: [
|
|
4859
|
+
"*",
|
|
4860
|
+
"**",
|
|
4861
|
+
"after",
|
|
4862
|
+
"backdrop",
|
|
4863
|
+
"before",
|
|
4864
|
+
"details-content",
|
|
4865
|
+
"file",
|
|
4866
|
+
"first-letter",
|
|
4867
|
+
"first-line",
|
|
4868
|
+
"marker",
|
|
4869
|
+
"placeholder",
|
|
4870
|
+
"selection"
|
|
4871
|
+
]
|
|
4872
|
+
};
|
|
4873
|
+
};
|
|
4874
|
+
const twMerge = /*#__PURE__*/ createTailwindMerge(getDefaultConfig);
|
|
4875
|
+
//#endregion
|
|
4876
|
+
//#region ../ui/src/lib/cn.ts
|
|
4877
|
+
function cn(...inputs) {
|
|
4878
|
+
return twMerge(clsx(inputs));
|
|
4879
|
+
}
|
|
4880
|
+
//#endregion
|
|
4881
|
+
//#region ../ui/src/progress.tsx
|
|
4882
|
+
const Progress = forwardRef(function Progress({ className, value, max, size, indeterminate = false, waiting = false, ...props }, ref) {
|
|
4883
|
+
const amount = value ?? 0;
|
|
4884
|
+
const maximum = max ?? 100;
|
|
4885
|
+
const percentage = progressPercentage(amount, maximum);
|
|
4886
|
+
return /* @__PURE__ */ jsx("div", {
|
|
4887
|
+
ref,
|
|
4888
|
+
role: "progressbar",
|
|
4889
|
+
"aria-valuemin": 0,
|
|
4890
|
+
"aria-valuemax": maximum,
|
|
4891
|
+
"aria-valuenow": indeterminate ? void 0 : amount,
|
|
4892
|
+
"data-size": size ?? "default",
|
|
4893
|
+
"data-indeterminate": indeterminate || void 0,
|
|
4894
|
+
"data-waiting": waiting || void 0,
|
|
4895
|
+
className: cn("rb-upload-progress", className),
|
|
4896
|
+
...props,
|
|
4897
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
4898
|
+
className: "rb-upload-progress-fill",
|
|
4899
|
+
style: indeterminate ? void 0 : { width: `${percentage}%` }
|
|
4900
|
+
})
|
|
4901
|
+
});
|
|
4902
|
+
});
|
|
4903
|
+
function progressPercentage(value, max) {
|
|
4904
|
+
return Math.min(Math.max(max > 0 ? value / max * 100 : 0, 0), 100);
|
|
4905
|
+
}
|
|
4906
|
+
//#endregion
|
|
4907
|
+
//#region ../uploads-react/src/components/UploadRow.tsx
|
|
4908
|
+
function UploadThumbnail({ file, failed }) {
|
|
4909
|
+
const [preview, setPreview] = useState(null);
|
|
4910
|
+
useEffect(() => {
|
|
4911
|
+
if (!file.type.startsWith("image/") || typeof URL.createObjectURL !== "function") return;
|
|
4912
|
+
const url = URL.createObjectURL(file);
|
|
4913
|
+
setPreview(url);
|
|
4914
|
+
return () => URL.revokeObjectURL(url);
|
|
4915
|
+
}, [file]);
|
|
4916
|
+
return /* @__PURE__ */ jsx("span", {
|
|
4917
|
+
className: "rb-upload-thumb",
|
|
4918
|
+
"data-failed": failed || void 0,
|
|
4919
|
+
"aria-hidden": "true",
|
|
4920
|
+
children: preview && !failed ? /* @__PURE__ */ jsx("img", {
|
|
4921
|
+
src: preview,
|
|
4922
|
+
onError: () => setPreview(null),
|
|
4923
|
+
alt: ""
|
|
4924
|
+
}) : /* @__PURE__ */ jsx("svg", {
|
|
4925
|
+
width: "15",
|
|
4926
|
+
height: "15",
|
|
4927
|
+
viewBox: "0 0 24 24",
|
|
4928
|
+
fill: "none",
|
|
4929
|
+
stroke: "currentColor",
|
|
4930
|
+
strokeWidth: "1.6",
|
|
4931
|
+
children: failed ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("circle", {
|
|
4932
|
+
cx: "12",
|
|
4933
|
+
cy: "12",
|
|
4934
|
+
r: "9"
|
|
4935
|
+
}), /* @__PURE__ */ jsx("path", { d: "M12 7v6m0 3h.01" })] }) : file.type.startsWith("video/") ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("rect", {
|
|
4936
|
+
x: "3",
|
|
4937
|
+
y: "3",
|
|
4938
|
+
width: "18",
|
|
4939
|
+
height: "18",
|
|
4940
|
+
rx: "2"
|
|
4941
|
+
}), /* @__PURE__ */ jsx("path", { d: "m10 8 6 4-6 4Z" })] }) : file.type.startsWith("image/") ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("rect", {
|
|
4942
|
+
x: "3",
|
|
4943
|
+
y: "3",
|
|
4944
|
+
width: "18",
|
|
4945
|
+
height: "18",
|
|
4946
|
+
rx: "2"
|
|
4947
|
+
}), /* @__PURE__ */ jsx("path", { d: "m3 17 6-6 4 4 3-3 5 5" })] }) : /* @__PURE__ */ jsx("path", { d: "M6 3h8l4 4v14H6Zm8 0v5h4" })
|
|
4948
|
+
})
|
|
4949
|
+
});
|
|
4950
|
+
}
|
|
4951
|
+
const LINK_TEXT = {
|
|
4952
|
+
upgrade: "Upgrade your plan",
|
|
4953
|
+
"sign-in": "Sign in again"
|
|
4954
|
+
};
|
|
4955
|
+
function UploadError({ view, name, retry, hrefs }) {
|
|
4956
|
+
if (!view.message) return null;
|
|
4957
|
+
const href = view.link === "upgrade" ? hrefs.upgradeHref : view.link === "sign-in" ? hrefs.signInHref : void 0;
|
|
4958
|
+
return /* @__PURE__ */ jsxs("p", {
|
|
4959
|
+
className: "rb-upload-error",
|
|
4960
|
+
children: [
|
|
4961
|
+
view.message,
|
|
4962
|
+
" ",
|
|
4963
|
+
view.retry && retry ? /* @__PURE__ */ jsx("button", {
|
|
4964
|
+
type: "button",
|
|
4965
|
+
className: "rb-upload-link",
|
|
4966
|
+
"aria-label": `Try uploading ${name} again`,
|
|
4967
|
+
onClick: retry,
|
|
4968
|
+
children: "Try again"
|
|
4969
|
+
}) : null,
|
|
4970
|
+
view.link ? href ? /* @__PURE__ */ jsx("a", {
|
|
4971
|
+
className: "rb-upload-link",
|
|
4972
|
+
href,
|
|
4973
|
+
children: LINK_TEXT[view.link]
|
|
4974
|
+
}) : LINK_TEXT[view.link] : null,
|
|
4975
|
+
view.suffix
|
|
4976
|
+
]
|
|
4977
|
+
});
|
|
4978
|
+
}
|
|
4979
|
+
function UploadStatusLabel({ view, doneActions }) {
|
|
4980
|
+
return /* @__PURE__ */ jsx("div", {
|
|
4981
|
+
className: "rb-upload-status",
|
|
4982
|
+
children: doneActions ?? /* @__PURE__ */ jsxs(Fragment, { children: [view.status === "done" ? /* @__PURE__ */ jsxs("svg", {
|
|
4983
|
+
className: "rb-upload-done-icon",
|
|
4984
|
+
"aria-hidden": "true",
|
|
4985
|
+
width: "16",
|
|
4986
|
+
height: "16",
|
|
4987
|
+
viewBox: "0 0 16 16",
|
|
4988
|
+
children: [/* @__PURE__ */ jsx("circle", {
|
|
4989
|
+
cx: "8",
|
|
4990
|
+
cy: "8",
|
|
4991
|
+
r: "8",
|
|
4992
|
+
fill: "currentColor"
|
|
4993
|
+
}), /* @__PURE__ */ jsx("path", {
|
|
4994
|
+
d: "m4 8 3 3 5-6",
|
|
4995
|
+
fill: "none",
|
|
4996
|
+
stroke: "var(--card)",
|
|
4997
|
+
strokeWidth: "1.5"
|
|
4998
|
+
})]
|
|
4999
|
+
}) : null, view.label] })
|
|
5000
|
+
});
|
|
5001
|
+
}
|
|
5002
|
+
function UploadAction({ view, name, cancel, dismiss }) {
|
|
5003
|
+
const action = view.action === "cancel" ? cancel : dismiss;
|
|
5004
|
+
if (!view.action || !action) return /* @__PURE__ */ jsx("span", {});
|
|
5005
|
+
return /* @__PURE__ */ jsx("button", {
|
|
5006
|
+
type: "button",
|
|
5007
|
+
className: "rb-upload-icon",
|
|
5008
|
+
"aria-label": view.action === "cancel" ? `Cancel upload of ${name}` : `Dismiss ${name}`,
|
|
5009
|
+
onClick: action,
|
|
5010
|
+
children: /* @__PURE__ */ jsx("svg", {
|
|
5011
|
+
"aria-hidden": "true",
|
|
5012
|
+
width: "14",
|
|
5013
|
+
height: "14",
|
|
5014
|
+
viewBox: "0 0 24 24",
|
|
5015
|
+
fill: "none",
|
|
5016
|
+
stroke: "currentColor",
|
|
5017
|
+
strokeWidth: "1.6",
|
|
5018
|
+
children: /* @__PURE__ */ jsx("path", { d: "m6 6 12 12M6 18 18 6" })
|
|
5019
|
+
})
|
|
5020
|
+
});
|
|
5021
|
+
}
|
|
5022
|
+
function UploadRow({ item, cancel, dismiss, retry, upgradeHref, signInHref, single, leaving, doneActions }) {
|
|
5023
|
+
const view = uploadRowView(item);
|
|
5024
|
+
if (!view) return null;
|
|
5025
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
5026
|
+
className: "rb-upload-row",
|
|
5027
|
+
"data-upload-id": item.id,
|
|
5028
|
+
...uploadRowAttributes(view, single, doneActions, leaving),
|
|
5029
|
+
children: [
|
|
5030
|
+
/* @__PURE__ */ jsx(UploadThumbnail, {
|
|
5031
|
+
file: item.file,
|
|
5032
|
+
failed: item.status === "failed"
|
|
5033
|
+
}),
|
|
5034
|
+
/* @__PURE__ */ jsxs("div", {
|
|
5035
|
+
className: "rb-upload-content",
|
|
5036
|
+
children: [
|
|
5037
|
+
/* @__PURE__ */ jsx("span", {
|
|
5038
|
+
className: "rb-upload-name",
|
|
5039
|
+
title: item.file.name,
|
|
5040
|
+
children: item.file.name
|
|
5041
|
+
}),
|
|
5042
|
+
view.progress ? /* @__PURE__ */ jsx(Progress, {
|
|
5043
|
+
size: "thin",
|
|
5044
|
+
value: (view.progress.fraction ?? 0) * 100,
|
|
5045
|
+
indeterminate: view.progress.fraction === null,
|
|
5046
|
+
waiting: view.progress.waiting,
|
|
5047
|
+
"aria-label": `Uploading ${item.file.name}`
|
|
5048
|
+
}) : null,
|
|
5049
|
+
/* @__PURE__ */ jsx(UploadError, {
|
|
5050
|
+
view,
|
|
5051
|
+
name: item.file.name,
|
|
5052
|
+
retry: retry ? () => retry(item.id) : void 0,
|
|
5053
|
+
hrefs: {
|
|
5054
|
+
upgradeHref,
|
|
5055
|
+
signInHref
|
|
5056
|
+
}
|
|
5057
|
+
})
|
|
5058
|
+
]
|
|
5059
|
+
}),
|
|
5060
|
+
/* @__PURE__ */ jsx(UploadStatusLabel, {
|
|
5061
|
+
view,
|
|
5062
|
+
doneActions
|
|
5063
|
+
}),
|
|
5064
|
+
/* @__PURE__ */ jsx(UploadAction, {
|
|
5065
|
+
view,
|
|
5066
|
+
name: item.file.name,
|
|
5067
|
+
cancel: cancel ? () => cancel(item.id) : void 0,
|
|
5068
|
+
dismiss: dismiss ? () => dismiss(item.id) : void 0
|
|
5069
|
+
})
|
|
5070
|
+
]
|
|
5071
|
+
});
|
|
5072
|
+
}
|
|
5073
|
+
function uploadRowAttributes(view, single, doneActions, leaving) {
|
|
5074
|
+
return {
|
|
5075
|
+
"data-failed": view.status === "failed" || void 0,
|
|
5076
|
+
"data-done": view.status === "done" || void 0,
|
|
5077
|
+
"data-sending": view.status === "sending" || void 0,
|
|
5078
|
+
"data-single": single || void 0,
|
|
5079
|
+
"data-review": !!doneActions || void 0,
|
|
5080
|
+
"data-leaving": leaving || void 0
|
|
5081
|
+
};
|
|
5082
|
+
}
|
|
5083
|
+
//#endregion
|
|
5084
|
+
//#region ../uploads-react/src/components/UploadList.tsx
|
|
5085
|
+
function focusAfterRemoval(root, id, fallback) {
|
|
5086
|
+
if (!root) return;
|
|
5087
|
+
const rows = Array.from(root.querySelectorAll("[data-upload-id]"));
|
|
5088
|
+
const index = rows.findIndex((row) => row.dataset.uploadId === id);
|
|
5089
|
+
const row = rows[index];
|
|
5090
|
+
if (!row || !row.contains(document.activeElement)) return;
|
|
5091
|
+
const next = rows.slice(index + 1).map(rowAction).find(Boolean);
|
|
5092
|
+
const previous = rows.slice(0, index).reverse().map(rowAction).find(Boolean);
|
|
5093
|
+
const target = next ?? previous ?? (rows.length > 1 ? root.querySelector("[data-upload-summary]") : null);
|
|
5094
|
+
if (target) {
|
|
5095
|
+
target.focus();
|
|
5096
|
+
return false;
|
|
5097
|
+
}
|
|
5098
|
+
fallback?.current?.focus();
|
|
5099
|
+
return Boolean(fallback);
|
|
5100
|
+
}
|
|
5101
|
+
function rowAction(row) {
|
|
5102
|
+
return row.querySelector("button, a[href]");
|
|
5103
|
+
}
|
|
5104
|
+
function useSuccessClear(items, enabled, root, dismiss) {
|
|
5105
|
+
const [leaving, setLeaving] = useState(false);
|
|
5106
|
+
const [focused, setFocused] = useState(false);
|
|
5107
|
+
useEffect(() => {
|
|
5108
|
+
const node = root.current;
|
|
5109
|
+
const update = () => setFocused(!!node?.contains(document.activeElement));
|
|
5110
|
+
node?.addEventListener("focusin", update);
|
|
5111
|
+
node?.addEventListener("focusout", update);
|
|
5112
|
+
return () => {
|
|
5113
|
+
node?.removeEventListener("focusin", update);
|
|
5114
|
+
node?.removeEventListener("focusout", update);
|
|
5115
|
+
};
|
|
5116
|
+
}, [root]);
|
|
5117
|
+
useEffect(() => {
|
|
5118
|
+
if (!enabled || focused || !items.length || !items.every((item) => item.status === "done")) {
|
|
5119
|
+
setLeaving(false);
|
|
5120
|
+
return;
|
|
5121
|
+
}
|
|
5122
|
+
const fade = setTimeout(() => setLeaving(true), 4e3);
|
|
5123
|
+
const clear = setTimeout(() => {
|
|
5124
|
+
if (!root.current?.contains(document.activeElement)) items.forEach((item) => dismiss?.(item.id));
|
|
5125
|
+
}, 4320);
|
|
5126
|
+
return () => {
|
|
5127
|
+
clearTimeout(fade);
|
|
5128
|
+
clearTimeout(clear);
|
|
5129
|
+
};
|
|
5130
|
+
}, [
|
|
5131
|
+
items,
|
|
5132
|
+
enabled,
|
|
5133
|
+
focused,
|
|
5134
|
+
dismiss,
|
|
5135
|
+
root
|
|
5136
|
+
]);
|
|
5137
|
+
return leaving;
|
|
5138
|
+
}
|
|
5139
|
+
function UploadList({ items, cancel, dismiss, retry, announcement = "", upgradeHref, signInHref, className, clearAfterSuccess = false, focusFallback, renderDoneActions, single = false }) {
|
|
5140
|
+
const root = useRef(null);
|
|
5141
|
+
const pendingFocus = useRef(false);
|
|
5142
|
+
const id = useId();
|
|
5143
|
+
const [collapsed, setCollapsed] = useState(() => typeof window !== "undefined" && window.matchMedia("(max-width: 639px)").matches);
|
|
5144
|
+
const [overflow, setOverflow] = useState(false);
|
|
5145
|
+
const list = useRef(null);
|
|
5146
|
+
const visible = items.filter((item) => item.status !== "cancelling");
|
|
5147
|
+
const summary = summariseUploads(items);
|
|
5148
|
+
const leaving = useSuccessClear(items, clearAfterSuccess, root, dismiss);
|
|
5149
|
+
const remove = (action) => (rowId) => {
|
|
5150
|
+
pendingFocus.current = Boolean(focusAfterRemoval(root.current, rowId, focusFallback));
|
|
5151
|
+
action?.(rowId);
|
|
5152
|
+
};
|
|
5153
|
+
useEffect(() => {
|
|
5154
|
+
const target = focusFallback?.current;
|
|
5155
|
+
if (pendingFocus.current && target?.isConnected && !target.matches(":disabled")) {
|
|
5156
|
+
target.focus();
|
|
5157
|
+
pendingFocus.current = false;
|
|
5158
|
+
}
|
|
5159
|
+
});
|
|
5160
|
+
useEffect(() => {
|
|
5161
|
+
const node = list.current;
|
|
5162
|
+
const update = () => setOverflow(!!node && node.scrollHeight > node.clientHeight && node.scrollTop + node.clientHeight < node.scrollHeight - 1);
|
|
5163
|
+
update();
|
|
5164
|
+
node?.addEventListener("scroll", update);
|
|
5165
|
+
return () => node?.removeEventListener("scroll", update);
|
|
5166
|
+
}, [items]);
|
|
5167
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
5168
|
+
ref: root,
|
|
5169
|
+
className: cn("rb-upload-list bg-[var(--upload-tray)]", className),
|
|
5170
|
+
"data-phone-collapsed": phoneCollapsed(single, collapsed),
|
|
5171
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
5172
|
+
className: "rb-upload-announcement",
|
|
5173
|
+
"aria-live": "polite",
|
|
5174
|
+
"aria-atomic": "true",
|
|
5175
|
+
children: announcement
|
|
5176
|
+
}), visible.length ? /* @__PURE__ */ jsxs(Fragment, { children: [!single ? /* @__PURE__ */ jsxs("button", {
|
|
5177
|
+
type: "button",
|
|
5178
|
+
className: "rb-upload-summary",
|
|
5179
|
+
"data-upload-summary": true,
|
|
5180
|
+
"aria-controls": id,
|
|
5181
|
+
"aria-expanded": !collapsed,
|
|
5182
|
+
onClick: () => setCollapsed((value) => !value),
|
|
5183
|
+
children: [
|
|
5184
|
+
/* @__PURE__ */ jsx("strong", {
|
|
5185
|
+
className: "font-semibold",
|
|
5186
|
+
children: summary.label
|
|
5187
|
+
}),
|
|
5188
|
+
summary.detail ? /* @__PURE__ */ jsx("span", {
|
|
5189
|
+
className: "rb-upload-summary-detail text-[12.5px] text-muted-foreground",
|
|
5190
|
+
children: summary.detail
|
|
5191
|
+
}) : null,
|
|
5192
|
+
/* @__PURE__ */ jsx("span", {
|
|
5193
|
+
className: "rb-upload-summary-bar",
|
|
5194
|
+
children: /* @__PURE__ */ jsx(Progress, {
|
|
5195
|
+
size: "thin",
|
|
5196
|
+
value: summary.fraction * 100,
|
|
5197
|
+
"aria-label": summary.label
|
|
5198
|
+
})
|
|
5199
|
+
}),
|
|
5200
|
+
/* @__PURE__ */ jsx("span", {
|
|
5201
|
+
className: "rb-upload-icon ml-auto",
|
|
5202
|
+
children: /* @__PURE__ */ jsx("svg", {
|
|
5203
|
+
"aria-hidden": "true",
|
|
5204
|
+
width: "16",
|
|
5205
|
+
height: "16",
|
|
5206
|
+
viewBox: "0 0 24 24",
|
|
5207
|
+
fill: "none",
|
|
5208
|
+
stroke: "currentColor",
|
|
5209
|
+
strokeWidth: "1.6",
|
|
5210
|
+
children: /* @__PURE__ */ jsx("path", { d: collapsed ? "m6 15 6-6 6 6" : "m6 9 6 6 6-6" })
|
|
5211
|
+
})
|
|
5212
|
+
})
|
|
5213
|
+
]
|
|
5214
|
+
}) : null, /* @__PURE__ */ jsx("div", {
|
|
5215
|
+
ref: list,
|
|
5216
|
+
id,
|
|
5217
|
+
className: "rb-upload-scroll",
|
|
5218
|
+
hidden: !single && collapsed === true,
|
|
5219
|
+
"data-overflow": overflow || void 0,
|
|
5220
|
+
children: visible.map((item) => /* @__PURE__ */ jsx(UploadRow, {
|
|
5221
|
+
single,
|
|
5222
|
+
item,
|
|
5223
|
+
cancel: remove(cancel),
|
|
5224
|
+
dismiss: remove(dismiss),
|
|
5225
|
+
retry,
|
|
5226
|
+
upgradeHref,
|
|
5227
|
+
signInHref,
|
|
5228
|
+
leaving,
|
|
5229
|
+
doneActions: item.status === "done" ? renderDoneActions?.(item) : void 0
|
|
5230
|
+
}, item.id))
|
|
5231
|
+
})] }) : null]
|
|
5232
|
+
});
|
|
5233
|
+
}
|
|
5234
|
+
function phoneCollapsed(single, collapsed) {
|
|
5235
|
+
return !single && collapsed || void 0;
|
|
5236
|
+
}
|
|
5237
|
+
//#endregion
|
|
5238
|
+
//#region ../blocks/src/customer-portal/components/bookings/PortalDocumentField.tsx
|
|
5239
|
+
function acceptedDocumentExtensions(field) {
|
|
5240
|
+
return field.allowedFileTypes.flatMap((type) => type === "pdf" ? [".pdf"] : type === "docx" ? [".docx"] : [
|
|
5241
|
+
".jpg",
|
|
5242
|
+
".jpeg",
|
|
5243
|
+
".png",
|
|
5244
|
+
".webp",
|
|
5245
|
+
".heic",
|
|
5246
|
+
".heif"
|
|
5247
|
+
]);
|
|
5248
|
+
}
|
|
5249
|
+
function admitPortalDocument(file, field) {
|
|
5250
|
+
if (file.size > field.maxBytes) return {
|
|
5251
|
+
tag: "rejected",
|
|
5252
|
+
failure: {
|
|
5253
|
+
tag: "not-allowed",
|
|
5254
|
+
reason: "size",
|
|
5255
|
+
limitBytes: field.maxBytes,
|
|
5256
|
+
kindLabel: "documents"
|
|
5257
|
+
}
|
|
5258
|
+
};
|
|
5259
|
+
return acceptedDocumentExtensions(field).some((extension) => file.name.toLowerCase().endsWith(extension)) ? { tag: "accepted" } : {
|
|
5260
|
+
tag: "rejected",
|
|
5261
|
+
failure: {
|
|
5262
|
+
tag: "not-allowed",
|
|
5263
|
+
reason: "kind",
|
|
5264
|
+
allowed: field.allowedFileTypes.map((type) => type === "pdf" ? "PDF files" : type === "docx" ? ".docx files" : "images").join(" or ")
|
|
5265
|
+
}
|
|
5266
|
+
};
|
|
5267
|
+
}
|
|
5268
|
+
function createWorkflow(field, callbacks) {
|
|
5269
|
+
return {
|
|
5270
|
+
doneLabel: "Uploaded",
|
|
5271
|
+
async send(file, io) {
|
|
5272
|
+
const { uploadId, signedUrl } = await callbacks.createUploadUrl({
|
|
5273
|
+
fieldId: field.id,
|
|
5274
|
+
filename: file.name,
|
|
5275
|
+
bytes: file.size
|
|
5276
|
+
});
|
|
5277
|
+
await putBlobToSignedUrl({
|
|
5278
|
+
signedUrl,
|
|
5279
|
+
body: file,
|
|
5280
|
+
contentType: file.type || "application/octet-stream",
|
|
5281
|
+
signal: io.signal,
|
|
5282
|
+
onProgress: (fraction) => io.report({
|
|
5283
|
+
phase: "sending",
|
|
5284
|
+
fraction
|
|
5285
|
+
})
|
|
5286
|
+
});
|
|
5287
|
+
return uploadId;
|
|
5288
|
+
},
|
|
5289
|
+
complete: (uploadId) => callbacks.finalizeUpload({
|
|
5290
|
+
fieldId: field.id,
|
|
5291
|
+
uploadId
|
|
5292
|
+
}),
|
|
5293
|
+
classify: (error) => classifyUploadFailureWithLimit(error, {
|
|
5294
|
+
limitBytes: field.maxBytes,
|
|
5295
|
+
kindLabel: "documents"
|
|
5296
|
+
})
|
|
5297
|
+
};
|
|
5298
|
+
}
|
|
5299
|
+
/** The portal's magic-link sign-in is this page: once the session has gone, reloading it offers the sign-in form. */
|
|
5300
|
+
function portalSignInHref() {
|
|
5301
|
+
return typeof window === "undefined" ? void 0 : window.location.pathname;
|
|
5302
|
+
}
|
|
5303
|
+
function PortalDocumentField({ field, value, disabled, error, onChange, onBusyChange, ...callbacks }) {
|
|
5304
|
+
const chooser = React$1.useRef(null);
|
|
5305
|
+
const busyCallback = React$1.useRef(onBusyChange);
|
|
5306
|
+
React$1.useEffect(() => {
|
|
5307
|
+
busyCallback.current = onBusyChange;
|
|
5308
|
+
}, [onBusyChange]);
|
|
5309
|
+
const uploads = useUploads({
|
|
5310
|
+
workflow: React$1.useMemo(() => createWorkflow(field, callbacks), [
|
|
5311
|
+
field,
|
|
5312
|
+
callbacks.createUploadUrl,
|
|
5313
|
+
callbacks.finalizeUpload
|
|
5314
|
+
]),
|
|
5315
|
+
admission: "replace",
|
|
5316
|
+
maxParallel: 1,
|
|
5317
|
+
admit: (file) => admitPortalDocument(file, field),
|
|
5318
|
+
onComplete: onChange
|
|
5319
|
+
});
|
|
5320
|
+
const busy = uploads.items.some(isUploadBusy);
|
|
5321
|
+
React$1.useEffect(() => {
|
|
5322
|
+
busyCallback.current(busy);
|
|
5323
|
+
}, [busy]);
|
|
5324
|
+
React$1.useEffect(() => () => busyCallback.current(false), []);
|
|
5325
|
+
const documentValue = asDocumentAnswer(value);
|
|
5326
|
+
const showsDocument = uploads.items.some((item) => item.status === "done");
|
|
5327
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
5328
|
+
className: "cp-upload-field",
|
|
5329
|
+
children: [
|
|
5330
|
+
!disabled ? /* @__PURE__ */ jsx(ThemedFileChooser, {
|
|
5331
|
+
variant: "outline",
|
|
5332
|
+
size: "sm",
|
|
5333
|
+
extraClassName: "cp-upload-trigger",
|
|
5334
|
+
inputRef: chooser,
|
|
5335
|
+
label: documentValue ? "Replace file" : "Choose a file",
|
|
5336
|
+
inputProps: {
|
|
5337
|
+
id: field.id,
|
|
5338
|
+
accept: acceptedDocumentExtensions(field).join(","),
|
|
5339
|
+
"aria-invalid": error ? "true" : void 0,
|
|
5340
|
+
onChange: (event) => {
|
|
5341
|
+
const file = event.target.files?.[0];
|
|
5342
|
+
event.currentTarget.value = "";
|
|
5343
|
+
if (file) uploads.enqueue([file]);
|
|
5344
|
+
}
|
|
5345
|
+
}
|
|
5346
|
+
}) : null,
|
|
5347
|
+
/* @__PURE__ */ jsx(UploadList, {
|
|
5348
|
+
single: true,
|
|
5349
|
+
items: uploads.items,
|
|
5350
|
+
cancel: uploads.cancel,
|
|
5351
|
+
dismiss: uploads.dismiss,
|
|
5352
|
+
retry: uploads.retry,
|
|
5353
|
+
announcement: uploads.announcement,
|
|
5354
|
+
focusFallback: chooser,
|
|
5355
|
+
signInHref: portalSignInHref()
|
|
5356
|
+
}),
|
|
5357
|
+
documentValue && !showsDocument ? /* @__PURE__ */ jsxs("p", {
|
|
5358
|
+
className: "rb-caption status-muted",
|
|
5359
|
+
children: ["Uploaded: ", documentValue.fileName]
|
|
5360
|
+
}) : null,
|
|
5361
|
+
disabled && !documentValue ? /* @__PURE__ */ jsx("p", {
|
|
5362
|
+
className: "rb-caption status-muted",
|
|
5363
|
+
children: "No document uploaded."
|
|
5364
|
+
}) : null
|
|
5365
|
+
]
|
|
5366
|
+
});
|
|
5367
|
+
}
|
|
5368
|
+
function asDocumentAnswer(value) {
|
|
5369
|
+
return typeof value === "object" && value !== null && "kind" in value && value.kind === "document_upload" ? value : null;
|
|
911
5370
|
}
|
|
912
5371
|
//#endregion
|
|
913
5372
|
//#region ../blocks/src/customer-portal/components/bookings/ScalarQuestionInput.tsx
|
|
@@ -958,27 +5417,7 @@ function getInitialFieldValue(field, answers) {
|
|
|
958
5417
|
function toStringValue(value) {
|
|
959
5418
|
return typeof value === "string" || typeof value === "number" ? String(value) : "";
|
|
960
5419
|
}
|
|
961
|
-
function
|
|
962
|
-
return typeof value === "object" && value !== null && "kind" in value && value.kind === "document_upload";
|
|
963
|
-
}
|
|
964
|
-
function acceptedFileTypes(field) {
|
|
965
|
-
return field.allowedFileTypes.flatMap((fileType) => {
|
|
966
|
-
switch (fileType) {
|
|
967
|
-
case "pdf": return [".pdf"];
|
|
968
|
-
case "image": return [
|
|
969
|
-
".jpg",
|
|
970
|
-
".jpeg",
|
|
971
|
-
".png",
|
|
972
|
-
".webp",
|
|
973
|
-
".heic",
|
|
974
|
-
".heif"
|
|
975
|
-
];
|
|
976
|
-
case "docx": return [".docx"];
|
|
977
|
-
}
|
|
978
|
-
}).join(",");
|
|
979
|
-
}
|
|
980
|
-
function TaskFieldInput({ field, value, disabled, uploading, error, onChange, onUploadFile }) {
|
|
981
|
-
const inputClass = "form-input";
|
|
5420
|
+
function TaskFieldInput({ field, value, disabled, error, onChange, onBusyChange, createUploadUrl, finalizeUpload }) {
|
|
982
5421
|
const textareaClass = "form-textarea";
|
|
983
5422
|
const selectClass = "form-select";
|
|
984
5423
|
const radioClass = "form-radio";
|
|
@@ -1073,39 +5512,16 @@ function TaskFieldInput({ field, value, disabled, uploading, error, onChange, on
|
|
|
1073
5512
|
onChange: (event) => onChange(event.target.checked),
|
|
1074
5513
|
label: field.placeholder || field.label
|
|
1075
5514
|
});
|
|
1076
|
-
case "document_upload": {
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
type: "file",
|
|
1087
|
-
className: inputClass,
|
|
1088
|
-
accept: acceptedFileTypes(field),
|
|
1089
|
-
disabled: disabled || uploading,
|
|
1090
|
-
"aria-invalid": error ? "true" : void 0,
|
|
1091
|
-
onChange: (event) => {
|
|
1092
|
-
const file = event.target.files?.[0];
|
|
1093
|
-
event.currentTarget.value = "";
|
|
1094
|
-
if (!file || !onUploadFile) return;
|
|
1095
|
-
onUploadFile(file);
|
|
1096
|
-
}
|
|
1097
|
-
}), uploading ? /* @__PURE__ */ jsx("p", {
|
|
1098
|
-
className: "rb-caption status-muted",
|
|
1099
|
-
children: "Uploading…"
|
|
1100
|
-
}) : documentValue ? /* @__PURE__ */ jsxs("p", {
|
|
1101
|
-
className: "rb-caption status-muted",
|
|
1102
|
-
children: ["Uploaded: ", documentValue.fileName]
|
|
1103
|
-
}) : /* @__PURE__ */ jsx("p", {
|
|
1104
|
-
className: "rb-caption status-muted",
|
|
1105
|
-
children: disabled ? "No document uploaded." : "Choose one file to upload."
|
|
1106
|
-
})]
|
|
1107
|
-
});
|
|
1108
|
-
}
|
|
5515
|
+
case "document_upload": return /* @__PURE__ */ jsx(PortalDocumentField, {
|
|
5516
|
+
field,
|
|
5517
|
+
value,
|
|
5518
|
+
disabled,
|
|
5519
|
+
error,
|
|
5520
|
+
onChange,
|
|
5521
|
+
onBusyChange,
|
|
5522
|
+
createUploadUrl,
|
|
5523
|
+
finalizeUpload
|
|
5524
|
+
});
|
|
1109
5525
|
case "number":
|
|
1110
5526
|
case "date":
|
|
1111
5527
|
case "time":
|
|
@@ -1155,45 +5571,12 @@ function BeforeYouComeTask({ entityId, task, session, loadTask, saveTask, create
|
|
|
1155
5571
|
setFieldErrors({});
|
|
1156
5572
|
setError(null);
|
|
1157
5573
|
}, []);
|
|
1158
|
-
const
|
|
1159
|
-
setUploadingFieldIds((current) =>
|
|
5574
|
+
const reportUploadBusy = React$1.useCallback((fieldId, busy) => {
|
|
5575
|
+
setUploadingFieldIds((current) => current[fieldId] === busy ? current : {
|
|
1160
5576
|
...current,
|
|
1161
|
-
[fieldId]:
|
|
1162
|
-
}));
|
|
1163
|
-
setFieldErrors((current) => {
|
|
1164
|
-
const next = { ...current };
|
|
1165
|
-
delete next[fieldId];
|
|
1166
|
-
return next;
|
|
5577
|
+
[fieldId]: busy
|
|
1167
5578
|
});
|
|
1168
|
-
|
|
1169
|
-
try {
|
|
1170
|
-
const { uploadId, signedUrl } = await createUploadUrl({
|
|
1171
|
-
fieldId,
|
|
1172
|
-
filename: file.name,
|
|
1173
|
-
bytes: file.size
|
|
1174
|
-
});
|
|
1175
|
-
await uploadFileToSignedUrl(signedUrl, file);
|
|
1176
|
-
const answer = await finalizeUpload({
|
|
1177
|
-
fieldId,
|
|
1178
|
-
uploadId
|
|
1179
|
-
});
|
|
1180
|
-
setFormValues((current) => ({
|
|
1181
|
-
...current,
|
|
1182
|
-
[fieldId]: answer
|
|
1183
|
-
}));
|
|
1184
|
-
} catch (uploadError) {
|
|
1185
|
-
const message = uploadError instanceof Error ? uploadError.message : "Failed to upload the file.";
|
|
1186
|
-
setFieldErrors((current) => ({
|
|
1187
|
-
...current,
|
|
1188
|
-
[fieldId]: message
|
|
1189
|
-
}));
|
|
1190
|
-
} finally {
|
|
1191
|
-
setUploadingFieldIds((current) => ({
|
|
1192
|
-
...current,
|
|
1193
|
-
[fieldId]: false
|
|
1194
|
-
}));
|
|
1195
|
-
}
|
|
1196
|
-
}, [createUploadUrl, finalizeUpload]);
|
|
5579
|
+
}, []);
|
|
1197
5580
|
const submit = React$1.useCallback(async () => {
|
|
1198
5581
|
setSaving(true);
|
|
1199
5582
|
setError(null);
|
|
@@ -1270,7 +5653,6 @@ function BeforeYouComeTask({ entityId, task, session, loadTask, saveTask, create
|
|
|
1270
5653
|
field,
|
|
1271
5654
|
value: formValues[field.id] ?? getInitialFieldValue(field, {}),
|
|
1272
5655
|
disabled: viewOnly || saving,
|
|
1273
|
-
uploading: Boolean(uploadingFieldIds[field.id]),
|
|
1274
5656
|
error: fieldErrors[field.id] ?? null,
|
|
1275
5657
|
onChange: (next) => {
|
|
1276
5658
|
setFormValues((current) => ({
|
|
@@ -1278,7 +5660,9 @@ function BeforeYouComeTask({ entityId, task, session, loadTask, saveTask, create
|
|
|
1278
5660
|
[field.id]: next
|
|
1279
5661
|
}));
|
|
1280
5662
|
},
|
|
1281
|
-
|
|
5663
|
+
createUploadUrl,
|
|
5664
|
+
finalizeUpload,
|
|
5665
|
+
onBusyChange: (busy) => reportUploadBusy(field.id, busy)
|
|
1282
5666
|
}),
|
|
1283
5667
|
fieldErrors[field.id] ? /* @__PURE__ */ jsx("p", {
|
|
1284
5668
|
className: "rb-caption status-error",
|
|
@@ -1287,6 +5671,10 @@ function BeforeYouComeTask({ entityId, task, session, loadTask, saveTask, create
|
|
|
1287
5671
|
]
|
|
1288
5672
|
}, field.id))]
|
|
1289
5673
|
}, section.id)),
|
|
5674
|
+
hasActiveUploads ? /* @__PURE__ */ jsx("p", {
|
|
5675
|
+
className: "rb-caption status-muted",
|
|
5676
|
+
children: "You can save once your file has finished uploading."
|
|
5677
|
+
}) : null,
|
|
1290
5678
|
/* @__PURE__ */ jsxs("div", {
|
|
1291
5679
|
className: "cp-modal__actions",
|
|
1292
5680
|
children: [/* @__PURE__ */ jsx(ThemedButton, {
|
|
@@ -1302,7 +5690,7 @@ function BeforeYouComeTask({ entityId, task, session, loadTask, saveTask, create
|
|
|
1302
5690
|
disabled: saving || hasActiveUploads,
|
|
1303
5691
|
variant: "primary",
|
|
1304
5692
|
size: "sm",
|
|
1305
|
-
label: saving ? "Saving…" :
|
|
5693
|
+
label: saving ? "Saving…" : "Save details"
|
|
1306
5694
|
}) : null]
|
|
1307
5695
|
})
|
|
1308
5696
|
]
|
|
@@ -3098,7 +7486,7 @@ function PortalAppointmentRescheduleFlow({ appointment, onClose, onSuccess }) {
|
|
|
3098
7486
|
children: "Choose a date…"
|
|
3099
7487
|
}), sortedDates.map((date) => /* @__PURE__ */ jsx("option", {
|
|
3100
7488
|
value: date,
|
|
3101
|
-
children: formatDate
|
|
7489
|
+
children: formatDate(date, context, { date: "short" }) ?? "—"
|
|
3102
7490
|
}, date))]
|
|
3103
7491
|
}),
|
|
3104
7492
|
hasMore ? /* @__PURE__ */ jsx(ThemedButton, {
|
|
@@ -4758,7 +9146,7 @@ function PassDates({ pass }) {
|
|
|
4758
9146
|
}
|
|
4759
9147
|
function formatCustomerPassCreditHistoryEntry(entry, productUseCase, context) {
|
|
4760
9148
|
const creditNoun = getPortalCreditProductCreditNoun(productUseCase, entry.credits);
|
|
4761
|
-
return `${entry.kind === "restoration" ? "Restored" : "Used"} ${entry.credits} ${creditNoun} on ${formatDate(entry.occurredAt, context, "long")}`;
|
|
9149
|
+
return `${entry.kind === "restoration" ? "Restored" : "Used"} ${entry.credits} ${creditNoun} on ${formatDate$1(entry.occurredAt, context, "long")}`;
|
|
4762
9150
|
}
|
|
4763
9151
|
function MembershipsCards({ memberships, onRefresh }) {
|
|
4764
9152
|
const cancelFlow = useMembershipCancelFlow({
|