mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-24 11:29:30 +08:00
@@ -0,0 +1,2 @@
|
||||
tsconfig.json
|
||||
.idea/
|
||||
@@ -0,0 +1,88 @@
|
||||
# UIkit
|
||||
|
||||
UIkit is a lightweight and modular front-end framework for developing fast and powerful web interfaces.
|
||||
|
||||
* [Homepage](http://getuikit.com) - Learn more about UIkit
|
||||
* [@getuikit](https://twitter.com/getuikit) - Get the latest buzz on Twitter
|
||||
* [Google+ Community](https://plus.google.com/communities/114238665434626719878) - Share news and latest work
|
||||
|
||||
Join our developer chat. We are online every work day between 8:00 and 18:00 UTC
|
||||
|
||||
[](https://gitter.im/uikit/uikit)
|
||||
|
||||
## Getting started
|
||||
|
||||
You have following options to get UIkit:
|
||||
|
||||
- Download the [latest release](https://github.com/uikit/uikit/releases/latest)
|
||||
- Clone the repo, `git clone git://github.com/uikit/uikit.git`.
|
||||
- Install with [Bower](http://bower.io): ```bower install uikit```
|
||||
|
||||
You find the compiled UIkit distribution in its own [repo](https://github.com/uikit/bower-uikit).
|
||||
|
||||
## Developers
|
||||
|
||||
First of all, install [Node](http://nodejs.org/). We use [Gulp](http://gulpjs.com) to build UIkit. If you haven't used Gulp before, you need to install the `gulp` package as a global install.
|
||||
|
||||
```
|
||||
npm install --global gulp
|
||||
```
|
||||
|
||||
If you haven't done so already, clone the UIkit git repo.
|
||||
|
||||
```
|
||||
git clone git://github.com/uikit/uikit.git
|
||||
```
|
||||
Install the Node dependencies.
|
||||
|
||||
```
|
||||
cd uikit
|
||||
npm install
|
||||
```
|
||||
|
||||
Run `gulp` to lint, build and minify the release.
|
||||
|
||||
```
|
||||
gulp [-t themename]
|
||||
```
|
||||
|
||||
The built version of UIkit will be put in the `/dist` subdirectory. Pass a theme name parameter to only build the specified theme.
|
||||
|
||||
### Browsersync
|
||||
|
||||
```
|
||||
gulp sync
|
||||
```
|
||||
|
||||
After running `gulp sync` a new browser instance will open, pointing to the uikit folder - `http://localhost:3000/`. The browser window will reload anytime you modify a source file.
|
||||
|
||||
### Custom prefix
|
||||
|
||||
Run gulp with your own prefix parameter ```-p``` to have all classes and JavaScript files custom prefixed.
|
||||
|
||||
```
|
||||
gulp -p myprefix
|
||||
```
|
||||
|
||||
|
||||
## Contributing
|
||||
|
||||
UIkit follows the [GitFlow branching model](http://nvie.com/posts/a-successful-git-branching-model). The ```master``` branch always reflects a production-ready state while the latest development is taking place in the ```develop``` branch.
|
||||
|
||||
Each time you want to work on a fix or a new feature, create a new branch based on the ```develop``` branch: ```git checkout -b BRANCH_NAME develop```. Only pull requests to the ```develop``` branch will be merged.
|
||||
|
||||
## Versioning
|
||||
|
||||
UIkit is maintained by using the [Semantic Versioning Specification (SemVer)](http://semver.org).
|
||||
|
||||
## Browser Support
|
||||
|
||||
 |  |  |  | 
|
||||
--- | --- | --- | --- | --- |
|
||||
Latest ✔ | Latest ✔ | 9+ ✔ | 7.1+ ✔ | Latest ✔ |
|
||||
|
||||
Tested with [BrowserStack](https://www.browserstack.com) (thanks for sponsoring!).
|
||||
|
||||
## Copyright and License
|
||||
|
||||
Copyright [YOOtheme](http://www.yootheme.com) GmbH under the [MIT license](LICENSE.md).
|
||||
@@ -0,0 +1,186 @@
|
||||
/// <reference path="uikit.d.ts" />
|
||||
|
||||
function testModal() {
|
||||
UIkit.modal.alert("Attention!");
|
||||
UIkit.modal.confirm("Are you sure?", function () {
|
||||
// will be executed on confirm.
|
||||
});
|
||||
UIkit.modal.prompt("Name:", 'value', function (newvalue:string) {
|
||||
// will be executed on submit.
|
||||
});
|
||||
var modal = UIkit.modal.blockUI("Any content...");
|
||||
modal.hide();
|
||||
modal.show();
|
||||
var modal = UIkit.modal(".modalSelector");
|
||||
|
||||
if (modal.isActive()) {
|
||||
modal.hide();
|
||||
} else {
|
||||
modal.show();
|
||||
}
|
||||
}
|
||||
|
||||
function testOffCanvas() {
|
||||
UIkit.offcanvas.show("#id");
|
||||
UIkit.offcanvas.hide();
|
||||
UIkit.offcanvas.hide(true);
|
||||
}
|
||||
|
||||
function testLightBox() {
|
||||
var element = "#group";
|
||||
var lightbox = UIkit.lightbox(element, {/* options */});
|
||||
var lightbox2 = UIkit.lightbox.create([
|
||||
{source: 'http://url/to/video.mp4', 'type': 'video'},
|
||||
{'source': 'http://url/to/image.jpg', 'type': 'image'}
|
||||
]);
|
||||
lightbox2.show();
|
||||
var lightbox3 = UIkit.lightbox(element)
|
||||
}
|
||||
|
||||
function testAutoComplete() {
|
||||
UIkit.autocomplete("#group", {});
|
||||
UIkit.autocomplete("#group");
|
||||
}
|
||||
|
||||
function testDatepicker() {
|
||||
var datepicker = UIkit.datepicker("#element", {});
|
||||
}
|
||||
|
||||
function testHtmlEditor() {
|
||||
var htmleditor = UIkit.htmleditor("textarea", {/* options */});
|
||||
}
|
||||
|
||||
function testSlider() {
|
||||
var slider = UIkit.slider("element", {})
|
||||
}
|
||||
function testSlideSet() {
|
||||
var slideset = UIkit.slideset("element", {})
|
||||
}
|
||||
function testSlideShow() {
|
||||
var slideshow = UIkit.slideshow("element", {})
|
||||
}
|
||||
|
||||
function testParallax() {
|
||||
var parallax = UIkit.parallax("element", {})
|
||||
}
|
||||
function testAccordion() {
|
||||
var accordion = UIkit.accordion("element", {})
|
||||
}
|
||||
|
||||
|
||||
function testNotify() {
|
||||
UIkit.notify({
|
||||
message: 'Bazinga!',
|
||||
status: 'info',
|
||||
timeout: 5000,
|
||||
pos: 'top-center'
|
||||
});
|
||||
|
||||
|
||||
// Shortcuts
|
||||
UIkit.notify('My message');
|
||||
UIkit.notify('My message', status);
|
||||
UIkit.notify('My message', {/* options */});
|
||||
|
||||
UIkit.notify("Message...", {timeout: 0});
|
||||
UIkit.notify("...", {pos: 'top-center'});
|
||||
UIkit.notify("...", {status: 'info'});
|
||||
}
|
||||
|
||||
|
||||
function testSearch() {
|
||||
var search = UIkit.search("element", {})
|
||||
}
|
||||
|
||||
function testNestable() {
|
||||
var nestable = UIkit.nestable('element', {});
|
||||
}
|
||||
function testSortable() {
|
||||
var sortable = UIkit.sortable('element', {});
|
||||
}
|
||||
function testStick() {
|
||||
var sticky = UIkit.sticky('element', {});
|
||||
}
|
||||
function testTimePicker() {
|
||||
var timepicker = UIkit.timepicker('element', {})
|
||||
}
|
||||
|
||||
function testTooltip() {
|
||||
var tooltip = UIkit.tooltip('element', {})
|
||||
}
|
||||
|
||||
function testUpload() {
|
||||
$(function(){
|
||||
|
||||
var progressbar = $("#progressbar"),
|
||||
bar = progressbar.find('.uk-progress-bar'),
|
||||
settings = {
|
||||
|
||||
action: '/', // upload url
|
||||
|
||||
allow : '*.(jpg|jpeg|gif|png)', // allow only images
|
||||
|
||||
loadstart: function() {
|
||||
bar.css("width", "0%").text("0%");
|
||||
progressbar.removeClass("uk-hidden");
|
||||
},
|
||||
|
||||
progress: function(percent: number) {
|
||||
percent = Math.ceil(percent);
|
||||
bar.css("width", percent+"%").text(percent+"%");
|
||||
},
|
||||
|
||||
allcomplete: function(response: any) {
|
||||
|
||||
bar.css("width", "100%").text("100%");
|
||||
|
||||
setTimeout(function(){
|
||||
progressbar.addClass("uk-hidden");
|
||||
}, 250);
|
||||
|
||||
alert("Upload Completed")
|
||||
}
|
||||
};
|
||||
|
||||
var select = UIkit.uploadSelect($("#upload-select"), settings),
|
||||
drop = UIkit.uploadDrop($("#upload-drop"), settings);
|
||||
});
|
||||
|
||||
// Test with object literal
|
||||
var select2 = UIkit.uploadSelect($("#upload-select"), {
|
||||
|
||||
action: '/', // upload url
|
||||
|
||||
allow: '*.(jpg|jpeg|gif|png)', // allow only images
|
||||
|
||||
loadstart: function () {
|
||||
|
||||
},
|
||||
|
||||
progress: function (percent:number) {
|
||||
|
||||
},
|
||||
|
||||
allcomplete: function (response:any) {
|
||||
|
||||
}
|
||||
});
|
||||
var drop2 = UIkit.uploadDrop($("#upload-drop"), {
|
||||
|
||||
action: '/', // upload url
|
||||
|
||||
allow: '*.(jpg|jpeg|gif|png)', // allow only images
|
||||
|
||||
loadstart: function () {
|
||||
|
||||
},
|
||||
|
||||
progress: function (percent:number) {
|
||||
|
||||
},
|
||||
|
||||
allcomplete: function (response:any) {
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
Vendored
+1443
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user