@sfxcode/formkit-primevue 0.7.1 → 0.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ (function(E,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],o):(E=typeof globalThis<"u"?globalThis:E||self,o(E["formkit-primevue"]={},E.Vue))})(this,function(E,o){"use strict";function Re(){return Math.random().toString(36).substring(2,15)}function Ot(e,n){const t=e instanceof Set?e:new Set(e);return n&&n.forEach(r=>t.add(r)),[...t]}function R(e,n){return Object.prototype.hasOwnProperty.call(e,n)}function ue(e,n,t=!0,r=["__key"]){if(e===n)return!0;if(typeof n=="object"&&typeof e=="object"){if(e instanceof Map||e instanceof Set||e instanceof Date||e===null||n===null||Object.keys(e).length!==Object.keys(n).length)return!1;for(const i of r)if((i in e||i in n)&&e[i]!==n[i])return!1;for(const i in e)if(!(i in n)||e[i]!==n[i]&&!t||t&&!ue(e[i],n[i],t,r))return!1;return!0}return!1}function ce(e){return Object.prototype.toString.call(e)==="[object Object]"}function pe(e){return ce(e)||Array.isArray(e)}function Y(e){if(ce(e)===!1||e.__FKNode__||e.__POJO__===!1)return!1;const n=e.constructor;if(n===void 0)return!0;const t=n.prototype;return!(ce(t)===!1||t.hasOwnProperty("isPrototypeOf")===!1)}function de(e,n,t=!1,r=!1){if(n===null)return null;const i={};if(typeof n=="string")return n;for(const s in e)if(R(n,s)&&(n[s]!==void 0||!r)){if(t&&Array.isArray(e[s])&&Array.isArray(n[s])){i[s]=e[s].concat(n[s]);continue}if(n[s]===void 0)continue;Y(e[s])&&Y(n[s])?i[s]=de(e[s],n[s],t,r):i[s]=n[s]}else i[s]=e[s];for(const s in n)!R(i,s)&&n[s]!==void 0&&(i[s]=n[s]);return i}function Pt(e){if(e[0]!=='"'&&e[0]!=="'"||e[0]!==e[e.length-1])return!1;const n=e[0];for(let t=1;t<e.length;t++)if(e[t]===n&&(t===1||e[t-1]!=="\\")&&t!==e.length-1)return!1;return!0}function Et(e){if(!e.length)return"";let n="",t="";for(let r=0;r<e.length;r++){const i=e.charAt(r);(i!=="\\"||t==="\\")&&(n+=i),t=i}return n}function q(...e){return e.reduce((n,t)=>{const{value:r,name:i,modelValue:s,config:l,plugins:f,...m}=t;return Object.assign(n,m)},{})}function At(e){const n=[];let t="",r=0,i="",s="";for(let l=0;l<e.length;l++){const f=e.charAt(l);f===i&&s!=="\\"?i="":(f==="'"||f==='"')&&!i&&s!=="\\"?i=f:f==="("&&!i?r++:f===")"&&!i&&r--,f===","&&!i&&r===0?(n.push(t),t=""):(f!==" "||i)&&(t+=f),s=f}return t&&n.push(t),n}function je(e,n){const t={},r=n.filter(s=>s instanceof RegExp),i=new Set(n);for(const s in e)!i.has(s)&&!r.some(l=>l.test(s))&&(t[s]=e[s]);return t}function De(e,n){const t={},r=n.filter(i=>i instanceof RegExp);return n.forEach(i=>{i instanceof RegExp||(t[i]=e[i])}),Object.keys(e).forEach(i=>{r.some(s=>s.test(i))&&(t[i]=e[i])}),t}function G(e){return e.replace(/-([a-z0-9])/gi,(n,t)=>t.toUpperCase())}function Me(e){return e.replace(/([a-z0-9])([A-Z])/g,(n,t,r)=>t+"-"+r.toLowerCase()).replace(" ","-").toLowerCase()}function X(e,n=["__key","__init"]){if(e===null||e instanceof RegExp||e instanceof Date||e instanceof Map||e instanceof Set||typeof File=="function"&&e instanceof File)return e;let t;Array.isArray(e)?t=e.map(r=>typeof r=="object"?X(r,n):r):t=Object.keys(e).reduce((r,i)=>(r[i]=typeof e[i]=="object"?X(e[i],n):e[i],r),{});for(const r of n)r in e&&Object.defineProperty(t,r,{enumerable:!1,value:e[r]});return t}function U(e){return typeof e=="object"?X(e):e}function vt(e,n){if(!e||typeof e!="object")return null;const t=n.split(".");let r=e;for(const i in t){const s=t[i];if(R(r,s)&&(r=r[s]),+i===t.length-1)return r;if(!r||typeof r!="object")return null}return null}function Te(e){return e!==void 0&&e!=="false"&&e!==!1?!0:void 0}function N(e){return Object.isFrozen(e)?e:Object.defineProperty(e,"__init",{enumerable:!1,value:!0})}function xe(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]/g," ").trim().replace(/\s+/g,"-")}function me(){const e=[];let n=0;const t=i=>e.push(i),r=i=>{const s=e[n];return typeof s=="function"?s(i,l=>(n++,r(l===void 0?i:l))):(n=0,i)};return t.dispatch=r,t.unshift=i=>e.unshift(i),t.remove=i=>{const s=e.indexOf(i);s>-1&&e.splice(s,1)},t}function Fe(){const e=new Map,n=new Map;let t;const r=(i,s)=>{if(t){t.set(s.name,[i,s]);return}e.has(s.name)&&e.get(s.name).forEach(l=>{(s.origin===i||l.modifiers.includes("deep"))&&l.listener(s)}),s.bubble&&i.bubble(s)};return r.on=(i,s)=>{const[l,...f]=i.split("."),m=s.receipt||Re(),h={modifiers:f,event:l,listener:s,receipt:m};return e.has(l)?e.get(l).push(h):e.set(l,[h]),n.has(m)?n.get(m).push(l):n.set(m,[l]),m},r.off=i=>{var s;n.has(i)&&((s=n.get(i))===null||s===void 0||s.forEach(l=>{const f=e.get(l);Array.isArray(f)&&e.set(l,f.filter(m=>m.receipt!==i))}),n.delete(i))},r.pause=i=>{t||(t=new Map),i&&i.walk(s=>s._e.pause())},r.play=i=>{if(!t)return;const s=t;t=void 0,s.forEach(([l,f])=>r(l,f)),i&&i.walk(l=>l._e.play())},r}function Bt(e,n,t,r,i=!0){return n._e(e,{payload:r,name:t,bubble:i,origin:e}),e}function Rt(e,n,t){return re(e.parent)&&e.parent._e(e.parent,t),e}function jt(e,n,t,r){return n._e.on(t,r)}function Dt(e,n,t){return n._e.off(t),e}const ye=me();ye((e,n)=>(e.message||(e.message=String(`E${e.code}`)),n(e)));const he=me();he((e,n)=>{e.message||(e.message=String(`W${e.code}`));const t=n(e);return console&&typeof console.warn=="function"&&console.warn(t.message),t});function ee(e,n={}){he.dispatch({code:e,data:n})}function T(e,n={}){throw Error(ye.dispatch({code:e,data:n}).message)}function te(e,n){const t={blocking:!1,key:Re(),meta:{},type:"state",visible:!0,...e};return n&&t.value&&t.meta.localize!==!1&&(t.value=n.t(t),t.meta.locale=n.config.locale),t}const Le={apply:zt,set:Tt,remove:ze,filter:Ft,reduce:Lt,release:Kt,touch:xt};function Mt(e=!1){const n={};let t,r=e,i=[];const s=new Map;let l;const f=new Proxy(n,{get(...m){const[h,g]=m;return g==="buffer"?r:g==="_b"?i:g==="_m"?s:g==="_r"?l:R(Le,g)?Le[g].bind(null,n,f,t):Reflect.get(...m)},set(m,h,g){return h==="_n"?(t=g,l==="__n"&&We(t,f),!0):h==="_b"?(i=g,!0):h==="buffer"?(r=g,!0):h==="_r"?(l=g,!0):(T(101,t),!1)}});return f}function Tt(e,n,t,r){if(n.buffer)return n._b.push([[r]]),n;if(e[r.key]!==r){if(typeof r.value=="string"&&r.meta.localize!==!1){const s=r.value;r.value=t.t(r),r.value!==s&&(r.meta.locale=t.props.locale)}const i=`message-${R(e,r.key)?"updated":"added"}`;e[r.key]=Object.freeze(t.hook.message.dispatch(r)),t.emit(i,r)}return n}function xt(e,n){for(const t in e){const r={...e[t]};n.set(r)}}function ze(e,n,t,r){if(R(e,r)){const i=e[r];delete e[r],t.emit("message-removed",i)}return n.buffer===!0&&(n._b=n._b.filter(i=>(i[0]=i[0].filter(s=>s.key!==r),i[1]||i[0].length))),n}function Ft(e,n,t,r,i){for(const s in e){const l=e[s];(!i||l.type===i)&&!r(l)&&ze(e,n,t,s)}}function Lt(e,n,t,r,i){for(const s in e){const l=e[s];i=r(i,l)}return i}function zt(e,n,t,r,i){if(Array.isArray(r)){if(n.buffer){n._b.push([r,i]);return}const s=new Set(r.map(l=>(n.set(l),l.key)));typeof i=="string"?n.filter(l=>l.type!==i||s.has(l.key)):typeof i=="function"&&n.filter(l=>!i(l)||s.has(l.key))}else for(const s in r){const l=t.at(s);l?l.store.apply(r[s],i):Ut(t,n,s,r[s],i)}}function Wt(e,...n){const t=`${e.name}-set`,r=i=>te({key:xe(i),type:"error",value:i,meta:{source:t,autoClear:!0}});return n.filter(i=>!!i).map(i=>{if(typeof i=="string"&&(i=[i]),Array.isArray(i))return i.map(s=>r(s));{const s={};for(const l in i)Array.isArray(i[l])?s[l]=i[l].map(f=>r(f)):s[l]=[r(i[l])];return s}})}function Ut(e,n,t,r,i){var s;const l=n._m;l.has(t)||l.set(t,[]),n._r||(n._r=We(e,n)),(s=l.get(t))===null||s===void 0||s.push([r,i])}function We(e,n){return e.on("child.deep",({payload:t})=>{n._m.forEach((r,i)=>{e.at(i)===t&&(r.forEach(([s,l])=>{t.store.apply(s,l)}),n._m.delete(i))}),n._m.size===0&&n._r&&(e.off(n._r),n._r=void 0)})}function Kt(e,n){n.buffer=!1,n._b.forEach(([t,r])=>n.apply(t,r)),n._b=[]}function qt(){const e={};let n;return{count:(...t)=>Nt(n,e,...t),init(t){n=t,t.on("message-added.deep",Ke(e,1)),t.on("message-removed.deep",Ke(e,-1))},merge:t=>qe(n,e,t),settled(t){return R(e,t)?e[t].promise:Promise.resolve()},unmerge:t=>qe(n,e,t,!0),value(t){return R(e,t)?e[t].count:0}}}function Nt(e,n,t,r,i=0){if(r=Ht(r||t),!R(n,t)){const s={condition:r,count:0,name:t,node:e,promise:Promise.resolve(),resolve:()=>{}};n[t]=s,i=e.store.reduce((l,f)=>l+s.condition(f)*1,i),e.each(l=>{l.ledger.count(s.name,s.condition),i+=l.ledger.value(s.name)})}return Ue(n[t],i).promise}function Ht(e){return typeof e=="function"?e:n=>n.type===e}function Ue(e,n){const t=e.count,r=e.count+n;return e.count=r,t===0&&r!==0?(e.node.emit(`unsettled:${e.name}`,e.count,!1),e.promise=new Promise(i=>e.resolve=i)):t!==0&&r===0&&(e.node.emit(`settled:${e.name}`,e.count,!1),e.resolve()),e.node.emit(`count:${e.name}`,e.count,!1),e}function Ke(e,n){return t=>{for(const r in e){const i=e[r];i.condition(t.payload)&&Ue(i,n)}}}function qe(e,n,t,r=!1){for(const i in n){const s=n[i].condition;r||t.ledger.count(i,s);const l=t.ledger.value(i)*(r?-1:1);if(!!e)do e.ledger.count(i,s,l),e=e.parent;while(e)}}const ge=new Map,ne=new Map,_e=Fe(),Zt=[];function Jt(e){e.props.id&&(ge.set(e.props.id,e),ne.set(e,e.props.id),_e(e,{payload:e,name:e.props.id,bubble:!1,origin:e}))}function Qt(e){if(ne.has(e)){const n=ne.get(e);ne.delete(e),ge.delete(n),_e(e,{payload:null,name:n,bubble:!1,origin:e})}}function Ne(e){return ge.get(e)}function Yt(e,n){Zt.push(_e.on(e,n))}function He(e,n,t){let r=!0;return n in e.config._t?r=!1:e.emit(`config:${n}`,t,!1),n in e.props||(e.emit("prop",{prop:n,value:t}),e.emit(`prop:${n}`,t)),r}function Gt(e){const n=document.getElementById(e);if(n instanceof HTMLFormElement){const t=new Event("submit",{cancelable:!0,bubbles:!0});n.dispatchEvent(t);return}ee(151,e)}function Xt(e){const n=t=>{for(const r in t.store){const i=t.store[r];i.type==="error"||i.type==="ui"&&r==="incomplete"?t.store.remove(r):i.type==="state"&&t.store.set({...i,value:!1})}};n(e),e.walk(n)}function en(e,n){const t=typeof e=="string"?Ne(e):e;if(t){const r=s=>U(s.props.initial)||(s.type==="group"?{}:s.type==="list"?[]:void 0);t._e.pause(t),t.input(U(n)||r(t),!1),t.walk(s=>s.input(r(s),!1));const i=r(t);return t.input(typeof i=="object"?U(n)||N(i):i,!1),t._e.play(t),Xt(t),t.emit("reset",t),t}ee(152,e)}const tn={delimiter:".",delay:0,locale:"en",rootClasses:e=>({[`formkit-${Me(e)}`]:!0})},Ze=Symbol("index"),be=Symbol("removed"),$e=Symbol("moved"),Je=Symbol("inserted");function nn(e){return e.type==="list"&&Array.isArray(e._value)}function re(e){return e&&typeof e=="object"&&e.__FKNode__===!0}const ie=(e,n,t)=>{T(102,[e,t])},rn={_c:V(Vn,ie,!1),add:V(gn),addProps:V(hn),address:V(On,ie,!1),at:V(Pn),bubble:V(Rt),clearErrors:V(Mn),calm:V(dn),config:V(!1),define:V(yn),disturb:V(pn),destroy:V(mn),hydrate:V(cn),index:V(Sn,wn,!1),input:V(Ye),each:V($n),emit:V(Bt),find:V(An),on:V(jt),off:V(Dt),parent:V(!1,_n),plugins:V(!1),remove:V(bn),root:V(Bn,ie,!1),reset:V(Dn),resetConfig:V(Cn),setErrors:V(et),submit:V(jn),t:V(Rn),use:V(ke),name:V(In,!1,!1),walk:V(kn)};function sn(){return new Map(Object.entries(rn))}function V(e,n,t=!0){return{get:e?(r,i)=>t?(...s)=>e(r,i,...s):e(r,i):!1,set:n!==void 0?n:ie.bind(null)}}function on(){const e=new Map;return new Proxy(e,{get(n,t){return e.has(t)||e.set(t,me()),e.get(t)}})}let ln=0,an=0;function fn(e){var n,t;return((n=e.parent)===null||n===void 0?void 0:n.type)==="list"?Ze:e.name||`${((t=e.props)===null||t===void 0?void 0:t.type)||"input"}_${++ln}`}function Qe(e){return e.type==="group"?N(e.value&&typeof e.value=="object"&&!Array.isArray(e.value)?e.value:{}):e.type==="list"?N(Array.isArray(e.value)?e.value:[]):e.value===null?"":e.value}function Ye(e,n,t,r=!0){return n._value=un(e,e.hook.input.dispatch(t)),e.emit("input",n._value),n.isSettled&&e.disturb(),r?(n._tmo&&clearTimeout(n._tmo),n._tmo=setTimeout(se,e.props.delay,e,n)):se(e,n),n.settled}function un(e,n){switch(e.type){case"input":break;case"group":(!n||typeof n!="object")&&T(107,[e,n]);break;case"list":Array.isArray(n)||T(108,[e,n]);break}return n}function se(e,n,t=!0,r=!0){n._value=n.value=e.hook.commit.dispatch(n._value),e.type!=="input"&&r&&e.hydrate(),e.emit("commit",n.value),t&&e.calm()}function Ge(e,{name:n,value:t,from:r}){if(!Object.isFrozen(e._value)){if(nn(e)){const i=t===be?[]:t===$e&&typeof r=="number"?e._value.splice(r,1):[t];e._value.splice(n,t===$e||r===Je?0:1,...i);return}t!==be?e._value[n]=t:delete e._value[n]}}function cn(e,n){const t=n._value;return n.children.forEach(r=>{if(typeof t=="object")if(r.name in t){const i=r.type!=="input"||t[r.name]&&typeof t[r.name]=="object"?N(t[r.name]):t[r.name];r.input(i,!1)}else(e.type!=="list"||typeof r.name=="number")&&Ge(n,{name:r.name,value:r.value}),t.__init||(r.type==="group"?r.input({},!1):r.type==="list"?r.input([],!1):r.input(void 0,!1))}),e}function pn(e,n){var t;return n._d<=0&&(n.isSettled=!1,e.emit("settled",!1,!1),n.settled=new Promise(r=>{n._resolve=r}),e.parent&&((t=e.parent)===null||t===void 0||t.disturb())),n._d++,e}function dn(e,n,t){var r;if(t!==void 0&&e.type!=="input")return Ge(n,t),se(e,n,!0,!1);n._d>0&&n._d--,n._d===0&&(n.isSettled=!0,e.emit("settled",!0,!1),e.parent&&((r=e.parent)===null||r===void 0||r.calm({name:e.name,value:n.value})),n._resolve&&n._resolve(n.value))}function mn(e,n){e.emit("destroying",e),e.store.filter(()=>!1),e.parent&&e.parent.remove(e),Qt(e),n._value=n.value=void 0,e.emit("destroyed",e)}function yn(e,n,t){n.type=t.type,n.props.definition=X(t),n.value=n._value=Qe({type:e.type,value:n.value}),t.forceTypeProp&&(e.props.type&&(e.props.originalType=e.props.type),n.props.type=t.forceTypeProp),t.family&&(n.props.family=t.family),t.features&&t.features.forEach(r=>r(e)),t.props&&e.addProps(t.props),e.emit("defined",t)}function hn(e,n,t){var r;if(e.props.attrs){const i={...e.props.attrs};e.props._emit=!1;for(const l in i){const f=G(l);t.includes(f)&&(e.props[f]=i[l],delete i[l])}const s=U(n._value);e.props.initial=e.type!=="input"?N(s):s,e.props._emit=!0,e.props.attrs=i,e.props.definition&&(e.props.definition.props=[...((r=e.props.definition)===null||r===void 0?void 0:r.props)||[],...t])}return e.emit("added-props",t),e}function gn(e,n,t,r){if(e.type==="input"&&T(100,e),t.parent&&t.parent!==e&&t.parent.remove(t),n.children.includes(t)||(r!==void 0&&e.type==="list"?(n.children.splice(r,0,t),Array.isArray(e.value)&&e.value.length<n.children.length&&e.disturb().calm({name:r,value:t.value,from:Je})):n.children.push(t),t.isSettled||e.disturb()),t.parent!==e){if(t.parent=e,t.parent!==e)return e.remove(t),t.parent.add(t),e}else t.use(e.plugins);return se(e,n,!1),e.ledger.merge(t),e.emit("child",t),e}function _n(e,n,t,r){return re(r)?(e.parent&&e.parent!==r&&e.parent.remove(e),n.parent=r,e.resetConfig(),r.children.includes(e)?e.use(r.plugins):r.add(e),!0):r===null?(n.parent=null,!0):!1}function bn(e,n,t){const r=n.children.indexOf(t);if(r!==-1){t.isSettled&&e.disturb(),n.children.splice(r,1);let i=Te(t.props.preserve),s=t.parent;for(;i===void 0&&s;)i=Te(s.props.preserve),s=s.parent;i?e.calm():e.calm({name:e.type==="list"?r:t.name,value:be}),t.parent=null,t.config._rmn=t}return e.ledger.unmerge(t),e}function $n(e,n,t){n.children.forEach(r=>t(r))}function kn(e,n,t,r=!1){n.children.forEach(i=>{(t(i)!==!1||!r)&&i.walk(t)})}function Cn(e,n){const t=e.parent||void 0;n.config=Xe(e.config._t,t),e.walk(r=>r.resetConfig())}function ke(e,n,t,r=!0,i=!0){return Array.isArray(t)||t instanceof Set?(t.forEach(s=>ke(e,n,s)),e):(n.plugins.has(t)||(i&&typeof t.library=="function"&&t.library(e),r&&t(e)!==!1&&(n.plugins.add(t),e.children.forEach(s=>s.use(t)))),e)}function wn(e,n,t,r){if(re(e.parent)){const i=e.parent.children,s=r>=i.length?i.length-1:r<0?0:r,l=i.indexOf(e);return l===-1?!1:(i.splice(l,1),i.splice(s,0,e),e.parent.children=i,e.parent.type==="list"&&e.parent.disturb().calm({name:s,value:$e,from:l}),!0)}return!1}function Sn(e){if(e.parent){const n=[...e.parent.children].indexOf(e);return n===-1?e.parent.children.length:n}return-1}function Vn(e,n){return n}function In(e,n){var t;return((t=e.parent)===null||t===void 0?void 0:t.type)==="list"?e.index:n.name!==Ze?n.name:e.index}function On(e,n){return n.parent?n.parent.address.concat([e.name]):[e.name]}function Pn(e,n,t){const r=typeof t=="string"?t.split(e.config.delimiter):t;if(!r.length)return;const i=r[0];let s=e.parent;for(s||(String(r[0])===String(e.name)&&r.shift(),s=e),i==="$parent"&&r.shift();s&&r.length;){const l=r.shift();switch(l){case"$root":s=e.root;break;case"$parent":s=s.parent;break;case"$self":s=e;break;default:s=s.children.find(f=>String(f.name)===String(l))||En(s,l)}}return s||void 0}function En(e,n){const t=String(n).match(/^(find)\((.*)\)$/);if(t){const[,r,i]=t,s=i.split(",").map(l=>l.trim());switch(r){case"find":return e.find(s[0],s[1]);default:return}}}function An(e,n,t,r){return vn(e,t,r)}function vn(e,n,t="name"){const r=typeof t=="string"?s=>s[t]==n:t,i=[e];for(;i.length;){const s=i.shift();if(r(s,n))return s;i.push(...s.children)}}function Bn(e){let n=e;for(;n.parent;)n=n.parent;return n}function Xe(e={},n){let t;return new Proxy(e,{get(...r){const i=r[1];if(i==="_t")return e;const s=Reflect.get(...r);if(s!==void 0)return s;if(n){const l=n.config[i];if(l!==void 0)return l}if(e.rootConfig&&typeof i=="string"){const l=e.rootConfig[i];if(l!==void 0)return l}return i==="delay"&&(t==null?void 0:t.type)==="input"?20:tn[i]},set(...r){const i=r[1],s=r[2];if(i==="_n")return t=s,e.rootConfig&&e.rootConfig._add(t),!0;if(i==="_rmn")return e.rootConfig&&e.rootConfig._rm(t),t=void 0,!0;if(!ue(e[i],s,!1)){const l=Reflect.set(...r);return t&&(t.emit(`config:${i}`,s,!1),He(t,i,s),t.walk(f=>He(f,i,s),!0)),l}return!0}})}function Rn(e,n,t,r="ui"){const i=typeof t=="string"?{key:t,value:t,type:r}:t,s=e.hook.text.dispatch(i);return e.emit("text",s,!1),s.value}function jn(e){const n=e.name;do{if(e.props.isForm===!0)break;e.parent||T(106,n),e=e.parent}while(e);e.props.id&&Gt(e.props.id)}function Dn(e,n,t){return en(e,t)}function et(e,n,t,r){const i=`${e.name}-set`,s=e.hook.setErrors.dispatch({localErrors:t,childErrors:r});return Wt(e,s.localErrors,s.childErrors).forEach(l=>{e.store.apply(l,f=>f.meta.source===i)}),e}function Mn(e,n,t=!0,r){return et(e,n,[]),t&&(r=r||`${e.name}-set`,e.walk(i=>{i.store.filter(s=>!(s.type==="error"&&s.meta&&s.meta.source===r))})),e}function Tn(e){return R(e.props,"id")||(e.props.id=`input_${an++}`),e}function xn(e){const n={initial:typeof e=="object"?U(e):e};let t,r=!0;return new Proxy(n,{get(...i){const[s,l]=i;if(R(n,l))return Reflect.get(...i);if(t&&typeof l=="string"&&t.config[l]!==void 0)return t.config[l]},set(i,s,l,f){if(s==="_n")return t=l,!0;if(s==="_emit")return r=l,!0;const{prop:m,value:h}=t.hook.prop.dispatch({prop:s,value:l});if(!ue(n[m],h,!1)||typeof h=="object"){const g=Reflect.set(i,m,h,f);return r&&(t.emit("prop",{prop:m,value:h}),typeof m=="string"&&t.emit(`prop:${m}`,h)),g}return!0}})}function Fn(e,n){if(e.props.definition)return e.define(e.props.definition);for(const t of n){if(e.props.definition)return;typeof t.library=="function"&&t.library(e)}}function Ln(e){const n=Qe(e),t=Xe(e.config||{},e.parent);return{_d:0,_e:Fe(),_resolve:!1,_tmo:!1,_value:n,children:Ot(e.children||[]),config:t,hook:on(),isCreated:!1,isSettled:!0,ledger:qt(),name:fn(e),parent:e.parent||null,plugins:new Set,props:xn(n),settled:Promise.resolve(n),store:Mt(!0),traps:sn(),type:e.type||"input",value:n}}function zn(e,n){var t;if(e.ledger.init(e.store._n=e.props._n=e.config._n=e),e.props._emit=!1,n.props&&Object.assign(e.props,n.props),e.props._emit=!0,Fn(e,new Set([...n.plugins||[],...e.parent?e.parent.plugins:[]])),n.plugins)for(const r of n.plugins)ke(e,e._c,r,!0,!1);return Tn(e),e.each(r=>e.add(r)),e.parent&&e.parent.add(e,n.index),e.type==="input"&&e.children.length&&T(100,e),Ye(e,e._c,e._value,!1),e.store.release(),!((t=n.props)===null||t===void 0)&&t.id&&Jt(e),e.emit("created",e),e.isCreated=!0,e}function Wn(e){const n=e||{},t=Ln(n),r=new Proxy(t,{get(...i){const[,s]=i;if(s==="__FKNode__")return!0;const l=t.traps.get(s);return l&&l.get?l.get(r,t):Reflect.get(...i)},set(...i){const[,s,l]=i,f=t.traps.get(s);return f&&f.set?f.set(r,t,s,l):Reflect.set(...i)}});return zn(r,n)}function Ce(e){return typeof e!="string"&&R(e,"$el")}function we(e){return typeof e!="string"&&R(e,"$cmp")}function H(e){return!e||typeof e=="string"?!1:R(e,"if")&&R(e,"then")}function Un(e){return typeof e!="string"&&"$formkit"in e}function Kn(e){if(typeof e=="string")return{$el:"text",children:e};if(Un(e)){const{$formkit:n,for:t,if:r,children:i,bind:s,...l}=e;return Object.assign({$cmp:"FormKit",props:{...l,type:n}},r?{if:r}:{},t?{for:t}:{},i?{children:i}:{},s?{bind:s}:{})}return e}function x(e){let n;const t=new Set,r=function(u,p){return typeof u=="function"?u(p):u},i=[{"&&":(c,u,p)=>r(c,p)&&r(u,p),"||":(c,u,p)=>r(c,p)||r(u,p)},{"===":(c,u,p)=>r(c,p)===r(u,p),"!==":(c,u,p)=>r(c,p)!==r(u,p),"==":(c,u,p)=>r(c,p)==r(u,p),"!=":(c,u,p)=>r(c,p)!=r(u,p),">=":(c,u,p)=>r(c,p)>=r(u,p),"<=":(c,u,p)=>r(c,p)<=r(u,p),">":(c,u,p)=>r(c,p)>r(u,p),"<":(c,u,p)=>r(c,p)<r(u,p)},{"+":(c,u,p)=>r(c,p)+r(u,p),"-":(c,u,p)=>r(c,p)-r(u,p)},{"*":(c,u,p)=>r(c,p)*r(u,p),"/":(c,u,p)=>r(c,p)/r(u,p),"%":(c,u,p)=>r(c,p)%r(u,p)}],s=i.reduce((c,u)=>c.concat(Object.keys(u)),[]),l=new Set(s.map(c=>c.charAt(0)));function f(c,u,p,b){const S=c.filter(a=>a.startsWith(u));return S.length?S.find(a=>b.length>=p+a.length&&b.substring(p,p+a.length)===a?a:!1):!1}function m(c,u,p=1){let b=p?u.substring(c+1).trim():u.substring(0,c).trim();if(!b.length)return-1;if(!p){const a=b.split("").reverse(),y=a.findIndex(_=>l.has(_));b=a.slice(y).join("")}const S=b[0];return i.findIndex(a=>{const y=Object.keys(a);return!!f(y,S,0,b)})}function h(c,u){let p="";const b=u.length;let S=0;for(let a=c;a<b;a++){const y=u.charAt(a);if(y==="(")S++;else if(y===")")S--;else if(S===0&&y===" ")continue;if(S===0&&f(s,y,a,u))return[p,a-1];p+=y}return[p,u.length-1]}function g(c,u=0){const p=i[u],b=c.length,S=Object.keys(p);let a=0,y=!1,_=null,$="",P=null,O,j="",I="",v="",B="",L=0;const z=(A,W)=>{A?v+=W:$+=W};for(let A=0;A<b;A++)if(j=I,I=c.charAt(A),(I==="'"||I==='"')&&j!=="\\"&&(a===0&&!y||a&&!B)){a?B=I:y=I,z(a,I);continue}else if(y&&(I!==y||j==="\\")||B&&(I!==B||j==="\\")){z(a,I);continue}else if(y===I){y=!1,z(a,I);continue}else if(B===I){B=!1,z(a,I);continue}else{if(I===" ")continue;if(I==="(")a===0?L=A:v+=I,a++;else if(I===")")if(a--,a===0){const W=typeof $=="string"&&$.startsWith("$")?$:void 0,It=W&&c.charAt(A+1)===".";let J="";It&&([J,A]=h(A+2,c));const fe=_?u:m(L,c,0),Q=m(A,c);fe===-1&&Q===-1?$=d(v,-1,W,J):_&&(fe>=Q||Q===-1)&&u===fe?(P=_.bind(null,d(v,-1,W,J)),_=null,$=""):Q>fe&&u===Q?$=d(v,-1,W,J):$+=`(${v})${It?`.${J}`:""}`,v=""}else v+=I;else if(a===0&&(O=f(S,I,A,c))){A===0&&T(103,[O,c]),A+=O.length-1,A===c.length-1&&T(104,[O,c]),_?$&&(P=_.bind(null,d($,u)),_=p[O].bind(null,P),$=""):P?(_=p[O].bind(null,d(P,u)),P=null):(_=p[O].bind(null,d($,u)),$="");continue}else z(a,I)}return $&&_&&(_=_.bind(null,d($,u))),_=!_&&P?P:_,!_&&$&&(_=(A,W)=>typeof A=="function"?A(W):A,_=_.bind(null,d($,u))),!_&&!$&&T(105,c),_}function d(c,u,p,b){if(p){const S=d(p,i.length);let a,y=b?x(`$${b}`):!1;if(typeof S=="function"){const _=At(String(c)).map($=>d($,-1));return $=>{const P=S($);return typeof P!="function"?(ee(150,p),P):(a=P(..._.map(O=>typeof O=="function"?O($):O)),y&&(y=y.provide(O=>{const j=n(O);return O.reduce((v,B)=>{if(B===b||(b==null?void 0:b.startsWith(`${B}(`))){const z=vt(a,B);v[B]=()=>z}else v[B]=j[B];return v},{})})),y?y():a)}}}else if(typeof c=="string"){if(c==="true")return!0;if(c==="false")return!1;if(c==="undefined")return;if(Pt(c))return Et(c.substring(1,c.length-1));if(!isNaN(+c))return Number(c);if(u<i.length-1)return g(c,u+1);if(c.startsWith("$")){const S=c.substring(1);return t.add(S),function(y){return S in y?y[S]():void 0}}return c}return c}const w=g(e.startsWith("$:")?e.substring(2):e),k=Array.from(t);function C(c){return n=c,Object.assign(w.bind(null,c(k)),{provide:C})}return Object.assign(w,{provide:C})}const tt="1.0.0-beta.10",qn=F("outer",()=>({$el:"div",attrs:{key:"$id","data-family":"$family || undefined","data-type":"$type","data-multiple":'$attrs.multiple || ($type != "select" && $options != undefined) || undefined',"data-disabled":"$disabled || undefined","data-complete":"$state.complete || undefined","data-invalid":"$state.valid === false && $state.validationVisible || undefined","data-errors":"$state.errors || undefined","data-submitted":"$state.submitted || undefined","data-prefix-icon":"$_rawPrefixIcon !== undefined || undefined","data-suffix-icon":"$_rawSuffixIcon !== undefined || undefined","data-prefix-icon-click":"$onPrefixIconClick !== undefined || undefined","data-suffix-icon-click":"$onSuffixIconClick !== undefined || undefined"}}),!0),Nn=F("inner","div"),Hn=F("wrapper","div"),Zn=F("label",()=>({$el:"label",if:"$label",attrs:{for:"$id"}})),Jn=F("messages",()=>({$el:"ul",if:"$fns.length($messages)"})),Qn=F("message",()=>({$el:"li",for:["message","$messages"],attrs:{key:"$message.key",id:"$id + '-' + $message.key","data-message-type":"$message.type"}})),Yn=F("prefix",null),Gn=F("suffix",null),Xn=F("help",()=>({$el:"div",if:"$help",attrs:{id:'$: "help-" + $id'}}));function nt(e){return typeof e=="object"&&("$el"in e||"$cmp"in e||"$formkit"in e)}function er(e,n={}){return typeof e=="string"?nt(n)||typeof n=="string"?n:e:Array.isArray(e)?nt(n)?n:e:de(e,n)}function tr(e){return qn(Hn(Zn("$label"),Nn(Yn(),e(),Gn())),Xn("$help"),Jn(Qn("$message.value")))}function F(e,n,t=!1){return(...r)=>{const i=s=>{const l=!n||typeof n=="string"?{$el:n}:n();return(Ce(l)||we(l))&&(l.meta||(l.meta={section:e}),r.length&&!l.children&&(l.children=[...r.map(f=>typeof f=="string"?f:f(s))]),Ce(l)&&(l.attrs={class:`$classes.${e}`,...l.attrs||{}})),{if:`$slots.${e}`,then:`$slots.${e}`,else:e in s?er(l,s[e]):l}};return t?nr(i):i}}function nr(e){return n=>[e(n)]}te({type:"state",blocking:!0,visible:!1,value:!0,key:"validating"});let oe;const rr=new Promise(e=>{}),le=typeof window<"u"&&typeof fetch<"u";oe=le?getComputedStyle(document.documentElement):void 0;const Z={},Se={};function Ve(e,n){return t=>{if(typeof t=="boolean")return;if(t.startsWith("<svg"))return t;if(typeof t!="string")return;const r=Z[t],i=t.startsWith("default:");t=i?t.split(":")[1]:t;let s;if(r||t in Z)return r;if(!Se[t]){if(s=ir(t),s=le&&typeof s>"u"?Promise.resolve(s):s,s instanceof Promise)Se[t]=s.then(l=>!l&&typeof t=="string"&&!i?s=typeof e=="function"?e(t):or(t,n):l).then(l=>(typeof t=="string"&&(Z[i?`default:${t}`:t]=l),l));else if(typeof s=="string")return Z[i?`default:${t}`:t]=s,s}return Se[t]}}function ir(e){if(!!le)return rr.then(()=>sr(e))}function sr(e){const n=oe==null?void 0:oe.getPropertyValue(`--fk-icon-${e}`);if(n){const t=atob(n);if(t.startsWith("<svg"))return Z[e]=t,t}}function or(e,n){const t=tt.startsWith("__")?"latest":tt,r=typeof n=="function"?n(e):`https://cdn.jsdelivr.net/npm/@formkit/icons@${t}/dist/icons/${e}.svg`;if(!!le)return fetch(`${r}`).then(async i=>{const s=await i.text();if(s.startsWith("<svg"))return s}).catch(i=>{console.error(i)})}let Ie=!1;const rt={100:({data:e})=>`Only groups, lists, and forms can have children (${e.name}).`,101:({data:e})=>`You cannot directly modify the store (${e.name}). See: https://formkit.com/advanced/core#message-store`,102:({data:[e,n]})=>`You cannot directly assign node.${n} (${e.name})`,103:({data:[e]})=>`Schema expressions cannot start with an operator (${e})`,104:({data:[e,n]})=>`Schema expressions cannot end with an operator (${e} in "${n}")`,105:({data:e})=>`Invalid schema expression: ${e}`,106:({data:e})=>`Cannot submit because (${e}) is not in a form.`,107:({data:[e,n]})=>`Cannot set ${e.name} to non object value: ${n}`,108:({data:[e,n]})=>`Cannot set ${e.name} to non array value: ${n}`,600:({data:e})=>`Unknown input type${typeof e.props.type=="string"?' "'+e.props.type+'"':""} ("${e.name}")`,601:({data:e})=>`Input definition${typeof e.props.type=="string"?' "'+e.props.type+'"':""} is missing a schema or component property (${e.name}).`},it={150:({data:e})=>`Schema function "${e}()" is not a valid function.`,151:({data:e})=>`No form element with id: ${e}`,152:({data:e})=>`No input element with id: ${e}`,350:({data:e})=>`Invalid options prop for radio input (${e.name}). See https://formkit.com/inputs/radio`,650:'Schema "$get()" must use the id of an input to access.',651:({data:e})=>`Cannot setErrors() on "${e}" because no such id exists.`,652:({data:e})=>`Cannot clearErrors() on "${e}" because no such id exists.`,800:({data:e})=>`${e} is deprecated.`};Ie||ye((e,n)=>{if(e.code in rt){const t=rt[e.code];e.message=typeof t=="function"?t(e):t}return n(e)}),Ie||he((e,n)=>{if(e.code in it){const t=it[e.code];e.message=typeof t=="function"?t(e):t}return n(e)}),Ie=!0;const Oe={};let D;const K=new Map,lr="__raw__",ar=/[a-zA-Z0-9\-][cC]lass$/;function fr(e,n){const t=o.ref(null);if(e==="get"){const i={};return t.value=ur.bind(null,i),t}const r=e.split(".");return o.watchEffect(()=>t.value=Pe(n,r)),t}function Pe(e,n){if(Array.isArray(e)){for(const r of e){const i=r!==!1&&Pe(r,n);if(i!==void 0)return i}return}let t;return n.reduce((r,i,s,l)=>{if(typeof r!="object")return t=void 0,l.splice(1);const f=r[i];return s===n.length-1&&f!==void 0&&(t=f),r[i]},e),t}function ur(e,n){if(typeof n!="string")return ee(650);if(n in e||(e[n]=o.ref(void 0)),e[n].value===void 0){e[n].value=null;const t=Ne(n);t&&(e[n].value=t.context),Yt(n,({payload:r})=>{e[n].value=re(r)?r.context:r})}return e[n].value}function st(e,n){function t(d,w){const k=g(x(w.if),{if:!0}),C=m(d,w.then),c=w.else?m(d,w.else):null;return[k,C,c]}function r(d,w){var k,C;const c=g(x(d.if));let u=()=>w,p=()=>w;return typeof d.then=="object"?p=i(d.then,void 0):typeof d.then=="string"&&((k=d.then)===null||k===void 0?void 0:k.startsWith("$"))?p=g(x(d.then)):p=()=>d.then,R(d,"else")&&(typeof d.else=="object"?u=i(d.else):typeof d.else=="string"&&((C=d.else)===null||C===void 0?void 0:C.startsWith("$"))?u=g(x(d.else)):u=()=>d.else),()=>c()?p():u()}function i(d,w,k={}){const C=new Set(Object.keys(d||{})),c=w?g(x(w)):()=>({}),u=[p=>{const b=c();for(const S in b)C.has(S)||(p[S]=b[S])}];if(d){if(H(d))return r(d,k);for(let p in d){const b=d[p];let S;const a=typeof b=="string";p.startsWith(lr)?(p=p.substring(7),S=()=>b):a&&b.startsWith("$")&&b.length>1&&!(b.startsWith("$reset")&&ar.test(p))?S=g(x(b)):typeof b=="object"&&H(b)?S=r(b,void 0):typeof b=="object"&&Y(b)?S=i(b):S=()=>b,u.push(y=>{y[p]=S()})}}return()=>{const p=Array.isArray(d)?[]:{};return u.forEach(b=>b(p)),p}}function s(d,w){let k=null,C=()=>null,c=!1,u=null,p=null,b=null,S=!1;const a=Kn(w);if(Ce(a)?(k=a.$el,C=a.$el!=="text"?i(a.attrs,a.bind):()=>null):we(a)?(typeof a.$cmp=="string"?R(d,a.$cmp)?k=d[a.$cmp]:(k=a.$cmp,S=!0):k=a.$cmp,C=i(a.props,a.bind)):H(a)&&([c,u,p]=t(d,a)),!H(a)&&"if"in a?c=g(x(a.if)):!H(a)&&k===null&&(c=()=>!0),"children"in a&&a.children)if(typeof a.children=="string")if(a.children.startsWith("$slots."))k=k==="text"?"slot":k,u=g(x(a.children));else if(a.children.startsWith("$")&&a.children.length>1){const y=g(x(a.children));u=()=>String(y())}else u=()=>String(a.children);else if(Array.isArray(a.children))u=m(d,a.children);else{const[y,_,$]=t(d,a.children);u=P=>y&&y()?_&&_(P):$&&$(P)}if(we(a))if(u){const y=u;u=_=>({default($,P){var O,j,I,v;const B=D;P&&(D=P),$&&((O=K.get(D))===null||O===void 0||O.unshift($)),_&&((j=K.get(D))===null||j===void 0||j.unshift(_));const L=y(_);return $&&((I=K.get(D))===null||I===void 0||I.shift()),_&&((v=K.get(D))===null||v===void 0||v.shift()),D=B,L}}),u.slot=!0}else u=()=>({});if("for"in a&&a.for){const y=a.for.length===3?a.for[2]:a.for[1];b=[typeof y=="string"&&y.startsWith("$")?g(x(y)):()=>y,a.for[0],a.for.length===3?String(a.for[1]):null]}return[c,k,C,u,p,b,S]}function l(d,w){const k=d(w),C=D;return Object.keys(k).reduce((c,u)=>{const p=k&&k[u];return c[u]=b=>p&&p(b,C)||null,c},{})}function f(d,w){const[k,C,c,u,p,b,S]=s(d,w);let a=y=>{if(k&&C===null&&u)return k()?u(y):p&&p(y);if(C&&(!k||k())){if(C==="text"&&u)return o.createTextVNode(String(u()));if(C==="slot"&&u)return u(y);const _=S?o.resolveComponent(C):C,$=u!=null&&u.slot?l(u,y):null;return o.h(_,c(),$||(u?u(y):[]))}return typeof p=="function"?p(y):p};if(b){const y=a,[_,$,P]=b;a=()=>{const O=_(),j=isNaN(O)?O:Array(Number(O)).fill(0).map((B,L)=>L),I=[];if(typeof j!="object")return null;const v=K.get(D)||[];for(const B in j){if(Array.isArray(j)&&B==="length")continue;const L=Object.defineProperty({...v.reduce((z,A)=>z.__idata?{...z,...A}:A,{}),[$]:j[B],...P!==null?{[P]:B}:{}},"__idata",{enumerable:!1,value:!0});v.unshift(L),I.push(y.bind(null,L)()),v.shift()}return I}}return a}function m(d,w){if(Array.isArray(w)){const C=w.map(f.bind(null,d));return c=>C.map(u=>u(c))}const k=f(d,w);return C=>k(C)}const h=[];function g(d,w={}){const k={};return h.push((C,c)=>{k[c]=d.provide(u=>C(u,w))}),()=>k[D]()}return function(w,k){const C=JSON.stringify(n),[c,u]=R(Oe,C)?Oe[C]:[m(e,n),h];return Oe[C]=[c,u],u.forEach(p=>{p(w,k)}),()=>(D=k,c())}}function ot(e,n){const t=K.get(D)||[];let r;return t.length&&(r=Pe(t,e.split("."))),r===void 0?n:r}function cr(e,n){return new Proxy(e,{get(...t){let r;const i=t[1];if(typeof i=="string"){const s=D;D=n,r=ot(i,void 0),D=s}return r!==void 0?r:Reflect.get(...t)}})}function lt(e,n,t){return e((r,i={})=>r.reduce((s,l)=>{if(l.startsWith("slots.")){const m=l.substring(6),h=n.slots&&R(n.slots,m);if(i.if)s[l]=()=>h;else if(n.slots&&h){const g=cr(n,t);return s[l]=()=>n.slots[m](g),s}}const f=fr(l,n);return s[l]=()=>ot(l,f.value),s},{}),t)}let at=0;const pr=o.defineComponent({name:"FormKitSchema",props:{schema:{type:[Array,Object],required:!0},data:{type:Object,default:()=>({})},library:{type:Object,default:()=>({})}},setup(e,n){const t=o.getCurrentInstance();let r=Symbol(String(at++));K.set(r,[]);let i=st(e.library,e.schema),s,l;return o.watch(()=>e.schema,(f,m)=>{var h;r=Symbol(String(at++)),i=st(e.library,e.schema),s=lt(i,l,r),f===m&&((h=t==null?void 0:t.proxy)===null||h===void 0?void 0:h.$forceUpdate)()},{deep:!0}),o.watchEffect(()=>{l=Object.assign(o.reactive(e.data),{slots:n.slots}),s=lt(i,l,r)}),()=>s()}}),dr={config:{type:Object,default:{}},classes:{type:Object,required:!1},delay:{type:Number,required:!1},errors:{type:Array,default:[]},inputErrors:{type:Object,default:()=>({})},index:{type:Number,required:!1},id:{type:String,required:!1},modelValue:{required:!1},name:{type:String,required:!1},parent:{type:Object,required:!1},plugins:{type:Array,default:[]},sectionsSchema:{type:Object,default:{}},type:{type:[String,Object],default:"text"},validation:{type:[String,Array],required:!1},validationMessages:{type:Object,required:!1},validationRules:{type:Object,required:!1},validationLabel:{type:[String,Function],required:!1}},Ee=Symbol("FormKitParent");o.defineComponent({props:dr,emits:{input:(e,n)=>!0,inputRaw:(e,n)=>!0,"update:modelValue":e=>!0,node:e=>!!e,submit:(e,n)=>!0,submitRaw:(e,n)=>!0,submitInvalid:e=>!0},inheritAttrs:!1,setup(e,n){const t=_r(e,n);if(t.props.definition||T(600,t),t.props.definition.component)return()=>{var l;return o.h((l=t.props.definition)===null||l===void 0?void 0:l.component,{context:t.context},{...n.slots})};const r=o.ref([]),i=()=>{var l,f;const m=(f=(l=t.props)===null||l===void 0?void 0:l.definition)===null||f===void 0?void 0:f.schema;m||T(601,t),r.value=typeof m=="function"?m({...e.sectionsSchema}):m};i(),t.on("schema",i),n.emit("node",t);const s=t.props.definition.library;return n.expose({node:t}),()=>o.h(pr,{schema:r.value,data:t.context,library:s},{...n.slots})}});const ft=Symbol.for("FormKitOptions"),Ae=Symbol();function mr(e,n){const t={},r=l=>{for(const f of l)f.__str in t&&t[f.__str](),t[f.__str]=o.watch(hr.bind(null,e,f),s.bind(null,f),{deep:!1})},s=yr(e,n,r,l=>{if(!!l.length)for(const f in t)`${f}`.startsWith(`${l.__str}.`)&&(t[f](),delete t[f])});r(ve(e))}function yr(e,n,t,r){return i=>{const s=ut(e,i);s!==Ae&&(i.__deep&&r(i),typeof s=="object"&&t(ve(s,[i],...i)),n(i,s,e))}}function hr(e,n){const t=ut(e,n);return t&&typeof t=="object"?Object.keys(t):t}function ut(e,n){if(o.isRef(e)){if(n.length===0)return e.value;e=e.value}return n.reduce((t,r)=>t===Ae?t:t===null||typeof t!="object"?Ae:t[r],e)}function ve(e,n=[],...t){if(e===null)return n;if(!t.length){const r=Object.defineProperty([],"__str",{value:""});if(e=o.isRef(e)?e.value:e,e&&typeof e=="object")Object.defineProperty(r,"__deep",{value:!0}),n.push(r);else return[r]}if(e===null||typeof e!="object")return n;for(const r in e){const i=t.concat(r);Object.defineProperty(i,"__str",{value:i.join(".")});const s=e[r];Y(s)||Array.isArray(s)?(n.push(Object.defineProperty(i,"__deep",{value:!0})),n=n.concat(ve(s,[],...i))):n.push(i)}return n}function ae(e){return e===null||typeof e!="object"||(o.isReactive(e)?e=o.toRaw(e):o.isRef(e)&&(e=o.isReactive(e.value)?ae(e.value):e.value)),e}const Be=["help","label","ignore","disabled","preserve",/^preserve(-e|E)rrors/,/^[a-z]+(?:-visibility|Visibility)$/,/^[a-zA-Z-]+(?:-class|Class)$/,"prefixIcon","suffixIcon",/^[a-zA-Z-]+(?:-icon|Icon)$/];function ct(e,n){n.classes&&Object.keys(n.classes).forEach(t=>{typeof t=="string"&&(e.props[`_${t}Class`]=n.classes[t],pe(n.classes[t])&&t==="inner"&&Object.values(n.classes[t]))})}function gr(e){return e?["Submit","SubmitRaw","SubmitInvalid"].reduce((t,r)=>{const i=`on${r}`;return i in e&&typeof e[i]=="function"&&(t[i]=e[i]),t},{}):{}}function _r(e,n,t={}){const r=Object.assign({},o.inject(ft)||{},t),i=o.getCurrentInstance(),s=gr(i==null?void 0:i.vnode.props),l=e.modelValue!==void 0,f=e.modelValue!==void 0?e.modelValue:U(n.attrs.value);function m(){const a={...q(e),...s},y=je(q(n.attrs),Be);a.attrs=y;const _=De(q(n.attrs),Be);for(const P in _)a[G(P)]=_[P];const $={props:{}};return ct($,e),Object.assign(a,$.props),typeof a.type!="string"&&(a.definition=a.type,delete a.type),a}const h=m(),g=h.ignore?null:e.parent||o.inject(Ee,null),d=Wn(de(r||{},{name:e.name||void 0,value:f,parent:g,plugins:(r.plugins||[]).concat(e.plugins),config:e.config,props:h,index:e.index},!1,!0));d.props.definition||T(600,d);const w=o.ref(new Set(d.props.definition.props||[]));d.on("added-props",({payload:a})=>{Array.isArray(a)&&a.forEach(y=>w.value.add(y))});const k=o.computed(()=>Be.concat([...w.value]).reduce((a,y)=>(typeof y=="string"?(a.push(G(y)),a.push(Me(y))):a.push(y),a),[]));o.watchEffect(()=>ct(d,e));const C=q(e);for(const a in C)o.watch(()=>e[a],()=>{e[a]!==void 0&&(d.props[a]=e[a])});const c=new Set,u=q(n.attrs);o.watchEffect(()=>{p(De(u,k.value))});function p(a){c.forEach(y=>{y(),c.delete(y)});for(const y in a){const _=G(y);c.add(o.watch(()=>n.attrs[y],()=>{d.props[_]=n.attrs[y]}))}}if(o.watchEffect(()=>{const a=je(q(n.attrs),k.value);d.props.attrs=Object.assign({},d.props.attrs||{},a)}),o.watchEffect(()=>{const a=e.errors.map(y=>te({key:xe(y),type:"error",value:y,meta:{source:"prop"}}));d.store.apply(a,y=>y.type==="error"&&y.meta.source==="prop")}),d.type!=="input"){const a=`${d.name}-prop`;o.watchEffect(()=>{const y=Object.keys(e.inputErrors);y.length||d.clearErrors(!0,a);const _=y.reduce(($,P)=>{let O=e.inputErrors[P];return typeof O=="string"&&(O=[O]),Array.isArray(O)&&($[P]=O.map(j=>te({key:j,type:"error",value:j,meta:{source:a}}))),$},{});d.store.apply(_,$=>$.type==="error"&&$.meta.source===a)})}o.watchEffect(()=>Object.assign(d.config,e.config)),d.type!=="input"&&o.provide(Ee,d);let b;const S=new WeakSet;return d.on("modelUpdated",()=>{var a,y;if(n.emit("inputRaw",(a=d.context)===null||a===void 0?void 0:a.value,d),clearTimeout(b),b=setTimeout(n.emit,20,"input",(y=d.context)===null||y===void 0?void 0:y.value,d),l&&d.context){const _=ae(d.context.value);pe(_)&&ae(e.modelValue)!==_&&S.add(_),n.emit("update:modelValue",_)}}),l&&mr(o.toRef(e,"modelValue"),(a,y)=>{var _;const $=ae(y);if(pe($)&&S.has($))return S.delete($);a.length?(_=d.at(a))===null||_===void 0||_.input(y,!1):d.input(y,!1)}),o.onUnmounted(()=>d.destroy()),d}let br=1;function $r(e){return typeof e=="function"&&e.length===2||typeof e=="object"&&!Array.isArray(e)&&!("$el"in e)&&!("$cmp"in e)&&!("if"in e)}function M(e,n={}){const t={type:"input",...n};let r;if($r(e)){const i=`SchemaComponent${br++}`;r=F("input",()=>({$cmp:i,props:{context:"$node.context"}})),t.library={[i]:o.markRaw(e)}}else typeof e=="function"?r=e:r=F("input",()=>U(e));return t.schema=tr(r||"Schema undefined"),t}o.defineComponent({name:"FormKitIcon",props:{icon:{type:String,default:""},iconLoader:{type:Function,default:null},iconLoaderUrl:{type:Function,default:null}},setup(e){var n,t;const r=o.ref(void 0),i=o.inject(ft,{}),s=o.inject(Ee,null);let l;if(e.iconLoader&&typeof e.iconLoader=="function")l=Ve(e.iconLoader);else if(s&&((n=s.props)===null||n===void 0?void 0:n.iconLoader))l=Ve(s.props.iconLoader);else if(e.iconLoaderUrl&&typeof e.iconLoaderUrl=="function")l=Ve(l,e.iconLoaderUrl);else{const f=(t=i==null?void 0:i.plugins)===null||t===void 0?void 0:t.find(m=>typeof m.iconHandler=="function");f&&(l=f.iconHandler)}if(l&&typeof l=="function"){const f=l(e.icon);f instanceof Promise?f.then(m=>{r.value=m}):r.value=f}return()=>r.value?o.h("span",{class:"formkit-icon",innerHTML:r.value}):null}});const kr=o.defineComponent({__name:"PrimeInputText",props:{context:Object},setup(e){const t=e.context,r=()=>(t==null?void 0:t.iconLeft)&&(t==null?void 0:t.iconLeft.length)>0,i=()=>(t==null?void 0:t.iconRight)&&(t==null?void 0:t.iconRight.length)>0,s=()=>{let m="";return r()&&(m=`${m}p-input-icon-left `),i()&&(m=`${m}p-input-icon-right `),m};function l(m){t==null||t.handlers.blur(m.target.value)}function f(m){t==null||t.node.input(m.target.value)}return(m,h)=>{const g=o.resolveComponent("InputText");return o.openBlock(),o.createElementBlock("span",{class:o.normalizeClass(s())},[r()?(o.openBlock(),o.createElementBlock("i",{key:0,class:o.normalizeClass(o.unref(t).iconLeft)},null,2)):o.createCommentVNode("",!0),o.createVNode(g,{modelValue:o.unref(t)._value,"onUpdate:modelValue":h[0]||(h[0]=d=>o.unref(t)._value=d),id:o.unref(t).id,name:o.unref(t).name,class:o.normalizeClass(o.unref(t).attrs.class),placeholder:o.unref(t).attrs.placeholder,onInput:f,onBlur:l},null,8,["modelValue","id","name","class","placeholder"]),i?(o.openBlock(),o.createElementBlock("i",{key:1,class:o.normalizeClass(o.unref(t).iconRight)},null,2)):o.createCommentVNode("",!0)],2)}}}),Cr=o.defineComponent({__name:"PrimeInputNumber",props:{context:Object},setup(e){const t=e.context;function r(s){t==null||t.handlers.blur(s.value)}function i(s){t==null||t.node.input(s.value)}return(s,l)=>{var m,h,g,d,w,k,C,c,u,p,b;const f=o.resolveComponent("InputNumber");return o.openBlock(),o.createBlock(f,{modelValue:o.unref(t)._value,"onUpdate:modelValue":l[0]||(l[0]=S=>o.unref(t)._value=S),id:o.unref(t).id,name:o.unref(t).name,placeholder:o.unref(t).attrs.placeholder,class:o.normalizeClass(o.unref(t).attrs.class),"use-grouping":(m=o.unref(t).attrs.useGrouping)!=null?m:!0,"min-fraction-digits":(h=o.unref(t).attrs.minFractionDigits)!=null?h:void 0,"max-fraction-digits":(g=o.unref(t).attrs.maxFractionDigits)!=null?g:void 0,locale:(d=o.unref(t).attrs.locale)!=null?d:void 0,mode:(w=o.unref(t).attrs.mode)!=null?w:void 0,currency:(k=o.unref(t).attrs.currency)!=null?k:void 0,prefix:(C=o.unref(t).attrs.prefix)!=null?C:void 0,suffix:(c=o.unref(t).attrs.suffix)!=null?c:void 0,"show-buttons":(u=o.unref(t).attrs.showButtons)!=null?u:void 0,"button-layout":(p=o.unref(t).attrs.buttonLayout)!=null?p:"stacked",step:(b=o.unref(t).attrs.step)!=null?b:void 0,onInput:i,onBlur:r},null,8,["modelValue","id","name","placeholder","class","use-grouping","min-fraction-digits","max-fraction-digits","locale","mode","currency","prefix","suffix","show-buttons","button-layout","step"])}}}),wr=o.defineComponent({__name:"PrimeInputMask",props:{context:Object},setup(e){const n=e,t=n.context;function r(i){var s,l;t==null||t.node.input((s=n.context)==null?void 0:s._value),t==null||t.handlers.blur((l=n.context)==null?void 0:l._value)}return(i,s)=>{var f,m,h,g;const l=o.resolveComponent("InputMask");return o.openBlock(),o.createBlock(l,{modelValue:o.unref(t)._value,"onUpdate:modelValue":s[0]||(s[0]=d=>o.unref(t)._value=d),id:o.unref(t).id,name:o.unref(t).name,class:o.normalizeClass(o.unref(t).attrs.class),placeholder:o.unref(t).attrs.placeholder,mask:(f=o.unref(t).attrs.mask)!=null?f:void 0,"slot-char":(m=o.unref(t).attrs.slotChar)!=null?m:"_","auto-clear":(h=o.unref(t).attrs.autoClear)!=null?h:!0,unmask:(g=o.unref(t).attrs.unmask)!=null?g:!1,onBlur:r},null,8,["modelValue","id","name","class","placeholder","mask","slot-char","auto-clear","unmask"])}}}),Sr=o.defineComponent({__name:"PrimePassword",props:{context:Object},setup(e){const t=e.context;function r(s){t==null||t.handlers.blur(s.target.value)}function i(s){t==null||t.node.input(s.target.value)}return(s,l)=>{var m,h,g,d;const f=o.resolveComponent("Password");return o.openBlock(),o.createBlock(f,{modelValue:o.unref(t)._value,"onUpdate:modelValue":l[0]||(l[0]=w=>o.unref(t)._value=w),id:o.unref(t).id,name:o.unref(t).name,class:o.normalizeClass(o.unref(t).attrs.class),placeholder:o.unref(t).attrs.placeholder,feedback:(h=(m=o.unref(t))==null?void 0:m.feedback)!=null?h:!0,"toggle-mask":(d=(g=o.unref(t))==null?void 0:g.toggleMask)!=null?d:!1,onInput:i,onBlur:r},null,8,["modelValue","id","name","class","placeholder","feedback","toggle-mask"])}}}),Vr=o.defineComponent({__name:"PrimeInputTextArea",props:{context:Object},setup(e){const t=e.context;function r(s){t==null||t.handlers.blur(s.target.value)}function i(s){t==null||t.node.input(s.target.value)}return(s,l)=>{var m;const f=o.resolveComponent("Textarea");return o.openBlock(),o.createBlock(f,{modelValue:o.unref(t)._value,"onUpdate:modelValue":l[0]||(l[0]=h=>o.unref(t)._value=h),id:o.unref(t).id,name:o.unref(t).name,class:o.normalizeClass(o.unref(t).attrs.class),placeholder:o.unref(t).attrs.placeholder,rows:(m=o.unref(t).rows)!=null?m:3,onInput:i,onBlur:r},null,8,["modelValue","id","name","class","placeholder","rows"])}}}),Ir={key:0,class:"formkit-prime-left"},Or={key:1,class:"formkit-prime-right"},Pr=o.defineComponent({__name:"PrimeCheckBox",props:{context:Object},setup(e){const t=e.context;function r(i){t==null||t.node.input(i)}return(i,s)=>{const l=o.resolveComponent("Checkbox");return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.unref(t).attrs.labelLeft?(o.openBlock(),o.createElementBlock("span",Ir,o.toDisplayString(o.unref(t).attrs.labelLeft),1)):o.createCommentVNode("",!0),o.createVNode(l,{modelValue:o.unref(t)._value,"onUpdate:modelValue":s[0]||(s[0]=f=>o.unref(t)._value=f),id:o.unref(t).id,name:o.unref(t).name,class:o.normalizeClass(o.unref(t).attrs.class),placeholder:o.unref(t).attrs.placeholder,binary:!0,onInput:r},null,8,["modelValue","id","name","class","placeholder"]),o.unref(t).attrs.labelRight?(o.openBlock(),o.createElementBlock("span",Or,o.toDisplayString(o.unref(t).attrs.labelRight),1)):o.createCommentVNode("",!0)],64)}}}),Er={key:0,class:"formkit-prime-left"},Ar={key:1,class:"formkit-prime-right"},vr=o.defineComponent({__name:"PrimeInputSwitch",props:{context:Object},setup(e){const n=e,t=n.context;function r(i){var s;t==null||t.node.input((s=n.context)==null?void 0:s._value)}return(i,s)=>{var f,m;const l=o.resolveComponent("InputSwitch");return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.unref(t).attrs.labelLeft?(o.openBlock(),o.createElementBlock("span",Er,o.toDisplayString(o.unref(t).attrs.labelLeft),1)):o.createCommentVNode("",!0),o.createVNode(l,{modelValue:o.unref(t)._value,"onUpdate:modelValue":s[0]||(s[0]=h=>o.unref(t)._value=h),id:o.unref(t).id,name:o.unref(t).name,class:o.normalizeClass(o.unref(t).attrs.class),"true-value":(f=o.unref(t).attrs.trueValue)!=null?f:void 0,"false-value":(m=o.unref(t).attrs.falseValue)!=null?m:void 0,onInput:r},null,8,["modelValue","id","name","class","true-value","false-value"]),o.unref(t).attrs.labelRight?(o.openBlock(),o.createElementBlock("span",Ar,o.toDisplayString(o.unref(t).attrs.labelRight),1)):o.createCommentVNode("",!0)],64)}}}),Br=o.defineComponent({__name:"PrimeEditor",props:{context:Object},setup(e){const t=e.context;function r(s){t==null||t.node.input(s.htmlValue)}function i(s){s.range===null&&(t==null||t.handlers.blur(s.htmlValue))}return(s,l)=>{const f=o.resolveComponent("Editor");return o.openBlock(),o.createBlock(f,{modelValue:o.unref(t)._value,"onUpdate:modelValue":l[0]||(l[0]=m=>o.unref(t)._value=m),id:o.unref(t).id,name:o.unref(t).name,class:o.normalizeClass(o.unref(t).attrs.class),placeholder:o.unref(t).attrs.placeholder,onTextChange:r,onSelectionChange:i},null,8,["modelValue","id","name","class","placeholder"])}}}),Rr=o.defineComponent({__name:"PrimeDropdown",props:{context:Object},setup(e){const t=e.context;function r(s){t==null||t.handlers.blur(s.value)}function i(s){t==null||t.node.input(s.value)}return(s,l)=>{var m,h,g,d;const f=o.resolveComponent("Dropdown");return o.openBlock(),o.createBlock(f,{modelValue:o.unref(t)._value,"onUpdate:modelValue":l[0]||(l[0]=w=>o.unref(t)._value=w),id:o.unref(t).id,name:o.unref(t).name,class:o.normalizeClass(o.unref(t).attrs.class),options:(h=(m=o.unref(t))==null?void 0:m.attrs)==null?void 0:h.options,"option-label":"label","option-value":"value",placeholder:o.unref(t).attrs.placeholder,filter:(g=o.unref(t).attrs.filter)!=null?g:!1,"show-clear":(d=o.unref(t).attrs.showClear)!=null?d:!1,onChange:i,onBlur:r},null,8,["modelValue","id","name","class","options","placeholder","filter","show-clear"])}}}),jr=o.defineComponent({__name:"PrimeMultiSelect",props:{context:Object},setup(e){const n=e,t=n.context;function r(i){var s;t==null||t.node.input((s=n.context)==null?void 0:s._value)}return(i,s)=>{var f,m,h;const l=o.resolveComponent("MultiSelect");return o.openBlock(),o.createBlock(l,{modelValue:o.unref(t)._value,"onUpdate:modelValue":s[0]||(s[0]=g=>o.unref(t)._value=g),id:o.unref(t).id,name:o.unref(t).name,class:o.normalizeClass(o.unref(t).attrs.class),options:(m=(f=o.unref(t))==null?void 0:f.attrs)==null?void 0:m.options,"option-label":"label","option-value":"value",placeholder:o.unref(t).attrs.placeholder,filter:(h=o.unref(t).attrs.filter)!=null?h:!1,onChange:r},null,8,["modelValue","id","name","class","options","placeholder","filter"])}}}),Dr=o.defineComponent({__name:"PrimeCalendar",props:{context:Object},setup(e){const n=e,t=n.context;function r(s){t==null||t.node.input(t==null?void 0:t._value)}function i(s){t==null||t.node.input(s)}return(s,l)=>{const f=o.resolveComponent("Calendar");return o.openBlock(),o.createBlock(f,{modelValue:o.unref(t)._value,"onUpdate:modelValue":l[0]||(l[0]=m=>o.unref(t)._value=m),id:n.context.id,name:o.unref(t).name,class:o.normalizeClass(o.unref(t).attrs.class),"date-format":o.unref(t).attrs.dateFormat,"show-icon":o.unref(t).attrs.showIcon,icon:o.unref(t).attrs.icon,onDateSelect:i,onInput:r},null,8,["modelValue","id","name","class","date-format","show-icon","icon"])}}}),Mr=o.defineComponent({__name:"PrimeSlider",props:{context:Object},setup(e){const t=e.context;function r(i){t==null||t.node.input(i),t==null||t.handlers.blur(i)}return(i,s)=>{var f,m,h,g;const l=o.resolveComponent("Slider");return o.openBlock(),o.createBlock(l,{modelValue:o.unref(t)._value,"onUpdate:modelValue":s[0]||(s[0]=d=>o.unref(t)._value=d),id:o.unref(t).id,name:o.unref(t).name,min:(f=o.unref(t).attrs.min)!=null?f:0,max:(m=o.unref(t).attrs.max)!=null?m:100,step:(h=o.unref(t).attrs.step)!=null?h:void 0,range:(g=o.unref(t).attrs.range)!=null?g:!1,onChange:r},null,8,["modelValue","id","name","min","max","step","range"])}}}),Tr=o.defineComponent({__name:"PrimeRating",props:{context:Object},setup(e){const n=e,t=n.context;function r(i){var s;t==null||t.node.input((s=n.context)==null?void 0:s._value)}return(i,s)=>{var f,m,h,g;const l=o.resolveComponent("Rating");return o.openBlock(),o.createBlock(l,{modelValue:o.unref(t)._value,"onUpdate:modelValue":s[0]||(s[0]=d=>o.unref(t)._value=d),id:o.unref(t).id,name:o.unref(t).name,disabled:(f=o.unref(t).attrs.disabled)!=null?f:!1,readonly:(m=o.unref(t).attrs.readonly)!=null?m:!1,stars:(h=o.unref(t).attrs.stars)!=null?h:5,cancel:(g=o.unref(t).attrs.cancel)!=null?g:!1,onChange:r},null,8,["modelValue","id","name","disabled","readonly","stars","cancel"])}}}),xr=o.defineComponent({__name:"PrimeChips",props:{context:Object},setup(e){const n=e,t=n.context;function r(i){var s;t==null||t.node.input((s=n.context)==null?void 0:s._value)}return(i,s)=>{var f,m,h;const l=o.resolveComponent("Chips");return o.openBlock(),o.createBlock(l,{modelValue:o.unref(t)._value,"onUpdate:modelValue":s[0]||(s[0]=g=>o.unref(t)._value=g),id:o.unref(t).id,name:o.unref(t).name,class:o.normalizeClass(o.unref(t).attrs.class),"allow-duplicate":(f=o.unref(t).attrs.allowDuplicate)!=null?f:!0,"add-on-blur":(m=o.unref(t).attrs.addOnBlur)!=null?m:!1,max:(h=o.unref(t).attrs.max)!=null?h:void 0,onAdd:r,onRemove:r},null,8,["modelValue","id","name","class","allow-duplicate","add-on-blur","max"])}}}),Fr=o.defineComponent({__name:"PrimeKnob",props:{context:Object},setup(e){const t=e.context;function r(i){t==null||t.node.input(i),t==null||t.handlers.blur(i)}return(i,s)=>{var f,m,h,g,d,w,k,C,c,u;const l=o.resolveComponent("Knob");return o.openBlock(),o.createBlock(l,{modelValue:o.unref(t)._value,"onUpdate:modelValue":s[0]||(s[0]=p=>o.unref(t)._value=p),id:o.unref(t).id,name:o.unref(t).name,min:(f=o.unref(t).attrs.min)!=null?f:0,max:(m=o.unref(t).attrs.max)!=null?m:100,step:(h=o.unref(t).attrs.step)!=null?h:void 0,size:(g=o.unref(t).attrs.max)!=null?g:100,"stroke-width":(d=o.unref(t).attrs.strokeWidth)!=null?d:14,"show-value":(w=o.unref(t).attrs.showValue)!=null?w:!0,"value-color":(k=o.unref(t).attrs.valueColor)!=null?k:void 0,"range-color":(C=o.unref(t).attrs.rangeColor)!=null?C:void 0,"text-color":(c=o.unref(t).attrs.textColor)!=null?c:void 0,"value-template":(u=o.unref(t).attrs.valueTemplate)!=null?u:void 0,onChange:r},null,8,["modelValue","id","name","min","max","step","size","stroke-width","show-value","value-color","range-color","text-color","value-template"])}}}),pt=M(kr,{props:["iconRight","iconLeft"]}),dt=M(Cr,{props:["iconRight","iconLeft"]}),mt=M(wr,{props:[]}),yt=M(Sr,{props:["feedback","toggleMask"]}),ht=M(Vr,{props:["rows"]}),gt=M(Pr,{props:[]}),_t=M(vr,{props:[]}),bt=M(Br,{props:[]}),$t=M(Rr,{props:[]}),kt=M(jr,{props:[]}),Ct=M(Dr,{props:[]}),wt=M(Mr,{props:[]}),Lr=M(Tr,{props:[]}),St=M(xr,{props:[]}),Vt=M(Fr,{props:[]}),zr={primeInputText:pt,primeInputNumber:dt,primeInputMask:mt,primePassword:yt,primeCheckBox:gt,primeInputSwitch:_t,primeInputTextArea:ht,primeEditor:bt,primeDropdown:$t,primeMultiSelect:kt,primeCalendar:Ct,primeSlider:wt,primeChips:St,primeKnob:Vt};E.primeCalendarDefinition=Ct,E.primeCheckBoxDefinition=gt,E.primeChipsDefinition=St,E.primeDropdownDefinition=$t,E.primeEditorDefinition=bt,E.primeInputMaskDefinition=mt,E.primeInputNumberDefinition=dt,E.primeInputSwitchDefinition=_t,E.primeInputTextAreaDefinition=ht,E.primeInputTextDefinition=pt,E.primeInputs=zr,E.primeKnobDefinition=Vt,E.primeMultiSelectDefinition=kt,E.primePasswordDefinition=yt,E.primeRatingDefinition=Lr,E.primeSliderDefinition=wt,Object.defineProperties(E,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -0,0 +1,32 @@
1
+ import type { FormKitTypeDefinition } from '@formkit/core';
2
+ export declare const primeInputTextDefinition: FormKitTypeDefinition;
3
+ export declare const primeInputNumberDefinition: FormKitTypeDefinition;
4
+ export declare const primeInputMaskDefinition: FormKitTypeDefinition;
5
+ export declare const primePasswordDefinition: FormKitTypeDefinition;
6
+ export declare const primeInputTextAreaDefinition: FormKitTypeDefinition;
7
+ export declare const primeCheckBoxDefinition: FormKitTypeDefinition;
8
+ export declare const primeInputSwitchDefinition: FormKitTypeDefinition;
9
+ export declare const primeEditorDefinition: FormKitTypeDefinition;
10
+ export declare const primeDropdownDefinition: FormKitTypeDefinition;
11
+ export declare const primeMultiSelectDefinition: FormKitTypeDefinition;
12
+ export declare const primeCalendarDefinition: FormKitTypeDefinition;
13
+ export declare const primeSliderDefinition: FormKitTypeDefinition;
14
+ export declare const primeRatingDefinition: FormKitTypeDefinition;
15
+ export declare const primeChipsDefinition: FormKitTypeDefinition;
16
+ export declare const primeKnobDefinition: FormKitTypeDefinition;
17
+ export declare const primeInputs: {
18
+ primeInputText: FormKitTypeDefinition;
19
+ primeInputNumber: FormKitTypeDefinition;
20
+ primeInputMask: FormKitTypeDefinition;
21
+ primePassword: FormKitTypeDefinition;
22
+ primeCheckBox: FormKitTypeDefinition;
23
+ primeInputSwitch: FormKitTypeDefinition;
24
+ primeInputTextArea: FormKitTypeDefinition;
25
+ primeEditor: FormKitTypeDefinition;
26
+ primeDropdown: FormKitTypeDefinition;
27
+ primeMultiSelect: FormKitTypeDefinition;
28
+ primeCalendar: FormKitTypeDefinition;
29
+ primeSlider: FormKitTypeDefinition;
30
+ primeChips: FormKitTypeDefinition;
31
+ primeKnob: FormKitTypeDefinition;
32
+ };
@@ -0,0 +1,156 @@
1
+ [
2
+ {
3
+ "$el": "h1",
4
+ "children": [
5
+ "Register New ",
6
+ "$myGroup.email"
7
+ ]
8
+ },
9
+ {
10
+ "$el": "h3",
11
+ "children": [
12
+ "Header Text H3"
13
+ ]
14
+ },
15
+ {
16
+ "$formkit": "group",
17
+ "name": "myGroup",
18
+ "children": [
19
+ {
20
+ "$formkit": "primeInputText",
21
+ "name": "email",
22
+ "label": "Email",
23
+ "help": "This will be used for your account.",
24
+ "validation": "required|email",
25
+ "class": "test"
26
+ },
27
+ {
28
+ "$formkit": "primeInputTextArea",
29
+ "name": "myText",
30
+ "label": "Text",
31
+ "validation": "",
32
+ "rows": "5",
33
+ "class": "test"
34
+ }
35
+ ]
36
+ },
37
+ {
38
+ "$formkit": "primeEditor",
39
+ "name": "myEditor",
40
+ "label": "Editor",
41
+ "validation": "",
42
+ "class": "test"
43
+ },
44
+ {
45
+ "$formkit": "primeCalendar",
46
+ "name": "myCalendar",
47
+ "label": "Calendar",
48
+ "validation": "",
49
+ "class": "test",
50
+ "dateFormat": "dd.mm.yy",
51
+ "showIcon": true
52
+ },
53
+ {
54
+ "$el": "div",
55
+ "attrs": {
56
+ "class": "double"
57
+ },
58
+ "children": [
59
+ {
60
+ "$formkit": "primeInputText",
61
+ "name": "password",
62
+ "label": "Password",
63
+ "help": "Enter your new password.",
64
+ "validation": "required|length:5,16",
65
+ "validationVisibility": "live",
66
+ "class": "test"
67
+ },
68
+ {
69
+ "$formkit": "primePassword",
70
+ "name": "password_confirm",
71
+ "label": "Confirm password",
72
+ "toggleMask": true,
73
+ "feedback": false,
74
+ "help": "Enter your new password again to confirm it.",
75
+ "validation": "required|confirm",
76
+ "validationLabel": "password confirmation",
77
+ "class": "test"
78
+ }
79
+ ]
80
+ },
81
+ {
82
+ "$formkit": "primeCheckBox",
83
+ "name": "eu_citizen",
84
+ "id": "eu",
85
+ "label": "Are you a european citizen?",
86
+ "class": "test",
87
+ "labelLeft": "Left Label: ",
88
+ "labelRight": "Right Label"
89
+ },
90
+ {
91
+ "$formkit": "primeInputSwitch",
92
+ "name": "primeInputSwitch",
93
+ "id": "primeInputSwitch",
94
+ "labelLeft": "Left Label: ",
95
+ "labelRight": "Right Label"
96
+ },
97
+ {
98
+ "$formkit": "primeSlider",
99
+ "name": "slider",
100
+ "label": "Use Slider",
101
+ "min": 5,
102
+ "step": 5,
103
+ "value": 10
104
+ },
105
+ {
106
+ "$formkit": "primeDropdown",
107
+ "if": "$eu_citizen",
108
+ "name": "cookie_notice",
109
+ "label": "Cookie notice frequency",
110
+ "value": "hourly",
111
+ "options":[
112
+ {
113
+ "label": "Every page load",
114
+ "value": "refresh"
115
+ },
116
+ {
117
+ "label": "Ever hour",
118
+ "value": "hourly"
119
+ },
120
+ {
121
+ "label": "Every day",
122
+ "value": "daily"
123
+ }
124
+ ],
125
+ "showClear": false,
126
+ "filter": false,
127
+ "help": "How often should we display a cookie notice?",
128
+ "class": "test"
129
+ },
130
+ {
131
+ "$formkit": "primeMultiSelect",
132
+ "name": "cookie_notice2",
133
+ "label": "Cookie notice frequency",
134
+ "value": [
135
+ "hourly"
136
+ ],
137
+ "options": [
138
+ {
139
+ "label": "Every page load",
140
+ "value": "refresh"
141
+ },
142
+ {
143
+ "label": "Ever hour",
144
+ "value": "hourly"
145
+ },
146
+ {
147
+ "label": "Every Single day",
148
+ "value": "daily"
149
+ }
150
+ ],
151
+ "showClear": true,
152
+ "filter": true,
153
+ "help": "How often should we display a cookie notice?",
154
+ "class": "test"
155
+ }
156
+ ]
@@ -0,0 +1,7 @@
1
+ {
2
+ "src/formkit/index.ts": {
3
+ "file": "formkit-primevue.umd.js",
4
+ "src": "src/formkit/index.ts",
5
+ "isEntry": true
6
+ }
7
+ }
@@ -0,0 +1,55 @@
1
+ .formkit-inner {
2
+ .p-inputtext {
3
+ width: 300px;
4
+ }
5
+
6
+ .p-slider {
7
+ width: 300px;
8
+ margin-top: 10px;
9
+
10
+ }
11
+
12
+ .p-calendar {
13
+ .p-inputtext {
14
+ width: 150px;
15
+ }
16
+ }
17
+
18
+ .p-dropdown {
19
+ .p-inputtext {
20
+ width: 250px;
21
+ }
22
+ }
23
+
24
+ .p-multiselect {
25
+ .p-multiselect-label {
26
+ width: 250px;
27
+ }
28
+ }
29
+
30
+ .p-editor-container {
31
+ width: 300px;
32
+ height: 250px;
33
+ margin-bottom: 90px;
34
+ }
35
+ }
36
+
37
+ .formkit-outer[data-type="primeInputSwitch"], .formkit-outer[data-type="primeCheckBox"] {
38
+ .formkit-inner {
39
+ width: 300px;
40
+
41
+ .formkit-prime-right {
42
+ margin-left: 10px;
43
+ font-weight: bold;
44
+ font-size: 0.75rem;
45
+ }
46
+
47
+ .formkit-prime-left {
48
+ margin-right: 10px;
49
+ font-weight: bold;
50
+ font-size: 0.75rem;
51
+ }
52
+ }
53
+ }
54
+
55
+
@@ -0,0 +1,87 @@
1
+ .formkit-form > .formkit-messages {
2
+ margin: 4px;
3
+ .formkit-message {
4
+ font-size: 0.8rem;
5
+ }
6
+ }
7
+
8
+ .formkit-outer {
9
+ margin: 4px;
10
+ padding-bottom: 10px;
11
+ width: 400px;
12
+ }
13
+
14
+ .formkit-wrapper,
15
+ .formkit-fieldset {
16
+ max-width: 0;
17
+
18
+ }
19
+
20
+ .formkit-label {
21
+ display: block;
22
+ margin: 0;
23
+ padding-bottom: 4px;
24
+ width: 300px;
25
+ font-weight: bold;
26
+ font-size: 0.75rem;
27
+ }
28
+
29
+ .formkit-fieldset {
30
+ margin: 0;
31
+ padding: 0;
32
+ border-radius: 0;
33
+ border: 0;
34
+
35
+ &:focus-within {
36
+ border: 0;
37
+ }
38
+
39
+ & > .formkit-help {
40
+ margin-top: 0;
41
+ margin-bottom: 0;
42
+ }
43
+ }
44
+
45
+ .formkit-legend {
46
+ display: block;
47
+ margin: 0;
48
+ padding: 0;
49
+ }
50
+
51
+ .formkit-inner {
52
+ position: relative;
53
+ border-radius: 0;
54
+ display: flex;
55
+ align-items: center;
56
+
57
+ width: fit-content;
58
+
59
+ &:focus-within {
60
+
61
+ }
62
+
63
+ }
64
+
65
+ .formkit-help {
66
+ margin: 0;
67
+ font-size: 0.80rem;
68
+ color: var(--text-color-secondary);
69
+ }
70
+
71
+ .formkit-messages {
72
+ padding: 0;
73
+ margin: 0;
74
+ }
75
+
76
+ .formkit-help + .formkit-messages {
77
+ padding-top: 0;
78
+ }
79
+
80
+ .formkit-message {
81
+ padding: 0;
82
+ margin: 0;
83
+ color: #ef9a9a;
84
+ list-style: none;
85
+ font-size: 0.75rem;
86
+
87
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sfxcode/formkit-primevue",
3
- "version": "0.7.1",
3
+ "version": "0.7.2",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/sfxcode/formkit-primevue",