@oneb/ui-vue 0.1.34 → 0.1.35
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/form/index.cjs +1 -1
- package/dist/form/index.js +146 -142
- package/dist/index.cjs +1 -1
- package/dist/index.js +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/form/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),C=require("../XMarkIcon-f94baa4c.cjs"),w={id:{type:String,required:!1},validation:{type:Object,required:!1}},F={id:{type:String,required:!1},label:{type:String,required:!1},name:{type:String,required:!1},hint:{type:String,required:!1,default:""},errors:{type:Array,required:!1}},S={name:{type:String,required:!1},errors:{type:Array,required:!1}},$={label:{type:String,required:!1}},N={id:{type:String,required:!1},name:{type:String,required:!1},placeholder:{type:String,default:""},icon:{type:[Function,Object]},type:{type:String,default:"text"},inputClass:{required:!1,type:[Array,String]},modelValue:{required:!1,type:[String,Number,Array,Boolean,Object,null]},autofocus:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},large:{type:Boolean,default:!1},invalid:{type:Boolean,required:!1,default:!1},options:{type:Array,required:!1,default:[]}},v=()=>e.inject("BaseForm",()=>({formId:e.computed(()=>{}),validation:e.computed(()=>{})}),!0),y=()=>e.inject("BaseFormField",()=>({inputId:e.computed(()=>{}),inputName:e.computed(()=>{}),hasError:e.computed(()=>!1)}),!0),q=["id"],O=e.defineComponent({__name:"OneForm",props:w,emits:["submit"],setup(d,{emit:l}){const o=d,n=l;e.provide("BaseForm",{formId:e.computed(()=>o.id),validation:e.computed(()=>o.validation)});const a=()=>{n("submit")};return(t,u)=>(e.openBlock(),e.createElementBlock("form",{onSubmit:e.withModifiers(a,["prevent"]),id:t.id,class:"space-y-3"},[e.renderSlot(t.$slots,"default")],40,q))}}),_=["for"],h=e.defineComponent({__name:"OneFormLabel",props:$,setup(d){const{inputId:l}=y();return(o,n)=>(e.openBlock(),e.createElementBlock("label",{for:e.unref(l),class:"block text-sm font-medium text-primary-content select-none"},[e.renderSlot(o.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(o.label),1)])],8,_))}}),I={key:0,class:"text-danger-content text-xs space-y-1"},b=e.defineComponent({__name:"OneFormFeedback",props:S,setup(d){const l=d,{validation:o}=v(),{inputName:n}=y(),a=e.computed(()=>n.value==null&&l.name==null?l.errors??[]:o.value==null?l.errors??[]:(o.value??{})[l.name||n.value]??l.errors??[]);return(t,u)=>a.value.length>0?(e.openBlock(),e.createElementBlock("div",I,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,s=>(e.openBlock(),e.createElementBlock("div",{key:s},e.toDisplayString(s),1))),128))])):e.createCommentVNode("",!0)}});function j(d,l){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z"}),e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})])}function L(d,l){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3.98 8.223A10.477 10.477 0 001.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 10-4.243-4.243m4.242 4.242L9.88 9.88"})])}const M=["id","disabled"],A=["selected"],D=["selected","value"],z=["name","id","value","placeholder","disabled","readonly"],P={key:2,class:"flex w-full space-x-3 items-center"},T=["type","name","id","disabled","readonly","checked"],X=["for"],G={key:3,class:"w-full space-y-1"},H=["name","id","value","disabled","readonly","checked"],J=["for"],K={key:4,class:"relative"},Q={class:"absolute p-2 px-3 rounded-md h-full flex items-center select-none pointer-events-none"},R=["type","name","id","value","placeholder","disabled","readonly"],B=e.defineComponent({__name:"OneFormInput",props:N,emits:["update:modelValue"],setup(d,{emit:l}){const o=d,n=l,{inputId:a,inputName:t,hasError:u}=y(),s=e.ref(null),p=e.ref(!1);e.onMounted(()=>{o.autofocus&&s.value&&s.value.focus()});const g=e.computed(()=>o.modelValue!=null&&o.modelValue!==""),c=e.computed(()=>{if(o.id)return o.id;const r=(a==null?void 0:a.value)||"";return o.name?`${r}-${o.name}`:r||""}),E=()=>{n("update:modelValue","")},V=e.computed(()=>{const r={"shadow-sm":o.type!=="range","border-danger-base":u.value||o.invalid,"pl-10":o.icon!=null,"pr-10":o.type==="password","rounded-full":o.rounded,"rounded-md":!o.rounded,"text-lg":o.large,"py-2.5":o.large,"py-2":!o.large};return o.inputClass!=null&&(typeof o.inputClass=="string"?r[o.inputClass]=!0:o.inputClass instanceof Array&&o.inputClass.forEach(f=>{r[f]=!0})),r}),m=r=>{o.type==="checkbox"?n("update:modelValue",r.target.checked):n("update:modelValue",r.target.value)};return(r,f)=>r.type==="select"?(e.openBlock(),e.createElementBlock("select",{key:0,id:c.value,ref_key:"inputElement",ref:s,class:e.normalizeClass(["border border-primary-stroke px-3 w-full",{"border-danger-base":e.unref(u)||r.invalid,"text-secondary-content":r.modelValue===""||r.modelValue==null,"rounded-full":r.rounded,"rounded-md":!r.rounded,"text-lg":r.large,"py-2.5":r.large,"py-2":!r.large}]),disabled:r.disabled},[r.placeholder?(e.openBlock(),e.createElementBlock("option",{key:0,selected:r.modelValue===""||r.modelValue==null,disabled:"",hidden:""},e.toDisplayString(r.placeholder),9,A)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.options,i=>(e.openBlock(),e.createElementBlock("option",{selected:i.key===r.modelValue,key:i.key,value:i.key},e.toDisplayString(i.value),9,D))),128))],10,M)):r.type==="textarea"?(e.openBlock(),e.createElementBlock("textarea",{key:1,name:r.name||e.unref(t),id:c.value,value:r.modelValue,onInput:m,rows:"3",class:e.normalizeClass(["border border-primary-stroke px-3 w-full placeholder-gray-400",{"border-danger-base":e.unref(u),"rounded-3xl":r.rounded,"rounded-md":!r.rounded,"text-lg":r.large,"py-2.5":r.large,"py-2":!r.large}]),placeholder:r.placeholder,disabled:r.disabled,readonly:r.readonly,ref_key:"inputElement",ref:s},null,42,z)):r.type==="checkbox"?(e.openBlock(),e.createElementBlock("div",P,[e.createElementVNode("input",{type:r.type,name:r.name||e.unref(t),id:c.value,value:!0,onInput:m,disabled:r.disabled,readonly:r.readonly,class:e.normalizeClass(["rounded-md border border-primary-stroke px-2 py-2 shadow-sm",{"border-danger-base":e.unref(u)||r.invalid}]),checked:r.modelValue===!0,ref_key:"inputElement",ref:s},null,42,T),e.createElementVNode("label",{for:c.value,class:"text-primary-content select-none"},e.toDisplayString(r.placeholder),9,X)])):r.type==="radio"?(e.openBlock(),e.createElementBlock("div",G,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.options,(i,k)=>(e.openBlock(),e.createElementBlock("div",{key:i.key,class:"flex w-full space-x-3 items-center"},[e.createElementVNode("input",{type:"radio",name:r.name||e.unref(t),id:`${c.value}-${k}`,value:i.key,onInput:m,disabled:r.disabled,readonly:r.readonly,class:e.normalizeClass(["rounded-md border border-primary-stroke px-3 py-2 shadow-sm",{"border-danger-base":e.unref(u)||r.invalid}]),checked:i.key===r.modelValue,ref_for:!0,ref_key:"inputElement",ref:s},null,42,H),e.createElementVNode("label",{for:`${c.value}-${k}`,class:"text-primary-content select-none"},e.toDisplayString(i.value),9,J)]))),128))])):(e.openBlock(),e.createElementBlock("div",K,[e.createElementVNode("div",Q,[r.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.icon),{key:0,class:"w-5 h-5 text-primary-content"})):e.createCommentVNode("",!0)]),e.createElementVNode("input",{type:p.value?"text":r.type,name:r.name||e.unref(t),id:c.value,value:r.modelValue,onInput:m,placeholder:r.placeholder,disabled:r.disabled,readonly:r.readonly,class:e.normalizeClass(["border border-primary-stroke w-full px-3 placeholder-gray-400 disabled:bg-gray-50",V.value]),ref_key:"inputElement",ref:s},null,42,R),r.clearable&&g.value?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:E,class:"absolute p-2 px-3 rounded-md h-full flex items-center right-0 top-0 hover:cursor-pointer select-none"},[e.createVNode(e.unref(C.render),{class:"w-5 h-5 text-secondary-content hover:text-primary-base"})])):r.type==="password"?(e.openBlock(),e.createElementBlock("div",{key:1,onClick:f[0]||(f[0]=i=>p.value=!p.value),class:"absolute p-2 px-3 rounded-md h-full flex items-center right-0 top-0 hover:cursor-pointer select-none"},[p.value?(e.openBlock(),e.createBlock(e.unref(L),{key:0,class:"w-5 h-5 text-primary-content hover:text-primary-base"})):(e.openBlock(),e.createBlock(e.unref(j),{key:1,class:"w-5 h-5 text-secondary-content hover:text-primary-base"}))])):e.createCommentVNode("",!0)]))}}),U={class:"space-y-1"},W={key:2,class:"text-xs text-secondary-content select-none"},Y=e.defineComponent({__name:"OneFormField",props:F,setup(d){const l=d,{formId:o,validation:n}=v(),a=e.computed(()=>l.errors!=null&&l.errors.length>0?!0:l.name==null?!1:(n.value??{})[l.name]!=null);return e.provide("BaseFormField",{inputId:e.computed(()=>{const t=o.value||"form";if(l.id!=null)return`${t}-${l.id}`;if(l.name!=null)return`${t}-field-${l.name}`}),inputName:e.computed(()=>l.name),hasError:a}),(t,u)=>(e.openBlock(),e.createElementBlock("div",U,[t.label?(e.openBlock(),e.createBlock(h,{key:0,label:t.label},null,8,["label"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"default",{},()=>[e.createVNode(B)]),a.value?(e.openBlock(),e.createBlock(b,{key:1,errors:t.errors},null,8,["errors"])):t.hint.length>0?(e.openBlock(),e.createElementBlock("p",W,e.toDisplayString(t.hint),1)):e.createCommentVNode("",!0)]))}});exports.OneForm=O;exports.OneFormFeedback=b;exports.OneFormField=Y;exports.OneFormInput=B;exports.OneFormLabel=h;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),F=require("../XMarkIcon-f94baa4c.cjs"),S={id:{type:String,required:!1},validation:{type:Object,required:!1}},$={id:{type:String,required:!1},label:{type:String,required:!1},name:{type:String,required:!1},hint:{type:String,required:!1,default:""},errors:{type:Array,required:!1}},N={name:{type:String,required:!1},errors:{type:Array,required:!1}},q={label:{type:String,required:!1}},O={id:{type:String,required:!1},name:{type:String,required:!1},placeholder:{type:String,default:""},icon:{type:[Function,Object]},type:{type:String,default:"text"},inputClass:{required:!1,type:[Array,String]},modelValue:{required:!1,type:[String,Number,Array,Boolean,Object,null]},autofocus:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},large:{type:Boolean,default:!1},invalid:{type:Boolean,required:!1,default:!1},options:{type:Array,required:!1,default:[]}},h=()=>e.inject("BaseForm",()=>({formId:e.computed(()=>{}),validation:e.computed(()=>{})}),!0),k=()=>e.inject("BaseFormField",()=>({inputId:e.computed(()=>{}),inputName:e.computed(()=>{}),hasError:e.computed(()=>!1)}),!0),_=["id"],I=e.defineComponent({__name:"OneForm",props:S,emits:["submit"],setup(d,{emit:l}){const n=d,o=l;e.provide("BaseForm",{formId:e.computed(()=>n.id),validation:e.computed(()=>n.validation)});const a=()=>{o("submit")};return(t,c)=>(e.openBlock(),e.createElementBlock("form",{onSubmit:e.withModifiers(a,["prevent"]),id:t.id,class:"space-y-3"},[e.renderSlot(t.$slots,"default")],40,_))}}),j=["for"],b=e.defineComponent({__name:"OneFormLabel",props:q,setup(d){const{inputId:l}=k();return(n,o)=>(e.openBlock(),e.createElementBlock("label",{for:e.unref(l),class:"block text-sm font-medium text-primary-content select-none"},[e.renderSlot(n.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(n.label),1)])],8,j))}}),L={key:0,class:"text-danger-content text-xs space-y-1"},B=e.defineComponent({__name:"OneFormFeedback",props:N,setup(d){const l=d,{validation:n}=h(),{inputName:o}=k(),a=e.computed(()=>o.value==null&&l.name==null?l.errors??[]:n.value==null?l.errors??[]:(n.value??{})[l.name||o.value]??l.errors??[]);return(t,c)=>a.value.length>0?(e.openBlock(),e.createElementBlock("div",L,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,u=>(e.openBlock(),e.createElementBlock("div",{key:u},e.toDisplayString(u),1))),128))])):e.createCommentVNode("",!0)}});function M(d,l){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z"}),e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})])}function A(d,l){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3.98 8.223A10.477 10.477 0 001.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 10-4.243-4.243m4.242 4.242L9.88 9.88"})])}const D=["id","disabled"],z=["selected"],P=["selected","value"],T=["name","id","value","placeholder","disabled","readonly"],X={key:2,class:"flex w-full space-x-3 items-center"},G=["type","name","id","disabled","readonly","checked"],H=["for"],J={key:3,class:"w-full space-y-1"},K=["name","id","value","disabled","readonly","checked"],Q=["for"],R={key:4,class:"relative"},U={class:"absolute p-2 px-3 rounded-md h-full flex items-center select-none pointer-events-none"},W=["type","name","id","value","placeholder","disabled","readonly"],g=e.defineComponent({__name:"OneFormInput",props:O,emits:["update:modelValue"],setup(d,{expose:l,emit:n}){const o=d,a=n,{inputId:t,inputName:c,hasError:u}=k(),i=e.ref(null),m=e.ref(!1);e.onMounted(()=>{o.autofocus&&i.value&&i.value.focus()});const E=e.computed(()=>o.modelValue!=null&&o.modelValue!==""),p=e.computed(()=>{if(o.id)return o.id;const r=(t==null?void 0:t.value)||"";return o.name?`${r}-${o.name}`:r||""}),V=()=>{a("update:modelValue","")},C=()=>{i.value&&i.value.focus()},w=e.computed(()=>{const r={"shadow-sm":o.type!=="range","border-danger-base":u.value||o.invalid,"pl-10":o.icon!=null,"pr-10":o.type==="password","rounded-full":o.rounded,"rounded-md":!o.rounded,"text-lg":o.large,"py-2.5":o.large,"py-2":!o.large};return o.inputClass!=null&&(typeof o.inputClass=="string"?r[o.inputClass]=!0:o.inputClass instanceof Array&&o.inputClass.forEach(y=>{r[y]=!0})),r}),f=r=>{o.type==="checkbox"?a("update:modelValue",r.target.checked):a("update:modelValue",r.target.value)};return l({focus:C}),(r,y)=>r.type==="select"?(e.openBlock(),e.createElementBlock("select",{key:0,id:p.value,ref_key:"inputElement",ref:i,class:e.normalizeClass(["border border-primary-stroke px-3 w-full",{"border-danger-base":e.unref(u)||r.invalid,"text-secondary-content":r.modelValue===""||r.modelValue==null,"rounded-full":r.rounded,"rounded-md":!r.rounded,"text-lg":r.large,"py-2.5":r.large,"py-2":!r.large}]),disabled:r.disabled},[r.placeholder?(e.openBlock(),e.createElementBlock("option",{key:0,selected:r.modelValue===""||r.modelValue==null,disabled:"",hidden:""},e.toDisplayString(r.placeholder),9,z)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.options,s=>(e.openBlock(),e.createElementBlock("option",{selected:s.key===r.modelValue,key:s.key,value:s.key},e.toDisplayString(s.value),9,P))),128))],10,D)):r.type==="textarea"?(e.openBlock(),e.createElementBlock("textarea",{key:1,name:r.name||e.unref(c),id:p.value,value:r.modelValue,onInput:f,rows:"3",class:e.normalizeClass(["border border-primary-stroke px-3 w-full placeholder-gray-400",{"border-danger-base":e.unref(u),"rounded-3xl":r.rounded,"rounded-md":!r.rounded,"text-lg":r.large,"py-2.5":r.large,"py-2":!r.large}]),placeholder:r.placeholder,disabled:r.disabled,readonly:r.readonly,ref_key:"inputElement",ref:i},null,42,T)):r.type==="checkbox"?(e.openBlock(),e.createElementBlock("div",X,[e.createElementVNode("input",{type:r.type,name:r.name||e.unref(c),id:p.value,value:!0,onInput:f,disabled:r.disabled,readonly:r.readonly,class:e.normalizeClass(["rounded-md border border-primary-stroke px-2 py-2 shadow-sm",{"border-danger-base":e.unref(u)||r.invalid}]),checked:r.modelValue===!0,ref_key:"inputElement",ref:i},null,42,G),e.createElementVNode("label",{for:p.value,class:"text-primary-content select-none"},e.toDisplayString(r.placeholder),9,H)])):r.type==="radio"?(e.openBlock(),e.createElementBlock("div",J,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.options,(s,v)=>(e.openBlock(),e.createElementBlock("div",{key:s.key,class:"flex w-full space-x-3 items-center"},[e.createElementVNode("input",{type:"radio",name:r.name||e.unref(c),id:`${p.value}-${v}`,value:s.key,onInput:f,disabled:r.disabled,readonly:r.readonly,class:e.normalizeClass(["rounded-md border border-primary-stroke px-3 py-2 shadow-sm",{"border-danger-base":e.unref(u)||r.invalid}]),checked:s.key===r.modelValue,ref_for:!0,ref_key:"inputElement",ref:i},null,42,K),e.createElementVNode("label",{for:`${p.value}-${v}`,class:"text-primary-content select-none"},e.toDisplayString(s.value),9,Q)]))),128))])):(e.openBlock(),e.createElementBlock("div",R,[e.createElementVNode("div",U,[r.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.icon),{key:0,class:"w-5 h-5 text-primary-content"})):e.createCommentVNode("",!0)]),e.createElementVNode("input",{type:m.value?"text":r.type,name:r.name||e.unref(c),id:p.value,value:r.modelValue,onInput:f,placeholder:r.placeholder,disabled:r.disabled,readonly:r.readonly,class:e.normalizeClass(["border border-primary-stroke w-full px-3 placeholder-gray-400 disabled:bg-gray-50",w.value]),ref_key:"inputElement",ref:i},null,42,W),r.clearable&&E.value?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:V,class:"absolute p-2 px-3 rounded-md h-full flex items-center right-0 top-0 hover:cursor-pointer select-none"},[e.createVNode(e.unref(F.render),{class:"w-5 h-5 text-secondary-content hover:text-primary-base"})])):r.type==="password"?(e.openBlock(),e.createElementBlock("div",{key:1,onClick:y[0]||(y[0]=s=>m.value=!m.value),class:"absolute p-2 px-3 rounded-md h-full flex items-center right-0 top-0 hover:cursor-pointer select-none"},[m.value?(e.openBlock(),e.createBlock(e.unref(A),{key:0,class:"w-5 h-5 text-primary-content hover:text-primary-base"})):(e.openBlock(),e.createBlock(e.unref(M),{key:1,class:"w-5 h-5 text-secondary-content hover:text-primary-base"}))])):e.createCommentVNode("",!0)]))}}),Y={class:"space-y-1"},Z={key:2,class:"text-xs text-secondary-content select-none"},x=e.defineComponent({__name:"OneFormField",props:$,setup(d){const l=d,{formId:n,validation:o}=h(),a=e.computed(()=>l.errors!=null&&l.errors.length>0?!0:l.name==null?!1:(o.value??{})[l.name]!=null);return e.provide("BaseFormField",{inputId:e.computed(()=>{const t=n.value||"form";if(l.id!=null)return`${t}-${l.id}`;if(l.name!=null)return`${t}-field-${l.name}`}),inputName:e.computed(()=>l.name),hasError:a}),(t,c)=>(e.openBlock(),e.createElementBlock("div",Y,[t.label?(e.openBlock(),e.createBlock(b,{key:0,label:t.label},null,8,["label"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"default",{},()=>[e.createVNode(g)]),a.value?(e.openBlock(),e.createBlock(B,{key:1,errors:t.errors},null,8,["errors"])):t.hint.length>0?(e.openBlock(),e.createElementBlock("p",Z,e.toDisplayString(t.hint),1)):e.createCommentVNode("",!0)]))}});exports.OneForm=I;exports.OneFormFeedback=B;exports.OneFormField=x;exports.OneFormInput=g;exports.OneFormLabel=b;
|
package/dist/form/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { inject as
|
|
2
|
-
import { r as
|
|
3
|
-
const
|
|
1
|
+
import { inject as O, computed as t, defineComponent as w, provide as I, openBlock as l, createElementBlock as n, withModifiers as z, renderSlot as S, unref as d, createTextVNode as D, toDisplayString as h, Fragment as C, renderList as B, createCommentVNode as b, createElementVNode as m, ref as E, onMounted as T, normalizeClass as k, createBlock as g, resolveDynamicComponent as G, createVNode as j } from "vue";
|
|
2
|
+
import { r as H } from "../XMarkIcon-51ef0691.js";
|
|
3
|
+
const J = {
|
|
4
4
|
id: {
|
|
5
5
|
type: String,
|
|
6
6
|
required: !1
|
|
@@ -9,7 +9,7 @@ const G = {
|
|
|
9
9
|
type: Object,
|
|
10
10
|
required: !1
|
|
11
11
|
}
|
|
12
|
-
},
|
|
12
|
+
}, K = {
|
|
13
13
|
id: {
|
|
14
14
|
type: String,
|
|
15
15
|
required: !1
|
|
@@ -31,7 +31,7 @@ const G = {
|
|
|
31
31
|
type: Array,
|
|
32
32
|
required: !1
|
|
33
33
|
}
|
|
34
|
-
},
|
|
34
|
+
}, Q = {
|
|
35
35
|
name: {
|
|
36
36
|
type: String,
|
|
37
37
|
required: !1
|
|
@@ -40,12 +40,12 @@ const G = {
|
|
|
40
40
|
type: Array,
|
|
41
41
|
required: !1
|
|
42
42
|
}
|
|
43
|
-
},
|
|
43
|
+
}, R = {
|
|
44
44
|
label: {
|
|
45
45
|
type: String,
|
|
46
46
|
required: !1
|
|
47
47
|
}
|
|
48
|
-
},
|
|
48
|
+
}, U = {
|
|
49
49
|
id: {
|
|
50
50
|
type: String,
|
|
51
51
|
required: !1
|
|
@@ -107,7 +107,7 @@ const G = {
|
|
|
107
107
|
required: !1,
|
|
108
108
|
default: []
|
|
109
109
|
}
|
|
110
|
-
},
|
|
110
|
+
}, N = () => O(
|
|
111
111
|
"BaseForm",
|
|
112
112
|
() => ({
|
|
113
113
|
formId: t(() => {
|
|
@@ -116,7 +116,7 @@ const G = {
|
|
|
116
116
|
})
|
|
117
117
|
}),
|
|
118
118
|
!0
|
|
119
|
-
),
|
|
119
|
+
), q = () => O(
|
|
120
120
|
"BaseFormField",
|
|
121
121
|
() => ({
|
|
122
122
|
inputId: t(() => {
|
|
@@ -126,55 +126,55 @@ const G = {
|
|
|
126
126
|
hasError: t(() => !1)
|
|
127
127
|
}),
|
|
128
128
|
!0
|
|
129
|
-
),
|
|
129
|
+
), W = ["id"], ge = /* @__PURE__ */ w({
|
|
130
130
|
__name: "OneForm",
|
|
131
|
-
props:
|
|
131
|
+
props: J,
|
|
132
132
|
emits: ["submit"],
|
|
133
133
|
setup(u, { emit: a }) {
|
|
134
|
-
const
|
|
135
|
-
|
|
136
|
-
formId: t(() =>
|
|
137
|
-
validation: t(() =>
|
|
134
|
+
const s = u, r = a;
|
|
135
|
+
I("BaseForm", {
|
|
136
|
+
formId: t(() => s.id),
|
|
137
|
+
validation: t(() => s.validation)
|
|
138
138
|
});
|
|
139
139
|
const i = () => {
|
|
140
|
-
|
|
140
|
+
r("submit");
|
|
141
141
|
};
|
|
142
142
|
return (o, y) => (l(), n("form", {
|
|
143
|
-
onSubmit:
|
|
143
|
+
onSubmit: z(i, ["prevent"]),
|
|
144
144
|
id: o.id,
|
|
145
145
|
class: "space-y-3"
|
|
146
146
|
}, [
|
|
147
|
-
|
|
148
|
-
], 40,
|
|
147
|
+
S(o.$slots, "default")
|
|
148
|
+
], 40, W));
|
|
149
149
|
}
|
|
150
|
-
}),
|
|
150
|
+
}), X = ["for"], Y = /* @__PURE__ */ w({
|
|
151
151
|
__name: "OneFormLabel",
|
|
152
|
-
props:
|
|
152
|
+
props: R,
|
|
153
153
|
setup(u) {
|
|
154
|
-
const { inputId: a } =
|
|
155
|
-
return (
|
|
156
|
-
for:
|
|
154
|
+
const { inputId: a } = q();
|
|
155
|
+
return (s, r) => (l(), n("label", {
|
|
156
|
+
for: d(a),
|
|
157
157
|
class: "block text-sm font-medium text-primary-content select-none"
|
|
158
158
|
}, [
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
S(s.$slots, "default", {}, () => [
|
|
160
|
+
D(h(s.label), 1)
|
|
161
161
|
])
|
|
162
|
-
], 8,
|
|
162
|
+
], 8, X));
|
|
163
163
|
}
|
|
164
|
-
}),
|
|
164
|
+
}), Z = {
|
|
165
165
|
key: 0,
|
|
166
166
|
class: "text-danger-content text-xs space-y-1"
|
|
167
|
-
},
|
|
167
|
+
}, x = /* @__PURE__ */ w({
|
|
168
168
|
__name: "OneFormFeedback",
|
|
169
|
-
props:
|
|
169
|
+
props: Q,
|
|
170
170
|
setup(u) {
|
|
171
|
-
const a = u, { validation:
|
|
172
|
-
return (o, y) => i.value.length > 0 ? (l(), n("div",
|
|
173
|
-
(l(!0), n(
|
|
174
|
-
])) :
|
|
171
|
+
const a = u, { validation: s } = N(), { inputName: r } = q(), i = t(() => r.value == null && a.name == null ? a.errors ?? [] : s.value == null ? a.errors ?? [] : (s.value ?? {})[a.name || r.value] ?? a.errors ?? []);
|
|
172
|
+
return (o, y) => i.value.length > 0 ? (l(), n("div", Z, [
|
|
173
|
+
(l(!0), n(C, null, B(i.value, (f) => (l(), n("div", { key: f }, h(f), 1))), 128))
|
|
174
|
+
])) : b("", !0);
|
|
175
175
|
}
|
|
176
176
|
});
|
|
177
|
-
function
|
|
177
|
+
function ee(u, a) {
|
|
178
178
|
return l(), n("svg", {
|
|
179
179
|
xmlns: "http://www.w3.org/2000/svg",
|
|
180
180
|
fill: "none",
|
|
@@ -183,19 +183,19 @@ function Z(u, a) {
|
|
|
183
183
|
stroke: "currentColor",
|
|
184
184
|
"aria-hidden": "true"
|
|
185
185
|
}, [
|
|
186
|
-
|
|
186
|
+
m("path", {
|
|
187
187
|
"stroke-linecap": "round",
|
|
188
188
|
"stroke-linejoin": "round",
|
|
189
189
|
d: "M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z"
|
|
190
190
|
}),
|
|
191
|
-
|
|
191
|
+
m("path", {
|
|
192
192
|
"stroke-linecap": "round",
|
|
193
193
|
"stroke-linejoin": "round",
|
|
194
194
|
d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z"
|
|
195
195
|
})
|
|
196
196
|
]);
|
|
197
197
|
}
|
|
198
|
-
function
|
|
198
|
+
function re(u, a) {
|
|
199
199
|
return l(), n("svg", {
|
|
200
200
|
xmlns: "http://www.w3.org/2000/svg",
|
|
201
201
|
fill: "none",
|
|
@@ -204,42 +204,44 @@ function x(u, a) {
|
|
|
204
204
|
stroke: "currentColor",
|
|
205
205
|
"aria-hidden": "true"
|
|
206
206
|
}, [
|
|
207
|
-
|
|
207
|
+
m("path", {
|
|
208
208
|
"stroke-linecap": "round",
|
|
209
209
|
"stroke-linejoin": "round",
|
|
210
210
|
d: "M3.98 8.223A10.477 10.477 0 001.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 10-4.243-4.243m4.242 4.242L9.88 9.88"
|
|
211
211
|
})
|
|
212
212
|
]);
|
|
213
213
|
}
|
|
214
|
-
const
|
|
214
|
+
const le = ["id", "disabled"], ae = ["selected"], ne = ["selected", "value"], oe = ["name", "id", "value", "placeholder", "disabled", "readonly"], te = {
|
|
215
215
|
key: 2,
|
|
216
216
|
class: "flex w-full space-x-3 items-center"
|
|
217
|
-
},
|
|
217
|
+
}, se = ["type", "name", "id", "disabled", "readonly", "checked"], de = ["for"], ie = {
|
|
218
218
|
key: 3,
|
|
219
219
|
class: "w-full space-y-1"
|
|
220
|
-
},
|
|
220
|
+
}, ue = ["name", "id", "value", "disabled", "readonly", "checked"], pe = ["for"], ce = {
|
|
221
221
|
key: 4,
|
|
222
222
|
class: "relative"
|
|
223
|
-
},
|
|
223
|
+
}, me = { class: "absolute p-2 px-3 rounded-md h-full flex items-center select-none pointer-events-none" }, fe = ["type", "name", "id", "value", "placeholder", "disabled", "readonly"], ye = /* @__PURE__ */ w({
|
|
224
224
|
__name: "OneFormInput",
|
|
225
|
-
props:
|
|
225
|
+
props: U,
|
|
226
226
|
emits: ["update:modelValue"],
|
|
227
|
-
setup(u, {
|
|
228
|
-
const r = u,
|
|
229
|
-
|
|
230
|
-
r.autofocus &&
|
|
227
|
+
setup(u, { expose: a, emit: s }) {
|
|
228
|
+
const r = u, i = s, { inputId: o, inputName: y, hasError: f } = q(), c = E(null), F = E(!1);
|
|
229
|
+
T(() => {
|
|
230
|
+
r.autofocus && c.value && c.value.focus();
|
|
231
231
|
});
|
|
232
|
-
const
|
|
232
|
+
const A = t(() => r.modelValue != null && r.modelValue !== ""), v = t(() => {
|
|
233
233
|
if (r.id)
|
|
234
234
|
return r.id;
|
|
235
|
-
const e = (
|
|
235
|
+
const e = (o == null ? void 0 : o.value) || "";
|
|
236
236
|
return r.name ? `${e}-${r.name}` : e || "";
|
|
237
|
-
}),
|
|
238
|
-
|
|
239
|
-
},
|
|
237
|
+
}), L = () => {
|
|
238
|
+
i("update:modelValue", "");
|
|
239
|
+
}, M = () => {
|
|
240
|
+
c.value && c.value.focus();
|
|
241
|
+
}, P = t(() => {
|
|
240
242
|
const e = {
|
|
241
243
|
"shadow-sm": r.type !== "range",
|
|
242
|
-
"border-danger-base":
|
|
244
|
+
"border-danger-base": f.value || r.invalid,
|
|
243
245
|
"pl-10": r.icon != null,
|
|
244
246
|
"pr-10": r.type === "password",
|
|
245
247
|
"rounded-full": r.rounded,
|
|
@@ -248,19 +250,21 @@ const ee = ["id", "disabled"], re = ["selected"], le = ["selected", "value"], ae
|
|
|
248
250
|
"py-2.5": r.large,
|
|
249
251
|
"py-2": !r.large
|
|
250
252
|
};
|
|
251
|
-
return r.inputClass != null && (typeof r.inputClass == "string" ? e[r.inputClass] = !0 : r.inputClass instanceof Array && r.inputClass.forEach((
|
|
252
|
-
e[
|
|
253
|
+
return r.inputClass != null && (typeof r.inputClass == "string" ? e[r.inputClass] = !0 : r.inputClass instanceof Array && r.inputClass.forEach((V) => {
|
|
254
|
+
e[V] = !0;
|
|
253
255
|
})), e;
|
|
254
|
-
}),
|
|
255
|
-
r.type === "checkbox" ?
|
|
256
|
+
}), $ = (e) => {
|
|
257
|
+
r.type === "checkbox" ? i("update:modelValue", e.target.checked) : i("update:modelValue", e.target.value);
|
|
256
258
|
};
|
|
257
|
-
return (
|
|
259
|
+
return a({
|
|
260
|
+
focus: M
|
|
261
|
+
}), (e, V) => e.type === "select" ? (l(), n("select", {
|
|
258
262
|
key: 0,
|
|
259
|
-
id:
|
|
263
|
+
id: v.value,
|
|
260
264
|
ref_key: "inputElement",
|
|
261
|
-
ref:
|
|
262
|
-
class:
|
|
263
|
-
"border-danger-base":
|
|
265
|
+
ref: c,
|
|
266
|
+
class: k(["border border-primary-stroke px-3 w-full", {
|
|
267
|
+
"border-danger-base": d(f) || e.invalid,
|
|
264
268
|
"text-secondary-content": e.modelValue === "" || e.modelValue == null,
|
|
265
269
|
"rounded-full": e.rounded,
|
|
266
270
|
"rounded-md": !e.rounded,
|
|
@@ -275,21 +279,21 @@ const ee = ["id", "disabled"], re = ["selected"], le = ["selected", "value"], ae
|
|
|
275
279
|
selected: e.modelValue === "" || e.modelValue == null,
|
|
276
280
|
disabled: "",
|
|
277
281
|
hidden: ""
|
|
278
|
-
},
|
|
279
|
-
(l(!0), n(
|
|
280
|
-
selected:
|
|
281
|
-
key:
|
|
282
|
-
value:
|
|
283
|
-
},
|
|
284
|
-
], 10,
|
|
282
|
+
}, h(e.placeholder), 9, ae)) : b("", !0),
|
|
283
|
+
(l(!0), n(C, null, B(e.options, (p) => (l(), n("option", {
|
|
284
|
+
selected: p.key === e.modelValue,
|
|
285
|
+
key: p.key,
|
|
286
|
+
value: p.key
|
|
287
|
+
}, h(p.value), 9, ne))), 128))
|
|
288
|
+
], 10, le)) : e.type === "textarea" ? (l(), n("textarea", {
|
|
285
289
|
key: 1,
|
|
286
|
-
name: e.name ||
|
|
287
|
-
id:
|
|
290
|
+
name: e.name || d(y),
|
|
291
|
+
id: v.value,
|
|
288
292
|
value: e.modelValue,
|
|
289
|
-
onInput:
|
|
293
|
+
onInput: $,
|
|
290
294
|
rows: "3",
|
|
291
|
-
class:
|
|
292
|
-
"border-danger-base":
|
|
295
|
+
class: k(["border border-primary-stroke px-3 w-full placeholder-gray-400", {
|
|
296
|
+
"border-danger-base": d(f),
|
|
293
297
|
"rounded-3xl": e.rounded,
|
|
294
298
|
"rounded-md": !e.rounded,
|
|
295
299
|
"text-lg": e.large,
|
|
@@ -300,107 +304,107 @@ const ee = ["id", "disabled"], re = ["selected"], le = ["selected", "value"], ae
|
|
|
300
304
|
disabled: e.disabled,
|
|
301
305
|
readonly: e.readonly,
|
|
302
306
|
ref_key: "inputElement",
|
|
303
|
-
ref:
|
|
304
|
-
}, null, 42,
|
|
305
|
-
|
|
307
|
+
ref: c
|
|
308
|
+
}, null, 42, oe)) : e.type === "checkbox" ? (l(), n("div", te, [
|
|
309
|
+
m("input", {
|
|
306
310
|
type: e.type,
|
|
307
|
-
name: e.name ||
|
|
308
|
-
id:
|
|
311
|
+
name: e.name || d(y),
|
|
312
|
+
id: v.value,
|
|
309
313
|
value: !0,
|
|
310
|
-
onInput:
|
|
314
|
+
onInput: $,
|
|
311
315
|
disabled: e.disabled,
|
|
312
316
|
readonly: e.readonly,
|
|
313
|
-
class:
|
|
314
|
-
"border-danger-base":
|
|
317
|
+
class: k(["rounded-md border border-primary-stroke px-2 py-2 shadow-sm", {
|
|
318
|
+
"border-danger-base": d(f) || e.invalid
|
|
315
319
|
}]),
|
|
316
320
|
checked: e.modelValue === !0,
|
|
317
321
|
ref_key: "inputElement",
|
|
318
|
-
ref:
|
|
319
|
-
}, null, 42,
|
|
320
|
-
|
|
321
|
-
for:
|
|
322
|
+
ref: c
|
|
323
|
+
}, null, 42, se),
|
|
324
|
+
m("label", {
|
|
325
|
+
for: v.value,
|
|
322
326
|
class: "text-primary-content select-none"
|
|
323
|
-
},
|
|
324
|
-
])) : e.type === "radio" ? (l(), n("div",
|
|
325
|
-
(l(!0), n(
|
|
326
|
-
key:
|
|
327
|
+
}, h(e.placeholder), 9, de)
|
|
328
|
+
])) : e.type === "radio" ? (l(), n("div", ie, [
|
|
329
|
+
(l(!0), n(C, null, B(e.options, (p, _) => (l(), n("div", {
|
|
330
|
+
key: p.key,
|
|
327
331
|
class: "flex w-full space-x-3 items-center"
|
|
328
332
|
}, [
|
|
329
|
-
|
|
333
|
+
m("input", {
|
|
330
334
|
type: "radio",
|
|
331
|
-
name: e.name ||
|
|
332
|
-
id: `${
|
|
333
|
-
value:
|
|
334
|
-
onInput:
|
|
335
|
+
name: e.name || d(y),
|
|
336
|
+
id: `${v.value}-${_}`,
|
|
337
|
+
value: p.key,
|
|
338
|
+
onInput: $,
|
|
335
339
|
disabled: e.disabled,
|
|
336
340
|
readonly: e.readonly,
|
|
337
|
-
class:
|
|
338
|
-
"border-danger-base":
|
|
341
|
+
class: k(["rounded-md border border-primary-stroke px-3 py-2 shadow-sm", {
|
|
342
|
+
"border-danger-base": d(f) || e.invalid
|
|
339
343
|
}]),
|
|
340
|
-
checked:
|
|
344
|
+
checked: p.key === e.modelValue,
|
|
341
345
|
ref_for: !0,
|
|
342
346
|
ref_key: "inputElement",
|
|
343
|
-
ref:
|
|
344
|
-
}, null, 42,
|
|
345
|
-
|
|
346
|
-
for: `${
|
|
347
|
+
ref: c
|
|
348
|
+
}, null, 42, ue),
|
|
349
|
+
m("label", {
|
|
350
|
+
for: `${v.value}-${_}`,
|
|
347
351
|
class: "text-primary-content select-none"
|
|
348
|
-
},
|
|
352
|
+
}, h(p.value), 9, pe)
|
|
349
353
|
]))), 128))
|
|
350
|
-
])) : (l(), n("div",
|
|
351
|
-
|
|
352
|
-
e.icon ? (l(),
|
|
354
|
+
])) : (l(), n("div", ce, [
|
|
355
|
+
m("div", me, [
|
|
356
|
+
e.icon ? (l(), g(G(e.icon), {
|
|
353
357
|
key: 0,
|
|
354
358
|
class: "w-5 h-5 text-primary-content"
|
|
355
|
-
})) :
|
|
359
|
+
})) : b("", !0)
|
|
356
360
|
]),
|
|
357
|
-
|
|
358
|
-
type:
|
|
359
|
-
name: e.name ||
|
|
360
|
-
id:
|
|
361
|
+
m("input", {
|
|
362
|
+
type: F.value ? "text" : e.type,
|
|
363
|
+
name: e.name || d(y),
|
|
364
|
+
id: v.value,
|
|
361
365
|
value: e.modelValue,
|
|
362
|
-
onInput:
|
|
366
|
+
onInput: $,
|
|
363
367
|
placeholder: e.placeholder,
|
|
364
368
|
disabled: e.disabled,
|
|
365
369
|
readonly: e.readonly,
|
|
366
|
-
class:
|
|
370
|
+
class: k(["border border-primary-stroke w-full px-3 placeholder-gray-400 disabled:bg-gray-50", P.value]),
|
|
367
371
|
ref_key: "inputElement",
|
|
368
|
-
ref:
|
|
369
|
-
}, null, 42,
|
|
370
|
-
e.clearable &&
|
|
372
|
+
ref: c
|
|
373
|
+
}, null, 42, fe),
|
|
374
|
+
e.clearable && A.value ? (l(), n("div", {
|
|
371
375
|
key: 0,
|
|
372
|
-
onClick:
|
|
376
|
+
onClick: L,
|
|
373
377
|
class: "absolute p-2 px-3 rounded-md h-full flex items-center right-0 top-0 hover:cursor-pointer select-none"
|
|
374
378
|
}, [
|
|
375
|
-
|
|
379
|
+
j(d(H), { class: "w-5 h-5 text-secondary-content hover:text-primary-base" })
|
|
376
380
|
])) : e.type === "password" ? (l(), n("div", {
|
|
377
381
|
key: 1,
|
|
378
|
-
onClick:
|
|
382
|
+
onClick: V[0] || (V[0] = (p) => F.value = !F.value),
|
|
379
383
|
class: "absolute p-2 px-3 rounded-md h-full flex items-center right-0 top-0 hover:cursor-pointer select-none"
|
|
380
384
|
}, [
|
|
381
|
-
|
|
385
|
+
F.value ? (l(), g(d(re), {
|
|
382
386
|
key: 0,
|
|
383
387
|
class: "w-5 h-5 text-primary-content hover:text-primary-base"
|
|
384
|
-
})) : (l(),
|
|
388
|
+
})) : (l(), g(d(ee), {
|
|
385
389
|
key: 1,
|
|
386
390
|
class: "w-5 h-5 text-secondary-content hover:text-primary-base"
|
|
387
391
|
}))
|
|
388
|
-
])) :
|
|
392
|
+
])) : b("", !0)
|
|
389
393
|
]));
|
|
390
394
|
}
|
|
391
|
-
}),
|
|
395
|
+
}), ve = { class: "space-y-1" }, he = {
|
|
392
396
|
key: 2,
|
|
393
397
|
class: "text-xs text-secondary-content select-none"
|
|
394
|
-
},
|
|
398
|
+
}, we = /* @__PURE__ */ w({
|
|
395
399
|
__name: "OneFormField",
|
|
396
|
-
props:
|
|
400
|
+
props: K,
|
|
397
401
|
setup(u) {
|
|
398
|
-
const a = u, { formId:
|
|
399
|
-
() => a.errors != null && a.errors.length > 0 ? !0 : a.name == null ? !1 : (
|
|
402
|
+
const a = u, { formId: s, validation: r } = N(), i = t(
|
|
403
|
+
() => a.errors != null && a.errors.length > 0 ? !0 : a.name == null ? !1 : (r.value ?? {})[a.name] != null
|
|
400
404
|
);
|
|
401
|
-
return
|
|
405
|
+
return I("BaseFormField", {
|
|
402
406
|
inputId: t(() => {
|
|
403
|
-
const o =
|
|
407
|
+
const o = s.value || "form";
|
|
404
408
|
if (a.id != null)
|
|
405
409
|
return `${o}-${a.id}`;
|
|
406
410
|
if (a.name != null)
|
|
@@ -408,25 +412,25 @@ const ee = ["id", "disabled"], re = ["selected"], le = ["selected", "value"], ae
|
|
|
408
412
|
}),
|
|
409
413
|
inputName: t(() => a.name),
|
|
410
414
|
hasError: i
|
|
411
|
-
}), (o, y) => (l(), n("div",
|
|
412
|
-
o.label ? (l(),
|
|
415
|
+
}), (o, y) => (l(), n("div", ve, [
|
|
416
|
+
o.label ? (l(), g(Y, {
|
|
413
417
|
key: 0,
|
|
414
418
|
label: o.label
|
|
415
|
-
}, null, 8, ["label"])) :
|
|
416
|
-
|
|
417
|
-
|
|
419
|
+
}, null, 8, ["label"])) : b("", !0),
|
|
420
|
+
S(o.$slots, "default", {}, () => [
|
|
421
|
+
j(ye)
|
|
418
422
|
]),
|
|
419
|
-
i.value ? (l(),
|
|
423
|
+
i.value ? (l(), g(x, {
|
|
420
424
|
key: 1,
|
|
421
425
|
errors: o.errors
|
|
422
|
-
}, null, 8, ["errors"])) : o.hint.length > 0 ? (l(), n("p",
|
|
426
|
+
}, null, 8, ["errors"])) : o.hint.length > 0 ? (l(), n("p", he, h(o.hint), 1)) : b("", !0)
|
|
423
427
|
]));
|
|
424
428
|
}
|
|
425
429
|
});
|
|
426
430
|
export {
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
431
|
+
ge as OneForm,
|
|
432
|
+
x as OneFormFeedback,
|
|
433
|
+
we as OneFormField,
|
|
434
|
+
ye as OneFormInput,
|
|
435
|
+
Y as OneFormLabel
|
|
432
436
|
};
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("./index-9f8735d9.cjs"),f=require("./card/index.cjs"),p=require("./form/index.cjs"),m=require("./OneHelpMenu-05871821.cjs"),g=require("./dropdown/index.cjs"),h=require("./common/index.cjs"),e=require("vue"),y=require("./_plugin-vue_export-helper-f246444f.cjs");require("./XMarkIcon-f94baa4c.cjs");const w={color:{type:String,default:"red"},size:{type:String,default:"sm"},text:{type:String,default:""},variant:{type:String,default:"indicators"},bargeVariant:{type:String,default:"stand"}},C={class:"px-1 font-semibold",style:{color:"white"}},O=e.defineComponent({__name:"OneIndicators",props:{...w},setup(c){const t=c,l=e.computed(()=>{switch(t.color){case"green":return"#22c55e";case"blue":return"#3b82f6";case"red":return"#ef4444";case"yellow":return"#eab308";default:return"#E3ECF2"}}),u=e.computed(()=>{let s="",o="",a;return t.text?t.size==="sm"?(o="min-w-[12px]",a="textSm"):t.size==="md"?(o="min-w-[16px]",a="textMd"):t.size==="lg"&&(o="min-w-[20px]",a="textLg"):t.size==="sm"?s="w-3 min-w-[12px]":t.size==="lg"?s="w-5 min-w-[20px]":t.size==="md"&&(s="w-4 min-w-[16px]"),`${s} ${a} ${o} h-${t.size==="sm"?3:t.size==="lg"?5:4}`}),r=e.computed(()=>{let s="",o="",a;return t.text?t.size==="sm"?(o="min-w-[44px]",a="textMd"):t.size==="md"?(o="min-w-[58px]",a="text10"):t.size==="lg"&&(o="min-w-[68px]",a="text-sm"):t.size==="sm"?s="min-w-[44px]":t.size==="lg"?s="min-w-[68px]":t.size==="md"&&(s="min-w-[58px]"),`${s} ${a} ${o} h-${t.size==="sm"?5:t.size==="lg"?7:6}`}),d=e.computed(()=>{const s=t.bargeVariant==="stand"?"1A":"",o=t.bargeVariant==="stand"?"1px solid":"none";return{backgroundColor:`${l.value}${s}`,border:o,borderColor:l.value}});return(s,o)=>t.variant==="indicators"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["rounded-full border border-white flex items-center justify-center w-max",[u.value]]),style:e.normalizeStyle({backgroundColor:l.value})},[e.createElementVNode("p",C,e.toDisplayString(s.text),1)],6)):t.variant==="barge"?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["rounded px-2 py-1 text-center w-max",[r.value,{"rounded-full":s.bargeVariant==="round",rounded:s.bargeVariant!=="round"}]]),style:e.normalizeStyle([d.value])},[e.createElementVNode("p",{class:"font-medium",style:e.normalizeStyle({color:s.bargeVariant!=="stand"?"white":l.value})},e.toDisplayString(s.text),5)],6)):e.createCommentVNode("",!0)}});const b=y._export_sfc(O,[["__scopeId","data-v-3d58c944"]]),z=e.defineComponent({__name:"OneLabel",props:{size:{type:String,default:"standard"},color:{type:String,default:"blue"},filled:{type:Boolean,default:!0},text:{type:String,default:"Label"}},setup(c){const t=c,l=e.ref(!1),u=e.computed(()=>{const s="inline-flex items-center cursor-pointer transition-opacity rounded-full",o=t.size==="mini"?"text-xs px-3 py-1":"text-sm px-4 py-2",a=t.filled?`${t.color}-filled`:`${t.color}-border`;return`${s} ${o} ${a} ${l.value?"opacity-80":"hover:opacity-90"}`}),r=()=>{l.value=!0},d=()=>{l.value=!1};return(s,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(u.value),onMousedown:r,onMouseup:d,onMouseleave:d},[e.createElementVNode("span",null,e.toDisplayString(c.text),1)],34))}});const k=e.defineComponent({__name:"OneCollapse",props:{blockClass:{},titleClass:{},defaultOpen:{type:Boolean}},setup(c){const t=c,{blockClass:l,titleClass:u,defaultOpen:r}=e.toRefs(t),d=e.ref(null),s=e.ref((r==null?void 0:r.value)??!1),o=()=>{s.value=!s.value},a=i=>{const n=i;n.style.height="0"},v=i=>{const n=i;n.style.height=`${i.scrollHeight}px`,n.style.transition="height 0.3s ease"},x=i=>{const n=i;n.style.height=`${i.scrollHeight}px`,e.nextTick(()=>{n.style.height="0",n.style.transition="height 0.3s ease"})};return(i,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(l))},[e.createElementVNode("div",{onClick:o,class:e.normalizeClass(e.unref(u))},[e.renderSlot(i.$slots,"title",{isOpen:s.value},void 0,!0)],2),e.createVNode(e.Transition,{name:"accordion",onBeforeEnter:a,onEnter:v,onLeave:x},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"content",ref:d},[e.renderSlot(i.$slots,"default",{},void 0,!0)],512),[[e.vShow,s.value]])]),_:3})],2))}});const S=y._export_sfc(k,[["__scopeId","data-v-1c2c0817"]]);const B={},E={class:"spinner",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{animation:"one-sp-ico-rot 2.7s linear infinite"}};function $(c,t){return e.openBlock(),e.createElementBlock("svg",E,t[0]||(t[0]=[e.createElementVNode("circle",{style:{"stroke-linecap":"round",animation:"one-sp-ico-dash 1.7s ease-in-out infinite"},class:"opacity-75",cx:"12",cy:"12",r:"8",fill:"none",stroke:"currentColor","stroke-width":"2"},null,-1)]))}const V=y._export_sfc(B,[["render",$]]),F={color:{type:String,default:"green"},size:{type:String,default:"md"},modelValue:{type:Boolean,default:!1},isLoading:{required:!1,type:Boolean,default:!1},disabled:{required:!1,type:Boolean,default:!1},textOn:{type:String,default:""},textOff:{type:String,default:""},iconOn:{type:[Function,Object]},iconOff:{type:[Function,Object]},iconClass:{type:[String,Array]}},I=["disabled","checked"],D=e.defineComponent({__name:"OneSwitch",props:F,emits:["update:modelValue"],setup(c,{emit:t}){const l=c,u=t,r=e.ref(l.modelValue),d=e.computed(()=>l.disabled),s=()=>{r.value=!r.value,u("update:modelValue",r.value)};e.watch(()=>l.modelValue,n=>{r.value=n});const o=e.computed(()=>l.size==="sm"?"w-max min-w-[40px] h-[20px]":l.size==="lg"?"w-max min-w-[60px] h-[31px]":l.size==="md"?"w-max min-w-[50px] h-[24px]":"w-max"),a=e.computed(()=>{if(r.value)switch(l.color){case"green":return"#86c94c";case"blue":return"#2196f3";case"red":return"#f44336";case"yellow":return"#ffeb3b";default:return"#86c94c"}else return"#E2E7EF"}),v=e.computed(()=>l.iconOn),x=e.computed(()=>l.iconOff),i=e.computed(()=>{const n=[];return typeof l.iconClass=="string"?n.push(l.iconClass):l.iconClass instanceof Array&&n.push(...l.iconClass),n});return(n,N)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("input",{type:"checkbox",disabled:n.disabled,checked:r.value,class:"hidden w-96",onClick:s},null,8,I),e.createElementVNode("div",{onClick:s,class:e.normalizeClass(["relative rounded-full cursor-pointer flex items-center",[o.value,n.isLoading?"loading":"",d.value?"disabled opacity-50 pointer-events-none":""]]),style:e.normalizeStyle({backgroundColor:d.value?"#ccc":a.value})},[e.createElementVNode("div",{class:e.normalizeClass(["bg-white absolute rounded-full",[n.size==="sm"?"w-[16px] h-[16px]":"",n.size==="md"?"w-[20px] h-[20px]":"",n.size==="lg"?"w-[27px] h-[27px]":"",r.value?"right-[2px] top-[2px]":"left-[2px] top-[2px]"]])},[e.createElementVNode("div",{class:e.normalizeClass(["circle",o.value])},[n.isLoading?(e.openBlock(),e.createBlock(V,{key:0,class:"absolute w-3 h-3 text-gray-400 left-1/2 top-1/2 -ml-1.5 -mt-1.5"})):r.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(v.value),{key:1,class:e.normalizeClass([i.value,"absolute w-3 h-3 text-gray-400 left-1/2 top-1/2 -ml-1.5 -mt-1.5"]),style:e.normalizeStyle({color:r.value?a.value:""})},null,8,["class","style"])):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(x.value),{key:2,class:e.normalizeClass([i.value,"absolute w-3 h-3 text-gray-400 left-1/2 top-1/2 -ml-1.5 -mt-1.5"])},null,8,["class"]))],2)],2),r.value&&n.textOn?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["switch-text text-white",[n.size==="sm"?"text-xs pr-6 pl-2":"",n.size==="md"?"text-sm pr-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("./index-9f8735d9.cjs"),f=require("./card/index.cjs"),p=require("./form/index.cjs"),m=require("./OneHelpMenu-05871821.cjs"),g=require("./dropdown/index.cjs"),h=require("./common/index.cjs"),e=require("vue"),y=require("./_plugin-vue_export-helper-f246444f.cjs");require("./XMarkIcon-f94baa4c.cjs");const w={color:{type:String,default:"red"},size:{type:String,default:"sm"},text:{type:String,default:""},variant:{type:String,default:"indicators"},bargeVariant:{type:String,default:"stand"}},C={class:"px-1 font-semibold",style:{color:"white"}},O=e.defineComponent({__name:"OneIndicators",props:{...w},setup(c){const t=c,l=e.computed(()=>{switch(t.color){case"green":return"#22c55e";case"blue":return"#3b82f6";case"red":return"#ef4444";case"yellow":return"#eab308";default:return"#E3ECF2"}}),u=e.computed(()=>{let s="",o="",a;return t.text?t.size==="sm"?(o="min-w-[12px]",a="textSm"):t.size==="md"?(o="min-w-[16px]",a="textMd"):t.size==="lg"&&(o="min-w-[20px]",a="textLg"):t.size==="sm"?s="w-3 min-w-[12px]":t.size==="lg"?s="w-5 min-w-[20px]":t.size==="md"&&(s="w-4 min-w-[16px]"),`${s} ${a} ${o} h-${t.size==="sm"?3:t.size==="lg"?5:4}`}),r=e.computed(()=>{let s="",o="",a;return t.text?t.size==="sm"?(o="min-w-[44px]",a="textMd"):t.size==="md"?(o="min-w-[58px]",a="text10"):t.size==="lg"&&(o="min-w-[68px]",a="text-sm"):t.size==="sm"?s="min-w-[44px]":t.size==="lg"?s="min-w-[68px]":t.size==="md"&&(s="min-w-[58px]"),`${s} ${a} ${o} h-${t.size==="sm"?5:t.size==="lg"?7:6}`}),d=e.computed(()=>{const s=t.bargeVariant==="stand"?"1A":"",o=t.bargeVariant==="stand"?"1px solid":"none";return{backgroundColor:`${l.value}${s}`,border:o,borderColor:l.value}});return(s,o)=>t.variant==="indicators"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["rounded-full border border-white flex items-center justify-center w-max",[u.value]]),style:e.normalizeStyle({backgroundColor:l.value})},[e.createElementVNode("p",C,e.toDisplayString(s.text),1)],6)):t.variant==="barge"?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["rounded px-2 py-1 text-center w-max",[r.value,{"rounded-full":s.bargeVariant==="round",rounded:s.bargeVariant!=="round"}]]),style:e.normalizeStyle([d.value])},[e.createElementVNode("p",{class:"font-medium",style:e.normalizeStyle({color:s.bargeVariant!=="stand"?"white":l.value})},e.toDisplayString(s.text),5)],6)):e.createCommentVNode("",!0)}});const b=y._export_sfc(O,[["__scopeId","data-v-3d58c944"]]),z=e.defineComponent({__name:"OneLabel",props:{size:{type:String,default:"standard"},color:{type:String,default:"blue"},filled:{type:Boolean,default:!0},text:{type:String,default:"Label"}},setup(c){const t=c,l=e.ref(!1),u=e.computed(()=>{const s="inline-flex items-center cursor-pointer transition-opacity rounded-full",o=t.size==="mini"?"text-xs px-3 py-1":"text-sm px-4 py-2",a=t.filled?`${t.color}-filled`:`${t.color}-border`;return`${s} ${o} ${a} ${l.value?"opacity-80":"hover:opacity-90"}`}),r=()=>{l.value=!0},d=()=>{l.value=!1};return(s,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(u.value),onMousedown:r,onMouseup:d,onMouseleave:d},[e.createElementVNode("span",null,e.toDisplayString(c.text),1)],34))}});const k=e.defineComponent({__name:"OneCollapse",props:{blockClass:{},titleClass:{},defaultOpen:{type:Boolean}},setup(c){const t=c,{blockClass:l,titleClass:u,defaultOpen:r}=e.toRefs(t),d=e.ref(null),s=e.ref((r==null?void 0:r.value)??!1),o=()=>{s.value=!s.value},a=i=>{const n=i;n.style.height="0"},v=i=>{const n=i;n.style.height=`${i.scrollHeight}px`,n.style.transition="height 0.3s ease"},x=i=>{const n=i;n.style.height=`${i.scrollHeight}px`,e.nextTick(()=>{n.style.height="0",n.style.transition="height 0.3s ease"})};return(i,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(l))},[e.createElementVNode("div",{onClick:o,class:e.normalizeClass(e.unref(u))},[e.renderSlot(i.$slots,"title",{isOpen:s.value},void 0,!0)],2),e.createVNode(e.Transition,{name:"accordion",onBeforeEnter:a,onEnter:v,onLeave:x},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"content",ref:d},[e.renderSlot(i.$slots,"default",{},void 0,!0)],512),[[e.vShow,s.value]])]),_:3})],2))}});const S=y._export_sfc(k,[["__scopeId","data-v-1c2c0817"]]);const B={},E={class:"spinner",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{animation:"one-sp-ico-rot 2.7s linear infinite"}};function $(c,t){return e.openBlock(),e.createElementBlock("svg",E,t[0]||(t[0]=[e.createElementVNode("circle",{style:{"stroke-linecap":"round",animation:"one-sp-ico-dash 1.7s ease-in-out infinite"},class:"opacity-75",cx:"12",cy:"12",r:"8",fill:"none",stroke:"currentColor","stroke-width":"2"},null,-1)]))}const V=y._export_sfc(B,[["render",$]]),F={color:{type:String,default:"green"},size:{type:String,default:"md"},modelValue:{type:Boolean,default:!1},isLoading:{required:!1,type:Boolean,default:!1},disabled:{required:!1,type:Boolean,default:!1},textOn:{type:String,default:""},textOff:{type:String,default:""},iconOn:{type:[Function,Object]},iconOff:{type:[Function,Object]},iconClass:{type:[String,Array]}},I=["disabled","checked"],D=e.defineComponent({__name:"OneSwitch",props:F,emits:["update:modelValue"],setup(c,{emit:t}){const l=c,u=t,r=e.ref(l.modelValue),d=e.computed(()=>l.disabled),s=()=>{r.value=!r.value,u("update:modelValue",r.value)};e.watch(()=>l.modelValue,n=>{r.value=n});const o=e.computed(()=>l.size==="sm"?"w-max min-w-[40px] h-[20px]":l.size==="lg"?"w-max min-w-[60px] h-[31px]":l.size==="md"?"w-max min-w-[50px] h-[24px]":"w-max"),a=e.computed(()=>{if(r.value)switch(l.color){case"green":return"#86c94c";case"blue":return"#2196f3";case"red":return"#f44336";case"yellow":return"#ffeb3b";default:return"#86c94c"}else return"#E2E7EF"}),v=e.computed(()=>l.iconOn),x=e.computed(()=>l.iconOff),i=e.computed(()=>{const n=[];return typeof l.iconClass=="string"?n.push(l.iconClass):l.iconClass instanceof Array&&n.push(...l.iconClass),n});return(n,N)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("input",{type:"checkbox",disabled:n.disabled,checked:r.value,class:"hidden w-96",onClick:s},null,8,I),e.createElementVNode("div",{onClick:s,class:e.normalizeClass(["relative rounded-full cursor-pointer flex items-center",[o.value,n.isLoading?"loading":"",d.value?"disabled opacity-50 pointer-events-none":""]]),style:e.normalizeStyle({backgroundColor:d.value?"#ccc":a.value})},[e.createElementVNode("div",{class:e.normalizeClass(["bg-white absolute rounded-full",[n.size==="sm"?"w-[16px] h-[16px]":"",n.size==="md"?"w-[20px] h-[20px]":"",n.size==="lg"?"w-[27px] h-[27px]":"",r.value?"right-[2px] top-[2px]":"left-[2px] top-[2px]"]])},[e.createElementVNode("div",{class:e.normalizeClass(["circle",o.value])},[n.isLoading?(e.openBlock(),e.createBlock(V,{key:0,class:"absolute w-3 h-3 text-gray-400 left-1/2 top-1/2 -ml-1.5 -mt-1.5"})):r.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(v.value),{key:1,class:e.normalizeClass([i.value,"absolute w-3 h-3 text-gray-400 left-1/2 top-1/2 -ml-1.5 -mt-1.5"]),style:e.normalizeStyle({color:r.value?a.value:""})},null,8,["class","style"])):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(x.value),{key:2,class:e.normalizeClass([i.value,"absolute w-3 h-3 text-gray-400 left-1/2 top-1/2 -ml-1.5 -mt-1.5"])},null,8,["class"]))],2)],2),r.value&&n.textOn?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["switch-text text-white",[n.size==="sm"?"text-xs pr-6 pl-2":"",n.size==="md"?"text-sm pr-6 pl-2":"",n.size==="lg"?"text-base pr-8 pl-2":""]])},e.toDisplayString(n.textOn),3)):!r.value&&n.textOff?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["switch-text w-max",[n.size==="sm"?"text-xs pl-6 pr-2":"",n.size==="md"?"text-sm pl-7 pr-2":"",n.size==="lg"?"text-base pl-8 pr-2":""]])},e.toDisplayString(n.textOff),3)):e.createCommentVNode("",!0)],6)],64))}});const M=y._export_sfc(D,[["__scopeId","data-v-d0ecef0b"]]);exports.OneButton=_._sfc_main;exports.OneCard=f.OneCard;exports.OneCardBody=f.OneCardBody;exports.OneCardFooter=f.OneCardFooter;exports.OneCardHeader=f.OneCardHeader;exports.OneForm=p.OneForm;exports.OneFormFeedback=p.OneFormFeedback;exports.OneFormField=p.OneFormField;exports.OneFormInput=p.OneFormInput;exports.OneFormLabel=p.OneFormLabel;exports.OneBrowserMenu=m.OneBrowserMenu;exports.OneDropdown=m._sfc_main$1;exports.OneDropdownItem=m._sfc_main$2;exports.OneHelpMenu=m.OneHelpMenu;exports.OneUserMenu=m._sfc_main;exports.OneBrowserMenuGrid=g.OneBrowserMenuGrid;exports.OneDropdownDivider=g.OneDropdownDivider;exports.OneAvatar=h.OneAvatar;exports.OneCollapse=S;exports.OneIndicators=b;exports.OneLabel=z;exports.OneSwitch=M;
|
package/dist/index.js
CHANGED
|
@@ -314,7 +314,7 @@ const T = /* @__PURE__ */ w(N, [["render", R]]), W = {
|
|
|
314
314
|
key: 0,
|
|
315
315
|
class: i(["switch-text text-white", [
|
|
316
316
|
t.size === "sm" ? "text-xs pr-6 pl-2" : "",
|
|
317
|
-
t.size === "md" ? "text-sm pr-
|
|
317
|
+
t.size === "md" ? "text-sm pr-6 pl-2" : "",
|
|
318
318
|
t.size === "lg" ? "text-base pr-8 pl-2" : ""
|
|
319
319
|
]])
|
|
320
320
|
}, y(t.textOn), 3)) : !o.value && t.textOff ? (d(), m("div", {
|
|
@@ -329,7 +329,7 @@ const T = /* @__PURE__ */ w(N, [["render", R]]), W = {
|
|
|
329
329
|
], 64));
|
|
330
330
|
}
|
|
331
331
|
});
|
|
332
|
-
const te = /* @__PURE__ */ w(U, [["__scopeId", "data-v-
|
|
332
|
+
const te = /* @__PURE__ */ w(U, [["__scopeId", "data-v-d0ecef0b"]]);
|
|
333
333
|
export {
|
|
334
334
|
ke as OneAvatar,
|
|
335
335
|
ye as OneBrowserMenu,
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.sidebar[data-v-b1d7b3ae]{background:rgba(245,247,251,.8);-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}.dropdown[data-v-b1d7b3ae]{position:absolute;background:white;border:1px solid #ccc;border-radius:5px;padding:10px;bottom:100%;left:0}.tooltip[data-v-b1d7b3ae]{position:relative}.tooltip-text[data-v-b1d7b3ae]{visibility:hidden;background-color:#000;color:#fff;text-align:center;padding:5px;border-radius:6px;position:absolute;z-index:1;bottom:125%;left:50%;transform:translate(-50%);opacity:0;transition:opacity .3s}.tooltip:hover .tooltip-text[data-v-b1d7b3ae]{visibility:visible;opacity:1}.cont[data-v-b1d7b3ae]{flex-direction:column;height:100vh;height:100dvh;justify-content:space-between}.overflow-y-auto[data-v-b1d7b3ae]::-webkit-scrollbar{width:2px}.overflow-y-auto[data-v-b1d7b3ae]::-webkit-scrollbar-track{background-color:#f1f1f1;border-radius:10px}.overflow-y-auto[data-v-b1d7b3ae]::-webkit-scrollbar-thumb{background-color:#888;border-radius:10px}.overflow-y-auto[data-v-b1d7b3ae]::-webkit-scrollbar-thumb:hover{background-color:#555}.border-gradient[data-v-b1d7b3ae]{position:relative;background:linear-gradient(to right,#E1A508,#E04040);border-radius:9px}.scroll-body[data-v-d9fab1d4]{height:100dvh}.module-border-wrap[data-v-d9fab1d4]{border-radius:14px;position:relative;background:linear-gradient(to right,#e1a508,#e04040);padding:1px}.overflow-y-auto[data-v-d9fab1d4]::-webkit-scrollbar{width:3px}.overflow-y-auto[data-v-d9fab1d4]::-webkit-scrollbar-track{background-color:#979ca9;border-radius:0}.overflow-y-auto[data-v-d9fab1d4]::-webkit-scrollbar-thumb{background-color:#888;border-radius:2px}.overflow-y-auto[data-v-d9fab1d4]::-webkit-scrollbar-thumb:hover{background-color:#555}.textSm[data-v-3d58c944]{font-size:6px}.textMd[data-v-3d58c944]{font-size:8px}.textLg[data-v-3d58c944]{font-size:9px}.text10[data-v-3d58c944]{font-size:10px}.text-sm[data-v-3d58c944]{font-size:12px}.text-md[data-v-3d58c944]{font-size:14px}.text-lg[data-v-3d58c944]{font-size:16px}.blue-filled{background-color:#007bff;color:#fff}.blue-border{border:2px solid #007bff;color:#007bff}.red-filled{background-color:#dc3545;color:#fff}.red-border{border:2px solid #dc3545;color:#dc3545}.green-filled{background-color:#28a745;color:#fff}.green-border{border:2px solid #28a745;color:#28a745}.yellow-filled{background-color:#fbbc04;color:#fff}.yellow-border{border:2px solid #fbbc04;color:#fbbc04}.accordion-enter-active[data-v-1c2c0817],.accordion-leave-active[data-v-1c2c0817]{transition:height .3s ease}.accordion-enter[data-v-1c2c0817],.accordion-leave-to[data-v-1c2c0817]{height:0;overflow:hidden}.switch[data-v-
|
|
1
|
+
.sidebar[data-v-b1d7b3ae]{background:rgba(245,247,251,.8);-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}.dropdown[data-v-b1d7b3ae]{position:absolute;background:white;border:1px solid #ccc;border-radius:5px;padding:10px;bottom:100%;left:0}.tooltip[data-v-b1d7b3ae]{position:relative}.tooltip-text[data-v-b1d7b3ae]{visibility:hidden;background-color:#000;color:#fff;text-align:center;padding:5px;border-radius:6px;position:absolute;z-index:1;bottom:125%;left:50%;transform:translate(-50%);opacity:0;transition:opacity .3s}.tooltip:hover .tooltip-text[data-v-b1d7b3ae]{visibility:visible;opacity:1}.cont[data-v-b1d7b3ae]{flex-direction:column;height:100vh;height:100dvh;justify-content:space-between}.overflow-y-auto[data-v-b1d7b3ae]::-webkit-scrollbar{width:2px}.overflow-y-auto[data-v-b1d7b3ae]::-webkit-scrollbar-track{background-color:#f1f1f1;border-radius:10px}.overflow-y-auto[data-v-b1d7b3ae]::-webkit-scrollbar-thumb{background-color:#888;border-radius:10px}.overflow-y-auto[data-v-b1d7b3ae]::-webkit-scrollbar-thumb:hover{background-color:#555}.border-gradient[data-v-b1d7b3ae]{position:relative;background:linear-gradient(to right,#E1A508,#E04040);border-radius:9px}.scroll-body[data-v-d9fab1d4]{height:100dvh}.module-border-wrap[data-v-d9fab1d4]{border-radius:14px;position:relative;background:linear-gradient(to right,#e1a508,#e04040);padding:1px}.overflow-y-auto[data-v-d9fab1d4]::-webkit-scrollbar{width:3px}.overflow-y-auto[data-v-d9fab1d4]::-webkit-scrollbar-track{background-color:#979ca9;border-radius:0}.overflow-y-auto[data-v-d9fab1d4]::-webkit-scrollbar-thumb{background-color:#888;border-radius:2px}.overflow-y-auto[data-v-d9fab1d4]::-webkit-scrollbar-thumb:hover{background-color:#555}.textSm[data-v-3d58c944]{font-size:6px}.textMd[data-v-3d58c944]{font-size:8px}.textLg[data-v-3d58c944]{font-size:9px}.text10[data-v-3d58c944]{font-size:10px}.text-sm[data-v-3d58c944]{font-size:12px}.text-md[data-v-3d58c944]{font-size:14px}.text-lg[data-v-3d58c944]{font-size:16px}.blue-filled{background-color:#007bff;color:#fff}.blue-border{border:2px solid #007bff;color:#007bff}.red-filled{background-color:#dc3545;color:#fff}.red-border{border:2px solid #dc3545;color:#dc3545}.green-filled{background-color:#28a745;color:#fff}.green-border{border:2px solid #28a745;color:#28a745}.yellow-filled{background-color:#fbbc04;color:#fff}.yellow-border{border:2px solid #fbbc04;color:#fbbc04}.accordion-enter-active[data-v-1c2c0817],.accordion-leave-active[data-v-1c2c0817]{transition:height .3s ease}.accordion-enter[data-v-1c2c0817],.accordion-leave-to[data-v-1c2c0817]{height:0;overflow:hidden}.switch[data-v-d0ecef0b]{position:relative;display:inline-block}.switch-checkbox[data-v-d0ecef0b]{opacity:0;width:0;height:0}.switch.disabled[data-v-d0ecef0b]{background-color:#ccc}.text9[data-v-4936d4e4]{font-size:9px}.h-browser[data-v-4936d4e4]{height:calc(100% - 75px)}.tooltip[data-v-83ffa612]{position:relative}.tooltip-text[data-v-83ffa612]{visibility:hidden;background-color:#000;color:#fff;text-align:center;padding:5px;border-radius:6px;position:absolute;z-index:1;bottom:125%;left:50%;transform:translate(-50%);opacity:0;transition:opacity .3s}.tooltip:hover .tooltip-text[data-v-83ffa612]{visibility:visible;opacity:1}.overflow-y-auto[data-v-83ffa612]::-webkit-scrollbar{width:2px}.overflow-y-auto[data-v-83ffa612]::-webkit-scrollbar-track{background-color:#f1f1f1;border-radius:10px}.overflow-y-auto[data-v-83ffa612]::-webkit-scrollbar-thumb{background-color:#888;border-radius:10px}.overflow-y-auto[data-v-83ffa612]::-webkit-scrollbar-thumb:hover{background-color:#555}@keyframes one-sp-ico-rot{to{transform:rotate(360deg)}}@keyframes one-sp-ico-dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-35}to{stroke-dasharray:90,150;stroke-dashoffset:-124}}
|