├── .bithoundrc ├── .gitignore ├── .npmignore ├── CREDITS.md ├── LICENSE.txt ├── README.md ├── TODO.md ├── UPGRADING.md ├── bower.json ├── demo ├── agent.html ├── aristo.html ├── default.html └── jeans.html ├── dev ├── build.sh ├── docker │ └── scripts │ │ └── builder │ │ └── Dockerfile └── theme-kit │ ├── README.md │ ├── bg-input-focus.png │ ├── bg-input.png │ ├── identification.png │ └── sprite.psd ├── dist ├── css │ ├── agent.css │ ├── aristo.css │ ├── default.css │ └── jeans.css ├── images │ ├── agent │ │ ├── bg-input-agent.png │ │ ├── bg-input-focus-agent.png │ │ └── sprite-agent.png │ ├── aristo │ │ ├── bg-input-aristo.png │ │ ├── bg-input-focus-aristo.png │ │ └── sprite-aristo.png │ ├── default │ │ ├── bg-input-focus.png │ │ ├── bg-input.png │ │ └── sprite.png │ └── jeans │ │ ├── bg-input-focus-jeans.png │ │ ├── bg-input-focus-retina-jeans.png │ │ ├── bg-input-jeans.png │ │ ├── bg-input-retina-jeans.png │ │ ├── sprite-jeans.png │ │ └── sprite-retina-jeans.png └── js │ ├── jquery.uniform.bundled.js │ └── jquery.uniform.standalone.js ├── docker-compose.yml ├── gulpfile.js ├── package.json └── src ├── images ├── agent │ ├── bg-input-agent.png │ ├── bg-input-focus-agent.png │ └── sprite-agent.png ├── aristo │ ├── bg-input-aristo.png │ ├── bg-input-focus-aristo.png │ └── sprite-aristo.png ├── default │ ├── bg-input-focus.png │ ├── bg-input.png │ └── sprite.png └── jeans │ ├── bg-input-focus-jeans.png │ ├── bg-input-focus-retina-jeans.png │ ├── bg-input-jeans.png │ ├── bg-input-retina-jeans.png │ ├── sprite-jeans.png │ └── sprite-retina-jeans.png ├── js └── jquery.uniform.js └── scss ├── _base.scss ├── agent.scss ├── aristo.scss ├── default.scss └── jeans.scss /.bithoundrc: -------------------------------------------------------------------------------- 1 | { 2 | "ignore": [ 3 | "**/demo/**", 4 | "**/dist/**" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .* 2 | !.bithoundrc 3 | !.git* 4 | !.npmignore 5 | /node_modules 6 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | demo/ 2 | dev/ 3 | -------------------------------------------------------------------------------- /CREDITS.md: -------------------------------------------------------------------------------- 1 | # Contributors 2 | 3 | Much thanks to Thomas Reynolds and Buck Wilson for their help and advice on this. 4 | 5 | Disabling text selection is made possible by Mathias Bynens and his noSelect plugin, , which is embedded. 6 | 7 | Tyler Akins (@fidian) has also rewritten chunks of the plugin, helped close many issues, and ensured version 2 got out the door. 8 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # (jQuery) Uniform 2 | 3 | > A jQuery plugin to make your form controls look how you want them to. Now with HTML-5 attributes! 4 | 5 | Works well with jQuery 1.6+, but we've received patches and heard that this works with jQuery 1.3. 6 | 7 | Version 4.3.x uses jQuery 3.3.1+ and so far, things look promising. 8 | 9 | [![NPM](https://img.shields.io/npm/v/@imanov/jquery.uniform.svg?maxAge=2592000?style=plastic)](https://www.npmjs.com/package/@imanov/jquery.uniform) 10 | [![Total Downloads](https://img.shields.io/github/downloads/AudithSoftworks/Uniform/total.svg?maxAge=2592000?style=plastic)](https://github.com/AudithSoftworks/Uniform) 11 | [![Contributors](https://img.shields.io/github/contributors/AudithSoftworks/Uniform.svg?maxAge=2592000?style=plastic)](https://github.com/AudithSoftworks/Uniform) 12 | [![License](https://img.shields.io/github/license/AudithSoftworks/Uniform.svg?maxAge=2592000?style=plastic)](https://github.com/AudithSoftworks/Uniform/blob/master/LICENSE.txt) 13 | 14 | ## Installation 15 | 16 | Packaging of Uniform comes with source SASS files and minified CSS files, ready for consumption in live/production environment. You can install Uniform via one of two methods listed below: 17 | 18 | ### Via NPM 19 | 20 | [![NPM Monthly Downloads](https://img.shields.io/npm/dm/jquery.uniform.svg)](https://www.npmjs.com/package/jquery.uniform) 21 | [![NPM Total Downloads](https://img.shields.io/npm/dt/jquery.uniform.svg)](https://www.npmjs.com/package/jquery.uniform) 22 | 23 | Simply run: 24 | 25 | npm install --save @imanov/jquery.uniform 26 | 27 | To create minified file, run (though this isn't necessary, as the minified file is already included in the package): 28 | 29 | npm run build 30 | 31 | Minified source file will be built inside ```dist/``` folder. 32 | 33 | ### Via Public CDN 34 | 35 | [![CDNJS](https://img.shields.io/cdnjs/v/Uniform.js.svg?maxAge=2592000?style=plastic)](https://cdnjs.com/libraries/Uniform.js) 36 | [![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/jquery.uniform/badge?style=rounded)](https://www.jsdelivr.com/package/npm/jquery.uniform) 37 | 38 | ### Un-minified CSS files 39 | 40 | For your own development purposes, to get human-readable, un-minified CSS outputs, you will need to install Uniform via NPM (as shown above), install the necessary dependencies through ```npm install``` and then run ```gulp```. Doing so will recreate readable CSS files in ```dist/css``` folder. Invoking ```gulp --production``` however, will recreate minified CSS files (which is default behavior, what we already have in the ```dist``` folder). 41 | 42 | 43 | ## Implementation 44 | 45 | There are two ways to go with this: 46 | 47 | ### Basic Implementation 48 | 49 | Basically, you can use the final assets provided in ```dist``` folder out of the box. 50 | 51 | Stylesheets and Javascript files should be linked in the ```
``` of your markup (the latter, coming after jQuery): 52 | 53 | 54 | 55 | 56 | 57 | 58 | Or if you are using our bundled version - ```jquery.uniform.bundled.js``` file - which already comes with jQuery (beware not to include jQuery twice): 59 | 60 | 61 | 62 | 63 | 64 | ### Advanced Implementation 65 | 66 | To have more control over your web assets, you can directly work with our SCSS and JS files, by importing them into or bundling with your own assets. Please be advised that our Gulp configuration (via Laravel-Elixir package) includes Auto-prefixer, i.e. browser prefixes are automatically added to CSS during the post-processing of SCSS files. Whatever your post-processing solution will be (Gulp-based or Compass), you need to make sure to include Auto-prefixer in that workflow. Our SCSS source files do not include browser prefixes out of the box! 67 | 68 | 69 | ## Usage 70 | 71 | See our Wiki page for documentation. 72 | 73 | 74 | ## Reporting Bugs 75 | 76 | It sure would be handy if you could create a test page to help illustrate bugs. When you use the GitHub Issue Tracker, you could use [this jsfiddle](https://jsfiddle.net/Shehi/qgLwy8Ln/) to help illustrate your point. Additionally, we have provided some demo pages in ```/demo``` folder for you to use. 77 | 78 | Even if you don't use these assets, all sorts of feedback is welcome, but narrowing down your problem or providing an example would immediately help narrow down the problem quickly. 79 | 80 | ## Contributor/Developer Assets 81 | 82 | We have created a Docker container to help our contributors with development of Uniform. 83 | 84 | [![](https://img.shields.io/docker/automated/audithsoftworks/uniform.svg)](https://microbadger.com/images/audithsoftworks/uniform "Docker Hub public images") 85 | [![](https://images.microbadger.com/badges/version/audithsoftworks/uniform.svg)](https://microbadger.com/images/audithsoftworks/uniform "Docker Hub public images") 86 | [![](https://images.microbadger.com/badges/image/audithsoftworks/uniform.svg)](https://microbadger.com/images/audithsoftworks/uniform "Docker Hub public images layers") 87 | [![](https://img.shields.io/docker/pulls/audithsoftworks/uniform.svg)](https://microbadger.com/images/audithsoftworks/uniform "Docker Hub public images") 88 | 89 | Additionally, ```/dev``` folder contains following assets, to further enhance our capabilities: 90 | 91 | 1. ```docker``` folder contains necessary ```Dockerfile``` to build the container. 92 | 2. ```theme-kit``` contains assets to help you create new themes. 93 | 3. ```build.sh``` script, which basically spins a Docker container up and builds the package, using that instance. 94 | -------------------------------------------------------------------------------- /TODO.md: -------------------------------------------------------------------------------- 1 | - [ ] Enhance demo page to show all sorts of edge cases, like when bugs were found. shidec has IE7 fixes with uniformed 'a' elements, which might be needed if they are still broken. 2 | - [ ] Add tests. szaboat added Jasmine tests. May wish to be more thorough? Not browser based? 3 | - [ ] IE8 issue when file button was moved to the left side? See https://github.com/kamilogorek/uniform/commit/d71e77f997e033e69fe0070f06428f8318cd9324 4 | - [ ] See if selects of various heights work in webkit https://github.com/AdrianGyuricska/uniform/commit/1fca129d7de2e5812f172f6f7b96a9df7c55a063 5 | -------------------------------------------------------------------------------- /UPGRADING.md: -------------------------------------------------------------------------------- 1 | # Upgrading To 2.0 And Later 2 | 3 | Your sprite map will now support many new things and will need to be updated. If you use custom backgrounds that are not in the sprite map, those will need updating as well. 4 | 5 | The uniform.options object was renamed to uniform.defaults since they are the default options. Other properties were renamed to be consistent or have less ambiguous names, such as `fileBtnClass` becoming `fileButtonClass`. 6 | 7 | Previously, calls to update() would render all elements with the most recent set of options. This has been fixed, but may change how your page looks. Test to make sure things still render as expected. 8 | 9 | $.uniform.noSelect is no longer exposed and has been updated to version 1.0.3. 10 | 11 | $.uniform.restore() does not need to be global; you now can use $('#myId').uniform.restore() instead to just restore some elements. Same thing for updates. 12 | 13 | The sprite changed a bit. The caps for select lists were moved to the left-hand side. Button theming was added and the file upload images were reordered to match the select list order. See the theme-kit/README.md file for further reading on this topic. 14 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery.uniform", 3 | "description": "A jQuery plugin to make your form controls look how you want them to. Now with HTML-5 attributes!", 4 | "homepage": "http://opensource.audith.org/uniform", 5 | "main": [ 6 | "dist/js/jquery.uniform.standalone.js" 7 | ], 8 | "dependencies": { 9 | "jquery": "^1.6" 10 | }, 11 | "moduleType": [ 12 | "globals" 13 | ], 14 | "keywords": [ 15 | "custom form controls", 16 | "uniform", 17 | "jquery" 18 | ], 19 | "authors": [ 20 | "Shahriyar Imanov ", 21 | "Josh Pyles ", 22 | "Tyler Akins " 23 | ], 24 | "license": "MIT", 25 | "repository": { 26 | "type": "git", 27 | "url": "https://github.com/AudithSoftworks/Uniform" 28 | }, 29 | "ignore": [ 30 | "**/.*", 31 | "node_modules", 32 | "bower_components" 33 | ] 34 | } 35 | -------------------------------------------------------------------------------- /demo/agent.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 26 | 27 | 28 | 35 | 36 | 37 |

Uniform: Agent theme

38 |
39 |
40 | 41 | 48 |
49 |
50 | 51 | 52 |
53 |
54 | 55 | 56 |
57 |
58 | 59 | 60 |
61 |
62 | 63 | 64 |
65 |
66 | 67 |
68 |
69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 |
84 |
85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 |
100 |
101 | Button 102 | 103 | 104 | 105 | 106 |
107 |
108 | 109 | 110 | -------------------------------------------------------------------------------- /demo/aristo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 26 | 27 | 28 | 35 | 36 | 37 |

Uniform: Aristo theme

38 |
39 |
40 | 41 | 48 |
49 |
50 | 51 | 52 |
53 |
54 | 55 | 56 |
57 |
58 | 59 | 60 |
61 |
62 | 63 | 64 |
65 |
66 | 67 |
68 |
69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 |
84 |
85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 |
100 |
101 | Button 102 | 103 | 104 | 105 | 106 |
107 |
108 | 109 | 110 | -------------------------------------------------------------------------------- /demo/default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 26 | 27 | 28 | 35 | 36 | 37 |

Uniform: Default theme

38 |
39 |
40 | 41 | 48 |
49 |
50 | 51 | 52 |
53 |
54 | 55 | 56 |
57 |
58 | 59 | 60 |
61 |
62 | 63 | 64 |
65 |
66 | 67 |
68 |
69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 |
84 |
85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 |
100 |
101 | Button 102 | 103 | 104 | 105 | 106 |
107 |
108 | 109 | 110 | -------------------------------------------------------------------------------- /demo/jeans.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 26 | 27 | 28 | 35 | 36 | 37 |

Uniform: Jeans theme

38 |
39 |
40 | 41 | 48 |
49 |
50 | 51 | 52 |
53 |
54 | 55 | 56 |
57 |
58 | 59 | 60 |
61 |
62 | 63 | 64 |
65 |
66 | 67 |
68 |
69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 |
84 |
85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 |
100 |
101 | Button 102 | 103 | 104 | 105 | 106 |
107 |
108 | 109 | 110 | -------------------------------------------------------------------------------- /dev/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | docker build -f dev/docker/scripts/builder/Dockerfile -t audithsoftworks/uniform . 4 | 5 | docker-compose up -d; 6 | docker-compose ps; 7 | 8 | docker exec uniform_builder_1 /bin/bash -c " 9 | npm install; 10 | optipng ./dist/images/agent/*.png; 11 | optipng ./dist/images/aristo/*.png; 12 | optipng ./dist/images/default/*.png; 13 | optipng ./dist/images/jeans/*.png; 14 | gulp; 15 | "; 16 | -------------------------------------------------------------------------------- /dev/docker/scripts/builder/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:cosmic 2 | MAINTAINER Shahriyar Imanov 3 | 4 | WORKDIR /home/audith 5 | 6 | ENV DEBIAN_FRONTEND noninteractive 7 | 8 | # Install dependencies 9 | RUN apt-get update -y && apt-get install -y apt-utils && apt-get upgrade -y 10 | RUN apt-get install -y \ 11 | build-essential \ 12 | curl \ 13 | optipng \ 14 | python \ 15 | telnet \ 16 | && apt-get clean \ 17 | && apt-get autoremove -y 18 | 19 | RUN set -ex \ 20 | && for key in \ 21 | 94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \ 22 | FD3A5288F042B6850C66B31F09FE44734EB7990E \ 23 | 71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 \ 24 | DD8F2338BAE7501E3DD5AC78C273792F7D83545D \ 25 | C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \ 26 | B9AE9905FFD7803F25714661B63B535A4C206CA9 \ 27 | 77984A986EBC2AA786BC0F66B01FBB92821C587A \ 28 | 8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 \ 29 | 4ED778F539E3634C779C87C6D7062848A1AB005C \ 30 | A48C2BEE680E841632CD4E44F07496B3EB3C1762 \ 31 | B9E2F5981AA6E0CD28160D9FF13993A75599653C \ 32 | ; do \ 33 | gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \ 34 | gpg --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \ 35 | gpg --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key"; \ 36 | done 37 | 38 | ENV NPM_CONFIG_LOGLEVEL info 39 | ENV NODE_VERSION 10.15.0 40 | ENV NPM_VERSION 6 41 | 42 | RUN curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.xz" \ 43 | && curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \ 44 | && gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \ 45 | && grep " node-v$NODE_VERSION-linux-x64.tar.xz\$" SHASUMS256.txt | sha256sum -c - \ 46 | && tar -xJf "node-v$NODE_VERSION-linux-x64.tar.xz" -C /usr/local --strip-components=1 \ 47 | && rm "node-v$NODE_VERSION-linux-x64.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \ 48 | && ln -s /usr/local/bin/node /usr/local/bin/nodejs \ 49 | && npm install -g npm@$NPM_VERSION \ 50 | && rm -rf /tmp/npm-* 51 | 52 | # Install Node global dependencies 53 | RUN npm install -g gulp 54 | -------------------------------------------------------------------------------- /dev/theme-kit/README.md: -------------------------------------------------------------------------------- 1 | Uniform Theme Kit 2 | ================= 3 | 4 | Welcome! I'm happy you are here. You're interested in making your own theme that works with Uniform and you've come to the right place. 5 | 6 | 7 | Sprite Image Layout 8 | ------------------- 9 | 10 | A big chunk of theming is just getting the sprite image set up for use with Uniform. It depends on having the images laid out in a specific way and that you follow a few rules: 11 | 12 | 1. You can change the size of the images, but you must make all of the images of a particular class match in height. For example, that means all of your `