JSFiddle - React, Tailwind, and code Playground

by Yurii Shpylovyi

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/paper.js/0.10.3/paper-core.js"></script>
<script src="https://code.jquery.com/jquery-2.2.4.js"></script>
<ul class="paramsSelector"></ul>

CSS

* {
  margin: 0;
  padding: 0;
}
.paramSelectorLabel{
  display:inline-block;
  width:80px;
}
.paramsSelector {
  display:block;
  list-style-type: none;
  background-color: #ccffff;
  max-width:150px;
  -webkit-box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.75);
  -moz-box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.75);
  box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.75);
}

JavaScript

class coupler {
  constructor(cableTypeVocabulary, vendor, cableType, wires) {
    this.tubeSchema = cableTypeVocabulary.vendor.cableType.tubeSchema,
      this.wiresSchema = cableTypeVocabulary.vendor.cableType.wiresSchema
  }
  showCabeSchema() {
    console.log({
      tubeSchema: this.tubeSchema,
      wiresSchema: this.wiresSchema
    });
  }
}
let getCableParams ={};
let vocabulary = {
  vendor: {
    select: null,
    finmark: {
      ut: {
        tube: [{
          text: 'синій',
          color: '#0000ff'
        }, {
          text: 'помаранчевий',
          color: '#ff6600'
        }, {
          text: 'зелений',
          color: '#009933'
        }, {
          text: 'коричневий',
          color: '#663300'
        }, {
          text: 'сірий',
          color: '#808080'
        }, {
          text: 'білий',
          color: '#ffffff'
        }, {
          text: 'червоний',
          color: '#ff0000'
        }, {
          text: 'чорний',
          color: '#000000'
        }, {
          text: 'жовтий',
          color: '#ffff00'
        }, {
          text: 'фіолетовий',
          color: '#ee82ee'
        }, {
          text: 'рожевий',
          color: '#ffc0cb'
        }, {
          text: 'бірюзовий',
          color: '#00ffff'
        }],

        wires: [{
          text: 'синій',
          color: '#0000ff'
        }, {
          text: 'помаранчевий',
          color: '#ff6600'
        }, {
          text: 'зелений',
          color: '#009933'
        }, {
          text: 'коричневий',
          color: '#663300'
        }, {
          text: 'сірий',
          color: '#808080'
        }, {
          text: 'білий',
          color: '#ffffff'
        }, {
          text: 'червоний',
          color: '#ff0000'
        }, {
          text: 'чорний',
          color: '#000000'
        }, {
          text: 'жовтий',
          color: '#ffff00'
        }, {
          text: 'фіолетовий',
          color: '#ee82ee'
        }, {
          text:...