airi / assets /ColorPalette-DaCdckPj.js
nekomeowww's picture
release: build 032a44c661c1020a4d672f3185064600fd43114d
d8d73ee
raw
history blame
1.34 kB
import{DEFAULT_THEME_COLORS_HUE as e,Fragment as t,createBlock as n,createCommentVNode as r,createElementBlock as i,createTextVNode as a,createVNode as o,defineComponent as s,normalizeClass as c,normalizeStyle as l,openBlock as u,renderList as d,toDisplayString as f,unref as p,useSettings as m,withCtx as h}from"./index-BtAisBe9.js";import{Gg as g,Hg as _,Ug as v,Wg as y,jg as b,qg as x}from"./dist-DzeHt4xm.js";const S={key:0,flex:``,"gap-2":``};var C=s({__name:`ColorPalette`,props:{colors:null},setup(s){let C=m();return(m,w)=>s.colors.length?(u(),i(`div`,S,[(u(!0),i(t,null,d(s.colors,({hex:t,name:r})=>(u(),n(p(_),{key:t||`default`},{default:h(()=>[o(p(y),null,{default:h(()=>[o(p(b),{transition:`all ease-in-out duration-250`,"size-6":``,"cursor-pointer":``,"rounded-full":``,"bg-primary-500":``,style:l(t?{background:t}:{"--chromatic-hue":p(e)}),class:c(p(C).isColorSelectedForPrimary(t)?`scale-150 mx-1`:`hover:scale-110`),onClick:e=>p(C).applyPrimaryColorFrom(t)},null,8,[`style`,`class`,`onClick`]),o(p(x),null,{default:h(()=>[o(p(v),{bg:`white dark:neutral-800`,"rounded-lg":``,"px-3":``,"py-1.5":``,"text-sm":``,"shadow-md":``},{default:h(()=>[a(f(r)+` `,1),o(p(g),{"fill-white":``,"dark:fill-neutral-800":``})]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))])):r(``,!0)}}),w=C;export{w as ColorPalette_default};