@nascentdigital/funnel-ui 4.4.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Tailwind.d.ts +201 -0
- package/dist/Tailwind.js +282 -0
- package/dist/client/app/AppContainer.d.ts +10 -0
- package/dist/client/app/AppContainer.js +22 -0
- package/dist/client/app/AppContext.d.ts +11 -0
- package/dist/client/app/AppContext.js +6 -0
- package/dist/client/app/AppPreview.d.ts +7 -0
- package/dist/client/app/AppPreview.js +51 -0
- package/dist/client/app/PageContainer.d.ts +8 -0
- package/dist/client/app/PageContainer.js +22 -0
- package/dist/client/app/index.d.ts +9 -0
- package/dist/client/app/index.js +25 -0
- package/dist/client/app/useAppConfig.d.ts +2 -0
- package/dist/client/app/useAppConfig.js +9 -0
- package/dist/client/app/useBrand.d.ts +9 -0
- package/dist/client/app/useBrand.js +17 -0
- package/dist/client/app/useLanguage.d.ts +2 -0
- package/dist/client/app/useLanguage.js +11 -0
- package/dist/client/app/usePageData.d.ts +2 -0
- package/dist/client/app/usePageData.js +25 -0
- package/dist/client/app/usePageUrl.d.ts +1 -0
- package/dist/client/app/usePageUrl.js +12 -0
- package/dist/client/app/useRegion.d.ts +1 -0
- package/dist/client/app/useRegion.js +10 -0
- package/dist/client/app/useSite.d.ts +2 -0
- package/dist/client/app/useSite.js +13 -0
- package/dist/client/atomic/AnimatedText.d.ts +12 -0
- package/dist/client/atomic/AnimatedText.js +90 -0
- package/dist/client/atomic/MaskedInput.d.ts +20 -0
- package/dist/client/atomic/MaskedInput.js +63 -0
- package/dist/client/atomic/index.d.ts +2 -0
- package/dist/client/atomic/index.js +18 -0
- package/dist/client/fields/EmbeddedVideo/EmbeddedPlayer.d.ts +36 -0
- package/dist/client/fields/EmbeddedVideo/EmbeddedPlayer.js +2 -0
- package/dist/client/fields/EmbeddedVideo/EmbeddedVideo.d.ts +13 -0
- package/dist/client/fields/EmbeddedVideo/EmbeddedVideo.js +22 -0
- package/dist/client/fields/EmbeddedVideo/EmbeddedVideoContainer.d.ts +7 -0
- package/dist/client/fields/EmbeddedVideo/EmbeddedVideoContainer.js +24 -0
- package/dist/client/fields/EmbeddedVideo/EmbeddedVideoContext.d.ts +8 -0
- package/dist/client/fields/EmbeddedVideo/EmbeddedVideoContext.js +11 -0
- package/dist/client/fields/EmbeddedVideo/index.d.ts +4 -0
- package/dist/client/fields/EmbeddedVideo/index.js +20 -0
- package/dist/client/fields/EmbeddedVideo/useEmbeddedPlayerProgress.d.ts +10 -0
- package/dist/client/fields/EmbeddedVideo/useEmbeddedPlayerProgress.js +66 -0
- package/dist/client/fields/EmbeddedVideo/useEmbeddedPlayerRef.d.ts +9 -0
- package/dist/client/fields/EmbeddedVideo/useEmbeddedPlayerRef.js +29 -0
- package/dist/client/fields/EmbeddedVideo/vimeo/VimeoPlayer.d.ts +63 -0
- package/dist/client/fields/EmbeddedVideo/vimeo/VimeoPlayer.js +326 -0
- package/dist/client/fields/EmbeddedVideo/vimeo/VimeoVideo.d.ts +13 -0
- package/dist/client/fields/EmbeddedVideo/vimeo/VimeoVideo.js +60 -0
- package/dist/client/fields/EmbeddedVideo/vimeo/index.d.ts +1 -0
- package/dist/client/fields/EmbeddedVideo/vimeo/index.js +17 -0
- package/dist/client/fields/EmbeddedVideo/youtube/YTApi.d.ts +92 -0
- package/dist/client/fields/EmbeddedVideo/youtube/YTApi.js +24 -0
- package/dist/client/fields/EmbeddedVideo/youtube/YoutubePlayer.d.ts +56 -0
- package/dist/client/fields/EmbeddedVideo/youtube/YoutubePlayer.js +288 -0
- package/dist/client/fields/EmbeddedVideo/youtube/YoutubeVideo.d.ts +13 -0
- package/dist/client/fields/EmbeddedVideo/youtube/YoutubeVideo.js +71 -0
- package/dist/client/fields/EmbeddedVideo/youtube/index.d.ts +3 -0
- package/dist/client/fields/EmbeddedVideo/youtube/index.js +19 -0
- package/dist/client/fields/LazyVideo.d.ts +8 -0
- package/dist/client/fields/LazyVideo.js +100 -0
- package/dist/client/fields/index.d.ts +2 -0
- package/dist/client/fields/index.js +18 -0
- package/dist/client/forms/Form.d.ts +13 -0
- package/dist/client/forms/Form.js +68 -0
- package/dist/client/forms/FormContext.d.ts +5 -0
- package/dist/client/forms/FormContext.js +6 -0
- package/dist/client/forms/fields/BooleanField.d.ts +16 -0
- package/dist/client/forms/fields/BooleanField.js +47 -0
- package/dist/client/forms/fields/EnumField.d.ts +20 -0
- package/dist/client/forms/fields/EnumField.js +65 -0
- package/dist/client/forms/fields/Field.d.ts +15 -0
- package/dist/client/forms/fields/Field.js +39 -0
- package/dist/client/forms/fields/FieldErrorController.d.ts +12 -0
- package/dist/client/forms/fields/FieldErrorController.js +13 -0
- package/dist/client/forms/fields/FieldLayout.d.ts +16 -0
- package/dist/client/forms/fields/FieldLayout.js +32 -0
- package/dist/client/forms/fields/TextField.d.ts +25 -0
- package/dist/client/forms/fields/TextField.js +178 -0
- package/dist/client/forms/fields/index.d.ts +2 -0
- package/dist/client/forms/fields/index.js +18 -0
- package/dist/client/forms/fields/useField.d.ts +2 -0
- package/dist/client/forms/fields/useField.js +26 -0
- package/dist/client/forms/index.d.ts +4 -0
- package/dist/client/forms/index.js +20 -0
- package/dist/client/forms/interactive/CheckboxField.d.ts +14 -0
- package/dist/client/forms/interactive/CheckboxField.js +19 -0
- package/dist/client/forms/interactive/RadioField.d.ts +12 -0
- package/dist/client/forms/interactive/RadioField.js +16 -0
- package/dist/client/forms/interactive/RadioGroupField.d.ts +12 -0
- package/dist/client/forms/interactive/RadioGroupField.js +10 -0
- package/dist/client/forms/interactive/SelectField.d.ts +17 -0
- package/dist/client/forms/interactive/SelectField.js +16 -0
- package/dist/client/forms/interactive/index.d.ts +4 -0
- package/dist/client/forms/interactive/index.js +20 -0
- package/dist/client/forms/useForm.d.ts +2 -0
- package/dist/client/forms/useForm.js +17 -0
- package/dist/client/forms/useTempFields.d.ts +7 -0
- package/dist/client/forms/useTempFields.js +54 -0
- package/dist/client/hooks/assets/index.d.ts +2 -0
- package/dist/client/hooks/assets/index.js +18 -0
- package/dist/client/hooks/assets/useImageProxy.d.ts +2 -0
- package/dist/client/hooks/assets/useImageProxy.js +43 -0
- package/dist/client/hooks/assets/useVideoProxy.d.ts +2 -0
- package/dist/client/hooks/assets/useVideoProxy.js +43 -0
- package/dist/client/hooks/breakpoint/BreakpointContainer.d.ts +9 -0
- package/dist/client/hooks/breakpoint/BreakpointContainer.js +39 -0
- package/dist/client/hooks/breakpoint/BreakpointContext.d.ts +7 -0
- package/dist/client/hooks/breakpoint/BreakpointContext.js +9 -0
- package/dist/client/hooks/breakpoint/index.d.ts +3 -0
- package/dist/client/hooks/breakpoint/index.js +19 -0
- package/dist/client/hooks/breakpoint/useCurrentBreakpoint.d.ts +2 -0
- package/dist/client/hooks/breakpoint/useCurrentBreakpoint.js +10 -0
- package/dist/client/hooks/index.d.ts +26 -0
- package/dist/client/hooks/index.js +42 -0
- package/dist/client/hooks/ui-lock/UILockContainer.d.ts +5 -0
- package/dist/client/hooks/ui-lock/UILockContainer.js +57 -0
- package/dist/client/hooks/ui-lock/UILockContext.d.ts +9 -0
- package/dist/client/hooks/ui-lock/UILockContext.js +6 -0
- package/dist/client/hooks/ui-lock/UILockRef.d.ts +36 -0
- package/dist/client/hooks/ui-lock/UILockRef.js +32 -0
- package/dist/client/hooks/ui-lock/index.d.ts +3 -0
- package/dist/client/hooks/ui-lock/index.js +19 -0
- package/dist/client/hooks/ui-lock/useUILock.d.ts +16 -0
- package/dist/client/hooks/ui-lock/useUILock.js +121 -0
- package/dist/client/hooks/useCounter.d.ts +11 -0
- package/dist/client/hooks/useCounter.js +57 -0
- package/dist/client/hooks/useCycle.d.ts +5 -0
- package/dist/client/hooks/useCycle.js +15 -0
- package/dist/client/hooks/useElementRect.d.ts +2 -0
- package/dist/client/hooks/useElementRect.js +63 -0
- package/dist/client/hooks/useElementScrolled.d.ts +17 -0
- package/dist/client/hooks/useElementScrolled.js +51 -0
- package/dist/client/hooks/useElementSelector.d.ts +2 -0
- package/dist/client/hooks/useElementSelector.js +160 -0
- package/dist/client/hooks/useElementSize.d.ts +2 -0
- package/dist/client/hooks/useElementSize.js +64 -0
- package/dist/client/hooks/useFindElements.d.ts +9 -0
- package/dist/client/hooks/useFindElements.js +147 -0
- package/dist/client/hooks/useInViewport.d.ts +16 -0
- package/dist/client/hooks/useInViewport.js +46 -0
- package/dist/client/hooks/useIsDesktop.d.ts +1 -0
- package/dist/client/hooks/useIsDesktop.js +22 -0
- package/dist/client/hooks/useKeyboardFocus.d.ts +7 -0
- package/dist/client/hooks/useKeyboardFocus.js +40 -0
- package/dist/client/hooks/useLatestValue.d.ts +1 -0
- package/dist/client/hooks/useLatestValue.js +21 -0
- package/dist/client/hooks/useLock.d.ts +13 -0
- package/dist/client/hooks/useLock.js +161 -0
- package/dist/client/hooks/useMixedResponsiveValue.d.ts +2 -0
- package/dist/client/hooks/useMixedResponsiveValue.js +20 -0
- package/dist/client/hooks/usePathname.d.ts +9 -0
- package/dist/client/hooks/usePathname.js +25 -0
- package/dist/client/hooks/useRefElement.d.ts +8 -0
- package/dist/client/hooks/useRefElement.js +34 -0
- package/dist/client/hooks/useRefresh.d.ts +2 -0
- package/dist/client/hooks/useRefresh.js +25 -0
- package/dist/client/hooks/useResizeObserver.d.ts +5 -0
- package/dist/client/hooks/useResizeObserver.js +179 -0
- package/dist/client/hooks/useResponsiveValue.d.ts +2 -0
- package/dist/client/hooks/useResponsiveValue.js +16 -0
- package/dist/client/hooks/useRouter.d.ts +20 -0
- package/dist/client/hooks/useRouter.js +49 -0
- package/dist/client/hooks/useSafeLayoutEffect.d.ts +2 -0
- package/dist/client/hooks/useSafeLayoutEffect.js +9 -0
- package/dist/client/hooks/useTouch.d.ts +2 -0
- package/dist/client/hooks/useTouch.js +10 -0
- package/dist/client/hooks/useViewportSize.d.ts +7 -0
- package/dist/client/hooks/useViewportSize.js +66 -0
- package/dist/client/hooks/useWindowScrolled.d.ts +8 -0
- package/dist/client/hooks/useWindowScrolled.js +52 -0
- package/dist/client/index.d.ts +9 -0
- package/dist/client/index.js +25 -0
- package/dist/client/interaction/Carousel.d.ts +48 -0
- package/dist/client/interaction/Carousel.js +498 -0
- package/dist/client/interaction/ClickObserver.d.ts +19 -0
- package/dist/client/interaction/ClickObserver.js +76 -0
- package/dist/client/interaction/InfiniteScroller.d.ts +9 -0
- package/dist/client/interaction/InfiniteScroller.js +47 -0
- package/dist/client/interaction/Loader.d.ts +14 -0
- package/dist/client/interaction/Loader.js +74 -0
- package/dist/client/interaction/Marquee.d.ts +5 -0
- package/dist/client/interaction/Marquee.js +26 -0
- package/dist/client/interaction/Popup.d.ts +36 -0
- package/dist/client/interaction/Popup.js +244 -0
- package/dist/client/interaction/Tooltip.d.ts +16 -0
- package/dist/client/interaction/Tooltip.js +122 -0
- package/dist/client/interaction/UILevel.d.ts +1 -0
- package/dist/client/interaction/UILevel.js +2 -0
- package/dist/client/interaction/backdrop/BackdropContainer.d.ts +5 -0
- package/dist/client/interaction/backdrop/BackdropContainer.js +114 -0
- package/dist/client/interaction/backdrop/BackdropContext.d.ts +8 -0
- package/dist/client/interaction/backdrop/BackdropContext.js +6 -0
- package/dist/client/interaction/backdrop/BackdropEvent.d.ts +64 -0
- package/dist/client/interaction/backdrop/BackdropEvent.js +92 -0
- package/dist/client/interaction/backdrop/index.d.ts +4 -0
- package/dist/client/interaction/backdrop/index.js +20 -0
- package/dist/client/interaction/backdrop/useBackdrop.d.ts +13 -0
- package/dist/client/interaction/backdrop/useBackdrop.js +58 -0
- package/dist/client/interaction/backdrop/useBackdropClick.d.ts +2 -0
- package/dist/client/interaction/backdrop/useBackdropClick.js +21 -0
- package/dist/client/interaction/backdrop/useBackdropVisible.d.ts +1 -0
- package/dist/client/interaction/backdrop/useBackdropVisible.js +30 -0
- package/dist/client/interaction/focus/FocusArea.d.ts +10 -0
- package/dist/client/interaction/focus/FocusArea.js +38 -0
- package/dist/client/interaction/focus/FocusContext.d.ts +7 -0
- package/dist/client/interaction/focus/FocusContext.js +7 -0
- package/dist/client/interaction/focus/FocusController.d.ts +9 -0
- package/dist/client/interaction/focus/FocusController.js +40 -0
- package/dist/client/interaction/focus/FocusService.d.ts +20 -0
- package/dist/client/interaction/focus/FocusService.js +204 -0
- package/dist/client/interaction/focus/LinkedList.d.ts +18 -0
- package/dist/client/interaction/focus/LinkedList.js +122 -0
- package/dist/client/interaction/focus/index.d.ts +2 -0
- package/dist/client/interaction/focus/index.js +18 -0
- package/dist/client/interaction/focus/useFocusService.d.ts +2 -0
- package/dist/client/interaction/focus/useFocusService.js +14 -0
- package/dist/client/interaction/index.d.ts +12 -0
- package/dist/client/interaction/index.js +28 -0
- package/dist/client/interaction/modal/Modal.d.ts +29 -0
- package/dist/client/interaction/modal/Modal.js +136 -0
- package/dist/client/interaction/modal/ModalContainer.d.ts +5 -0
- package/dist/client/interaction/modal/ModalContainer.js +104 -0
- package/dist/client/interaction/modal/ModalContext.d.ts +8 -0
- package/dist/client/interaction/modal/ModalContext.js +6 -0
- package/dist/client/interaction/modal/ModalEvent.d.ts +39 -0
- package/dist/client/interaction/modal/ModalEvent.js +53 -0
- package/dist/client/interaction/modal/index.d.ts +2 -0
- package/dist/client/interaction/modal/index.js +18 -0
- package/dist/client/interaction/paginator/Paginator.d.ts +33 -0
- package/dist/client/interaction/paginator/Paginator.js +67 -0
- package/dist/client/interaction/paginator/index.d.ts +1 -0
- package/dist/client/interaction/paginator/index.js +17 -0
- package/dist/client/layouts/MasonaryLayout.d.ts +7 -0
- package/dist/client/layouts/MasonaryLayout.js +53 -0
- package/dist/client/layouts/index.d.ts +1 -0
- package/dist/client/layouts/index.js +17 -0
- package/dist/client/refs.d.ts +2 -0
- package/dist/client/refs.js +13 -0
- package/dist/client/transitions/Revelator.d.ts +42 -0
- package/dist/client/transitions/Revelator.js +60 -0
- package/dist/client/transitions/SideScroll.d.ts +14 -0
- package/dist/client/transitions/SideScroll.js +51 -0
- package/dist/client/transitions/StyleInViewport.d.ts +20 -0
- package/dist/client/transitions/StyleInViewport.js +66 -0
- package/dist/client/transitions/StyleSwitch.d.ts +297 -0
- package/dist/client/transitions/StyleSwitch.js +78 -0
- package/dist/client/transitions/index.d.ts +6 -0
- package/dist/client/transitions/index.js +22 -0
- package/dist/client/transitions/parallax/Parallax.d.ts +20 -0
- package/dist/client/transitions/parallax/Parallax.js +72 -0
- package/dist/client/transitions/parallax/ParallaxContext.d.ts +11 -0
- package/dist/client/transitions/parallax/ParallaxContext.js +6 -0
- package/dist/client/transitions/parallax/ParallaxItem.d.ts +14 -0
- package/dist/client/transitions/parallax/ParallaxItem.js +37 -0
- package/dist/client/transitions/parallax/ParallaxRemote.d.ts +29 -0
- package/dist/client/transitions/parallax/ParallaxRemote.js +136 -0
- package/dist/client/transitions/parallax/ParallaxUtils.d.ts +5 -0
- package/dist/client/transitions/parallax/ParallaxUtils.js +19 -0
- package/dist/client/transitions/parallax/index.d.ts +2 -0
- package/dist/client/transitions/parallax/index.js +18 -0
- package/dist/client/transitions/parallax/useDisableParallax.d.ts +4 -0
- package/dist/client/transitions/parallax/useDisableParallax.js +13 -0
- package/dist/client/transitions/parallax/useParallax.d.ts +2 -0
- package/dist/client/transitions/parallax/useParallax.js +18 -0
- package/dist/client/transitions/parallax/useTransforms.d.ts +34 -0
- package/dist/client/transitions/parallax/useTransforms.js +176 -0
- package/dist/client/transitions/reveal/Reveal.d.ts +14 -0
- package/dist/client/transitions/reveal/Reveal.js +75 -0
- package/dist/client/transitions/reveal/RevealAnimation.d.ts +17 -0
- package/dist/client/transitions/reveal/RevealAnimation.js +2 -0
- package/dist/client/transitions/reveal/RevealAnimator.d.ts +13 -0
- package/dist/client/transitions/reveal/RevealAnimator.js +41 -0
- package/dist/client/transitions/reveal/RevealController.d.ts +13 -0
- package/dist/client/transitions/reveal/RevealController.js +114 -0
- package/dist/client/transitions/reveal/RevealElementAnimator.d.ts +13 -0
- package/dist/client/transitions/reveal/RevealElementAnimator.js +65 -0
- package/dist/client/transitions/reveal/index.d.ts +2 -0
- package/dist/client/transitions/reveal/index.js +18 -0
- package/dist/client/utils/OnKey.d.ts +20 -0
- package/dist/client/utils/OnKey.js +33 -0
- package/dist/client/utils/SharedMutationObserver.d.ts +20 -0
- package/dist/client/utils/SharedMutationObserver.js +202 -0
- package/dist/client/utils/index.d.ts +2 -0
- package/dist/client/utils/index.js +18 -0
- package/dist/server/atomic/Markup.d.ts +14 -0
- package/dist/server/atomic/Markup.js +34 -0
- package/dist/server/atomic/NascentLogo.d.ts +6 -0
- package/dist/server/atomic/NascentLogo.js +9 -0
- package/dist/server/atomic/index.d.ts +2 -0
- package/dist/server/atomic/index.js +18 -0
- package/dist/server/blocks/Block.d.ts +16 -0
- package/dist/server/blocks/Block.js +92 -0
- package/dist/server/blocks/Clients.d.ts +33 -0
- package/dist/server/blocks/Clients.js +82 -0
- package/dist/server/blocks/Editorial.d.ts +33 -0
- package/dist/server/blocks/Editorial.js +80 -0
- package/dist/server/blocks/Form.d.ts +46 -0
- package/dist/server/blocks/Form.js +74 -0
- package/dist/server/blocks/FormMessage.d.ts +15 -0
- package/dist/server/blocks/FormMessage.js +37 -0
- package/dist/server/blocks/MediaLayout.d.ts +309 -0
- package/dist/server/blocks/MediaLayout.js +105 -0
- package/dist/server/blocks/Message.d.ts +76 -0
- package/dist/server/blocks/Message.js +352 -0
- package/dist/server/blocks/Outcome.d.ts +84 -0
- package/dist/server/blocks/Outcome.js +489 -0
- package/dist/server/blocks/OutcomeDetail.d.ts +303 -0
- package/dist/server/blocks/OutcomeDetail.js +63 -0
- package/dist/server/blocks/Projects.d.ts +43 -0
- package/dist/server/blocks/Projects.js +109 -0
- package/dist/server/blocks/Stat.d.ts +325 -0
- package/dist/server/blocks/Stat.js +107 -0
- package/dist/server/blocks/Stats.d.ts +36 -0
- package/dist/server/blocks/Stats.js +79 -0
- package/dist/server/blocks/Testimonial.d.ts +30 -0
- package/dist/server/blocks/Testimonial.js +68 -0
- package/dist/server/blocks/ValueProp.d.ts +43 -0
- package/dist/server/blocks/ValueProp.js +125 -0
- package/dist/server/blocks/index.d.ts +13 -0
- package/dist/server/blocks/index.js +29 -0
- package/dist/server/data/PrePaginator.d.ts +8 -0
- package/dist/server/data/PrePaginator.js +30 -0
- package/dist/server/data/index.d.ts +1 -0
- package/dist/server/data/index.js +17 -0
- package/dist/server/entities/Client.d.ts +327 -0
- package/dist/server/entities/Client.js +118 -0
- package/dist/server/entities/ClientBadge.d.ts +293 -0
- package/dist/server/entities/ClientBadge.js +37 -0
- package/dist/server/entities/Person.d.ts +314 -0
- package/dist/server/entities/Person.js +98 -0
- package/dist/server/entities/Project.d.ts +329 -0
- package/dist/server/entities/Project.js +112 -0
- package/dist/server/entities/UniqueSellingPoint.d.ts +327 -0
- package/dist/server/entities/UniqueSellingPoint.js +119 -0
- package/dist/server/entities/index.d.ts +6 -0
- package/dist/server/entities/index.js +22 -0
- package/dist/server/entities/previews/MessagePreview.d.ts +299 -0
- package/dist/server/entities/previews/MessagePreview.js +41 -0
- package/dist/server/entities/previews/PagePreview.d.ts +10 -0
- package/dist/server/entities/previews/PagePreview.js +42 -0
- package/dist/server/entities/previews/index.d.ts +2 -0
- package/dist/server/entities/previews/index.js +18 -0
- package/dist/server/fields/Caption.d.ts +13 -0
- package/dist/server/fields/Caption.js +45 -0
- package/dist/server/fields/Description.d.ts +13 -0
- package/dist/server/fields/Description.js +46 -0
- package/dist/server/fields/FreeFormContent.d.ts +17 -0
- package/dist/server/fields/FreeFormContent.js +43 -0
- package/dist/server/fields/Headline.d.ts +13 -0
- package/dist/server/fields/Headline.js +46 -0
- package/dist/server/fields/Icon.d.ts +10 -0
- package/dist/server/fields/Icon.js +39 -0
- package/dist/server/fields/Link.d.ts +16 -0
- package/dist/server/fields/Link.js +61 -0
- package/dist/server/fields/Quote.d.ts +13 -0
- package/dist/server/fields/Quote.js +46 -0
- package/dist/server/fields/RichText.d.ts +296 -0
- package/dist/server/fields/RichText.js +217 -0
- package/dist/server/fields/Title.d.ts +292 -0
- package/dist/server/fields/Title.js +38 -0
- package/dist/server/fields/Visual.d.ts +12 -0
- package/dist/server/fields/Visual.js +66 -0
- package/dist/server/fields/index.d.ts +10 -0
- package/dist/server/fields/index.js +26 -0
- package/dist/server/index.d.ts +9 -0
- package/dist/server/index.js +25 -0
- package/dist/server/panels/BlockPanel.d.ts +14 -0
- package/dist/server/panels/BlockPanel.js +56 -0
- package/dist/server/panels/MessagePanel.d.ts +31 -0
- package/dist/server/panels/MessagePanel.js +81 -0
- package/dist/server/panels/VisualPanel.d.ts +36 -0
- package/dist/server/panels/VisualPanel.js +143 -0
- package/dist/server/panels/index.d.ts +3 -0
- package/dist/server/panels/index.js +19 -0
- package/dist/server/schema/Anchor.d.ts +7 -0
- package/dist/server/schema/Anchor.js +24 -0
- package/dist/server/schema/AspectRatio.d.ts +9 -0
- package/dist/server/schema/AspectRatio.js +43 -0
- package/dist/server/schema/BlockConfig.d.ts +56 -0
- package/dist/server/schema/BlockConfig.js +192 -0
- package/dist/server/schema/CollectionSchema.d.ts +4 -0
- package/dist/server/schema/CollectionSchema.js +15 -0
- package/dist/server/schema/ItemAlignment.d.ts +12 -0
- package/dist/server/schema/ItemAlignment.js +42 -0
- package/dist/server/schema/ItemPosition.d.ts +6 -0
- package/dist/server/schema/ItemPosition.js +25 -0
- package/dist/server/schema/ItemSize.d.ts +6 -0
- package/dist/server/schema/ItemSize.js +24 -0
- package/dist/server/schema/TextAlignment.d.ts +6 -0
- package/dist/server/schema/TextAlignment.js +22 -0
- package/dist/server/schema/index.d.ts +8 -0
- package/dist/server/schema/index.js +24 -0
- package/dist/server/sections/index.d.ts +1 -0
- package/dist/server/sections/index.js +17 -0
- package/dist/server/sections/renderSection.d.ts +6 -0
- package/dist/server/sections/renderSection.js +19 -0
- package/dist/server/transitions/Slide.d.ts +293 -0
- package/dist/server/transitions/Slide.js +31 -0
- package/dist/server/transitions/index.d.ts +3 -0
- package/dist/server/transitions/index.js +19 -0
- package/dist/styles/app/AppPreview.css +49 -0
- package/dist/styles/app/_index.css +1 -0
- package/dist/styles/base/_index.css +2 -0
- package/dist/styles/base/global.css +9 -0
- package/dist/styles/base/tailwind.css +3 -0
- package/dist/styles/blocks/Block-layout.css +244 -0
- package/dist/styles/blocks/Block-spacing.css +150 -0
- package/dist/styles/blocks/Block-theming.css +14 -0
- package/dist/styles/blocks/Clients.css +10 -0
- package/dist/styles/blocks/Editorial.css +133 -0
- package/dist/styles/blocks/Form.css +13 -0
- package/dist/styles/blocks/MediaLayout.css +215 -0
- package/dist/styles/blocks/Message.css +353 -0
- package/dist/styles/blocks/Outcome.css +83 -0
- package/dist/styles/blocks/Projects.css +18 -0
- package/dist/styles/blocks/Stat.css +45 -0
- package/dist/styles/blocks/Stats.css +38 -0
- package/dist/styles/blocks/Testimonial.css +323 -0
- package/dist/styles/blocks/ValueProp.css +135 -0
- package/dist/styles/blocks/_index.css +14 -0
- package/dist/styles/components/_index.css +3 -0
- package/dist/styles/components/container.css +58 -0
- package/dist/styles/components/divider.css +6 -0
- package/dist/styles/components/embed/VimeoPlayer.css +49 -0
- package/dist/styles/components/embed/YoutubePlayer.css +72 -0
- package/dist/styles/components/embed/_index.css +2 -0
- package/dist/styles/entities/Client.css +5 -0
- package/dist/styles/entities/ClientBadge.css +14 -0
- package/dist/styles/entities/Person.css +76 -0
- package/dist/styles/entities/Project.css +44 -0
- package/dist/styles/entities/UniqueSellingPoint.css +54 -0
- package/dist/styles/entities/_index.css +5 -0
- package/dist/styles/fields/Caption.css +23 -0
- package/dist/styles/fields/Description.css +23 -0
- package/dist/styles/fields/FreeFormContent.css +24 -0
- package/dist/styles/fields/Headline.css +38 -0
- package/dist/styles/fields/Icon.css +20 -0
- package/dist/styles/fields/LazyVideo.css +12 -0
- package/dist/styles/fields/Link.css +16 -0
- package/dist/styles/fields/Quote.css +48 -0
- package/dist/styles/fields/RichText.css +243 -0
- package/dist/styles/fields/Title.css +17 -0
- package/dist/styles/fields/Visual.css +27 -0
- package/dist/styles/fields/_index.css +11 -0
- package/dist/styles/index.css +9 -0
- package/dist/styles/layouts/MasonryLayout.css +24 -0
- package/dist/styles/layouts/_index.css +1 -0
- package/dist/styles/panels/MessagePanel.css +56 -0
- package/dist/styles/panels/VisualPanel.css +58 -0
- package/dist/styles/panels/_index.css +2 -0
- package/dist/styles/utilities/_index.css +7 -0
- package/dist/styles/utilities/ellipsis.css +7 -0
- package/dist/styles/utilities/fade.css +16 -0
- package/dist/styles/utilities/glass.css +8 -0
- package/dist/styles/utilities/interpolate.css +22 -0
- package/dist/styles/utilities/masks.css +18 -0
- package/dist/styles/utilities/stacked.css +24 -0
- package/dist/styles/utilities/text-gradient.css +37 -0
- package/dist/types/HTMLBlockElement.d.ts +6 -0
- package/dist/types/HTMLBlockElement.js +2 -0
- package/dist/types/HTMLElements.d.ts +129 -0
- package/dist/types/HTMLElements.js +2 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.js +18 -0
- package/package.json +73 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Block = Block;
|
|
18
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
+
const funnel_core_1 = require("@nascentdigital/funnel-core");
|
|
20
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
21
|
+
const react_1 = require("react");
|
|
22
|
+
const schema_1 = require("../schema");
|
|
23
|
+
// component
|
|
24
|
+
function Block(_a) {
|
|
25
|
+
var _b;
|
|
26
|
+
var { className, config, layout, renderPanel } = _a, props = __rest(_a, ["className", "config", "layout", "renderPanel"]);
|
|
27
|
+
// render
|
|
28
|
+
return ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: (0, classnames_1.default)(className, 'nd-Block', funnel_core_1.BlockLayout.ResponsiveClassNames.parse({
|
|
29
|
+
value: layout.tight,
|
|
30
|
+
mobile: {
|
|
31
|
+
none: 'max-md:nd-Block-tight-none',
|
|
32
|
+
above: 'max-md:nd-Block-tight-above',
|
|
33
|
+
below: 'max-md:nd-Block-tight-below',
|
|
34
|
+
both: 'max-md:nd-Block-tight-both'
|
|
35
|
+
},
|
|
36
|
+
base: {
|
|
37
|
+
none: 'md:nd-Block-tight-none',
|
|
38
|
+
above: 'md:nd-Block-tight-above',
|
|
39
|
+
below: 'md:nd-Block-tight-below',
|
|
40
|
+
both: 'md:nd-Block-tight-both'
|
|
41
|
+
},
|
|
42
|
+
desktop: {
|
|
43
|
+
none: 'lg:nd-Block-tight-none',
|
|
44
|
+
above: 'lg:nd-Block-tight-above',
|
|
45
|
+
below: 'lg:nd-Block-tight-below',
|
|
46
|
+
both: 'lg:nd-Block-tight-both'
|
|
47
|
+
}
|
|
48
|
+
}), schema_1.BlockConfig.Theme.getClassName((_b = config === null || config === void 0 ? void 0 : config.theme) === null || _b === void 0 ? void 0 : _b.value)) }, props, { children: renderLayout({ renderPanel, layout }) })));
|
|
49
|
+
}
|
|
50
|
+
function renderLayout({ renderPanel, layout }) {
|
|
51
|
+
// render root container (row/column/stack)
|
|
52
|
+
const { root } = layout;
|
|
53
|
+
const { items } = root;
|
|
54
|
+
const siblingCount = items.length;
|
|
55
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)('nd-Block-root', getContainerClasses(root)), children: items.map((item, index) => (0, jsx_runtime_1.jsx)(react_1.Fragment, { children: renderItem({ renderPanel, parent: root.type, item, siblingCount }) }, `${item.type}.${index}`)) }));
|
|
56
|
+
}
|
|
57
|
+
function getContainerClasses({ type, alignX, alignY, items }) {
|
|
58
|
+
var _a;
|
|
59
|
+
const itemCount = (_a = items.length) !== null && _a !== void 0 ? _a : 0;
|
|
60
|
+
return (0, classnames_1.default)({
|
|
61
|
+
'nd-Block-row': type === 'row',
|
|
62
|
+
'nd-Block-column': type === 'column',
|
|
63
|
+
'nd-Block-stack': type === 'stack',
|
|
64
|
+
'nd-Block-x-start': alignX === 'start',
|
|
65
|
+
'nd-Block-x-center': alignX === 'center',
|
|
66
|
+
'nd-Block-x-end': alignX === 'end',
|
|
67
|
+
'nd-Block-y-start': alignY === 'start',
|
|
68
|
+
'nd-Block-y-center': alignY === 'center',
|
|
69
|
+
'nd-Block-y-end': alignY === 'end',
|
|
70
|
+
'nd-Block-items-1': itemCount === 1,
|
|
71
|
+
'nd-Block-items-2': itemCount === 2,
|
|
72
|
+
'nd-Block-items-3': itemCount === 3
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function renderItem({ renderPanel, parent, item, siblingCount }) {
|
|
76
|
+
// render based on item type
|
|
77
|
+
switch (item.type) {
|
|
78
|
+
// row/column/stack (l2 containers)
|
|
79
|
+
case 'row':
|
|
80
|
+
case 'column':
|
|
81
|
+
case 'stack': {
|
|
82
|
+
const { items } = item;
|
|
83
|
+
const parent = item.type;
|
|
84
|
+
const siblingCount = items.length;
|
|
85
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(getContainerClasses(item)), children: items.map((child, index) => (0, jsx_runtime_1.jsx)(react_1.Fragment, { children: renderItem({ renderPanel, parent, item: child, siblingCount }) }, `${child.type}.${index}`)) }));
|
|
86
|
+
}
|
|
87
|
+
// child panel (provided by caller)
|
|
88
|
+
default: {
|
|
89
|
+
return renderPanel({ panel: item });
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Schema } from '@nascentdigital/funnel-core';
|
|
2
|
+
import { HTMLBlockElement, HTMLElements } from '../../types';
|
|
3
|
+
import { Client } from '../entities';
|
|
4
|
+
import { Caption, Headline } from '../fields';
|
|
5
|
+
export declare function Clients({ className, headlineTag, captionTag, clientsTag, clientTag, clientProps, clients: clientData, ...props }: Clients.Props): import("react/jsx-runtime").JSX.Element | null;
|
|
6
|
+
export declare namespace Clients {
|
|
7
|
+
const schema: Schema.Block<"_nd-clients", {
|
|
8
|
+
headline: Schema.Optional<Schema.RichTextField>;
|
|
9
|
+
caption: Schema.Optional<Schema.RichTextField>;
|
|
10
|
+
items: Schema.ListField<{
|
|
11
|
+
item: Schema.CollectionField<Schema.Collection<{
|
|
12
|
+
division: Schema.Optional<Schema.TextField>;
|
|
13
|
+
location: Schema.Optional<Schema.TextField>;
|
|
14
|
+
logo: Schema.Optional<Schema.AssetField<Schema.AssetField.LinkedValue.Visual>>;
|
|
15
|
+
badge: Schema.Optional<Schema.AssetField<Schema.AssetField.LinkedValue.Image>>;
|
|
16
|
+
badgeText: Schema.Optional<Schema.TextField>;
|
|
17
|
+
}>>;
|
|
18
|
+
}>;
|
|
19
|
+
}, {
|
|
20
|
+
theme: Schema.EnumField<Readonly<import("@nascentdigital/funnel-core").BlockThemes.Options>>;
|
|
21
|
+
}>;
|
|
22
|
+
type Props = HTMLBlockElement<'div'> & {
|
|
23
|
+
headlineTag?: Headline.Tag;
|
|
24
|
+
captionTag?: Caption.Tag;
|
|
25
|
+
clientsTag?: HTMLElements.Standard.Container;
|
|
26
|
+
clientTag?: Client.Tag;
|
|
27
|
+
clientProps?: Client.Props.Configuration;
|
|
28
|
+
clients: Model;
|
|
29
|
+
};
|
|
30
|
+
type Tag = HTMLElements.Standard.Container;
|
|
31
|
+
type Model = Schema.Block.LinkedData<typeof schema>;
|
|
32
|
+
type ItemModel = Model['fields']['items']['value'][number];
|
|
33
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Clients = Clients;
|
|
18
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
+
const funnel_core_1 = require("@nascentdigital/funnel-core");
|
|
20
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
21
|
+
const react_1 = require("react");
|
|
22
|
+
const entities_1 = require("../entities");
|
|
23
|
+
const fields_1 = require("../fields");
|
|
24
|
+
const schema_1 = require("../schema");
|
|
25
|
+
// component
|
|
26
|
+
function Clients(_a) {
|
|
27
|
+
var _b, _c;
|
|
28
|
+
var { className, headlineTag = 'h2', captionTag = 'div', clientsTag = 'ul', clientTag = 'li', clientProps = {}, clients: clientData } = _a, props = __rest(_a, ["className", "headlineTag", "captionTag", "clientsTag", "clientTag", "clientProps", "clients"]);
|
|
29
|
+
// dont render if missing model
|
|
30
|
+
const { config, fields } = clientData !== null && clientData !== void 0 ? clientData : {};
|
|
31
|
+
const items = (_c = (_b = fields === null || fields === void 0 ? void 0 : fields.items) === null || _b === void 0 ? void 0 : _b.value) !== null && _c !== void 0 ? _c : [];
|
|
32
|
+
if (!clientData) {
|
|
33
|
+
console.warn('[Clients] attempted to render without clients model');
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
// slice clients for layout
|
|
37
|
+
let clients;
|
|
38
|
+
let trailingClients;
|
|
39
|
+
if (items.length >= 4) {
|
|
40
|
+
const trailingLogoOffset = items.length - 2;
|
|
41
|
+
clients = items.slice(0, trailingLogoOffset);
|
|
42
|
+
trailingClients = items.slice(trailingLogoOffset);
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
clients = items;
|
|
46
|
+
trailingClients = undefined;
|
|
47
|
+
}
|
|
48
|
+
// render
|
|
49
|
+
const { headline: headlineRaw, caption: captionRaw } = fields;
|
|
50
|
+
const headline = headlineRaw === null || headlineRaw === void 0 ? void 0 : headlineRaw.value;
|
|
51
|
+
const caption = captionRaw === null || captionRaw === void 0 ? void 0 : captionRaw.value;
|
|
52
|
+
return ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: (0, classnames_1.default)(className, 'nd-Clients', schema_1.BlockConfig.Presets.ThemeOnly.getClassName(config)) }, props, { children: (0, jsx_runtime_1.jsxs)("div", { className: "nd-Clients-content", children: [(headline || caption) &&
|
|
53
|
+
(0, jsx_runtime_1.jsx)("div", { className: "nd-Clients-copyWrap", children: (0, jsx_runtime_1.jsxs)("div", { className: "nd-Clients-copy", children: [headline &&
|
|
54
|
+
(0, jsx_runtime_1.jsx)(fields_1.Headline, { className: "nd-Clients-headline", as: headlineTag, headline: headline }), caption &&
|
|
55
|
+
(0, jsx_runtime_1.jsx)(fields_1.Caption, { className: "nd-Clients-caption", as: captionTag, caption: caption })] }) }), (0, jsx_runtime_1.jsx)("div", { className: "nd-Clients-clientsWrap", children: (0, react_1.createElement)(clientsTag, { className: 'nd-Clients-clients' }, (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [clients.map((client) => (0, jsx_runtime_1.jsx)(entities_1.Client, Object.assign({}, clientProps, { as: clientTag, className: "nd-Clients-client", client: client.value }), client.id)), trailingClients && (0, react_1.createElement)(clientTag, { className: 'nd-Clients-trailingClients' }, (0, react_1.createElement)(clientsTag, { className: 'nd-Clients-clients' }, trailingClients.map(client => (0, jsx_runtime_1.jsx)(entities_1.Client, Object.assign({}, clientProps, { as: clientTag, className: "nd-Clients-client", client: client.value }), client.id))))] })) })] }) })));
|
|
56
|
+
}
|
|
57
|
+
// extension
|
|
58
|
+
(function (Clients) {
|
|
59
|
+
// schema
|
|
60
|
+
Clients.schema = funnel_core_1.Schema.Block.create({
|
|
61
|
+
id: '_nd-clients',
|
|
62
|
+
name: 'Clients',
|
|
63
|
+
version: 1,
|
|
64
|
+
config: Object.assign({}, schema_1.BlockConfig.Presets.ThemeOnly.schema),
|
|
65
|
+
fields: {
|
|
66
|
+
headline: fields_1.Headline.schema.optional(),
|
|
67
|
+
caption: fields_1.Caption.schema.optional(),
|
|
68
|
+
items: funnel_core_1.Schema.Field.list({
|
|
69
|
+
name: 'Clients',
|
|
70
|
+
description: 'Client brands will be displayed in the order you present them.',
|
|
71
|
+
itemTypes: {
|
|
72
|
+
item: funnel_core_1.Schema.Field.collection({
|
|
73
|
+
name: 'Client',
|
|
74
|
+
collections: [entities_1.Client.schema]
|
|
75
|
+
})
|
|
76
|
+
},
|
|
77
|
+
min: 3,
|
|
78
|
+
max: 20
|
|
79
|
+
})
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
})(Clients || (exports.Clients = Clients = {}));
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Schema } from '@nascentdigital/funnel-core';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { HTMLBlockElement } from '../../types';
|
|
4
|
+
import { Caption, FreeFormContent, Headline, Title, Visual } from '../fields';
|
|
5
|
+
import { BlockConfig } from '../schema';
|
|
6
|
+
export declare function Editorial({ className, editorial, titleTag, headlineTag, captionTag, freeFormContentTag, headerDecorator, visualDecorator, visualLoading, ...props }: Editorial.Props): import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
+
export declare namespace Editorial {
|
|
8
|
+
const schema: Schema.Block<"_nd-editorial", {
|
|
9
|
+
visual: Schema.Optional<Schema.AssetField<Schema.AssetField.LinkedValue.Visual>>;
|
|
10
|
+
title: Schema.Optional<Schema.TextField>;
|
|
11
|
+
headline: Schema.Optional<Schema.RichTextField>;
|
|
12
|
+
caption: Schema.Optional<Schema.RichTextField>;
|
|
13
|
+
ctas: Schema.Optional<Schema.ListField<{
|
|
14
|
+
cta: Schema.LinkField;
|
|
15
|
+
}>>;
|
|
16
|
+
content: Schema.RichTextField;
|
|
17
|
+
extraContent: Schema.Optional<Schema.RichTextField>;
|
|
18
|
+
}, {
|
|
19
|
+
theme: Schema.EnumField<Readonly<import("@nascentdigital/funnel-core").BlockThemes.Options>>;
|
|
20
|
+
visualLayout: Schema.EnumField<Schema.EnumField.Options<BlockConfig.VisualLayout>>;
|
|
21
|
+
}>;
|
|
22
|
+
type Props = HTMLBlockElement<'div'> & {
|
|
23
|
+
editorial: Model;
|
|
24
|
+
titleTag?: Title.Tag;
|
|
25
|
+
headlineTag?: Headline.Tag;
|
|
26
|
+
captionTag?: Caption.Tag;
|
|
27
|
+
freeFormContentTag?: FreeFormContent.Tag;
|
|
28
|
+
headerDecorator?: ReactNode;
|
|
29
|
+
visualDecorator?: ReactNode;
|
|
30
|
+
visualLoading?: Visual.Loading;
|
|
31
|
+
};
|
|
32
|
+
type Model = Schema.Block.LinkedData<typeof schema>;
|
|
33
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Editorial = Editorial;
|
|
18
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
+
const funnel_core_1 = require("@nascentdigital/funnel-core");
|
|
20
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
21
|
+
const fields_1 = require("../fields");
|
|
22
|
+
const schema_1 = require("../schema");
|
|
23
|
+
// block
|
|
24
|
+
function Editorial(_a) {
|
|
25
|
+
var _b, _c, _d, _e, _f;
|
|
26
|
+
var { className, editorial, titleTag = 'span', headlineTag = 'div', captionTag = 'div', freeFormContentTag = 'div', headerDecorator, visualDecorator, visualLoading = 'eager' } = _a, props = __rest(_a, ["className", "editorial", "titleTag", "headlineTag", "captionTag", "freeFormContentTag", "headerDecorator", "visualDecorator", "visualLoading"]);
|
|
27
|
+
// dont render if missing model
|
|
28
|
+
if (!editorial) {
|
|
29
|
+
console.warn('[Editorial] attempted to render without editorial model');
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
// render
|
|
33
|
+
const { title: titleRaw, headline: headlineRaw, caption: captionRaw, ctas: ctasRaw, visual: visualRaw, content: contentRaw, extraContent: extraContentRaw } = editorial.fields;
|
|
34
|
+
const visual = visualRaw === null || visualRaw === void 0 ? void 0 : visualRaw.value;
|
|
35
|
+
const title = titleRaw === null || titleRaw === void 0 ? void 0 : titleRaw.value;
|
|
36
|
+
const headline = headlineRaw === null || headlineRaw === void 0 ? void 0 : headlineRaw.value;
|
|
37
|
+
const caption = captionRaw === null || captionRaw === void 0 ? void 0 : captionRaw.value;
|
|
38
|
+
const ctas = (_b = ctasRaw === null || ctasRaw === void 0 ? void 0 : ctasRaw.value) !== null && _b !== void 0 ? _b : [];
|
|
39
|
+
const content = contentRaw === null || contentRaw === void 0 ? void 0 : contentRaw.value;
|
|
40
|
+
const extraContent = extraContentRaw === null || extraContentRaw === void 0 ? void 0 : extraContentRaw.value;
|
|
41
|
+
return ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: (0, classnames_1.default)(className, 'nd-Block nd-Editorial', schema_1.BlockConfig.Theme.getClassName((_d = (_c = editorial === null || editorial === void 0 ? void 0 : editorial.config) === null || _c === void 0 ? void 0 : _c.theme) === null || _d === void 0 ? void 0 : _d.value), schema_1.BlockConfig.VisualLayout.getClassName((_f = (_e = editorial === null || editorial === void 0 ? void 0 : editorial.config) === null || _e === void 0 ? void 0 : _e.visualLayout) === null || _f === void 0 ? void 0 : _f.value)) }, props, { children: (0, jsx_runtime_1.jsxs)("div", { className: "nd-Editorial-content", children: [(title || headline || caption || ctas.length > 0) &&
|
|
42
|
+
(0, jsx_runtime_1.jsxs)("div", { className: "nd-Editorial-headerWrap", children: [(0, jsx_runtime_1.jsxs)("div", { className: "nd-Editorial-header", children: [title &&
|
|
43
|
+
(0, jsx_runtime_1.jsx)(fields_1.Title, { className: "nd-Editorial-title", as: titleTag, title: title }), headline &&
|
|
44
|
+
(0, jsx_runtime_1.jsx)(fields_1.Headline, { className: "nd-Editorial-headline", as: headlineTag, headline: headline }), caption &&
|
|
45
|
+
(0, jsx_runtime_1.jsx)(fields_1.Caption, { className: "nd-Editorial-caption", as: captionTag, caption: caption }), ctas.length > 0 &&
|
|
46
|
+
(0, jsx_runtime_1.jsx)("div", { className: "nd-Editorial-ctas", children: ctas.map(cta => (0, jsx_runtime_1.jsx)(fields_1.Link, { className: "nd-Editorial-cta", link: cta.value }, cta.id)) })] }), headerDecorator] }), (0, jsx_runtime_1.jsx)("div", { className: "nd-Editorial-bodyWrap", children: (0, jsx_runtime_1.jsxs)("div", { className: "nd-Editorial-body", children: [(visual || visualDecorator) &&
|
|
47
|
+
(0, jsx_runtime_1.jsxs)("div", { className: "nd-Editorial-visualWrap", children: [visual &&
|
|
48
|
+
(0, jsx_runtime_1.jsx)(fields_1.Visual, { className: "nd-Editorial-visual", visual: visual, loading: visualLoading }), visualDecorator] }), (0, jsx_runtime_1.jsxs)("div", { className: "nd-Editorial-columns", children: [(0, jsx_runtime_1.jsx)(fields_1.FreeFormContent, { as: freeFormContentTag, className: "nd-Editorial-freeFormContent", content: content }), extraContent &&
|
|
49
|
+
(0, jsx_runtime_1.jsx)(fields_1.FreeFormContent, { as: freeFormContentTag, className: "nd-Editorial-freeFormContent", content: extraContent })] })] }) })] }) })));
|
|
50
|
+
}
|
|
51
|
+
// extension
|
|
52
|
+
(function (Editorial) {
|
|
53
|
+
// schema
|
|
54
|
+
Editorial.schema = funnel_core_1.Schema.Block.create({
|
|
55
|
+
id: '_nd-editorial',
|
|
56
|
+
name: 'Editorial',
|
|
57
|
+
version: 1,
|
|
58
|
+
config: {
|
|
59
|
+
theme: schema_1.BlockConfig.Theme.schema,
|
|
60
|
+
visualLayout: schema_1.BlockConfig.VisualLayout.schema
|
|
61
|
+
},
|
|
62
|
+
fields: {
|
|
63
|
+
visual: fields_1.Visual.schema.optional(),
|
|
64
|
+
title: fields_1.Title.schema.modify({ description: 'A short intro or heading for the message' }).optional(),
|
|
65
|
+
headline: fields_1.Headline.schema.optional(),
|
|
66
|
+
caption: fields_1.Caption.schema.optional(),
|
|
67
|
+
ctas: funnel_core_1.Schema.Field.list({
|
|
68
|
+
name: 'CTAs',
|
|
69
|
+
description: 'Add your call-to-actions in the order you\'d like them to appear *(these are optional)*.',
|
|
70
|
+
itemTypes: {
|
|
71
|
+
cta: funnel_core_1.Schema.Field.link({ name: 'Call to Action' })
|
|
72
|
+
},
|
|
73
|
+
min: 1,
|
|
74
|
+
max: 2
|
|
75
|
+
}).optional(),
|
|
76
|
+
content: fields_1.FreeFormContent.schema.full,
|
|
77
|
+
extraContent: fields_1.FreeFormContent.schema.full.optional()
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
})(Editorial || (exports.Editorial = Editorial = {}));
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Schema } from '@nascentdigital/funnel-core';
|
|
2
|
+
import { JSXElementConstructor } from 'react';
|
|
3
|
+
import { HTMLBlockElement, HTMLElements } from '../../types';
|
|
4
|
+
import { Caption, Headline, Title } from '../fields';
|
|
5
|
+
import { FormMessage } from './FormMessage';
|
|
6
|
+
export declare function Form({ className, titleTag, headlineTag, captionTag, privacyStatementTag, form, component: ClientForm, ...props }: Form.Props): import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
+
export declare namespace Form {
|
|
8
|
+
const schema: (formId: string) => Schema.Block<"_nd-form", {
|
|
9
|
+
title: Schema.Optional<Schema.TextField>;
|
|
10
|
+
headline: Schema.Optional<Schema.RichTextField>;
|
|
11
|
+
caption: Schema.Optional<Schema.RichTextField>;
|
|
12
|
+
form: Schema.FormField;
|
|
13
|
+
submitLabel: Schema.TextField;
|
|
14
|
+
privacy: Schema.RichTextField;
|
|
15
|
+
successMessage: Schema.ObjectField<{
|
|
16
|
+
headline: Schema.RichTextField;
|
|
17
|
+
caption: Schema.RichTextField;
|
|
18
|
+
cta: Schema.Optional<Schema.LinkField>;
|
|
19
|
+
}>;
|
|
20
|
+
failureMessage: Schema.ObjectField<{
|
|
21
|
+
headline: Schema.RichTextField;
|
|
22
|
+
caption: Schema.RichTextField;
|
|
23
|
+
cta: Schema.Optional<Schema.LinkField>;
|
|
24
|
+
}>;
|
|
25
|
+
}, {
|
|
26
|
+
readonly theme: Schema.EnumField<Readonly<import("@nascentdigital/funnel-core").BlockThemes.Options>>;
|
|
27
|
+
}>;
|
|
28
|
+
type Props = HTMLBlockElement<'div'> & {
|
|
29
|
+
titleTag?: Title.Tag;
|
|
30
|
+
headlineTag?: Headline.Tag;
|
|
31
|
+
captionTag?: Caption.Tag;
|
|
32
|
+
privacyStatementTag?: Caption.Tag;
|
|
33
|
+
form: Model;
|
|
34
|
+
component: Component;
|
|
35
|
+
};
|
|
36
|
+
type Tag = HTMLElements.Standard.Container;
|
|
37
|
+
type Model = Schema.Block.LinkedData<ReturnType<typeof schema>>;
|
|
38
|
+
type ComponentProps = HTMLBlockElement<'div'> & {
|
|
39
|
+
form: Schema.FormField.Value;
|
|
40
|
+
privacy?: Schema.RichTextField.Value;
|
|
41
|
+
submitLabel?: string;
|
|
42
|
+
successMessage: FormMessage.Model;
|
|
43
|
+
failureMessage: FormMessage.Model;
|
|
44
|
+
};
|
|
45
|
+
type Component = JSXElementConstructor<ComponentProps>;
|
|
46
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Form = Form;
|
|
18
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
+
const funnel_core_1 = require("@nascentdigital/funnel-core");
|
|
20
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
21
|
+
const fields_1 = require("../fields");
|
|
22
|
+
const schema_1 = require("../schema");
|
|
23
|
+
const FormMessage_1 = require("./FormMessage");
|
|
24
|
+
// component
|
|
25
|
+
function Form(_a) {
|
|
26
|
+
var { className, titleTag = 'span', headlineTag = 'h2', captionTag = 'div', privacyStatementTag = 'div', form, component: ClientForm } = _a, props = __rest(_a, ["className", "titleTag", "headlineTag", "captionTag", "privacyStatementTag", "form", "component"]);
|
|
27
|
+
// dont render if missing model
|
|
28
|
+
const { config, fields } = form !== null && form !== void 0 ? form : {};
|
|
29
|
+
if (!form) {
|
|
30
|
+
console.warn('[Form] attempted to render without form model');
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
// render
|
|
34
|
+
const { title: titleRaw, headline: headlineRaw, caption: captionRaw, privacy: privacyRaw, submitLabel: submitLabelRaw, form: formRaw, successMessage: successMessageRaw, failureMessage: failureMessageRaw } = fields !== null && fields !== void 0 ? fields : {};
|
|
35
|
+
const title = titleRaw === null || titleRaw === void 0 ? void 0 : titleRaw.value;
|
|
36
|
+
const headline = headlineRaw === null || headlineRaw === void 0 ? void 0 : headlineRaw.value;
|
|
37
|
+
const caption = captionRaw === null || captionRaw === void 0 ? void 0 : captionRaw.value;
|
|
38
|
+
const privacy = privacyRaw === null || privacyRaw === void 0 ? void 0 : privacyRaw.value;
|
|
39
|
+
const formContent = formRaw === null || formRaw === void 0 ? void 0 : formRaw.value;
|
|
40
|
+
const submitLabel = submitLabelRaw === null || submitLabelRaw === void 0 ? void 0 : submitLabelRaw.value;
|
|
41
|
+
const successMessage = successMessageRaw === null || successMessageRaw === void 0 ? void 0 : successMessageRaw.value;
|
|
42
|
+
const failureMessage = failureMessageRaw === null || failureMessageRaw === void 0 ? void 0 : failureMessageRaw.value;
|
|
43
|
+
return ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: (0, classnames_1.default)(className, 'nd-Form', schema_1.BlockConfig.Presets.ThemeOnly.getClassName(config)) }, props, { children: (0, jsx_runtime_1.jsxs)("div", { className: "nd-Form-content", children: [(0, jsx_runtime_1.jsx)("div", { className: "nd-Form-copyWrap", children: (0, jsx_runtime_1.jsxs)("div", { className: "nd-Form-copy", children: [title &&
|
|
44
|
+
(0, jsx_runtime_1.jsx)(fields_1.Title, { className: "nd-Form-title", as: titleTag, title: title }), (0, jsx_runtime_1.jsx)(fields_1.Headline, { className: "nd-Form-headline", as: headlineTag, headline: headline }), caption &&
|
|
45
|
+
(0, jsx_runtime_1.jsx)(fields_1.Caption, { className: "nd-Form-caption", as: captionTag, caption: caption })] }) }), (0, jsx_runtime_1.jsx)("div", { className: "nd-Form-formWrap", children: (0, jsx_runtime_1.jsx)(ClientForm, { className: "nd-Form-form", form: formContent, submitLabel: submitLabel, privacy: privacy, successMessage: successMessage, failureMessage: failureMessage }) })] }) })));
|
|
46
|
+
}
|
|
47
|
+
// extension
|
|
48
|
+
(function (Form) {
|
|
49
|
+
// schema
|
|
50
|
+
Form.schema = (formId) => funnel_core_1.Schema.Block.create({
|
|
51
|
+
id: '_nd-form',
|
|
52
|
+
name: 'Form',
|
|
53
|
+
version: 1,
|
|
54
|
+
config: schema_1.BlockConfig.Presets.ThemeOnly.schema,
|
|
55
|
+
fields: {
|
|
56
|
+
title: fields_1.Title.schema.optional(),
|
|
57
|
+
headline: fields_1.Headline.schema.optional(),
|
|
58
|
+
caption: fields_1.Caption.schema.optional(),
|
|
59
|
+
form: funnel_core_1.Schema.Field.form({
|
|
60
|
+
name: 'Form',
|
|
61
|
+
description: 'Customize the details of your form field',
|
|
62
|
+
formId
|
|
63
|
+
}),
|
|
64
|
+
submitLabel: funnel_core_1.Schema.Field.text({
|
|
65
|
+
name: 'Submit Label',
|
|
66
|
+
minLength: 2,
|
|
67
|
+
maxLength: 30
|
|
68
|
+
}),
|
|
69
|
+
privacy: fields_1.Caption.schema.rename('Privacy Statement'),
|
|
70
|
+
successMessage: FormMessage_1.FormMessage.schema.rename('Success Message'),
|
|
71
|
+
failureMessage: FormMessage_1.FormMessage.schema.rename('Failure Message')
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
})(Form || (exports.Form = Form = {}));
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Schema } from '@nascentdigital/funnel-core';
|
|
2
|
+
export declare function FormMessage({ type, message }: FormMessage.Props): import("react/jsx-runtime").JSX.Element | null;
|
|
3
|
+
export declare namespace FormMessage {
|
|
4
|
+
const schema: Schema.ObjectField<{
|
|
5
|
+
headline: Schema.RichTextField;
|
|
6
|
+
caption: Schema.RichTextField;
|
|
7
|
+
cta: Schema.Optional<Schema.LinkField>;
|
|
8
|
+
}>;
|
|
9
|
+
type Model = Schema.Field.LinkedValue<typeof schema>;
|
|
10
|
+
type Type = 'success' | 'failure';
|
|
11
|
+
type Props = {
|
|
12
|
+
type: Type;
|
|
13
|
+
message: Model;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.FormMessage = FormMessage;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const funnel_core_1 = require("@nascentdigital/funnel-core");
|
|
9
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
10
|
+
const fields_1 = require("../fields");
|
|
11
|
+
// component
|
|
12
|
+
function FormMessage({ type, message }) {
|
|
13
|
+
var _a, _b, _c;
|
|
14
|
+
// return if no message
|
|
15
|
+
if (!message) {
|
|
16
|
+
console.warn('[FormMessage] no message content provided');
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
// render
|
|
20
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)('nd-FormMessage', `nd-FormMessage-${type}`), children: [(0, jsx_runtime_1.jsx)(fields_1.Headline, { as: "div", className: "nd-FormMessage-headline", headline: (_a = message.headline) === null || _a === void 0 ? void 0 : _a.value }), (0, jsx_runtime_1.jsx)(fields_1.Caption, { as: "div", className: "nd-FormMessage-caption", caption: (_b = message.caption) === null || _b === void 0 ? void 0 : _b.value }), message.cta &&
|
|
21
|
+
(0, jsx_runtime_1.jsx)(fields_1.Link, { className: "nd-FormMessage-cta", link: (_c = message.cta) === null || _c === void 0 ? void 0 : _c.value })] }));
|
|
22
|
+
}
|
|
23
|
+
// extension
|
|
24
|
+
(function (FormMessage) {
|
|
25
|
+
// schema
|
|
26
|
+
FormMessage.schema = funnel_core_1.Schema.Field.object({
|
|
27
|
+
name: 'Form Message',
|
|
28
|
+
preview: {
|
|
29
|
+
title: 'headline'
|
|
30
|
+
},
|
|
31
|
+
content: {
|
|
32
|
+
headline: fields_1.Headline.schema,
|
|
33
|
+
caption: fields_1.Caption.schema,
|
|
34
|
+
cta: funnel_core_1.Schema.Field.link({ name: 'Call to action' }).optional()
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
})(FormMessage || (exports.FormMessage = FormMessage = {}));
|