Shared image lightbox: LightboxProvider, LightboxTrigger, LightboxDialog, lightboxImage
Opt-in click-to-enlarge for small images (cards, galleries, rich text):
- /client: LightboxProvider (one viewer per site), LightboxTrigger (button
around any thumbnail, works without a provider), LightboxDialog
(controlled viewer), useLightbox / useOptionalLightbox
- accessible dialog: aria-modal, focus trap and return, Esc, arrows,
Home/End, swipe, counter, caption, scroll lock, reduced motion
- lightboxImage builds src + srcSet from Payload image sizes
- labels: ipalKit({ lightbox: true }) adds Notifications -> Lightbox;
getNotificationTexts().lightbox and getSiteShell().lightboxTexts,
English fallbacks otherwise
- RenderRichText lightbox / withLightboxUploads wrap image uploads
- SiteProviders lightbox mounts the provider
- styling from --ipal-lightbox-* variables; unstyled + classNames,
renderImage, renderDialog, icons, loop overrides
- tests with happy-dom (vitest's pinned optional peer)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
e53d09b720
commit
476c3ac1df
@@ -224,6 +224,7 @@ describe('one-call helpers — layout, page, GEO routes', () => {
|
||||
expect(shell.turnstileSiteKey).toBeNull()
|
||||
expect(shell.consent.buttons.acceptAll).toEqual(expect.any(String))
|
||||
expect(shell.formTexts).toMatchObject({ next: 'Next', stepOf: 'Step {current} of {total}' })
|
||||
expect(shell.lightboxTexts).toMatchObject({ close: 'Close', counter: '{current} / {total}' })
|
||||
expect(shell.jsonLd.map((n) => n['@type'])).toEqual(['WebSite', 'Organization'])
|
||||
expect(shell.jsonLd.every((n) => !('@context' in n))).toBe(true)
|
||||
const custom = createContentHelpers({ baseUrl: 'https://acme.pl', config: configPromise, i18n, siteJsonLd: false })
|
||||
|
||||
Reference in New Issue
Block a user