npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

topvue

v0.0.1

Published

Topui for Vue

Downloads

3

Readme

UIkit with all the power of Vue

While it is possible to use UIkit by its own when building Vue components, you may find yourself relying on too many dependencies and building a wrapper to fill the missing logic gap. Vuikit solves all that by providing native, unopinionated, components outputting UIkit layout.

Documentation and examples

There is a live demo at http://vuikit.github.io/vuikit with technical information about each component. As well as a codepen playground.

Dependencies

  • Vue (^2.0.0)
  • Moment (^2.14.1) - Only required by VkCalendar

Code Samples

Note that all code examples are using ES6 syntax

Vuikit components are registered globally by default and ready to be used immediately.

import Vue from 'vue'
import Vuikit from 'vuikit'

Vue.use(Vuikit)
<template>
  <div>
    <vk-button-checkbox>
      <vk-button color="primary">Button</vk-button>
      <vk-button active>Button</vk-button>
      <vk-button>Button</vk-button>
    </vk-button-checkbox>
  </div>
</template>

Although is possible to load and register them individually.

import Vue from 'vue'
import { Button, Modal } from 'vuikit'

// globally
Vue.component('VkButton', Button)
Vue.component('VkModal', Modal)

// or locally
new Vue({
  components: {
    VkButton: Button,
    VkModal: Modal
  }
})

Changing the output or adding specific features is straightforward by extending a component.

import Vue from 'vue'
import { Button } from 'vuikit'

Vue.component('TmButton', {
  extends: Button,
  template: '', // the new output
  props: {} // new features
  ...
})

Configuration and Usage

NPM

npm install vuikit --save
import Vue from 'vue'
import Vuikit from 'vuikit'

Vue.use(Vuikit) // or register individually

Browser

Make sure Vue is loaded upfront and then load dist/vuikit.js.

Developers

# install dependencies with Yarn (https://yarnpkg.com/)
# it's much faster and consistent
yarn install

# serve with hot reload at localhost:8080
yarn run dev

# build for distribution
yarn run build

UIkit Themes

You can use UIkit themes out of a box with few exceptions you should be aware of. For those a custom theme is required adding the following workarounds.

Modal

UIkit Modal transitions are hardcoded plus incompatible with Vue transitions. The solution is to reset those and apply new ones.

.hook-modal() {
  // reset hardcoded transitions
  display: inherit;
  opacity: inherit;
  -webkit-transform: inherit;
  transform: inherit;

  // add custom ones
  -webkit-transition: opacity .3s ease;
  transition: opacity .3s ease;
}

.hook-modal-dialog() {
  // reset hardcoded transitions
  opacity: inherit;
  -webkit-transform: inherit;
  transform: inherit;

  // add custom ones
  -webkit-transition: all .3s ease;
  transition: all .3s ease;
}

// add custom transitions
.hook-modal-misc() {
  .vk-modal-transition-enter .uk-modal-dialog {
    opacity: 0;
  }
  .vk-modal-transition-leave-active .uk-modal-dialog {
    opacity: 0;
  }
  .vk-modal-transition-enter .uk-modal-dialog,
  .vk-modal-transition-leave-active .uk-modal-dialog {
    -webkit-transform: scale(1.1);
    transform: scale(1.1);
  }
}

Dropdown

Similar as with Modal, Dropdown transition styles must be reseted.

// reset hardcoded transitions
.hook-dropdown-misc() {
  .uk-dropdown,
  .uk-dropdown-blank {
    display: inherit;
  }
}

Offcanvas

@offcanvas-transition-speed: .3s;
@offcanvas-transition-timing: ease;

.hook-offcanvas() {
  // null hardcoded transitions
  display: inherit;
  // necessary for Vue transition hooks
  transition-duration: @offcanvas-transition-speed;
}

.hook-offcanvas-bar() {
  // apply new transitions
  -webkit-transform: translateX(-100%);
  -ms-transform: translateX(-100%);
  transform: translateX(-100%);
  transition: transform @offcanvas-transition-speed @offcanvas-transition-timing;
}

.hook-offcanvas-misc() {
  .uk-offcanvas-page {
    transition: margin-left @offcanvas-transition-speed @offcanvas-transition-timing;
  }
  .uk-offcanvas-page-open .uk-offcanvas-bar,
  .uk-offcanvas-page-open .uk-offcanvas-bar {
    -webkit-transform: translateX(0%);
    -ms-transform: translateX(0%); // IE9
    transform: translateX(0%);
  }
}

Table

The VkTable component relies on Vuikit specific styling.

Semver

Until Vuikit reaches a 1.0 release, breaking changes will be released with a new minor version. For example 0.4.0 and 0.4.1 have the same API, but 0.5.0 have breaking changes.

License

Vuikit is open source and released under the MIT License.

Copyright (c) 2016 ZOOlanders.com