diff --git a/docs/assets/Artboard.stories-82bdeecf.js b/docs/assets/Artboard.stories-5d677b6e.js similarity index 96% rename from docs/assets/Artboard.stories-82bdeecf.js rename to docs/assets/Artboard.stories-5d677b6e.js index 77d283f0..a2ff0c9b 100644 --- a/docs/assets/Artboard.stories-82bdeecf.js +++ b/docs/assets/Artboard.stories-5d677b6e.js @@ -1,4 +1,4 @@ -import{t as dr,j as rr}from"./tw-merge-0a3648bd.js";import{r as ir}from"./index-1b03fe98.js";import{c as cr}from"./clsx.m-1229b3e0.js";const g=ir.forwardRef(({children:a,demo:b=!0,size:e,horizontal:er,dataTheme:ar,className:or,...nr},sr)=>{const tr=dr("artboard",or,cr({"artboard-demo":b,"phone-1":e===1,"phone-2":e===2,"phone-3":e===3,"phone-4":e===4,"phone-5":e===5,"phone-6":e===6,horizontal:er}));return rr("div",{"aria-label":"Artboard",...nr,ref:sr,"data-theme":ar,className:tr,children:a})});g.displayName="Artboard";const z=g;try{g.displayName="Artboard",g.__docgenInfo={description:"",displayName:"Artboard",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},demo:{defaultValue:{value:"true"},description:"",name:"demo",required:!1,type:{name:"boolean"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"4"},{value:"2"},{value:"1"},{value:"3"},{value:"5"},{value:"6"}]}},horizontal:{defaultValue:null,description:"",name:"horizontal",required:!1,type:{name:"boolean"}}}}}catch{}try{z.displayName="Artboard",z.__docgenInfo={description:"",displayName:"Artboard",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},demo:{defaultValue:{value:"true"},description:"",name:"demo",required:!1,type:{name:"boolean"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"4"},{value:"2"},{value:"1"},{value:"3"},{value:"5"},{value:"6"}]}},horizontal:{defaultValue:null,description:"",name:"horizontal",required:!1,type:{name:"boolean"}}}}}catch{}const mr={title:"Layout/Artboard",component:z},r=({children:a,...b})=>rr(z,{...b,children:a}),o=r.bind({});o.args={size:1,children:" 320×568"};const n=r.bind({});n.args={size:2,children:" 375×667"};const s=r.bind({});s.args={size:3,children:" 414×736"};const t=r.bind({});t.args={size:4,children:" 375×812"};const d=r.bind({});d.args={size:5,children:" 414×896"};const i=r.bind({});i.args={size:6,children:" 320×1024"};const c=r.bind({});c.args={size:1,children:"568×320",horizontal:!0};const l=r.bind({});l.args={size:2,children:" 667×375",horizontal:!0};const u=r.bind({});u.args={size:3,children:" 736×414",horizontal:!0};const p=r.bind({});p.args={size:4,children:" 812×375",horizontal:!0};const m=r.bind({});m.args={size:5,children:" 896×414",horizontal:!0};const h=r.bind({});h.args={size:6,children:" 1024×320",horizontal:!0};var A,S,f;o.parameters={...o.parameters,docs:{...(A=o.parameters)==null?void 0:A.docs,source:{originalSource:`({ +import{t as dr,j as rr}from"./tw-merge-0a3648bd.js";import{r as ir}from"./index-1b03fe98.js";import{c as cr}from"./clsx.m-1229b3e0.js";const g=ir.forwardRef(({children:a,demo:b=!0,size:e,horizontal:er,dataTheme:ar,className:or,...nr},sr)=>{const tr=dr("artboard",or,cr({"artboard-demo":b,"phone-1":e===1,"phone-2":e===2,"phone-3":e===3,"phone-4":e===4,"phone-5":e===5,"phone-6":e===6,horizontal:er}));return rr("div",{"aria-label":"Artboard",...nr,ref:sr,"data-theme":ar,className:tr,children:a})});g.displayName="Artboard";const z=g;try{g.displayName="Artboard",g.__docgenInfo={description:"",displayName:"Artboard",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},demo:{defaultValue:{value:"true"},description:"",name:"demo",required:!1,type:{name:"boolean"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"2"},{value:"4"},{value:"1"},{value:"3"},{value:"5"},{value:"6"}]}},horizontal:{defaultValue:null,description:"",name:"horizontal",required:!1,type:{name:"boolean"}}}}}catch{}try{z.displayName="Artboard",z.__docgenInfo={description:"",displayName:"Artboard",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},demo:{defaultValue:{value:"true"},description:"",name:"demo",required:!1,type:{name:"boolean"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"2"},{value:"4"},{value:"1"},{value:"3"},{value:"5"},{value:"6"}]}},horizontal:{defaultValue:null,description:"",name:"horizontal",required:!1,type:{name:"boolean"}}}}}catch{}const mr={title:"Layout/Artboard",component:z},r=({children:a,...b})=>rr(z,{...b,children:a}),o=r.bind({});o.args={size:1,children:" 320×568"};const n=r.bind({});n.args={size:2,children:" 375×667"};const s=r.bind({});s.args={size:3,children:" 414×736"};const t=r.bind({});t.args={size:4,children:" 375×812"};const d=r.bind({});d.args={size:5,children:" 414×896"};const i=r.bind({});i.args={size:6,children:" 320×1024"};const c=r.bind({});c.args={size:1,children:"568×320",horizontal:!0};const l=r.bind({});l.args={size:2,children:" 667×375",horizontal:!0};const u=r.bind({});u.args={size:3,children:" 736×414",horizontal:!0};const p=r.bind({});p.args={size:4,children:" 812×375",horizontal:!0};const m=r.bind({});m.args={size:5,children:" 896×414",horizontal:!0};const h=r.bind({});h.args={size:6,children:" 1024×320",horizontal:!0};var A,S,f;o.parameters={...o.parameters,docs:{...(A=o.parameters)==null?void 0:A.docs,source:{originalSource:`({ children, ...args }) => { diff --git a/docs/assets/Carousel.stories-4b01da97.js b/docs/assets/Carousel.stories-604c8392.js similarity index 98% rename from docs/assets/Carousel.stories-4b01da97.js rename to docs/assets/Carousel.stories-604c8392.js index 2110e4c2..4bdfee45 100644 --- a/docs/assets/Carousel.stories-4b01da97.js +++ b/docs/assets/Carousel.stories-604c8392.js @@ -1,4 +1,4 @@ -import{t as rt,a as r,j as e,F as V}from"./tw-merge-0a3648bd.js";import{r as c}from"./index-1b03fe98.js";import{c as E}from"./clsx.m-1229b3e0.js";import{B as F}from"./Button-e9ac0f78.js";import"./index-a55c3a76.js";const R=({children:s,innerRef:i,src:u,alt:v,index:x=0,width:l,hasButtons:N,buttonStyle:m,onPrev:C,onNext:I,className:_,...k})=>{const q=rt("carousel-item relative",_,E({"w-full":l==="full","w-1/2":l==="half","h-full":!0})),S=E({"w-full":l==="full"}),w=()=>m!=null?r(V,{children:[c.cloneElement(m("❮"),{onClick:C}),c.cloneElement(m("❯"),{onClick:I})]}):r(V,{children:[e(F,{onClick:C,shape:"circle",children:"❮"}),e(F,{onClick:I,shape:"circle",children:"❯"})]});return r("div",{...k,id:`item${x}`,ref:i,className:q,children:[u?e("img",{src:u,alt:v,className:S}):s,N&&e("div",{className:"absolute flex justify-between transform -translate-y-1/2 left-5 right-5 top-1/2",children:w()})]})},ct=R;try{R.displayName="CarouselItem",R.__docgenInfo={description:"",displayName:"CarouselItem",props:{innerRef:{defaultValue:null,description:"",name:"innerRef",required:!1,type:{name:"LegacyRef"}},src:{defaultValue:null,description:"",name:"src",required:!1,type:{name:"string"}},alt:{defaultValue:null,description:"",name:"alt",required:!1,type:{name:"string"}},index:{defaultValue:{value:"0"},description:"",name:"index",required:!1,type:{name:"number"}},width:{defaultValue:null,description:"",name:"width",required:!1,type:{name:"enum",value:[{value:'"full"'},{value:'"half"'}]}},hasButtons:{defaultValue:null,description:"",name:"hasButtons",required:!1,type:{name:"boolean"}},buttonStyle:{defaultValue:null,description:"",name:"buttonStyle",required:!1,type:{name:"((value: string) => ReactElement>)"}},onPrev:{defaultValue:null,description:"",name:"onPrev",required:!1,type:{name:"(() => void)"}},onNext:{defaultValue:null,description:"",name:"onNext",required:!1,type:{name:"(() => void)"}}}}}catch{}const B=c.forwardRef(({children:s,display:i="slider",snap:u,vertical:v,width:x,buttonStyle:l,dataTheme:N,className:m,...C},I)=>{const _=rt("carousel",m,E({"carousel-center":u==="center","carousel-end":u==="end","carousel-vertical":v,"w-full":i!=="slider"})),[k,q]=c.useState([]),[S,w]=c.useState(0);c.useEffect(()=>{const o=[];s.map(a=>{o.push(c.createRef())}),q(o)},[s]);const j=o=>{var a;(a=k[o].current)==null||a.scrollIntoView({behavior:"smooth",block:"nearest",inline:u}),w(o)};return r(V,{children:[e("div",{role:"listbox","aria-label":"Image carousel",...C,ref:I,"data-theme":N,className:_,children:s.map((o,a)=>c.cloneElement(o,{key:a,innerRef:k[a],index:a+1,children:o.props.children,src:o.props.src,alt:o.props.alt,width:i!=="slider"?"full":x,hasButtons:i==="sequential",buttonStyle:l,onPrev:()=>j(a-1<0?s.length-1:a-1),onNext:()=>j(a+1>s.length-1?0:a+1),...o.props}))}),i==="numbered"&&e("div",{className:"flex justify-center w-full py-2 gap-2",children:s.map((o,a)=>l!=null?c.cloneElement(l((a+1).toString()),{key:a,onClick:()=>j(a)}):e(F,{active:a===S,onClick:()=>j(a),children:a+1},a))})]})}),t=Object.assign(B,{Item:ct});try{B.displayName="Carousel",B.__docgenInfo={description:"",displayName:"Carousel",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},display:{defaultValue:{value:"slider"},description:"",name:"display",required:!1,type:{name:"enum",value:[{value:'"slider"'},{value:'"numbered"'},{value:'"sequential"'}]}},snap:{defaultValue:null,description:"",name:"snap",required:!1,type:{name:"enum",value:[{value:'"start"'},{value:'"end"'},{value:'"center"'}]}},vertical:{defaultValue:null,description:"",name:"vertical",required:!1,type:{name:"boolean"}},width:{defaultValue:null,description:"",name:"width",required:!1,type:{name:"enum",value:[{value:'"full"'},{value:'"half"'}]}},buttonStyle:{defaultValue:null,description:"",name:"buttonStyle",required:!1,type:{name:"((value: string) => ReactElement>)"}}}}}catch{}try{t.displayName="Carousel",t.__docgenInfo={description:"",displayName:"Carousel",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},display:{defaultValue:{value:"slider"},description:"",name:"display",required:!1,type:{name:"enum",value:[{value:'"slider"'},{value:'"numbered"'},{value:'"sequential"'}]}},snap:{defaultValue:null,description:"",name:"snap",required:!1,type:{name:"enum",value:[{value:'"start"'},{value:'"end"'},{value:'"center"'}]}},vertical:{defaultValue:null,description:"",name:"vertical",required:!1,type:{name:"boolean"}},width:{defaultValue:null,description:"",name:"width",required:!1,type:{name:"enum",value:[{value:'"full"'},{value:'"half"'}]}},buttonStyle:{defaultValue:null,description:"",name:"buttonStyle",required:!1,type:{name:"((value: string) => ReactElement>)"}}}}}catch{}const nt={title:"Data Display/Carousel",component:t},p=s=>r(t,{...s,className:"rounded-box",children:[e(t.Item,{src:"https://daisyui.com/images/stock/photo-1559703248-dcaaec9fab78.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1565098772267-60af42b81ef2.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1572635148818-ef6fd45eb394.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1494253109108-2e30c049369b.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1550258987-190a2d41a8ba.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1559181567-c3190ca9959b.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1601004890684-d8cbf643f5f2.jpg",alt:"Fruits"})]});p.args={};const n=s=>r(t,{...s,className:"rounded-box",children:[e(t.Item,{src:"https://daisyui.com/images/stock/photo-1559703248-dcaaec9fab78.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1565098772267-60af42b81ef2.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1572635148818-ef6fd45eb394.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1494253109108-2e30c049369b.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1550258987-190a2d41a8ba.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1559181567-c3190ca9959b.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1601004890684-d8cbf643f5f2.jpg",alt:"Fruits"})]});n.args={snap:"end"};const d=s=>r(t,{...s,className:"w-64 rounded-box",children:[e(t.Item,{src:"https://daisyui.com/images/stock/photo-1559703248-dcaaec9fab78.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1565098772267-60af42b81ef2.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1572635148818-ef6fd45eb394.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1494253109108-2e30c049369b.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1550258987-190a2d41a8ba.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1559181567-c3190ca9959b.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1601004890684-d8cbf643f5f2.jpg",alt:"Fruits"})]});d.args={width:"full"};const g=s=>r(t,{...s,className:"w-64 rounded-box",children:[e(t.Item,{src:"https://daisyui.com/images/stock/photo-1559703248-dcaaec9fab78.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1565098772267-60af42b81ef2.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1572635148818-ef6fd45eb394.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1494253109108-2e30c049369b.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1550258987-190a2d41a8ba.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1559181567-c3190ca9959b.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1601004890684-d8cbf643f5f2.jpg",alt:"Fruits"})]});g.args={width:"half"};const h=s=>r(t,{...s,className:"h-96 w-64 rounded-box",children:[e(t.Item,{src:"https://daisyui.com/images/stock/photo-1559703248-dcaaec9fab78.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1565098772267-60af42b81ef2.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1572635148818-ef6fd45eb394.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1494253109108-2e30c049369b.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1550258987-190a2d41a8ba.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1559181567-c3190ca9959b.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1601004890684-d8cbf643f5f2.jpg",alt:"Fruits"})]});h.args={width:"full",vertical:!0};const f=s=>r(t,{...s,className:"rounded-box",children:[e(t.Item,{src:"https://daisyui.com/images/stock/photo-1625726411847-8cbb60cc71e6.jpg",alt:"City"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1609621838510-5ad474b7d25d.jpg",alt:"City"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1414694762283-acccc27bca85.jpg",alt:"City"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1665553365602-b2fb8e5d1707.jpg",alt:"City"})]});f.args={display:"numbered"};const y=s=>r(t,{...s,className:"rounded-box",children:[e(t.Item,{src:"https://daisyui.com/images/stock/photo-1625726411847-8cbb60cc71e6.jpg",alt:"City"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1609621838510-5ad474b7d25d.jpg",alt:"City"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1414694762283-acccc27bca85.jpg",alt:"City"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1665553365602-b2fb8e5d1707.jpg",alt:"City"})]});y.args={display:"sequential"};const b=s=>{const i=u=>e(F,{color:"primary",children:u});return s.buttonStyle=i,r(t,{...s,className:"rounded-box",children:[e(t.Item,{src:"https://daisyui.com/images/stock/photo-1625726411847-8cbb60cc71e6.jpg",alt:"City"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1609621838510-5ad474b7d25d.jpg",alt:"City"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1414694762283-acccc27bca85.jpg",alt:"City"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1665553365602-b2fb8e5d1707.jpg",alt:"City"})]})};b.args={display:"sequential"};var T,D,W;p.parameters={...p.parameters,docs:{...(T=p.parameters)==null?void 0:T.docs,source:{originalSource:`args => { +import{t as rt,a as r,j as e,F as V}from"./tw-merge-0a3648bd.js";import{r as c}from"./index-1b03fe98.js";import{c as E}from"./clsx.m-1229b3e0.js";import{B as F}from"./Button-e9ac0f78.js";import"./index-a55c3a76.js";const R=({children:s,innerRef:i,src:u,alt:v,index:x=0,width:l,hasButtons:N,buttonStyle:m,onPrev:C,onNext:I,className:_,...k})=>{const q=rt("carousel-item relative",_,E({"w-full":l==="full","w-1/2":l==="half","h-full":!0})),S=E({"w-full":l==="full"}),w=()=>m!=null?r(V,{children:[c.cloneElement(m("❮"),{onClick:C}),c.cloneElement(m("❯"),{onClick:I})]}):r(V,{children:[e(F,{onClick:C,shape:"circle",children:"❮"}),e(F,{onClick:I,shape:"circle",children:"❯"})]});return r("div",{...k,id:`item${x}`,ref:i,className:q,children:[u?e("img",{src:u,alt:v,className:S}):s,N&&e("div",{className:"absolute flex justify-between transform -translate-y-1/2 left-5 right-5 top-1/2",children:w()})]})},ct=R;try{R.displayName="CarouselItem",R.__docgenInfo={description:"",displayName:"CarouselItem",props:{innerRef:{defaultValue:null,description:"",name:"innerRef",required:!1,type:{name:"LegacyRef"}},src:{defaultValue:null,description:"",name:"src",required:!1,type:{name:"string"}},alt:{defaultValue:null,description:"",name:"alt",required:!1,type:{name:"string"}},index:{defaultValue:{value:"0"},description:"",name:"index",required:!1,type:{name:"number"}},width:{defaultValue:null,description:"",name:"width",required:!1,type:{name:"enum",value:[{value:'"full"'},{value:'"half"'}]}},hasButtons:{defaultValue:null,description:"",name:"hasButtons",required:!1,type:{name:"boolean"}},buttonStyle:{defaultValue:null,description:"",name:"buttonStyle",required:!1,type:{name:"((value: string) => ReactElement>)"}},onPrev:{defaultValue:null,description:"",name:"onPrev",required:!1,type:{name:"(() => void)"}},onNext:{defaultValue:null,description:"",name:"onNext",required:!1,type:{name:"(() => void)"}}}}}catch{}const B=c.forwardRef(({children:s,display:i="slider",snap:u,vertical:v,width:x,buttonStyle:l,dataTheme:N,className:m,...C},I)=>{const _=rt("carousel",m,E({"carousel-center":u==="center","carousel-end":u==="end","carousel-vertical":v,"w-full":i!=="slider"})),[k,q]=c.useState([]),[S,w]=c.useState(0);c.useEffect(()=>{const o=[];s.map(a=>{o.push(c.createRef())}),q(o)},[s]);const j=o=>{var a;(a=k[o].current)==null||a.scrollIntoView({behavior:"smooth",block:"nearest",inline:u}),w(o)};return r(V,{children:[e("div",{role:"listbox","aria-label":"Image carousel",...C,ref:I,"data-theme":N,className:_,children:s.map((o,a)=>c.cloneElement(o,{key:a,innerRef:k[a],index:a+1,children:o.props.children,src:o.props.src,alt:o.props.alt,width:i!=="slider"?"full":x,hasButtons:i==="sequential",buttonStyle:l,onPrev:()=>j(a-1<0?s.length-1:a-1),onNext:()=>j(a+1>s.length-1?0:a+1),...o.props}))}),i==="numbered"&&e("div",{className:"flex justify-center w-full py-2 gap-2",children:s.map((o,a)=>l!=null?c.cloneElement(l((a+1).toString()),{key:a,onClick:()=>j(a)}):e(F,{active:a===S,onClick:()=>j(a),children:a+1},a))})]})}),t=Object.assign(B,{Item:ct});try{B.displayName="Carousel",B.__docgenInfo={description:"",displayName:"Carousel",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},display:{defaultValue:{value:"slider"},description:"",name:"display",required:!1,type:{name:"enum",value:[{value:'"slider"'},{value:'"numbered"'},{value:'"sequential"'}]}},snap:{defaultValue:null,description:"",name:"snap",required:!1,type:{name:"enum",value:[{value:'"center"'},{value:'"end"'},{value:'"start"'}]}},vertical:{defaultValue:null,description:"",name:"vertical",required:!1,type:{name:"boolean"}},width:{defaultValue:null,description:"",name:"width",required:!1,type:{name:"enum",value:[{value:'"full"'},{value:'"half"'}]}},buttonStyle:{defaultValue:null,description:"",name:"buttonStyle",required:!1,type:{name:"((value: string) => ReactElement>)"}}}}}catch{}try{t.displayName="Carousel",t.__docgenInfo={description:"",displayName:"Carousel",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},display:{defaultValue:{value:"slider"},description:"",name:"display",required:!1,type:{name:"enum",value:[{value:'"slider"'},{value:'"numbered"'},{value:'"sequential"'}]}},snap:{defaultValue:null,description:"",name:"snap",required:!1,type:{name:"enum",value:[{value:'"center"'},{value:'"end"'},{value:'"start"'}]}},vertical:{defaultValue:null,description:"",name:"vertical",required:!1,type:{name:"boolean"}},width:{defaultValue:null,description:"",name:"width",required:!1,type:{name:"enum",value:[{value:'"full"'},{value:'"half"'}]}},buttonStyle:{defaultValue:null,description:"",name:"buttonStyle",required:!1,type:{name:"((value: string) => ReactElement>)"}}}}}catch{}const nt={title:"Data Display/Carousel",component:t},p=s=>r(t,{...s,className:"rounded-box",children:[e(t.Item,{src:"https://daisyui.com/images/stock/photo-1559703248-dcaaec9fab78.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1565098772267-60af42b81ef2.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1572635148818-ef6fd45eb394.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1494253109108-2e30c049369b.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1550258987-190a2d41a8ba.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1559181567-c3190ca9959b.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1601004890684-d8cbf643f5f2.jpg",alt:"Fruits"})]});p.args={};const n=s=>r(t,{...s,className:"rounded-box",children:[e(t.Item,{src:"https://daisyui.com/images/stock/photo-1559703248-dcaaec9fab78.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1565098772267-60af42b81ef2.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1572635148818-ef6fd45eb394.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1494253109108-2e30c049369b.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1550258987-190a2d41a8ba.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1559181567-c3190ca9959b.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1601004890684-d8cbf643f5f2.jpg",alt:"Fruits"})]});n.args={snap:"end"};const d=s=>r(t,{...s,className:"w-64 rounded-box",children:[e(t.Item,{src:"https://daisyui.com/images/stock/photo-1559703248-dcaaec9fab78.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1565098772267-60af42b81ef2.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1572635148818-ef6fd45eb394.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1494253109108-2e30c049369b.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1550258987-190a2d41a8ba.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1559181567-c3190ca9959b.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1601004890684-d8cbf643f5f2.jpg",alt:"Fruits"})]});d.args={width:"full"};const g=s=>r(t,{...s,className:"w-64 rounded-box",children:[e(t.Item,{src:"https://daisyui.com/images/stock/photo-1559703248-dcaaec9fab78.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1565098772267-60af42b81ef2.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1572635148818-ef6fd45eb394.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1494253109108-2e30c049369b.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1550258987-190a2d41a8ba.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1559181567-c3190ca9959b.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1601004890684-d8cbf643f5f2.jpg",alt:"Fruits"})]});g.args={width:"half"};const h=s=>r(t,{...s,className:"h-96 w-64 rounded-box",children:[e(t.Item,{src:"https://daisyui.com/images/stock/photo-1559703248-dcaaec9fab78.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1565098772267-60af42b81ef2.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1572635148818-ef6fd45eb394.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1494253109108-2e30c049369b.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1550258987-190a2d41a8ba.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1559181567-c3190ca9959b.jpg",alt:"Fruits"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1601004890684-d8cbf643f5f2.jpg",alt:"Fruits"})]});h.args={width:"full",vertical:!0};const f=s=>r(t,{...s,className:"rounded-box",children:[e(t.Item,{src:"https://daisyui.com/images/stock/photo-1625726411847-8cbb60cc71e6.jpg",alt:"City"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1609621838510-5ad474b7d25d.jpg",alt:"City"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1414694762283-acccc27bca85.jpg",alt:"City"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1665553365602-b2fb8e5d1707.jpg",alt:"City"})]});f.args={display:"numbered"};const y=s=>r(t,{...s,className:"rounded-box",children:[e(t.Item,{src:"https://daisyui.com/images/stock/photo-1625726411847-8cbb60cc71e6.jpg",alt:"City"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1609621838510-5ad474b7d25d.jpg",alt:"City"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1414694762283-acccc27bca85.jpg",alt:"City"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1665553365602-b2fb8e5d1707.jpg",alt:"City"})]});y.args={display:"sequential"};const b=s=>{const i=u=>e(F,{color:"primary",children:u});return s.buttonStyle=i,r(t,{...s,className:"rounded-box",children:[e(t.Item,{src:"https://daisyui.com/images/stock/photo-1625726411847-8cbb60cc71e6.jpg",alt:"City"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1609621838510-5ad474b7d25d.jpg",alt:"City"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1414694762283-acccc27bca85.jpg",alt:"City"}),e(t.Item,{src:"https://daisyui.com/images/stock/photo-1665553365602-b2fb8e5d1707.jpg",alt:"City"})]})};b.args={display:"sequential"};var T,D,W;p.parameters={...p.parameters,docs:{...(T=p.parameters)==null?void 0:T.docs,source:{originalSource:`args => { return diff --git a/docs/assets/Color-6VNJS4EI-fc9214ad.js b/docs/assets/Color-6VNJS4EI-b3479a3b.js similarity index 99% rename from docs/assets/Color-6VNJS4EI-fc9214ad.js rename to docs/assets/Color-6VNJS4EI-b3479a3b.js index 9ba007a5..d56fe03d 100644 --- a/docs/assets/Color-6VNJS4EI-fc9214ad.js +++ b/docs/assets/Color-6VNJS4EI-b3479a3b.js @@ -1 +1 @@ -import{n as M,d as ue,T as Me,F as Ce,I as $e,g as Ne}from"./index-21c4db47.js";import{R as h,r as b,g as fe}from"./index-1b03fe98.js";import{_ as Oe,i as J,a as Ie}from"./index-d7bb098e.js";import"./iframe-19c7c3ad.js";import"../sb-preview/runtime.js";import"./chunk-ZGA76URP-2bd2442b.js";import"./index-6fd5a17b.js";import"./index-356e4a49.js";function $(){return($=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function K(e){var t=b.useRef(e),n=b.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var S=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:p.buttons>0)&&o.current?a(ne(o.current,p,l.current)):_(!1)},N=function(){return _(!1)};function _(p){var m=i.current,x=V(o.current),C=p?x.addEventListener:x.removeEventListener;C(m?"touchmove":"mousemove",k),C(m?"touchend":"mouseup",N)}return[function(p){var m=p.nativeEvent,x=o.current;if(x&&(re(m),!function(X,R){return R&&!j(X)}(m,i.current)&&x)){if(j(m)){i.current=!0;var C=m.changedTouches||[];C.length&&(l.current=C[0].identifier)}x.focus(),a(ne(x,m,l.current)),_(!0)}},function(p){var m=p.which||p.keyCode;m<37||m>40||(p.preventDefault(),s({left:m===39?.05:m===37?-.05:0,top:m===40?.05:m===38?-.05:0}))},_]},[s,a]),d=c[0],f=c[1],g=c[2];return b.useEffect(function(){return g},[g]),h.createElement("div",$({},r,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:o,onKeyDown:f,tabIndex:0,role:"slider"}))}),z=function(e){return e.filter(Boolean).join(" ")},ee=function(e){var t=e.color,n=e.left,r=e.top,o=r===void 0?.5:r,a=z(["react-colorful__pointer",e.className]);return h.createElement("div",{className:a,style:{top:100*o+"%",left:100*n+"%"}},h.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},y=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},Se={grad:.9,turn:360,rad:360/(2*Math.PI)},Re=function(e){return ge(A(e))},A=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?y(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?y(parseInt(e.substring(6,8),16)/255,2):1}},Te=function(e,t){return t===void 0&&(t="deg"),Number(e)*(Se[t]||1)},je=function(e){var t=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?Fe({h:Te(t[1],t[2]),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)}):{h:0,s:0,v:0,a:1}},Fe=function(e){var t=e.s,n=e.l;return{h:e.h,s:(t*=(n<50?n:100-n)/100)>0?2*t/(n+t)*100:0,v:n+t,a:e.a}},ze=function(e){return Pe(de(e))},he=function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:y(e.h),s:y(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:y(o/2),a:y(r,2)}},G=function(e){var t=he(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},q=function(e){var t=he(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},de=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var a=Math.floor(t),s=r*(1-n),l=r*(1-(t-a)*n),i=r*(1-(1-t+a)*n),c=a%6;return{r:y(255*[r,l,s,s,i,r][c]),g:y(255*[i,r,r,l,s,s][c]),b:y(255*[s,s,i,r,r,l][c]),a:y(o,2)}},He=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?ge({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}},H=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Pe=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=o<1?H(y(255*o)):"";return"#"+H(t)+H(n)+H(r)+a},ge=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=Math.max(t,n,r),s=a-Math.min(t,n,r),l=s?a===t?(n-r)/s:a===n?2+(r-t)/s:4+(t-n)/s:0;return{h:y(60*(l<0?l+6:l)),s:y(a?s/a*100:0),v:y(a/255*100),a:o}},me=h.memo(function(e){var t=e.hue,n=e.onChange,r=z(["react-colorful__hue",e.className]);return h.createElement("div",{className:r},h.createElement(Z,{onMove:function(o){n({h:360*o.left})},onKey:function(o){n({h:S(t+360*o.left,0,360)})},"aria-label":"Hue","aria-valuenow":y(t),"aria-valuemax":"360","aria-valuemin":"0"},h.createElement(ee,{className:"react-colorful__hue-pointer",left:t/360,color:G({h:t,s:100,v:100,a:1})})))}),be=h.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:G({h:t.h,s:100,v:100,a:1})};return h.createElement("div",{className:"react-colorful__saturation",style:r},h.createElement(Z,{onMove:function(o){n({s:100*o.left,v:100-100*o.top})},onKey:function(o){n({s:S(t.s+100*o.left,0,100),v:S(t.v-100*o.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+y(t.s)+"%, Brightness "+y(t.v)+"%"},h.createElement(ee,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:G(t)})))}),ve=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},pe=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")},Le=function(e,t){return e.toLowerCase()===t.toLowerCase()||ve(A(e),A(t))};function ye(e,t,n){var r=K(n),o=b.useState(function(){return e.toHsva(t)}),a=o[0],s=o[1],l=b.useRef({color:t,hsva:a});b.useEffect(function(){if(!e.equal(t,l.current.color)){var c=e.toHsva(t);l.current={hsva:c,color:t},s(c)}},[t,e]),b.useEffect(function(){var c;ve(a,l.current.hsva)||e.equal(c=e.fromHsva(a),l.current.color)||(l.current={hsva:a,color:c},r(c))},[a,e,r]);var i=b.useCallback(function(c){s(function(d){return Object.assign({},d,c)})},[]);return[a,i]}var qe=typeof window<"u"?b.useLayoutEffect:b.useEffect,Be=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},oe=new Map,xe=function(e){qe(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!oe.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,oe.set(t,n);var r=Be();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},We=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=Q(e,["className","colorModel","color","onChange"]),l=b.useRef(null);xe(l);var i=ye(n,o,a),c=i[0],d=i[1],f=z(["react-colorful",t]);return h.createElement("div",$({},s,{ref:l,className:f}),h.createElement(be,{hsva:c,onChange:d}),h.createElement(me,{hue:c.h,onChange:d,className:"react-colorful__last-control"}))},Xe={defaultColor:"000",toHsva:Re,fromHsva:function(e){return ze({h:e.h,s:e.s,v:e.v,a:1})},equal:Le},De=function(e){return h.createElement(We,$({},e,{colorModel:Xe}))},Ke=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+q(Object.assign({},n,{a:0}))+", "+q(Object.assign({},n,{a:1}))+")"},a=z(["react-colorful__alpha",t]),s=y(100*n.a);return h.createElement("div",{className:a},h.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),h.createElement(Z,{onMove:function(l){r({a:l.left})},onKey:function(l){r({a:S(n.a+l.left)})},"aria-label":"Alpha","aria-valuetext":s+"%","aria-valuenow":s,"aria-valuemin":"0","aria-valuemax":"100"},h.createElement(ee,{className:"react-colorful__alpha-pointer",left:n.a,color:q(n)})))},we=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=Q(e,["className","colorModel","color","onChange"]),l=b.useRef(null);xe(l);var i=ye(n,o,a),c=i[0],d=i[1],f=z(["react-colorful",t]);return h.createElement("div",$({},s,{ref:l,className:f}),h.createElement(be,{hsva:c,onChange:d}),h.createElement(me,{hue:c.h,onChange:d}),h.createElement(Ke,{hsva:c,onChange:d,className:"react-colorful__last-control"}))},Ve={defaultColor:"hsla(0, 0%, 0%, 1)",toHsva:je,fromHsva:q,equal:pe},Ae=function(e){return h.createElement(we,$({},e,{colorModel:Ve}))},Ge={defaultColor:"rgba(0, 0, 0, 1)",toHsva:He,fromHsva:function(e){var t=de(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},equal:pe},Ue=function(e){return h.createElement(we,$({},e,{colorModel:Ge}))},Ye={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};const F=Ye,ke={};for(const e of Object.keys(F))ke[F[e]]=e;const u={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var _e=u;for(const e of Object.keys(u)){if(!("channels"in u[e]))throw new Error("missing channels property: "+e);if(!("labels"in u[e]))throw new Error("missing channel labels property: "+e);if(u[e].labels.length!==u[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=u[e];delete u[e].channels,delete u[e].labels,Object.defineProperty(u[e],"channels",{value:t}),Object.defineProperty(u[e],"labels",{value:n})}u.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(t,n,r),a=Math.max(t,n,r),s=a-o;let l,i;a===o?l=0:t===a?l=(n-r)/s:n===a?l=2+(r-t)/s:r===a&&(l=4+(t-n)/s),l=Math.min(l*60,360),l<0&&(l+=360);const c=(o+a)/2;return a===o?i=0:c<=.5?i=s/(a+o):i=s/(2-a-o),[l,i*100,c*100]};u.rgb.hsv=function(e){let t,n,r,o,a;const s=e[0]/255,l=e[1]/255,i=e[2]/255,c=Math.max(s,l,i),d=c-Math.min(s,l,i),f=function(g){return(c-g)/6/d+1/2};return d===0?(o=0,a=0):(a=d/c,t=f(s),n=f(l),r=f(i),s===c?o=r-n:l===c?o=1/3+t-r:i===c&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[o*360,a*100,c*100]};u.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const o=u.rgb.hsl(e)[0],a=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[o,a*100,r*100]};u.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(1-t,1-n,1-r),a=(1-t-o)/(1-o)||0,s=(1-n-o)/(1-o)||0,l=(1-r-o)/(1-o)||0;return[a*100,s*100,l*100,o*100]};function Je(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}u.rgb.keyword=function(e){const t=ke[e];if(t)return t;let n=1/0,r;for(const o of Object.keys(F)){const a=F[o],s=Je(e,a);s.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const o=t*.4124+n*.3576+r*.1805,a=t*.2126+n*.7152+r*.0722,s=t*.0193+n*.1192+r*.9505;return[o*100,a*100,s*100]};u.rgb.lab=function(e){const t=u.rgb.xyz(e);let n=t[0],r=t[1],o=t[2];n/=95.047,r/=100,o/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;const a=116*r-16,s=500*(n-r),l=200*(r-o);return[a,s,l]};u.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let o,a,s;if(n===0)return s=r*255,[s,s,s];r<.5?o=r*(1+n):o=r+n-r*n;const l=2*r-o,i=[0,0,0];for(let c=0;c<3;c++)a=t+1/3*-(c-1),a<0&&a++,a>1&&a--,6*a<1?s=l+(o-l)*6*a:2*a<1?s=o:3*a<2?s=l+(o-l)*(2/3-a)*6:s=l,i[c]=s*255;return i};u.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,o=n;const a=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,o*=a<=1?a:2-a;const s=(r+n)/2,l=r===0?2*o/(a+o):2*n/(r+n);return[t,l*100,s*100]};u.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const o=Math.floor(t)%6,a=t-Math.floor(t),s=255*r*(1-n),l=255*r*(1-n*a),i=255*r*(1-n*(1-a));switch(r*=255,o){case 0:return[r,i,s];case 1:return[l,r,s];case 2:return[s,r,i];case 3:return[s,l,r];case 4:return[i,s,r];case 5:return[r,s,l]}};u.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,o=Math.max(r,.01);let a,s;s=(2-n)*r;const l=(2-n)*o;return a=n*o,a/=l<=1?l:2-l,a=a||0,s/=2,[t,a*100,s*100]};u.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const o=n+r;let a;o>1&&(n/=o,r/=o);const s=Math.floor(6*t),l=1-r;a=6*t-s,s&1&&(a=1-a);const i=n+a*(l-n);let c,d,f;switch(s){default:case 6:case 0:c=l,d=i,f=n;break;case 1:c=i,d=l,f=n;break;case 2:c=n,d=l,f=i;break;case 3:c=n,d=i,f=l;break;case 4:c=i,d=n,f=l;break;case 5:c=l,d=n,f=i;break}return[c*255,d*255,f*255]};u.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100,a=1-Math.min(1,t*(1-o)+o),s=1-Math.min(1,n*(1-o)+o),l=1-Math.min(1,r*(1-o)+o);return[a*255,s*255,l*255]};u.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let o,a,s;return o=t*3.2406+n*-1.5372+r*-.4986,a=t*-.9689+n*1.8758+r*.0415,s=t*.0557+n*-.204+r*1.057,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),s=Math.min(Math.max(0,s),1),[o*255,a*255,s*255]};u.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;const o=116*n-16,a=500*(t-n),s=200*(n-r);return[o,a,s]};u.lab.xyz=function(e){const t=e[0],n=e[1],r=e[2];let o,a,s;a=(t+16)/116,o=n/500+a,s=a-r/200;const l=a**3,i=o**3,c=s**3;return a=l>.008856?l:(a-16/116)/7.787,o=i>.008856?i:(o-16/116)/7.787,s=c>.008856?c:(s-16/116)/7.787,o*=95.047,a*=100,s*=108.883,[o,a,s]};u.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let o;o=Math.atan2(r,n)*360/2/Math.PI,o<0&&(o+=360);const s=Math.sqrt(n*n+r*r);return[t,s,o]};u.lch.lab=function(e){const t=e[0],n=e[1],o=e[2]/360*2*Math.PI,a=n*Math.cos(o),s=n*Math.sin(o);return[t,a,s]};u.rgb.ansi16=function(e,t=null){const[n,r,o]=e;let a=t===null?u.rgb.hsv(e)[2]:t;if(a=Math.round(a/50),a===0)return 30;let s=30+(Math.round(o/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return a===2&&(s+=60),s};u.hsv.ansi16=function(e){return u.rgb.ansi16(u.hsv.rgb(e),e[2])};u.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};u.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=(~~(e>50)+1)*.5,r=(t&1)*n*255,o=(t>>1&1)*n*255,a=(t>>2&1)*n*255;return[r,o,a]};u.ansi256.rgb=function(e){if(e>=232){const a=(e-232)*10+8;return[a,a,a]}e-=16;let t;const n=Math.floor(e/36)/5*255,r=Math.floor((t=e%36)/6)/5*255,o=t%6/5*255;return[n,r,o]};u.rgb.hex=function(e){const n=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n};u.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split("").map(l=>l+l).join(""));const r=parseInt(n,16),o=r>>16&255,a=r>>8&255,s=r&255;return[o,a,s]};u.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.max(Math.max(t,n),r),a=Math.min(Math.min(t,n),r),s=o-a;let l,i;return s<1?l=a/(1-s):l=0,s<=0?i=0:o===t?i=(n-r)/s%6:o===n?i=2+(r-t)/s:i=4+(t-n)/s,i/=6,i%=1,[i*360,s*100,l*100]};u.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let o=0;return r<1&&(o=(n-.5*r)/(1-r)),[e[0],r*100,o*100]};u.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],r*100,o*100]};u.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];const o=[0,0,0],a=t%1*6,s=a%1,l=1-s;let i=0;switch(Math.floor(a)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return i=(1-n)*r,[(n*o[0]+i)*255,(n*o[1]+i)*255,(n*o[2]+i)*255]};u.hcg.hsv=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);let o=0;return r>0&&(o=t/r),[e[0],o*100,r*100]};u.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let o=0;return r>0&&r<.5?o=t/(2*r):r>=.5&&r<1&&(o=t/(2*(1-r))),[e[0],o*100,r*100]};u.hcg.hwb=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);return[e[0],(r-t)*100,(1-r)*100]};u.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,o=r-t;let a=0;return o<1&&(a=(r-o)/(1-o)),[e[0],o*100,a*100]};u.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};u.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};u.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};u.gray.hsl=function(e){return[0,0,e[0]]};u.gray.hsv=u.gray.hsl;u.gray.hwb=function(e){return[0,100,e[0]]};u.gray.cmyk=function(e){return[0,0,0,e[0]]};u.gray.lab=function(e){return[e[0],0,0]};u.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255,r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r};u.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const B=_e;function Qe(){const e={},t=Object.keys(B);for(let n=t.length,r=0;r1&&(n=r),e(n))};return"conversion"in e&&(t.conversion=e.conversion),t}function st(e){const t=function(...n){const r=n[0];if(r==null)return r;r.length>1&&(n=r);const o=e(n);if(typeof o=="object")for(let a=o.length,s=0;s{O[e]={},Object.defineProperty(O[e],"channels",{value:U[e].channels}),Object.defineProperty(O[e],"labels",{value:U[e].labels});const t=rt(e);Object.keys(t).forEach(r=>{const o=t[r];O[e][r]=st(o),O[e][r].raw=at(o)})});var lt=O;const w=fe(lt);var it=Oe,ct=function(){return it.Date.now()},ut=ct,ft=/\s/;function ht(e){for(var t=e.length;t--&&ft.test(e.charAt(t)););return t}var dt=ht,gt=dt,mt=/^\s+/;function bt(e){return e&&e.slice(0,gt(e)+1).replace(mt,"")}var vt=bt,pt=vt,ae=J,yt=Ie,se=0/0,xt=/^[-+]0x[0-9a-f]+$/i,wt=/^0b[01]+$/i,kt=/^0o[0-7]+$/i,_t=parseInt;function Et(e){if(typeof e=="number")return e;if(yt(e))return se;if(ae(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ae(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=pt(e);var n=wt.test(e);return n||kt.test(e)?_t(e.slice(2),n?2:8):xt.test(e)?se:+e}var Mt=Et,Ct=J,D=ut,le=Mt,$t="Expected a function",Nt=Math.max,Ot=Math.min;function It(e,t,n){var r,o,a,s,l,i,c=0,d=!1,f=!1,g=!0;if(typeof e!="function")throw new TypeError($t);t=le(t)||0,Ct(n)&&(d=!!n.leading,f="maxWait"in n,a=f?Nt(le(n.maxWait)||0,t):a,g="trailing"in n?!!n.trailing:g);function k(v){var E=r,T=o;return r=o=void 0,c=v,s=e.apply(T,E),s}function N(v){return c=v,l=setTimeout(m,t),d?k(v):s}function _(v){var E=v-i,T=v-c,te=t-E;return f?Ot(te,a-T):te}function p(v){var E=v-i,T=v-c;return i===void 0||E>=t||E<0||f&&T>=a}function m(){var v=D();if(p(v))return x(v);l=setTimeout(m,_(v))}function x(v){return l=void 0,g&&r?k(v):(r=o=void 0,s)}function C(){l!==void 0&&clearTimeout(l),c=0,r=i=o=l=void 0}function X(){return l===void 0?s:x(D())}function R(){var v=D(),E=p(v);if(r=arguments,o=this,i=v,E){if(l===void 0)return N(i);if(f)return clearTimeout(l),l=setTimeout(m,t),k(i)}return l===void 0&&(l=setTimeout(m,t)),s}return R.cancel=C,R.flush=X,R}var St=It,Rt=St,Tt=J,jt="Expected a function";function Ft(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(jt);return Tt(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Rt(e,t,{leading:r,maxWait:t,trailing:o})}var zt=Ft;const Ht=fe(zt);var Pt=M.div({position:"relative",maxWidth:250}),Lt=M(ue)({position:"absolute",zIndex:1,top:4,left:4}),qt=M.div({width:200,margin:5,".react-colorful__saturation":{borderRadius:"4px 4px 0 0"},".react-colorful__hue":{boxShadow:"inset 0 0 0 1px rgb(0 0 0 / 5%)"},".react-colorful__last-control":{borderRadius:"0 0 4px 4px"}}),Bt=M(Me)(({theme:e})=>({fontFamily:e.typography.fonts.base})),Wt=M.div({display:"grid",gridTemplateColumns:"repeat(9, 16px)",gap:6,padding:3,marginTop:5,width:200}),Xt=M.div(({theme:e,active:t})=>({width:16,height:16,boxShadow:t?`${e.appBorderColor} 0 0 0 1px inset, ${e.textMutedColor}50 0 0 0 4px`:`${e.appBorderColor} 0 0 0 1px inset`,borderRadius:e.appBorderRadius})),Dt=`url('data:image/svg+xml;charset=utf-8,')`,ie=({value:e,active:t,onClick:n,style:r,...o})=>{let a=`linear-gradient(${e}, ${e}), ${Dt}, linear-gradient(#fff, #fff)`;return h.createElement(Xt,{...o,active:t,onClick:n,style:{...r,backgroundImage:a}})},Kt=M(Ce.Input)(({theme:e})=>({width:"100%",paddingLeft:30,paddingRight:30,boxSizing:"border-box",fontFamily:e.typography.fonts.base})),Vt=M($e)(({theme:e})=>({position:"absolute",zIndex:1,top:6,right:7,width:20,height:20,padding:4,boxSizing:"border-box",cursor:"pointer",color:e.input.color})),Ee=(e=>(e.RGB="rgb",e.HSL="hsl",e.HEX="hex",e))(Ee||{}),P=Object.values(Ee),At=/\(([0-9]+),\s*([0-9]+)%?,\s*([0-9]+)%?,?\s*([0-9.]+)?\)/,Gt=/^\s*rgba?\(([0-9]+),\s*([0-9]+),\s*([0-9]+),?\s*([0-9.]+)?\)\s*$/i,Ut=/^\s*hsla?\(([0-9]+),\s*([0-9]+)%,\s*([0-9]+)%,?\s*([0-9.]+)?\)\s*$/i,Y=/^\s*#?([0-9a-f]{3}|[0-9a-f]{6})\s*$/i,Yt=/^\s*#?([0-9a-f]{3})\s*$/i,Jt={hex:De,rgb:Ue,hsl:Ae},L={hex:"transparent",rgb:"rgba(0, 0, 0, 0)",hsl:"hsla(0, 0%, 0%, 0)"},ce=e=>{let t=e==null?void 0:e.match(At);if(!t)return[0,0,0,1];let[,n,r,o,a=1]=t;return[n,r,o,a].map(Number)},I=e=>{if(!e)return;let t=!0;if(Gt.test(e)){let[s,l,i,c]=ce(e),[d,f,g]=w.rgb.hsl([s,l,i])||[0,0,0];return{valid:t,value:e,keyword:w.rgb.keyword([s,l,i]),colorSpace:"rgb",rgb:e,hsl:`hsla(${d}, ${f}%, ${g}%, ${c})`,hex:`#${w.rgb.hex([s,l,i]).toLowerCase()}`}}if(Ut.test(e)){let[s,l,i,c]=ce(e),[d,f,g]=w.hsl.rgb([s,l,i])||[0,0,0];return{valid:t,value:e,keyword:w.hsl.keyword([s,l,i]),colorSpace:"hsl",rgb:`rgba(${d}, ${f}, ${g}, ${c})`,hsl:e,hex:`#${w.hsl.hex([s,l,i]).toLowerCase()}`}}let n=e.replace("#",""),r=w.keyword.rgb(n)||w.hex.rgb(n),o=w.rgb.hsl(r),a=e;if(/[^#a-f0-9]/i.test(e)?a=n:Y.test(e)&&(a=`#${n}`),a.startsWith("#"))t=Y.test(a);else try{w.keyword.hex(a)}catch{t=!1}return{valid:t,value:a,keyword:w.rgb.keyword(r),colorSpace:"hex",rgb:`rgba(${r[0]}, ${r[1]}, ${r[2]}, 1)`,hsl:`hsla(${o[0]}, ${o[1]}%, ${o[2]}%, 1)`,hex:a}},Qt=(e,t,n)=>{if(!e||!(t!=null&&t.valid))return L[n];if(n!=="hex")return(t==null?void 0:t[n])||L[n];if(!t.hex.startsWith("#"))try{return`#${w.keyword.hex(t.hex)}`}catch{return L.hex}let r=t.hex.match(Yt);if(!r)return Y.test(t.hex)?t.hex:L.hex;let[o,a,s]=r[1].split("");return`#${o}${o}${a}${a}${s}${s}`},Zt=(e,t)=>{let[n,r]=b.useState(e||""),[o,a]=b.useState(()=>I(n)),[s,l]=b.useState((o==null?void 0:o.colorSpace)||"hex");b.useEffect(()=>{let f=e||"",g=I(f);r(f),a(g),l((g==null?void 0:g.colorSpace)||"hex")},[e]);let i=b.useMemo(()=>Qt(n,o,s).toLowerCase(),[n,o,s]),c=b.useCallback(f=>{let g=I(f),k=(g==null?void 0:g.value)||f||"";r(k),k===""&&(a(void 0),t(void 0)),g&&(a(g),l(g.colorSpace),t(g.value))},[t]),d=b.useCallback(()=>{let f=P.indexOf(s)+1;f>=P.length&&(f=0),l(P[f]);let g=(o==null?void 0:o[P[f]])||"";r(g),t(g)},[o,s,t]);return{value:n,realValue:i,updateValue:c,color:o,colorSpace:s,cycleColorSpace:d}},W=e=>e.replace(/\s*/,"").toLowerCase(),en=(e,t,n)=>{let[r,o]=b.useState(t!=null&&t.valid?[t]:[]);b.useEffect(()=>{t===void 0&&o([])},[t]);let a=b.useMemo(()=>(e||[]).map(l=>typeof l=="string"?I(l):l.title?{...I(l.color),keyword:l.title}:I(l.color)).concat(r).filter(Boolean).slice(-27),[e,r]),s=b.useCallback(l=>{l!=null&&l.valid&&(a.some(i=>W(i[n])===W(l[n]))||o(i=>i.concat(l)))},[n,a]);return{presets:a,addPreset:s}},tn=({name:e,value:t,onChange:n,onFocus:r,onBlur:o,presetColors:a,startOpen:s=!1})=>{let l=b.useCallback(Ht(n,200),[n]),{value:i,realValue:c,updateValue:d,color:f,colorSpace:g,cycleColorSpace:k}=Zt(t,l),{presets:N,addPreset:_}=en(a,f,g),p=Jt[g];return h.createElement(Pt,null,h.createElement(Lt,{startOpen:s,closeOnOutsideClick:!0,onVisibleChange:()=>_(f),tooltip:h.createElement(qt,null,h.createElement(p,{color:c==="transparent"?"#000000":c,onChange:d,onFocus:r,onBlur:o}),N.length>0&&h.createElement(Wt,null,N.map((m,x)=>h.createElement(ue,{key:`${m.value}-${x}`,hasChrome:!1,tooltip:h.createElement(Bt,{note:m.keyword||m.value})},h.createElement(ie,{value:m[g],active:f&&W(m[g])===W(f[g]),onClick:()=>d(m.value)})))))},h.createElement(ie,{value:c,style:{margin:4}})),h.createElement(Kt,{id:Ne(e),value:i,onChange:m=>d(m.target.value),onFocus:m=>m.target.select(),placeholder:"Choose color..."}),i?h.createElement(Vt,{icon:"markup",onClick:k}):null)},fn=tn;export{tn as ColorControl,fn as default}; +import{n as M,d as ue,T as Me,F as Ce,I as $e,g as Ne}from"./index-c54e0a1f.js";import{R as h,r as b,g as fe}from"./index-1b03fe98.js";import{_ as Oe,i as J,a as Ie}from"./index-d7bb098e.js";import"./iframe-26627dd7.js";import"../sb-preview/runtime.js";import"./chunk-ZGA76URP-2bd2442b.js";import"./index-6fd5a17b.js";import"./index-356e4a49.js";function $(){return($=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function K(e){var t=b.useRef(e),n=b.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var S=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:p.buttons>0)&&o.current?a(ne(o.current,p,l.current)):_(!1)},N=function(){return _(!1)};function _(p){var m=i.current,x=V(o.current),C=p?x.addEventListener:x.removeEventListener;C(m?"touchmove":"mousemove",k),C(m?"touchend":"mouseup",N)}return[function(p){var m=p.nativeEvent,x=o.current;if(x&&(re(m),!function(X,R){return R&&!j(X)}(m,i.current)&&x)){if(j(m)){i.current=!0;var C=m.changedTouches||[];C.length&&(l.current=C[0].identifier)}x.focus(),a(ne(x,m,l.current)),_(!0)}},function(p){var m=p.which||p.keyCode;m<37||m>40||(p.preventDefault(),s({left:m===39?.05:m===37?-.05:0,top:m===40?.05:m===38?-.05:0}))},_]},[s,a]),d=c[0],f=c[1],g=c[2];return b.useEffect(function(){return g},[g]),h.createElement("div",$({},r,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:o,onKeyDown:f,tabIndex:0,role:"slider"}))}),z=function(e){return e.filter(Boolean).join(" ")},ee=function(e){var t=e.color,n=e.left,r=e.top,o=r===void 0?.5:r,a=z(["react-colorful__pointer",e.className]);return h.createElement("div",{className:a,style:{top:100*o+"%",left:100*n+"%"}},h.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},y=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},Se={grad:.9,turn:360,rad:360/(2*Math.PI)},Re=function(e){return ge(A(e))},A=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?y(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?y(parseInt(e.substring(6,8),16)/255,2):1}},Te=function(e,t){return t===void 0&&(t="deg"),Number(e)*(Se[t]||1)},je=function(e){var t=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?Fe({h:Te(t[1],t[2]),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)}):{h:0,s:0,v:0,a:1}},Fe=function(e){var t=e.s,n=e.l;return{h:e.h,s:(t*=(n<50?n:100-n)/100)>0?2*t/(n+t)*100:0,v:n+t,a:e.a}},ze=function(e){return Pe(de(e))},he=function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:y(e.h),s:y(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:y(o/2),a:y(r,2)}},G=function(e){var t=he(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},q=function(e){var t=he(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},de=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var a=Math.floor(t),s=r*(1-n),l=r*(1-(t-a)*n),i=r*(1-(1-t+a)*n),c=a%6;return{r:y(255*[r,l,s,s,i,r][c]),g:y(255*[i,r,r,l,s,s][c]),b:y(255*[s,s,i,r,r,l][c]),a:y(o,2)}},He=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?ge({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}},H=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Pe=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=o<1?H(y(255*o)):"";return"#"+H(t)+H(n)+H(r)+a},ge=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=Math.max(t,n,r),s=a-Math.min(t,n,r),l=s?a===t?(n-r)/s:a===n?2+(r-t)/s:4+(t-n)/s:0;return{h:y(60*(l<0?l+6:l)),s:y(a?s/a*100:0),v:y(a/255*100),a:o}},me=h.memo(function(e){var t=e.hue,n=e.onChange,r=z(["react-colorful__hue",e.className]);return h.createElement("div",{className:r},h.createElement(Z,{onMove:function(o){n({h:360*o.left})},onKey:function(o){n({h:S(t+360*o.left,0,360)})},"aria-label":"Hue","aria-valuenow":y(t),"aria-valuemax":"360","aria-valuemin":"0"},h.createElement(ee,{className:"react-colorful__hue-pointer",left:t/360,color:G({h:t,s:100,v:100,a:1})})))}),be=h.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:G({h:t.h,s:100,v:100,a:1})};return h.createElement("div",{className:"react-colorful__saturation",style:r},h.createElement(Z,{onMove:function(o){n({s:100*o.left,v:100-100*o.top})},onKey:function(o){n({s:S(t.s+100*o.left,0,100),v:S(t.v-100*o.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+y(t.s)+"%, Brightness "+y(t.v)+"%"},h.createElement(ee,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:G(t)})))}),ve=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},pe=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")},Le=function(e,t){return e.toLowerCase()===t.toLowerCase()||ve(A(e),A(t))};function ye(e,t,n){var r=K(n),o=b.useState(function(){return e.toHsva(t)}),a=o[0],s=o[1],l=b.useRef({color:t,hsva:a});b.useEffect(function(){if(!e.equal(t,l.current.color)){var c=e.toHsva(t);l.current={hsva:c,color:t},s(c)}},[t,e]),b.useEffect(function(){var c;ve(a,l.current.hsva)||e.equal(c=e.fromHsva(a),l.current.color)||(l.current={hsva:a,color:c},r(c))},[a,e,r]);var i=b.useCallback(function(c){s(function(d){return Object.assign({},d,c)})},[]);return[a,i]}var qe=typeof window<"u"?b.useLayoutEffect:b.useEffect,Be=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},oe=new Map,xe=function(e){qe(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!oe.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,oe.set(t,n);var r=Be();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},We=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=Q(e,["className","colorModel","color","onChange"]),l=b.useRef(null);xe(l);var i=ye(n,o,a),c=i[0],d=i[1],f=z(["react-colorful",t]);return h.createElement("div",$({},s,{ref:l,className:f}),h.createElement(be,{hsva:c,onChange:d}),h.createElement(me,{hue:c.h,onChange:d,className:"react-colorful__last-control"}))},Xe={defaultColor:"000",toHsva:Re,fromHsva:function(e){return ze({h:e.h,s:e.s,v:e.v,a:1})},equal:Le},De=function(e){return h.createElement(We,$({},e,{colorModel:Xe}))},Ke=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+q(Object.assign({},n,{a:0}))+", "+q(Object.assign({},n,{a:1}))+")"},a=z(["react-colorful__alpha",t]),s=y(100*n.a);return h.createElement("div",{className:a},h.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),h.createElement(Z,{onMove:function(l){r({a:l.left})},onKey:function(l){r({a:S(n.a+l.left)})},"aria-label":"Alpha","aria-valuetext":s+"%","aria-valuenow":s,"aria-valuemin":"0","aria-valuemax":"100"},h.createElement(ee,{className:"react-colorful__alpha-pointer",left:n.a,color:q(n)})))},we=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=Q(e,["className","colorModel","color","onChange"]),l=b.useRef(null);xe(l);var i=ye(n,o,a),c=i[0],d=i[1],f=z(["react-colorful",t]);return h.createElement("div",$({},s,{ref:l,className:f}),h.createElement(be,{hsva:c,onChange:d}),h.createElement(me,{hue:c.h,onChange:d}),h.createElement(Ke,{hsva:c,onChange:d,className:"react-colorful__last-control"}))},Ve={defaultColor:"hsla(0, 0%, 0%, 1)",toHsva:je,fromHsva:q,equal:pe},Ae=function(e){return h.createElement(we,$({},e,{colorModel:Ve}))},Ge={defaultColor:"rgba(0, 0, 0, 1)",toHsva:He,fromHsva:function(e){var t=de(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},equal:pe},Ue=function(e){return h.createElement(we,$({},e,{colorModel:Ge}))},Ye={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};const F=Ye,ke={};for(const e of Object.keys(F))ke[F[e]]=e;const u={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var _e=u;for(const e of Object.keys(u)){if(!("channels"in u[e]))throw new Error("missing channels property: "+e);if(!("labels"in u[e]))throw new Error("missing channel labels property: "+e);if(u[e].labels.length!==u[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=u[e];delete u[e].channels,delete u[e].labels,Object.defineProperty(u[e],"channels",{value:t}),Object.defineProperty(u[e],"labels",{value:n})}u.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(t,n,r),a=Math.max(t,n,r),s=a-o;let l,i;a===o?l=0:t===a?l=(n-r)/s:n===a?l=2+(r-t)/s:r===a&&(l=4+(t-n)/s),l=Math.min(l*60,360),l<0&&(l+=360);const c=(o+a)/2;return a===o?i=0:c<=.5?i=s/(a+o):i=s/(2-a-o),[l,i*100,c*100]};u.rgb.hsv=function(e){let t,n,r,o,a;const s=e[0]/255,l=e[1]/255,i=e[2]/255,c=Math.max(s,l,i),d=c-Math.min(s,l,i),f=function(g){return(c-g)/6/d+1/2};return d===0?(o=0,a=0):(a=d/c,t=f(s),n=f(l),r=f(i),s===c?o=r-n:l===c?o=1/3+t-r:i===c&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[o*360,a*100,c*100]};u.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const o=u.rgb.hsl(e)[0],a=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[o,a*100,r*100]};u.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(1-t,1-n,1-r),a=(1-t-o)/(1-o)||0,s=(1-n-o)/(1-o)||0,l=(1-r-o)/(1-o)||0;return[a*100,s*100,l*100,o*100]};function Je(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}u.rgb.keyword=function(e){const t=ke[e];if(t)return t;let n=1/0,r;for(const o of Object.keys(F)){const a=F[o],s=Je(e,a);s.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const o=t*.4124+n*.3576+r*.1805,a=t*.2126+n*.7152+r*.0722,s=t*.0193+n*.1192+r*.9505;return[o*100,a*100,s*100]};u.rgb.lab=function(e){const t=u.rgb.xyz(e);let n=t[0],r=t[1],o=t[2];n/=95.047,r/=100,o/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;const a=116*r-16,s=500*(n-r),l=200*(r-o);return[a,s,l]};u.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let o,a,s;if(n===0)return s=r*255,[s,s,s];r<.5?o=r*(1+n):o=r+n-r*n;const l=2*r-o,i=[0,0,0];for(let c=0;c<3;c++)a=t+1/3*-(c-1),a<0&&a++,a>1&&a--,6*a<1?s=l+(o-l)*6*a:2*a<1?s=o:3*a<2?s=l+(o-l)*(2/3-a)*6:s=l,i[c]=s*255;return i};u.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,o=n;const a=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,o*=a<=1?a:2-a;const s=(r+n)/2,l=r===0?2*o/(a+o):2*n/(r+n);return[t,l*100,s*100]};u.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const o=Math.floor(t)%6,a=t-Math.floor(t),s=255*r*(1-n),l=255*r*(1-n*a),i=255*r*(1-n*(1-a));switch(r*=255,o){case 0:return[r,i,s];case 1:return[l,r,s];case 2:return[s,r,i];case 3:return[s,l,r];case 4:return[i,s,r];case 5:return[r,s,l]}};u.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,o=Math.max(r,.01);let a,s;s=(2-n)*r;const l=(2-n)*o;return a=n*o,a/=l<=1?l:2-l,a=a||0,s/=2,[t,a*100,s*100]};u.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const o=n+r;let a;o>1&&(n/=o,r/=o);const s=Math.floor(6*t),l=1-r;a=6*t-s,s&1&&(a=1-a);const i=n+a*(l-n);let c,d,f;switch(s){default:case 6:case 0:c=l,d=i,f=n;break;case 1:c=i,d=l,f=n;break;case 2:c=n,d=l,f=i;break;case 3:c=n,d=i,f=l;break;case 4:c=i,d=n,f=l;break;case 5:c=l,d=n,f=i;break}return[c*255,d*255,f*255]};u.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100,a=1-Math.min(1,t*(1-o)+o),s=1-Math.min(1,n*(1-o)+o),l=1-Math.min(1,r*(1-o)+o);return[a*255,s*255,l*255]};u.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let o,a,s;return o=t*3.2406+n*-1.5372+r*-.4986,a=t*-.9689+n*1.8758+r*.0415,s=t*.0557+n*-.204+r*1.057,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),s=Math.min(Math.max(0,s),1),[o*255,a*255,s*255]};u.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;const o=116*n-16,a=500*(t-n),s=200*(n-r);return[o,a,s]};u.lab.xyz=function(e){const t=e[0],n=e[1],r=e[2];let o,a,s;a=(t+16)/116,o=n/500+a,s=a-r/200;const l=a**3,i=o**3,c=s**3;return a=l>.008856?l:(a-16/116)/7.787,o=i>.008856?i:(o-16/116)/7.787,s=c>.008856?c:(s-16/116)/7.787,o*=95.047,a*=100,s*=108.883,[o,a,s]};u.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let o;o=Math.atan2(r,n)*360/2/Math.PI,o<0&&(o+=360);const s=Math.sqrt(n*n+r*r);return[t,s,o]};u.lch.lab=function(e){const t=e[0],n=e[1],o=e[2]/360*2*Math.PI,a=n*Math.cos(o),s=n*Math.sin(o);return[t,a,s]};u.rgb.ansi16=function(e,t=null){const[n,r,o]=e;let a=t===null?u.rgb.hsv(e)[2]:t;if(a=Math.round(a/50),a===0)return 30;let s=30+(Math.round(o/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return a===2&&(s+=60),s};u.hsv.ansi16=function(e){return u.rgb.ansi16(u.hsv.rgb(e),e[2])};u.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};u.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=(~~(e>50)+1)*.5,r=(t&1)*n*255,o=(t>>1&1)*n*255,a=(t>>2&1)*n*255;return[r,o,a]};u.ansi256.rgb=function(e){if(e>=232){const a=(e-232)*10+8;return[a,a,a]}e-=16;let t;const n=Math.floor(e/36)/5*255,r=Math.floor((t=e%36)/6)/5*255,o=t%6/5*255;return[n,r,o]};u.rgb.hex=function(e){const n=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n};u.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split("").map(l=>l+l).join(""));const r=parseInt(n,16),o=r>>16&255,a=r>>8&255,s=r&255;return[o,a,s]};u.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.max(Math.max(t,n),r),a=Math.min(Math.min(t,n),r),s=o-a;let l,i;return s<1?l=a/(1-s):l=0,s<=0?i=0:o===t?i=(n-r)/s%6:o===n?i=2+(r-t)/s:i=4+(t-n)/s,i/=6,i%=1,[i*360,s*100,l*100]};u.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let o=0;return r<1&&(o=(n-.5*r)/(1-r)),[e[0],r*100,o*100]};u.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],r*100,o*100]};u.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];const o=[0,0,0],a=t%1*6,s=a%1,l=1-s;let i=0;switch(Math.floor(a)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return i=(1-n)*r,[(n*o[0]+i)*255,(n*o[1]+i)*255,(n*o[2]+i)*255]};u.hcg.hsv=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);let o=0;return r>0&&(o=t/r),[e[0],o*100,r*100]};u.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let o=0;return r>0&&r<.5?o=t/(2*r):r>=.5&&r<1&&(o=t/(2*(1-r))),[e[0],o*100,r*100]};u.hcg.hwb=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);return[e[0],(r-t)*100,(1-r)*100]};u.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,o=r-t;let a=0;return o<1&&(a=(r-o)/(1-o)),[e[0],o*100,a*100]};u.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};u.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};u.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};u.gray.hsl=function(e){return[0,0,e[0]]};u.gray.hsv=u.gray.hsl;u.gray.hwb=function(e){return[0,100,e[0]]};u.gray.cmyk=function(e){return[0,0,0,e[0]]};u.gray.lab=function(e){return[e[0],0,0]};u.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255,r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r};u.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const B=_e;function Qe(){const e={},t=Object.keys(B);for(let n=t.length,r=0;r1&&(n=r),e(n))};return"conversion"in e&&(t.conversion=e.conversion),t}function st(e){const t=function(...n){const r=n[0];if(r==null)return r;r.length>1&&(n=r);const o=e(n);if(typeof o=="object")for(let a=o.length,s=0;s{O[e]={},Object.defineProperty(O[e],"channels",{value:U[e].channels}),Object.defineProperty(O[e],"labels",{value:U[e].labels});const t=rt(e);Object.keys(t).forEach(r=>{const o=t[r];O[e][r]=st(o),O[e][r].raw=at(o)})});var lt=O;const w=fe(lt);var it=Oe,ct=function(){return it.Date.now()},ut=ct,ft=/\s/;function ht(e){for(var t=e.length;t--&&ft.test(e.charAt(t)););return t}var dt=ht,gt=dt,mt=/^\s+/;function bt(e){return e&&e.slice(0,gt(e)+1).replace(mt,"")}var vt=bt,pt=vt,ae=J,yt=Ie,se=0/0,xt=/^[-+]0x[0-9a-f]+$/i,wt=/^0b[01]+$/i,kt=/^0o[0-7]+$/i,_t=parseInt;function Et(e){if(typeof e=="number")return e;if(yt(e))return se;if(ae(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ae(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=pt(e);var n=wt.test(e);return n||kt.test(e)?_t(e.slice(2),n?2:8):xt.test(e)?se:+e}var Mt=Et,Ct=J,D=ut,le=Mt,$t="Expected a function",Nt=Math.max,Ot=Math.min;function It(e,t,n){var r,o,a,s,l,i,c=0,d=!1,f=!1,g=!0;if(typeof e!="function")throw new TypeError($t);t=le(t)||0,Ct(n)&&(d=!!n.leading,f="maxWait"in n,a=f?Nt(le(n.maxWait)||0,t):a,g="trailing"in n?!!n.trailing:g);function k(v){var E=r,T=o;return r=o=void 0,c=v,s=e.apply(T,E),s}function N(v){return c=v,l=setTimeout(m,t),d?k(v):s}function _(v){var E=v-i,T=v-c,te=t-E;return f?Ot(te,a-T):te}function p(v){var E=v-i,T=v-c;return i===void 0||E>=t||E<0||f&&T>=a}function m(){var v=D();if(p(v))return x(v);l=setTimeout(m,_(v))}function x(v){return l=void 0,g&&r?k(v):(r=o=void 0,s)}function C(){l!==void 0&&clearTimeout(l),c=0,r=i=o=l=void 0}function X(){return l===void 0?s:x(D())}function R(){var v=D(),E=p(v);if(r=arguments,o=this,i=v,E){if(l===void 0)return N(i);if(f)return clearTimeout(l),l=setTimeout(m,t),k(i)}return l===void 0&&(l=setTimeout(m,t)),s}return R.cancel=C,R.flush=X,R}var St=It,Rt=St,Tt=J,jt="Expected a function";function Ft(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(jt);return Tt(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Rt(e,t,{leading:r,maxWait:t,trailing:o})}var zt=Ft;const Ht=fe(zt);var Pt=M.div({position:"relative",maxWidth:250}),Lt=M(ue)({position:"absolute",zIndex:1,top:4,left:4}),qt=M.div({width:200,margin:5,".react-colorful__saturation":{borderRadius:"4px 4px 0 0"},".react-colorful__hue":{boxShadow:"inset 0 0 0 1px rgb(0 0 0 / 5%)"},".react-colorful__last-control":{borderRadius:"0 0 4px 4px"}}),Bt=M(Me)(({theme:e})=>({fontFamily:e.typography.fonts.base})),Wt=M.div({display:"grid",gridTemplateColumns:"repeat(9, 16px)",gap:6,padding:3,marginTop:5,width:200}),Xt=M.div(({theme:e,active:t})=>({width:16,height:16,boxShadow:t?`${e.appBorderColor} 0 0 0 1px inset, ${e.textMutedColor}50 0 0 0 4px`:`${e.appBorderColor} 0 0 0 1px inset`,borderRadius:e.appBorderRadius})),Dt=`url('data:image/svg+xml;charset=utf-8,')`,ie=({value:e,active:t,onClick:n,style:r,...o})=>{let a=`linear-gradient(${e}, ${e}), ${Dt}, linear-gradient(#fff, #fff)`;return h.createElement(Xt,{...o,active:t,onClick:n,style:{...r,backgroundImage:a}})},Kt=M(Ce.Input)(({theme:e})=>({width:"100%",paddingLeft:30,paddingRight:30,boxSizing:"border-box",fontFamily:e.typography.fonts.base})),Vt=M($e)(({theme:e})=>({position:"absolute",zIndex:1,top:6,right:7,width:20,height:20,padding:4,boxSizing:"border-box",cursor:"pointer",color:e.input.color})),Ee=(e=>(e.RGB="rgb",e.HSL="hsl",e.HEX="hex",e))(Ee||{}),P=Object.values(Ee),At=/\(([0-9]+),\s*([0-9]+)%?,\s*([0-9]+)%?,?\s*([0-9.]+)?\)/,Gt=/^\s*rgba?\(([0-9]+),\s*([0-9]+),\s*([0-9]+),?\s*([0-9.]+)?\)\s*$/i,Ut=/^\s*hsla?\(([0-9]+),\s*([0-9]+)%,\s*([0-9]+)%,?\s*([0-9.]+)?\)\s*$/i,Y=/^\s*#?([0-9a-f]{3}|[0-9a-f]{6})\s*$/i,Yt=/^\s*#?([0-9a-f]{3})\s*$/i,Jt={hex:De,rgb:Ue,hsl:Ae},L={hex:"transparent",rgb:"rgba(0, 0, 0, 0)",hsl:"hsla(0, 0%, 0%, 0)"},ce=e=>{let t=e==null?void 0:e.match(At);if(!t)return[0,0,0,1];let[,n,r,o,a=1]=t;return[n,r,o,a].map(Number)},I=e=>{if(!e)return;let t=!0;if(Gt.test(e)){let[s,l,i,c]=ce(e),[d,f,g]=w.rgb.hsl([s,l,i])||[0,0,0];return{valid:t,value:e,keyword:w.rgb.keyword([s,l,i]),colorSpace:"rgb",rgb:e,hsl:`hsla(${d}, ${f}%, ${g}%, ${c})`,hex:`#${w.rgb.hex([s,l,i]).toLowerCase()}`}}if(Ut.test(e)){let[s,l,i,c]=ce(e),[d,f,g]=w.hsl.rgb([s,l,i])||[0,0,0];return{valid:t,value:e,keyword:w.hsl.keyword([s,l,i]),colorSpace:"hsl",rgb:`rgba(${d}, ${f}, ${g}, ${c})`,hsl:e,hex:`#${w.hsl.hex([s,l,i]).toLowerCase()}`}}let n=e.replace("#",""),r=w.keyword.rgb(n)||w.hex.rgb(n),o=w.rgb.hsl(r),a=e;if(/[^#a-f0-9]/i.test(e)?a=n:Y.test(e)&&(a=`#${n}`),a.startsWith("#"))t=Y.test(a);else try{w.keyword.hex(a)}catch{t=!1}return{valid:t,value:a,keyword:w.rgb.keyword(r),colorSpace:"hex",rgb:`rgba(${r[0]}, ${r[1]}, ${r[2]}, 1)`,hsl:`hsla(${o[0]}, ${o[1]}%, ${o[2]}%, 1)`,hex:a}},Qt=(e,t,n)=>{if(!e||!(t!=null&&t.valid))return L[n];if(n!=="hex")return(t==null?void 0:t[n])||L[n];if(!t.hex.startsWith("#"))try{return`#${w.keyword.hex(t.hex)}`}catch{return L.hex}let r=t.hex.match(Yt);if(!r)return Y.test(t.hex)?t.hex:L.hex;let[o,a,s]=r[1].split("");return`#${o}${o}${a}${a}${s}${s}`},Zt=(e,t)=>{let[n,r]=b.useState(e||""),[o,a]=b.useState(()=>I(n)),[s,l]=b.useState((o==null?void 0:o.colorSpace)||"hex");b.useEffect(()=>{let f=e||"",g=I(f);r(f),a(g),l((g==null?void 0:g.colorSpace)||"hex")},[e]);let i=b.useMemo(()=>Qt(n,o,s).toLowerCase(),[n,o,s]),c=b.useCallback(f=>{let g=I(f),k=(g==null?void 0:g.value)||f||"";r(k),k===""&&(a(void 0),t(void 0)),g&&(a(g),l(g.colorSpace),t(g.value))},[t]),d=b.useCallback(()=>{let f=P.indexOf(s)+1;f>=P.length&&(f=0),l(P[f]);let g=(o==null?void 0:o[P[f]])||"";r(g),t(g)},[o,s,t]);return{value:n,realValue:i,updateValue:c,color:o,colorSpace:s,cycleColorSpace:d}},W=e=>e.replace(/\s*/,"").toLowerCase(),en=(e,t,n)=>{let[r,o]=b.useState(t!=null&&t.valid?[t]:[]);b.useEffect(()=>{t===void 0&&o([])},[t]);let a=b.useMemo(()=>(e||[]).map(l=>typeof l=="string"?I(l):l.title?{...I(l.color),keyword:l.title}:I(l.color)).concat(r).filter(Boolean).slice(-27),[e,r]),s=b.useCallback(l=>{l!=null&&l.valid&&(a.some(i=>W(i[n])===W(l[n]))||o(i=>i.concat(l)))},[n,a]);return{presets:a,addPreset:s}},tn=({name:e,value:t,onChange:n,onFocus:r,onBlur:o,presetColors:a,startOpen:s=!1})=>{let l=b.useCallback(Ht(n,200),[n]),{value:i,realValue:c,updateValue:d,color:f,colorSpace:g,cycleColorSpace:k}=Zt(t,l),{presets:N,addPreset:_}=en(a,f,g),p=Jt[g];return h.createElement(Pt,null,h.createElement(Lt,{startOpen:s,closeOnOutsideClick:!0,onVisibleChange:()=>_(f),tooltip:h.createElement(qt,null,h.createElement(p,{color:c==="transparent"?"#000000":c,onChange:d,onFocus:r,onBlur:o}),N.length>0&&h.createElement(Wt,null,N.map((m,x)=>h.createElement(ue,{key:`${m.value}-${x}`,hasChrome:!1,tooltip:h.createElement(Bt,{note:m.keyword||m.value})},h.createElement(ie,{value:m[g],active:f&&W(m[g])===W(f[g]),onClick:()=>d(m.value)})))))},h.createElement(ie,{value:c,style:{margin:4}})),h.createElement(Kt,{id:Ne(e),value:i,onChange:m=>d(m.target.value),onFocus:m=>m.target.select(),placeholder:"Choose color..."}),i?h.createElement(Vt,{icon:"markup",onClick:k}):null)},fn=tn;export{tn as ColorControl,fn as default}; diff --git a/docs/assets/DocsRenderer-NNNQARDV-d9907032.js b/docs/assets/DocsRenderer-NNNQARDV-57af13a0.js similarity index 89% rename from docs/assets/DocsRenderer-NNNQARDV-d9907032.js rename to docs/assets/DocsRenderer-NNNQARDV-57af13a0.js index 88790f45..e5ec0975 100644 --- a/docs/assets/DocsRenderer-NNNQARDV-d9907032.js +++ b/docs/assets/DocsRenderer-NNNQARDV-57af13a0.js @@ -1 +1 @@ -import{_ as p}from"./iframe-19c7c3ad.js";import{R as e,r as c}from"./index-1b03fe98.js";import{r as l,u}from"./react-18-5df836b6.js";import{C as h,A as E,H as d,D as x}from"./index-21c4db47.js";import"../sb-preview/runtime.js";import"./index-6fd5a17b.js";import"./chunk-ZGA76URP-2bd2442b.js";import"./index-d7bb098e.js";import"./index-356e4a49.js";var _={code:h,a:E,...d},D=class extends c.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t){let{showException:r}=this.props;r(t)}render(){let{hasError:t}=this.state,{children:r}=this.props;return t?null:e.createElement(e.Fragment,null,r)}},F=class{constructor(){this.render=async(t,r,o)=>{let n={..._,...r==null?void 0:r.components},s=x;return new Promise((m,a)=>{p(()=>import("./index-0dd2673f.js"),["./index-0dd2673f.js","./index-2ef8b458.js","./index-1b03fe98.js"],import.meta.url).then(({MDXProvider:i})=>l(e.createElement(D,{showException:a,key:Math.random()},e.createElement(i,{components:n},e.createElement(s,{context:t,docsParameter:r}))),o)).then(()=>m())})},this.unmount=t=>{u(t)}}};export{F as DocsRenderer,_ as defaultComponents}; +import{_ as p}from"./iframe-26627dd7.js";import{R as e,r as c}from"./index-1b03fe98.js";import{r as l,u}from"./react-18-5df836b6.js";import{C as h,A as E,H as d,D as x}from"./index-c54e0a1f.js";import"../sb-preview/runtime.js";import"./index-6fd5a17b.js";import"./chunk-ZGA76URP-2bd2442b.js";import"./index-d7bb098e.js";import"./index-356e4a49.js";var _={code:h,a:E,...d},D=class extends c.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t){let{showException:r}=this.props;r(t)}render(){let{hasError:t}=this.state,{children:r}=this.props;return t?null:e.createElement(e.Fragment,null,r)}},F=class{constructor(){this.render=async(t,r,o)=>{let n={..._,...r==null?void 0:r.components},s=x;return new Promise((m,a)=>{p(()=>import("./index-0dd2673f.js"),["./index-0dd2673f.js","./index-2ef8b458.js","./index-1b03fe98.js"],import.meta.url).then(({MDXProvider:i})=>l(e.createElement(D,{showException:a,key:Math.random()},e.createElement(i,{components:n},e.createElement(s,{context:t,docsParameter:r}))),o)).then(()=>m())})},this.unmount=t=>{u(t)}}};export{F as DocsRenderer,_ as defaultComponents}; diff --git a/docs/assets/Drawer.stories-3cceda62.js b/docs/assets/Drawer.stories-8638cc91.js similarity index 99% rename from docs/assets/Drawer.stories-3cceda62.js rename to docs/assets/Drawer.stories-8638cc91.js index 7ac430e7..c6116646 100644 --- a/docs/assets/Drawer.stories-3cceda62.js +++ b/docs/assets/Drawer.stories-8638cc91.js @@ -1,4 +1,4 @@ -import{t as T,a as i,j as e}from"./tw-merge-0a3648bd.js";import{r as o}from"./index-1b03fe98.js";import{c}from"./clsx.m-1229b3e0.js";import{B as g}from"./Button-e9ac0f78.js";import{N as F}from"./index-1e3c83a2.js";import{M as a}from"./index-44e44375.js";import"./index-a55c3a76.js";const h=({children:s,side:r,open:l,end:n,dataTheme:t,className:D,toggleClassName:O,contentClassName:B,sideClassName:q,overlayClassName:_,onClickOverlay:j,...L})=>{const R=T("drawer",D,c({"drawer-end":n}));return i("div",{"aria-expanded":l,...L,"data-theme":t,className:R,children:[e("input",{type:"checkbox",className:c("drawer-toggle",O),checked:l,readOnly:!0}),e("div",{className:c("drawer-content",B),children:s}),i("div",{className:c("drawer-side",q),children:[e("label",{className:c("drawer-overlay",_),onClick:j}),r]})]})},p=h;try{h.displayName="Drawer",h.__docgenInfo={description:"",displayName:"Drawer",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},side:{defaultValue:null,description:"",name:"side",required:!0,type:{name:"ReactNode"}},open:{defaultValue:null,description:"",name:"open",required:!1,type:{name:"boolean"}},end:{defaultValue:null,description:"",name:"end",required:!1,type:{name:"boolean"}},toggleClassName:{defaultValue:null,description:"",name:"toggleClassName",required:!1,type:{name:"string"}},contentClassName:{defaultValue:null,description:"",name:"contentClassName",required:!1,type:{name:"string"}},sideClassName:{defaultValue:null,description:"",name:"sideClassName",required:!1,type:{name:"string"}},overlayClassName:{defaultValue:null,description:"",name:"overlayClassName",required:!1,type:{name:"string"}},onClickOverlay:{defaultValue:null,description:"",name:"onClickOverlay",required:!1,type:{name:"(() => void)"}}}}}catch{}const H={title:"Layout/Drawer",component:p,argTypes:{side:{control:!1}}},d=s=>{const[r,l]=o.useState(!1),n=o.useCallback(()=>{l(t=>!t)},[]);return e(p,{...s,open:r,onClickOverlay:n,side:i(a,{className:"p-4 w-80 h-full bg-base-200 text-base-content",children:[e(a.Item,{children:e("a",{children:"Sidebar Item 1"})}),e(a.Item,{children:e("a",{children:"Sidebar Item 2"})})]}),children:e(g,{color:"primary",onClick:n,children:"Open drawer"})})};d.args={sideClassName:"h-full absolute",contentClassName:"flex h-56 items-center justify-center"};const m=s=>{const[r,l]=o.useState(!1),n=o.useCallback(()=>{l(t=>!t)},[]);return e(p,{...s,open:r,onClickOverlay:n,side:i(a,{className:"p-4 w-80 h-full bg-base-200 text-base-content",children:[e(a.Item,{children:e("a",{children:"Sidebar Item 1"})}),e(a.Item,{children:e("a",{children:"Sidebar Item 2"})})]}),children:e(g,{color:"primary",onClick:n,className:"lg:hidden",children:"Open drawer"})})};m.args={className:"lg:drawer-open",sideClassName:"h-full absolute",contentClassName:"flex h-56 items-center justify-center"};const u=s=>{const[r,l]=o.useState(!1),n=o.useCallback(()=>{l(t=>!t)},[]);return i(p,{...s,open:r,onClickOverlay:n,side:i(a,{className:"p-4 w-60 md:w-80 h-full bg-base-200",children:[e(a.Item,{children:e("a",{children:"Sidebar Item 1"})}),e(a.Item,{children:e("a",{children:"Sidebar Item 2"})})]}),children:[i(F,{className:"w-full bg-base-300",children:[e("div",{className:"flex-none lg:hidden",children:e(g,{shape:"square",color:"ghost",onClick:n,children:e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"inline-block w-6 h-6 stroke-current",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 6h16M4 12h16M4 18h16"})})})}),e("div",{className:"flex-1 px-2 mx-2",children:"Navbar Title"}),e("div",{className:"flex-none hidden lg:block",children:i(a,{horizontal:!0,children:[e(a.Item,{children:e("a",{children:"Navbar Item 1"})}),e(a.Item,{children:e("a",{children:"Navbar Item 2"})})]})})]}),e("div",{className:"flex flex-grow items-center justify-center",children:"Content"})]})};u.args={className:"h-56 rounded overflow-hidden",contentClassName:"flex flex-col"};const b=s=>{const[r,l]=o.useState(!1),n=o.useCallback(()=>{l(t=>!t)},[]);return e(p,{...s,open:r,onClickOverlay:n,side:i(a,{className:"p-4 w-80 h-full bg-base-200 text-base-content",children:[e(a.Item,{children:e("a",{children:"Sidebar Item 1"})}),e(a.Item,{children:e("a",{children:"Sidebar Item 2"})})]}),children:e(g,{color:"primary",onClick:n,children:"Open drawer"})})};b.args={sideClassName:"h-full absolute",contentClassName:"flex h-56 items-center justify-center",end:!0};var f,v,N;d.parameters={...d.parameters,docs:{...(f=d.parameters)==null?void 0:f.docs,source:{originalSource:`args => { +import{t as T,a as i,j as e}from"./tw-merge-0a3648bd.js";import{r as o}from"./index-1b03fe98.js";import{c}from"./clsx.m-1229b3e0.js";import{B as g}from"./Button-e9ac0f78.js";import{N as F}from"./index-c01ba1f2.js";import{M as a}from"./index-44e44375.js";import"./index-a55c3a76.js";const h=({children:s,side:r,open:l,end:n,dataTheme:t,className:D,toggleClassName:O,contentClassName:B,sideClassName:q,overlayClassName:_,onClickOverlay:j,...L})=>{const R=T("drawer",D,c({"drawer-end":n}));return i("div",{"aria-expanded":l,...L,"data-theme":t,className:R,children:[e("input",{type:"checkbox",className:c("drawer-toggle",O),checked:l,readOnly:!0}),e("div",{className:c("drawer-content",B),children:s}),i("div",{className:c("drawer-side",q),children:[e("label",{className:c("drawer-overlay",_),onClick:j}),r]})]})},p=h;try{h.displayName="Drawer",h.__docgenInfo={description:"",displayName:"Drawer",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},side:{defaultValue:null,description:"",name:"side",required:!0,type:{name:"ReactNode"}},open:{defaultValue:null,description:"",name:"open",required:!1,type:{name:"boolean"}},end:{defaultValue:null,description:"",name:"end",required:!1,type:{name:"boolean"}},toggleClassName:{defaultValue:null,description:"",name:"toggleClassName",required:!1,type:{name:"string"}},contentClassName:{defaultValue:null,description:"",name:"contentClassName",required:!1,type:{name:"string"}},sideClassName:{defaultValue:null,description:"",name:"sideClassName",required:!1,type:{name:"string"}},overlayClassName:{defaultValue:null,description:"",name:"overlayClassName",required:!1,type:{name:"string"}},onClickOverlay:{defaultValue:null,description:"",name:"onClickOverlay",required:!1,type:{name:"(() => void)"}}}}}catch{}const H={title:"Layout/Drawer",component:p,argTypes:{side:{control:!1}}},d=s=>{const[r,l]=o.useState(!1),n=o.useCallback(()=>{l(t=>!t)},[]);return e(p,{...s,open:r,onClickOverlay:n,side:i(a,{className:"p-4 w-80 h-full bg-base-200 text-base-content",children:[e(a.Item,{children:e("a",{children:"Sidebar Item 1"})}),e(a.Item,{children:e("a",{children:"Sidebar Item 2"})})]}),children:e(g,{color:"primary",onClick:n,children:"Open drawer"})})};d.args={sideClassName:"h-full absolute",contentClassName:"flex h-56 items-center justify-center"};const m=s=>{const[r,l]=o.useState(!1),n=o.useCallback(()=>{l(t=>!t)},[]);return e(p,{...s,open:r,onClickOverlay:n,side:i(a,{className:"p-4 w-80 h-full bg-base-200 text-base-content",children:[e(a.Item,{children:e("a",{children:"Sidebar Item 1"})}),e(a.Item,{children:e("a",{children:"Sidebar Item 2"})})]}),children:e(g,{color:"primary",onClick:n,className:"lg:hidden",children:"Open drawer"})})};m.args={className:"lg:drawer-open",sideClassName:"h-full absolute",contentClassName:"flex h-56 items-center justify-center"};const u=s=>{const[r,l]=o.useState(!1),n=o.useCallback(()=>{l(t=>!t)},[]);return i(p,{...s,open:r,onClickOverlay:n,side:i(a,{className:"p-4 w-60 md:w-80 h-full bg-base-200",children:[e(a.Item,{children:e("a",{children:"Sidebar Item 1"})}),e(a.Item,{children:e("a",{children:"Sidebar Item 2"})})]}),children:[i(F,{className:"w-full bg-base-300",children:[e("div",{className:"flex-none lg:hidden",children:e(g,{shape:"square",color:"ghost",onClick:n,children:e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"inline-block w-6 h-6 stroke-current",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 6h16M4 12h16M4 18h16"})})})}),e("div",{className:"flex-1 px-2 mx-2",children:"Navbar Title"}),e("div",{className:"flex-none hidden lg:block",children:i(a,{horizontal:!0,children:[e(a.Item,{children:e("a",{children:"Navbar Item 1"})}),e(a.Item,{children:e("a",{children:"Navbar Item 2"})})]})})]}),e("div",{className:"flex flex-grow items-center justify-center",children:"Content"})]})};u.args={className:"h-56 rounded overflow-hidden",contentClassName:"flex flex-col"};const b=s=>{const[r,l]=o.useState(!1),n=o.useCallback(()=>{l(t=>!t)},[]);return e(p,{...s,open:r,onClickOverlay:n,side:i(a,{className:"p-4 w-80 h-full bg-base-200 text-base-content",children:[e(a.Item,{children:e("a",{children:"Sidebar Item 1"})}),e(a.Item,{children:e("a",{children:"Sidebar Item 2"})})]}),children:e(g,{color:"primary",onClick:n,children:"Open drawer"})})};b.args={sideClassName:"h-full absolute",contentClassName:"flex h-56 items-center justify-center",end:!0};var f,v,N;d.parameters={...d.parameters,docs:{...(f=d.parameters)==null?void 0:f.docs,source:{originalSource:`args => { const [visible, setVisible] = useState(false); const toggleVisible = useCallback(() => { setVisible(visible => !visible); diff --git a/docs/assets/Dropdown.stories-bf9b5a3e.js b/docs/assets/Dropdown.stories-471ab170.js similarity index 97% rename from docs/assets/Dropdown.stories-bf9b5a3e.js rename to docs/assets/Dropdown.stories-471ab170.js index b30c2a78..d88da4f6 100644 --- a/docs/assets/Dropdown.stories-bf9b5a3e.js +++ b/docs/assets/Dropdown.stories-471ab170.js @@ -1,4 +1,4 @@ -import{j as e,a as o}from"./tw-merge-0a3648bd.js";import{D as r}from"./index-abb70d26.js";import{C as c}from"./index-3c968524.js";import{N as l}from"./index-1e3c83a2.js";import{B as y}from"./Button-e9ac0f78.js";import"./index-1b03fe98.js";import"./clsx.m-1229b3e0.js";import"./index-a55c3a76.js";const A={title:"Actions/Dropdown",component:r,argTypes:{item:{control:!1}}},s=n=>e("div",{className:"my-32",children:o(r,{...n,children:[e(r.Toggle,{children:"Click"}),o(r.Menu,{className:"w-52",children:[e(r.Item,{children:"Item 1"}),e(r.Item,{children:"Item 2"})]})]})}),d=n=>e("div",{className:"my-32",children:o(r,{...n,children:[e(r.Toggle,{children:"Click"}),e(r.Menu,{className:"card card-compact w-64 p-2 shadow bg-primary text-primary-content m-1",children:o(c.Body,{children:[e(c.Title,{tag:"h3",children:"Card title!"}),e("p",{children:"you can use any element as a dropdown."})]})})]})}),a=({dataTheme:n,...v})=>o(l,{className:"my-32 px-2 font-sans bg-base-300 rounded-box",dataTheme:n,children:[e(l.Start,{className:"px-2 lg:flex-none",children:e("span",{className:"text-lg font-bold",children:"daisyUI"})}),o(l.End,{children:[e(y,{color:"ghost",dataTheme:n,children:"Button"}),o(r,{...v,dataTheme:n,children:[e(r.Toggle,{className:"btn btn-ghost rounded-btn",button:!1,children:"Dropdown"}),o(r.Menu,{className:"w-52 mt-4",children:[e(r.Item,{children:"Item 1"}),e(r.Item,{children:"Item 2"})]})]})]})]});a.args={end:!0};const t=n=>o("div",{className:"my-32 font-sans",children:["A normal text and a helper dropdown",o(r,{...n,children:[e(r.Toggle,{button:!1,className:"btn btn-circle btn-ghost btn-xs text-info",children:e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"w-4 h-4 stroke-current",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),e(r.Menu,{className:"card compact w-64 !p-0 shadow bg-base-100 rounded-box",children:o(c.Body,{children:[e(c.Title,{tag:"h2",children:"You needed more info?"}),e("p",{children:"Here is a description!"})]})})]})]});t.args={end:!0};var m,p,i;s.parameters={...s.parameters,docs:{...(m=s.parameters)==null?void 0:m.docs,source:{originalSource:`args => { +import{j as e,a as o}from"./tw-merge-0a3648bd.js";import{D as r}from"./index-e4a3bb66.js";import{C as c}from"./index-3c968524.js";import{N as l}from"./index-c01ba1f2.js";import{B as y}from"./Button-e9ac0f78.js";import"./index-1b03fe98.js";import"./clsx.m-1229b3e0.js";import"./index-a55c3a76.js";const A={title:"Actions/Dropdown",component:r,argTypes:{item:{control:!1}}},s=n=>e("div",{className:"my-32",children:o(r,{...n,children:[e(r.Toggle,{children:"Click"}),o(r.Menu,{className:"w-52",children:[e(r.Item,{children:"Item 1"}),e(r.Item,{children:"Item 2"})]})]})}),d=n=>e("div",{className:"my-32",children:o(r,{...n,children:[e(r.Toggle,{children:"Click"}),e(r.Menu,{className:"card card-compact w-64 p-2 shadow bg-primary text-primary-content m-1",children:o(c.Body,{children:[e(c.Title,{tag:"h3",children:"Card title!"}),e("p",{children:"you can use any element as a dropdown."})]})})]})}),a=({dataTheme:n,...v})=>o(l,{className:"my-32 px-2 font-sans bg-base-300 rounded-box",dataTheme:n,children:[e(l.Start,{className:"px-2 lg:flex-none",children:e("span",{className:"text-lg font-bold",children:"daisyUI"})}),o(l.End,{children:[e(y,{color:"ghost",dataTheme:n,children:"Button"}),o(r,{...v,dataTheme:n,children:[e(r.Toggle,{className:"btn btn-ghost rounded-btn",button:!1,children:"Dropdown"}),o(r.Menu,{className:"w-52 mt-4",children:[e(r.Item,{children:"Item 1"}),e(r.Item,{children:"Item 2"})]})]})]})]});a.args={end:!0};const t=n=>o("div",{className:"my-32 font-sans",children:["A normal text and a helper dropdown",o(r,{...n,children:[e(r.Toggle,{button:!1,className:"btn btn-circle btn-ghost btn-xs text-info",children:e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"w-4 h-4 stroke-current",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),e(r.Menu,{className:"card compact w-64 !p-0 shadow bg-base-100 rounded-box",children:o(c.Body,{children:[e(c.Title,{tag:"h2",children:"You needed more info?"}),e("p",{children:"Here is a description!"})]})})]})]});t.args={end:!0};var m,p,i;s.parameters={...s.parameters,docs:{...(m=s.parameters)==null?void 0:m.docs,source:{originalSource:`args => { return
Click diff --git a/docs/assets/DropdownDetails.stories-cfa84896.js b/docs/assets/DropdownDetails.stories-606ccb53.js similarity index 94% rename from docs/assets/DropdownDetails.stories-cfa84896.js rename to docs/assets/DropdownDetails.stories-606ccb53.js index 413a79e2..10fb3c93 100644 --- a/docs/assets/DropdownDetails.stories-cfa84896.js +++ b/docs/assets/DropdownDetails.stories-606ccb53.js @@ -1,4 +1,4 @@ -import{j as r,a as t}from"./tw-merge-0a3648bd.js";import{D as e}from"./index-abb70d26.js";import"./index-1b03fe98.js";import"./clsx.m-1229b3e0.js";import"./Button-e9ac0f78.js";import"./index-a55c3a76.js";const w={title:"Actions/Dropdown/Details",component:e.Details},o=i=>r("div",{className:"my-32",children:t(e.Details,{...i,children:[r(e.Details.Toggle,{children:"Click"}),t(e.Menu,{className:"w-52",children:[r(e.Item,{children:"Item 1"}),r(e.Item,{children:"Item 2"})]})]})});o.args={};var s,n,a;o.parameters={...o.parameters,docs:{...(s=o.parameters)==null?void 0:s.docs,source:{originalSource:`args => { +import{j as r,a as t}from"./tw-merge-0a3648bd.js";import{D as e}from"./index-e4a3bb66.js";import"./index-1b03fe98.js";import"./clsx.m-1229b3e0.js";import"./Button-e9ac0f78.js";import"./index-a55c3a76.js";const w={title:"Actions/Dropdown/Details",component:e.Details},o=i=>r("div",{className:"my-32",children:t(e.Details,{...i,children:[r(e.Details.Toggle,{children:"Click"}),t(e.Menu,{className:"w-52",children:[r(e.Item,{children:"Item 1"}),r(e.Item,{children:"Item 2"})]})]})});o.args={};var s,n,a;o.parameters={...o.parameters,docs:{...(s=o.parameters)==null?void 0:s.docs,source:{originalSource:`args => { return
Click diff --git a/docs/assets/Indicator.stories-f48c90e3.js b/docs/assets/Indicator.stories-9f8b35ef.js similarity index 99% rename from docs/assets/Indicator.stories-f48c90e3.js rename to docs/assets/Indicator.stories-9f8b35ef.js index 02eea33a..03354d03 100644 --- a/docs/assets/Indicator.stories-f48c90e3.js +++ b/docs/assets/Indicator.stories-9f8b35ef.js @@ -1,4 +1,4 @@ -import{a as t,j as e}from"./tw-merge-0a3648bd.js";import{I as a}from"./index-e97e44e7.js";import{A as Me}from"./index-6ae1381f.js";import{B as s}from"./index-ccb0f6f2.js";import{B as Fe}from"./Button-e9ac0f78.js";import{T as y}from"./index-eb20e8d5.js";import{I as Re}from"./index-0ee0d1a2.js";import{C as f}from"./index-3c968524.js";import"./index-1b03fe98.js";import"./clsx.m-1229b3e0.js";import"./utils-25597068.js";import"./index-a55c3a76.js";const Ge={title:"Layout/Indicator",component:a.Item},n=r=>t(a,{children:[e(a.Item,{...r}),e("div",{className:"grid w-32 h-32 rounded bg-base-300 place-items-center",children:"content"})]});n.args={className:"badge badge-secondary"};const T=r=>t(a,{children:[e(s,{color:"primary",className:a.Item.className(r),children:"new"}),e("div",{className:"grid w-32 h-32 rounded bg-base-300 place-items-center",children:"content"})]}),z=r=>t(a,{children:[e(s,{color:"secondary",className:a.Item.className(r),children:"99+"}),e(Fe,{children:"inbox"})]}),c=r=>t(y,{variant:"lifted",value:1,children:[e(y.Tab,{value:0,children:"Messages"}),t(y.Tab,{className:a.className(),value:1,children:["Notifications",e(a.Item,{...r,children:"8"})]}),e(y.Tab,{value:2,children:"Request"})]});c.args={className:"badge"};const A=r=>t(a,{children:[e(s,{className:a.Item.className(r),color:"secondary",children:"typing…"}),e(Me,{shape:"square",src:"https://daisyui.com/images/stock/photo-1534528741775-53994a69daeb.jpg"})]}),d=r=>t(a,{children:[e(a.Item,{...r,children:"Required"}),e(Re,{placeholder:"Your email address",bordered:!0})]});d.args={className:"badge"};const i=r=>t(a,{className:"my-6 mx-10",children:[e(Fe,{color:"primary",className:a.Item.className(r),children:"Apply"}),e(f,{bordered:!0,className:"bg-base-100",children:t(f.Body,{children:[e(f.Title,{children:"Job Title"}),e("p",{children:"Rerum reiciendis beatae tenetur excepturi"})]})})]});i.args={vertical:"bottom"};const m=r=>t(a,{children:[e(s,{color:"secondary",className:a.Item.className(r),children:"Uploading Image..."}),e("img",{src:"https://daisyui.com/images/stock/photo-1606107557195-0e29a4b5b4aa.jpg"})]});m.args={vertical:"middle",horizontal:"center"};const o=r=>t(a,{children:[e(s,{color:"secondary",className:a.Item.className(r)}),e("div",{className:"grid w-32 h-32 rounded bg-base-300 place-items-center",children:"content"})]}),l=o.bind({});l.args={horizontal:"start"};const g=o.bind({});g.args={horizontal:"center"};const S=o.bind({}),p=o.bind({});p.args={horizontal:"start",vertical:"middle"};const u=o.bind({});u.args={horizontal:"center",vertical:"middle"};const I=o.bind({});I.args={vertical:"middle"};const N=o.bind({});N.args={horizontal:"start",vertical:"bottom"};const b=o.bind({});b.args={horizontal:"center",vertical:"bottom"};const h=o.bind({});h.args={vertical:"bottom"};const v=r=>t(a,{...r,children:[e(s,{color:"secondary",className:a.Item.className({vertical:"top",horizontal:"start"}),children:"top+start"}),e(s,{color:"secondary",className:a.Item.className({vertical:"top",horizontal:"center"}),children:"top+center"}),e(s,{color:"secondary",className:a.Item.className({vertical:"top",horizontal:"end"}),children:"top+end"}),e(s,{color:"secondary",className:a.Item.className({vertical:"middle",horizontal:"start"}),children:"middle+start"}),e(s,{color:"secondary",className:a.Item.className({vertical:"middle",horizontal:"center"}),children:"middle+center"}),e(s,{color:"secondary",className:a.Item.className({vertical:"middle",horizontal:"end"}),children:"middle+end"}),e(s,{color:"secondary",className:a.Item.className({vertical:"bottom",horizontal:"start"}),children:"bottom+start"}),e(s,{color:"secondary",className:a.Item.className({vertical:"bottom",horizontal:"center"}),children:"bottom+center"}),e(s,{color:"secondary",className:a.Item.className({vertical:"bottom",horizontal:"end"}),children:"bottom+end"}),e("div",{className:"grid w-60 h-32 bg-base-300 place-items-center",children:"content"})]});v.argTypes={horizontal:{control:!1},vertical:{control:!1}};const B=o.bind({});B.args={className:"sm:indicator-middle md:indicator-bottom lg:indicator-center xl:indicator-end",horizontal:"start"};var w,C,x;n.parameters={...n.parameters,docs:{...(w=n.parameters)==null?void 0:w.docs,source:{originalSource:`args => { +import{a as t,j as e}from"./tw-merge-0a3648bd.js";import{I as a}from"./index-202b124b.js";import{A as Me}from"./index-6ae1381f.js";import{B as s}from"./index-ccb0f6f2.js";import{B as Fe}from"./Button-e9ac0f78.js";import{T as y}from"./index-eb20e8d5.js";import{I as Re}from"./index-0ee0d1a2.js";import{C as f}from"./index-3c968524.js";import"./index-1b03fe98.js";import"./clsx.m-1229b3e0.js";import"./utils-25597068.js";import"./index-a55c3a76.js";const Ge={title:"Layout/Indicator",component:a.Item},n=r=>t(a,{children:[e(a.Item,{...r}),e("div",{className:"grid w-32 h-32 rounded bg-base-300 place-items-center",children:"content"})]});n.args={className:"badge badge-secondary"};const T=r=>t(a,{children:[e(s,{color:"primary",className:a.Item.className(r),children:"new"}),e("div",{className:"grid w-32 h-32 rounded bg-base-300 place-items-center",children:"content"})]}),z=r=>t(a,{children:[e(s,{color:"secondary",className:a.Item.className(r),children:"99+"}),e(Fe,{children:"inbox"})]}),c=r=>t(y,{variant:"lifted",value:1,children:[e(y.Tab,{value:0,children:"Messages"}),t(y.Tab,{className:a.className(),value:1,children:["Notifications",e(a.Item,{...r,children:"8"})]}),e(y.Tab,{value:2,children:"Request"})]});c.args={className:"badge"};const A=r=>t(a,{children:[e(s,{className:a.Item.className(r),color:"secondary",children:"typing…"}),e(Me,{shape:"square",src:"https://daisyui.com/images/stock/photo-1534528741775-53994a69daeb.jpg"})]}),d=r=>t(a,{children:[e(a.Item,{...r,children:"Required"}),e(Re,{placeholder:"Your email address",bordered:!0})]});d.args={className:"badge"};const i=r=>t(a,{className:"my-6 mx-10",children:[e(Fe,{color:"primary",className:a.Item.className(r),children:"Apply"}),e(f,{bordered:!0,className:"bg-base-100",children:t(f.Body,{children:[e(f.Title,{children:"Job Title"}),e("p",{children:"Rerum reiciendis beatae tenetur excepturi"})]})})]});i.args={vertical:"bottom"};const m=r=>t(a,{children:[e(s,{color:"secondary",className:a.Item.className(r),children:"Uploading Image..."}),e("img",{src:"https://daisyui.com/images/stock/photo-1606107557195-0e29a4b5b4aa.jpg"})]});m.args={vertical:"middle",horizontal:"center"};const o=r=>t(a,{children:[e(s,{color:"secondary",className:a.Item.className(r)}),e("div",{className:"grid w-32 h-32 rounded bg-base-300 place-items-center",children:"content"})]}),l=o.bind({});l.args={horizontal:"start"};const g=o.bind({});g.args={horizontal:"center"};const S=o.bind({}),p=o.bind({});p.args={horizontal:"start",vertical:"middle"};const u=o.bind({});u.args={horizontal:"center",vertical:"middle"};const I=o.bind({});I.args={vertical:"middle"};const N=o.bind({});N.args={horizontal:"start",vertical:"bottom"};const b=o.bind({});b.args={horizontal:"center",vertical:"bottom"};const h=o.bind({});h.args={vertical:"bottom"};const v=r=>t(a,{...r,children:[e(s,{color:"secondary",className:a.Item.className({vertical:"top",horizontal:"start"}),children:"top+start"}),e(s,{color:"secondary",className:a.Item.className({vertical:"top",horizontal:"center"}),children:"top+center"}),e(s,{color:"secondary",className:a.Item.className({vertical:"top",horizontal:"end"}),children:"top+end"}),e(s,{color:"secondary",className:a.Item.className({vertical:"middle",horizontal:"start"}),children:"middle+start"}),e(s,{color:"secondary",className:a.Item.className({vertical:"middle",horizontal:"center"}),children:"middle+center"}),e(s,{color:"secondary",className:a.Item.className({vertical:"middle",horizontal:"end"}),children:"middle+end"}),e(s,{color:"secondary",className:a.Item.className({vertical:"bottom",horizontal:"start"}),children:"bottom+start"}),e(s,{color:"secondary",className:a.Item.className({vertical:"bottom",horizontal:"center"}),children:"bottom+center"}),e(s,{color:"secondary",className:a.Item.className({vertical:"bottom",horizontal:"end"}),children:"bottom+end"}),e("div",{className:"grid w-60 h-32 bg-base-300 place-items-center",children:"content"})]});v.argTypes={horizontal:{control:!1},vertical:{control:!1}};const B=o.bind({});B.args={className:"sm:indicator-middle md:indicator-bottom lg:indicator-center xl:indicator-end",horizontal:"start"};var w,C,x;n.parameters={...n.parameters,docs:{...(w=n.parameters)==null?void 0:w.docs,source:{originalSource:`args => { return
diff --git a/docs/assets/Join.stories-9383d512.js b/docs/assets/Join.stories-3ad8b425.js similarity index 98% rename from docs/assets/Join.stories-9383d512.js rename to docs/assets/Join.stories-3ad8b425.js index f806ff78..1ab6146a 100644 --- a/docs/assets/Join.stories-9383d512.js +++ b/docs/assets/Join.stories-3ad8b425.js @@ -1,4 +1,4 @@ -import{a,j as e}from"./tw-merge-0a3648bd.js";import{J as o}from"./Join-47e05b2f.js";import{B as n}from"./Button-e9ac0f78.js";import{I as v}from"./index-0ee0d1a2.js";import{S as r}from"./index-cdac515a.js";import{I as d}from"./index-e97e44e7.js";import{B as E}from"./index-ccb0f6f2.js";import"./index-1b03fe98.js";import"./clsx.m-1229b3e0.js";import"./index-a55c3a76.js";const L={title:"Layout/Join (group items)",component:o},i=t=>a(o,{...t,children:[e(n,{className:"join-item",children:"Button"}),e(n,{className:"join-item",children:"Button"}),e(n,{className:"join-item",children:"Button"})]});i.args={};const s=t=>a(o,{...t,children:[e(n,{className:"join-item",children:"Button"}),e(n,{className:"join-item",children:"Button"}),e(n,{className:"join-item",children:"Button"})]});s.args={vertical:!0};const c=t=>a(o,{...t,children:[e("div",{children:e("div",{children:e(v,{className:"join-item",placeholder:"Search..."})})}),a(r,{className:"join-item",children:[e(r.Option,{selected:!0,disabled:!0,children:"Category"}),e(r.Option,{children:"Sci-fi"}),e(r.Option,{children:"Drama"}),e(r.Option,{children:"Action"})]}),a(d,{children:[e(E,{color:"secondary",className:d.Item.className(),children:"new"}),e(n,{className:"join-item",children:"Search"})]})]});c.args={};const m=t=>a(o,{...t,children:[e(v,{className:"join-item",placeholder:"Email"}),e(n,{className:"join-item rounded-r-full",children:"Subscribe"})]});m.args={};const l=t=>a(o,{...t,children:[e("input",{className:"join-item btn",type:"radio",name:"options","aria-label":"Radio 1"}),e("input",{className:"join-item btn",type:"radio",name:"options","aria-label":"Radio 2"}),e("input",{className:"join-item btn",type:"radio",name:"options","aria-label":"Radio 3"})]});l.args={};var u,p,B;i.parameters={...i.parameters,docs:{...(u=i.parameters)==null?void 0:u.docs,source:{originalSource:`args => { +import{a,j as e}from"./tw-merge-0a3648bd.js";import{J as o}from"./Join-47e05b2f.js";import{B as n}from"./Button-e9ac0f78.js";import{I as v}from"./index-0ee0d1a2.js";import{S as r}from"./index-cdac515a.js";import{I as d}from"./index-202b124b.js";import{B as E}from"./index-ccb0f6f2.js";import"./index-1b03fe98.js";import"./clsx.m-1229b3e0.js";import"./index-a55c3a76.js";const L={title:"Layout/Join (group items)",component:o},i=t=>a(o,{...t,children:[e(n,{className:"join-item",children:"Button"}),e(n,{className:"join-item",children:"Button"}),e(n,{className:"join-item",children:"Button"})]});i.args={};const s=t=>a(o,{...t,children:[e(n,{className:"join-item",children:"Button"}),e(n,{className:"join-item",children:"Button"}),e(n,{className:"join-item",children:"Button"})]});s.args={vertical:!0};const c=t=>a(o,{...t,children:[e("div",{children:e("div",{children:e(v,{className:"join-item",placeholder:"Search..."})})}),a(r,{className:"join-item",children:[e(r.Option,{selected:!0,disabled:!0,children:"Category"}),e(r.Option,{children:"Sci-fi"}),e(r.Option,{children:"Drama"}),e(r.Option,{children:"Action"})]}),a(d,{children:[e(E,{color:"secondary",className:d.Item.className(),children:"new"}),e(n,{className:"join-item",children:"Search"})]})]});c.args={};const m=t=>a(o,{...t,children:[e(v,{className:"join-item",placeholder:"Email"}),e(n,{className:"join-item rounded-r-full",children:"Subscribe"})]});m.args={};const l=t=>a(o,{...t,children:[e("input",{className:"join-item btn",type:"radio",name:"options","aria-label":"Radio 1"}),e("input",{className:"join-item btn",type:"radio",name:"options","aria-label":"Radio 2"}),e("input",{className:"join-item btn",type:"radio",name:"options","aria-label":"Radio 3"})]});l.args={};var u,p,B;i.parameters={...i.parameters,docs:{...(u=i.parameters)==null?void 0:u.docs,source:{originalSource:`args => { return diff --git a/docs/assets/Navbar.stories-5c3fdc08.js b/docs/assets/Navbar.stories-324a7836.js similarity index 99% rename from docs/assets/Navbar.stories-5c3fdc08.js rename to docs/assets/Navbar.stories-324a7836.js index 8cdc2cb6..fad23e35 100644 --- a/docs/assets/Navbar.stories-5c3fdc08.js +++ b/docs/assets/Navbar.stories-324a7836.js @@ -1,4 +1,4 @@ -import{j as e,a as n,F as O}from"./tw-merge-0a3648bd.js";import{N as s}from"./index-1e3c83a2.js";import{B as a}from"./Button-e9ac0f78.js";import{M as t}from"./index-44e44375.js";import{D as o}from"./index-abb70d26.js";import{F as G}from"./index-cdaabc1d.js";import{I as J}from"./index-0ee0d1a2.js";import{I as w}from"./index-e97e44e7.js";import{B as N}from"./index-ccb0f6f2.js";import{C as x}from"./index-3c968524.js";import"./index-1b03fe98.js";import"./clsx.m-1229b3e0.js";import"./index-a55c3a76.js";const ce={title:"Navigation/Navbar",component:s,args:{className:"bg-base-100 shadow-xl rounded-box"}},u=r=>e(s,{...r,children:e(a,{tag:"a",className:"text-xl normal-case",color:"ghost",children:"daisyUI"})}),g=r=>n(s,{...r,children:[e("div",{className:"flex-1",children:e(a,{tag:"a",className:"text-xl normal-case",color:"ghost",children:"daisyUI"})}),e("div",{className:"flex-none",children:e(a,{tag:"a",shape:"square",color:"ghost",children:e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"inline-block w-5 h-5 stroke-current",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 12h.01M12 12h.01M19 12h.01M6 12a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0z"})})})})]}),p=r=>n(s,{...r,children:[e("div",{className:"flex-none",children:e(a,{shape:"square",color:"ghost",children:e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"inline-block w-5 h-5 stroke-current",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})}),e("div",{className:"flex-1",children:e(a,{tag:"a",color:"ghost",className:"normal-case text-xl",children:"daisyUI"})}),e("div",{className:"flex-none",children:e(a,{shape:"square",color:"ghost",children:e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"inline-block w-5 h-5 stroke-current",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 12h.01M12 12h.01M19 12h.01M6 12a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0z"})})})})]}),l=r=>n(s,{...r,children:[e("div",{className:"flex-1",children:e(a,{tag:"a",color:"ghost",className:"normal-case text-xl",children:"daisyUI"})}),e("div",{className:"flex-none",children:n(t,{horizontal:!0,className:"px-1",children:[e(t.Item,{children:e("a",{children:"Link"})}),e(t.Item,{children:n("details",{children:[e("summary",{children:"Parent"}),n("ul",{className:"p-2 bg-base-100",children:[e("li",{children:e("a",{children:"Link 1"})}),e("li",{children:e("a",{children:"Link 2"})})]})]})})]})})]});l.args={className:"bg-base-100 mb-32 shadow-xl rounded-box"};const c=r=>n(s,{...r,children:[e("div",{className:"flex-1",children:e(a,{tag:"a",className:"text-xl normal-case",color:"ghost",children:"daisyUI"})}),n("div",{className:"flex-none gap-2",children:[e(G,{children:e(J,{bordered:!0,type:"text",placeholder:"Search",className:"w-24 md:w-auto"})}),n(o,{end:!0,children:[e(a,{tag:"label",tabIndex:0,color:"ghost",className:"avatar",shape:"circle",children:e("div",{className:"w-10 rounded-full",children:e("img",{src:"https://daisyui.com/images/stock/photo-1534528741775-53994a69daeb.jpg"})})}),n(o.Menu,{className:"w-52 menu-sm mt-3 z-[1] p-2",children:[e("li",{children:n("a",{className:"justify-between",children:["Profile",e(N,{children:"New"})]})}),e(o.Item,{children:"Settings"}),e(o.Item,{children:"Logout"})]})]})]})]});c.args={className:"bg-base-100 mb-32 shadow-xl round-box"};const d=r=>n(s,{...r,children:[e("div",{className:"flex-1",children:e(a,{tag:"a",className:"text-xl normal-case",color:"ghost",children:"daisyUI"})}),n("div",{className:"flex-none",children:[n(o,{end:!0,children:[e(a,{tag:"label",tabIndex:0,color:"ghost",shape:"circle",children:n(w,{children:[e(N,{size:"sm",className:w.Item.className(),children:"8"}),e("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z"})})]})}),e(o.Menu,{className:"mt-3 z-[1] card card-compact w-52 !p-0",children:n(x.Body,{children:[e("span",{className:"font-bold text-lg",children:"8 Items"}),e("span",{className:"text-info",children:"Subtotal: $999"}),e(x.Actions,{children:e(a,{color:"primary",fullWidth:!0,children:"View cart"})})]})})]}),n(o,{end:!0,children:[e(a,{tag:"label",tabIndex:0,color:"ghost",className:"avatar",shape:"circle",children:e("div",{className:"w-10 rounded-full",children:e("img",{src:"https://daisyui.com/images/stock/photo-1534528741775-53994a69daeb.jpg"})})}),n(o.Menu,{className:"mt-3 z-[1] w-52 menu-sm",children:[e("li",{children:n("a",{className:"justify-between",children:["Profile",e(N,{className:"badge",children:"New"})]})}),e(o.Item,{children:"Settings"}),e(o.Item,{children:"Logout"})]})]})]})]});d.args={className:"bg-base-100 mb-40 shadow-xl rounded-box"};const i=r=>n(s,{...r,children:[e(s.Start,{children:n(o,{children:[e(a,{tag:"label",color:"ghost",shape:"circle",tabIndex:0,children:e("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h7"})})}),n(o.Menu,{className:"menu-sm w-52 mt-3 z-[1]",children:[e(o.Item,{children:"Homepage"}),e(o.Item,{children:"Portfolio"}),e(o.Item,{children:"About"})]})]})}),e(s.Center,{children:e(a,{tag:"a",color:"ghost",className:"normal-case text-xl",children:"daisyUI"})}),n(s.End,{className:"navbar-end",children:[e(a,{color:"ghost",shape:"circle",children:e("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),e(a,{color:"ghost",shape:"circle",children:n(w,{children:[e(N,{size:"xs",color:"primary",className:w.Item.className()}),e("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9"})})]})})]})]});i.args={className:"bg-base-100 mb-40 shadow-xl rounded-box"};const m=r=>n(s,{...r,children:[n(s.Start,{children:[n(o,{children:[e(a,{tag:"label",color:"ghost",tabIndex:0,className:"lg:hidden",children:e("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h8m-8 6h16"})})}),n(o.Menu,{tabIndex:0,className:"w-52 menu-sm mt-3 z-[1]",children:[e(o.Item,{children:"Item 1"}),n("li",{children:[e("a",{children:"Parent"}),n("ul",{className:"p-2",children:[e("li",{children:e("a",{children:"Submenu 1"})}),e("li",{children:e("a",{children:"Submenu 2"})})]})]}),e(o.Item,{children:"Item 3"})]})]}),e("a",{className:"btn btn-ghost normal-case text-xl",children:"daisyUI"})]}),e(s.Center,{className:"hidden lg:flex",children:n(t,{horizontal:!0,className:"px-1",children:[e(t.Item,{children:e("a",{children:"Item 1"})}),e(t.Item,{children:n("details",{children:[e("summary",{children:"Parent"}),n("ul",{className:"p-2",children:[e(t.Item,{children:e("a",{children:"Submenu 1"})}),e(t.Item,{children:e("a",{children:"Submenu 2"})})]})]})}),e(t.Item,{children:e("a",{children:"Item 3"})})]})}),e(s.End,{children:e(a,{tag:"a",children:"Button"})})]});m.args={className:"bg-base-100 mb-48 shadow-xl rounded-box"};const h=r=>n(O,{children:[e(s,{...r,className:"rounded-box bg-neutral text-neutral-content",children:e(a,{tag:"a",className:"text-xl normal-case",color:"ghost",children:"daisyUI"})}),e(s,{...r,className:"rounded-box bg-base-300",children:e(a,{tag:"a",className:"text-xl normal-case",color:"ghost",children:"daisyUI"})}),e(s,{...r,className:"rounded-box bg-primary text-primary-content",children:e(a,{tag:"a",className:"text-xl normal-case",color:"ghost",children:"daisyUI"})})]});h.argTypes={className:{control:!1}};var v,b,I;u.parameters={...u.parameters,docs:{...(v=u.parameters)==null?void 0:v.docs,source:{originalSource:`args => { +import{j as e,a as n,F as O}from"./tw-merge-0a3648bd.js";import{N as s}from"./index-c01ba1f2.js";import{B as a}from"./Button-e9ac0f78.js";import{M as t}from"./index-44e44375.js";import{D as o}from"./index-e4a3bb66.js";import{F as G}from"./index-cdaabc1d.js";import{I as J}from"./index-0ee0d1a2.js";import{I as w}from"./index-202b124b.js";import{B as N}from"./index-ccb0f6f2.js";import{C as x}from"./index-3c968524.js";import"./index-1b03fe98.js";import"./clsx.m-1229b3e0.js";import"./index-a55c3a76.js";const ce={title:"Navigation/Navbar",component:s,args:{className:"bg-base-100 shadow-xl rounded-box"}},u=r=>e(s,{...r,children:e(a,{tag:"a",className:"text-xl normal-case",color:"ghost",children:"daisyUI"})}),g=r=>n(s,{...r,children:[e("div",{className:"flex-1",children:e(a,{tag:"a",className:"text-xl normal-case",color:"ghost",children:"daisyUI"})}),e("div",{className:"flex-none",children:e(a,{tag:"a",shape:"square",color:"ghost",children:e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"inline-block w-5 h-5 stroke-current",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 12h.01M12 12h.01M19 12h.01M6 12a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0z"})})})})]}),p=r=>n(s,{...r,children:[e("div",{className:"flex-none",children:e(a,{shape:"square",color:"ghost",children:e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"inline-block w-5 h-5 stroke-current",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})}),e("div",{className:"flex-1",children:e(a,{tag:"a",color:"ghost",className:"normal-case text-xl",children:"daisyUI"})}),e("div",{className:"flex-none",children:e(a,{shape:"square",color:"ghost",children:e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"inline-block w-5 h-5 stroke-current",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 12h.01M12 12h.01M19 12h.01M6 12a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0z"})})})})]}),l=r=>n(s,{...r,children:[e("div",{className:"flex-1",children:e(a,{tag:"a",color:"ghost",className:"normal-case text-xl",children:"daisyUI"})}),e("div",{className:"flex-none",children:n(t,{horizontal:!0,className:"px-1",children:[e(t.Item,{children:e("a",{children:"Link"})}),e(t.Item,{children:n("details",{children:[e("summary",{children:"Parent"}),n("ul",{className:"p-2 bg-base-100",children:[e("li",{children:e("a",{children:"Link 1"})}),e("li",{children:e("a",{children:"Link 2"})})]})]})})]})})]});l.args={className:"bg-base-100 mb-32 shadow-xl rounded-box"};const c=r=>n(s,{...r,children:[e("div",{className:"flex-1",children:e(a,{tag:"a",className:"text-xl normal-case",color:"ghost",children:"daisyUI"})}),n("div",{className:"flex-none gap-2",children:[e(G,{children:e(J,{bordered:!0,type:"text",placeholder:"Search",className:"w-24 md:w-auto"})}),n(o,{end:!0,children:[e(a,{tag:"label",tabIndex:0,color:"ghost",className:"avatar",shape:"circle",children:e("div",{className:"w-10 rounded-full",children:e("img",{src:"https://daisyui.com/images/stock/photo-1534528741775-53994a69daeb.jpg"})})}),n(o.Menu,{className:"w-52 menu-sm mt-3 z-[1] p-2",children:[e("li",{children:n("a",{className:"justify-between",children:["Profile",e(N,{children:"New"})]})}),e(o.Item,{children:"Settings"}),e(o.Item,{children:"Logout"})]})]})]})]});c.args={className:"bg-base-100 mb-32 shadow-xl round-box"};const d=r=>n(s,{...r,children:[e("div",{className:"flex-1",children:e(a,{tag:"a",className:"text-xl normal-case",color:"ghost",children:"daisyUI"})}),n("div",{className:"flex-none",children:[n(o,{end:!0,children:[e(a,{tag:"label",tabIndex:0,color:"ghost",shape:"circle",children:n(w,{children:[e(N,{size:"sm",className:w.Item.className(),children:"8"}),e("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z"})})]})}),e(o.Menu,{className:"mt-3 z-[1] card card-compact w-52 !p-0",children:n(x.Body,{children:[e("span",{className:"font-bold text-lg",children:"8 Items"}),e("span",{className:"text-info",children:"Subtotal: $999"}),e(x.Actions,{children:e(a,{color:"primary",fullWidth:!0,children:"View cart"})})]})})]}),n(o,{end:!0,children:[e(a,{tag:"label",tabIndex:0,color:"ghost",className:"avatar",shape:"circle",children:e("div",{className:"w-10 rounded-full",children:e("img",{src:"https://daisyui.com/images/stock/photo-1534528741775-53994a69daeb.jpg"})})}),n(o.Menu,{className:"mt-3 z-[1] w-52 menu-sm",children:[e("li",{children:n("a",{className:"justify-between",children:["Profile",e(N,{className:"badge",children:"New"})]})}),e(o.Item,{children:"Settings"}),e(o.Item,{children:"Logout"})]})]})]})]});d.args={className:"bg-base-100 mb-40 shadow-xl rounded-box"};const i=r=>n(s,{...r,children:[e(s.Start,{children:n(o,{children:[e(a,{tag:"label",color:"ghost",shape:"circle",tabIndex:0,children:e("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h7"})})}),n(o.Menu,{className:"menu-sm w-52 mt-3 z-[1]",children:[e(o.Item,{children:"Homepage"}),e(o.Item,{children:"Portfolio"}),e(o.Item,{children:"About"})]})]})}),e(s.Center,{children:e(a,{tag:"a",color:"ghost",className:"normal-case text-xl",children:"daisyUI"})}),n(s.End,{className:"navbar-end",children:[e(a,{color:"ghost",shape:"circle",children:e("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),e(a,{color:"ghost",shape:"circle",children:n(w,{children:[e(N,{size:"xs",color:"primary",className:w.Item.className()}),e("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9"})})]})})]})]});i.args={className:"bg-base-100 mb-40 shadow-xl rounded-box"};const m=r=>n(s,{...r,children:[n(s.Start,{children:[n(o,{children:[e(a,{tag:"label",color:"ghost",tabIndex:0,className:"lg:hidden",children:e("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h8m-8 6h16"})})}),n(o.Menu,{tabIndex:0,className:"w-52 menu-sm mt-3 z-[1]",children:[e(o.Item,{children:"Item 1"}),n("li",{children:[e("a",{children:"Parent"}),n("ul",{className:"p-2",children:[e("li",{children:e("a",{children:"Submenu 1"})}),e("li",{children:e("a",{children:"Submenu 2"})})]})]}),e(o.Item,{children:"Item 3"})]})]}),e("a",{className:"btn btn-ghost normal-case text-xl",children:"daisyUI"})]}),e(s.Center,{className:"hidden lg:flex",children:n(t,{horizontal:!0,className:"px-1",children:[e(t.Item,{children:e("a",{children:"Item 1"})}),e(t.Item,{children:n("details",{children:[e("summary",{children:"Parent"}),n("ul",{className:"p-2",children:[e(t.Item,{children:e("a",{children:"Submenu 1"})}),e(t.Item,{children:e("a",{children:"Submenu 2"})})]})]})}),e(t.Item,{children:e("a",{children:"Item 3"})})]})}),e(s.End,{children:e(a,{tag:"a",children:"Button"})})]});m.args={className:"bg-base-100 mb-48 shadow-xl rounded-box"};const h=r=>n(O,{children:[e(s,{...r,className:"rounded-box bg-neutral text-neutral-content",children:e(a,{tag:"a",className:"text-xl normal-case",color:"ghost",children:"daisyUI"})}),e(s,{...r,className:"rounded-box bg-base-300",children:e(a,{tag:"a",className:"text-xl normal-case",color:"ghost",children:"daisyUI"})}),e(s,{...r,className:"rounded-box bg-primary text-primary-content",children:e(a,{tag:"a",className:"text-xl normal-case",color:"ghost",children:"daisyUI"})})]});h.argTypes={className:{control:!1}};var v,b,I;u.parameters={...u.parameters,docs:{...(v=u.parameters)==null?void 0:v.docs,source:{originalSource:`args => { return