0.0.1 • Published 5 years ago

dta-auds v0.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

Australian Government Design System Components

The components for the Australian Government Design System.

Documentation

Full documentation at designsystem.gov.au


Visual unit tests

Production CircleCIStaging CircleCI
https://auds.service.gov.auhttps://auds.staging.service.gov.au
user: auds, pass: auds

Contents


How to use

The design system components are distributed through the npm ecosystem and can only be installed through the npm command. Npm requires node.js and the components needs node.js 8 or higher.

To install a module make sure you have a package.json file in the root of your project folders. (You can generate one by running npm init.) Inside your working folder install any module and pancake will make sure you have all assets ready to use.

Run npm install @gov.au/body to install the body module. To install several modules, chain them like:

npm install @gov.au/body @gov.au/header @gov.au/footer @gov.au/buttons

An even better experience is using Syrup. Install it globally via npm install -g @gov.au/syrup. More info coming soon.

⬆ back to top


Frequently asked questions

View our frequently asked questions page to see common questions from the community.

If you can’t find an answer to a question you have please email us at designsystem@dta.gov.au or join our conversation on slack.

⬆ back to top


Checklist and browser support

We use the below checklist to ensure new modules or updates to existing modules have a certain level of quality:

Checklist

General checks

  • Semantic HTML and non semantic test?
  • No JavaScript fallback?
  • SVG fallback, functional without SVG?
  • IE9, IE10, IE11 legacy test
  • IE8 functional test

Accessibility checks

  • Accessibility colour contrast
  • Keyboard accessible
  • Tested with screen reader
  • Accessibility expert review

CSS / Sass

  • Never nest anything that is not either an overwrite or a child element.
  • font-family and text color on elements that don’t require body
  • Using AU-space() with unit for spacing everywhere but in font-sizes; no magic numbers
  • No hardcoded colors, use $AU-color- or $AU-colordark- vars.
  • Sass focus mixin AU-focus() or AU-focus( 'dark' )
  • Using AU-fontgrid() for font-size and line-height to snap typography to the grid.
  • Print style sheets

JavaScript

  • var AU = AU || {}; in top?
  • Each module has it’s own name-space prefixed with AU e.g.: AU.modulename.function1, AU.modulename.function2
  • Keep public API small, use private functions where you can
  • Export out private function for tests only if( typeof module !== 'undefined' )
  • Export entire module in the end: if( typeof module !== 'undefined' ) { module.exports = AU; } so react can use it.
  • Provide sane defaults for parameters where you can
  • Add jest unit tests where you can
  • Document public API in the readme.

package.json

  • dependencies - peerDependencies check
  • Delete/enable js object and settings for pancake plugins

Browser support

All components have to work on the below browsers:

BrowserVersionPlatformEngine
Internet Explorer8Windows 7Trident
Internet Explorer9Windows 7Trident
Internet Explorer10Windows 7Trident
Internet Explorer11Windows 8.1Trident
EdgeLatestWindows 10EdgeHTML
FirefoxLatestOS XGecko
FirefoxLatestWindows 10Gecko
FirefoxLatestAndroid 6Gecko
ChromeLatestOS XBlink
ChromeLatestWindows 10Blink
ChromeLatestAndroid 4.0Blink
ChromeLatestAndroid 6Blink
SafariLatest (11)OS XWebKit
SafariLatest - 1 ( 10 )iOSWebKit
SamsungG S8
SamsungG S7
SamsungG S6
Chromepixel 7.1
Native browserLumia 930 8.1
Chome +1
Safari +1
Firefox +1

⬆ back to top


Modules


├─ animate
└─ core


└─ core

├─ core
└─ link-list
   ├─ core
   └─ body
      └─ core

└─ core

└─ core

└─ core

└─ core

└─ core

└─ core

└─ core

└─ core

└─ core

└─ core

├─ core
└─ link-list
   ├─ core
   └─ body
      └─ core

├─ core
└─ link-list
   ├─ core
   └─ body
      └─ core

├─ core
└─ body
   └─ core

├─ core
├─ animate
└─ link-list
   ├─ core
   └─ body
      └─ core

├─ core
└─ body
   └─ core

└─ core

└─ core

└─ core

├─ core
├─ animate
├─ accordion
│  ├─ animate
│  └─ core
└─ link-list
   ├─ core
   └─ body
      └─ core

└─ core

└─ core

└─ core

└─ core

⬆ back to top


Tests

Visual tests have been built into each module and can be seen in either of the README.md files of each module or in the listing above. We have also integrated pa11y for accessibility testing and are using jest for javascript tests.

Run all tests with the npm test script:

npm run test

⬆ back to top


License

Copyright (c) Commonwealth of Australia. Licensed under MIT.

⬆ back to top

};

0.0.1

5 years ago