mp-design-system 1.2.64 → 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 -169
- 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,327 +0,0 @@
|
|
1
|
-
---
|
2
|
-
title: Color
|
3
|
-
layout: system-page
|
4
|
-
sidebar: components
|
5
|
-
---
|
6
|
-
|
7
|
-
{% from "components/alert/macro.njk" import alert %}
|
8
|
-
{% from "components/prose/macro.njk" import prose, markdown %}
|
9
|
-
|
10
|
-
{% set content %}
|
11
|
-
The color palette is based on the existing brand colors, tweaked to increase vibrance and clarity in digital applications. Color contrast ratios should be checked with a tool like the [webAIM contrast checker](https://webaim.org/resources/contrastchecker/) to ensure all text meets WCAG AA requirements.
|
12
|
-
|
13
|
-
A limited set of color tints and shades are available for element backgrounds, borders, icons, etc. These can also be used to increase contrast where appropriate, for example darkening a blue text link which appears on a light blue background.
|
14
|
-
{% endset %}
|
15
|
-
|
16
|
-
<div class="u-flow--l">
|
17
|
-
{{ alert({
|
18
|
-
content: "<p>This page explains how to use color on the web. For print or other uses, see the <a href='/brand/colors'>Brand ➝ colors</a> page.</p>",
|
19
|
-
type: "info"
|
20
|
-
})}}
|
21
|
-
|
22
|
-
{{ markdown({
|
23
|
-
content: content
|
24
|
-
}) }}
|
25
|
-
|
26
|
-
{% set colors = [
|
27
|
-
{
|
28
|
-
name: 'MP Petrol',
|
29
|
-
key: 'Petrol',
|
30
|
-
steps: [
|
31
|
-
{
|
32
|
-
name: "-1",
|
33
|
-
hex: '003039',
|
34
|
-
cmyk: '',
|
35
|
-
pantone: ''
|
36
|
-
},
|
37
|
-
{
|
38
|
-
name: 0,
|
39
|
-
hex: '005461',
|
40
|
-
cmyk: '93/54/49/27',
|
41
|
-
pantone: '3165'
|
42
|
-
},
|
43
|
-
{
|
44
|
-
name: 1,
|
45
|
-
hex: '3d7b87',
|
46
|
-
cmyk: '',
|
47
|
-
pantone: ''
|
48
|
-
},
|
49
|
-
{
|
50
|
-
name: 2,
|
51
|
-
hex: 'bfd3d6',
|
52
|
-
cmyk: '',
|
53
|
-
pantone: ''
|
54
|
-
},
|
55
|
-
{
|
56
|
-
name: 3,
|
57
|
-
hex: 'ebf1f2',
|
58
|
-
cmyk: '',
|
59
|
-
pantone: ''
|
60
|
-
}
|
61
|
-
]
|
62
|
-
},
|
63
|
-
{
|
64
|
-
name: 'MP Blue',
|
65
|
-
key: 'Blue',
|
66
|
-
steps: [
|
67
|
-
{
|
68
|
-
name: "-1",
|
69
|
-
hex: '00758c',
|
70
|
-
cmyk: '',
|
71
|
-
pantone: ''
|
72
|
-
},
|
73
|
-
{
|
74
|
-
name: 0,
|
75
|
-
hex: '00a2c2',
|
76
|
-
cmyk: '77/17/17/0',
|
77
|
-
pantone: '7460'
|
78
|
-
},
|
79
|
-
{
|
80
|
-
name: 1,
|
81
|
-
hex: '47bcd3',
|
82
|
-
cmyk: '',
|
83
|
-
pantone: ''
|
84
|
-
},
|
85
|
-
{
|
86
|
-
name: 2,
|
87
|
-
hex: 'c2e9f0',
|
88
|
-
cmyk: '',
|
89
|
-
pantone: ''
|
90
|
-
},
|
91
|
-
{
|
92
|
-
name: 3,
|
93
|
-
hex: 'ebf8fa',
|
94
|
-
cmyk: '',
|
95
|
-
pantone: ''
|
96
|
-
}
|
97
|
-
]
|
98
|
-
},
|
99
|
-
{
|
100
|
-
name: 'MP Green',
|
101
|
-
key: 'Green',
|
102
|
-
steps: [
|
103
|
-
{
|
104
|
-
name: "-1",
|
105
|
-
hex: '0e7a0e',
|
106
|
-
cmyk: '',
|
107
|
-
pantone: ''
|
108
|
-
},
|
109
|
-
{
|
110
|
-
name: 0,
|
111
|
-
hex: '13aa13',
|
112
|
-
cmyk: '81/4/100/0',
|
113
|
-
pantone: '2423'
|
114
|
-
},
|
115
|
-
{
|
116
|
-
name: 1,
|
117
|
-
hex: '55c255',
|
118
|
-
cmyk: '',
|
119
|
-
pantone: ''
|
120
|
-
},
|
121
|
-
{
|
122
|
-
name: 2,
|
123
|
-
hex: 'c6ebc6',
|
124
|
-
cmyk: '',
|
125
|
-
pantone: ''
|
126
|
-
},
|
127
|
-
{
|
128
|
-
name: 3,
|
129
|
-
hex: 'ecf8ec',
|
130
|
-
cmyk: '',
|
131
|
-
pantone: ''
|
132
|
-
}
|
133
|
-
]
|
134
|
-
},
|
135
|
-
{
|
136
|
-
name: 'MP Rubine',
|
137
|
-
key: 'Red',
|
138
|
-
steps: [
|
139
|
-
{
|
140
|
-
name: "-1",
|
141
|
-
hex: '94003f',
|
142
|
-
cmyk: '',
|
143
|
-
pantone: ''
|
144
|
-
},
|
145
|
-
{
|
146
|
-
name: 0,
|
147
|
-
hex: 'ce0058',
|
148
|
-
cmyk: '14/100/50/2',
|
149
|
-
pantone: 'Rubine Red'
|
150
|
-
},
|
151
|
-
{
|
152
|
-
name: 1,
|
153
|
-
hex: 'dc4787',
|
154
|
-
cmyk: '',
|
155
|
-
pantone: ''
|
156
|
-
},
|
157
|
-
{
|
158
|
-
name: 2,
|
159
|
-
hex: 'f3c2d7',
|
160
|
-
cmyk: '',
|
161
|
-
pantone: ''
|
162
|
-
},
|
163
|
-
{
|
164
|
-
name: 3,
|
165
|
-
hex: 'fbebf2',
|
166
|
-
cmyk: '',
|
167
|
-
pantone: ''
|
168
|
-
}
|
169
|
-
]
|
170
|
-
},
|
171
|
-
{
|
172
|
-
name: 'MP Charcoal',
|
173
|
-
key: 'Grey',
|
174
|
-
steps: [
|
175
|
-
|
176
|
-
{
|
177
|
-
name: "-1",
|
178
|
-
hex: '252525',
|
179
|
-
cmyk: '',
|
180
|
-
pantone: ''
|
181
|
-
},
|
182
|
-
{
|
183
|
-
name: 0,
|
184
|
-
hex: '333333',
|
185
|
-
cmyk: '0/0/0/95',
|
186
|
-
pantone: '447'
|
187
|
-
},
|
188
|
-
{
|
189
|
-
name: 1,
|
190
|
-
hex: '6c6c6c',
|
191
|
-
cmyk: '',
|
192
|
-
pantone: ''
|
193
|
-
},
|
194
|
-
{
|
195
|
-
name: 2,
|
196
|
-
hex: 'cecece',
|
197
|
-
cmyk: '',
|
198
|
-
pantone: ''
|
199
|
-
},
|
200
|
-
{
|
201
|
-
name: 3,
|
202
|
-
hex: 'efefef',
|
203
|
-
cmyk: '',
|
204
|
-
pantone: ''
|
205
|
-
}
|
206
|
-
]
|
207
|
-
},
|
208
|
-
{
|
209
|
-
name: 'MP Utility Blue',
|
210
|
-
key: 'Utility blue',
|
211
|
-
steps: [
|
212
|
-
{
|
213
|
-
name: "-1",
|
214
|
-
hex: '004f7e',
|
215
|
-
cmyk: '',
|
216
|
-
pantone: ''
|
217
|
-
},
|
218
|
-
{
|
219
|
-
name: 0,
|
220
|
-
hex: '006daf',
|
221
|
-
cmyk: '90/55/5/0',
|
222
|
-
pantone: '3553'
|
223
|
-
},
|
224
|
-
{
|
225
|
-
name: 1,
|
226
|
-
hex: '4796c5',
|
227
|
-
cmyk: '',
|
228
|
-
pantone: ''
|
229
|
-
},
|
230
|
-
{
|
231
|
-
name: 2,
|
232
|
-
hex: 'c2dcec',
|
233
|
-
cmyk: '',
|
234
|
-
pantone: ''
|
235
|
-
},
|
236
|
-
{
|
237
|
-
name: 3,
|
238
|
-
hex: 'ebf3f9',
|
239
|
-
cmyk: '',
|
240
|
-
pantone: ''
|
241
|
-
}
|
242
|
-
]
|
243
|
-
},
|
244
|
-
{
|
245
|
-
name: 'MP Utility Gold',
|
246
|
-
key: 'Utility orange',
|
247
|
-
steps: [
|
248
|
-
{
|
249
|
-
name: "-1",
|
250
|
-
hex: 'ae7809',
|
251
|
-
cmyk: '',
|
252
|
-
pantone: ''
|
253
|
-
},
|
254
|
-
{
|
255
|
-
name: 0,
|
256
|
-
hex: 'f2a60d',
|
257
|
-
cmyk: '4/38/100/0',
|
258
|
-
pantone: '130'
|
259
|
-
},
|
260
|
-
{
|
261
|
-
name: 1,
|
262
|
-
hex: 'f6bf51',
|
263
|
-
cmyk: '',
|
264
|
-
pantone: ''
|
265
|
-
},
|
266
|
-
{
|
267
|
-
name: 2,
|
268
|
-
hex: 'fceac5',
|
269
|
-
cmyk: '',
|
270
|
-
pantone: ''
|
271
|
-
},
|
272
|
-
{
|
273
|
-
name: 3,
|
274
|
-
hex: 'fef8ec',
|
275
|
-
cmyk: '',
|
276
|
-
pantone: ''
|
277
|
-
}
|
278
|
-
]
|
279
|
-
}
|
280
|
-
] %}
|
281
|
-
|
282
|
-
<div class="u-flow--2xs">
|
283
|
-
{% for color in colors %}
|
284
|
-
<h3 class="c-h c-h--step-1">{{ color.name }}</h3>
|
285
|
-
<div class="c-library__swatch-grid">
|
286
|
-
{% for step in color.steps %}
|
287
|
-
{% set classname %}
|
288
|
-
{{- 'c-library__swatch'}}{# Let's build a string #}
|
289
|
-
{{ 'u-bg-'+color.key | slug}}{# Set the background color to color.key -#}
|
290
|
-
{{ '-step-'+step.name if step.name!=0 }} {# If it's not step zero, add the -step-x suffix -#}
|
291
|
-
{# Set the text color to white, or a dark color #}
|
292
|
-
{{ 'u-'+color.key|slug+'-step--1' if (step.name==2) or (step.name==3) else 'u-white' -}}
|
293
|
-
{% endset %}
|
294
|
-
<div class="{{classname}}">
|
295
|
-
<span>Step {{step.name}}</span>
|
296
|
-
</div>
|
297
|
-
{% endfor %}
|
298
|
-
</div>
|
299
|
-
{% endfor%}
|
300
|
-
</div>
|
301
|
-
|
302
|
-
{% set content %}
|
303
|
-
### SCSS function
|
304
|
-
|
305
|
-
Color can be applied via a `SCSS` function. The `color()` function takes two arguments, one for the **color** and one for the **shade/tint**. Like typography, this uses the 'step' syntax to lighten/darken the base color (step 0). For example:
|
306
|
-
|
307
|
-
```scss
|
308
|
-
.c-component {
|
309
|
-
background: color('petrol', 'step-3');
|
310
|
-
color: color('blue');
|
311
|
-
}
|
312
|
-
```
|
313
|
-
|
314
|
-
### Utility classes
|
315
|
-
|
316
|
-
You can also use utility classes to apply color, with one set for the `color` property, and another for `background-color`:
|
317
|
-
|
318
|
-
```html
|
319
|
-
<p class="u-blue">Blue text</p>
|
320
|
-
<div class="u-bg-petrol-step-3">Petrol step 3 background</p>
|
321
|
-
```
|
322
|
-
{% endset %}
|
323
|
-
|
324
|
-
{{ markdown({
|
325
|
-
content: content
|
326
|
-
}) }}
|
327
|
-
</div>
|
@@ -1,163 +0,0 @@
|
|
1
|
-
---
|
2
|
-
title: Creating a component
|
3
|
-
layout: content-page
|
4
|
-
sidebar: components
|
5
|
-
---
|
6
|
-
|
7
|
-
Once you've [established a new pattern is required](/components), it's time to create a new component. For the purpose of this tutorial, let's assume the component is called **Filter Bar**.
|
8
|
-
|
9
|
-
First of all, create a directory to house the component: `src/_includes/components/filter-bar`
|
10
|
-
|
11
|
-
{% alert %}
|
12
|
-
**Note**, use kebab-case for directory & file names.
|
13
|
-
{% endalert %}
|
14
|
-
|
15
|
-
Next up, a few files will need to be created in that new folder:
|
16
|
-
|
17
|
-
- `filter-bar.njk` - The component code
|
18
|
-
- `macro.njk` - The wrapper around the component
|
19
|
-
- `filter-bar.scss` - _Optional:_ For styling the component
|
20
|
-
- `filter-bar.config.js` - _Optional:_ For rendering the component in {{ config.name }}
|
21
|
-
- `filter-bar.md` - _Optional:_ For documenting the component
|
22
|
-
|
23
|
-
## `filter-bar.njk`
|
24
|
-
|
25
|
-
Variables passed to this file can be accessed via the `params` variable. Other than that, this is a totally encapsulated file, with no access to global variables. Here's a very basic component that outputs the title parameter:
|
26
|
-
|
27
|
-
```html
|
28
|
-
<div class="mp c-filter-bar">
|
29
|
-
<h2 class="c-h c-h--step-2">{% brace %} params.title {% endbrace %}</h2>
|
30
|
-
</div>
|
31
|
-
```
|
32
|
-
|
33
|
-
You can also include other components inside this one. You can import it via the other component's macro, then call it like a function:
|
34
|
-
|
35
|
-
```html
|
36
|
-
{% brace 'silent' %} from "components/icon/macro.njk" import icon {% endbrace %}
|
37
|
-
|
38
|
-
<div class="mp c-filter-bar">
|
39
|
-
<h2 class="c-h c-h--step-2">{% brace %} params.title {% endbrace %}</h2>
|
40
|
-
{% brace %} icon({
|
41
|
-
id: 'twitter'
|
42
|
-
}) {% endbrace %}
|
43
|
-
</div>
|
44
|
-
```
|
45
|
-
|
46
|
-
These components aren't being included directly into application code, but **will be used for reference**, so think through the component composition and create sensible logic that can be recreated in Razor, DXA, PHP and any other language this is converted to. [Read more about Nunjuck templating](https://mozilla.github.io/nunjucks/templating.html).
|
47
|
-
|
48
|
-
### `macro.njk`
|
49
|
-
|
50
|
-
Every component has a corresponding macro file, allowing us to instantiate a component in a totally encapsulated area. The macro itself uses another `.njk` file to render the component, allowing us to render the component in the same way within {{ config.name }}.
|
51
|
-
|
52
|
-
```html
|
53
|
-
{% brace 'silent' %} from "components/component/component.njk" import c {% endbrace %}
|
54
|
-
|
55
|
-
{% brace 'silent' %} macro filterBar(params) {% endbrace %}
|
56
|
-
{% brace %} c({ name: 'filter-bar' }, params) {% endbrace %}
|
57
|
-
{% brace 'silent' %} endmacro {% endbrace %}
|
58
|
-
```
|
59
|
-
|
60
|
-
{% alert %}
|
61
|
-
**Note**, use camelCase for the macro name.
|
62
|
-
{% endalert %}
|
63
|
-
|
64
|
-
This `c` component takes two parameters:
|
65
|
-
|
66
|
-
1. Component object with three parameters
|
67
|
-
1. `name`: a string matching the `.njk` file name
|
68
|
-
2. `folder`: _Optional:_ by default, the same as the `name`
|
69
|
-
3. `root`: _Optional:_ by default, `../`, effectively the `src/_includes/components` directory
|
70
|
-
2. The `params` object, passed in from the macros own parameters
|
71
|
-
|
72
|
-
### `filter-bar.scss`
|
73
|
-
|
74
|
-
This `SCSS` file has access to all the mixins, functions and foundational elements documented in {{ config.name }}. To add it to the main bundle, head to `src/assets/scss/components/index.scss` and add a new line pointing to your file:
|
75
|
-
|
76
|
-
```scss
|
77
|
-
@import '~comp/filter-bar/filter-bar.scss';
|
78
|
-
```
|
79
|
-
|
80
|
-
{% alert %}
|
81
|
-
**Note**, `~comp` is a shorthand to the `src/_includes/components` directory.
|
82
|
-
{% endalert %}
|
83
|
-
|
84
|
-
### `filter-bar.config.js`
|
85
|
-
|
86
|
-
This file drives the component rendering for {{ config.name }}. It takes cues from [Fractal](https://fractal.build/) and [Storybook](https://storybook.js.org/), and is effectively a big object that tells {{ config.name }} how to render the component, and what data to render it with. Let's run through the minimum viable config file:
|
87
|
-
|
88
|
-
```js
|
89
|
-
module.exports = {
|
90
|
-
title: 'Filter bar',
|
91
|
-
component: {
|
92
|
-
name: 'filter-bar',
|
93
|
-
},
|
94
|
-
context: {
|
95
|
-
title: 'Filter bar title'
|
96
|
-
}
|
97
|
-
}
|
98
|
-
```
|
99
|
-
|
100
|
-
There are three mandatory sections:
|
101
|
-
|
102
|
-
1. `title`: the name of component
|
103
|
-
2. `component`: the same object we passed into the `c()` component, controling `name`, `folder`, and `root`
|
104
|
-
3. `context`: the data used to render the component
|
105
|
-
|
106
|
-
If this is all correct, you should see 'Filter bar' in the components section of the {{ config.name }} sidebar.
|
107
|
-
|
108
|
-
#### Additional parameters
|
109
|
-
|
110
|
-
- `preview`: Which 'preview' file should the component use to render. These live in `src/_includes/components/component` and allow you to test a component in a grid, with a different colour background, or in a totally different setting. To render your component with a new preview:
|
111
|
-
- Create the `preview-[PREVIEW NAME].njk` file
|
112
|
-
- Add any wrapping markup
|
113
|
-
- Insert: `{% brace %} comp | safe {% endbrace %}` wherever you wish to output the component
|
114
|
-
- Add `preview: '[PREVIEW NAME]'` to your original component
|
115
|
-
- `docs`: Does this component have a documentation markdown file (more on this later)?
|
116
|
-
- `figma`: A link to the originally designed component within Figma
|
117
|
-
- `status`: A string representation of how 'complete' the component is. This is 'slugified' and can be styled according to the name
|
118
|
-
- `version`: A numeric value that can be increased every time you change the component
|
119
|
-
- `category`: Components can be grouped in the {{ config.name }} sidebar. Categories are stored globally. To reference a category:
|
120
|
-
1. Require the categories file in `filter-bar.config.js`:
|
121
|
-
```js
|
122
|
-
const categories = require('../component/categories');
|
123
|
-
```
|
124
|
-
2. If you need a new category, create a new key/value pair in the above file
|
125
|
-
3. Add the `category` parameter: `category: categories.card`
|
126
|
-
- `props`: an array of prop tables, allowing you to document the inputs and outputs of the component:
|
127
|
-
|
128
|
-
```js
|
129
|
-
{
|
130
|
-
props: [
|
131
|
-
{
|
132
|
-
title: 'Table title', // optional, defaults to 'Props'
|
133
|
-
table: [
|
134
|
-
['Parameter name', 'Parameter type', 'Parameter description']
|
135
|
-
]
|
136
|
-
}
|
137
|
-
]
|
138
|
-
}
|
139
|
-
```
|
140
|
-
|
141
|
-
- `variants`: Variants are used to render the same component with different data, allowing you to test the parameters thoroughly, as well as test for extreme amounts of content and edge-cases. In {{ config.name }}, the variant objects are written like components within components. You must pass in a new `title` and a `context` object. {{ config.name }} will then merge the original component data with this new variant object to create a rendering context. This means you only have to pass the **differences** between the components, not every piece of context. It also means you can supply a different `preview` element, allowing you to test the same component in different scenarios.
|
142
|
-
|
143
|
-
```js
|
144
|
-
{
|
145
|
-
variants: [
|
146
|
-
{
|
147
|
-
title: 'With long title',
|
148
|
-
context: {
|
149
|
-
title: 'Cras mattis consectetur purus sit amet fermentum. Etiam porta sem malesuada magna mollis euismod.'
|
150
|
-
}
|
151
|
-
},
|
152
|
-
{
|
153
|
-
title: 'In a grid',
|
154
|
-
preview: 'cards-three',
|
155
|
-
context: {}
|
156
|
-
}
|
157
|
-
]
|
158
|
-
}
|
159
|
-
```
|
160
|
-
|
161
|
-
### `filter-bar.md`
|
162
|
-
|
163
|
-
Finally, you can create a Markdown file for a component. This is a space for you to write about the component in whatever way you deem helpful. This could be research insights, documentation of internal decisions, a changelog - it's up to you. This renders using the `prose()` component, so any styling from {{ config.name }} will be included here.
|
package/src/components/css.md
DELETED
@@ -1,65 +0,0 @@
|
|
1
|
-
---
|
2
|
-
title: CSS Approach
|
3
|
-
layout: content-page
|
4
|
-
sidebar: components
|
5
|
-
---
|
6
|
-
|
7
|
-
The CSS approach for {{ config.name }} is based around [ITCSS](https://www.creativebloq.com/web-design/manage-large-scale-web-projects-new-css-architecture-itcss-41514731) + [BEM](http://getbem.com/), two methodologies designed to help scale CSS on large projects.
|
8
|
-
|
9
|
-

|
10
|
-
|
11
|
-
## ITCSS
|
12
|
-
|
13
|
-
ITCSS separates the CSS into layers, ranging from the most generic & wide-reaching (settings) to the highest specificity (utilities). Components and Utilities are the most commonly used sections of the inverted triangle. Note, we tend not to use the 'generic' layer.
|
14
|
-
|
15
|
-
### Settings
|
16
|
-
Foundations for typography, space, colour, shadows, font stacks. In SCSS, this area produces no CSS, in PostCSS this adds variables to the `:root` element.
|
17
|
-
|
18
|
-
### Tools
|
19
|
-
SCSS mixins & functions - no 'CSS' actually generated.
|
20
|
-
|
21
|
-
### Elements
|
22
|
-
Code that targets HTML elements directly. The reset lives here, `<body>` styling, sensible `input` styles too. Anything that has 'global', but low specificity implications.
|
23
|
-
|
24
|
-
### Objects
|
25
|
-
Any parent elements that wrap around child components/elements and provide opinionated styling lives here. Wrapper, Grid, Prose all fall into this camp. Objects are prefixed with `o-`.
|
26
|
-
|
27
|
-
### Components
|
28
|
-
Most of the CSS lives in this group. Each component is an encapsulated 'block' (more on that later) that styles within. Components **should not** leak padding or margin, nor control their width or height; this should be controlled by the objects above. They use the `c-` prefix.
|
29
|
-
|
30
|
-
### Utilities
|
31
|
-
Utilities are classes that do one thing really well. For example: `.u-hidden` hides elements on the page in a non destructive way (still visible to screenreaders). There are auto-generated spacing, typography and colour classes to help compose a page (and prototype new components before refactoring them into the above groups). The `u-` prefix is used for utilities.
|
32
|
-
|
33
|
-
## BEM
|
34
|
-
We use BEM as a naming methodology, with `__` used for elements, and `--` used for modifiers.
|
35
|
-
|
36
|
-
```scss
|
37
|
-
/* Pattern */
|
38
|
-
.Block {
|
39
|
-
&__element {}
|
40
|
-
&--modifier {}
|
41
|
-
}
|
42
|
-
|
43
|
-
/* Usage */
|
44
|
-
.c-tag {
|
45
|
-
background: color('petrol');
|
46
|
-
color: color('petrol', 'step-3');
|
47
|
-
|
48
|
-
&__title {
|
49
|
-
font-weight: weight('bold');
|
50
|
-
}
|
51
|
-
|
52
|
-
&--inverted {
|
53
|
-
background: color('petrol', 'step-3');
|
54
|
-
color: color('petrol');
|
55
|
-
}
|
56
|
-
}
|
57
|
-
```
|
58
|
-
|
59
|
-
For more information about BEM see [getbem.com](http://getbem.com/)
|
60
|
-
|
61
|
-
### SCSS variables vs. CSS custom properties
|
62
|
-
|
63
|
-
{{ config.name }} is designed to support IE11+, which leaves a large support gap for custom properties—sadly, polyfilling is patchy at best. For this reason, the design system relies more on SCSS variables than custom properties.
|
64
|
-
|
65
|
-
However, the fluid typographic and space system does require runtime variables. For this reason, there are a number of powerful mixins in play, that provide solid fallbacks to older browsers, whilst still letting new browsers use custom properties.
|
package/src/components/flow.njk
DELETED
@@ -1,131 +0,0 @@
|
|
1
|
-
---
|
2
|
-
title: Flow
|
3
|
-
layout: system-page
|
4
|
-
sidebar: components
|
5
|
-
---
|
6
|
-
|
7
|
-
{% from "components/prose/macro.njk" import markdown %}
|
8
|
-
{% from "components/alert/macro.njk" import alert %}
|
9
|
-
|
10
|
-
<div class="u-flow--m">
|
11
|
-
{% set content %}
|
12
|
-
Add the class `u-flow` to any container, to space its contents.
|
13
|
-
```html
|
14
|
-
<div class="u-flow">
|
15
|
-
<h1>Flow</h1>
|
16
|
-
<p>Example</p>
|
17
|
-
<img src="example.jpg" />
|
18
|
-
<div>Example</div>
|
19
|
-
</div>
|
20
|
-
```
|
21
|
-
|
22
|
-
Spacing content effectively is imperative to good component composition. Taking learnings from broader CSS spacing paradigms, rather than dictate spacing at a child-level, we set the rules at a parent-level, overriding at a child-level where appropriate.
|
23
|
-
|
24
|
-
With this approach, we can add any number of new children to a parent without breaking this existing variants. This mindset is crucial to extending the design system over time.
|
25
|
-
|
26
|
-
To achieve this, we use the **flow** concept. The [lobotomised owl selector](https://alistapart.com/article/axiomatic-css-and-lobotomized-owls/) `* + *` does the heavy lifting here. Rather than every element 'pushing down', any children that follow another child 'push up'.
|
27
|
-
|
28
|
-
{% set dont %}
|
29
|
-
```scss
|
30
|
-
.parent > * {
|
31
|
-
margin-bottom: 1rem;
|
32
|
-
|
33
|
-
&:last-child {
|
34
|
-
margin-bottom: 0;
|
35
|
-
}
|
36
|
-
}
|
37
|
-
```
|
38
|
-
{% endset %}
|
39
|
-
{{ alert({
|
40
|
-
content: dont,
|
41
|
-
type: 'error'
|
42
|
-
}) }}
|
43
|
-
|
44
|
-
{% set do %}
|
45
|
-
```scss
|
46
|
-
.parent > * + * {
|
47
|
-
margin-top: 1rem;
|
48
|
-
}
|
49
|
-
```
|
50
|
-
{% endset %}
|
51
|
-
{{ alert({
|
52
|
-
content: do,
|
53
|
-
type: 'success'
|
54
|
-
}) }}
|
55
|
-
|
56
|
-
This also means we don't have to reset the last child and remove unnecessary space.
|
57
|
-
|
58
|
-
## Utility classes
|
59
|
-
|
60
|
-
Instead of writing the above for every component, utility classes have been created to handle this consistently. These inherit from the [Space](/components/space) system underpinning the design, and use the same 't-shirt sizing' concept.
|
61
|
-
|
62
|
-
`.u-flow` will produce a 'small' space, and `.u-flow--l` a 'large' one.
|
63
|
-
|
64
|
-
{% set dont %}
|
65
|
-
```html
|
66
|
-
<div class="c-component">
|
67
|
-
<h2 class="c-component__title u-margin-top-m">...</h2>
|
68
|
-
</div>
|
69
|
-
```
|
70
|
-
{% endset %}
|
71
|
-
{{ alert({
|
72
|
-
content: dont,
|
73
|
-
type: 'error'
|
74
|
-
}) }}
|
75
|
-
|
76
|
-
{% set do %}
|
77
|
-
```html
|
78
|
-
<div class="c-component u-flow--m">
|
79
|
-
<h2 class="c-component__title">...</h2>
|
80
|
-
</div>
|
81
|
-
```
|
82
|
-
{% endset %}
|
83
|
-
|
84
|
-
{{ alert({
|
85
|
-
content: do,
|
86
|
-
type: 'success'
|
87
|
-
}) }}
|
88
|
-
|
89
|
-
## SCSS Mixin
|
90
|
-
|
91
|
-
It's also possible to apply the flow concept to a component's SCSS via the mixin: `flow($size)`.
|
92
|
-
|
93
|
-
#### Source → Compiled
|
94
|
-
|
95
|
-
<table class="c-table">
|
96
|
-
<thead>
|
97
|
-
<tr>
|
98
|
-
<th>Source</th>
|
99
|
-
<th>Compiled</th>
|
100
|
-
</tr>
|
101
|
-
</thead>
|
102
|
-
<tbody>
|
103
|
-
<tr>
|
104
|
-
<td>
|
105
|
-
|
106
|
-
```scss
|
107
|
-
.c-component {
|
108
|
-
@include flow('l');
|
109
|
-
}
|
110
|
-
```
|
111
|
-
|
112
|
-
</td>
|
113
|
-
<td>
|
114
|
-
|
115
|
-
```scss
|
116
|
-
.c-component > * + * {
|
117
|
-
margin-top: 36px;
|
118
|
-
margin-top: var(--space-l);
|
119
|
-
}
|
120
|
-
```
|
121
|
-
|
122
|
-
</td>
|
123
|
-
</tr>
|
124
|
-
</tbody>
|
125
|
-
</table>
|
126
|
-
{% endset %}
|
127
|
-
{{ markdown({
|
128
|
-
content: content
|
129
|
-
}) }}
|
130
|
-
</div>
|
131
|
-
|