@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,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./Caption"), exports);
|
|
18
|
+
__exportStar(require("./Description"), exports);
|
|
19
|
+
__exportStar(require("./FreeFormContent"), exports);
|
|
20
|
+
__exportStar(require("./Headline"), exports);
|
|
21
|
+
__exportStar(require("./Icon"), exports);
|
|
22
|
+
__exportStar(require("./Link"), exports);
|
|
23
|
+
__exportStar(require("./Quote"), exports);
|
|
24
|
+
__exportStar(require("./RichText"), exports);
|
|
25
|
+
__exportStar(require("./Title"), exports);
|
|
26
|
+
__exportStar(require("./Visual"), exports);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./atomic"), exports);
|
|
18
|
+
__exportStar(require("./blocks"), exports);
|
|
19
|
+
__exportStar(require("./data"), exports);
|
|
20
|
+
__exportStar(require("./entities"), exports);
|
|
21
|
+
__exportStar(require("./fields"), exports);
|
|
22
|
+
__exportStar(require("./panels"), exports);
|
|
23
|
+
__exportStar(require("./schema"), exports);
|
|
24
|
+
__exportStar(require("./sections"), exports);
|
|
25
|
+
__exportStar(require("./transitions"), exports);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BlockLayout } from '@nascentdigital/funnel-core';
|
|
2
|
+
export declare namespace BlockPanel {
|
|
3
|
+
type Props = {
|
|
4
|
+
alignX?: BlockLayout.Alignment;
|
|
5
|
+
alignY?: BlockLayout.Alignment;
|
|
6
|
+
size?: BlockLayout.Size;
|
|
7
|
+
fullbleed?: boolean;
|
|
8
|
+
mobileOrder?: BlockLayout.MobileOrder;
|
|
9
|
+
};
|
|
10
|
+
type GetClassNamesArgs = Props & {
|
|
11
|
+
panel: BlockLayout.Panel;
|
|
12
|
+
};
|
|
13
|
+
function getClassNames({ panel, alignX, alignY, size, fullbleed, mobileOrder }: GetClassNamesArgs): string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
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.BlockPanel = void 0;
|
|
7
|
+
const funnel_core_1 = require("@nascentdigital/funnel-core");
|
|
8
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
9
|
+
// extensions
|
|
10
|
+
var BlockPanel;
|
|
11
|
+
(function (BlockPanel) {
|
|
12
|
+
function getClassNames({ panel, alignX = panel.alignX, alignY = panel.alignY, size = panel.size, fullbleed, mobileOrder = panel.mobileOrder }) {
|
|
13
|
+
return (0, classnames_1.default)('nd-BlockPanel',
|
|
14
|
+
// alignment
|
|
15
|
+
{
|
|
16
|
+
'nd-BlockPanel-x-start': alignX === 'start',
|
|
17
|
+
'nd-BlockPanel-x-center': alignX === 'center',
|
|
18
|
+
'nd-BlockPanel-x-end': alignX === 'end',
|
|
19
|
+
'nd-BlockPanel-y-start': alignY === 'start',
|
|
20
|
+
'nd-BlockPanel-y-center': alignY === 'center',
|
|
21
|
+
'nd-BlockPanel-y-end': alignY === 'end',
|
|
22
|
+
},
|
|
23
|
+
// size
|
|
24
|
+
{
|
|
25
|
+
'nd-BlockPanel-xs': size === 'xs',
|
|
26
|
+
'nd-BlockPanel-sm': size === 'sm',
|
|
27
|
+
'nd-BlockPanel-md': size === 'md',
|
|
28
|
+
'nd-BlockPanel-lg': size === 'lg',
|
|
29
|
+
'nd-BlockPanel-full': size === 'full'
|
|
30
|
+
},
|
|
31
|
+
// fullbleed
|
|
32
|
+
fullbleed !== undefined
|
|
33
|
+
? { 'nd-BlockPanel-fullbleed': fullbleed }
|
|
34
|
+
: funnel_core_1.BlockLayout.ResponsiveClassNames.parse({
|
|
35
|
+
value: panel.fullBleed,
|
|
36
|
+
mobile: {
|
|
37
|
+
false: '',
|
|
38
|
+
true: 'nd-BlockPanel-fullbleed-mobile'
|
|
39
|
+
},
|
|
40
|
+
base: {
|
|
41
|
+
false: '',
|
|
42
|
+
true: 'nd-BlockPanel-fullbleed-tablet'
|
|
43
|
+
},
|
|
44
|
+
desktop: {
|
|
45
|
+
false: '',
|
|
46
|
+
true: 'nd-BlockPanel-fullbleed-desktop'
|
|
47
|
+
}
|
|
48
|
+
}),
|
|
49
|
+
// mobile order
|
|
50
|
+
{
|
|
51
|
+
'nd-BlockPanel-mobileFirst': mobileOrder === 'first',
|
|
52
|
+
'nd-BlockPanel-mobileLast': mobileOrder === 'last'
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
BlockPanel.getClassNames = getClassNames;
|
|
56
|
+
})(BlockPanel || (exports.BlockPanel = BlockPanel = {}));
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { BlockLayout, Schema } from '@nascentdigital/funnel-core';
|
|
2
|
+
import { Caption, Headline, Title } from '../fields';
|
|
3
|
+
import { TextAlignment } from '../schema';
|
|
4
|
+
import { BlockPanel } from './BlockPanel';
|
|
5
|
+
export declare function MessagePanel({ className, panel, titleTag, title, headlineTag, headline, captionTag, caption, ctas: ctasRaw, textAlign, alignX, alignY, size, fullbleed, mobileOrder }: MessagePanel.Props): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare namespace MessagePanel {
|
|
7
|
+
type Props = BlockPanel.Props & {
|
|
8
|
+
className?: string;
|
|
9
|
+
panel: BlockLayout.Message;
|
|
10
|
+
titleTag?: Title.Tag;
|
|
11
|
+
title?: Title.Value;
|
|
12
|
+
headlineTag?: Headline.Tag;
|
|
13
|
+
headline: Headline.Value;
|
|
14
|
+
caption?: Caption.Value;
|
|
15
|
+
captionTag?: Caption.Tag;
|
|
16
|
+
ctas?: Schema.LinkField.LinkedValue | Fields.ctas.Value;
|
|
17
|
+
textAlign?: TextAlignment;
|
|
18
|
+
};
|
|
19
|
+
namespace Fields {
|
|
20
|
+
const title: Schema.Optional<Schema.AssetField<Schema.AssetField.LinkedValue.Visual>>;
|
|
21
|
+
const headline: Schema.RichTextField;
|
|
22
|
+
const caption: Schema.Optional<Schema.RichTextField>;
|
|
23
|
+
const cta: Schema.LinkField;
|
|
24
|
+
const ctas: Schema.Optional<Schema.ListField<{
|
|
25
|
+
cta: Schema.LinkField;
|
|
26
|
+
}>>;
|
|
27
|
+
namespace ctas {
|
|
28
|
+
type Value = Schema.Field.LinkedValue.ForOptionalType<typeof ctas>;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
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.MessagePanel = MessagePanel;
|
|
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
|
+
const BlockPanel_1 = require("./BlockPanel");
|
|
12
|
+
// component
|
|
13
|
+
function MessagePanel({ className, panel, titleTag = 'span', title, headlineTag = 'h2', headline, captionTag = 'div', caption, ctas: ctasRaw = [], textAlign, alignX, alignY, size, fullbleed, mobileOrder }) {
|
|
14
|
+
// normalize ctas
|
|
15
|
+
let ctas;
|
|
16
|
+
if (Array.isArray(ctasRaw)) {
|
|
17
|
+
ctas = ctasRaw;
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
ctas = [
|
|
21
|
+
{
|
|
22
|
+
id: '__cta',
|
|
23
|
+
schema: 'cta',
|
|
24
|
+
type: 'link',
|
|
25
|
+
value: ctasRaw
|
|
26
|
+
}
|
|
27
|
+
];
|
|
28
|
+
}
|
|
29
|
+
// render
|
|
30
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(className, 'nd-MessagePanel',
|
|
31
|
+
// base layout
|
|
32
|
+
BlockPanel_1.BlockPanel.getClassNames({ panel, alignX, alignY, size, fullbleed, mobileOrder }),
|
|
33
|
+
// text-align
|
|
34
|
+
textAlign
|
|
35
|
+
? {
|
|
36
|
+
'nd-MessagePanel-textStart': textAlign === 'left',
|
|
37
|
+
'nd-MessagePanel-textCenter': textAlign === 'center',
|
|
38
|
+
'nd-MessagePanel-textEnd': textAlign === 'right'
|
|
39
|
+
}
|
|
40
|
+
: funnel_core_1.BlockLayout.ResponsiveClassNames.parse({
|
|
41
|
+
value: panel.textAlign,
|
|
42
|
+
mobile: {
|
|
43
|
+
left: 'max-md:nd-MessagePanel-textStart',
|
|
44
|
+
center: 'max-md:nd-MessagePanel-textCenter',
|
|
45
|
+
right: 'max-md:nd-MessagePanel-textEnd'
|
|
46
|
+
},
|
|
47
|
+
base: {
|
|
48
|
+
left: 'md:nd-MessagePanel-textStart',
|
|
49
|
+
center: 'md:nd-MessagePanel-textCenter',
|
|
50
|
+
right: 'md:nd-MessagePanel-textEnd'
|
|
51
|
+
},
|
|
52
|
+
desktop: {
|
|
53
|
+
left: 'lg:nd-MessagePanel-textStart',
|
|
54
|
+
center: 'lg:nd-MessagePanel-textCenter',
|
|
55
|
+
right: 'lg:nd-MessagePanel-textEnd'
|
|
56
|
+
}
|
|
57
|
+
})), children: (0, jsx_runtime_1.jsxs)("div", { className: "nd-BlockPanel-content nd-MessagePanel-content", children: [title &&
|
|
58
|
+
(0, jsx_runtime_1.jsx)(fields_1.Title, { className: "nd-MessagePanel-title", as: titleTag, title: title }), (0, jsx_runtime_1.jsx)(fields_1.Headline, { className: "nd-MessagePanel-headline", as: headlineTag, headline: headline }), caption &&
|
|
59
|
+
(0, jsx_runtime_1.jsx)(fields_1.Caption, { className: "nd-MessagePanel-caption", as: captionTag, caption: caption }), ctas.length > 0 &&
|
|
60
|
+
(0, jsx_runtime_1.jsx)("div", { className: "nd-MessagePanel-ctas", children: ctas.map(cta => (0, jsx_runtime_1.jsx)(fields_1.Link, { className: "nd-MessagePanel-cta", link: cta.value }, cta.id)) })] }) }));
|
|
61
|
+
}
|
|
62
|
+
// extension
|
|
63
|
+
(function (MessagePanel) {
|
|
64
|
+
// fields
|
|
65
|
+
let Fields;
|
|
66
|
+
(function (Fields) {
|
|
67
|
+
Fields.title = fields_1.Visual.schema.modify({
|
|
68
|
+
description: 'A short intro or heading for the message'
|
|
69
|
+
}).optional();
|
|
70
|
+
Fields.headline = fields_1.Headline.schema;
|
|
71
|
+
Fields.caption = fields_1.Caption.schema.optional();
|
|
72
|
+
Fields.cta = funnel_core_1.Schema.Field.link({ name: 'Call to Action' });
|
|
73
|
+
Fields.ctas = funnel_core_1.Schema.Field.list({
|
|
74
|
+
name: 'CTAs',
|
|
75
|
+
description: 'Add your call-to-actions in the order you\'d like them to appear *(these are optional)*.',
|
|
76
|
+
itemTypes: { cta: Fields.cta },
|
|
77
|
+
min: 1,
|
|
78
|
+
max: 2
|
|
79
|
+
}).optional();
|
|
80
|
+
})(Fields = MessagePanel.Fields || (MessagePanel.Fields = {}));
|
|
81
|
+
})(MessagePanel || (exports.MessagePanel = MessagePanel = {}));
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { BlockLayout, Schema } from '@nascentdigital/funnel-core';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { Visual } from '../fields';
|
|
4
|
+
import { Anchor, AspectRatio } from '../schema';
|
|
5
|
+
import { BlockPanel } from './BlockPanel';
|
|
6
|
+
export declare function VisualPanel({ className, panel, visual, visualDecorator, visualLoading, aspect, anchor, alignX, alignY, size, fullbleed, mobileOrder }: VisualPanel.Props): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare namespace VisualPanel {
|
|
8
|
+
type Props = BlockPanel.Props & {
|
|
9
|
+
className?: string;
|
|
10
|
+
panel: BlockLayout.Visual;
|
|
11
|
+
visual: Visual.Model;
|
|
12
|
+
visualDecorator?: ReactNode;
|
|
13
|
+
visualLoading?: Visual.Loading;
|
|
14
|
+
aspect?: AspectRatio;
|
|
15
|
+
anchor?: Anchor;
|
|
16
|
+
};
|
|
17
|
+
namespace Fields {
|
|
18
|
+
const visual: Schema.AssetField<Schema.AssetField.LinkedValue.Visual>;
|
|
19
|
+
}
|
|
20
|
+
namespace GetConfig {
|
|
21
|
+
type ConfigSchema<AspectKey extends string, AnchorKey extends string> = Record<AspectKey, AspectRatio.Schema> & Record<AnchorKey, Anchor.Schema>;
|
|
22
|
+
type ConfigData<AspectKey extends string, AnchorKey extends string> = Schema.Block.Data.ForConfig<ConfigSchema<AspectKey, AnchorKey>>;
|
|
23
|
+
type Args<AspectKey extends string, AnchorKey extends string> = {
|
|
24
|
+
visual?: Schema.Field.Data<Schema.AssetField> | Schema.Field.LinkedData<Schema.AssetField>;
|
|
25
|
+
config?: Partial<ConfigData<AspectKey, AnchorKey>>;
|
|
26
|
+
aspectKey: AspectKey;
|
|
27
|
+
anchorKey: AnchorKey;
|
|
28
|
+
};
|
|
29
|
+
type Result<AspectKey extends string, AnchorKey extends string> = {
|
|
30
|
+
configSchema: Partial<ConfigSchema<AspectKey, AnchorKey>>;
|
|
31
|
+
config: Partial<ConfigData<AspectKey, AnchorKey>>;
|
|
32
|
+
defaultConfig: Partial<ConfigData<AspectKey, AnchorKey>>;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function getConfig<AspectKey extends string, AnchorKey extends string>({ visual: visualData, config, aspectKey, anchorKey }: GetConfig.Args<AspectKey, AnchorKey>): GetConfig.Result<AspectKey, AnchorKey>;
|
|
36
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
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.VisualPanel = VisualPanel;
|
|
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
|
+
const schema_1 = require("../schema");
|
|
12
|
+
const BlockPanel_1 = require("./BlockPanel");
|
|
13
|
+
// component
|
|
14
|
+
function VisualPanel({ className, panel, visual, visualDecorator, visualLoading, aspect, anchor = 'center', alignX, alignY, size, fullbleed, mobileOrder }) {
|
|
15
|
+
// render
|
|
16
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(className, 'nd-VisualPanel',
|
|
17
|
+
// base layout
|
|
18
|
+
BlockPanel_1.BlockPanel.getClassNames({ panel, alignX, alignY, size, fullbleed, mobileOrder }),
|
|
19
|
+
// aspect
|
|
20
|
+
aspect
|
|
21
|
+
? {
|
|
22
|
+
'nd-VisualPanel-aspect-auto': aspect === 'auto',
|
|
23
|
+
'nd-VisualPanel-aspect-square': aspect === 'square',
|
|
24
|
+
'nd-VisualPanel-aspect-phone': aspect === 'phone',
|
|
25
|
+
'nd-VisualPanel-aspect-tv': aspect === 'tv',
|
|
26
|
+
'nd-VisualPanel-aspect-widescreen': aspect === 'widescreen',
|
|
27
|
+
'nd-VisualPanel-aspect-cinema': aspect === 'cinema'
|
|
28
|
+
}
|
|
29
|
+
: funnel_core_1.BlockLayout.ResponsiveClassNames.parse({
|
|
30
|
+
value: panel.aspectRatio,
|
|
31
|
+
mobile: {
|
|
32
|
+
auto: 'max-md:nd-VisualPanel-aspect-auto',
|
|
33
|
+
square: 'max-md:nd-VisualPanel-aspect-square',
|
|
34
|
+
phone: 'max-md:nd-VisualPanel-aspect-phone',
|
|
35
|
+
tv: 'max-md:nd-VisualPanel-aspect-tv',
|
|
36
|
+
widescreen: 'max-md:nd-VisualPanel-aspect-widescreen',
|
|
37
|
+
cinema: 'max-md:nd-VisualPanel-aspect-cinema'
|
|
38
|
+
},
|
|
39
|
+
base: {
|
|
40
|
+
auto: 'md:nd-VisualPanel-aspect-auto',
|
|
41
|
+
square: 'md:nd-VisualPanel-aspect-square',
|
|
42
|
+
phone: 'md:nd-VisualPanel-aspect-phone',
|
|
43
|
+
tv: 'md:nd-VisualPanel-aspect-tv',
|
|
44
|
+
widescreen: 'md:nd-VisualPanel-aspect-widescreen',
|
|
45
|
+
cinema: 'md:nd-VisualPanel-aspect-cinema'
|
|
46
|
+
},
|
|
47
|
+
desktop: {
|
|
48
|
+
auto: 'lg:nd-VisualPanel-aspect-auto',
|
|
49
|
+
square: 'lg:nd-VisualPanel-aspect-square',
|
|
50
|
+
phone: 'lg:nd-VisualPanel-aspect-phone',
|
|
51
|
+
tv: 'lg:nd-VisualPanel-aspect-tv',
|
|
52
|
+
widescreen: 'lg:nd-VisualPanel-aspect-widescreen',
|
|
53
|
+
cinema: 'lg:nd-VisualPanel-aspect-cinema'
|
|
54
|
+
}
|
|
55
|
+
}),
|
|
56
|
+
// anchor
|
|
57
|
+
{
|
|
58
|
+
'nd-VisualPanel-anchor-center': anchor === 'center',
|
|
59
|
+
'nd-VisualPanel-anchor-top': anchor === 'top',
|
|
60
|
+
'nd-VisualPanel-anchor-bottom': anchor === 'bottom',
|
|
61
|
+
'nd-VisualPanel-anchor-left': anchor === 'left',
|
|
62
|
+
'nd-VisualPanel-anchor-right': anchor === 'right'
|
|
63
|
+
}), children: (0, jsx_runtime_1.jsxs)("div", { className: "nd-BlockPanel-content nd-VisualPanel-content", children: [(0, jsx_runtime_1.jsx)(fields_1.Visual, { className: "nd-VisualPanel-visual", visual: visual, loading: visualLoading }), visualDecorator &&
|
|
64
|
+
(0, jsx_runtime_1.jsx)("div", { className: "nd-VisualPanel-decorator", children: visualDecorator })] }) }));
|
|
65
|
+
}
|
|
66
|
+
// extension
|
|
67
|
+
(function (VisualPanel) {
|
|
68
|
+
// fields
|
|
69
|
+
let Fields;
|
|
70
|
+
(function (Fields) {
|
|
71
|
+
Fields.visual = fields_1.Visual.schema;
|
|
72
|
+
})(Fields = VisualPanel.Fields || (VisualPanel.Fields = {}));
|
|
73
|
+
function getConfig({ visual: visualData, config = {}, aspectKey, anchorKey }) {
|
|
74
|
+
var _a, _b, _c, _d, _e;
|
|
75
|
+
// resolve values
|
|
76
|
+
const defaultAspect = 'auto';
|
|
77
|
+
const defaultAnchor = 'center';
|
|
78
|
+
let aspect = (_b = (_a = config[aspectKey]) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : defaultAspect;
|
|
79
|
+
let anchor = (_d = (_c = config[anchorKey]) === null || _c === void 0 ? void 0 : _c.value) !== null && _d !== void 0 ? _d : defaultAnchor;
|
|
80
|
+
const visual = visualData === null || visualData === void 0 ? void 0 : visualData.value;
|
|
81
|
+
// return immediately if there's no visual
|
|
82
|
+
if (!visual || !funnel_core_1.Schema.AssetField.LinkedValue.Visual.filter(visual)) {
|
|
83
|
+
return {
|
|
84
|
+
configSchema: {
|
|
85
|
+
[aspectKey]: undefined,
|
|
86
|
+
[anchorKey]: undefined
|
|
87
|
+
},
|
|
88
|
+
config: {},
|
|
89
|
+
defaultConfig: {}
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
// determine is visual is an existing aspect ratio (and switch aspect to auto if it matches)
|
|
93
|
+
const { dimensions: { width, height } = {} } = (_e = visual.metadata) !== null && _e !== void 0 ? _e : {};
|
|
94
|
+
const sourceAspectRatio = width && height
|
|
95
|
+
? width / height
|
|
96
|
+
: undefined;
|
|
97
|
+
const matchedAspect = sourceAspectRatio
|
|
98
|
+
? schema_1.AspectRatio.forRatio(sourceAspectRatio)
|
|
99
|
+
: undefined;
|
|
100
|
+
if (aspect === matchedAspect) {
|
|
101
|
+
aspect = 'auto';
|
|
102
|
+
}
|
|
103
|
+
console.debug('[VisualPanel/getConfig] aspect calculation:', { width, height, sourceAspectRatio, matchedAspect });
|
|
104
|
+
// create schema (drop matched aspect if we need to)
|
|
105
|
+
const configSchema = {
|
|
106
|
+
[aspectKey]: matchedAspect
|
|
107
|
+
? schema_1.AspectRatio.schema.removeOption(matchedAspect)
|
|
108
|
+
: schema_1.AspectRatio.schema,
|
|
109
|
+
[anchorKey]: aspect === 'auto' ? undefined : schema_1.Anchor.schema
|
|
110
|
+
};
|
|
111
|
+
// reduce anchor to options that are allowed (vertical vs horizontal cropping)
|
|
112
|
+
if (sourceAspectRatio && aspect !== 'auto') {
|
|
113
|
+
// coerce anchor
|
|
114
|
+
const targetAspectRatio = schema_1.AspectRatio.ratios[aspect];
|
|
115
|
+
console.debug('[VisualPanel/getConfig] aspect calculation:', { width, height, sourceAspectRatio, matchedAspect, targetAspectRatio });
|
|
116
|
+
let anchorSchema = schema_1.Anchor.schema.modify({ semantics: 'segmented' });
|
|
117
|
+
if (sourceAspectRatio < targetAspectRatio) {
|
|
118
|
+
anchorSchema = anchorSchema.keepOptions('center', 'top', 'bottom');
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
anchorSchema = anchorSchema.keepOptions('center', 'left', 'right');
|
|
122
|
+
}
|
|
123
|
+
configSchema[anchorKey] = anchorSchema;
|
|
124
|
+
// update config
|
|
125
|
+
if (!anchorSchema.isValidOption(anchor)) {
|
|
126
|
+
anchor = 'center';
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
// return result
|
|
130
|
+
return {
|
|
131
|
+
configSchema: configSchema,
|
|
132
|
+
config: {
|
|
133
|
+
[aspectKey]: funnel_core_1.Schema.EnumField.Value.toData(aspect),
|
|
134
|
+
[anchorKey]: aspect === 'auto' ? undefined : funnel_core_1.Schema.EnumField.Value.toData(anchor)
|
|
135
|
+
},
|
|
136
|
+
defaultConfig: {
|
|
137
|
+
[aspectKey]: funnel_core_1.Schema.EnumField.Value.toData(defaultAspect),
|
|
138
|
+
[anchorKey]: aspect === 'auto' ? undefined : funnel_core_1.Schema.EnumField.Value.toData(defaultAnchor)
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
VisualPanel.getConfig = getConfig;
|
|
143
|
+
})(VisualPanel || (exports.VisualPanel = VisualPanel = {}));
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./BlockPanel"), exports);
|
|
18
|
+
__exportStar(require("./MessagePanel"), exports);
|
|
19
|
+
__exportStar(require("./VisualPanel"), exports);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Schema } from '@nascentdigital/funnel-core';
|
|
2
|
+
export type Anchor = 'center' | 'top' | 'bottom' | 'left' | 'right';
|
|
3
|
+
export declare namespace Anchor {
|
|
4
|
+
const options: Schema.EnumField.Options<Anchor>;
|
|
5
|
+
const schema: Schema.EnumField<Schema.EnumField.Options<Anchor>>;
|
|
6
|
+
type Schema = typeof schema;
|
|
7
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Anchor = void 0;
|
|
4
|
+
const funnel_core_1 = require("@nascentdigital/funnel-core");
|
|
5
|
+
// extension
|
|
6
|
+
var Anchor;
|
|
7
|
+
(function (Anchor) {
|
|
8
|
+
// schema
|
|
9
|
+
Anchor.options = {
|
|
10
|
+
center: { name: 'Center' },
|
|
11
|
+
top: { name: 'Top' },
|
|
12
|
+
bottom: { name: 'Bottom' },
|
|
13
|
+
left: { name: 'Left' },
|
|
14
|
+
right: { name: 'Right' }
|
|
15
|
+
};
|
|
16
|
+
Anchor.schema = funnel_core_1.Schema.Field.enumeration({
|
|
17
|
+
name: 'Anchor',
|
|
18
|
+
semantics: 'dropdown',
|
|
19
|
+
hint: 'Set anchor',
|
|
20
|
+
description: 'Sets the edge of the visual that will be visible (not cropped).',
|
|
21
|
+
options: Anchor.options,
|
|
22
|
+
defaultOption: 'center'
|
|
23
|
+
});
|
|
24
|
+
})(Anchor || (exports.Anchor = Anchor = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BlockLayout, Schema } from '@nascentdigital/funnel-core';
|
|
2
|
+
export type AspectRatio = BlockLayout.AspectRatio;
|
|
3
|
+
export declare namespace AspectRatio {
|
|
4
|
+
const ratios: Readonly<Record<Exclude<AspectRatio, 'auto'>, number>>;
|
|
5
|
+
const options: Schema.EnumField.Options<AspectRatio>;
|
|
6
|
+
const schema: Schema.EnumField<Schema.EnumField.Options<BlockLayout.AspectRatio>>;
|
|
7
|
+
type Schema = typeof schema;
|
|
8
|
+
function forRatio(ratio: number): AspectRatio | undefined;
|
|
9
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AspectRatio = void 0;
|
|
4
|
+
const funnel_core_1 = require("@nascentdigital/funnel-core");
|
|
5
|
+
// extension
|
|
6
|
+
var AspectRatio;
|
|
7
|
+
(function (AspectRatio) {
|
|
8
|
+
// export cont ratios
|
|
9
|
+
AspectRatio.ratios = {
|
|
10
|
+
square: 1,
|
|
11
|
+
phone: 9 / 16,
|
|
12
|
+
tv: 4 / 3,
|
|
13
|
+
widescreen: 16 / 9,
|
|
14
|
+
cinema: 185 / 100
|
|
15
|
+
};
|
|
16
|
+
// schema
|
|
17
|
+
AspectRatio.options = {
|
|
18
|
+
auto: { name: 'Auto', hint: 'Use the natural sizing of the visual.' },
|
|
19
|
+
square: { name: 'Square', hint: 'Crop to a square (1:1)' },
|
|
20
|
+
phone: { name: 'Phone', hint: 'Crop to phone portrait (9:16)' },
|
|
21
|
+
tv: { name: 'TV', hint: 'Crop to TV frame (4:3)' },
|
|
22
|
+
widescreen: { name: 'Widescreen', hint: 'Crop to widescreen media display (16:9)' },
|
|
23
|
+
cinema: { name: 'Cinema', hint: 'Crop to cinema display (185:100' }
|
|
24
|
+
};
|
|
25
|
+
AspectRatio.schema = funnel_core_1.Schema.Field.enumeration({
|
|
26
|
+
name: 'Aspect Ratio',
|
|
27
|
+
semantics: 'dropdown',
|
|
28
|
+
hint: 'Select aspect',
|
|
29
|
+
description: 'Control how visuals are cropped.',
|
|
30
|
+
options: AspectRatio.options,
|
|
31
|
+
defaultOption: 'auto'
|
|
32
|
+
});
|
|
33
|
+
// helpers
|
|
34
|
+
function forRatio(ratio) {
|
|
35
|
+
var _a;
|
|
36
|
+
// match if within a threshold of 1/100th
|
|
37
|
+
const [aspect] = (_a = Object.entries(AspectRatio.ratios)
|
|
38
|
+
.find(([, aspectRatio]) => Math.abs(aspectRatio - ratio) <= 0.01)) !== null && _a !== void 0 ? _a : [];
|
|
39
|
+
// return aspect
|
|
40
|
+
return aspect;
|
|
41
|
+
}
|
|
42
|
+
AspectRatio.forRatio = forRatio;
|
|
43
|
+
})(AspectRatio || (exports.AspectRatio = AspectRatio = {}));
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { BlockThemes, Schema } from '@nascentdigital/funnel-core';
|
|
2
|
+
export declare namespace BlockConfig {
|
|
3
|
+
namespace Theme {
|
|
4
|
+
const schema: Schema.EnumField<Readonly<BlockThemes.Options>>;
|
|
5
|
+
type Model = Schema.Field.Value<typeof schema>;
|
|
6
|
+
function getClassName(theme?: BlockThemes.Theme.Extended): string;
|
|
7
|
+
}
|
|
8
|
+
type VisualLayout = VisualLayout.Horizontal | VisualLayout.Vertical | 'bg';
|
|
9
|
+
namespace VisualLayout {
|
|
10
|
+
type Horizontal = 'left' | 'right';
|
|
11
|
+
type Vertical = 'top' | 'bottom';
|
|
12
|
+
namespace Horizontal {
|
|
13
|
+
const Enum: Schema.EnumField.Options<Horizontal>;
|
|
14
|
+
const schema: Schema.EnumField<Schema.EnumField.Options<Horizontal>>;
|
|
15
|
+
}
|
|
16
|
+
namespace Vertical {
|
|
17
|
+
const Enum: Schema.EnumField.Options<Vertical>;
|
|
18
|
+
const schema: Schema.EnumField<Schema.EnumField.Options<Vertical>>;
|
|
19
|
+
}
|
|
20
|
+
const Enum: Schema.EnumField.Options<VisualLayout>;
|
|
21
|
+
const schema: Schema.EnumField<Schema.EnumField.Options<VisualLayout>>;
|
|
22
|
+
type Model = Schema.Field.Value<typeof schema>;
|
|
23
|
+
function getClassName(layout?: VisualLayout): string;
|
|
24
|
+
}
|
|
25
|
+
type CopyLayout = 'center' | 'left' | 'left-top' | 'left-btm' | 'right' | 'right-top' | 'right-btm' | 'top' | 'bottom';
|
|
26
|
+
namespace CopyLayout {
|
|
27
|
+
const Enum: Schema.EnumField.Options<CopyLayout>;
|
|
28
|
+
const schema: Schema.EnumField<Schema.EnumField.Options<CopyLayout>>;
|
|
29
|
+
type Model = Schema.Field.Value<typeof schema>;
|
|
30
|
+
function getClassName(layout?: CopyLayout): string;
|
|
31
|
+
}
|
|
32
|
+
namespace Fullbleed {
|
|
33
|
+
const schema: Schema.BooleanField;
|
|
34
|
+
type Model = Schema.Field.Value<typeof schema>;
|
|
35
|
+
function getClassName(fullbleed?: boolean): string | undefined;
|
|
36
|
+
}
|
|
37
|
+
namespace Presets {
|
|
38
|
+
type ThemeOnly = Schema.Block.Data.ForConfig<typeof ThemeOnly.schema>;
|
|
39
|
+
namespace ThemeOnly {
|
|
40
|
+
const schema: {
|
|
41
|
+
readonly theme: Schema.EnumField<Readonly<BlockThemes.Options>>;
|
|
42
|
+
};
|
|
43
|
+
function getClassName(config?: ThemeOnly): string;
|
|
44
|
+
}
|
|
45
|
+
type VisualAndCopy = Schema.Block.Data.ForConfig<typeof VisualAndCopy.schema>;
|
|
46
|
+
namespace VisualAndCopy {
|
|
47
|
+
const schema: {
|
|
48
|
+
readonly theme: Schema.EnumField<Readonly<BlockThemes.Options>>;
|
|
49
|
+
readonly visualLayout: Schema.EnumField<Schema.EnumField.Options<VisualLayout>>;
|
|
50
|
+
readonly copyLayout: Schema.EnumField<Schema.EnumField.Options<CopyLayout>>;
|
|
51
|
+
readonly fullbleed: Schema.BooleanField;
|
|
52
|
+
};
|
|
53
|
+
function getClassName(config?: VisualAndCopy): string;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|