ablok-components 0.0.6 → 0.0.9
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.
- package/dist/ablok-components.es.js +940 -23
- package/dist/ablok-components.umd.js +9 -4
- package/dist/components/base-button.vue.d.ts +36 -22
- package/dist/components/base-form.vue.d.ts +23 -0
- package/dist/components/base-input.vue.d.ts +121 -0
- package/dist/components/check-group.vue.d.ts +88 -0
- package/dist/components/helpers.d.ts +1 -0
- package/dist/components/radio-group.vue.d.ts +88 -0
- package/dist/index.d.ts +4 -0
- package/dist/store/index.d.ts +26 -0
- package/dist/style.css +1 -1
- package/package.json +4 -1
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
(function(
|
|
2
|
-
`)();const
|
|
3
|
-
`)();const
|
|
4
|
-
`)();const
|
|
1
|
+
(function(b,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(b=typeof globalThis!="undefined"?globalThis:b||self,t(b.AblokComponents={},b.Vue))})(this,function(b,t){"use strict";var tt=(()=>`.base-icon{display:inline-block}.base-icon svg{display:block;stroke-width:0;stroke:currentColor;fill:currentColor;width:1.5em;height:1.5em}.base-icon--xxl svg{width:12rem;height:12rem}.base-icon--xl svg{width:8rem;height:8rem}.base-icon--large svg{width:4rem;height:4rem}
|
|
2
|
+
`)();const ne=t.defineComponent({__name:"base-icon",props:{id:{type:String,default:""},size:{type:String,default:"default"}},setup(e){return(a,o)=>{const n=t.resolveComponent("SvgSprite");return t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(["base-icon",{[`base-icon--${e.size}`]:e.size}])},[t.createVNode(n,{symbol:`icon-${e.id}`,role:"presentation"},null,8,["symbol"])],2)}}});var nt=(()=>`.loading-spinner{min-width:2rem}
|
|
3
|
+
`)();const oe={class:"loading-spinner d-block"},ae={class:"loading-spinner__animation"},re={class:"d-block",version:"1.1",id:"L9",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 100 100","enable-background":"new 0 0 0 0","xml:space":"preserve"},le=["fill"],ie=[t.createElementVNode("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",dur:"1s",from:"0 50 50",to:"360 50 50",repeatCount:"indefinite"},null,-1)],se=t.defineComponent({__name:"loading-spinner",props:{color:{type:String,default:"#fff"}},setup(e){return(a,o)=>(t.openBlock(),t.createElementBlock("span",oe,[t.createElementVNode("span",ae,[(t.openBlock(),t.createElementBlock("svg",re,[t.createElementVNode("path",{fill:e.color,d:"M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50"},ie,8,le)]))]),t.renderSlot(a.$slots,"default")]))}});var at=(()=>`.base-button{display:flex;justify-content:center;align-items:center;box-sizing:border-box;transition:all .2s ease;text-decoration:none;width:100%;margin:0;padding:1.036em 1.625em;appearance:none;outline:none;border:none;border-radius:.4375em;font-size:.875em;line-height:1.125em;text-transform:uppercase;font-weight:700}@media screen and (min-width: 600px){.base-button{width:auto}}.base-button .icon{width:16px;height:16px;margin-top:-1px}.base-button.s-collapsed>.caption{display:none}.base-button.s-pending{background-repeat:no-repeat;background-position:center center}.base-button.s-pending .caption{margin-left:25px;visibility:hidden}@media screen and (min-width: 600px){.base-button.s-pending{background-position:1.625em center}.base-button.s-pending .caption{visibility:visible}}.base-button[readonly],.base-button[disabled]{cursor:not-allowed}
|
|
4
|
+
`)();const ce=["type","disabled","href","to"],de=t.defineComponent({__name:"base-button",props:{type:null,caption:null,variant:null,size:null,icon:null,href:null,to:null,disabled:{type:Boolean},pending:{type:Boolean},outlined:{type:Boolean},rounded:{type:Boolean},fab:{type:Boolean}},setup(e){const a=e,o=t.computed(()=>a.caption&&!a.fab);return(n,r)=>{const l=t.resolveComponent("base-icon");return t.openBlock(),t.createElementBlock("button",{type:e.type,disabled:e.disabled,href:e.href,to:e.to,class:t.normalizeClass(["base-button",{disabled:e.disabled,pending:e.pending,rounded:e.rounded,outlined:e.outlined,fab:e.fab,"x-large":e.size==="x-large",large:e.size==="large",small:e.size==="small","x-small":e.size==="x-small"}])},[t.renderSlot(n.$slots,"default",{},()=>[e.icon?(t.openBlock(),t.createBlock(l,{key:0,id:e.icon,class:"base-button__caption"},null,8,["id"])):t.createCommentVNode("",!0),t.unref(o)?(t.openBlock(),t.createElementBlock("span",{key:1,class:t.normalizeClass(["base-button__caption",{"icon-padding":e.icon}])},t.toDisplayString(e.caption),3)):t.createCommentVNode("",!0)])],10,ce)}}});function $(){return(new Date().valueOf()+Math.random()).toString(36)}const ue={class:"base-input"},fe=["type","name","id","label","placeholder","pattern","disabled","read-only","required","maxlength","checked"],me=["for"],pe=t.defineComponent({__name:"base-input",props:{modelValue:{type:[String,Number,Boolean],default:""},type:{type:String,default:"text"},name:{type:String,default:()=>$()},id:{type:String,default:()=>$()},label:{type:String,default:""},placeholder:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},maxlength:{type:Number},pattern:{type:String,default:null},checked:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:a}){const o=e,n=t.computed({get(){return o.modelValue},set(r){a("update:modelValue",r)}});return(r,l)=>(t.openBlock(),t.createElementBlock("div",ue,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=s=>t.isRef(n)?n.value=s:null),type:e.type,name:e.name,id:e.id,label:`${e.label}${e.required?" *":""}`,placeholder:e.placeholder,pattern:e.pattern,disabled:e.disabled,"read-only":e.readOnly,required:e.required,maxlength:e.maxlength,checked:e.checked},null,8,fe),[[t.vModelDynamic,t.unref(n)]]),t.createElementVNode("label",{for:e.id},[t.renderSlot(r.$slots,"label",{},()=>[t.createTextVNode(t.toDisplayString(e.label),1)])],8,me)]))}}),be={class:"radio-group"},ye=["for"],ge=t.defineComponent({__name:"check-group",props:{modelValue:{default:[]},options:{type:Array,default:[]},name:{type:String,default:()=>$()},id:{type:String,default:()=>$()},label:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1}},emits:["change","update:modelValue"],setup(e,{emit:a}){const o=e,n=t.ref([]);return t.watch(()=>o.modelValue,(r,l)=>{n.value=o.options.map(s=>s.value?o.modelValue.some(i=>i["value "]===s.value):o.modelValue.some(i=>i===s))},{immediate:!0}),t.watch(n,(r,l)=>{const s=r.reduce((i,d,m)=>{const p=d&&o.options[m]?[o.options[m]||o.options[m]]:[];return[...i,...p]},[]);a("update:modelValue",s)},{deep:!0}),t.onBeforeMount(()=>{}),(r,l)=>{const s=t.resolveComponent("base-input");return t.openBlock(),t.createElementBlock("div",be,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.options,(i,d)=>(t.openBlock(),t.createBlock(s,{key:d,modelValue:t.unref(n)[d],"onUpdate:modelValue":m=>t.unref(n)[d]=m,type:"checkbox",name:e.name,id:`${e.id}-${d}`,label:`${i.text||i}${e.required?" *":""}`,disabled:e.disabled,"read-only":e.readOnly,required:e.required},null,8,["modelValue","onUpdate:modelValue","name","id","label","disabled","read-only","required"]))),128)),t.createElementVNode("label",{for:e.id},[t.renderSlot(r.$slots,"label",{},()=>[t.createTextVNode(t.toDisplayString(e.label),1)])],8,ye)])}}}),he={class:"radio-group"},we=["for"],Se=t.defineComponent({__name:"radio-group",props:{modelValue:{default:!1},options:{type:Array,default:[]},name:{type:String,default:()=>$()},id:{type:String,default:()=>$()},label:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1}},emits:["change","update:modelValue"],setup(e,{emit:a}){const o=e;t.ref(o.options.map(r=>r.value===o.modelValue));function n(r){a("update:modelValue",r)}return t.onBeforeMount(()=>{}),(r,l)=>{const s=t.resolveComponent("base-input");return t.openBlock(),t.createElementBlock("div",he,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.options,(i,d)=>(t.openBlock(),t.createBlock(s,{key:d,type:"radio",name:e.name,id:`${e.id}-${d}`,value:i.value||i,label:`${i.text||i}${e.required?" *":""}`,checked:i.value?i.value===e.modelValue:i===e.modelValue,disabled:e.disabled,"read-only":e.readOnly,required:e.required,onChange:m=>n(i)},null,8,["name","id","value","label","checked","disabled","read-only","required","onChange"]))),128)),t.createElementVNode("label",{for:e.id},[t.renderSlot(r.$slots,"label",{},()=>[t.createTextVNode(t.toDisplayString(e.label),1)])],8,we)])}}});/*!
|
|
5
|
+
* pinia v2.0.14
|
|
6
|
+
* (c) 2022 Eduardo San Martin Morote
|
|
7
|
+
* @license MIT
|
|
8
|
+
*/let W;const F=e=>W=e,_e=Symbol();function I(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var x;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(x||(x={}));const J=()=>{};function H(e,a,o,n=J){e.push(a);const r=()=>{const l=e.indexOf(a);l>-1&&(e.splice(l,1),n())};return!o&&t.getCurrentInstance()&&t.onUnmounted(r),r}function N(e,...a){e.slice().forEach(o=>{o(...a)})}function R(e,a){for(const o in a){if(!a.hasOwnProperty(o))continue;const n=a[o],r=e[o];I(r)&&I(n)&&e.hasOwnProperty(o)&&!t.isRef(n)&&!t.isReactive(n)?e[o]=R(r,n):e[o]=n}return e}const ke=Symbol();function Be(e){return!I(e)||!e.hasOwnProperty(ke)}const{assign:k}=Object;function $e(e){return!!(t.isRef(e)&&e.effect)}function Ne(e,a,o,n){const{state:r,actions:l,getters:s}=a,i=o.state.value[e];let d;function m(){i||(o.state.value[e]=r?r():{});const p=t.toRefs(o.state.value[e]);return k(p,l,Object.keys(s||{}).reduce((_,g)=>(_[g]=t.markRaw(t.computed(()=>{F(o);const h=o._s.get(e);return s[g].call(h,h)})),_),{}))}return d=G(e,m,a,o,n,!0),d.$reset=function(){const _=r?r():{};this.$patch(g=>{k(g,_)})},d}function G(e,a,o={},n,r,l){let s;const i=k({actions:{}},o),d={deep:!0};let m,p,_=t.markRaw([]),g=t.markRaw([]),h;const S=n.state.value[e];!l&&!S&&(n.state.value[e]={}),t.ref({});let v;function O(c){let f;m=p=!1,typeof c=="function"?(c(n.state.value[e]),f={type:x.patchFunction,storeId:e,events:h}):(R(n.state.value[e],c),f={type:x.patchObject,payload:c,storeId:e,events:h});const B=v=Symbol();t.nextTick().then(()=>{v===B&&(m=!0)}),p=!0,N(_,f,n.state.value[e])}const D=J;function T(){s.stop(),_=[],g=[],n._s.delete(e)}function U(c,f){return function(){F(n);const B=Array.from(arguments),E=[],C=[];function Ze(w){E.push(w)}function et(w){C.push(w)}N(g,{args:B,name:c,store:y,after:Ze,onError:et});let P;try{P=f.apply(this&&this.$id===e?this:y,B)}catch(w){throw N(C,w),w}return P instanceof Promise?P.then(w=>(N(E,w),w)).catch(w=>(N(C,w),Promise.reject(w))):(N(E,P),P)}}const M={_p:n,$id:e,$onAction:H.bind(null,g),$patch:O,$reset:D,$subscribe(c,f={}){const B=H(_,c,f.detached,()=>E()),E=s.run(()=>t.watch(()=>n.state.value[e],C=>{(f.flush==="sync"?p:m)&&c({storeId:e,type:x.direct,events:h},C)},k({},d,f)));return B},$dispose:T},y=t.reactive(k({},M));n._s.set(e,y);const u=n._e.run(()=>(s=t.effectScope(),s.run(()=>a())));for(const c in u){const f=u[c];if(t.isRef(f)&&!$e(f)||t.isReactive(f))l||(S&&Be(f)&&(t.isRef(f)?f.value=S[c]:R(f,S[c])),n.state.value[e][c]=f);else if(typeof f=="function"){const B=U(c,f);u[c]=B,i.actions[c]=f}}return k(y,u),k(t.toRaw(y),u),Object.defineProperty(y,"$state",{get:()=>n.state.value[e],set:c=>{O(f=>{k(f,c)})}}),n._p.forEach(c=>{k(y,s.run(()=>c({store:y,app:n._a,pinia:n,options:i})))}),S&&l&&o.hydrate&&o.hydrate(y.$state,S),m=!0,p=!0,y}function Oe(e,a,o){let n,r;const l=typeof a=="function";typeof e=="string"?(n=e,r=l?o:a):(r=e,n=e.id);function s(i,d){const m=t.getCurrentInstance();return i=i||m&&t.inject(_e),i&&F(i),i=W,i._s.has(n)||(l?G(n,a,r,i):Ne(n,r,i)),i._s.get(n)}return s.$id=n,s}function xe(e){return t.getCurrentScope()?(t.onScopeDispose(e),!0):!1}var K;const V=typeof window!="undefined",Ve=e=>typeof e=="string",z=()=>{};V&&((K=window==null?void 0:window.navigator)==null?void 0:K.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Ee(e,a){function o(...n){e(()=>a.apply(this,n),{fn:a,thisArg:this,args:n})}return o}const X=e=>e();function Ce(e=X){const a=t.ref(!0);function o(){a.value=!1}function n(){a.value=!0}return{isActive:a,pause:o,resume:n,eventFilter:(...l)=>{a.value&&e(...l)}}}var Q=Object.getOwnPropertySymbols,Pe=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,ve=(e,a)=>{var o={};for(var n in e)Pe.call(e,n)&&a.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&Q)for(var n of Q(e))a.indexOf(n)<0&&je.call(e,n)&&(o[n]=e[n]);return o};function Fe(e,a,o={}){const n=o,{eventFilter:r=X}=n,l=ve(n,["eventFilter"]);return t.watch(e,Ee(r,a),l)}var Ie=Object.defineProperty,Re=Object.defineProperties,ze=Object.getOwnPropertyDescriptors,j=Object.getOwnPropertySymbols,Y=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable,ee=(e,a,o)=>a in e?Ie(e,a,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[a]=o,qe=(e,a)=>{for(var o in a||(a={}))Y.call(a,o)&&ee(e,o,a[o]);if(j)for(var o of j(a))Z.call(a,o)&&ee(e,o,a[o]);return e},Le=(e,a)=>Re(e,ze(a)),Ae=(e,a)=>{var o={};for(var n in e)Y.call(e,n)&&a.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&j)for(var n of j(e))a.indexOf(n)<0&&Z.call(e,n)&&(o[n]=e[n]);return o};function De(e,a,o={}){const n=o,{eventFilter:r}=n,l=Ae(n,["eventFilter"]),{eventFilter:s,pause:i,resume:d,isActive:m}=Ce(r);return{stop:Fe(e,a,Le(qe({},l),{eventFilter:s})),pause:i,resume:d,isActive:m}}function Te(e){var a;const o=t.unref(e);return(a=o==null?void 0:o.$el)!=null?a:o}const q=V?window:void 0;V&&window.document,V&&window.navigator,V&&window.location;function Ue(...e){let a,o,n,r;if(Ve(e[0])?([o,n,r]=e,a=q):[a,o,n,r]=e,!a)return z;let l=z;const s=t.watch(()=>Te(a),d=>{l(),d&&(d.addEventListener(o,n,r),l=()=>{d.removeEventListener(o,n,r),l=z})},{immediate:!0,flush:"post"}),i=()=>{s(),l()};return xe(i),i}const L=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},A="__vueuse_ssr_handlers__";L[A]=L[A]||{};const Me=L[A];function We(e,a){return Me[e]||a}function Je(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"||Array.isArray(e)?"object":Number.isNaN(e)?"any":"number"}const He={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}};function Ge(e,a,o,n={}){var r;const{flush:l="pre",deep:s=!0,listenToStorageChanges:i=!0,writeDefaults:d=!0,shallow:m,window:p=q,eventFilter:_,onError:g=u=>{console.error(u)}}=n,h=(m?t.shallowRef:t.ref)(a);if(!o)try{o=We("getDefaultStorage",()=>{var u;return(u=q)==null?void 0:u.localStorage})()}catch(u){g(u)}if(!o)return h;const S=t.unref(a),v=Je(S),O=(r=n.serializer)!=null?r:He[v],{pause:D,resume:T}=De(h,()=>U(h.value),{flush:l,deep:s,eventFilter:_});return p&&i&&Ue(p,"storage",y),y(),h;function U(u){try{u==null?o.removeItem(e):o.setItem(e,O.write(u))}catch(c){g(c)}}function M(u){if(!(u&&u.key!==e)){D();try{const c=u?u.newValue:o.getItem(e);return c==null?(d&&S!==null&&o.setItem(e,O.write(S)),S):typeof c!="string"?c:O.read(c)}catch(c){g(c)}finally{T()}}}function y(u){u&&u.key!==e||(h.value=M(u))}}var te;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(te||(te={}));const Ke=Oe("auth/user",{state:()=>({firstName:Ge("firstName",""),lastName:"",userId:null}),getters:{fullName:e=>`${e.firstName} ${e.lastName}`,loggedIn:e=>e.userId!==null,fullUserDetails(e){return{...e,fullName:this.fullName}}},actions:{updateUser(e){this.firstName=e.firstName,this.lastName=e.lastName,this.userId=e.userId},clearUser(){this.$reset()}}});var rt=(()=>`.base-button{display:flex;justify-content:center;align-items:center;box-sizing:border-box;transition:all .2s ease;text-decoration:none;width:100%;margin:0;padding:1.036em 1.625em;appearance:none;outline:none;border:none;border-radius:.4375em;font-size:.875em;line-height:1.125em;text-transform:uppercase;font-weight:700}@media screen and (min-width: 600px){.base-button{width:auto}}.base-button .icon{width:16px;height:16px;margin-top:-1px}.base-button.s-collapsed>.caption{display:none}.base-button.s-pending{background-repeat:no-repeat;background-position:center center}.base-button.s-pending .caption{margin-left:25px;visibility:hidden}@media screen and (min-width: 600px){.base-button.s-pending{background-position:1.625em center}.base-button.s-pending .caption{visibility:visible}}.base-button[readonly],.base-button[disabled]{cursor:not-allowed}
|
|
9
|
+
`)();const Xe={class:"base-form"},Qe=["onSubmit"],Ye=t.defineComponent({__name:"base-form",props:{id:null,name:null,variant:null,disabled:{type:Boolean},pending:{type:Boolean}},setup(e){const a=Ke();t.computed(()=>a.firstName),t.computed(()=>a.fullName);function o(l){a.updateUser({firstName:l.target.value}),console.log("input",l)}function n(l){console.log("reset",l)}function r(l){console.log("submit",l)}return(l,s)=>(t.openBlock(),t.createElementBlock("div",Xe,[t.createElementVNode("form",{ref:"form",onInput:o,onReset:n,onSubmit:t.withModifiers(r,["prevent"])},[t.renderSlot(l.$slots,"default")],40,Qe)]))}});b.BaseButton=de,b.BaseForm=Ye,b.BaseIcon=ne,b.BaseInput=pe,b.CheckGroup=ge,b.LoadingSpinner=se,b.RadioGroup=Se,Object.defineProperties(b,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -1,23 +1,37 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
+
type?: "button" | "submit" | "reset" | undefined;
|
|
3
|
+
caption?: string | undefined;
|
|
4
|
+
variant?: string | undefined;
|
|
5
|
+
size?: string | undefined;
|
|
6
|
+
icon?: string | undefined;
|
|
7
|
+
href?: string | undefined;
|
|
8
|
+
to?: any;
|
|
9
|
+
disabled?: boolean | undefined;
|
|
10
|
+
pending?: boolean | undefined;
|
|
11
|
+
outlined?: boolean | undefined;
|
|
12
|
+
rounded?: boolean | undefined;
|
|
13
|
+
fab?: boolean | undefined;
|
|
14
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
15
|
+
type?: "button" | "submit" | "reset" | undefined;
|
|
16
|
+
caption?: string | undefined;
|
|
17
|
+
variant?: string | undefined;
|
|
18
|
+
size?: string | undefined;
|
|
19
|
+
icon?: string | undefined;
|
|
20
|
+
href?: string | undefined;
|
|
21
|
+
to?: any;
|
|
22
|
+
disabled?: boolean | undefined;
|
|
23
|
+
pending?: boolean | undefined;
|
|
24
|
+
outlined?: boolean | undefined;
|
|
25
|
+
rounded?: boolean | undefined;
|
|
26
|
+
fab?: boolean | undefined;
|
|
27
|
+
}>>>, {}>;
|
|
23
28
|
export default _default;
|
|
29
|
+
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
30
|
+
declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
31
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
32
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
33
|
+
} : {
|
|
34
|
+
type: import('vue').PropType<T[K]>;
|
|
35
|
+
required: true;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
+
id?: string | undefined;
|
|
3
|
+
name?: string | undefined;
|
|
4
|
+
variant?: string | undefined;
|
|
5
|
+
disabled?: boolean | undefined;
|
|
6
|
+
pending?: boolean | undefined;
|
|
7
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
8
|
+
id?: string | undefined;
|
|
9
|
+
name?: string | undefined;
|
|
10
|
+
variant?: string | undefined;
|
|
11
|
+
disabled?: boolean | undefined;
|
|
12
|
+
pending?: boolean | undefined;
|
|
13
|
+
}>>>, {}>;
|
|
14
|
+
export default _default;
|
|
15
|
+
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
16
|
+
declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
17
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
18
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
19
|
+
} : {
|
|
20
|
+
type: import('vue').PropType<T[K]>;
|
|
21
|
+
required: true;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
modelValue: {
|
|
3
|
+
type: (BooleanConstructor | StringConstructor | NumberConstructor)[];
|
|
4
|
+
default: string;
|
|
5
|
+
};
|
|
6
|
+
type: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
name: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: () => string;
|
|
13
|
+
};
|
|
14
|
+
id: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
default: () => string;
|
|
17
|
+
};
|
|
18
|
+
label: {
|
|
19
|
+
type: StringConstructor;
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
placeholder: {
|
|
23
|
+
type: StringConstructor;
|
|
24
|
+
default: string;
|
|
25
|
+
};
|
|
26
|
+
variant: {
|
|
27
|
+
type: StringConstructor;
|
|
28
|
+
default: string;
|
|
29
|
+
};
|
|
30
|
+
disabled: {
|
|
31
|
+
type: BooleanConstructor;
|
|
32
|
+
default: boolean;
|
|
33
|
+
};
|
|
34
|
+
readOnly: {
|
|
35
|
+
type: BooleanConstructor;
|
|
36
|
+
default: boolean;
|
|
37
|
+
};
|
|
38
|
+
required: {
|
|
39
|
+
type: BooleanConstructor;
|
|
40
|
+
default: boolean;
|
|
41
|
+
};
|
|
42
|
+
maxlength: {
|
|
43
|
+
type: NumberConstructor;
|
|
44
|
+
};
|
|
45
|
+
pattern: {
|
|
46
|
+
type: StringConstructor;
|
|
47
|
+
default: null;
|
|
48
|
+
};
|
|
49
|
+
checked: {
|
|
50
|
+
type: BooleanConstructor;
|
|
51
|
+
default: boolean;
|
|
52
|
+
};
|
|
53
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
54
|
+
modelValue: {
|
|
55
|
+
type: (BooleanConstructor | StringConstructor | NumberConstructor)[];
|
|
56
|
+
default: string;
|
|
57
|
+
};
|
|
58
|
+
type: {
|
|
59
|
+
type: StringConstructor;
|
|
60
|
+
default: string;
|
|
61
|
+
};
|
|
62
|
+
name: {
|
|
63
|
+
type: StringConstructor;
|
|
64
|
+
default: () => string;
|
|
65
|
+
};
|
|
66
|
+
id: {
|
|
67
|
+
type: StringConstructor;
|
|
68
|
+
default: () => string;
|
|
69
|
+
};
|
|
70
|
+
label: {
|
|
71
|
+
type: StringConstructor;
|
|
72
|
+
default: string;
|
|
73
|
+
};
|
|
74
|
+
placeholder: {
|
|
75
|
+
type: StringConstructor;
|
|
76
|
+
default: string;
|
|
77
|
+
};
|
|
78
|
+
variant: {
|
|
79
|
+
type: StringConstructor;
|
|
80
|
+
default: string;
|
|
81
|
+
};
|
|
82
|
+
disabled: {
|
|
83
|
+
type: BooleanConstructor;
|
|
84
|
+
default: boolean;
|
|
85
|
+
};
|
|
86
|
+
readOnly: {
|
|
87
|
+
type: BooleanConstructor;
|
|
88
|
+
default: boolean;
|
|
89
|
+
};
|
|
90
|
+
required: {
|
|
91
|
+
type: BooleanConstructor;
|
|
92
|
+
default: boolean;
|
|
93
|
+
};
|
|
94
|
+
maxlength: {
|
|
95
|
+
type: NumberConstructor;
|
|
96
|
+
};
|
|
97
|
+
pattern: {
|
|
98
|
+
type: StringConstructor;
|
|
99
|
+
default: null;
|
|
100
|
+
};
|
|
101
|
+
checked: {
|
|
102
|
+
type: BooleanConstructor;
|
|
103
|
+
default: boolean;
|
|
104
|
+
};
|
|
105
|
+
}>> & {
|
|
106
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
107
|
+
}, {
|
|
108
|
+
id: string;
|
|
109
|
+
checked: boolean;
|
|
110
|
+
required: boolean;
|
|
111
|
+
type: string;
|
|
112
|
+
label: string;
|
|
113
|
+
pattern: string;
|
|
114
|
+
modelValue: string | number | boolean;
|
|
115
|
+
name: string;
|
|
116
|
+
variant: string;
|
|
117
|
+
disabled: boolean;
|
|
118
|
+
placeholder: string;
|
|
119
|
+
readOnly: boolean;
|
|
120
|
+
}>;
|
|
121
|
+
export default _default;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
modelValue: {
|
|
4
|
+
default: never[];
|
|
5
|
+
};
|
|
6
|
+
options: {
|
|
7
|
+
type: PropType<any[]>;
|
|
8
|
+
default: never[];
|
|
9
|
+
};
|
|
10
|
+
name: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: () => string;
|
|
13
|
+
};
|
|
14
|
+
id: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
default: () => string;
|
|
17
|
+
};
|
|
18
|
+
label: {
|
|
19
|
+
type: StringConstructor;
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
variant: {
|
|
23
|
+
type: StringConstructor;
|
|
24
|
+
default: string;
|
|
25
|
+
};
|
|
26
|
+
disabled: {
|
|
27
|
+
type: BooleanConstructor;
|
|
28
|
+
default: boolean;
|
|
29
|
+
};
|
|
30
|
+
readOnly: {
|
|
31
|
+
type: BooleanConstructor;
|
|
32
|
+
default: boolean;
|
|
33
|
+
};
|
|
34
|
+
required: {
|
|
35
|
+
type: BooleanConstructor;
|
|
36
|
+
default: boolean;
|
|
37
|
+
};
|
|
38
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
39
|
+
modelValue: {
|
|
40
|
+
default: never[];
|
|
41
|
+
};
|
|
42
|
+
options: {
|
|
43
|
+
type: PropType<any[]>;
|
|
44
|
+
default: never[];
|
|
45
|
+
};
|
|
46
|
+
name: {
|
|
47
|
+
type: StringConstructor;
|
|
48
|
+
default: () => string;
|
|
49
|
+
};
|
|
50
|
+
id: {
|
|
51
|
+
type: StringConstructor;
|
|
52
|
+
default: () => string;
|
|
53
|
+
};
|
|
54
|
+
label: {
|
|
55
|
+
type: StringConstructor;
|
|
56
|
+
default: string;
|
|
57
|
+
};
|
|
58
|
+
variant: {
|
|
59
|
+
type: StringConstructor;
|
|
60
|
+
default: string;
|
|
61
|
+
};
|
|
62
|
+
disabled: {
|
|
63
|
+
type: BooleanConstructor;
|
|
64
|
+
default: boolean;
|
|
65
|
+
};
|
|
66
|
+
readOnly: {
|
|
67
|
+
type: BooleanConstructor;
|
|
68
|
+
default: boolean;
|
|
69
|
+
};
|
|
70
|
+
required: {
|
|
71
|
+
type: BooleanConstructor;
|
|
72
|
+
default: boolean;
|
|
73
|
+
};
|
|
74
|
+
}>> & {
|
|
75
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
76
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
77
|
+
}, {
|
|
78
|
+
id: string;
|
|
79
|
+
required: boolean;
|
|
80
|
+
label: string;
|
|
81
|
+
modelValue: never[];
|
|
82
|
+
name: string;
|
|
83
|
+
options: any[];
|
|
84
|
+
variant: string;
|
|
85
|
+
disabled: boolean;
|
|
86
|
+
readOnly: boolean;
|
|
87
|
+
}>;
|
|
88
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function uniqueId(): string;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
modelValue: {
|
|
4
|
+
default: boolean;
|
|
5
|
+
};
|
|
6
|
+
options: {
|
|
7
|
+
type: PropType<any[]>;
|
|
8
|
+
default: never[];
|
|
9
|
+
};
|
|
10
|
+
name: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: () => string;
|
|
13
|
+
};
|
|
14
|
+
id: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
default: () => string;
|
|
17
|
+
};
|
|
18
|
+
label: {
|
|
19
|
+
type: StringConstructor;
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
variant: {
|
|
23
|
+
type: StringConstructor;
|
|
24
|
+
default: string;
|
|
25
|
+
};
|
|
26
|
+
disabled: {
|
|
27
|
+
type: BooleanConstructor;
|
|
28
|
+
default: boolean;
|
|
29
|
+
};
|
|
30
|
+
readOnly: {
|
|
31
|
+
type: BooleanConstructor;
|
|
32
|
+
default: boolean;
|
|
33
|
+
};
|
|
34
|
+
required: {
|
|
35
|
+
type: BooleanConstructor;
|
|
36
|
+
default: boolean;
|
|
37
|
+
};
|
|
38
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
39
|
+
modelValue: {
|
|
40
|
+
default: boolean;
|
|
41
|
+
};
|
|
42
|
+
options: {
|
|
43
|
+
type: PropType<any[]>;
|
|
44
|
+
default: never[];
|
|
45
|
+
};
|
|
46
|
+
name: {
|
|
47
|
+
type: StringConstructor;
|
|
48
|
+
default: () => string;
|
|
49
|
+
};
|
|
50
|
+
id: {
|
|
51
|
+
type: StringConstructor;
|
|
52
|
+
default: () => string;
|
|
53
|
+
};
|
|
54
|
+
label: {
|
|
55
|
+
type: StringConstructor;
|
|
56
|
+
default: string;
|
|
57
|
+
};
|
|
58
|
+
variant: {
|
|
59
|
+
type: StringConstructor;
|
|
60
|
+
default: string;
|
|
61
|
+
};
|
|
62
|
+
disabled: {
|
|
63
|
+
type: BooleanConstructor;
|
|
64
|
+
default: boolean;
|
|
65
|
+
};
|
|
66
|
+
readOnly: {
|
|
67
|
+
type: BooleanConstructor;
|
|
68
|
+
default: boolean;
|
|
69
|
+
};
|
|
70
|
+
required: {
|
|
71
|
+
type: BooleanConstructor;
|
|
72
|
+
default: boolean;
|
|
73
|
+
};
|
|
74
|
+
}>> & {
|
|
75
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
76
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
77
|
+
}, {
|
|
78
|
+
id: string;
|
|
79
|
+
required: boolean;
|
|
80
|
+
label: string;
|
|
81
|
+
modelValue: boolean;
|
|
82
|
+
name: string;
|
|
83
|
+
options: any[];
|
|
84
|
+
variant: string;
|
|
85
|
+
disabled: boolean;
|
|
86
|
+
readOnly: boolean;
|
|
87
|
+
}>;
|
|
88
|
+
export default _default;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
export { default as BaseIcon } from "./components/base-icon.vue";
|
|
2
2
|
export { default as LoadingSpinner } from "./components/loading-spinner.vue";
|
|
3
3
|
export { default as BaseButton } from "./components/base-button.vue";
|
|
4
|
+
export { default as BaseInput } from "./components/base-input.vue";
|
|
5
|
+
export { default as CheckGroup } from "./components/check-group.vue";
|
|
6
|
+
export { default as RadioGroup } from "./components/radio-group.vue";
|
|
7
|
+
export { default as BaseForm } from "./components/base-form.vue";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
interface State {
|
|
2
|
+
firstName: string;
|
|
3
|
+
lastName: string;
|
|
4
|
+
userId: number | null;
|
|
5
|
+
}
|
|
6
|
+
export declare const useAuthUserStore: import("pinia").StoreDefinition<"auth/user", State, {
|
|
7
|
+
fullName: (state: {
|
|
8
|
+
firstName: string;
|
|
9
|
+
lastName: string;
|
|
10
|
+
userId: number | null;
|
|
11
|
+
} & import("pinia").PiniaCustomStateProperties<State>) => string;
|
|
12
|
+
loggedIn: (state: {
|
|
13
|
+
firstName: string;
|
|
14
|
+
lastName: string;
|
|
15
|
+
userId: number | null;
|
|
16
|
+
} & import("pinia").PiniaCustomStateProperties<State>) => boolean;
|
|
17
|
+
fullUserDetails(state: {
|
|
18
|
+
firstName: string;
|
|
19
|
+
lastName: string;
|
|
20
|
+
userId: number | null;
|
|
21
|
+
} & import("pinia").PiniaCustomStateProperties<State>): any;
|
|
22
|
+
}, {
|
|
23
|
+
updateUser(payload: any): void;
|
|
24
|
+
clearUser(): void;
|
|
25
|
+
}>;
|
|
26
|
+
export {};
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.base-icon{display:inline-block}.base-icon svg{display:block;stroke-width:0;stroke:currentColor;fill:currentColor;width:1.5em;height:1.5em}.base-icon--xxl svg{width:12rem;height:12rem}.base-icon--xl svg{width:8rem;height:8rem}.base-icon--large svg{width:4rem;height:4rem}.loading-spinner{min-width:2rem}.
|
|
1
|
+
.base-icon{display:inline-block}.base-icon svg{display:block;stroke-width:0;stroke:currentColor;fill:currentColor;width:1.5em;height:1.5em}.base-icon--xxl svg{width:12rem;height:12rem}.base-icon--xl svg{width:8rem;height:8rem}.base-icon--large svg{width:4rem;height:4rem}.loading-spinner{min-width:2rem}.base-button{display:flex;justify-content:center;align-items:center;box-sizing:border-box;transition:all .2s ease;text-decoration:none;width:100%;margin:0;padding:1.036em 1.625em;appearance:none;outline:none;border:none;border-radius:.4375em;font-size:.875em;line-height:1.125em;text-transform:uppercase;font-weight:700}@media screen and (min-width: 600px){.base-button{width:auto}}.base-button .icon{width:16px;height:16px;margin-top:-1px}.base-button.s-collapsed>.caption{display:none}.base-button.s-pending{background-repeat:no-repeat;background-position:center center}.base-button.s-pending .caption{margin-left:25px;visibility:hidden}@media screen and (min-width: 600px){.base-button.s-pending{background-position:1.625em center}.base-button.s-pending .caption{visibility:visible}}.base-button[readonly],.base-button[disabled]{cursor:not-allowed}.base-button{display:flex;justify-content:center;align-items:center;box-sizing:border-box;transition:all .2s ease;text-decoration:none;width:100%;margin:0;padding:1.036em 1.625em;appearance:none;outline:none;border:none;border-radius:.4375em;font-size:.875em;line-height:1.125em;text-transform:uppercase;font-weight:700}@media screen and (min-width: 600px){.base-button{width:auto}}.base-button .icon{width:16px;height:16px;margin-top:-1px}.base-button.s-collapsed>.caption{display:none}.base-button.s-pending{background-repeat:no-repeat;background-position:center center}.base-button.s-pending .caption{margin-left:25px;visibility:hidden}@media screen and (min-width: 600px){.base-button.s-pending{background-position:1.625em center}.base-button.s-pending .caption{visibility:visible}}.base-button[readonly],.base-button[disabled]{cursor:not-allowed}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ablok-components",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.9",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "vite",
|
|
7
7
|
"build": "vue-tsc --noEmit && vite build",
|
|
@@ -10,7 +10,10 @@
|
|
|
10
10
|
"build-lib": "vite build && vue-tsc --emitDeclarationOnly"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
+
"@vueuse/core": "^8.7.5",
|
|
13
14
|
"express": "^4.18.1",
|
|
15
|
+
"install": "^0.13.0",
|
|
16
|
+
"pinia": "^2.0.14",
|
|
14
17
|
"vue": "^3.2.25",
|
|
15
18
|
"vue-i18n": "^9.2.0-beta.36"
|
|
16
19
|
},
|