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

vue-ios

v0.1.0

Published

iOS Style components library for Vue.js

Downloads

17

Readme

:sparkles: Usage

npm install vue-ios
  • Preview
<template>
  <!-- App.vue -->
  <iApp
    :defaultSubView="'sub-1'"
  >
    <template v-slot:headerLeft>
      <iButton>L</iButton>
    </template>
    <template v-slot:headerRight>
      <iButton>R</iButton>
    </template>
    <template v-slot:largeHeader>
      <iSearchField
        :width="'100%'"
        :maxlength="'15'"
        v-model="textValue"
      />
    </template>
    <template v-slot:main="{ pushView }">
      <Main
        :alert="showAlert"
        @onPushView="pushView"
        @onAlert="onAlert"
        v-if="isMain"
      />
    </template>
    <template v-slot:sub="{ isActive }">
      <Sub1 v-show="isActive('sub-1')" :key="1"/>
      <Sub2 v-show="isActive('sub-2')" :key="2"/>
    </template>
    <template v-slot:alert>
      <iAlert
        :title="'iAlert'"
        @close="showAlert = false"
        v-show="showAlert"
      >
        <template v-slot:body>{{ textValue }}</template>
        <template v-slot:footer>
          <div>
            <iButton bold="true" @click="showAlert = false">Cancel</iButton>
            <iButton @click="showAlert = false">Ok</iButton>
          </div>
        </template>
      </iAlert>
    </template>
  </iApp>
</template>

<script>
import {
  iApp,
  iAlert,
  iButton,
  iSearchField
} from 'vue-ios'

import Main from './Main.vue'
import Sub1 from './Sub1.vue'
import Sub2 from './Sub2.vue'

export default {
  name: 'app',
  components: {
    iApp,
    iAlert,
    iButton,
    iSearchField,
    Main,
    Sub1,
    Sub2
  },
  data () {
    return {
      textValue: 'Hello, world!',
      showAlert: false
    }
  },
  methods: {
    onAlert ($event) {
      this.showAlert = $event
    }
  }
}
</script>
<template>
  <!-- Main.vue -->
  <iView>
    <iTable :title="tableTitle">
      <iTableItem>
        <iLabel class="left">Switch {{ switchValue ? 'On' : 'Off' }}</iLabel>
        <iSwitch class="right" v-model="switchValue"/>
      </iTableItem>
      <iTableItem>
        <iButton class="left" @click="count++">Click me</iButton>
        <iLabel class="right">{{ count }}</iLabel>
      </iTableItem>
      <iTableItem>
        <iLabel class="left">{{ textValue || 'No text' }}</iLabel>
      </iTableItem>
      <iTableItem>
        <iLabel class="left">Vue.js</iLabel>
      </iTableItem>
      <iTableItem>
        <iLabel class="center">Vue.js</iLabel>
      </iTableItem>
      <iTableItem>
        <iLabel class="right">Vue.js</iLabel>
      </iTableItem>
      <iTableItem>
        <iLabel class="left">Vue.js</iLabel>
        <iLabel class="right">Vue.js</iLabel>
      </iTableItem>
      <iTableItem>
        <iLabel class="left">Vue.js</iLabel>
        <iLabel class="center">Vue.js</iLabel>
        <iLabel class="right">Vue.js</iLabel>
      </iTableItem>
    </iTable>
    <iTable :title="'Register'">
      <iTableItem>
        <iTextField
          width="100%"
          maxlength="15"
          placeholder="Name"
          v-model="idValue"
        />
      </iTableItem>
      <iTableItem>
        <iTextField
          width="100%"
          maxlength="15"
          type="password"
          placeholder="Password"
          v-model="passwordValue"
        />
      </iTableItem>
      <iTableItem>
        <h2>ID: {{ idValue }}</h2>
      </iTableItem>
      <iTableItem>
        <h2>Password: {{ passwordValue }}</h2>
      </iTableItem>
    </iTable>
  </iView>
</template>

<script>
import {
  iButton,
  iLabel,
  iSwitch,
  iTable,
  iTableItem,
  iTextField,
  iView
} from 'ios-vue'

export default {
  name: 'app',
  props: {
    alert: {
      type: Boolean
    }
  },
  data () {
    return {
      appTitle: 'iOS Vue',
      largeTitle: 'iOS Vue',
      textValue: 'Hello, world!',
      tableTitle: 'iTable',
      switchValue: false,
      idValue: '',
      passwordValue: '',
      count: 0
    }
  },
  components: {
    iButton,
    iLabel,
    iSwitch,
    iTable,
    iTableItem,
    iTextField,
    iView
  },
  watch: {
    alert (newVal) {
      this.switchValue = newVal
    },
    switchValue (newVal) {
      this.$emit('onPushView', 'sub-' + (!newVal ? '1' : '2'))
      this.$emit('onAlert', newVal)
    }
  },
  created () {
    this.switchValue = this.alert
  }
}
</script>
<template>
  <!-- Sub1.vue, Sub2.vue -->
  <iView>
    <!-- Sub 1, Sub 2 -->
    <iTable :title="'Sub 1'">
      <iTableItem>
        <iLabel class="left">Switch {{ switchValue ? 'On' : 'Off' }}</iLabel>
        <iSwitch class="right" v-model="switchValue"/>
      </iTableItem>
      <iTableItem>
        <iLabel class="left">This is sub1 view!!</iLabel>
      </iTableItem>
    </iTable>
  </iView>
</template>

<script>
import {
  iLabel,
  iSwitch,
  iTable,
  iTableItem,
  iView
} from 'vue-ios'

export default {
  name: 'sub-1', // sub-1, sub-2
  data () {
    return {
      switchValue: false
    }
  },
  components: {
    iLabel,
    iSwitch,
    iTable,
    iTableItem,
    iView
  }
}
</script>

:pencil: TODO

  • :sparkles: ~~iOS Style basic components~~ [ :heavy_check_mark: ]
  • :full_moon_with_face: ~~iOS Light theme~~ [ :heavy_check_mark: ]
  • :new_moon_with_face: iOS Dark theme [ :x: ]
  • :couple: ~~iOS Split view~~ [ :heavy_check_mark: ]
  • :arrow_heading_up: View routing [ :x: ]
  • :zap: Improve performance!
  • :christmas_tree: Like a real iOS style!
  • :baby: Make easy to use!
  • :sparkling_heart: More components and features!

:construction_worker: Project setup

npm i

Compiles and hot-reloads for development

npm run dev

Compiles and minifies for production

npm run build