mp-design-system 1.2.63 → 1.2.65
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +35 -29
- package/dist/build/js/app.js +1 -22
- package/dist/build/scss/library.css +1 -1
- package/dist/build/scss/main.css +1 -1
- package/package.json +35 -46
- package/src/_data/components.js +0 -104
- package/src/_data/config.js +0 -14
- package/src/_data/helpers.js +0 -6
- package/src/_headers +0 -9
- package/src/_includes/components/accordion/accordion.config.js +0 -28
- package/src/_includes/components/accordion/accordion.md +0 -15
- package/src/_includes/components/accordion/accordion.njk +0 -10
- package/src/_includes/components/accordion/accordion.scss +0 -54
- package/src/_includes/components/accordion/macro.njk +0 -5
- package/src/_includes/components/alert/alert.config.js +0 -65
- package/src/_includes/components/alert/alert.njk +0 -27
- package/src/_includes/components/alert/alert.scss +0 -80
- package/src/_includes/components/alert/macro.njk +0 -5
- package/src/_includes/components/back-to-top/back-to-top.config.js +0 -10
- package/src/_includes/components/back-to-top/back-to-top.njk +0 -7
- package/src/_includes/components/back-to-top/back-to-top.scss +0 -22
- package/src/_includes/components/back-to-top/macro.njk +0 -5
- package/src/_includes/components/breadcrumb/breadcrumb.config.js +0 -20
- package/src/_includes/components/breadcrumb/breadcrumb.njk +0 -19
- package/src/_includes/components/breadcrumb/breadcrumb.scss +0 -69
- package/src/_includes/components/breadcrumb/macro.njk +0 -5
- package/src/_includes/components/button/button.config.js +0 -89
- package/src/_includes/components/button/button.njk +0 -38
- package/src/_includes/components/button/button.scss +0 -178
- package/src/_includes/components/button/macro.njk +0 -5
- package/src/_includes/components/campaign/campaign.config.js +0 -68
- package/src/_includes/components/campaign/campaign.njk +0 -26
- package/src/_includes/components/campaign/campaign.scss +0 -108
- package/src/_includes/components/campaign/macro.njk +0 -5
- package/src/_includes/components/card/card.config.js +0 -1058
- package/src/_includes/components/card/card.njk +0 -206
- package/src/_includes/components/card/card.scss +0 -508
- package/src/_includes/components/card/existing-customer-card.config.js +0 -51
- package/src/_includes/components/card/existing-customer-card.njk +0 -40
- package/src/_includes/components/card/existing-customer-card.scss +0 -100
- package/src/_includes/components/card/industry-card.config.js +0 -51
- package/src/_includes/components/card/industry-card.njk +0 -34
- package/src/_includes/components/card/industry-card.scss +0 -85
- package/src/_includes/components/card/macro.njk +0 -29
- package/src/_includes/components/card/measurement-type-card.config.js +0 -35
- package/src/_includes/components/card/measurement-type-card.njk +0 -35
- package/src/_includes/components/card/measurement-type-card.scss +0 -56
- package/src/_includes/components/card/product-card.config.js +0 -91
- package/src/_includes/components/card/product-card.njk +0 -58
- package/src/_includes/components/card/product-card.scss +0 -88
- package/src/_includes/components/card/search-result-card.config.js +0 -29
- package/src/_includes/components/card/search-result-card.njk +0 -33
- package/src/_includes/components/card/search-result-card.scss +0 -48
- package/src/_includes/components/card/technology-card.config.js +0 -35
- package/src/_includes/components/card/technology-card.njk +0 -35
- package/src/_includes/components/card/technology-card.scss +0 -56
- package/src/_includes/components/card-new/card-new.config.js +0 -95
- package/src/_includes/components/card-new/card-new.md +0 -0
- package/src/_includes/components/card-new/card-new.njk +0 -169
- package/src/_includes/components/card-new/card-new.scss +0 -156
- package/src/_includes/components/card-new/macro.njk +0 -5
- package/src/_includes/components/comparison-table/comparison-table.config.js +0 -92
- package/src/_includes/components/comparison-table/comparison-table.njk +0 -76
- package/src/_includes/components/comparison-table/comparison-table.scss +0 -187
- package/src/_includes/components/comparison-table/macro.njk +0 -5
- package/src/_includes/components/component/categories.js +0 -5
- package/src/_includes/components/component/component.njk +0 -71
- package/src/_includes/components/component/preview-card-example.njk +0 -347
- package/src/_includes/components/component/preview-cards-three-alt.njk +0 -3
- package/src/_includes/components/component/preview-cards-three.njk +0 -3
- package/src/_includes/components/component/preview-cards-two.njk +0 -3
- package/src/_includes/components/component/preview-content-width.njk +0 -5
- package/src/_includes/components/component/preview-default.njk +0 -3
- package/src/_includes/components/component/preview-fixed-width.njk +0 -5
- package/src/_includes/components/component/preview-form.njk +0 -3
- package/src/_includes/components/component/preview-icons.njk +0 -3
- package/src/_includes/components/component/preview-sidebar.njk +0 -5
- package/src/_includes/components/embed/embed.njk +0 -11
- package/src/_includes/components/embed/embed.scss +0 -17
- package/src/_includes/components/embed/macro.njk +0 -9
- package/src/_includes/components/embed/youtube.config.js +0 -19
- package/src/_includes/components/embed/youtube.njk +0 -5
- package/src/_includes/components/event-card/event-card.config.js +0 -108
- package/src/_includes/components/event-card/event-card.njk +0 -1
- package/src/_includes/components/event-card/event-card.scss +0 -49
- package/src/_includes/components/event-card/macro.njk +0 -5
- package/src/_includes/components/eyebrow/eyebrow.config.js +0 -84
- package/src/_includes/components/eyebrow/eyebrow.njk +0 -24
- package/src/_includes/components/eyebrow/eyebrow.scss +0 -71
- package/src/_includes/components/eyebrow/macro.njk +0 -5
- package/src/_includes/components/facet/facet.config.js +0 -110
- package/src/_includes/components/facet/facet.njk +0 -25
- package/src/_includes/components/facet/facet.scss +0 -49
- package/src/_includes/components/facet/macro.njk +0 -5
- package/src/_includes/components/featured-article-card/featured-article-card.config.js +0 -32
- package/src/_includes/components/featured-article-card/featured-article-card.njk +0 -24
- package/src/_includes/components/featured-article-card/featured-article-card.scss +0 -34
- package/src/_includes/components/featured-article-card/macro.njk +0 -5
- package/src/_includes/components/features-table/features-table.config.js +0 -137
- package/src/_includes/components/features-table/features-table.njk +0 -364
- package/src/_includes/components/features-table/features-table.scss +0 -96
- package/src/_includes/components/features-table/macro.njk +0 -5
- package/src/_includes/components/filter-search/filter-search.config.js +0 -16
- package/src/_includes/components/filter-search/filter-search.njk +0 -11
- package/src/_includes/components/filter-search/filter-search.scss +0 -33
- package/src/_includes/components/filter-search/macro.njk +0 -5
- package/src/_includes/components/footer/footer.config.js +0 -7
- package/src/_includes/components/footer/footer.njk +0 -81
- package/src/_includes/components/footer/footer.scss +0 -127
- package/src/_includes/components/footer/macro.njk +0 -5
- package/src/_includes/components/gallery/gallery.config.js +0 -55
- package/src/_includes/components/gallery/gallery.md +0 -1
- package/src/_includes/components/gallery/gallery.njk +0 -51
- package/src/_includes/components/gallery/gallery.scss +0 -54
- package/src/_includes/components/gallery/macro.njk +0 -5
- package/src/_includes/components/header/header.config.js +0 -38
- package/src/_includes/components/header/header.md +0 -4
- package/src/_includes/components/header/header.njk +0 -111
- package/src/_includes/components/header/header.scss +0 -273
- package/src/_includes/components/header/macro.njk +0 -5
- package/src/_includes/components/hero/hero.config.js +0 -144
- package/src/_includes/components/hero/hero.njk +0 -109
- package/src/_includes/components/hero/hero.scss +0 -356
- package/src/_includes/components/hero/macro.njk +0 -5
- package/src/_includes/components/hotspot-image/hotspot-image.config.js +0 -55
- package/src/_includes/components/hotspot-image/hotspot-image.njk +0 -41
- package/src/_includes/components/hotspot-image/hotspot-image.scss +0 -103
- package/src/_includes/components/hotspot-image/macro.njk +0 -5
- package/src/_includes/components/icon/icon.config.js +0 -18
- package/src/_includes/components/icon/icon.md +0 -1
- package/src/_includes/components/icon/icon.njk +0 -13
- package/src/_includes/components/icon/icon.scss +0 -6
- package/src/_includes/components/icon/macro.njk +0 -5
- package/src/_includes/components/input/checkbox.config.js +0 -41
- package/src/_includes/components/input/checkbox.njk +0 -2
- package/src/_includes/components/input/input.config.js +0 -67
- package/src/_includes/components/input/input.njk +0 -15
- package/src/_includes/components/input/input.scss +0 -136
- package/src/_includes/components/input/macro.njk +0 -25
- package/src/_includes/components/input/radio.config.js +0 -41
- package/src/_includes/components/input/radio.njk +0 -2
- package/src/_includes/components/input/radio.scss +0 -143
- package/src/_includes/components/input/select.config.js +0 -70
- package/src/_includes/components/input/select.njk +0 -13
- package/src/_includes/components/input/textarea.config.js +0 -51
- package/src/_includes/components/input/textarea.njk +0 -4
- package/src/_includes/components/input/toggle.config.js +0 -41
- package/src/_includes/components/input/toggle.njk +0 -5
- package/src/_includes/components/input/toggle.scss +0 -75
- package/src/_includes/components/internal-nav/internal-nav.config.js +0 -41
- package/src/_includes/components/internal-nav/internal-nav.njk +0 -24
- package/src/_includes/components/internal-nav/internal-nav.scss +0 -74
- package/src/_includes/components/internal-nav/macro.njk +0 -5
- package/src/_includes/components/meta-box/macro.njk +0 -5
- package/src/_includes/components/meta-box/meta-box.config.js +0 -74
- package/src/_includes/components/meta-box/meta-box.njk +0 -36
- package/src/_includes/components/meta-box/meta-box.scss +0 -10
- package/src/_includes/components/off-canvas/macro.njk +0 -5
- package/src/_includes/components/off-canvas/off-canvas.config.js +0 -28
- package/src/_includes/components/off-canvas/off-canvas.njk +0 -28
- package/src/_includes/components/off-canvas/off-canvas.scss +0 -102
- package/src/_includes/components/option-list/macro.njk +0 -5
- package/src/_includes/components/option-list/option-list.config.js +0 -51
- package/src/_includes/components/option-list/option-list.njk +0 -10
- package/src/_includes/components/option-list/option-list.scss +0 -39
- package/src/_includes/components/post-meta/macro.njk +0 -5
- package/src/_includes/components/post-meta/post-meta.config.js +0 -44
- package/src/_includes/components/post-meta/post-meta.njk +0 -16
- package/src/_includes/components/post-meta/post-meta.scss +0 -7
- package/src/_includes/components/product-card/macro.njk +0 -5
- package/src/_includes/components/product-card/product-card.config.js +0 -84
- package/src/_includes/components/product-card/product-card.njk +0 -1
- package/src/_includes/components/product-card/product-card.scss +0 -36
- package/src/_includes/components/product-signpost/macro.njk +0 -3
- package/src/_includes/components/product-signpost/product-signpost.config.js +0 -43
- package/src/_includes/components/product-signpost/product-signpost.njk +0 -16
- package/src/_includes/components/product-signpost/product-signpost.scss +0 -61
- package/src/_includes/components/prose/macro.njk +0 -11
- package/src/_includes/components/prose/prose.config.js +0 -65
- package/src/_includes/components/prose/prose.md +0 -1
- package/src/_includes/components/prose/prose.njk +0 -17
- package/src/_includes/components/quote/macro.njk +0 -5
- package/src/_includes/components/quote/quote.config.js +0 -19
- package/src/_includes/components/quote/quote.njk +0 -9
- package/src/_includes/components/quote/quote.scss +0 -51
- package/src/_includes/components/resource-card/macro.njk +0 -5
- package/src/_includes/components/resource-card/resource-card.config.js +0 -59
- package/src/_includes/components/resource-card/resource-card.njk +0 -1
- package/src/_includes/components/resource-card/resource-card.scss +0 -0
- package/src/_includes/components/scroll-spy/macro.njk +0 -5
- package/src/_includes/components/scroll-spy/scroll-spy.config.js +0 -24
- package/src/_includes/components/scroll-spy/scroll-spy.md +0 -3
- package/src/_includes/components/scroll-spy/scroll-spy.njk +0 -5
- package/src/_includes/components/scroll-spy/scroll-spy.scss +0 -54
- package/src/_includes/components/series/macro.njk +0 -5
- package/src/_includes/components/series/series.config.js +0 -35
- package/src/_includes/components/series/series.njk +0 -15
- package/src/_includes/components/series/series.scss +0 -20
- package/src/_includes/components/signpost/macro.njk +0 -5
- package/src/_includes/components/signpost/signpost.config.js +0 -36
- package/src/_includes/components/signpost/signpost.njk +0 -21
- package/src/_includes/components/signpost/signpost.scss +0 -66
- package/src/_includes/components/slat/slat.config.js +0 -59
- package/src/_includes/components/slat/slat.njk +0 -15
- package/src/_includes/components/slat/slat.scss +0 -53
- package/src/_includes/components/table/macro.njk +0 -11
- package/src/_includes/components/table/table.config.js +0 -68
- package/src/_includes/components/table/table.md +0 -16
- package/src/_includes/components/table/table.njk +0 -28
- package/src/_includes/components/table/table.scss +0 -157
- package/src/_includes/components/tabs/macro.njk +0 -9
- package/src/_includes/components/tabs/tabs-radio.config.js +0 -32
- package/src/_includes/components/tabs/tabs-radio.njk +0 -9
- package/src/_includes/components/tabs/tabs.config.js +0 -57
- package/src/_includes/components/tabs/tabs.njk +0 -17
- package/src/_includes/components/tabs/tabs.scss +0 -105
- package/src/_includes/components/twi/macro.njk +0 -5
- package/src/_includes/components/twi/twi.config.js +0 -46
- package/src/_includes/components/twi/twi.md +0 -1
- package/src/_includes/components/twi/twi.njk +0 -30
- package/src/_includes/components/twi/twi.scss +0 -44
- package/src/_includes/components/usp/macro.njk +0 -5
- package/src/_includes/components/usp/usp.config.js +0 -55
- package/src/_includes/components/usp/usp.md +0 -101
- package/src/_includes/components/usp/usp.njk +0 -42
- package/src/_includes/components/usp/usp.scss +0 -60
- package/src/_includes/content-page.njk +0 -53
- package/src/_includes/includes/color-swatches.njk +0 -260
- package/src/_includes/includes/related-events.njk +0 -60
- package/src/_includes/includes/resources.njk +0 -78
- package/src/_includes/includes/system-footer.njk +0 -30
- package/src/_includes/includes/system-header.njk +0 -30
- package/src/_includes/includes/system-scripts.njk +0 -88
- package/src/_includes/layout.njk +0 -69
- package/src/_includes/library-navigation/brand-nav.njk +0 -67
- package/src/_includes/library-navigation/components-nav.njk +0 -88
- package/src/_includes/library-navigation/content-nav.njk +0 -53
- package/src/_includes/library-navigation/system-nav.njk +0 -9
- package/src/_includes/library.njk +0 -5
- package/src/_includes/navigation/blog.njk +0 -16
- package/src/_includes/navigation/corporate.njk +0 -25
- package/src/_includes/navigation/store.njk +0 -29
- package/src/_includes/page.njk +0 -14
- package/src/_includes/patterns-page.njk +0 -41
- package/src/_includes/system-home-page.njk +0 -28
- package/src/_includes/system-page.njk +0 -27
- package/src/_includes/system.njk +0 -39
- package/src/_redirects +0 -13
- package/src/assets/fonts/Inter-Bold.woff +0 -0
- package/src/assets/fonts/Inter-Bold.woff2 +0 -0
- package/src/assets/fonts/Inter-Regular.woff +0 -0
- package/src/assets/fonts/Inter-Regular.woff2 +0 -0
- package/src/assets/fonts/Inter-SemiBold.woff +0 -0
- package/src/assets/fonts/Inter-SemiBold.woff2 +0 -0
- package/src/assets/js/app.js +0 -40
- package/src/assets/js/imports/accordion.js +0 -17
- package/src/assets/js/imports/carousel.js +0 -22
- package/src/assets/js/imports/clear-form.js +0 -27
- package/src/assets/js/imports/comparison.js +0 -64
- package/src/assets/js/imports/facet.js +0 -23
- package/src/assets/js/imports/gallery.js +0 -87
- package/src/assets/js/imports/hero-pattern.js +0 -94
- package/src/assets/js/imports/hero-video.js +0 -53
- package/src/assets/js/imports/hotspot-image.js +0 -91
- package/src/assets/js/imports/internal-nav.js +0 -41
- package/src/assets/js/imports/off-canvas.js +0 -219
- package/src/assets/js/imports/responsive-table.js +0 -30
- package/src/assets/js/imports/scroll-spy.js +0 -46
- package/src/assets/js/imports/scrollbar-width.js +0 -15
- package/src/assets/js/imports/tabs.js +0 -58
- package/src/assets/js/imports/utilities.js +0 -31
- package/src/assets/scss/components/form.scss +0 -306
- package/src/assets/scss/components/headings.scss +0 -68
- package/src/assets/scss/components/index.scss +0 -52
- package/src/assets/scss/components/lightbox.scss +0 -64
- package/src/assets/scss/components/product-finder.scss +0 -75
- package/src/assets/scss/elements/index.scss +0 -2
- package/src/assets/scss/elements/reset.scss +0 -139
- package/src/assets/scss/elements/typography.scss +0 -25
- package/src/assets/scss/foundations/animation.scss +0 -4
- package/src/assets/scss/foundations/colour.scss +0 -85
- package/src/assets/scss/foundations/index.scss +0 -4
- package/src/assets/scss/foundations/space.scss +0 -57
- package/src/assets/scss/foundations/typography.scss +0 -159
- package/src/assets/scss/library.scss +0 -672
- package/src/assets/scss/main.scss +0 -6
- package/src/assets/scss/objects/button-wrap.scss +0 -18
- package/src/assets/scss/objects/clickable-parent.scss +0 -3
- package/src/assets/scss/objects/grid.scss +0 -329
- package/src/assets/scss/objects/index.scss +0 -4
- package/src/assets/scss/objects/prose.scss +0 -164
- package/src/assets/scss/objects/syntax-highlighting.scss +0 -211
- package/src/assets/scss/tools/breakout.scss +0 -17
- package/src/assets/scss/tools/cutoff.scss +0 -50
- package/src/assets/scss/tools/index.scss +0 -172
- package/src/assets/scss/utilities/colour.scss +0 -10
- package/src/assets/scss/utilities/disabled.scss +0 -8
- package/src/assets/scss/utilities/display.scss +0 -156
- package/src/assets/scss/utilities/divider.scss +0 -6
- package/src/assets/scss/utilities/ellipsis.scss +0 -7
- package/src/assets/scss/utilities/flex.scss +0 -47
- package/src/assets/scss/utilities/flow.scss +0 -69
- package/src/assets/scss/utilities/gap.scss +0 -3
- package/src/assets/scss/utilities/hr.scss +0 -23
- package/src/assets/scss/utilities/index.scss +0 -18
- package/src/assets/scss/utilities/link.scss +0 -26
- package/src/assets/scss/utilities/scroll-shadows.scss +0 -69
- package/src/assets/scss/utilities/space.scss +0 -370
- package/src/assets/scss/utilities/typography.scss +0 -35
- package/src/assets/scss/utilities/wrap.scss +0 -24
- package/src/assets/svg/arc.svg +0 -1
- package/src/assets/svg/concentric.svg +0 -1
- package/src/assets/svg/crystal.svg +0 -1
- package/src/assets/svg/dots-pattern.svg +0 -1
- package/src/brand/colors.njk +0 -69
- package/src/brand/illustration.md +0 -50
- package/src/brand/images.md +0 -101
- package/src/brand/index.njk +0 -147
- package/src/brand/logo.md +0 -107
- package/src/brand/patterns.njk +0 -49
- package/src/brand/requirements.md +0 -98
- package/src/brand/resources.njk +0 -75
- package/src/brand/typography.md +0 -101
- package/src/components/colour.njk +0 -327
- package/src/components/creating-a-component.md +0 -163
- package/src/components/css.md +0 -65
- package/src/components/flow.njk +0 -131
- package/src/components/grid/generic.njk +0 -99
- package/src/components/grid/index.njk +0 -86
- package/src/components/grid/layout.njk +0 -56
- package/src/components/grid/wrap.njk +0 -20
- package/src/components/iconography.njk +0 -92
- package/src/components/index.njk +0 -65
- package/src/components/installation.md +0 -61
- package/src/components/publishing-the-system.md +0 -25
- package/src/components/space.njk +0 -191
- package/src/components/typography.njk +0 -135
- package/src/components/utilities.md +0 -182
- package/src/components-full-pages.njk +0 -24
- package/src/components-pages.njk +0 -103
- package/src/content/and-so/please-write-responsibly.md +0 -15
- package/src/content/and-so/sitting-down.md +0 -13
- package/src/content/big-ideas.md +0 -63
- package/src/content/boilerplate.md +0 -33
- package/src/content/elevator-pitch.md +0 -33
- package/src/content/index.njk +0 -126
- package/src/content/our-voice/1-big-picture.md +0 -37
- package/src/content/our-voice/2-whats-most-important.md +0 -38
- package/src/content/our-voice/3-write-like-we-speak.md +0 -50
- package/src/content/our-voice/4-write-to-be-skimmed.md +0 -50
- package/src/content/our-voice/5-active-sentences.md +0 -73
- package/src/content/our-voice/6-add-energy.md +0 -34
- package/src/content/our-voice/7-small-surprises.md +0 -44
- package/src/content/our-voice/seven-steps.md +0 -21
- package/src/content/our-voice/which-techniques-when.md +0 -39
- package/src/content/real-life-examples/01-who-we-are-boilerplate.md +0 -39
- package/src/content/real-life-examples/02-event-announcement.md +0 -38
- package/src/content/real-life-examples/03-customer-support-letter.md +0 -58
- package/src/content/real-life-examples/04-delay-in-shipment-letter.md +0 -62
- package/src/content/real-life-examples/05-overview-events-training.md +0 -41
- package/src/content/real-life-examples/06-digital-product-description.md +0 -40
- package/src/content/real-life-examples/07-recruitment.md +0 -42
- package/src/content/real-life-examples/08-industry-sector-1.md +0 -43
- package/src/content/real-life-examples/09-industry-sector-2.md +0 -47
- package/src/content/real-life-examples/10-website-information.md +0 -50
- package/src/content/real-life-examples/11-internal-update.md +0 -37
- package/src/content/real-life-examples/12-value-proposition.md +0 -44
- package/src/index.njk +0 -152
- package/src/patterns/form.njk +0 -349
- package/src/patterns/grid-of-cards.njk +0 -66
- package/src/patterns/index.njk +0 -19
- package/src/patterns/mp-form.njk +0 -111
- package/src/patterns/usps.njk +0 -149
- package/src/prototype/blog-post.njk +0 -123
- package/src/prototype/blog.njk +0 -168
- package/src/prototype/card-test.njk +0 -147
- package/src/prototype/creating-a-page.njk +0 -74
- package/src/prototype/events-hub.njk +0 -520
- package/src/prototype/form-altcha.njk +0 -705
- package/src/prototype/form-cloudflare.njk +0 -688
- package/src/prototype/form-hcaptcha.njk +0 -693
- package/src/prototype/home.njk +0 -24
- package/src/prototype/index.njk +0 -893
- package/src/prototype/oma.njk +0 -167
- package/src/prototype/product.njk +0 -480
- package/src/prototype/products.njk +0 -163
- package/src/prototype/range.njk +0 -263
- package/src/prototype/request-a-quote.njk +0 -147
- package/src/prototype/sections.njk +0 -295
- package/src/prototype/spline.njk +0 -16
- package/src/prototype/thanks.njk +0 -31
- package/src/prototype/webinar.njk +0 -118
- package/src/prototype/webinars-3-2-1.njk +0 -397
- package/src/prototype/webinars.njk +0 -405
- package/src/quickstart.md +0 -41
- package/src/robots.txt +0 -5
- package/src/static/adobe/MP Franklin colour swatches.ai +0 -914
- package/src/static/img/aeris.jpg +0 -0
- package/src/static/img/article-1.jpg +0 -0
- package/src/static/img/article-2.jpg +0 -0
- package/src/static/img/blog-image-1.jpg +0 -0
- package/src/static/img/blog-page-image-1.jpg +0 -0
- package/src/static/img/blog-page-image-2.jpg +0 -0
- package/src/static/img/blog-page-image-3.jpg +0 -0
- package/src/static/img/blog-page-image-4.jpg +0 -0
- package/src/static/img/blog-page-image-5.jpg +0 -0
- package/src/static/img/blog-page-image-6.jpg +0 -0
- package/src/static/img/campaign.jpg +0 -0
- package/src/static/img/case-study-1.jpg +0 -0
- package/src/static/img/case-study-2.jpg +0 -0
- package/src/static/img/case-study-3.jpg +0 -0
- package/src/static/img/empyrean.jpg +0 -0
- package/src/static/img/epsilon.jpg +0 -0
- package/src/static/img/favicon-32x32.png +0 -0
- package/src/static/img/favicon.svg +0 -1
- package/src/static/img/featured-blog-post.jpg +0 -0
- package/src/static/img/featured-event-1.jpg +0 -0
- package/src/static/img/featured-event-2.jpg +0 -0
- package/src/static/img/featured-event-3.jpg +0 -0
- package/src/static/img/flow-2.png +0 -0
- package/src/static/img/flow-diagram.png +0 -0
- package/src/static/img/flow.png +0 -0
- package/src/static/img/grid-captivate-1.jpg +0 -0
- package/src/static/img/homepage_1_back.webp +0 -0
- package/src/static/img/homepage_1_back_alt.webp +0 -0
- package/src/static/img/homepage_1_front_full.webp +0 -0
- package/src/static/img/homepage_2_back.webp +0 -0
- package/src/static/img/homepage_2_back_alt.webp +0 -0
- package/src/static/img/homepage_2_front_full.webp +0 -0
- package/src/static/img/itcss.svg +0 -8
- package/src/static/img/leneo.jpg +0 -0
- package/src/static/img/mastersizer.jpg +0 -0
- package/src/static/img/microcal.jpg +0 -0
- package/src/static/img/morphologi.jpg +0 -0
- package/src/static/img/omnisec.jpg +0 -0
- package/src/static/img/open-graph-image.jpg +0 -0
- package/src/static/img/product-accessory-1.jpg +0 -0
- package/src/static/img/product-accessory-2.jpg +0 -0
- package/src/static/img/product-image.jpg +0 -0
- package/src/static/img/products-1.jpg +0 -0
- package/src/static/img/products-2.jpg +0 -0
- package/src/static/img/products-3.jpg +0 -0
- package/src/static/img/products-4.jpg +0 -0
- package/src/static/img/products-5.jpg +0 -0
- package/src/static/img/products-6.jpg +0 -0
- package/src/static/img/qualityspec.jpg +0 -0
- package/src/static/img/range-product-1.jpg +0 -0
- package/src/static/img/range-product-2.jpg +0 -0
- package/src/static/img/range.jpg +0 -0
- package/src/static/img/salt.png +0 -0
- package/src/static/img/sector-1.jpg +0 -0
- package/src/static/img/sector-2.jpg +0 -0
- package/src/static/img/sector-3.jpg +0 -0
- package/src/static/img/sector-4.jpg +0 -0
- package/src/static/img/sector-5.jpg +0 -0
- package/src/static/img/slide-1.jpg +0 -0
- package/src/static/img/slide-2.jpg +0 -0
- package/src/static/img/slide-3.jpg +0 -0
- package/src/static/img/slide-4.webp +0 -0
- package/src/static/img/slide-5.webp +0 -0
- package/src/static/img/slide-6.webp +0 -0
- package/src/static/img/slide-7.webp +0 -0
- package/src/static/img/zetasizer.jpg +0 -0
- package/src/static/pdf/PN12558_Physical_branding_v23.pdf +0 -0
- package/src/static/pdf/Power of One - Malvern Panalytical rebranding guidance.pdf +0 -0
- package/src/static/svg/crop-diagram-1.svg +0 -1
- package/src/static/svg/crop-diagram-2.svg +0 -1
- package/src/static/svg/icon-globe-alt--white.svg +0 -4
- package/src/static/svg/icon-globe-alt.svg +0 -4
- package/src/static/svg/icon-live-webinars--white.svg +0 -6
- package/src/static/svg/icon-live-webinars.svg +0 -6
- package/src/static/svg/icon-recorded-webinars--white.svg +0 -4
- package/src/static/svg/icon-recorded-webinars.svg +0 -4
- package/src/static/svg/icon-user-training--white.svg +0 -5
- package/src/static/svg/icon-user-training.svg +0 -5
- package/src/static/svg/imaging-matrix.svg +0 -56
- package/src/static/svg/large-envelope.svg +0 -1
- package/src/static/svg/large-globe.svg +0 -1
- package/src/static/svg/large-student.svg +0 -1
- package/src/static/svg/logo-black.svg +0 -1
- package/src/static/svg/logo-color-white-text.svg +0 -1
- package/src/static/svg/logo-simple.svg +0 -1
- package/src/static/svg/logo-small.svg +0 -1
- package/src/static/svg/logo-spacing-horizontal.svg +0 -1
- package/src/static/svg/logo-spacing-vertical.svg +0 -1
- package/src/static/svg/logo-stacked.svg +0 -1
- package/src/static/svg/logo-white.svg +0 -1
- package/src/static/svg/logo-x.svg +0 -1
- package/src/static/svg/logo.svg +0 -1
- package/src/static/svg/sprite.svg +0 -48
- package/src/static/svg/typography-spacing.svg +0 -2345
- package/src/static/zip/MP_logo.zip +0 -0
- package/src/static/zip/SVG_patterns.zip +0 -0
@@ -1,87 +0,0 @@
|
|
1
|
-
function Gallery() {
|
2
|
-
const mainSlides = document.querySelectorAll('.c-gallery__main .c-gallery__slide');
|
3
|
-
const thumbnailSlides = document.querySelectorAll('.c-gallery__thumbnails .c-gallery__slide');
|
4
|
-
|
5
|
-
thumbnailSlides.forEach(thumbnailSlide => thumbnailSlide.addEventListener('click', function(e) {
|
6
|
-
thumbnailSlides.forEach(function(thumbnail) {
|
7
|
-
if(thumbnail != e.target.parentNode) {
|
8
|
-
thumbnail.classList.remove('active');
|
9
|
-
}
|
10
|
-
});
|
11
|
-
e.target.parentNode.classList.add('active');
|
12
|
-
|
13
|
-
mainSlides.forEach(function(mainSlide) {
|
14
|
-
if(mainSlide.dataset.slide == thumbnailSlide.dataset.slide) {
|
15
|
-
mainSlide.classList.add('active');
|
16
|
-
} else {
|
17
|
-
mainSlide.classList.remove('active');
|
18
|
-
}
|
19
|
-
});
|
20
|
-
}));
|
21
|
-
|
22
|
-
mainSlides.forEach(function(mainSlide) {
|
23
|
-
if(!mainSlide.classList.contains('c-gallery__video')) {
|
24
|
-
mainSlide.addEventListener('click', lightboxTrigger);
|
25
|
-
}
|
26
|
-
});
|
27
|
-
|
28
|
-
function lightboxTrigger() {
|
29
|
-
const lightbox = document.querySelector('.c-gallery__main').cloneNode(true);
|
30
|
-
lightbox.classList.remove('c-gallery__main');
|
31
|
-
lightbox.classList.add('c-lightbox');
|
32
|
-
lightbox.querySelectorAll('.c-gallery__slide').forEach(function(slide) {
|
33
|
-
if(slide.classList.contains('c-gallery__video')) {
|
34
|
-
slide.remove();
|
35
|
-
}
|
36
|
-
if(!slide.classList.contains('c-gallery__video')) {
|
37
|
-
var slideImg = slide.querySelector('img');
|
38
|
-
if(slideImg.srcset != '') {
|
39
|
-
slideImg.removeAttribute('srcset');
|
40
|
-
}
|
41
|
-
var slideImgSrc = slideImg.getAttribute('src');
|
42
|
-
if (slideImgSrc) {
|
43
|
-
if (slideImgSrc.indexOf('?') !== -1) {
|
44
|
-
slideImg.setAttribute('src', slideImgSrc.split("?")[0] + '?quality=90&width=2176');
|
45
|
-
} else {
|
46
|
-
slideImg.setAttribute('src', slideImgSrc + '?quality=90&width=2176');
|
47
|
-
}
|
48
|
-
} else {
|
49
|
-
console.log(slideImg);
|
50
|
-
console.log('has no src defined...');
|
51
|
-
}
|
52
|
-
}
|
53
|
-
slide.classList.add('c-lightbox__slide');
|
54
|
-
slide.classList.remove('c-gallery__slide');
|
55
|
-
});
|
56
|
-
document.body.appendChild(lightbox);
|
57
|
-
lightbox.insertAdjacentHTML('beforeend', '<a class="c-lightbox__prev"></a><a class="c-lightbox__next"></a>');
|
58
|
-
|
59
|
-
lightbox.querySelector('.c-lightbox__prev').addEventListener('click', function() {
|
60
|
-
const lightboxActive = lightbox.querySelector('.active');
|
61
|
-
const prevImage = lightbox.querySelector('[data-slide="' + (parseInt(lightboxActive.dataset.slide) - 1) + '"]');
|
62
|
-
if(prevImage != null) {
|
63
|
-
lightboxActive.classList.remove('active');
|
64
|
-
prevImage.classList.add('active');
|
65
|
-
}
|
66
|
-
});
|
67
|
-
|
68
|
-
lightbox.querySelector('.c-lightbox__next').addEventListener('click', function() {
|
69
|
-
const lightboxActive = lightbox.querySelector('.active');
|
70
|
-
const nextImage = lightbox.querySelector('[data-slide="' + (parseInt(lightboxActive.dataset.slide) + 1) + '"]');
|
71
|
-
if(nextImage != null) {
|
72
|
-
lightboxActive.classList.remove('active');
|
73
|
-
nextImage.classList.add('active');
|
74
|
-
}
|
75
|
-
});
|
76
|
-
|
77
|
-
lightbox.addEventListener('click', function(e) {
|
78
|
-
if (e.target !== e.currentTarget) {
|
79
|
-
return;
|
80
|
-
} else {
|
81
|
-
lightbox.remove();
|
82
|
-
}
|
83
|
-
});
|
84
|
-
}
|
85
|
-
}
|
86
|
-
|
87
|
-
export default Gallery;
|
@@ -1,94 +0,0 @@
|
|
1
|
-
import { range, shuffle, userPrefersReducedMotion } from './utilities';
|
2
|
-
|
3
|
-
function HeroPattern() {
|
4
|
-
let time = 0;
|
5
|
-
|
6
|
-
const c = document.querySelector('.c-hero__canvas');
|
7
|
-
if (!c) return;
|
8
|
-
const ctx = c.getContext("2d");
|
9
|
-
|
10
|
-
const sineColour = "rgb(19,170,19)";
|
11
|
-
const reduceMotion = userPrefersReducedMotion();
|
12
|
-
|
13
|
-
const crossGap = 147;
|
14
|
-
const minimumOpacity = 0;
|
15
|
-
const maximumOpacity = 0.5;
|
16
|
-
const crossSpeed = 0.25;
|
17
|
-
|
18
|
-
let width;
|
19
|
-
let height;
|
20
|
-
let across;
|
21
|
-
let down;
|
22
|
-
let crosses = [];
|
23
|
-
let totalPoints;
|
24
|
-
|
25
|
-
function draw() {
|
26
|
-
// Sine wave
|
27
|
-
time = time + 0.005;
|
28
|
-
|
29
|
-
ctx.clearRect(0, 0, c.width, c.height);
|
30
|
-
ctx.beginPath();
|
31
|
-
|
32
|
-
for(let cnt = c.width; cnt > 0; cnt--) {
|
33
|
-
ctx.lineTo(cnt, c.height * 0.5 - (Math.cos(time + cnt / 5 * 0.03) * (height * 0.3) ));
|
34
|
-
}
|
35
|
-
|
36
|
-
ctx.lineWidth = 0.5;
|
37
|
-
ctx.strokeStyle = sineColour;
|
38
|
-
ctx.stroke();
|
39
|
-
|
40
|
-
// Crosses
|
41
|
-
crosses.forEach(cross => {
|
42
|
-
drawCross(cross.x, cross.y, range(0, crosses.length, minimumOpacity, maximumOpacity, cross.counter));
|
43
|
-
|
44
|
-
cross.counter += cross.direction;
|
45
|
-
if (cross.counter >= crosses.length) cross.direction = -1 * crossSpeed;
|
46
|
-
if (cross.counter < 0) cross.direction = crossSpeed;
|
47
|
-
})
|
48
|
-
|
49
|
-
if (!reduceMotion) {
|
50
|
-
window.requestAnimationFrame(draw);
|
51
|
-
}
|
52
|
-
}
|
53
|
-
|
54
|
-
function onResize() {
|
55
|
-
width = c.scrollWidth;
|
56
|
-
height = c.scrollHeight;
|
57
|
-
|
58
|
-
ctx.canvas.width = width;
|
59
|
-
ctx.canvas.height = height;
|
60
|
-
|
61
|
-
across = Math.ceil(width / crossGap);
|
62
|
-
down = Math.ceil(height / crossGap);
|
63
|
-
|
64
|
-
totalPoints = (across + 1) * (down + 1);
|
65
|
-
const ids = shuffle(Array.from({ length: totalPoints }, (_, i) => (i)))
|
66
|
-
crosses = [];
|
67
|
-
for(let x = 0; x <= across; x++) {
|
68
|
-
for(let y = 0; y <= down; y++) {
|
69
|
-
crosses.push({
|
70
|
-
counter: ids.shift(),
|
71
|
-
direction: Math.random() > 0.5 ? crossSpeed : -1 * crossSpeed,
|
72
|
-
x: crossGap * (x + 1) - crossGap / 1,
|
73
|
-
y: crossGap * (y + 1) - crossGap / 2
|
74
|
-
});
|
75
|
-
}
|
76
|
-
}
|
77
|
-
}
|
78
|
-
|
79
|
-
function drawCross(x, y, opacity) {
|
80
|
-
ctx.beginPath();
|
81
|
-
ctx.moveTo(x - 14, y);
|
82
|
-
ctx.lineTo(x + 14, y);
|
83
|
-
ctx.strokeStyle = `rgba(255, 255, 255, ${opacity}`;
|
84
|
-
ctx.moveTo(x, y - 14);
|
85
|
-
ctx.lineTo(x, y + 14);
|
86
|
-
ctx.stroke();
|
87
|
-
}
|
88
|
-
|
89
|
-
window.addEventListener('resize', onResize);
|
90
|
-
onResize();
|
91
|
-
draw();
|
92
|
-
}
|
93
|
-
|
94
|
-
export default HeroPattern;
|
@@ -1,53 +0,0 @@
|
|
1
|
-
function HeroVideo() {
|
2
|
-
document.addEventListener("DOMContentLoaded", () => {
|
3
|
-
const videoBackground = document.getElementById('videoBackground');
|
4
|
-
if(typeof(videoBackground) != 'undefined' && videoBackground != null) {
|
5
|
-
const reducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)');
|
6
|
-
if(!reducedMotion || reducedMotion.matches) {
|
7
|
-
videoBackground.pause();
|
8
|
-
}
|
9
|
-
|
10
|
-
const lightboxTrigger = document.getElementById('playVideo');
|
11
|
-
const lightboxContainer = document.getElementById('lightboxVideo');
|
12
|
-
const lightboxVideo = lightboxContainer.querySelector('.c-lightbox__video');
|
13
|
-
|
14
|
-
lightboxTrigger.addEventListener('click', e => {
|
15
|
-
videoBackground.pause();
|
16
|
-
lightboxContainer.classList.remove('u-hidden');
|
17
|
-
checkVideos();
|
18
|
-
});
|
19
|
-
|
20
|
-
lightboxContainer.addEventListener('click', (e) => {
|
21
|
-
if (!e.target.classList.contains('c-lightbox__video')) {
|
22
|
-
videoBackground.setAttribute('autoplay','');
|
23
|
-
lightboxContainer.classList.add('u-hidden');
|
24
|
-
checkVideos();
|
25
|
-
}
|
26
|
-
});
|
27
|
-
window.addEventListener('keydown', function(e) {
|
28
|
-
if (e.key == "Escape") {
|
29
|
-
videoBackground.setAttribute('autoplay','');
|
30
|
-
lightboxContainer.classList.add('u-hidden');
|
31
|
-
checkVideos();
|
32
|
-
}
|
33
|
-
});
|
34
|
-
|
35
|
-
function checkVideos() {
|
36
|
-
if(lightboxContainer.classList.contains('u-hidden')) {
|
37
|
-
if (videoBackground.paused) {
|
38
|
-
videoBackground.play();
|
39
|
-
}
|
40
|
-
if (!lightboxVideo.paused) {
|
41
|
-
lightboxVideo.pause();
|
42
|
-
}
|
43
|
-
} else {
|
44
|
-
if (!videoBackground.paused) {
|
45
|
-
videoBackground.pause();
|
46
|
-
}
|
47
|
-
}
|
48
|
-
}
|
49
|
-
}
|
50
|
-
});
|
51
|
-
}
|
52
|
-
|
53
|
-
export default HeroVideo;
|
@@ -1,91 +0,0 @@
|
|
1
|
-
// Function to initialize tooltip behavior
|
2
|
-
function HotspotImage() {
|
3
|
-
// Add delay for Tridion JavaScript created hotspot images
|
4
|
-
setTimeout(function () {
|
5
|
-
// Select all elements that trigger tooltips
|
6
|
-
const tooltips = document.querySelectorAll('.c-hotspot-image__button');
|
7
|
-
|
8
|
-
// Add event listeners for each tooltip button
|
9
|
-
tooltips.forEach((button) => {
|
10
|
-
button.addEventListener('click', handleTooltipToggle);
|
11
|
-
});
|
12
|
-
|
13
|
-
// Add event listener for Escape key press
|
14
|
-
document.addEventListener('keydown', handleKeyDown);
|
15
|
-
|
16
|
-
// Add event listener for click outside tooltip
|
17
|
-
document.addEventListener('click', handleClickOutside);
|
18
|
-
}, 2000);
|
19
|
-
}
|
20
|
-
|
21
|
-
// Function to handle the tooltip toggle
|
22
|
-
function handleTooltipToggle(event) {
|
23
|
-
// Prevent default action if needed
|
24
|
-
event.preventDefault();
|
25
|
-
|
26
|
-
const button = event.currentTarget;
|
27
|
-
const tooltipId = button.getAttribute('aria-controls');
|
28
|
-
const tooltip = document.getElementById(tooltipId);
|
29
|
-
|
30
|
-
if (tooltip.classList.contains('c-hotspot-image__tooltip--open')) {
|
31
|
-
closeTooltip(button, tooltip);
|
32
|
-
} else {
|
33
|
-
openTooltip(button, tooltip);
|
34
|
-
}
|
35
|
-
}
|
36
|
-
|
37
|
-
// Function to open a tooltip
|
38
|
-
function openTooltip(button, tooltip) {
|
39
|
-
// Add active class and make tooltip visible
|
40
|
-
tooltip.classList.add('c-hotspot-image__tooltip--open');
|
41
|
-
tooltip.setAttribute('aria-hidden', 'false');
|
42
|
-
button.setAttribute('aria-expanded', 'true');
|
43
|
-
|
44
|
-
// Add event listener for click outside
|
45
|
-
document.addEventListener('click', handleClickOutside);
|
46
|
-
}
|
47
|
-
|
48
|
-
// Function to close a tooltip
|
49
|
-
function closeTooltip(button, tooltip) {
|
50
|
-
// Remove active class and hide tooltip
|
51
|
-
tooltip.classList.remove('c-hotspot-image__tooltip--open');
|
52
|
-
tooltip.setAttribute('aria-hidden', 'true');
|
53
|
-
button.setAttribute('aria-expanded', 'false');
|
54
|
-
|
55
|
-
// Remove event listener for click outside
|
56
|
-
document.removeEventListener('click', handleClickOutside);
|
57
|
-
}
|
58
|
-
|
59
|
-
// Function to handle Escape key press
|
60
|
-
function handleKeyDown(event) {
|
61
|
-
if (event.key === 'Escape') {
|
62
|
-
const activeTooltip = document.querySelector(
|
63
|
-
'.c-hotspot-image__tooltip--open'
|
64
|
-
);
|
65
|
-
if (activeTooltip) {
|
66
|
-
const button = document.querySelector(
|
67
|
-
`[aria-controls="${activeTooltip.id}"]`
|
68
|
-
);
|
69
|
-
closeTooltip(button, activeTooltip);
|
70
|
-
}
|
71
|
-
}
|
72
|
-
}
|
73
|
-
|
74
|
-
// Function to handle click outside the tooltip
|
75
|
-
function handleClickOutside(event) {
|
76
|
-
const activeTooltip = document.querySelector(
|
77
|
-
'.c-hotspot-image__tooltip--open'
|
78
|
-
);
|
79
|
-
if (
|
80
|
-
activeTooltip &&
|
81
|
-
!activeTooltip.contains(event.target) &&
|
82
|
-
!event.target.closest('.c-hotspot-image__button')
|
83
|
-
) {
|
84
|
-
const button = document.querySelector(
|
85
|
-
`[aria-controls="${activeTooltip.id}"]`
|
86
|
-
);
|
87
|
-
closeTooltip(button, activeTooltip);
|
88
|
-
}
|
89
|
-
}
|
90
|
-
|
91
|
-
export default HotspotImage;
|
@@ -1,41 +0,0 @@
|
|
1
|
-
function InternalNav() {
|
2
|
-
const internalNav = document.querySelector('.c-internal-nav--sticky');
|
3
|
-
|
4
|
-
if (!internalNav) {
|
5
|
-
return;
|
6
|
-
}
|
7
|
-
|
8
|
-
const observerOptions = {
|
9
|
-
root: null,
|
10
|
-
rootMargin: '0px',
|
11
|
-
threshold: 1.0
|
12
|
-
};
|
13
|
-
|
14
|
-
const intersectionCallback = (entries, observer) => {
|
15
|
-
const isIntersecting = entries[0].isIntersecting;
|
16
|
-
internalNav.classList.toggle('c-internal-nav--stuck', !isIntersecting);
|
17
|
-
};
|
18
|
-
|
19
|
-
const observer = new IntersectionObserver(intersectionCallback, observerOptions);
|
20
|
-
observer.observe(internalNav);
|
21
|
-
|
22
|
-
let internalNavHeight = internalNav.offsetHeight;
|
23
|
-
|
24
|
-
const updateInternalNavHeight = () => {
|
25
|
-
internalNavHeight = internalNav.offsetHeight;
|
26
|
-
const anchors = Array.from(internalNav.querySelectorAll('a'));
|
27
|
-
anchors.forEach(anchor => {
|
28
|
-
const id = anchor.getAttribute('href').replace('#', '');
|
29
|
-
const target = document.getElementById(id);
|
30
|
-
if (target) {
|
31
|
-
target.style.scrollMarginTop = `${internalNavHeight}px`;
|
32
|
-
}
|
33
|
-
});
|
34
|
-
};
|
35
|
-
|
36
|
-
window.addEventListener('resize', updateInternalNavHeight);
|
37
|
-
|
38
|
-
updateInternalNavHeight();
|
39
|
-
}
|
40
|
-
|
41
|
-
export default InternalNav;
|
@@ -1,219 +0,0 @@
|
|
1
|
-
// Function to initialize off-canvas behavior
|
2
|
-
function OffCanvas() {
|
3
|
-
// Select all elements that trigger off-canvas behavior
|
4
|
-
const toggles = document.querySelectorAll(".c-off-canvas__toggle");
|
5
|
-
|
6
|
-
// Iterate through each toggle element
|
7
|
-
if (toggles.length) {
|
8
|
-
toggles.forEach(toggle => {
|
9
|
-
// Determine initial visibility state and handle click event
|
10
|
-
handleOffCanvas(toggle, isVisible(toggle));
|
11
|
-
toggle.addEventListener('click', () => toggleOffCanvas(toggle));
|
12
|
-
});
|
13
|
-
|
14
|
-
// Add event listener for scroll events to check visibility
|
15
|
-
// window.addEventListener('scroll', () => {
|
16
|
-
// toggles.forEach(toggle => {
|
17
|
-
// handleOffCanvas(toggle, isVisible(toggle));
|
18
|
-
// });
|
19
|
-
// });
|
20
|
-
|
21
|
-
// Add event listener for resize events to check visibility
|
22
|
-
window.addEventListener('resize', () => {
|
23
|
-
toggles.forEach(toggle => {
|
24
|
-
handleOffCanvas(toggle, isVisible(toggle));
|
25
|
-
});
|
26
|
-
});
|
27
|
-
}
|
28
|
-
}
|
29
|
-
|
30
|
-
// Function to check if an element is currently visible on the page
|
31
|
-
function isVisible(element) {
|
32
|
-
// Check element's styles for visibility
|
33
|
-
const style = window.getComputedStyle(element);
|
34
|
-
return (
|
35
|
-
style.display !== 'none' &&
|
36
|
-
style.visibility !== 'hidden'
|
37
|
-
);
|
38
|
-
}
|
39
|
-
|
40
|
-
// Function to handle off-canvas behavior based on visibility
|
41
|
-
function handleOffCanvas(toggle, isVisible) {
|
42
|
-
const target = document.getElementById(toggle.getAttribute('data-target'));
|
43
|
-
if (isVisible === true) {
|
44
|
-
createOffCanvas(target);
|
45
|
-
} else {
|
46
|
-
removeOffCanvas(target);
|
47
|
-
}
|
48
|
-
}
|
49
|
-
|
50
|
-
// Function to create off canvas
|
51
|
-
function createOffCanvas(target) {
|
52
|
-
// Add necessary classes and attributes for off-canvas display
|
53
|
-
target.classList.add('c-off-canvas');
|
54
|
-
target.setAttribute('tabindex', '-1');
|
55
|
-
target.setAttribute('aria-hidden', 'true');
|
56
|
-
|
57
|
-
// Extract specific sections of the off-canvas content
|
58
|
-
const targetHeader = target.querySelector('[data-off-canvas="header"]');
|
59
|
-
const targetMain = target.querySelector('[data-off-canvas="main"]');
|
60
|
-
const targetFooter = target.querySelector('[data-off-canvas="footer"]');
|
61
|
-
|
62
|
-
// Extract content from the sections
|
63
|
-
const targetHeaderContent = targetHeader !== null ? targetHeader.outerHTML : '';
|
64
|
-
const targetMainContent = targetMain !== null ? targetMain.outerHTML : '';
|
65
|
-
const targetFooterContent = targetFooter !== null ? targetFooter.outerHTML : '';
|
66
|
-
|
67
|
-
// Replace the target's content with off-canvas structure
|
68
|
-
target.innerHTML = `
|
69
|
-
<div class="c-off-canvas__backdrop" role="presentation"></div>
|
70
|
-
<div class="c-off-canvas__content" role="dialog" aria-modal="true" aria-labelledby="offCanvasHeader">
|
71
|
-
<header id="offCanvasHeader" class="c-off-canvas__header">${targetHeaderContent}</header>
|
72
|
-
<main class="c-off-canvas__main">${targetMainContent}</main>
|
73
|
-
<footer class="c-off-canvas__footer">
|
74
|
-
${targetFooterContent}
|
75
|
-
<button class="mp c-twi c-twi--left c-off-canvas__close" data-off-canvas-close="true" onclick="return false">
|
76
|
-
<span>Cancel</span>
|
77
|
-
<svg role="img" aria-hidden="true" focusable="false" class="mp c-icon c-icon--cross">
|
78
|
-
<use xlink:href="/static/svg/sprite.svg#cross"></use>
|
79
|
-
</svg>
|
80
|
-
</button>
|
81
|
-
</footer>
|
82
|
-
</div>
|
83
|
-
`;
|
84
|
-
}
|
85
|
-
|
86
|
-
// Function to remove off-canvas layout
|
87
|
-
function removeOffCanvas(target) {
|
88
|
-
// Remove classes and attributes for off-canvas display
|
89
|
-
target.classList.remove('c-off-canvas', 'c-off-canvas--active');
|
90
|
-
target.removeAttribute('tabindex');
|
91
|
-
target.removeAttribute('aria-hidden');
|
92
|
-
|
93
|
-
// Remove backdrop element if present
|
94
|
-
const targetBackdrop = target.querySelector('.c-off-canvas__backdrop');
|
95
|
-
if (targetBackdrop) {
|
96
|
-
targetBackdrop.remove();
|
97
|
-
}
|
98
|
-
|
99
|
-
// Restore original content by removing off-canvas structure
|
100
|
-
const targetContent = target.querySelector('.c-off-canvas__content');
|
101
|
-
if (targetContent) {
|
102
|
-
while (targetContent.firstChild) {
|
103
|
-
target.insertBefore(targetContent.firstChild, targetContent);
|
104
|
-
}
|
105
|
-
target.removeChild(targetContent);
|
106
|
-
}
|
107
|
-
|
108
|
-
const targetHeader = target.querySelector('.c-off-canvas__header');
|
109
|
-
if (targetHeader) {
|
110
|
-
while (targetHeader.firstChild) {
|
111
|
-
target.insertBefore(targetHeader.firstChild, targetHeader);
|
112
|
-
}
|
113
|
-
target.removeChild(targetHeader);
|
114
|
-
}
|
115
|
-
|
116
|
-
const targetMain = target.querySelector('.c-off-canvas__main');
|
117
|
-
if (targetMain) {
|
118
|
-
while (targetMain.firstChild) {
|
119
|
-
target.insertBefore(targetMain.firstChild, targetMain);
|
120
|
-
}
|
121
|
-
target.removeChild(targetMain);
|
122
|
-
}
|
123
|
-
|
124
|
-
const targetFooter = target.querySelector('.c-off-canvas__footer');
|
125
|
-
if (targetFooter) {
|
126
|
-
while (targetFooter.firstChild) {
|
127
|
-
target.insertBefore(targetFooter.firstChild, targetFooter);
|
128
|
-
}
|
129
|
-
target.removeChild(targetFooter);
|
130
|
-
}
|
131
|
-
|
132
|
-
// Remove close button element if present
|
133
|
-
const targetClose = target.querySelector('.c-off-canvas__close');
|
134
|
-
if (targetClose) {
|
135
|
-
targetClose.remove();
|
136
|
-
}
|
137
|
-
}
|
138
|
-
|
139
|
-
// Function to toggle off-canvas visibility
|
140
|
-
function toggleOffCanvas(toggle) {
|
141
|
-
const target = document.getElementById(toggle.getAttribute('data-target'));
|
142
|
-
|
143
|
-
// Check if the target is already open or closed
|
144
|
-
if (!target.classList.contains('c-off-canvas--active')) {
|
145
|
-
openOffCanvas(toggle, target);
|
146
|
-
} else if (target.classList.contains('c-off-canvas--active')) {
|
147
|
-
closeOffCanvas(target);
|
148
|
-
}
|
149
|
-
}
|
150
|
-
|
151
|
-
function openOffCanvas(toggle, target) {
|
152
|
-
// Add classes and attributes for open off-canvas
|
153
|
-
toggle.setAttribute('aria-expanded', 'true');
|
154
|
-
target.classList.add('c-off-canvas--active');
|
155
|
-
target.setAttribute('aria-hidden', 'false');
|
156
|
-
|
157
|
-
// Add event listener for backdrop clicks
|
158
|
-
const offCanvasBackdrop = target.querySelector('.c-off-canvas__backdrop');
|
159
|
-
if(offCanvasBackdrop) {
|
160
|
-
offCanvasBackdrop.addEventListener('click', handleBackdropClick);
|
161
|
-
}
|
162
|
-
|
163
|
-
// Add event listener forclose button clicks
|
164
|
-
const offCanvasCloseElements = target.querySelectorAll('[data-off-canvas-close="true"]');
|
165
|
-
if (offCanvasCloseElements.length > 0) {
|
166
|
-
offCanvasCloseElements.forEach((offCanvasClose) => {
|
167
|
-
offCanvasClose.addEventListener('click', handleCloseClick);
|
168
|
-
});
|
169
|
-
}
|
170
|
-
|
171
|
-
// Add event listener for Escape key press
|
172
|
-
document.addEventListener('keydown', handleKeyDown, { once: true });
|
173
|
-
|
174
|
-
// Adjust body overflow to prevent scrolling
|
175
|
-
document.body.style.overflowY = 'hidden';
|
176
|
-
|
177
|
-
// Close other open off-canvas elements
|
178
|
-
const allOffCanvasElementsExceptCurrent = Array.from(document.querySelectorAll('.c-off-canvas')).filter(offCanvas => offCanvas !== target);
|
179
|
-
if (allOffCanvasElementsExceptCurrent.length > 0) {
|
180
|
-
allOffCanvasElementsExceptCurrent.forEach((offCanvas) => {
|
181
|
-
closeOffCanvas(offCanvas);
|
182
|
-
});
|
183
|
-
}
|
184
|
-
}
|
185
|
-
|
186
|
-
// Function to close an off-canvas
|
187
|
-
function closeOffCanvas(target) {
|
188
|
-
// Remove classes and attributes for open off-canvas
|
189
|
-
document.querySelector('[data-target="' + target.id + '"').setAttribute('aria-expanded', 'false');
|
190
|
-
target.classList.remove('c-off-canvas--active');
|
191
|
-
target.setAttribute('aria-hidden', 'true');
|
192
|
-
|
193
|
-
// Restore body overflow
|
194
|
-
document.body.style.overflowY = '';
|
195
|
-
}
|
196
|
-
|
197
|
-
// Function to handle backdrop click
|
198
|
-
function handleBackdropClick() {
|
199
|
-
const offCanvas = this.closest('.c-off-canvas');
|
200
|
-
closeOffCanvas(offCanvas);
|
201
|
-
}
|
202
|
-
|
203
|
-
// Function to handle Escape key press
|
204
|
-
function handleKeyDown(event) {
|
205
|
-
if (event.key === 'Escape') {
|
206
|
-
const activeOffCanvas = document.querySelector('.c-off-canvas--active');
|
207
|
-
if (activeOffCanvas) {
|
208
|
-
closeOffCanvas(activeOffCanvas);
|
209
|
-
}
|
210
|
-
}
|
211
|
-
}
|
212
|
-
|
213
|
-
// Function to handle close button click
|
214
|
-
function handleCloseClick() {
|
215
|
-
const offCanvas = this.closest('.c-off-canvas');
|
216
|
-
closeOffCanvas(offCanvas);
|
217
|
-
}
|
218
|
-
|
219
|
-
export default OffCanvas;
|
@@ -1,30 +0,0 @@
|
|
1
|
-
const ResponsiveTable = () => {
|
2
|
-
const tables = Array.from(document.querySelectorAll('.c-table--responsive'));
|
3
|
-
tables.forEach(createResponsiveTable);
|
4
|
-
|
5
|
-
/**
|
6
|
-
* Create responsive table headers for large tables
|
7
|
-
* @param {HTMLTableElement} table
|
8
|
-
*/
|
9
|
-
function createResponsiveTable(table) {
|
10
|
-
const headers = table.querySelectorAll('thead > :first-child th');
|
11
|
-
const breakPoint = Number(table.getAttribute('data-columns')) || 2
|
12
|
-
|
13
|
-
if (headers.length < breakPoint) {
|
14
|
-
table.classList.remove('c-table--responsive');
|
15
|
-
return;
|
16
|
-
};
|
17
|
-
|
18
|
-
Array.from(table.querySelectorAll('tbody tr')).forEach((row) => {
|
19
|
-
Array.from(headers)
|
20
|
-
.map((x) => x.textContent)
|
21
|
-
.forEach((header, index) => {
|
22
|
-
if (row.children[index]) {
|
23
|
-
row.children[index].setAttribute('data-responsive-title', header);
|
24
|
-
}
|
25
|
-
});
|
26
|
-
});
|
27
|
-
}
|
28
|
-
};
|
29
|
-
|
30
|
-
export default ResponsiveTable;
|
@@ -1,46 +0,0 @@
|
|
1
|
-
function ScrollSpy() {
|
2
|
-
const internalNav = document.querySelector('.c-internal-nav--sticky');
|
3
|
-
const internalNavHeight = internalNav ? internalNav.offsetHeight : 0;
|
4
|
-
|
5
|
-
const spies = Array.from(document.querySelectorAll('.c-scroll-spy'));
|
6
|
-
spies.forEach(spy => {
|
7
|
-
setup(spy, internalNavHeight);
|
8
|
-
});
|
9
|
-
}
|
10
|
-
|
11
|
-
function setup(element, internalNavHeight) {
|
12
|
-
const anchors = Array.from(element.querySelectorAll('a'));
|
13
|
-
const observer = new IntersectionObserver(observation(anchors));
|
14
|
-
|
15
|
-
anchors.forEach(anchor => {
|
16
|
-
const id = anchor.getAttribute('href').replace('#', '');
|
17
|
-
const target = document.getElementById(id);
|
18
|
-
if (!target) return;
|
19
|
-
|
20
|
-
observer.observe(target);
|
21
|
-
});
|
22
|
-
|
23
|
-
const currentTop = parseFloat(window.getComputedStyle(element).top);
|
24
|
-
element.style.top = `${currentTop + internalNavHeight}px`;
|
25
|
-
}
|
26
|
-
|
27
|
-
/**
|
28
|
-
* @param {Array<HTMLAnchorElement>} results
|
29
|
-
* @return {Array<IntersectionObserverEntry>}
|
30
|
-
*/
|
31
|
-
function observation(anchors) {
|
32
|
-
return (results) => {
|
33
|
-
const firstObservation = results.find(x => x.isIntersecting);
|
34
|
-
|
35
|
-
if (firstObservation) {
|
36
|
-
anchors.forEach(x => {
|
37
|
-
x.classList.toggle(
|
38
|
-
'c-scroll-spy-active',
|
39
|
-
x.getAttribute('href') === '#' + firstObservation.target.id
|
40
|
-
)
|
41
|
-
})
|
42
|
-
}
|
43
|
-
}
|
44
|
-
}
|
45
|
-
|
46
|
-
export default ScrollSpy;
|
@@ -1,15 +0,0 @@
|
|
1
|
-
import { debounce } from './utilities';
|
2
|
-
|
3
|
-
function ScrollbarWidth() {
|
4
|
-
setScrollbarWidth();
|
5
|
-
window.addEventListener('resize', debounce(setScrollbarWidth, 250));
|
6
|
-
}
|
7
|
-
|
8
|
-
function setScrollbarWidth() {
|
9
|
-
document.documentElement.style.setProperty(
|
10
|
-
'--scrollbarWidth',
|
11
|
-
window.innerWidth - document.body.clientWidth + 'px'
|
12
|
-
);
|
13
|
-
}
|
14
|
-
|
15
|
-
export default ScrollbarWidth;
|