@returnless/focus-ui 0.0.52 → 0.0.53
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/focus-ui.js +6 -3
- package/dist/focus-ui.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/focus-ui.js
CHANGED
|
@@ -27920,15 +27920,18 @@ const H3 = { class: "ml-1 w-0 overflow-hidden whitespace-nowrap text-black trans
|
|
|
27920
27920
|
const t = e;
|
|
27921
27921
|
return (r, n) => ($(), ne(er(t.href ? S(Aw) : "button"), We({
|
|
27922
27922
|
href: r.href,
|
|
27923
|
+
target: r.href ? "_blank" : void 0,
|
|
27924
|
+
type: t.href ? void 0 : "button"
|
|
27925
|
+
}, r.$attrs, {
|
|
27923
27926
|
class: "group ml-2 flex shrink-0 items-center rounded-full border border-transparent p-1 pr-2 text-xs font-normal leading-none text-slate-500 hover:border-slate-300 hover:bg-slate-100 dark:text-zinc-400",
|
|
27924
|
-
|
|
27925
|
-
}
|
|
27927
|
+
onClick: r.onClick
|
|
27928
|
+
}), {
|
|
27926
27929
|
default: Y(() => [
|
|
27927
27930
|
ie(S(Eb), { class: "size-4 transition-colors group-hover:text-brand-500" }),
|
|
27928
27931
|
X("span", H3, Ie(r.label), 1)
|
|
27929
27932
|
]),
|
|
27930
27933
|
_: 1
|
|
27931
|
-
}, 16, ["href", "target", "onClick"]));
|
|
27934
|
+
}, 16, ["href", "target", "type", "onClick"]));
|
|
27932
27935
|
}
|
|
27933
27936
|
}), K3 = { class: "mb-4 size-14 overflow-hidden rounded-md border bg-white bg-gradient-to-tl from-slate-100 to-50% p-1 shadow" }, TR = /* @__PURE__ */ U({
|
|
27934
27937
|
__name: "CardIcon",
|
package/dist/focus-ui.umd.cjs
CHANGED
|
@@ -27,7 +27,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
27
27
|
|
|
28
28
|
Please specify a more appropriate element using the "as" attribute. For example:
|
|
29
29
|
|
|
30
|
-
<Link href="${s}" method="${o}" as="button">...</Link>`),i.h(e.as,{...r,...n==="a"?{href:s}:{},onClick:l=>{s5(l)&&(l.preventDefault(),Yf.visit(s,{data:a,method:o,replace:e.replace,preserveScroll:e.preserveScroll,preserveState:e.preserveState??o!=="get",only:e.only,except:e.except,headers:e.headers,onCancelToken:r.onCancelToken||(()=>({})),onBefore:r.onBefore||(()=>({})),onStart:r.onStart||(()=>({})),onProgress:r.onProgress||(()=>({})),onFinish:r.onFinish||(()=>({})),onCancel:r.onCancel||(()=>({})),onSuccess:r.onSuccess||(()=>({})),onError:r.onError||(()=>({}))}))}},t)}}}),w1=c5;const d5={class:"ml-1 w-0 overflow-hidden whitespace-nowrap text-black transition-[width] ease-out group-hover:w-[calc-size(auto,size)]"},_1=i.defineComponent({__name:"CardHelp",props:{label:{},href:{default:void 0},onClick:{type:Function,default:void 0}},setup(e){const t=e;return(r,n)=>(i.openBlock(),i.createBlock(i.resolveDynamicComponent(t.href?i.unref(w1):"button"),i.mergeProps({href:r.href,class:"group ml-2 flex shrink-0 items-center rounded-full border border-transparent p-1 pr-2 text-xs font-normal leading-none text-slate-500 hover:border-slate-300 hover:bg-slate-100 dark:text-zinc-400",target:r.href?"_blank":void 0},r.$attrs,{onClick:r.onClick}),{default:i.withCtx(()=>[i.createVNode(i.unref(Lm),{class:"size-4 transition-colors group-hover:text-brand-500"}),i.createElementVNode("span",d5,i.toDisplayString(r.label),1)]),_:1},16,["href","target","onClick"]))}}),f5={class:"mb-4 size-14 overflow-hidden rounded-md border bg-white bg-gradient-to-tl from-slate-100 to-50% p-1 shadow"},p5=i.defineComponent({__name:"CardIcon",props:{alt:{},source:{}},setup(e){return(t,r)=>(i.openBlock(),i.createElementBlock("div",f5,[i.createVNode(i.unref(wi),{fit:"contain"},{default:i.withCtx(()=>[i.createVNode(i.unref(Pn),{source:t.source,alt:t.alt,class:"rounded"},null,8,["source","alt"])]),_:1})]))}}),h5=i.defineComponent({__name:"CardLayout",props:{columns:{default:1}},setup(e){const t=e,r=i.computed(()=>[{"grid-cols-1":t.columns===1},{"grid-cols-2":t.columns===2},{"grid-cols-3":t.columns===3}]);return(n,o)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["grid gap-[var(--grid-gap)]",r.value])},[i.renderSlot(n.$slots,"default")],2))}}),ts=i.defineComponent({__name:"CardSection",props:{flush:{type:Boolean,default:!1},alignment:{default:"start"}},setup(e){const t=e,r=i.computed(()=>[{"py-6":t.flush},{"p-6":!t.flush},{"justify-start":t.alignment==="start"},{"justify-end":t.alignment==="end"}]);return(n,o)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass([r.value,"inline-flex h-full flex-col"])},[i.renderSlot(n.$slots,"default")],2))}}),m5={class:"relative bg-slate-200"},g5={key:0,class:"absolute inset-0"},v5=i.defineComponent({__name:"CardMedia",props:{alt:{},ratio:{default:16/9},source:{},subdued:{type:Boolean,default:!1}},setup(e){const t=i.ref(!1);function r(){t.value=!0}return(n,o)=>(i.openBlock(),i.createElementBlock("div",m5,[i.createVNode(i.unref(wi),{ratio:n.ratio},{default:i.withCtx(()=>[i.withDirectives(i.createVNode(i.unref(Pn),{alt:n.alt,source:n.source,class:i.normalizeClass({"opacity-30 grayscale":n.subdued}),onError:r},null,8,["alt","source","class"]),[[i.vShow,!t.value]])]),_:1},8,["ratio"]),n.$slots.default?(i.openBlock(),i.createElementBlock("div",g5,[i.createVNode(ts,null,{default:i.withCtx(()=>[i.renderSlot(n.$slots,"default")]),_:3})])):i.createCommentVNode("",!0)]))}}),y5={},b5={class:"relative flex h-0 items-center"};function w5(e,t){return i.openBlock(),i.createElementBlock("div",b5,t[0]||(t[0]=[i.createElementVNode("div",{class:"h-px w-full shrink-0 bg-slate-300 dark:bg-zinc-700"},null,-1)]))}const _5=we(y5,[["render",w5]]),S5={class:"flex items-center"},x5={class:"truncate"},E5=i.defineComponent({__name:"CardTitle",props:{cardHelp:{default:null}},setup(e){return(t,r)=>(i.openBlock(),i.createBlock(i.unref(Mn),{level:"h2"},{default:i.withCtx(()=>[i.createElementVNode("span",S5,[i.createElementVNode("span",x5,[i.renderSlot(t.$slots,"default")]),t.cardHelp?(i.openBlock(),i.createBlock(i.unref(_1),i.normalizeProps(i.mergeProps({key:0},t.cardHelp)),null,16)):i.createCommentVNode("",!0)])]),_:3}))}}),k5={class:"h-4 rounded flex [&>*]:flex-shrink-0 overflow-hidden mb-4"},C5=["onMouseenter"],T5=["onMouseenter"],A5={class:"space-x-1"},O5=i.defineComponent({__name:"CategoryBar",props:{categories:{}},setup(e){const t=e,r=i.ref(null),n=i.computed(()=>t.categories.reduce((s,a)=>s+a.value,0)),o=i.computed(()=>t.categories.map(s=>({...s,percentage:(s.value/n.value*100).toFixed(1),color:Je(s.color,"500")})));return(s,a)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("div",k5,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.value,(l,u)=>(i.openBlock(),i.createElementBlock("div",{key:u,class:i.normalizeClass([{"opacity-50":r.value!==null&&r.value!==u},"h-full w-10 bg-red-500 transition-opacity duration-100"]),style:i.normalizeStyle({width:`${l.percentage}%`,backgroundColor:l.color}),onMouseenter:c=>r.value=u,onMouseleave:a[0]||(a[0]=c=>r.value=null)},null,46,C5))),128))]),i.createElementVNode("ul",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.value,(l,u)=>(i.openBlock(),i.createElementBlock("li",{key:u,class:i.normalizeClass(["flex pb-2 transition-opacity duration-100 space-x-2",{"opacity-50":r.value!==null&&r.value!==u}]),onMouseenter:c=>r.value=u,onMouseleave:a[1]||(a[1]=c=>r.value=null)},[i.createElementVNode("div",{class:"rounded-full size-2 mt-1.5",style:i.normalizeStyle({backgroundColor:l.color})},null,4),i.createElementVNode("div",null,[i.createVNode(i.unref($e),{subdued:"",strong:""},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(l.label),1)]),_:2},1024),i.createElementVNode("div",A5,[i.createVNode(i.unref($e),{strong:""},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(l.value),1)]),_:2},1024),i.createVNode(i.unref($e),{subdued:""},{default:i.withCtx(()=>[i.createTextVNode(" ("+i.toDisplayString(l.percentage)+"%) ",1)]),_:2},1024)])])],42,T5))),128)),i.createElementVNode("li",null,[a[2]||(a[2]=i.createTextVNode(" Total ")),i.createVNode(i.unref($e),{strong:""},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(n.value),1)]),_:1})])])],64))}}),un=i.defineComponent({__name:"InputLabel",props:{label:{},labelFor:{},labelHidden:{type:Boolean,default:!1}},setup(e){const t=e,r=i.computed(()=>t.labelHidden?$n:"label");return(n,o)=>(i.openBlock(),i.createBlock(i.resolveDynamicComponent(r.value),{for:n.labelFor,class:"block w-fit cursor-pointer truncate align-baseline text-sm font-medium"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(n.label),1)]),_:1},8,["for"]))}}),B5=["aria-checked","aria-labelledby"],$5={class:"relative"},P5=["id","value"],I5={class:"pointer-events-none invisible absolute inset-0 z-10 flex size-4 items-center justify-center rounded bg-brand-500 text-white peer-checked:visible"},D5={key:0,"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},R5={key:1,"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},M5={key:0,class:"-mt-[2px] space-y-1"},L5=i.defineComponent({__name:"Checkbox",props:i.mergeModels({helpText:{default:null},id:{default:null},indeterminate:{type:Boolean},label:{},labelHidden:{type:Boolean,default:!1},value:{type:[String,Number,Boolean]}},{modelValue:{type:[Boolean,Array]},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,r=i.ref(null),n=i.useModel(e,"modelValue"),o=t.id||Ie("checkbox"),s=i.computed(()=>Array.isArray(n.value)?n.value.includes(t.value):n.value);return(a,l)=>(i.openBlock(),i.createElementBlock("div",{"aria-checked":s.value,"aria-labelledby":i.unref(o),class:"flex items-start space-x-2",role:"checkbox"},[i.createElementVNode("div",$5,[i.withDirectives(i.createElementVNode("input",{id:i.unref(o),ref_key:"$checkboxElement",ref:r,"onUpdate:modelValue":l[0]||(l[0]=u=>n.value=u),class:i.normalizeClass([i.unref(Et)("focus"),"peer block size-4 shrink-0 appearance-none rounded border border-slate-400 bg-white text-brand-500 shadow-sm dark:border-zinc-700 dark:bg-zinc-800 dark:text-blue-500"]),value:a.value,type:"checkbox"},null,10,P5),[[i.vModelCheckbox,n.value]]),i.createElementVNode("div",I5,[a.indeterminate?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("svg",D5,l[1]||(l[1]=[i.createElementVNode("path",{d:"M11.2 5.59998L6.79999 9.99998L4.79999 7.99998",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},null,-1)]))),a.indeterminate?(i.openBlock(),i.createElementBlock("svg",R5,l[2]||(l[2]=[i.createElementVNode("line",{stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",x1:"4",x2:"12",y1:"8",y2:"8"},null,-1)]))):i.createCommentVNode("",!0)])]),a.labelHidden?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",M5,[i.createVNode(i.unref(un),{label:a.label,"label-for":i.unref(o)},null,8,["label","label-for"]),a.helpText?(i.openBlock(),i.createBlock(i.unref($e),{key:0,subdued:""},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(a.helpText),1)]),_:1})):i.createCommentVNode("",!0)]))],8,B5))}}),q5={class:"space-y-2"},F5={key:0},V5=i.defineComponent({__name:"CheckboxGroup",props:{label:{default:null}},setup(e){return(t,r)=>(i.openBlock(),i.createElementBlock("div",q5,[t.label?(i.openBlock(),i.createElementBlock("p",F5,[i.createVNode(i.unref($e),{subdued:"",strong:""},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(t.label),1)]),_:1})])):i.createCommentVNode("",!0),i.renderSlot(t.$slots,"default")]))}}),z5=["id"],j5=i.defineComponent({__name:"Collapsible",props:{id:{},open:{type:Boolean,default:!1}},setup(e){function t(s){s.style.height="0"}function r(s){s.style.height=s.scrollHeight+"px"}function n(s){s.style.height=s.scrollHeight+"px"}function o(s){s.style.height="0"}return(s,a)=>(i.openBlock(),i.createBlock(i.Transition,{onEnter:r,onLeave:o,onBeforeEnter:t,onBeforeLeave:n},{default:i.withCtx(()=>[i.withDirectives(i.createElementVNode("div",{id:s.id,class:"transition-all duration-200 ease-in-out overflow-hidden",role:"region"},[i.renderSlot(s.$slots,"default")],8,z5),[[i.vShow,s.open]])]),_:3}))}}),U5=["id"],W5={class:"break-words"},uo=i.defineComponent({__name:"InlineError",props:{id:{},message:{}},setup(e){return(t,r)=>(i.openBlock(),i.createElementBlock("div",{id:t.id,class:"flex items-start space-x-2 text-red-600"},[r[0]||(r[0]=i.createElementVNode("svg",{viewBox:"0 0 20 20",class:"fill-current size-5 flex-shrink-0",focusable:"false","aria-hidden":"true"},[i.createElementVNode("path",{d:"M10 6a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5a.75.75 0 0 1 .75-.75Z"}),i.createElementVNode("path",{d:"M11 13a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"}),i.createElementVNode("path",{"fill-rule":"evenodd",d:"M17 10a7 7 0 1 1-14 0 7 7 0 0 1 14 0Zm-1.5 0a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0Z"})],-1)),i.createElementVNode("span",W5,i.toDisplayString(t.message),1)],8,U5))}}),H5={class:"w-full"},G5={class:"block cursor-pointer px-2 py-1.5"},K5={class:"font-mono"},Y5=["id","name"],J5={class:"text-sm text-slate-500"},X5=i.defineComponent({__name:"ColorInput",props:i.mergeModels({disabled:{type:Boolean,default:!1},error:{default:null},helpText:{default:null},id:{default:null},label:{},labelHidden:{type:Boolean,default:!1},name:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,r=i.useModel(e,"modelValue"),n=t.id||Ie("colorInput"),o=i.computed(()=>t.error?Ie("colorInputError"):void 0),s=i.computed(()=>[{"mt-1":!t.labelHidden},{"pointer-events-none bg-slate-50 cursor-not-allowed":t.disabled},{"bg-white cursor-pointer":!t.disabled},...Et("focusWithin")]);return(a,l)=>(i.openBlock(),i.createElementBlock("div",H5,[i.createVNode(i.unref(un),{id:`${i.unref(n)}-label`,label:a.label,"label-for":i.unref(n),"label-hidden":a.labelHidden,"aria-disabled":a.disabled},null,8,["id","label","label-for","label-hidden","aria-disabled"]),i.createElementVNode("label",{class:i.normalizeClass(["relative flex w-full items-center rounded border shadow-sm",s.value])},[i.createElementVNode("span",G5,[i.createElementVNode("span",{class:"block rounded size-6",style:i.normalizeStyle({backgroundColor:r.value})},null,4)]),i.createElementVNode("span",K5,i.toDisplayString(r.value),1),i.createVNode(i.unref($n),null,{default:i.withCtx(()=>[i.withDirectives(i.createElementVNode("input",{id:i.unref(n),"onUpdate:modelValue":l[0]||(l[0]=u=>r.value=u),name:a.name,type:"color"},null,8,Y5),[[i.vModelText,r.value]])]),_:1})],2),a.error&&o.value?(i.openBlock(),i.createBlock(i.unref(uo),{key:0,id:o.value,message:a.error},null,8,["id","message"])):i.createCommentVNode("",!0),i.createElementVNode("p",J5,i.toDisplayString(a.helpText),1)]))}}),Z5=["value"],Q5=we(i.defineComponent({__name:"ColorPalette",props:i.mergeModels({colors:{},rows:{default:2}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,r=i.useModel(e,"modelValue"),n=i.computed(()=>({gridTemplateColumns:`repeat(${Math.round(t.colors.length/t.rows)}, minmax(0, 1fr))`}));function o(s){return Je(s,"500")}return(s,a)=>(i.openBlock(),i.createElementBlock("ul",{class:"grid gap-x-4 gap-y-2",style:i.normalizeStyle(n.value)},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.colors,l=>(i.openBlock(),i.createElementBlock("li",{key:l},[i.withDirectives(i.createElementVNode("input",{"onUpdate:modelValue":a[0]||(a[0]=u=>r.value=u),value:l,class:"flex size-6 cursor-pointer appearance-none items-center justify-center rounded-full bg-gradient-to-tr from-white/20 shadow-inner transition-opacity duration-100 hover:opacity-50",type:"radio",style:i.normalizeStyle({backgroundColor:o(l)})},null,12,Z5),[[i.vModelRadio,r.value]])]))),128))],4))}}),[["__scopeId","data-v-55656b4c"]]);/**!
|
|
30
|
+
<Link href="${s}" method="${o}" as="button">...</Link>`),i.h(e.as,{...r,...n==="a"?{href:s}:{},onClick:l=>{s5(l)&&(l.preventDefault(),Yf.visit(s,{data:a,method:o,replace:e.replace,preserveScroll:e.preserveScroll,preserveState:e.preserveState??o!=="get",only:e.only,except:e.except,headers:e.headers,onCancelToken:r.onCancelToken||(()=>({})),onBefore:r.onBefore||(()=>({})),onStart:r.onStart||(()=>({})),onProgress:r.onProgress||(()=>({})),onFinish:r.onFinish||(()=>({})),onCancel:r.onCancel||(()=>({})),onSuccess:r.onSuccess||(()=>({})),onError:r.onError||(()=>({}))}))}},t)}}}),w1=c5;const d5={class:"ml-1 w-0 overflow-hidden whitespace-nowrap text-black transition-[width] ease-out group-hover:w-[calc-size(auto,size)]"},_1=i.defineComponent({__name:"CardHelp",props:{label:{},href:{default:void 0},onClick:{type:Function,default:void 0}},setup(e){const t=e;return(r,n)=>(i.openBlock(),i.createBlock(i.resolveDynamicComponent(t.href?i.unref(w1):"button"),i.mergeProps({href:r.href,target:r.href?"_blank":void 0,type:t.href?void 0:"button"},r.$attrs,{class:"group ml-2 flex shrink-0 items-center rounded-full border border-transparent p-1 pr-2 text-xs font-normal leading-none text-slate-500 hover:border-slate-300 hover:bg-slate-100 dark:text-zinc-400",onClick:r.onClick}),{default:i.withCtx(()=>[i.createVNode(i.unref(Lm),{class:"size-4 transition-colors group-hover:text-brand-500"}),i.createElementVNode("span",d5,i.toDisplayString(r.label),1)]),_:1},16,["href","target","type","onClick"]))}}),f5={class:"mb-4 size-14 overflow-hidden rounded-md border bg-white bg-gradient-to-tl from-slate-100 to-50% p-1 shadow"},p5=i.defineComponent({__name:"CardIcon",props:{alt:{},source:{}},setup(e){return(t,r)=>(i.openBlock(),i.createElementBlock("div",f5,[i.createVNode(i.unref(wi),{fit:"contain"},{default:i.withCtx(()=>[i.createVNode(i.unref(Pn),{source:t.source,alt:t.alt,class:"rounded"},null,8,["source","alt"])]),_:1})]))}}),h5=i.defineComponent({__name:"CardLayout",props:{columns:{default:1}},setup(e){const t=e,r=i.computed(()=>[{"grid-cols-1":t.columns===1},{"grid-cols-2":t.columns===2},{"grid-cols-3":t.columns===3}]);return(n,o)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["grid gap-[var(--grid-gap)]",r.value])},[i.renderSlot(n.$slots,"default")],2))}}),ts=i.defineComponent({__name:"CardSection",props:{flush:{type:Boolean,default:!1},alignment:{default:"start"}},setup(e){const t=e,r=i.computed(()=>[{"py-6":t.flush},{"p-6":!t.flush},{"justify-start":t.alignment==="start"},{"justify-end":t.alignment==="end"}]);return(n,o)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass([r.value,"inline-flex h-full flex-col"])},[i.renderSlot(n.$slots,"default")],2))}}),m5={class:"relative bg-slate-200"},g5={key:0,class:"absolute inset-0"},v5=i.defineComponent({__name:"CardMedia",props:{alt:{},ratio:{default:16/9},source:{},subdued:{type:Boolean,default:!1}},setup(e){const t=i.ref(!1);function r(){t.value=!0}return(n,o)=>(i.openBlock(),i.createElementBlock("div",m5,[i.createVNode(i.unref(wi),{ratio:n.ratio},{default:i.withCtx(()=>[i.withDirectives(i.createVNode(i.unref(Pn),{alt:n.alt,source:n.source,class:i.normalizeClass({"opacity-30 grayscale":n.subdued}),onError:r},null,8,["alt","source","class"]),[[i.vShow,!t.value]])]),_:1},8,["ratio"]),n.$slots.default?(i.openBlock(),i.createElementBlock("div",g5,[i.createVNode(ts,null,{default:i.withCtx(()=>[i.renderSlot(n.$slots,"default")]),_:3})])):i.createCommentVNode("",!0)]))}}),y5={},b5={class:"relative flex h-0 items-center"};function w5(e,t){return i.openBlock(),i.createElementBlock("div",b5,t[0]||(t[0]=[i.createElementVNode("div",{class:"h-px w-full shrink-0 bg-slate-300 dark:bg-zinc-700"},null,-1)]))}const _5=we(y5,[["render",w5]]),S5={class:"flex items-center"},x5={class:"truncate"},E5=i.defineComponent({__name:"CardTitle",props:{cardHelp:{default:null}},setup(e){return(t,r)=>(i.openBlock(),i.createBlock(i.unref(Mn),{level:"h2"},{default:i.withCtx(()=>[i.createElementVNode("span",S5,[i.createElementVNode("span",x5,[i.renderSlot(t.$slots,"default")]),t.cardHelp?(i.openBlock(),i.createBlock(i.unref(_1),i.normalizeProps(i.mergeProps({key:0},t.cardHelp)),null,16)):i.createCommentVNode("",!0)])]),_:3}))}}),k5={class:"h-4 rounded flex [&>*]:flex-shrink-0 overflow-hidden mb-4"},C5=["onMouseenter"],T5=["onMouseenter"],A5={class:"space-x-1"},O5=i.defineComponent({__name:"CategoryBar",props:{categories:{}},setup(e){const t=e,r=i.ref(null),n=i.computed(()=>t.categories.reduce((s,a)=>s+a.value,0)),o=i.computed(()=>t.categories.map(s=>({...s,percentage:(s.value/n.value*100).toFixed(1),color:Je(s.color,"500")})));return(s,a)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createElementVNode("div",k5,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.value,(l,u)=>(i.openBlock(),i.createElementBlock("div",{key:u,class:i.normalizeClass([{"opacity-50":r.value!==null&&r.value!==u},"h-full w-10 bg-red-500 transition-opacity duration-100"]),style:i.normalizeStyle({width:`${l.percentage}%`,backgroundColor:l.color}),onMouseenter:c=>r.value=u,onMouseleave:a[0]||(a[0]=c=>r.value=null)},null,46,C5))),128))]),i.createElementVNode("ul",null,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.value,(l,u)=>(i.openBlock(),i.createElementBlock("li",{key:u,class:i.normalizeClass(["flex pb-2 transition-opacity duration-100 space-x-2",{"opacity-50":r.value!==null&&r.value!==u}]),onMouseenter:c=>r.value=u,onMouseleave:a[1]||(a[1]=c=>r.value=null)},[i.createElementVNode("div",{class:"rounded-full size-2 mt-1.5",style:i.normalizeStyle({backgroundColor:l.color})},null,4),i.createElementVNode("div",null,[i.createVNode(i.unref($e),{subdued:"",strong:""},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(l.label),1)]),_:2},1024),i.createElementVNode("div",A5,[i.createVNode(i.unref($e),{strong:""},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(l.value),1)]),_:2},1024),i.createVNode(i.unref($e),{subdued:""},{default:i.withCtx(()=>[i.createTextVNode(" ("+i.toDisplayString(l.percentage)+"%) ",1)]),_:2},1024)])])],42,T5))),128)),i.createElementVNode("li",null,[a[2]||(a[2]=i.createTextVNode(" Total ")),i.createVNode(i.unref($e),{strong:""},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(n.value),1)]),_:1})])])],64))}}),un=i.defineComponent({__name:"InputLabel",props:{label:{},labelFor:{},labelHidden:{type:Boolean,default:!1}},setup(e){const t=e,r=i.computed(()=>t.labelHidden?$n:"label");return(n,o)=>(i.openBlock(),i.createBlock(i.resolveDynamicComponent(r.value),{for:n.labelFor,class:"block w-fit cursor-pointer truncate align-baseline text-sm font-medium"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(n.label),1)]),_:1},8,["for"]))}}),B5=["aria-checked","aria-labelledby"],$5={class:"relative"},P5=["id","value"],I5={class:"pointer-events-none invisible absolute inset-0 z-10 flex size-4 items-center justify-center rounded bg-brand-500 text-white peer-checked:visible"},D5={key:0,"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},R5={key:1,"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},M5={key:0,class:"-mt-[2px] space-y-1"},L5=i.defineComponent({__name:"Checkbox",props:i.mergeModels({helpText:{default:null},id:{default:null},indeterminate:{type:Boolean},label:{},labelHidden:{type:Boolean,default:!1},value:{type:[String,Number,Boolean]}},{modelValue:{type:[Boolean,Array]},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,r=i.ref(null),n=i.useModel(e,"modelValue"),o=t.id||Ie("checkbox"),s=i.computed(()=>Array.isArray(n.value)?n.value.includes(t.value):n.value);return(a,l)=>(i.openBlock(),i.createElementBlock("div",{"aria-checked":s.value,"aria-labelledby":i.unref(o),class:"flex items-start space-x-2",role:"checkbox"},[i.createElementVNode("div",$5,[i.withDirectives(i.createElementVNode("input",{id:i.unref(o),ref_key:"$checkboxElement",ref:r,"onUpdate:modelValue":l[0]||(l[0]=u=>n.value=u),class:i.normalizeClass([i.unref(Et)("focus"),"peer block size-4 shrink-0 appearance-none rounded border border-slate-400 bg-white text-brand-500 shadow-sm dark:border-zinc-700 dark:bg-zinc-800 dark:text-blue-500"]),value:a.value,type:"checkbox"},null,10,P5),[[i.vModelCheckbox,n.value]]),i.createElementVNode("div",I5,[a.indeterminate?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("svg",D5,l[1]||(l[1]=[i.createElementVNode("path",{d:"M11.2 5.59998L6.79999 9.99998L4.79999 7.99998",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},null,-1)]))),a.indeterminate?(i.openBlock(),i.createElementBlock("svg",R5,l[2]||(l[2]=[i.createElementVNode("line",{stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",x1:"4",x2:"12",y1:"8",y2:"8"},null,-1)]))):i.createCommentVNode("",!0)])]),a.labelHidden?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",M5,[i.createVNode(i.unref(un),{label:a.label,"label-for":i.unref(o)},null,8,["label","label-for"]),a.helpText?(i.openBlock(),i.createBlock(i.unref($e),{key:0,subdued:""},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(a.helpText),1)]),_:1})):i.createCommentVNode("",!0)]))],8,B5))}}),q5={class:"space-y-2"},F5={key:0},V5=i.defineComponent({__name:"CheckboxGroup",props:{label:{default:null}},setup(e){return(t,r)=>(i.openBlock(),i.createElementBlock("div",q5,[t.label?(i.openBlock(),i.createElementBlock("p",F5,[i.createVNode(i.unref($e),{subdued:"",strong:""},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(t.label),1)]),_:1})])):i.createCommentVNode("",!0),i.renderSlot(t.$slots,"default")]))}}),z5=["id"],j5=i.defineComponent({__name:"Collapsible",props:{id:{},open:{type:Boolean,default:!1}},setup(e){function t(s){s.style.height="0"}function r(s){s.style.height=s.scrollHeight+"px"}function n(s){s.style.height=s.scrollHeight+"px"}function o(s){s.style.height="0"}return(s,a)=>(i.openBlock(),i.createBlock(i.Transition,{onEnter:r,onLeave:o,onBeforeEnter:t,onBeforeLeave:n},{default:i.withCtx(()=>[i.withDirectives(i.createElementVNode("div",{id:s.id,class:"transition-all duration-200 ease-in-out overflow-hidden",role:"region"},[i.renderSlot(s.$slots,"default")],8,z5),[[i.vShow,s.open]])]),_:3}))}}),U5=["id"],W5={class:"break-words"},uo=i.defineComponent({__name:"InlineError",props:{id:{},message:{}},setup(e){return(t,r)=>(i.openBlock(),i.createElementBlock("div",{id:t.id,class:"flex items-start space-x-2 text-red-600"},[r[0]||(r[0]=i.createElementVNode("svg",{viewBox:"0 0 20 20",class:"fill-current size-5 flex-shrink-0",focusable:"false","aria-hidden":"true"},[i.createElementVNode("path",{d:"M10 6a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5a.75.75 0 0 1 .75-.75Z"}),i.createElementVNode("path",{d:"M11 13a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"}),i.createElementVNode("path",{"fill-rule":"evenodd",d:"M17 10a7 7 0 1 1-14 0 7 7 0 0 1 14 0Zm-1.5 0a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0Z"})],-1)),i.createElementVNode("span",W5,i.toDisplayString(t.message),1)],8,U5))}}),H5={class:"w-full"},G5={class:"block cursor-pointer px-2 py-1.5"},K5={class:"font-mono"},Y5=["id","name"],J5={class:"text-sm text-slate-500"},X5=i.defineComponent({__name:"ColorInput",props:i.mergeModels({disabled:{type:Boolean,default:!1},error:{default:null},helpText:{default:null},id:{default:null},label:{},labelHidden:{type:Boolean,default:!1},name:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,r=i.useModel(e,"modelValue"),n=t.id||Ie("colorInput"),o=i.computed(()=>t.error?Ie("colorInputError"):void 0),s=i.computed(()=>[{"mt-1":!t.labelHidden},{"pointer-events-none bg-slate-50 cursor-not-allowed":t.disabled},{"bg-white cursor-pointer":!t.disabled},...Et("focusWithin")]);return(a,l)=>(i.openBlock(),i.createElementBlock("div",H5,[i.createVNode(i.unref(un),{id:`${i.unref(n)}-label`,label:a.label,"label-for":i.unref(n),"label-hidden":a.labelHidden,"aria-disabled":a.disabled},null,8,["id","label","label-for","label-hidden","aria-disabled"]),i.createElementVNode("label",{class:i.normalizeClass(["relative flex w-full items-center rounded border shadow-sm",s.value])},[i.createElementVNode("span",G5,[i.createElementVNode("span",{class:"block rounded size-6",style:i.normalizeStyle({backgroundColor:r.value})},null,4)]),i.createElementVNode("span",K5,i.toDisplayString(r.value),1),i.createVNode(i.unref($n),null,{default:i.withCtx(()=>[i.withDirectives(i.createElementVNode("input",{id:i.unref(n),"onUpdate:modelValue":l[0]||(l[0]=u=>r.value=u),name:a.name,type:"color"},null,8,Y5),[[i.vModelText,r.value]])]),_:1})],2),a.error&&o.value?(i.openBlock(),i.createBlock(i.unref(uo),{key:0,id:o.value,message:a.error},null,8,["id","message"])):i.createCommentVNode("",!0),i.createElementVNode("p",J5,i.toDisplayString(a.helpText),1)]))}}),Z5=["value"],Q5=we(i.defineComponent({__name:"ColorPalette",props:i.mergeModels({colors:{},rows:{default:2}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,r=i.useModel(e,"modelValue"),n=i.computed(()=>({gridTemplateColumns:`repeat(${Math.round(t.colors.length/t.rows)}, minmax(0, 1fr))`}));function o(s){return Je(s,"500")}return(s,a)=>(i.openBlock(),i.createElementBlock("ul",{class:"grid gap-x-4 gap-y-2",style:i.normalizeStyle(n.value)},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.colors,l=>(i.openBlock(),i.createElementBlock("li",{key:l},[i.withDirectives(i.createElementVNode("input",{"onUpdate:modelValue":a[0]||(a[0]=u=>r.value=u),value:l,class:"flex size-6 cursor-pointer appearance-none items-center justify-center rounded-full bg-gradient-to-tr from-white/20 shadow-inner transition-opacity duration-100 hover:opacity-50",type:"radio",style:i.normalizeStyle({backgroundColor:o(l)})},null,12,Z5),[[i.vModelRadio,r.value]])]))),128))],4))}}),[["__scopeId","data-v-55656b4c"]]);/**!
|
|
31
31
|
* Sortable 1.15.6
|
|
32
32
|
* @author RubaXa <trash@rubaxa.org>
|
|
33
33
|
* @author owenm <owen23355@gmail.com>
|