Giter VIP home page Giter VIP logo

pattern-library's Introduction


⚠️ DEPRECATION NOTICE ⚠️

This repo is deprecated. Please go to https://github.com/dequelabs/cauldron

Pattern Library CircleCI

Installation

NPM

$ npm install deque-pattern-library

Bower

$ bower install deque-pattern-library

CDN

Thanks to unpkg, you can link directly to deque pattern library files.

<link rel="stylesheet" href="https://unpkg.com/deque-pattern-library/dist/css/pattern-library.min.css" />
<!-- or -->
<link rel="stylesheet" href="https://unpkg.com/deque-pattern-library/dist/css/pattern-library.css" />
<script src="https://unpkg.com/deque-pattern-library/dist/js/pattern-library.min.js"></script>
<!-- or -->
<script src="https://unpkg.com/deque-pattern-library/dist/js/pattern-library.js"></script>

Fonts

Including font awesome (v4)

The pattern library relies on font awesome meaning including it is required.

CDN

You can include it using a CDN (see font awesome getting started docs)

npm

$ npm install font-awesome --save

Including Roboto

The patterns look best when the roboto font is available.

CDN

You can include it using a CDN, like so:

<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700">

npm

install it:

$ npm install typeface-roboto --save

include it (in your entry-point):

import 'typeface-roboto';

Usage

Just drop the css and js into your page:

<html>
  <head>
    ...
    <link rel="stylesheet" href="./node_modules/deque-pattern-library/dist/css/pattern-library.min.css" />
  </head>
  <body>
    ...
    <script src="./node_modules/deque-pattern-library/dist/js/pattern-library.min.js"></script>
  </body>
</html>

What is included?

  • css
    • pattern-library.css
    • pattern-library.min.css
  • js
    • pattern-library.js
    • pattern-library.min.js
  • less
    • variables.less: All of the pattern library's colors and mixins

Getting started

Please refer to the wiki

Adding new components/composites

All additions must be approved by our UX team so before working on anything, please create an Issue including a detailed description on the requested pattern and several use cases for it.

Development

  • npm install
  • npm run build or for development - npm run dev which will rebuild when files are changed

NOTE: if a new component or composite is added, remember to create a quick wiki entry explaining what is absolutely necessary in using this widget.

Testing

Testing is done using mochify along with the 'chai' assertion library (assert.isFalse(!!0)). The test/ directory structure matches the lib/ directory. This means that if you're testing lib/components/foo/index.js, you would create a test in test/components/foo/index.js. See the test/ directory for examples. The tests are browserified and transpiled before running in the phantomjs headless browser so you can require / import stuff and use ES6 syntax in the tests.

$ npm test

or to have a watcher re-run tests every time you add a new test:

$ npm run test:dev

Debugging

The pattern library uses the debug module. To turn all debugging on, execute: localStorage.debug = 'dqpl:*' and refresh the page. The directory structure of lib is used as the debug naming convention. For example, to specifically debug the "selects" component, execute: localStorage.debug = 'dqpl:components:selects'.

pattern-library's People

Contributors

autosponge avatar iandotkelly avatar mariolo1985 avatar roman-bytes avatar schne324 avatar scurker avatar stephenmathieson avatar svinkle avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.