├── .editorconfig ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── component_change_request.md │ └── new_component_request.md ├── PULL_REQUEST_TEMPLATE.md ├── dependabot.yml └── workflows │ ├── docs-prod.yml │ └── node.js.yml ├── .gitignore ├── .nvmrc ├── .stylelintignore ├── .stylelintrc.json ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── LICENSE ├── README.md ├── assets ├── fonts │ ├── Inter-Bold.woff2 │ ├── Inter-BoldItalic.woff2 │ ├── Inter-Italic.woff2 │ ├── Inter-Regular.woff2 │ ├── Metropolis-Bold.woff │ ├── Metropolis-Bold.woff2 │ ├── Metropolis-Medium.woff │ ├── Metropolis-Medium.woff2 │ ├── mozilla-headline │ │ ├── MozillaHeadline-Regular.woff2 │ │ └── MozillaHeadline-SemiBold.woff2 │ └── mozilla-text │ │ ├── MozillaText-Bold.woff2 │ │ ├── MozillaText-BoldItalic.woff2 │ │ ├── MozillaText-Italic.woff2 │ │ ├── MozillaText-Regular.woff2 │ │ ├── MozillaText-SemiBold.woff2 │ │ └── MozillaText-SemiBoldItalic.woff2 ├── js │ └── protocol │ │ ├── base.js │ │ ├── details.js │ │ ├── footer.js │ │ ├── lang-switcher.js │ │ ├── menu.js │ │ ├── modal.js │ │ ├── navigation.js │ │ ├── newsletter.js │ │ ├── notification-bar.js │ │ ├── sidemenu.js │ │ ├── sticky-promo.js │ │ ├── supports.js │ │ └── utils.js ├── package │ ├── LICENSE │ ├── README.md │ └── package.json └── sass │ └── protocol │ ├── base │ ├── _elements.scss │ ├── _includes.scss │ ├── elements │ │ ├── _common.scss │ │ ├── _containers.scss │ │ ├── _details.scss │ │ ├── _document.scss │ │ ├── _forms.scss │ │ ├── _links.scss │ │ ├── _lists.scss │ │ ├── _quotes.scss │ │ ├── _reset.scss │ │ ├── _tables.scss │ │ └── _titles.scss │ ├── includes │ │ └── _animations.scss │ └── utilities │ │ ├── _backgrounds.scss │ │ └── _titles.scss │ ├── components │ ├── _article.scss │ ├── _billboard.scss │ ├── _breadcrumb.scss │ ├── _button.scss │ ├── _callout.scss │ ├── _card.scss │ ├── _emphasis-box.scss │ ├── _feature-card.scss │ ├── _footer.scss │ ├── _inline-list.scss │ ├── _language-switcher.scss │ ├── _menu-item.scss │ ├── _menu-list.scss │ ├── _menu.scss │ ├── _modal.scss │ ├── _navigation.scss │ ├── _newsletter-form.scss │ ├── _notification-bar.scss │ ├── _picto.scss │ ├── _section-heading.scss │ ├── _sidebar-menu.scss │ ├── _split.scss │ ├── _sticky-promo.scss │ ├── _video.scss │ ├── _zap.scss │ ├── forms │ │ ├── _button-container.scss │ │ ├── _choice.scss │ │ ├── _field.scss │ │ ├── _form.scss │ │ ├── _msg.scss │ │ ├── _set.scss │ │ └── _status.scss │ └── logos │ │ ├── _logo-product-beta.scss │ │ ├── _logo-product-developer.scss │ │ ├── _logo-product-family.scss │ │ ├── _logo-product-firefox.scss │ │ ├── _logo-product-focus.scss │ │ ├── _logo-product-lockwise.scss │ │ ├── _logo-product-monitor.scss │ │ ├── _logo-product-mozilla.scss │ │ ├── _logo-product-nightly.scss │ │ ├── _logo-product-pocket.scss │ │ ├── _logo-product-relay.scss │ │ ├── _logo-product-vpn.scss │ │ ├── _logo.scss │ │ ├── _wordmark-product-beta.scss │ │ ├── _wordmark-product-developer.scss │ │ ├── _wordmark-product-family.scss │ │ ├── _wordmark-product-firefox.scss │ │ ├── _wordmark-product-focus.scss │ │ ├── _wordmark-product-klar.scss │ │ ├── _wordmark-product-lockwise.scss │ │ ├── _wordmark-product-monitor.scss │ │ ├── _wordmark-product-mozilla.scss │ │ ├── _wordmark-product-nightly.scss │ │ ├── _wordmark-product-pocket.scss │ │ ├── _wordmark-product-relay.scss │ │ ├── _wordmark-product-vpn.scss │ │ └── _wordmark.scss │ ├── includes │ ├── _config.scss │ ├── _functions.scss │ ├── _lib.scss │ ├── _themes-sass.scss │ ├── _tokens.scss │ ├── fonts │ │ ├── _inter.scss │ │ ├── _metropolis.scss │ │ ├── _mozilla-headline.scss │ │ └── _mozilla-text.scss │ ├── forms │ │ └── _index.scss │ ├── mixins │ │ ├── _at2x.scss │ │ ├── _bidi.scss │ │ ├── _details.scss │ │ ├── _gradients.scss │ │ ├── _grid.scss │ │ ├── _images.scss │ │ ├── _index.scss │ │ ├── _typography.scss │ │ ├── _utils.scss │ │ └── _zap.scss │ └── themes │ │ ├── _firefox.scss │ │ ├── _index.scss │ │ └── _mozilla.scss │ ├── protocol-components.scss │ ├── protocol.scss │ └── templates │ ├── _card-layout.scss │ ├── _main-with-sidebar.scss │ └── _multi-column.scss ├── components ├── _preview-dark-unpadded.html ├── _preview-dark.html ├── _preview-unpadded.html ├── _preview.html ├── article │ ├── article.html │ └── readme.md ├── basic-elements │ ├── blockquote │ │ ├── blockquote.html │ │ └── readme.md │ ├── details │ │ ├── details.html │ │ └── readme.md │ ├── headings │ │ ├── headings.html │ │ └── readme.md │ ├── links │ │ ├── links--call-to-action.html │ │ ├── links--call-to-action.readme.md │ │ ├── links.html │ │ └── readme.md │ ├── lists │ │ ├── lists--inline.html │ │ ├── lists--inline.readme.md │ │ ├── lists.html │ │ └── readme.md │ ├── paragraphs │ │ ├── paragraphs.html │ │ └── readme.md │ └── tables │ │ ├── readme.md │ │ └── tables.html ├── billboard │ ├── billboard.config.yml │ ├── billboard.html │ └── readme.md ├── branding │ ├── logo │ │ ├── logo--products.html │ │ ├── logo--products.readme.md │ │ ├── logo--sizes.html │ │ ├── logo--sizes.readme.md │ │ ├── logo.config.yml │ │ ├── logo.html │ │ └── readme.md │ ├── wordmark │ │ ├── readme.md │ │ ├── wordmark--products.html │ │ ├── wordmark--products.readme.md │ │ ├── wordmark--sizes.html │ │ ├── wordmark--sizes.readme.md │ │ ├── wordmark.config.yml │ │ └── wordmark.html │ └── zap │ │ ├── readme.md │ │ ├── zap--all-styles.html │ │ ├── zap.config.yml │ │ └── zap.html ├── breadcrumb │ ├── breadcrumb.html │ └── readme.md ├── button │ ├── button--with-icon.html │ ├── button--with-icon.readme.md │ ├── button.config.yml │ ├── button.html │ └── readme.md ├── callout │ ├── callout--example.html │ ├── callout.config.yml │ ├── callout.html │ └── readme.md ├── card │ ├── card.config.yml │ ├── card.html │ └── readme.md ├── details-component │ ├── details-component--custom.html │ ├── details-component--custom.readme.md │ ├── details-component.html │ └── readme.md ├── download-button │ ├── download-button--secondary.html │ ├── download-button.config.yml │ ├── download-button.html │ └── readme.md ├── emphasis-box │ ├── emphasis-box.html │ └── readme.md ├── feature-card │ ├── feature-card.config.yml │ ├── feature-card.html │ └── readme.md ├── footer │ ├── 01-footer │ │ ├── footer.config.yml │ │ ├── footer.html │ │ └── readme.md │ └── 02-example-basic │ │ ├── example-basic.config.yml │ │ ├── example-basic.html │ │ └── readme.md ├── forms │ ├── 01-input │ │ ├── input--disabled.html │ │ ├── input.config.yml │ │ ├── input.html │ │ └── readme.md │ ├── 02-select │ │ ├── readme.md │ │ ├── select.config.yml │ │ └── select.html │ ├── 03-checkboxes │ │ ├── checkboxes.html │ │ └── readme.md │ ├── 04-radio-buttons │ │ ├── radio-buttons.html │ │ └── readme.md │ ├── 05-textarea │ │ ├── readme.md │ │ └── textarea.html │ ├── 06-field-notes │ │ ├── field-notes.html │ │ └── readme.md │ ├── 07-titles │ │ ├── readme.md │ │ └── titles.html │ ├── 08-field │ │ ├── field.html │ │ └── readme.md │ ├── 09-choices │ │ ├── choices.html │ │ └── readme.md │ ├── 10-error-messages │ │ ├── error-messages.html │ │ └── readme.md │ ├── 11-error-list │ │ ├── error-list.html │ │ └── readme.md │ ├── 12-form-header │ │ ├── form-header.config.yml │ │ ├── form-header.html │ │ └── readme.md │ ├── 14-field-set │ │ ├── field-set.html │ │ └── readme.md │ ├── 15-button-container │ │ ├── button-container.config.yml │ │ ├── button-container.html │ │ └── readme.md │ ├── _choice │ │ ├── choice.config.yml │ │ ├── choice.html │ │ └── readme.md │ ├── _input-field │ │ ├── input-field.config.yml │ │ └── input-field.html │ ├── _list-field │ │ ├── list-field.config.yml │ │ └── list-field.html │ ├── _select-field │ │ ├── select-field.config.yml │ │ └── select-field.html │ ├── _textarea-field │ │ ├── textarea-field.config.yml │ │ └── textarea-field.html │ └── example-form │ │ ├── example-form.html │ │ └── readme.md ├── language-switcher │ ├── language-switcher.html │ └── readme.md ├── layout │ ├── 01-content-container │ │ ├── content-container.config.yml │ │ ├── content-container.html │ │ └── readme.md │ ├── 02-columns │ │ ├── columns--four.html │ │ ├── columns--three.html │ │ ├── columns--two.html │ │ ├── columns.config.yml │ │ ├── columns.html │ │ └── readme.md │ ├── 03-card-layout │ │ ├── 02-card-layout--third.html │ │ ├── 03-card-layout--quarter.html │ │ ├── 04-card-layout--hero.html │ │ ├── card-layout.config.yml │ │ ├── card-layout.html │ │ └── readme.md │ └── 04-main-with-sidebar │ │ ├── 01-main-with-sidebar │ │ ├── main-with-sidebar.config.yml │ │ ├── main-with-sidebar.html │ │ └── readme.md │ │ └── example-sidebar-menu │ │ ├── example-sidebar-menu.config.yml │ │ ├── example-sidebar-menu.html │ │ └── readme.md ├── menu-list │ ├── menu-list--download.html │ ├── menu-list.config.yml │ ├── menu-list.html │ └── readme.md ├── modal │ ├── modal.html │ └── readme.md ├── navigation │ ├── 01-navigation │ │ ├── navigation.config.yml │ │ ├── navigation.html │ │ └── readme.md │ ├── 02-menu │ │ ├── menu.html │ │ └── readme.md │ └── 03-menu-item │ │ ├── menu-item.config.yml │ │ ├── menu-item.html │ │ └── readme.md ├── newsletter │ ├── newsletter--errors.html │ ├── newsletter--success.html │ ├── newsletter.config.yml │ ├── newsletter.html │ └── readme.md ├── notification-bar │ ├── notification-bar--scripted.html │ ├── notification-bar--scripted.readme.md │ ├── notification-bar--sticky.html │ ├── notification-bar--sticky.readme.md │ ├── notification-bar.config.yml │ ├── notification-bar.html │ └── readme.md ├── picto │ ├── picto--centered.html │ ├── picto--side.html │ ├── picto.config.yml │ ├── picto.html │ └── readme.md ├── section-heading │ ├── readme.md │ ├── section-heading.config.yml │ └── section-heading.html ├── sidebar-menu │ ├── readme.md │ └── sidebar-menu.html ├── split │ ├── readme.md │ ├── split.config.yml │ └── split.html ├── sticky-promo │ ├── readme.md │ ├── sticky-promo.config.yml │ └── sticky-promo.html └── video │ ├── readme.md │ └── video.html ├── docs ├── 01-fundamentals │ ├── 01-principles.md │ ├── 02-themes.md │ ├── 03-typography.md │ ├── 04-color.md │ ├── 05-design-tokens.md │ ├── color.config.yml │ ├── design-tokens.config.yml │ └── typography.config.yml ├── 02-usage │ ├── 01-overview.md │ └── 02-framework.md ├── 03-contributing │ ├── 01-overview.md │ ├── 02-naming.md │ └── 03-css-guide.md ├── 404.md ├── _partials │ └── _color-swatch.md └── index.md ├── eslint.config.js ├── fractal.config.js ├── main.js ├── netlify.toml ├── package-lock.json ├── package.json ├── static ├── img │ ├── billboard-image.png │ ├── image-1-1-sm.jpg │ ├── image-1-1.jpg │ ├── image-16-9-high-res.jpg │ ├── image-16-9.jpg │ ├── image-3-2-high-res.jpg │ ├── image-3-2.jpg │ ├── image-portrait.jpg │ ├── newsletter-image.png │ └── video-poster.jpg └── video │ └── video.webm ├── tests ├── globals.js ├── jasmine-browser.json └── unit │ ├── details.js │ ├── lang-switcher.js │ ├── menu.js │ ├── navigation.js │ ├── newsletter.js │ └── notification-bar.js ├── theme ├── assets │ ├── favicon.png │ ├── img │ │ ├── github.svg │ │ ├── icon-drag--horizontal.svg │ │ ├── icon-drag--vertical.svg │ │ ├── icon-navigation-closed-ltr.svg │ │ ├── icon-navigation-closed-rtl.svg │ │ ├── icon-navigation-opened.svg │ │ ├── icon-window.svg │ │ ├── loader.svg │ │ └── logo.svg │ ├── js │ │ └── bidi.js │ └── sass │ │ ├── base │ │ └── _typography.scss │ │ ├── components │ │ ├── _404.scss │ │ ├── _browser.scss │ │ ├── _color.scss │ │ ├── _document.scss │ │ ├── _frame.scss │ │ ├── _grid-list.scss │ │ ├── _header.scss │ │ ├── _icon.scss │ │ ├── _meta.scss │ │ ├── _navigation.scss │ │ ├── _pen.scss │ │ ├── _preview.scss │ │ ├── _prose.scss │ │ ├── _search.scss │ │ ├── _status.scss │ │ ├── _tokens.scss │ │ ├── _tree.scss │ │ └── _type-specimen.scss │ │ ├── helpers │ │ └── _text.scss │ │ ├── preview.scss │ │ ├── settings │ │ └── _settings.scss │ │ └── theme.scss ├── index.js ├── package.json └── views │ ├── layouts │ └── doc.nunj │ └── partials │ ├── head.nunj │ ├── header.nunj │ ├── navigation │ └── navigation.nunj │ ├── pen │ └── header.nunj │ └── scripts.nunj ├── webpack.docs.build.config.js ├── webpack.docs.static.config.js ├── webpack.entrypoints.js ├── webpack.package.build.config.js ├── webpack.package.static.config.js └── webpack.test.config.js /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: http://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | # Unix-style newlines with a newline ending every file 7 | [*] 8 | end_of_line = lf 9 | insert_final_newline = true 10 | trim_trailing_whitespace = true 11 | indent_style = space 12 | 13 | [*.py] 14 | indent_size = 4 15 | 16 | [*.js] 17 | indent_size = 4 18 | 19 | [*.json] 20 | indent_size = 4 21 | 22 | [*.css] 23 | indent_size = 4 24 | 25 | [*.less] 26 | indent_size = 4 27 | 28 | [*.scss] 29 | indent_size = 4 30 | 31 | [*.sh] 32 | indent_size = 4 33 | 34 | [*.html] 35 | indent_size = 2 36 | 37 | [*.njk] 38 | indent_size = 2 39 | 40 | [*.svg] 41 | indent_size = 2 42 | 43 | [*.yml] 44 | indent_size = 2 45 | 46 | [*.md] 47 | indent_size = 2 48 | 49 | [Jenkinsfile] 50 | indent_size = 4 51 | 52 | [*.groovy] 53 | indent_size = 4 54 | 55 | [package.json] 56 | indent_size = 2 57 | 58 | [Makefile] 59 | indent_style = tab 60 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Report an error you've discovered 4 | title: "" 5 | labels: 'Bug :beetle:' 6 | assignees: '' 7 | 8 | --- 9 | 10 | ## Description 11 | 12 | Describe the issue that you're seeing. 13 | 14 | ### Steps to reproduce 15 | 16 | Clear steps describing how to reproduce the issue. Provide a URL or screenshot, if possible. 17 | 18 | ### Expected result 19 | 20 | What should happen? 21 | 22 | ### Actual result 23 | 24 | What happened. 25 | 26 | ### Environment 27 | 28 | What browser and operating system are you using? 29 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/new_component_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: New Component Request 3 | about: If you would like to add a component in Protocol, use this template 4 | title: "New Component Request" 5 | labels: "New Component Request" 6 | assignees: '' 7 | --- 8 | 9 | Please use this template to request a new component. 10 | If you're not sure whether a component already exists, 11 | go ahead and file the issue here, and the team will triage appropriately. 12 | 13 | Fill in as many sections as possible below. 14 | 15 | ### Please describe the use case(s) for this component 16 | 17 | What does the component do? In what contexts is it used. Be as specific as possible. 18 | 19 | ### Please provide any designs or previous implementations of the proposed component 20 | 21 | Add screenshots, mockups, code prototypes, etc. in this section. 22 | 23 | ## Please describe what this component does in the following conditions 24 | 25 | * When set in front of a dark background 26 | * When set in front of a light background 27 | * When viewed in a mobile/responsive viewport 28 | 29 | ### Please provide examples of this type of component in use in non-Mozilla web properties 30 | 31 | Add screenshots and links to web properties that use a similar component. 32 | (We ask for this because we want to make sure we are following industry conventions while building components) 33 | 34 | ### Is the development of this component a blocking dependency for other work? Please explain if so 35 | 36 | Generally speaking component definition should happen after a singleton instance has been developed, 37 | or if the Protocol team has come to a consensus on need. 38 | 39 | 40 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## Description 2 | 3 | Describe what this change does. 4 | 5 | - [ ] I have documented this change in the design system. 6 | - [ ] I have recorded this change in `CHANGELOG.md`. 7 | 8 | ### Issue 9 | 10 | Add a link to a related GitHub issue if applicable. 11 | 12 | ### Testing 13 | 14 | Enter helpful notes for whoever code reviews this change. 15 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: "npm" 9 | directory: "/" 10 | schedule: 11 | interval: "monthly" 12 | open-pull-requests-limit: 10 13 | groups: 14 | frontend: 15 | dependency-type: production 16 | update-types: 17 | - "minor" 18 | - "patch" 19 | dev-dependencies: 20 | dependency-type: development 21 | update-types: 22 | - "minor" 23 | - "patch" 24 | labels: 25 | - dependencies 26 | 27 | -------------------------------------------------------------------------------- /.github/workflows/docs-prod.yml: -------------------------------------------------------------------------------- 1 | name: Publish docs 2 | 3 | on: 4 | release: 5 | types: 6 | - published 7 | 8 | permissions: 9 | contents: write 10 | 11 | jobs: 12 | publish-docs: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: actions/checkout@v4 16 | with: 17 | fetch-depth: 0 18 | - name: Push prod 19 | run: | 20 | git config user.name github-actions 21 | git config user.email github-actions@github.com 22 | git push origin ${GITHUB_SHA}:prod 23 | -------------------------------------------------------------------------------- /.github/workflows/node.js.yml: -------------------------------------------------------------------------------- 1 | name: Node.js CI 2 | on: 3 | push: 4 | branches: [ main ] 5 | pull_request: 6 | branches: [ main ] 7 | jobs: 8 | build: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: "Install framebuffer (xvfb) and Chromium" 12 | run: | 13 | sudo apt-get update 14 | sudo apt-get install chromium-browser xvfb 15 | - uses: actions/checkout@v4 16 | - uses: actions/setup-node@v4 17 | with: 18 | node-version: 20 19 | - name: "Install dependencies and build NPM package" 20 | run: npm run build-package 21 | - name: "Run JS tests" 22 | run: xvfb-run npm test 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | tests/dist 4 | /package 5 | static/protocol 6 | theme/static 7 | .netlify 8 | .DS_Store 9 | .node-version 10 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | 20 2 | -------------------------------------------------------------------------------- /.stylelintignore: -------------------------------------------------------------------------------- 1 | dist 2 | package 3 | static 4 | theme/static 5 | -------------------------------------------------------------------------------- /.stylelintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "stylelint-config-standard-scss", 3 | "rules": { 4 | "declaration-empty-line-before": "never", 5 | "declaration-no-important": true, 6 | "color-function-notation": "legacy", 7 | "alpha-value-notation": "number", 8 | "property-no-vendor-prefix": null, 9 | "value-no-vendor-prefix": null, 10 | "at-rule-empty-line-before": null, 11 | "no-descending-specificity": null, 12 | "value-keyword-case": [ 13 | "lower", 14 | { 15 | "camelCaseSvgKeywords": true, 16 | "ignoreFunctions": ["local"] 17 | } 18 | ], 19 | "declaration-block-no-redundant-longhand-properties": [ 20 | true, 21 | { 22 | "ignoreShorthands": [ 23 | "grid-area", 24 | "grid-column", 25 | "grid-gap", 26 | "grid-row", 27 | "grid-template", 28 | "inset" 29 | ] 30 | } 31 | ], 32 | "function-url-no-scheme-relative": true, 33 | "max-nesting-depth": 5, 34 | "no-unknown-animations": true 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Community Participation Guidelines 2 | 3 | This repository is governed by Mozilla's code of conduct and etiquette guidelines. 4 | For more details, please read the 5 | [Mozilla Community Participation Guidelines](https://www.mozilla.org/about/governance/policies/participation/). 6 | 7 | ## How to Report 8 | For more information on how to report violations of the Community Participation Guidelines, please read our '[How to Report](https://www.mozilla.org/about/governance/policies/participation/reporting/)' page. 9 | 10 | 16 | -------------------------------------------------------------------------------- /assets/fonts/Inter-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/protocol/cce368bbafd394f4f006afcf72d1fe92ac2f354e/assets/fonts/Inter-Bold.woff2 -------------------------------------------------------------------------------- /assets/fonts/Inter-BoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/protocol/cce368bbafd394f4f006afcf72d1fe92ac2f354e/assets/fonts/Inter-BoldItalic.woff2 -------------------------------------------------------------------------------- /assets/fonts/Inter-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/protocol/cce368bbafd394f4f006afcf72d1fe92ac2f354e/assets/fonts/Inter-Italic.woff2 -------------------------------------------------------------------------------- /assets/fonts/Inter-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/protocol/cce368bbafd394f4f006afcf72d1fe92ac2f354e/assets/fonts/Inter-Regular.woff2 -------------------------------------------------------------------------------- /assets/fonts/Metropolis-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/protocol/cce368bbafd394f4f006afcf72d1fe92ac2f354e/assets/fonts/Metropolis-Bold.woff -------------------------------------------------------------------------------- /assets/fonts/Metropolis-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/protocol/cce368bbafd394f4f006afcf72d1fe92ac2f354e/assets/fonts/Metropolis-Bold.woff2 -------------------------------------------------------------------------------- /assets/fonts/Metropolis-Medium.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/protocol/cce368bbafd394f4f006afcf72d1fe92ac2f354e/assets/fonts/Metropolis-Medium.woff -------------------------------------------------------------------------------- /assets/fonts/Metropolis-Medium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/protocol/cce368bbafd394f4f006afcf72d1fe92ac2f354e/assets/fonts/Metropolis-Medium.woff2 -------------------------------------------------------------------------------- /assets/fonts/mozilla-headline/MozillaHeadline-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/protocol/cce368bbafd394f4f006afcf72d1fe92ac2f354e/assets/fonts/mozilla-headline/MozillaHeadline-Regular.woff2 -------------------------------------------------------------------------------- /assets/fonts/mozilla-headline/MozillaHeadline-SemiBold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/protocol/cce368bbafd394f4f006afcf72d1fe92ac2f354e/assets/fonts/mozilla-headline/MozillaHeadline-SemiBold.woff2 -------------------------------------------------------------------------------- /assets/fonts/mozilla-text/MozillaText-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/protocol/cce368bbafd394f4f006afcf72d1fe92ac2f354e/assets/fonts/mozilla-text/MozillaText-Bold.woff2 -------------------------------------------------------------------------------- /assets/fonts/mozilla-text/MozillaText-BoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/protocol/cce368bbafd394f4f006afcf72d1fe92ac2f354e/assets/fonts/mozilla-text/MozillaText-BoldItalic.woff2 -------------------------------------------------------------------------------- /assets/fonts/mozilla-text/MozillaText-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/protocol/cce368bbafd394f4f006afcf72d1fe92ac2f354e/assets/fonts/mozilla-text/MozillaText-Italic.woff2 -------------------------------------------------------------------------------- /assets/fonts/mozilla-text/MozillaText-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/protocol/cce368bbafd394f4f006afcf72d1fe92ac2f354e/assets/fonts/mozilla-text/MozillaText-Regular.woff2 -------------------------------------------------------------------------------- /assets/fonts/mozilla-text/MozillaText-SemiBold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/protocol/cce368bbafd394f4f006afcf72d1fe92ac2f354e/assets/fonts/mozilla-text/MozillaText-SemiBold.woff2 -------------------------------------------------------------------------------- /assets/fonts/mozilla-text/MozillaText-SemiBoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla/protocol/cce368bbafd394f4f006afcf72d1fe92ac2f354e/assets/fonts/mozilla-text/MozillaText-SemiBoldItalic.woff2 -------------------------------------------------------------------------------- /assets/js/protocol/base.js: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 | 5 | /** 6 | * This module is used to determine that JS is enabled in the browser, 7 | * and provides `.js` and `.no-js` styling hooks used in component CSS. 8 | * In order to avoid content flashing and repaints on page load, it is 9 | * recommended that `MazBase.init();` should be run in the
, before 10 | * page CSS is parsed. 11 | */ 12 | 13 | const MzpBase = {}; 14 | 15 | MzpBase.init = () => { 16 | const doc = document.documentElement; 17 | 18 | // Add class to reflect javascript availability for CSS 19 | doc.className = doc.className.replace(/\bno-js\b/, 'js'); 20 | }; 21 | 22 | module.exports = MzpBase; 23 | -------------------------------------------------------------------------------- /assets/js/protocol/footer.js: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 | 5 | const MzpFooter = {}; 6 | 7 | MzpFooter.init = () => { 8 | const footerHeadings = '.mzp-c-footer-sections .mzp-c-footer-heading'; 9 | 10 | // removes Details component if screen size is big 11 | function screenChange(mq) { 12 | if (mq.matches) { 13 | window.MzpDetails.init(footerHeadings); 14 | } else { 15 | window.MzpDetails.destroy(footerHeadings); 16 | } 17 | } 18 | 19 | // check we have global Supports and Details library 20 | if (typeof window.MzpSupports !== 'undefined' && typeof window.MzpDetails !== 'undefined') { 21 | 22 | // check browser supports matchMedia 23 | if (window.MzpSupports.matchMedia) { 24 | const _mqWide = matchMedia('(max-width: 479px)'); 25 | 26 | // initialize details if screen is small 27 | if (_mqWide.matches) { 28 | window.MzpDetails.init(footerHeadings); 29 | } 30 | 31 | if (window.matchMedia('all').addEventListener) { 32 | _mqWide.addEventListener('change', screenChange, false); 33 | } else if (window.matchMedia('all').addListener) { 34 | _mqWide.addListener(screenChange); 35 | } 36 | } 37 | } 38 | 39 | }; 40 | 41 | module.exports = MzpFooter; 42 | -------------------------------------------------------------------------------- /assets/js/protocol/sidemenu.js: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 | 5 | const MzpSideMenu = {}; 6 | 7 | MzpSideMenu.init = () => { 8 | const menu = document.querySelector('.mzp-c-sidemenu'); 9 | const menuMain = document.querySelector('.mzp-c-sidemenu-main'); 10 | const menuToggle = document.querySelector('.mzp-js-toggle'); 11 | 12 | if (menu && menuMain && menuToggle) { 13 | 14 | // Make the menu more accessible 15 | menuToggle.setAttribute('tabindex', '0'); 16 | menuToggle.setAttribute('role', 'button'); 17 | menuMain.setAttribute('aria-expanded', 'false'); 18 | 19 | // Toggle the sidebar menu 20 | menuToggle.addEventListener('click', (e) => { 21 | e.preventDefault(); 22 | menu.classList.toggle('mzp-is-active'); 23 | 24 | const menuExpanded = menuMain.getAttribute('aria-expanded') === 'true' ? 'false' : 'true'; 25 | menuMain.setAttribute('aria-expanded', menuExpanded); 26 | }, false); 27 | } 28 | }; 29 | 30 | module.exports = MzpSideMenu; 31 | -------------------------------------------------------------------------------- /assets/package/README.md: -------------------------------------------------------------------------------- 1 | # Protocol 2 | 3 | A modular design system for Mozilla websites. 4 | 5 | ## Installation 6 | 7 | Install package with NPM and add it to your dependencies: 8 | 9 | `npm install --save @mozilla-protocol/core` 10 | 11 | ## Information 12 | 13 |Package | mozilla-protocol | 16 |
Description | 19 |A modular design system for Mozilla websites. | 20 |
Version | 23 |21.1.0 | 24 |
Releases | 27 |View all | 28 |