1.0.15 • Published 4 years ago

@zlab-de/zel-vue v1.0.15

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

zeppelin-element-library-vue

Vue Components for Zeppelin Element Library

Installation and Usage

npm install --save @zlab-de/zel-vue

yarn add @zlab-de/zel-vue

Components

  1. Zelbutton
  2. Zelcheckbox
  3. ZelInput
  4. Zelnotification
  5. Zelnumberinput
  6. Zelpagination
  7. Zelradiobutton
  8. zelsearchinput
  9. zelselect
  10. zeltab
  11. zeltabs
  12. zeltable
  13. zelpagination
import Vue from 'vue';
import "path/to/zeppelin-element-library.css";
import {
  ZelVueButton,
  ZelVueCheckbox,
  ZelVueInput,
  ZelVueBulletList,
  ZelVueAttributeList,
  ZelVueNotifications,
  ZelVueNumberInput,
  ZelVueRadioButton,
  ZelVueSearchInput,
  ZelVueSelect,
  ZelVueTable,
  ZelVueTabs,
  ZelVueTab,
  ZelVueTag,
  ZelVuePagination
  }"@zlab-de/zel-vue";

  Vue.use(ZelVueButton);
  Vue.use(ZelVueCheckbox);
  Vue.use(ZelVueInput);

Alternatively you can 
``` html <a href=https://github.com/zepdev/zeppelin-element-library-vue/archive/master.zip" target="_blank" rel="noopener">download</a> ```  and reference the script and the stylesheet in your HTML:

``` html
<link rel="stylesheet" href="path/to/zeppelin-element-library.css">
<script src="path/to/dist/zel-vue.min.js"></script>

Components and Props

Each components are it's associated properties that can be added to it

Button (ZelVueButton) Component

Prop NameTypeDefaultDescription
variantStringprimaryOther options tertiary, secondary
@clickFunctionCallback function attached to the component when the button click event is triggered.
disabledBooleanfalse
fullWidthBooleanfalseSet the button width to occupy the full width of it's parent container
iconStringA string of icon name, see zeppelin element libary for more information about available icons set
sizeStringSets the size of component eg: small

Checkbox (ZelVueCheckbox) Component

Prop NameTypeDefaultDescription
disabledBooleanfalsedisables and/or enables a checkbox component
valueBooleanfalsecheckstate
labelStringlabel for the checkbox

Input (ZelVueInput) Component

Prop NameTypeDefaultDescription
idStringelement ID
placeholderStringplaceholder text
disabledBooleanfalseenable or disable component
labelStringlabel textlabel for input component
valueStringvalue of input component
errorBooleanset the error state on component
errorMessageStringRequiredMessage to display when there is an error

List (ZelVueBulletlist) Component

Prop NameTypeDefaultDescription
dataSourceArrayAn array of objects containing items to use as bullet list eg:[{id:1,text: 'bullet1'},{id:1, text:'bullet2'}]

List (ZelVueAttributeListItem) Component

Prop NameTypeDefaultDescription
dataSourceArrayAn array of objects containing items to use as bullet list eg:[{id:1,text: 'bullet1', label:'label1'},{id:1, text:'bullet2', label:'label2'}]

Notification (ZelVueNotification) Component

Prop NameTypeDefaultDescription
variantStringinfoIndicates the type of notification eg (info, warning, danger, success)
messageString requiredMessage to display on notifcation component
autoHideDurationNumber600duration to show the notification component
onCloseFunctioncallback executed when close is clicked

NumberInput (ZelVueNumberInput) Component

Prop NameTypeDefaultDescription
plustitleStringThe text shown on the plust icon
minustitleStringThe text shown on the minus icon
maxNumberMaximum number for the input component
minNumberMinimum number for the input component
stepNumber1Increment per step
valueNumber0value of the input element

RadioButton (ZelVueRadioButton) Component

Prop NameTypeDefaultDescription
nameStringname of radio component
classNamePropStringcustom class name
labelStringlabel for the radio
idStringelement id of radio component
valueStringvalue of radio component
requiredBooleanfalserequired attribute of component
checkedBooleanfalsecheck state of component
labelString requiredlabel of radio compoonent

Search (ZelVueSearchInput) Component

Prop NameTypeDefaultDescription
classNameStringcustom class name
labelStringlabel for the search
idStringsearchbarelement id of search component
titlelabelStringzepicons-searchsearch input label
placeholderStringsearchPlaceholder for search
dataSourceArrayArray or Array of Objects
valueStringvalue of search input

Select (ZelVueSelect) Component

Prop NameTypeDefaultDescription
labelString requiredlabel for the select
placeholderString requiredSelect OnePlaceholder for select
dataSourceArray required Array or Array of Objects
valueStringvalue of select input

Table (ZelVueTable) Component

Prop NameTypeDefaultDescription
classNameStringclass name for table
titleHeaderClassNameStringclass name for table title header
subtitleHeaderClassNameStringclass name for sub-title header
tableBodyClassNameStringclass name for table body
tableHeaderClassNameStringclass name for table header
titleString requiredtitle for table
subtitleStringsub-tile for table
tableHeaderDataArray[]Array of object containing table header text/data
tableBodyDataArray[]Array of object containing table body text/data
tableFooterDataArray[]Array of object containing table footer text/data

Tab (ZelVueTab) Component

Expect ZelVueTabs

Prop NameTypeDefaultDescription
nameString requiredname of tab container
selectedBooleanfalseselect state of tab item

Tabs (ZelVueTabs) Component

You are required to nest a ZelVueTabs inside a ZelVueTab

Prop NameTypeDefaultDescription
classNameStringclass name for tab container
tabsizeSmallBooleantruesize of tab
idStringelement id
tabindexNumbertabindex for each tab
tabsItemsArray[]Array of object containing id and name of tab item

Tag (ZelVueTag) Component

Prop NameTypeDefaultDescription
tagnameString requiredtag name
tagtitleStringzepicons-closetitle of tab close

Pagination (ZelVuePagination) Component

Prop NameTypeDefaultDescription
classNameString requiredclass name for pagination component
visiblebuttonsNumber required5number of visible button to show at a time
perpageNumber requirednumber of items per page
currentpageNumber requiredcurrent page
itemsArray of Objects[]Array of items to paginate
onPagechangedfunctionCallback function attached to the component when the page changed event is triggered.

Questions

If you have any questions, ideas or you want to discuss with Zel-element-library-vue community, use Issues to send any issue or note to us we will be happy to pick it up.

May work in other browsers but it's untested.

Credits and Thanks

  • Alyssa for the support and contribution towards the project

License

MIT

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.2

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

0.0.1

4 years ago