{"version":3,"file":"FormKitGroup.vue.mjs","sources":["../../lib/form/FormKitGroup.vue"],"sourcesContent":["<template>\n    <div class=\"formkitProperty\" :class=\"[context.attrs.identifier]\" v-for=\"key in items\" :key=\"key\">\n      <h4>{{ context.label }}</h4>\n      \n      <div class=\"horizontal-wrapper\">\n        \n        <div class=\"formkitCmpWrap w-100\">\n        \n          <div class=\"formkitWrapRepeatable\">\n            <slot>\n              <FormKit outer-class=\"w-100\" placeholder=\"Please provide a number\"/>\n            </slot>\n          </div>\n  \n        </div>\n  \n      </div>\n      <!-- <div class=\"interactionWrapper\">\n        <div class=\"formkit-remover ball\" @click=\"removeItem\" :data-key=\"key\">\n          <span>x</span>\n        </div>\n        <div @click=\"addItem\" class=\"ball formkit-adder\"><span>+</span></div>\n      </div> -->\n    </div>\n    \n  </template>\n  \n  <script>\n  import { token } from \"@formkit/utils\";\n  \n  export default {\n    props: {\n      name: String,\n      children: Array,\n      context: Object,\n      \n    },\n    data() {\n      return {\n        values: [],\n        items: [this.newId()],\n        camel2title: (str) =>\n          str\n            .replace(/([A-Z])/g, (match) => ` ${match}`)\n            .replace(/^./, (match) => match.toUpperCase())\n            .trim(),\n      }\n    },\n    methods: {\n      newId() {\n        return `${this.name}_${token()}`;\n      },\n      addItem() {\n        this.items.push(this.newId());\n      },\n      removeItem(e) {\n        const key = e.target.getAttribute('data-key');\n        const index = this.items.indexOf(key);\n        if (index >= 0) {\n          this.items.splice(index, 1);\n        }\n      }\n    }\n  }\n  </script>\n  \n  \n  \n  <style lang=\"scss\">\n  .horizontal-wrapper {\n    display: flex;\n    flex-direction: row;\n    width: 100%;\n  }\n  \n  .interactionWrapper {\n    width: 10%;\n    display: flex;\n    align-items: center;\n    position: relative;\n  \n  }\n  \n  .ball {\n    position: absolute;\n    display: flex;\n    text-align: center;\n    flex-direction: column;\n    justify-content: center;\n    height: 1.5rem;\n    width: 1.5rem;\n    font-size: 1em;\n    font-weight: bold;\n    cursor: pointer;\n    border-radius: 50%;\n    margin: 5px;\n    transition: all ease-in-out 200ms;\n  }\n  \n  .formkit-remover {\n    left: 30px;\n    top: 22px;\n    background-color: red;\n    color: white;\n  \n  \n    span {\n      pointer-events: none;\n      position: relative;\n      bottom: 0.1rem;\n    }\n  \n    &:hover {\n      background-color: darkred;\n  \n    }\n  }\n  \n  .formkit-adder {\n    top: 22px;\n    background-color: darkseagreen;\n    color: white;\n  \n    span {\n      position: relative;\n      bottom: 0.13rem;\n    }\n  \n    &:hover {\n      background-color: darkgreen;\n  \n    }\n  }\n  \n  .dpi button {\n    align-self: flex-start;\n  }\n  </style>\n  "],"names":["_sfc_main","str","match","token","e","key","index","_hoisted_1","_hoisted_2","_hoisted_3","_createElementBlock","_Fragment","_renderList","$data","$props","_createElementVNode","_toDisplayString","_renderSlot","_ctx","_createVNode","_component_FormKit"],"mappings":";;;;AA8BE,MAAKA,IAAU;AAAA,EACb,OAAO;AAAA,IACL,MAAM;AAAA,IACN,UAAU;AAAA,IACV,SAAS;AAAA,EAEV;AAAA,EACD,OAAO;AACL,WAAO;AAAA,MACL,QAAQ,CAAE;AAAA,MACV,OAAO,CAAC,KAAK,OAAO;AAAA,MACpB,aAAa,CAACC,MACZA,EACG,QAAQ,YAAY,CAACC,MAAU,IAAIA,CAAK,EAAE,EAC1C,QAAQ,MAAM,CAACA,MAAUA,EAAM,YAAW,CAAE,EAC5C,KAAM;AAAA,IACb;AAAA,EACD;AAAA,EACD,SAAS;AAAA,IACP,QAAQ;AACN,aAAO,GAAG,KAAK,IAAI,IAAIC,EAAO,CAAA;AAAA,IAC/B;AAAA,IACD,UAAU;AACR,WAAK,MAAM,KAAK,KAAK,MAAO,CAAA;AAAA,IAC7B;AAAA,IACD,WAAWC,GAAG;AACZ,YAAMC,IAAMD,EAAE,OAAO,aAAa,UAAU,GACtCE,IAAQ,KAAK,MAAM,QAAQD,CAAG;AACpC,MAAIC,KAAS,KACX,KAAK,MAAM,OAAOA,GAAO,CAAC;AAAA,IAE9B;AAAA,EACF;AACF,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