0.0.6 • Published 4 years ago

@dbetka/vue-atomic v0.0.6

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

vue-atomic (pre-alpha version)

The most flexible Vue UI Library. Link to npm package.

Installation

npm i -D @dbetka/vue-atomic

Usage

Full Bundle

import VueAtomic from '@dbetka/vue-atomic'
import '@dbetka/vue-atomic/dist/theme/light.css'
import '@dbetka/vue-atomic/dist/index.css'

Vue.use(VueAtomic)

Individual components

with default name

import { MInput } from '@dbetka/vue-atomic'
import '@dbetka/vue-atomic/dist/theme/light.css'
import '@dbetka/vue-atomic/dist/molecules/input.css'

Vue.component(MInput.name, MInput) // component name is m-input

with own name

import { MInput } from '@dbetka/vue-atomic'
import '@dbetka/vue-atomic/dist/theme/light.css'
import '@dbetka/vue-atomic/dist/molecules/input.css'

Vue.component('new-input', MInput) // component name is new-input

List of widgets

  • MInput
  • MTextarea

Details for each widget

MInput

<template>
  <div>
    <m-input v-model="initial" />
    
    <m-input 
      v-model="initial" 
      placeholder="Disabled" 
      disabled
    />

    <m-input 
      v-model="assist" 
      placeholder="Assist"
      assist="Some text"
    />

    <m-input 
      v-model="correct" 
      placeholder="Correct"
      correct
    />

    <m-input 
      v-model="error" 
      placeholder="Error"
      error
      assist="Some text tells where you've made mistake"
    />

    <m-input 
      v-model="password" 
      type="password"
      placeholder="Password"
    />

  </div>
</template>

<script>
  export default {
    name: 'o-form',
    data: () => ({
      initial: 'Initial Value',
      assist: null,
      correct: null,
      error: null,
      password: null,
    })
  }
</script>

Props

NameDescriptionTypeDefaultRequired
v-modelThe model variable to bind the input value.String, Boolean, NumberundefinedYes
disabledIn future - Disable the input and prevent it interactions.BooleanfalseNo
placeholderThe input placeholder. Similar to HTML5 placeholder attribute.String''No
typeThe input type. Similar to HTML5 type attribute.StringfalseNo
errorThe status changes text field border, label and assist text color to red.BooleanfalseNo
correctThe status changes text field border and label color to red.BooleanfalseNo
assistThe assist message below text field.String''No

Classes

NameFeaturesRelated to stateDescription
m-input-
a-fieldf-textarea f-filledf-error f-correct-
a-labelf-fieldf-error f-correct-
a-assistf-error-
a-iconf-inputf-error f-correct-

Events

NameDescription
inputContains selector value.

MTextarea

<template>
  <div>
    <m-textarea v-model="initial" />
    
    <m-textarea 
      v-model="initial" 
      placeholder="Disabled" 
      disabled
    />

    <m-textarea 
      v-model="assist" 
      placeholder="Assist"
      assist="Some text"
    />

    <m-textarea 
      v-model="correct" 
      placeholder="Correct"
      correct
    />

    <m-textarea 
      v-model="error" 
      placeholder="Error"
      error
      assist="Some text tells where you've made mistake"
    />

  </div>
</template>

<script>
  export default {
    name: 'o-form',
    data: () => ({
      initial: 'Initial Value',
      assist: null,
      correct: null,
      error: null,
    })
  }
</script>

Props

NameDescriptionTypeDefaultRequired
v-modelThe model variable to bind the input value.String, Boolean, NumberundefinedYes
disabledIn future - Disable the input and prevent it interactions.BooleanfalseNo
placeholderThe textarea placeholder. Similar to HTML5 placeholder attribute.String''No
errorThe status changes text field border, label and assist text color to red.BooleanfalseNo
correctThe status changes text field border and label color to red.BooleanfalseNo
assistThe assist message below text field.String''No

Classes

NameFeaturesRelated to stateDescription
m-input-
a-fieldf-textarea f-filledf-error f-correct-
a-labelf-fieldf-error f-correct-
a-assistf-error-
a-iconf-inputf-error f-correct-

Events

NameDescription
inputContains selector value

Project maintenance

Scripts used in package.json has own docs here

0.0.5

4 years ago

0.0.6

4 years ago

0.0.4

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago