@yuva-devlab/ui 0.2.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -20
- package/dist/index.cjs +4521 -1
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +765 -0
- package/dist/index.d.ts +765 -2
- package/dist/index.js +4116 -1067
- package/dist/index.js.map +1 -0
- package/package.json +53 -32
- package/dist/components/button/button.d.ts +0 -13
- package/dist/components/button/button.d.ts.map +0 -1
- package/dist/components/button/button.styles.css.d.ts +0 -10
- package/dist/components/button/button.styles.css.d.ts.map +0 -1
- package/dist/components/button/button.types.d.ts +0 -15
- package/dist/components/button/button.types.d.ts.map +0 -1
- package/dist/components/button/index.d.ts +0 -3
- package/dist/components/button/index.d.ts.map +0 -1
- package/dist/components/checkbox/checkbox.d.ts +0 -10
- package/dist/components/checkbox/checkbox.d.ts.map +0 -1
- package/dist/components/checkbox/checkbox.styles.css.d.ts +0 -8
- package/dist/components/checkbox/checkbox.styles.css.d.ts.map +0 -1
- package/dist/components/checkbox/checkbox.types.d.ts +0 -22
- package/dist/components/checkbox/checkbox.types.d.ts.map +0 -1
- package/dist/components/checkbox/index.d.ts +0 -3
- package/dist/components/checkbox/index.d.ts.map +0 -1
- package/dist/components/divider/divider.d.ts +0 -18
- package/dist/components/divider/divider.d.ts.map +0 -1
- package/dist/components/divider/divider.styles.css.d.ts +0 -4
- package/dist/components/divider/divider.styles.css.d.ts.map +0 -1
- package/dist/components/divider/index.d.ts +0 -3
- package/dist/components/divider/index.d.ts.map +0 -1
- package/dist/components/form/form.d.ts +0 -13
- package/dist/components/form/form.d.ts.map +0 -1
- package/dist/components/form/form.styles.css.d.ts +0 -6
- package/dist/components/form/form.styles.css.d.ts.map +0 -1
- package/dist/components/form/form.types.d.ts +0 -20
- package/dist/components/form/form.types.d.ts.map +0 -1
- package/dist/components/form/index.d.ts +0 -3
- package/dist/components/form/index.d.ts.map +0 -1
- package/dist/components/image/image.d.ts +0 -10
- package/dist/components/image/image.d.ts.map +0 -1
- package/dist/components/image/image.styles.css.d.ts +0 -3
- package/dist/components/image/image.styles.css.d.ts.map +0 -1
- package/dist/components/image/image.types.d.ts +0 -13
- package/dist/components/image/image.types.d.ts.map +0 -1
- package/dist/components/image/index.d.ts +0 -3
- package/dist/components/image/index.d.ts.map +0 -1
- package/dist/components/index.d.ts +0 -15
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/input/index.d.ts +0 -3
- package/dist/components/input/index.d.ts.map +0 -1
- package/dist/components/input/input.d.ts +0 -15
- package/dist/components/input/input.d.ts.map +0 -1
- package/dist/components/input/input.styles.css.d.ts +0 -5
- package/dist/components/input/input.styles.css.d.ts.map +0 -1
- package/dist/components/input/input.types.d.ts +0 -13
- package/dist/components/input/input.types.d.ts.map +0 -1
- package/dist/components/layout/box/box.d.ts +0 -14
- package/dist/components/layout/box/box.d.ts.map +0 -1
- package/dist/components/layout/box/box.styles.css.d.ts +0 -19
- package/dist/components/layout/box/box.styles.css.d.ts.map +0 -1
- package/dist/components/layout/box/box.types.d.ts +0 -23
- package/dist/components/layout/box/box.types.d.ts.map +0 -1
- package/dist/components/layout/box/index.d.ts +0 -3
- package/dist/components/layout/box/index.d.ts.map +0 -1
- package/dist/components/layout/container/container.d.ts +0 -13
- package/dist/components/layout/container/container.d.ts.map +0 -1
- package/dist/components/layout/container/container.styles.css.d.ts +0 -3
- package/dist/components/layout/container/container.styles.css.d.ts.map +0 -1
- package/dist/components/layout/container/container.types.d.ts +0 -5
- package/dist/components/layout/container/container.types.d.ts.map +0 -1
- package/dist/components/layout/container/index.d.ts +0 -3
- package/dist/components/layout/container/index.d.ts.map +0 -1
- package/dist/components/layout/flex/flex.d.ts +0 -14
- package/dist/components/layout/flex/flex.d.ts.map +0 -1
- package/dist/components/layout/flex/flex.styles.css.d.ts +0 -7
- package/dist/components/layout/flex/flex.styles.css.d.ts.map +0 -1
- package/dist/components/layout/flex/flex.types.d.ts +0 -9
- package/dist/components/layout/flex/flex.types.d.ts.map +0 -1
- package/dist/components/layout/flex/index.d.ts +0 -3
- package/dist/components/layout/flex/index.d.ts.map +0 -1
- package/dist/components/layout/grid/grid.d.ts +0 -15
- package/dist/components/layout/grid/grid.d.ts.map +0 -1
- package/dist/components/layout/grid/grid.styles.css.d.ts +0 -8
- package/dist/components/layout/grid/grid.styles.css.d.ts.map +0 -1
- package/dist/components/layout/grid/grid.types.d.ts +0 -10
- package/dist/components/layout/grid/grid.types.d.ts.map +0 -1
- package/dist/components/layout/grid/index.d.ts +0 -3
- package/dist/components/layout/grid/index.d.ts.map +0 -1
- package/dist/components/layout/index.d.ts +0 -7
- package/dist/components/layout/index.d.ts.map +0 -1
- package/dist/components/layout/semantic.d.ts +0 -10
- package/dist/components/layout/semantic.d.ts.map +0 -1
- package/dist/components/layout/stack/index.d.ts +0 -2
- package/dist/components/layout/stack/index.d.ts.map +0 -1
- package/dist/components/layout/stack/stack.d.ts +0 -17
- package/dist/components/layout/stack/stack.d.ts.map +0 -1
- package/dist/components/number-input/index.d.ts +0 -3
- package/dist/components/number-input/index.d.ts.map +0 -1
- package/dist/components/number-input/number-input.d.ts +0 -10
- package/dist/components/number-input/number-input.d.ts.map +0 -1
- package/dist/components/number-input/number-input.styles.css.d.ts +0 -13
- package/dist/components/number-input/number-input.styles.css.d.ts.map +0 -1
- package/dist/components/number-input/number-input.types.d.ts +0 -31
- package/dist/components/number-input/number-input.types.d.ts.map +0 -1
- package/dist/components/radio/index.d.ts +0 -3
- package/dist/components/radio/index.d.ts.map +0 -1
- package/dist/components/radio/radio.d.ts +0 -16
- package/dist/components/radio/radio.d.ts.map +0 -1
- package/dist/components/radio/radio.styles.css.d.ts +0 -15
- package/dist/components/radio/radio.styles.css.d.ts.map +0 -1
- package/dist/components/radio/radio.types.d.ts +0 -38
- package/dist/components/radio/radio.types.d.ts.map +0 -1
- package/dist/components/select/index.d.ts +0 -3
- package/dist/components/select/index.d.ts.map +0 -1
- package/dist/components/select/select.d.ts +0 -17
- package/dist/components/select/select.d.ts.map +0 -1
- package/dist/components/select/select.styles.css.d.ts +0 -16
- package/dist/components/select/select.styles.css.d.ts.map +0 -1
- package/dist/components/select/select.types.d.ts +0 -43
- package/dist/components/select/select.types.d.ts.map +0 -1
- package/dist/components/slider/index.d.ts +0 -3
- package/dist/components/slider/index.d.ts.map +0 -1
- package/dist/components/slider/slider.d.ts +0 -10
- package/dist/components/slider/slider.d.ts.map +0 -1
- package/dist/components/slider/slider.styles.css.d.ts +0 -12
- package/dist/components/slider/slider.styles.css.d.ts.map +0 -1
- package/dist/components/slider/slider.types.d.ts +0 -34
- package/dist/components/slider/slider.types.d.ts.map +0 -1
- package/dist/components/switch/index.d.ts +0 -3
- package/dist/components/switch/index.d.ts.map +0 -1
- package/dist/components/switch/switch.d.ts +0 -10
- package/dist/components/switch/switch.d.ts.map +0 -1
- package/dist/components/switch/switch.styles.css.d.ts +0 -11
- package/dist/components/switch/switch.styles.css.d.ts.map +0 -1
- package/dist/components/switch/switch.types.d.ts +0 -27
- package/dist/components/switch/switch.types.d.ts.map +0 -1
- package/dist/components/textarea/index.d.ts +0 -3
- package/dist/components/textarea/index.d.ts.map +0 -1
- package/dist/components/textarea/textarea.d.ts +0 -10
- package/dist/components/textarea/textarea.d.ts.map +0 -1
- package/dist/components/textarea/textarea.styles.css.d.ts +0 -13
- package/dist/components/textarea/textarea.styles.css.d.ts.map +0 -1
- package/dist/components/textarea/textarea.types.d.ts +0 -34
- package/dist/components/textarea/textarea.types.d.ts.map +0 -1
- package/dist/components/typography/index.d.ts +0 -2
- package/dist/components/typography/index.d.ts.map +0 -1
- package/dist/components/typography/typography.css.d.ts +0 -4
- package/dist/components/typography/typography.css.d.ts.map +0 -1
- package/dist/components/typography/typography.d.ts +0 -13
- package/dist/components/typography/typography.d.ts.map +0 -1
- package/dist/components/typography/typography.types.d.ts +0 -8
- package/dist/components/typography/typography.types.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/ui.css +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1 +1,4521 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),o=require("@yuva-devlab/primitives"),u=require("clsx"),t=require("react");var dr="vvjlfg0",or={xs:"vvjlfg1",sm:"vvjlfg2",md:"vvjlfg3",lg:"vvjlfg4",xl:"vvjlfg5"},vr={round:"vvjlfg6",square:"vvjlfg7"},xr={round:"vvjlfg8",square:"vvjlfg9"},pr={narrow:"vvjlfga",default:"vvjlfgb",wide:"vvjlfgc"},ur={default:"vvjlfgd",primary:"vvjlfge",ghost:"vvjlfgf",link:"vvjlfgg",elevated:"vvjlfgh",filled:"vvjlfgi",tonal:"vvjlfgj",outlined:"vvjlfgk",text:"vvjlfgl",secondary:"vvjlfgm",tertiary:"vvjlfgn"},mr="vvjlfgo",gr="vvjlfgp",hr="vvjlfgq";const G=t.forwardRef(({variant:e="default",size:a="md",shape:i="round",width:l="default",danger:c=!1,block:s=!1,morph:d=!1,className:p,disabled:x,loading:n,...m},g)=>r.jsx(o.ButtonPrimitive,{ref:g,loading:n,disabled:x,"aria-busy":n,className:u(dr,or[a],vr[i],pr[l],ur[e],d&&xr[i],c&&mr,s&&gr,(x||n)&&hr,p),...m}));G.displayName="Button";var jr="xwmau40",fr={h1:"xwmau41",h2:"xwmau42",h3:"xwmau43",h4:"xwmau44",h5:"xwmau45",h6:"xwmau46",body:"xwmau47",caption:"xwmau48",captionError:"xwmau49",label:"xwmau4a"},_r={normal:"xwmau4b",medium:"xwmau4c",bold:"xwmau4d"};const wr={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",body:"p",caption:"span",captionError:"span",label:"label"},v=t.forwardRef(({variant:e="body",weight:a,className:i,asChild:l,...c},s)=>{const d=wr[e];return r.jsx(o.TypographyPrimitive,{ref:s,asChild:l,...!l&&{as:d},className:u(jr,fr[e],a&&_r[a],i),...c})});v.displayName="Typography";var yr="_1x582hy0",br={outline:"_1x582hy1",filled:"_1x582hy2"},Nr={xs:"_1x582hy3",sm:"_1x582hy4",md:"_1x582hy5",lg:"_1x582hy6",xl:"_1x582hy7"},zr="_1x582hy8";const kr={style:{marginBottom:"8px"}},q=t.forwardRef(({variant:e="outline",size:a="md",error:i=!1,label:l,labelProps:c,helperText:s,errorMessage:d,className:p,id:x,...n},m)=>{const g=t.useId(),h=x||g,j=`${h}-helper-text`,f=`${h}-error-message`,_=u(n["aria-describedby"],s&&j,d&&f),N=r.jsx(o.InputPrimitive,{ref:m,id:h,"aria-invalid":i||!!d,"aria-describedby":_||void 0,autoComplete:"on",className:u(yr,br[e],Nr[a],(i||!!d)&&zr,p),...n});return!l&&!s&&!d?N:r.jsxs("div",{style:{display:"flex",flexDirection:"column",width:"100%"},children:[l&&r.jsx(v,{variant:"label",htmlFor:h,...kr,...c,children:l}),N,d&&r.jsx(v,{variant:"captionError",id:f,children:d}),!d&&s&&r.jsx(v,{variant:"caption",id:j,children:s})]})});q.displayName="Input";var Cr="i1r0p60",Rr={"2xs":"i1r0p61",xs:"i1r0p62",sm:"i1r0p63",md:"i1r0p64",lg:"i1r0p65",xl:"i1r0p66","2xl":"i1r0p67","3xl":"i1r0p68","4xl":"i1r0p69","5xl":"i1r0p6a"},Sr={"2xs":"i1r0p6b",xs:"i1r0p6c",sm:"i1r0p6d",md:"i1r0p6e",lg:"i1r0p6f",xl:"i1r0p6g","2xl":"i1r0p6h","3xl":"i1r0p6i","4xl":"i1r0p6j","5xl":"i1r0p6k"},Ir={"2xs":"i1r0p6l",xs:"i1r0p6m",sm:"i1r0p6n",md:"i1r0p6o",lg:"i1r0p6p",xl:"i1r0p6q","2xl":"i1r0p6r","3xl":"i1r0p6s","4xl":"i1r0p6t","5xl":"i1r0p6u"},Lr={"2xs":"i1r0p6v",xs:"i1r0p6w",sm:"i1r0p6x",md:"i1r0p6y",lg:"i1r0p6z",xl:"i1r0p610","2xl":"i1r0p611","3xl":"i1r0p612","4xl":"i1r0p613","5xl":"i1r0p614"},$r={"2xs":"i1r0p615",xs:"i1r0p616",sm:"i1r0p617",md:"i1r0p618",lg:"i1r0p619",xl:"i1r0p61a","2xl":"i1r0p61b","3xl":"i1r0p61c","4xl":"i1r0p61d","5xl":"i1r0p61e"},Tr={"2xs":"i1r0p61f",xs:"i1r0p61g",sm:"i1r0p61h",md:"i1r0p61i",lg:"i1r0p61j",xl:"i1r0p61k","2xl":"i1r0p61l","3xl":"i1r0p61m","4xl":"i1r0p61n","5xl":"i1r0p61o"},Br={"2xs":"i1r0p61p",xs:"i1r0p61q",sm:"i1r0p61r",md:"i1r0p61s",lg:"i1r0p61t",xl:"i1r0p61u","2xl":"i1r0p61v","3xl":"i1r0p61w","4xl":"i1r0p61x","5xl":"i1r0p61y"},Er={"2xs":"i1r0p61z",xs:"i1r0p620",sm:"i1r0p621",md:"i1r0p622",lg:"i1r0p623",xl:"i1r0p624","2xl":"i1r0p625","3xl":"i1r0p626","4xl":"i1r0p627","5xl":"i1r0p628"},Fr={"2xs":"i1r0p629",xs:"i1r0p62a",sm:"i1r0p62b",md:"i1r0p62c",lg:"i1r0p62d",xl:"i1r0p62e","2xl":"i1r0p62f","3xl":"i1r0p62g","4xl":"i1r0p62h","5xl":"i1r0p62i"},Gr={"2xs":"i1r0p62j",xs:"i1r0p62k",sm:"i1r0p62l",md:"i1r0p62m",lg:"i1r0p62n",xl:"i1r0p62o","2xl":"i1r0p62p","3xl":"i1r0p62q","4xl":"i1r0p62r","5xl":"i1r0p62s"},qr={"2xs":"i1r0p62t",xs:"i1r0p62u",sm:"i1r0p62v",md:"i1r0p62w",lg:"i1r0p62x",xl:"i1r0p62y","2xl":"i1r0p62z","3xl":"i1r0p630","4xl":"i1r0p631","5xl":"i1r0p632"},Pr={"2xs":"i1r0p633",xs:"i1r0p634",sm:"i1r0p635",md:"i1r0p636",lg:"i1r0p637",xl:"i1r0p638","2xl":"i1r0p639","3xl":"i1r0p63a","4xl":"i1r0p63b","5xl":"i1r0p63c"},Dr={"2xs":"i1r0p63d",xs:"i1r0p63e",sm:"i1r0p63f",md:"i1r0p63g",lg:"i1r0p63h",xl:"i1r0p63i","2xl":"i1r0p63j","3xl":"i1r0p63k","4xl":"i1r0p63l","5xl":"i1r0p63m"},Mr={"2xs":"i1r0p63n",xs:"i1r0p63o",sm:"i1r0p63p",md:"i1r0p63q",lg:"i1r0p63r",xl:"i1r0p63s","2xl":"i1r0p63t","3xl":"i1r0p63u","4xl":"i1r0p63v","5xl":"i1r0p63w"},Vr={block:"i1r0p63x",flex:"i1r0p63y",grid:"i1r0p63z",inline:"i1r0p640",inlineBlock:"i1r0p641",inlineFlex:"i1r0p642",inlineGrid:"i1r0p643",none:"i1r0p644"},Hr={static:"i1r0p645",relative:"i1r0p646",absolute:"i1r0p647",fixed:"i1r0p648",sticky:"i1r0p649"},Zr={visible:"i1r0p64a",hidden:"i1r0p64b",scroll:"i1r0p64c",auto:"i1r0p64d"};const w=t.forwardRef(({p:e,px:a,py:i,pt:l,pr:c,pb:s,pl:d,m:p,mx:x,my:n,mt:m,mr:g,mb:h,ml:j,display:f,position:_,overflow:N,className:C,...k},z)=>r.jsx(o.BoxPrimitive,{ref:z,className:u(Cr,e&&Rr[e],a&&Sr[a],i&&Ir[i],l&&Lr[l],c&&$r[c],s&&Tr[s],d&&Br[d],p&&Er[p],x&&Fr[x],n&&Gr[n],m&&qr[m],g&&Pr[g],h&&Dr[h],j&&Mr[j],f&&Vr[f],_&&Hr[_],N&&Zr[N],C),...k}));w.displayName="Box";var Ar="_11sjf7u0",Or={row:"_11sjf7u1",column:"_11sjf7u2",rowReverse:"_11sjf7u3",columnReverse:"_11sjf7u4"},Wr={start:"_11sjf7u5",center:"_11sjf7u6",end:"_11sjf7u7",baseline:"_11sjf7u8",stretch:"_11sjf7u9"},Xr={start:"_11sjf7ua",center:"_11sjf7ub",end:"_11sjf7uc",between:"_11sjf7ud",around:"_11sjf7ue",evenly:"_11sjf7uf"},Yr={nowrap:"_11sjf7ug",wrap:"_11sjf7uh",wrapReverse:"_11sjf7ui"},Ur={"2xs":"_11sjf7uj",xs:"_11sjf7uk",sm:"_11sjf7ul",md:"_11sjf7um",lg:"_11sjf7un",xl:"_11sjf7uo","2xl":"_11sjf7up","3xl":"_11sjf7uq","4xl":"_11sjf7ur","5xl":"_11sjf7us"};const $=t.forwardRef(({direction:e,align:a,justify:i,wrap:l,gap:c,className:s,...d},p)=>r.jsx(w,{ref:p,display:"flex",className:u(Ar,e&&Or[e],a&&Wr[a],i&&Xr[i],l&&Yr[l],c&&Ur[c],s),...d}));$.displayName="Flex";var Jr="_1cg9azy0",Kr={1:"_1cg9azy1",2:"_1cg9azy2",3:"_1cg9azy3",4:"_1cg9azy4",5:"_1cg9azy5",6:"_1cg9azy6",12:"_1cg9azy7"},Qr={"2xs":"_1cg9azy8",xs:"_1cg9azy9",sm:"_1cg9azya",md:"_1cg9azyb",lg:"_1cg9azyc",xl:"_1cg9azyd","2xl":"_1cg9azye","3xl":"_1cg9azyf","4xl":"_1cg9azyg","5xl":"_1cg9azyh"},ra={"2xs":"_1cg9azyi",xs:"_1cg9azyj",sm:"_1cg9azyk",md:"_1cg9azyl",lg:"_1cg9azym",xl:"_1cg9azyn","2xl":"_1cg9azyo","3xl":"_1cg9azyp","4xl":"_1cg9azyq","5xl":"_1cg9azyr"},aa={"2xs":"_1cg9azys",xs:"_1cg9azyt",sm:"_1cg9azyu",md:"_1cg9azyv",lg:"_1cg9azyw",xl:"_1cg9azyx","2xl":"_1cg9azyy","3xl":"_1cg9azyz","4xl":"_1cg9azy10","5xl":"_1cg9azy11"},ea={start:"_1cg9azy12",center:"_1cg9azy13",end:"_1cg9azy14",stretch:"_1cg9azy15"},la={start:"_1cg9azy16",center:"_1cg9azy17",end:"_1cg9azy18",stretch:"_1cg9azy19"};const P=t.forwardRef(({columns:e,gap:a,columnGap:i,rowGap:l,align:c,justify:s,className:d,...p},x)=>r.jsx(w,{ref:x,display:"grid",className:u(Jr,e&&Kr[e],a&&Qr[a],i&&ra[i],l&&aa[l],c&&ea[c],s&&la[s],d),...p}));P.displayName="Grid";var ia="oflweu0",sa={sm:"oflweu1",md:"oflweu2",lg:"oflweu3",xl:"oflweu4",full:"oflweu5"};const D=t.forwardRef(({size:e="lg",className:a,...i},l)=>r.jsx(w,{ref:l,className:u(ia,e&&sa[e],a),...i}));D.displayName="Container";const M=t.forwardRef(({direction:e="vertical",...a},i)=>r.jsx($,{ref:i,direction:e==="vertical"?"column":"row",...a}));M.displayName="Stack";const V=t.forwardRef((e,a)=>r.jsx(w,{ref:a,as:"header",...e}));V.displayName="Header";const H=t.forwardRef((e,a)=>r.jsx(w,{ref:a,as:"footer",...e}));H.displayName="Footer";const Z=t.forwardRef((e,a)=>r.jsx(w,{ref:a,as:"main",...e}));Z.displayName="Main";const A=t.forwardRef((e,a)=>r.jsx(w,{ref:a,as:"section",...e}));A.displayName="Section";const O=t.forwardRef((e,a)=>r.jsx(w,{ref:a,as:"article",...e}));O.displayName="Article";const W=t.forwardRef((e,a)=>r.jsx(w,{ref:a,as:"aside",...e}));W.displayName="Aside";const X=t.forwardRef((e,a)=>r.jsx(w,{ref:a,as:"nav",...e}));X.displayName="Nav";var ta="_7csfu90",na="_7csfu91",ca={sm:"_7csfu92",md:"_7csfu93",lg:"_7csfu94"},da="_7csfu95",oa="_7csfu96",va="_7csfu97",xa="_7csfu98";const Y=t.forwardRef(({size:e="md",label:a,helperText:i,error:l,className:c,id:s,...d},p)=>{const x=t.useId(),n=s||x;return r.jsxs("div",{className:ta,children:[r.jsx(o.CheckboxRoot,{ref:p,id:n,className:u(na,ca[e],c),...d,children:r.jsx(o.CheckboxIndicator,{className:da,children:r.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})})}),a&&r.jsx(v,{variant:"label",htmlFor:n,className:oa,children:a}),l&&r.jsx(v,{variant:"captionError",className:xa,children:l}),!l&&i&&r.jsx(v,{variant:"caption",className:va,children:i})]})});Y.displayName="Checkbox";var pa="_5k55rz0",ua="_5k55rz2",ma={horizontal:"_5k55rz3",vertical:"_5k55rz4"},ga="_5k55rz5",ha="_5k55rz6",ja="_5k55rz7",fa={sm:"_5k55rz8",md:"_5k55rz9",lg:"_5k55rza"},_a="_5k55rzb",wa={sm:"_5k55rzc",md:"_5k55rzd",lg:"_5k55rze"},ya="_5k55rzf",ba="_5k55rzg",Na="_5k55rzh",za="_5k55rzi";const U=t.forwardRef(({size:e="md",options:a,label:i,error:l,helperText:c,orientation:s="vertical",className:d,...p},x)=>r.jsxs("div",{className:pa,children:[i&&r.jsx(v,{variant:"label",children:i}),r.jsx(o.RadioGroupRoot,{ref:x,className:u(ua,ma[s],d),...p,children:a.map((n,m)=>{const g=`radio-${n.value}-${m}`;return r.jsxs("div",{className:ga,children:[r.jsxs("div",{className:ha,children:[r.jsx(o.RadioGroupItem,{value:n.value,id:g,disabled:n.disabled,className:u(ja,fa[e]),children:r.jsx(o.RadioGroupIndicator,{className:u(_a,wa[e])})}),r.jsx(v,{variant:"label",htmlFor:g,className:ya,children:n.label})]}),n.helperText&&r.jsx(v,{variant:"caption",className:ba,children:n.helperText})]},n.value)})}),l&&r.jsx(v,{variant:"captionError",className:za,children:l}),!l&&c&&r.jsx(v,{variant:"caption",className:Na,children:c})]}));U.displayName="RadioGroup";var ka="_1ucwkrl0",Ca="_1ucwkrl1",Ra={left:"_1ucwkrl2",right:"_1ucwkrl3"},Sa="_1ucwkrl4",Ia={sm:"_1ucwkrl5",md:"_1ucwkrl6",lg:"_1ucwkrl7"},La="_1ucwkrl8",$a={sm:"_1ucwkrl9",md:"_1ucwkrla",lg:"_1ucwkrlb"},Ta="_1ucwkrlc",Ba="_1ucwkrld",Ea="_1ucwkrle";const J=t.forwardRef(({size:e="md",label:a,helperText:i,error:l,labelPosition:c="right",className:s,id:d,...p},x)=>{const n=t.useId(),m=d||n;return r.jsxs("div",{className:ka,children:[r.jsxs("div",{className:u(Ca,Ra[c]),children:[r.jsx(o.SwitchRoot,{ref:x,id:m,className:u(Sa,Ia[e],s),...p,children:r.jsx(o.SwitchThumb,{className:u(La,$a[e])})}),a&&r.jsx(v,{variant:"label",htmlFor:m,className:Ta,children:a})]}),l&&r.jsx(v,{variant:"captionError",className:Ea,children:l}),!l&&i&&r.jsx(v,{variant:"caption",className:Ba,children:i})]})});J.displayName="Switch";var Fa="yxg9zk0",Ga="yxg9zk2",qa="yxg9zk3",Pa={sm:"yxg9zk4",md:"yxg9zk5",lg:"yxg9zk6"},Da="yxg9zk7",Ma="yxg9zk8",Va="yxg9zk9",Ha="yxg9zka",Za="yxg9zkb",Aa="yxg9zkc",Oa="yxg9zkd";const K=t.forwardRef(({size:e="md",label:a,helperText:i,error:l,showCount:c=!1,maxLength:s,autoResize:d=!1,className:p,id:x,value:n,defaultValue:m,onChange:g,...h},j)=>{const f=t.useId(),_=x||f,N=t.useRef(null),[C,k]=t.useState(0);t.useImperativeHandle(j,()=>N.current);const z=t.useCallback(()=>{const y=N.current;y&&d&&(y.style.height="auto",y.style.height=`${y.scrollHeight}px`)},[d]),S=t.useCallback(y=>{k(y.target.value.length),z(),g?.(y)},[g,z]);t.useEffect(()=>{k((n||m||"").length),z()},[n,m,z]);const I=s?C>s:!1;return r.jsxs("div",{className:Fa,children:[a&&r.jsx(v,{variant:"label",htmlFor:_,style:{marginBottom:"8px"},children:a}),r.jsx("div",{className:Ga,children:r.jsx(o.TextareaPrimitive,{ref:N,id:_,value:n,defaultValue:m,onChange:S,maxLength:s,className:u(qa,Pa[e],l&&Da,d&&Ma,p),...h})}),r.jsxs("div",{className:Va,children:[l&&r.jsx(v,{variant:"captionError",className:Za,children:l}),!l&&i&&r.jsx(v,{variant:"caption",className:Ha,children:i}),c&&s&&r.jsxs("span",{className:u(Aa,I&&Oa),children:[C,"/",s]})]})]})});K.displayName="Textarea";var Wa="_5o5nu0",Xa="_5o5nu2",Ya={sm:"_5o5nu3",md:"_5o5nu4",lg:"_5o5nu5"},Ua="_5o5nu6",Ja="_5o5nu7",Ka="_5o5nu8",Qa="_5o5nu9",T="_5o5nua",B="_5o5nub",re="_5o5nuc",ae="_5o5nud",E="_5o5nue",ee="_5o5nuf",le="_5o5nug";const Q=t.forwardRef(({size:e="md",label:a,placeholder:i="Select...",helperText:l,error:c,options:s,className:d,...p},x)=>{const n=t.useId(),m=s.length>0&&"options"in s[0],g=()=>m?s.map((h,j)=>r.jsxs(t.Fragment,{children:[r.jsxs(o.SelectGroup,{children:[r.jsx(o.SelectLabel,{className:re,children:r.jsx(v,{variant:"label",children:h.label})}),h.options.map(f=>r.jsxs(o.SelectItem,{value:f.value,disabled:f.disabled,className:T,children:[r.jsx(o.SelectItemText,{children:r.jsx(v,{variant:"body",children:f.label})}),r.jsx(o.SelectItemIndicator,{className:B,children:r.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})})]},f.value))]}),j<s.length-1&&r.jsx(o.SelectSeparator,{className:ae})]},h.label)):s.map(h=>r.jsxs(o.SelectItem,{value:h.value,disabled:h.disabled,className:T,children:[r.jsx(o.SelectItemText,{children:r.jsx(v,{variant:"body",children:h.label})}),r.jsx(o.SelectItemIndicator,{className:B,children:r.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})})]},h.value));return r.jsxs("div",{className:Wa,children:[a&&r.jsx(v,{variant:"label",htmlFor:n,style:{marginBottom:"8px"},children:a}),r.jsxs(o.SelectRoot,{...p,children:[r.jsxs(o.SelectTrigger,{ref:x,id:n,className:u(Xa,Ya[e],c&&Ua,d),children:[r.jsx(o.SelectValue,{placeholder:i}),r.jsx(o.SelectIcon,{className:Ja,children:r.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"M4.18179 6.18181C4.35753 6.00608 4.64245 6.00608 4.81819 6.18181L7.49999 8.86362L10.1818 6.18181C10.3575 6.00608 10.6424 6.00608 10.8182 6.18181C10.9939 6.35755 10.9939 6.64247 10.8182 6.81821L7.81819 9.81821C7.73379 9.9026 7.61934 9.95001 7.49999 9.95001C7.38064 9.95001 7.26618 9.9026 7.18179 9.81821L4.18179 6.81821C4.00605 6.64247 4.00605 6.35755 4.18179 6.18181Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})})]}),r.jsx(o.SelectPortal,{children:r.jsxs(o.SelectContent,{className:Ka,position:"item-aligned",sideOffset:4,children:[r.jsx(o.SelectScrollUpButton,{className:E,children:r.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"M7.14645 2.14645C7.34171 1.95118 7.65829 1.95118 7.85355 2.14645L11.8536 6.14645C12.0488 6.34171 12.0488 6.65829 11.8536 6.85355C11.6583 7.04882 11.3417 7.04882 11.1464 6.85355L7.5 3.20711L3.85355 6.85355C3.65829 7.04882 3.34171 7.04882 3.14645 6.85355C2.95118 6.65829 2.95118 6.34171 3.14645 6.14645L7.14645 2.14645Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}),r.jsx(o.SelectViewport,{className:Qa,children:g()}),r.jsx(o.SelectScrollDownButton,{className:E,children:r.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"M7.14645 12.8536C7.34171 13.0488 7.65829 13.0488 7.85355 12.8536L11.8536 8.85355C12.0488 8.65829 12.0488 8.34171 11.8536 8.14645C11.6583 7.95118 11.3417 7.95118 11.1464 8.14645L7.5 11.7929L3.85355 8.14645C3.65829 7.95118 3.34171 7.95118 3.14645 8.14645C2.95118 8.34171 2.95118 8.65829 3.14645 8.85355L7.14645 12.8536Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})})]})})]}),c&&r.jsx(v,{variant:"captionError",className:le,children:c}),!c&&l&&r.jsx(v,{variant:"caption",className:ee,children:l})]})});Q.displayName="Select";var ie="_8hggbs0",se="_8hggbs1",te="_8hggbs2",ne="_8hggbs3",ce="_8hggbs4",de="_8hggbs5",oe="_8hggbs6",ve="_8hggbs7",xe={sm:"_8hggbs8",md:"_8hggbs9",lg:"_8hggbsa"},pe="_8hggbsb",ue="_8hggbsc";const rr=t.forwardRef(({size:e="md",label:a,helperText:i,error:l,showValue:c=!1,formatValue:s=g=>g.toString(),className:d,value:p,defaultValue:x,...n},m)=>{const[g,h]=t.useState(p||x||[0]),j=p||g,f=t.useCallback(_=>{h(_),n.onValueChange?.(_)},[n]);return r.jsxs("div",{className:ie,children:[(a||c)&&r.jsxs("div",{className:se,children:[a&&r.jsx(v,{variant:"label",className:te,children:a}),c&&r.jsx(v,{variant:"label",className:ne,children:j.length===1?s(j[0]):`${s(j[0])} - ${s(j[1])}`})]}),r.jsxs(o.SliderRoot,{ref:m,value:p,defaultValue:x,onValueChange:f,className:u(ce,d),...n,children:[r.jsx(o.SliderTrack,{className:de,children:r.jsx(o.SliderRange,{className:oe})}),j.map(_=>r.jsx(o.SliderThumb,{className:u(ve,xe[e])},`thumb-${_}`))]}),l&&r.jsx(v,{variant:"captionError",className:ue,children:l}),!l&&i&&r.jsx(v,{variant:"caption",className:pe,children:i})]})});rr.displayName="Slider";var me="_1j7jycv0",ge="_1j7jycv2",he="_1j7jycv3",je={sm:"_1j7jycv4",md:"_1j7jycv5",lg:"_1j7jycv6"},fe="_1j7jycv7",_e="_1j7jycv8",we="_1j7jycv9",F="_1j7jycva",ye="_1j7jycvb",be="_1j7jycvc",Ne="_1j7jycvd";const ar=t.forwardRef(({size:e="md",label:a,helperText:i,error:l,showControls:c=!0,className:s,wrapperClassName:d,id:p,min:x,max:n,step:m=1,value:g,defaultValue:h,onChange:j,disabled:f,..._},N)=>{const C=t.useId(),k=p||C,z=t.useRef(null);t.useImperativeHandle(N,()=>z.current);const S=()=>{const b=z.current;if(!b)return;const R=(parseFloat(b.value)||0)+m;if(n!==void 0&&R>n)return;b.value=R.toString();const L=new Event("input",{bubbles:!0});b.dispatchEvent(L),j&&j({target:b,currentTarget:b})},I=()=>{const b=z.current;if(!b)return;const R=(parseFloat(b.value)||0)-m;if(x!==void 0&&R<x)return;b.value=R.toString();const L=new Event("input",{bubbles:!0});b.dispatchEvent(L),j&&j({target:b,currentTarget:b})},y=g!==void 0?parseFloat(g.toString()):void 0,sr=f||n!==void 0&&y!==void 0&&y>=n,tr=f||x!==void 0&&y!==void 0&&y<=x;return r.jsxs(w,{className:u(me,d),children:[a&&r.jsx(v,{variant:"label",htmlFor:k,style:{marginBottom:"8px"},children:a}),r.jsxs(w,{className:ge,children:[r.jsx(o.NumberInputPrimitive,{ref:z,id:k,min:x,max:n,step:m,value:g,defaultValue:h,onChange:j,disabled:f,className:u(he,je[e],c&&fe,l&&_e,s),..._}),c&&r.jsxs("div",{className:we,children:[r.jsx("button",{type:"button",onClick:S,disabled:sr,className:u(F,ye),"aria-label":"Increment",tabIndex:-1,children:r.jsx("svg",{width:"12",height:"12",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"M7.14645 2.14645C7.34171 1.95118 7.65829 1.95118 7.85355 2.14645L11.8536 6.14645C12.0488 6.34171 12.0488 6.65829 11.8536 6.85355C11.6583 7.04882 11.3417 7.04882 11.1464 6.85355L7.5 3.20711L3.85355 6.85355C3.65829 7.04882 3.34171 7.04882 3.14645 6.85355C2.95118 6.65829 2.95118 6.34171 3.14645 6.14645L7.14645 2.14645Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}),r.jsx("button",{type:"button",onClick:I,disabled:tr,className:F,"aria-label":"Decrement",tabIndex:-1,children:r.jsx("svg",{width:"12",height:"12",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"M7.14645 12.8536C7.34171 13.0488 7.65829 13.0488 7.85355 12.8536L11.8536 8.85355C12.0488 8.65829 12.0488 8.34171 11.8536 8.14645C11.6583 7.95118 11.3417 7.95118 11.1464 8.14645L7.5 11.7929L3.85355 8.14645C3.65829 7.95118 3.34171 7.95118 3.14645 8.14645C2.95118 8.34171 2.95118 8.65829 3.14645 8.85355L7.14645 12.8536Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})})]})]}),l&&r.jsx(v,{variant:"captionError",className:Ne,children:l}),!l&&i&&r.jsx(v,{variant:"caption",className:be,children:i})]})});ar.displayName="NumberInput";var ze="z8au880",ke="z8au881",Ce="z8au882",Re="z8au883",Se="z8au884";const er=t.forwardRef(({loading:e=!1,error:a,success:i,className:l,wrapperClassName:c,children:s,onSubmit:d,...p},x)=>{const n=t.useCallback(m=>{if(e){m.preventDefault();return}d?.(m)},[e,d]);return r.jsxs("div",{className:u(ze,c),children:[a&&r.jsx("div",{className:Re,children:a}),i&&r.jsx("div",{className:Se,children:i}),r.jsx(o.FormPrimitive,{ref:x,onSubmit:n,className:u(ke,e&&Ce,l),...p,children:s})]})});er.displayName="Form";var Ie="is2j7v0",Le="is2j7v1";const lr=t.forwardRef(({objectFit:e="cover",rounded:a=!1,className:i,style:l,...c},s)=>r.jsx(o.ImagePrimitive,{ref:s,className:u(Ie,a&&Le,i),style:{objectFit:e,...l},...c}));lr.displayName="Image";var $e="a0k4w80",Te={horizontal:"a0k4w81",vertical:"a0k4w82"},Be={solid:"a0k4w83",dashed:"a0k4w84"};const ir=t.forwardRef(({orientation:e="horizontal",variant:a="solid",className:i,...l},c)=>r.jsx("div",{ref:c,"data-orientation":e,role:"separator",className:u($e,Te[e],a!=="solid"&&Be[a],i),...l}));ir.displayName="Divider";exports.Article=O;exports.Aside=W;exports.Box=w;exports.Button=G;exports.Checkbox=Y;exports.Container=D;exports.Divider=ir;exports.Flex=$;exports.Footer=H;exports.Form=er;exports.Grid=P;exports.Header=V;exports.Image=lr;exports.Input=q;exports.Main=Z;exports.Nav=X;exports.NumberInput=ar;exports.RadioGroup=U;exports.Section=A;exports.Select=Q;exports.Slider=rr;exports.Stack=M;exports.Switch=J;exports.Textarea=K;exports.Typography=v;
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from))
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
|
|
31
|
+
// src/index.ts
|
|
32
|
+
var index_exports = {};
|
|
33
|
+
__export(index_exports, {
|
|
34
|
+
Accordion: () => Accordion,
|
|
35
|
+
AccordionContent: () => AccordionContent,
|
|
36
|
+
AccordionItem: () => AccordionItem,
|
|
37
|
+
AccordionTrigger: () => AccordionTrigger,
|
|
38
|
+
Alert: () => Alert,
|
|
39
|
+
AlertDescription: () => AlertDescription,
|
|
40
|
+
AlertDialog: () => AlertDialog,
|
|
41
|
+
AlertDialogAction: () => AlertDialogAction,
|
|
42
|
+
AlertDialogCancel: () => AlertDialogCancel,
|
|
43
|
+
AlertDialogContent: () => AlertDialogContent,
|
|
44
|
+
AlertDialogDescription: () => AlertDialogDescription,
|
|
45
|
+
AlertDialogFooter: () => AlertDialogFooter,
|
|
46
|
+
AlertDialogHeader: () => AlertDialogHeader,
|
|
47
|
+
AlertDialogOverlay: () => AlertDialogOverlay,
|
|
48
|
+
AlertDialogPortal: () => AlertDialogPortal,
|
|
49
|
+
AlertDialogTitle: () => AlertDialogTitle,
|
|
50
|
+
AlertDialogTrigger: () => AlertDialogTrigger,
|
|
51
|
+
AlertTitle: () => AlertTitle,
|
|
52
|
+
AspectRatio: () => AspectRatio,
|
|
53
|
+
Avatar: () => Avatar,
|
|
54
|
+
AvatarFallback: () => AvatarFallback,
|
|
55
|
+
AvatarImage: () => AvatarImage,
|
|
56
|
+
Badge: () => Badge,
|
|
57
|
+
Breadcrumb: () => Breadcrumb,
|
|
58
|
+
BreadcrumbEllipsis: () => BreadcrumbEllipsis,
|
|
59
|
+
BreadcrumbItem: () => BreadcrumbItem,
|
|
60
|
+
BreadcrumbLink: () => BreadcrumbLink,
|
|
61
|
+
BreadcrumbList: () => BreadcrumbList,
|
|
62
|
+
BreadcrumbPage: () => BreadcrumbPage,
|
|
63
|
+
BreadcrumbSeparator: () => BreadcrumbSeparator,
|
|
64
|
+
Button: () => Button,
|
|
65
|
+
Calendar: () => Calendar,
|
|
66
|
+
CalendarDayButton: () => CalendarDayButton,
|
|
67
|
+
Card: () => Card,
|
|
68
|
+
CardContent: () => CardContent,
|
|
69
|
+
CardDescription: () => CardDescription,
|
|
70
|
+
CardFooter: () => CardFooter,
|
|
71
|
+
CardHeader: () => CardHeader,
|
|
72
|
+
CardTitle: () => CardTitle,
|
|
73
|
+
Carousel: () => Carousel,
|
|
74
|
+
CarouselContent: () => CarouselContent,
|
|
75
|
+
CarouselItem: () => CarouselItem,
|
|
76
|
+
CarouselNext: () => CarouselNext,
|
|
77
|
+
CarouselPrevious: () => CarouselPrevious,
|
|
78
|
+
ChartContainer: () => ChartContainer,
|
|
79
|
+
ChartLegend: () => ChartLegend,
|
|
80
|
+
ChartLegendContent: () => ChartLegendContent,
|
|
81
|
+
ChartStyle: () => ChartStyle,
|
|
82
|
+
ChartTooltip: () => ChartTooltip,
|
|
83
|
+
ChartTooltipContent: () => ChartTooltipContent,
|
|
84
|
+
Checkbox: () => Checkbox,
|
|
85
|
+
Collapsible: () => Collapsible,
|
|
86
|
+
CollapsibleContent: () => CollapsibleContent2,
|
|
87
|
+
CollapsibleTrigger: () => CollapsibleTrigger2,
|
|
88
|
+
Command: () => Command,
|
|
89
|
+
CommandDialog: () => CommandDialog,
|
|
90
|
+
CommandEmpty: () => CommandEmpty,
|
|
91
|
+
CommandGroup: () => CommandGroup,
|
|
92
|
+
CommandInput: () => CommandInput,
|
|
93
|
+
CommandItem: () => CommandItem,
|
|
94
|
+
CommandList: () => CommandList,
|
|
95
|
+
CommandSeparator: () => CommandSeparator,
|
|
96
|
+
CommandShortcut: () => CommandShortcut,
|
|
97
|
+
ConfirmDialog: () => ConfirmDialog,
|
|
98
|
+
ContextMenu: () => ContextMenu,
|
|
99
|
+
ContextMenuCheckboxItem: () => ContextMenuCheckboxItem,
|
|
100
|
+
ContextMenuContent: () => ContextMenuContent,
|
|
101
|
+
ContextMenuGroup: () => ContextMenuGroup,
|
|
102
|
+
ContextMenuItem: () => ContextMenuItem,
|
|
103
|
+
ContextMenuLabel: () => ContextMenuLabel,
|
|
104
|
+
ContextMenuPortal: () => ContextMenuPortal,
|
|
105
|
+
ContextMenuRadioGroup: () => ContextMenuRadioGroup,
|
|
106
|
+
ContextMenuRadioItem: () => ContextMenuRadioItem,
|
|
107
|
+
ContextMenuSeparator: () => ContextMenuSeparator,
|
|
108
|
+
ContextMenuShortcut: () => ContextMenuShortcut,
|
|
109
|
+
ContextMenuSub: () => ContextMenuSub,
|
|
110
|
+
ContextMenuSubContent: () => ContextMenuSubContent,
|
|
111
|
+
ContextMenuSubTrigger: () => ContextMenuSubTrigger,
|
|
112
|
+
ContextMenuTrigger: () => ContextMenuTrigger,
|
|
113
|
+
DatePicker: () => DatePicker,
|
|
114
|
+
Dialog: () => Dialog,
|
|
115
|
+
DialogClose: () => DialogClose,
|
|
116
|
+
DialogContent: () => DialogContent,
|
|
117
|
+
DialogDescription: () => DialogDescription,
|
|
118
|
+
DialogFooter: () => DialogFooter,
|
|
119
|
+
DialogHeader: () => DialogHeader,
|
|
120
|
+
DialogOverlay: () => DialogOverlay,
|
|
121
|
+
DialogPortal: () => DialogPortal,
|
|
122
|
+
DialogTitle: () => DialogTitle,
|
|
123
|
+
DialogTrigger: () => DialogTrigger,
|
|
124
|
+
Drawer: () => Drawer,
|
|
125
|
+
DrawerClose: () => DrawerClose,
|
|
126
|
+
DrawerContent: () => DrawerContent,
|
|
127
|
+
DrawerDescription: () => DrawerDescription,
|
|
128
|
+
DrawerFooter: () => DrawerFooter,
|
|
129
|
+
DrawerHeader: () => DrawerHeader,
|
|
130
|
+
DrawerOverlay: () => DrawerOverlay,
|
|
131
|
+
DrawerPortal: () => DrawerPortal,
|
|
132
|
+
DrawerTitle: () => DrawerTitle,
|
|
133
|
+
DrawerTrigger: () => DrawerTrigger,
|
|
134
|
+
DropdownMenu: () => DropdownMenu,
|
|
135
|
+
DropdownMenuCheckboxItem: () => DropdownMenuCheckboxItem,
|
|
136
|
+
DropdownMenuContent: () => DropdownMenuContent,
|
|
137
|
+
DropdownMenuGroup: () => DropdownMenuGroup,
|
|
138
|
+
DropdownMenuItem: () => DropdownMenuItem,
|
|
139
|
+
DropdownMenuLabel: () => DropdownMenuLabel,
|
|
140
|
+
DropdownMenuPortal: () => DropdownMenuPortal,
|
|
141
|
+
DropdownMenuRadioGroup: () => DropdownMenuRadioGroup,
|
|
142
|
+
DropdownMenuRadioItem: () => DropdownMenuRadioItem,
|
|
143
|
+
DropdownMenuSeparator: () => DropdownMenuSeparator,
|
|
144
|
+
DropdownMenuShortcut: () => DropdownMenuShortcut,
|
|
145
|
+
DropdownMenuSub: () => DropdownMenuSub,
|
|
146
|
+
DropdownMenuSubContent: () => DropdownMenuSubContent,
|
|
147
|
+
DropdownMenuSubTrigger: () => DropdownMenuSubTrigger,
|
|
148
|
+
DropdownMenuTrigger: () => DropdownMenuTrigger,
|
|
149
|
+
Form: () => Form,
|
|
150
|
+
FormControl: () => FormControl,
|
|
151
|
+
FormDescription: () => FormDescription,
|
|
152
|
+
FormField: () => FormField,
|
|
153
|
+
FormItem: () => FormItem,
|
|
154
|
+
FormLabel: () => FormLabel,
|
|
155
|
+
FormMessage: () => FormMessage,
|
|
156
|
+
HoverCard: () => HoverCard,
|
|
157
|
+
HoverCardContent: () => HoverCardContent,
|
|
158
|
+
HoverCardTrigger: () => HoverCardTrigger,
|
|
159
|
+
Input: () => Input,
|
|
160
|
+
InputOTP: () => InputOTP,
|
|
161
|
+
InputOTPGroup: () => InputOTPGroup,
|
|
162
|
+
InputOTPSeparator: () => InputOTPSeparator,
|
|
163
|
+
InputOTPSlot: () => InputOTPSlot,
|
|
164
|
+
Label: () => Label3,
|
|
165
|
+
LoadingState: () => LoadingState,
|
|
166
|
+
Menubar: () => Menubar,
|
|
167
|
+
MenubarCheckboxItem: () => MenubarCheckboxItem,
|
|
168
|
+
MenubarContent: () => MenubarContent,
|
|
169
|
+
MenubarGroup: () => MenubarGroup,
|
|
170
|
+
MenubarItem: () => MenubarItem,
|
|
171
|
+
MenubarLabel: () => MenubarLabel,
|
|
172
|
+
MenubarMenu: () => MenubarMenu,
|
|
173
|
+
MenubarPortal: () => MenubarPortal,
|
|
174
|
+
MenubarRadioGroup: () => MenubarRadioGroup,
|
|
175
|
+
MenubarRadioItem: () => MenubarRadioItem,
|
|
176
|
+
MenubarSeparator: () => MenubarSeparator,
|
|
177
|
+
MenubarShortcut: () => MenubarShortcut,
|
|
178
|
+
MenubarSub: () => MenubarSub,
|
|
179
|
+
MenubarSubContent: () => MenubarSubContent,
|
|
180
|
+
MenubarSubTrigger: () => MenubarSubTrigger,
|
|
181
|
+
MenubarTrigger: () => MenubarTrigger,
|
|
182
|
+
NavigationMenu: () => NavigationMenu,
|
|
183
|
+
NavigationMenuContent: () => NavigationMenuContent,
|
|
184
|
+
NavigationMenuIndicator: () => NavigationMenuIndicator,
|
|
185
|
+
NavigationMenuItem: () => NavigationMenuItem,
|
|
186
|
+
NavigationMenuLink: () => NavigationMenuLink,
|
|
187
|
+
NavigationMenuList: () => NavigationMenuList,
|
|
188
|
+
NavigationMenuTrigger: () => NavigationMenuTrigger,
|
|
189
|
+
NavigationMenuViewport: () => NavigationMenuViewport,
|
|
190
|
+
Pagination: () => Pagination,
|
|
191
|
+
PaginationContent: () => PaginationContent,
|
|
192
|
+
PaginationEllipsis: () => PaginationEllipsis,
|
|
193
|
+
PaginationItem: () => PaginationItem,
|
|
194
|
+
PaginationLink: () => PaginationLink,
|
|
195
|
+
PaginationNext: () => PaginationNext,
|
|
196
|
+
PaginationPrevious: () => PaginationPrevious,
|
|
197
|
+
Panel: () => Panel2,
|
|
198
|
+
Popover: () => Popover,
|
|
199
|
+
PopoverAnchor: () => PopoverAnchor,
|
|
200
|
+
PopoverContent: () => PopoverContent,
|
|
201
|
+
PopoverTrigger: () => PopoverTrigger,
|
|
202
|
+
Progress: () => Progress,
|
|
203
|
+
RadioGroup: () => RadioGroup4,
|
|
204
|
+
RadioGroupItem: () => RadioGroupItem,
|
|
205
|
+
ResizableHandle: () => ResizableHandle,
|
|
206
|
+
ResizablePanel: () => ResizablePanel,
|
|
207
|
+
ResizablePanelGroup: () => ResizablePanelGroup,
|
|
208
|
+
ScrollArea: () => ScrollArea,
|
|
209
|
+
ScrollBar: () => ScrollBar,
|
|
210
|
+
SearchableSelect: () => SearchableSelect,
|
|
211
|
+
Select: () => Select,
|
|
212
|
+
SelectContent: () => SelectContent,
|
|
213
|
+
SelectGroup: () => SelectGroup,
|
|
214
|
+
SelectItem: () => SelectItem,
|
|
215
|
+
SelectLabel: () => SelectLabel,
|
|
216
|
+
SelectScrollDownButton: () => SelectScrollDownButton,
|
|
217
|
+
SelectScrollUpButton: () => SelectScrollUpButton,
|
|
218
|
+
SelectSeparator: () => SelectSeparator,
|
|
219
|
+
SelectTrigger: () => SelectTrigger,
|
|
220
|
+
SelectValue: () => SelectValue,
|
|
221
|
+
Separator: () => Separator6,
|
|
222
|
+
Sheet: () => Sheet,
|
|
223
|
+
SheetClose: () => SheetClose,
|
|
224
|
+
SheetContent: () => SheetContent,
|
|
225
|
+
SheetDescription: () => SheetDescription,
|
|
226
|
+
SheetFooter: () => SheetFooter,
|
|
227
|
+
SheetHeader: () => SheetHeader,
|
|
228
|
+
SheetOverlay: () => SheetOverlay,
|
|
229
|
+
SheetPortal: () => SheetPortal,
|
|
230
|
+
SheetTitle: () => SheetTitle,
|
|
231
|
+
SheetTrigger: () => SheetTrigger,
|
|
232
|
+
Sidebar: () => Sidebar,
|
|
233
|
+
SidebarContent: () => SidebarContent,
|
|
234
|
+
SidebarFooter: () => SidebarFooter,
|
|
235
|
+
SidebarGroup: () => SidebarGroup,
|
|
236
|
+
SidebarGroupAction: () => SidebarGroupAction,
|
|
237
|
+
SidebarGroupContent: () => SidebarGroupContent,
|
|
238
|
+
SidebarGroupLabel: () => SidebarGroupLabel,
|
|
239
|
+
SidebarHeader: () => SidebarHeader,
|
|
240
|
+
SidebarInput: () => SidebarInput,
|
|
241
|
+
SidebarInset: () => SidebarInset,
|
|
242
|
+
SidebarMenu: () => SidebarMenu,
|
|
243
|
+
SidebarMenuAction: () => SidebarMenuAction,
|
|
244
|
+
SidebarMenuBadge: () => SidebarMenuBadge,
|
|
245
|
+
SidebarMenuButton: () => SidebarMenuButton,
|
|
246
|
+
SidebarMenuItem: () => SidebarMenuItem,
|
|
247
|
+
SidebarMenuSkeleton: () => SidebarMenuSkeleton,
|
|
248
|
+
SidebarMenuSub: () => SidebarMenuSub,
|
|
249
|
+
SidebarMenuSubButton: () => SidebarMenuSubButton,
|
|
250
|
+
SidebarMenuSubItem: () => SidebarMenuSubItem,
|
|
251
|
+
SidebarProvider: () => SidebarProvider,
|
|
252
|
+
SidebarRail: () => SidebarRail,
|
|
253
|
+
SidebarSeparator: () => SidebarSeparator,
|
|
254
|
+
SidebarTrigger: () => SidebarTrigger,
|
|
255
|
+
Skeleton: () => Skeleton,
|
|
256
|
+
Slider: () => Slider,
|
|
257
|
+
StatusChip: () => StatusChip,
|
|
258
|
+
Switch: () => Switch,
|
|
259
|
+
Table: () => Table,
|
|
260
|
+
TableBody: () => TableBody,
|
|
261
|
+
TableCaption: () => TableCaption,
|
|
262
|
+
TableCell: () => TableCell,
|
|
263
|
+
TableFooter: () => TableFooter,
|
|
264
|
+
TableHead: () => TableHead,
|
|
265
|
+
TableHeader: () => TableHeader,
|
|
266
|
+
TableRow: () => TableRow,
|
|
267
|
+
Tabs: () => Tabs,
|
|
268
|
+
TabsContent: () => TabsContent,
|
|
269
|
+
TabsList: () => TabsList,
|
|
270
|
+
TabsTrigger: () => TabsTrigger,
|
|
271
|
+
Textarea: () => Textarea,
|
|
272
|
+
ThemeProvider: () => ThemeProvider,
|
|
273
|
+
Toaster: () => Toaster,
|
|
274
|
+
Toggle: () => Toggle,
|
|
275
|
+
ToggleGroup: () => ToggleGroup,
|
|
276
|
+
ToggleGroupItem: () => ToggleGroupItem,
|
|
277
|
+
Tooltip: () => Tooltip2,
|
|
278
|
+
TooltipContent: () => TooltipContent,
|
|
279
|
+
TooltipProvider: () => TooltipProvider,
|
|
280
|
+
TooltipTrigger: () => TooltipTrigger,
|
|
281
|
+
badgeVariants: () => badgeVariants,
|
|
282
|
+
buttonVariants: () => buttonVariants,
|
|
283
|
+
cn: () => cn,
|
|
284
|
+
navigationMenuTriggerStyle: () => navigationMenuTriggerStyle,
|
|
285
|
+
toast: () => import_sonner.toast,
|
|
286
|
+
toggleVariants: () => toggleVariants,
|
|
287
|
+
useFormField: () => useFormField,
|
|
288
|
+
useIsMobile: () => useIsMobile,
|
|
289
|
+
useSidebar: () => useSidebar,
|
|
290
|
+
useTheme: () => useTheme
|
|
291
|
+
});
|
|
292
|
+
module.exports = __toCommonJS(index_exports);
|
|
293
|
+
|
|
294
|
+
// src/lib/utils.ts
|
|
295
|
+
var import_clsx = require("clsx");
|
|
296
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
297
|
+
function cn(...inputs) {
|
|
298
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
// src/theme-provider.tsx
|
|
302
|
+
var import_react = require("react");
|
|
303
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
304
|
+
var initialState = {
|
|
305
|
+
theme: "system",
|
|
306
|
+
setTheme: () => null,
|
|
307
|
+
resolvedTheme: "dark"
|
|
308
|
+
};
|
|
309
|
+
var ThemeProviderContext = (0, import_react.createContext)(initialState);
|
|
310
|
+
function ThemeProvider({
|
|
311
|
+
children,
|
|
312
|
+
defaultTheme = "system",
|
|
313
|
+
storageKey = "yd-theme",
|
|
314
|
+
attribute = "data-theme",
|
|
315
|
+
enableSystem = true,
|
|
316
|
+
...props
|
|
317
|
+
}) {
|
|
318
|
+
const [theme, setThemeState] = (0, import_react.useState)(() => {
|
|
319
|
+
if (typeof window !== "undefined") {
|
|
320
|
+
const stored = localStorage.getItem(storageKey);
|
|
321
|
+
if (stored) return stored;
|
|
322
|
+
}
|
|
323
|
+
return defaultTheme;
|
|
324
|
+
});
|
|
325
|
+
const [resolvedTheme, setResolvedTheme] = (0, import_react.useState)("dark");
|
|
326
|
+
(0, import_react.useEffect)(() => {
|
|
327
|
+
const root = window.document.documentElement;
|
|
328
|
+
root.classList.remove("light", "dark");
|
|
329
|
+
let activeTheme = theme;
|
|
330
|
+
if (theme === "system" && enableSystem) {
|
|
331
|
+
const systemTheme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
332
|
+
activeTheme = systemTheme;
|
|
333
|
+
}
|
|
334
|
+
const isDark = activeTheme.includes("dark") || activeTheme === "orchestrai";
|
|
335
|
+
const resolved = isDark ? "dark" : "light";
|
|
336
|
+
setResolvedTheme(resolved);
|
|
337
|
+
root.classList.add(resolved);
|
|
338
|
+
if (attribute) {
|
|
339
|
+
root.setAttribute(attribute, theme);
|
|
340
|
+
}
|
|
341
|
+
}, [theme, enableSystem, attribute]);
|
|
342
|
+
const value = {
|
|
343
|
+
theme,
|
|
344
|
+
setTheme: (newTheme) => {
|
|
345
|
+
localStorage.setItem(storageKey, newTheme);
|
|
346
|
+
setThemeState(newTheme);
|
|
347
|
+
},
|
|
348
|
+
resolvedTheme
|
|
349
|
+
};
|
|
350
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ThemeProviderContext.Provider, { ...props, value, children });
|
|
351
|
+
}
|
|
352
|
+
var useTheme = () => {
|
|
353
|
+
const context = (0, import_react.useContext)(ThemeProviderContext);
|
|
354
|
+
if (context === void 0) {
|
|
355
|
+
throw new Error("useTheme must be used within a ThemeProvider");
|
|
356
|
+
}
|
|
357
|
+
return context;
|
|
358
|
+
};
|
|
359
|
+
|
|
360
|
+
// src/hooks/use-mobile.ts
|
|
361
|
+
var React2 = __toESM(require("react"), 1);
|
|
362
|
+
var MOBILE_BREAKPOINT = 768;
|
|
363
|
+
function useIsMobile() {
|
|
364
|
+
const [isMobile, setIsMobile] = React2.useState(
|
|
365
|
+
void 0
|
|
366
|
+
);
|
|
367
|
+
React2.useEffect(() => {
|
|
368
|
+
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
369
|
+
const onChange = () => {
|
|
370
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
371
|
+
};
|
|
372
|
+
mql.addEventListener("change", onChange);
|
|
373
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
374
|
+
return () => mql.removeEventListener("change", onChange);
|
|
375
|
+
}, []);
|
|
376
|
+
return !!isMobile;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
// src/components/accordion.tsx
|
|
380
|
+
var React3 = __toESM(require("react"), 1);
|
|
381
|
+
var AccordionPrimitive = __toESM(require("@radix-ui/react-accordion"), 1);
|
|
382
|
+
var import_lucide_react = require("lucide-react");
|
|
383
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
384
|
+
var Accordion = AccordionPrimitive.Root;
|
|
385
|
+
var AccordionItem = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
386
|
+
AccordionPrimitive.Item,
|
|
387
|
+
{
|
|
388
|
+
ref,
|
|
389
|
+
className: cn("border-b", className),
|
|
390
|
+
...props
|
|
391
|
+
}
|
|
392
|
+
));
|
|
393
|
+
AccordionItem.displayName = "AccordionItem";
|
|
394
|
+
var AccordionTrigger = React3.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
395
|
+
AccordionPrimitive.Trigger,
|
|
396
|
+
{
|
|
397
|
+
ref,
|
|
398
|
+
className: cn(
|
|
399
|
+
"flex flex-1 items-center justify-between py-4 text-sm font-medium cursor-pointer transition-all hover:underline text-left [&[data-state=open]>svg]:rotate-180",
|
|
400
|
+
className
|
|
401
|
+
),
|
|
402
|
+
...props,
|
|
403
|
+
children: [
|
|
404
|
+
children,
|
|
405
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react.ChevronDown, { className: "shrink-0 text-muted-foreground transition-transform duration-200 size-4" })
|
|
406
|
+
]
|
|
407
|
+
}
|
|
408
|
+
) }));
|
|
409
|
+
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
|
|
410
|
+
var AccordionContent = React3.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
411
|
+
AccordionPrimitive.Content,
|
|
412
|
+
{
|
|
413
|
+
ref,
|
|
414
|
+
className: "overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
|
|
415
|
+
...props,
|
|
416
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: cn("pb-4 pt-0", className), children })
|
|
417
|
+
}
|
|
418
|
+
));
|
|
419
|
+
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
|
420
|
+
|
|
421
|
+
// src/components/alert-dialog.tsx
|
|
422
|
+
var React5 = __toESM(require("react"), 1);
|
|
423
|
+
var AlertDialogPrimitive = __toESM(require("@radix-ui/react-alert-dialog"), 1);
|
|
424
|
+
|
|
425
|
+
// src/components/button.tsx
|
|
426
|
+
var React4 = __toESM(require("react"), 1);
|
|
427
|
+
var import_react_slot = require("@radix-ui/react-slot");
|
|
428
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
429
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
430
|
+
var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
431
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium cursor-pointer transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
432
|
+
{
|
|
433
|
+
variants: {
|
|
434
|
+
variant: {
|
|
435
|
+
default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
|
|
436
|
+
destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
|
|
437
|
+
outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
|
|
438
|
+
secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
|
|
439
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
440
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
441
|
+
},
|
|
442
|
+
size: {
|
|
443
|
+
default: "h-9 px-4 py-2",
|
|
444
|
+
sm: "h-8 rounded-md px-3 text-xs",
|
|
445
|
+
lg: "h-10 rounded-md px-8",
|
|
446
|
+
icon: "size-9"
|
|
447
|
+
}
|
|
448
|
+
},
|
|
449
|
+
defaultVariants: {
|
|
450
|
+
variant: "default",
|
|
451
|
+
size: "default"
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
);
|
|
455
|
+
var Button = React4.forwardRef(
|
|
456
|
+
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
457
|
+
const Comp = asChild ? import_react_slot.Slot : "button";
|
|
458
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
459
|
+
Comp,
|
|
460
|
+
{
|
|
461
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
462
|
+
ref,
|
|
463
|
+
...props
|
|
464
|
+
}
|
|
465
|
+
);
|
|
466
|
+
}
|
|
467
|
+
);
|
|
468
|
+
Button.displayName = "Button";
|
|
469
|
+
|
|
470
|
+
// src/components/alert-dialog.tsx
|
|
471
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
472
|
+
var AlertDialog = AlertDialogPrimitive.Root;
|
|
473
|
+
var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
474
|
+
var AlertDialogPortal = AlertDialogPrimitive.Portal;
|
|
475
|
+
var AlertDialogOverlay = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
476
|
+
AlertDialogPrimitive.Overlay,
|
|
477
|
+
{
|
|
478
|
+
className: cn(
|
|
479
|
+
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
480
|
+
className
|
|
481
|
+
),
|
|
482
|
+
...props,
|
|
483
|
+
ref
|
|
484
|
+
}
|
|
485
|
+
));
|
|
486
|
+
AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
|
|
487
|
+
var AlertDialogContent = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(AlertDialogPortal, { children: [
|
|
488
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(AlertDialogOverlay, {}),
|
|
489
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
490
|
+
AlertDialogPrimitive.Content,
|
|
491
|
+
{
|
|
492
|
+
ref,
|
|
493
|
+
className: cn(
|
|
494
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-lg translate-[-50%]",
|
|
495
|
+
className
|
|
496
|
+
),
|
|
497
|
+
...props
|
|
498
|
+
}
|
|
499
|
+
)
|
|
500
|
+
] }));
|
|
501
|
+
AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
|
|
502
|
+
var AlertDialogHeader = ({
|
|
503
|
+
className,
|
|
504
|
+
...props
|
|
505
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
506
|
+
"div",
|
|
507
|
+
{
|
|
508
|
+
className: cn(
|
|
509
|
+
"flex flex-col space-y-2 text-center sm:text-left",
|
|
510
|
+
className
|
|
511
|
+
),
|
|
512
|
+
...props
|
|
513
|
+
}
|
|
514
|
+
);
|
|
515
|
+
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
516
|
+
var AlertDialogFooter = ({
|
|
517
|
+
className,
|
|
518
|
+
...props
|
|
519
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
520
|
+
"div",
|
|
521
|
+
{
|
|
522
|
+
className: cn(
|
|
523
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
524
|
+
className
|
|
525
|
+
),
|
|
526
|
+
...props
|
|
527
|
+
}
|
|
528
|
+
);
|
|
529
|
+
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
530
|
+
var AlertDialogTitle = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
531
|
+
AlertDialogPrimitive.Title,
|
|
532
|
+
{
|
|
533
|
+
ref,
|
|
534
|
+
className: cn("text-lg font-semibold", className),
|
|
535
|
+
...props
|
|
536
|
+
}
|
|
537
|
+
));
|
|
538
|
+
AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
|
|
539
|
+
var AlertDialogDescription = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
540
|
+
AlertDialogPrimitive.Description,
|
|
541
|
+
{
|
|
542
|
+
ref,
|
|
543
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
544
|
+
...props
|
|
545
|
+
}
|
|
546
|
+
));
|
|
547
|
+
AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
|
|
548
|
+
var AlertDialogAction = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
549
|
+
AlertDialogPrimitive.Action,
|
|
550
|
+
{
|
|
551
|
+
ref,
|
|
552
|
+
className: cn(buttonVariants(), className),
|
|
553
|
+
...props
|
|
554
|
+
}
|
|
555
|
+
));
|
|
556
|
+
AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
|
|
557
|
+
var AlertDialogCancel = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
558
|
+
AlertDialogPrimitive.Cancel,
|
|
559
|
+
{
|
|
560
|
+
ref,
|
|
561
|
+
className: cn(
|
|
562
|
+
buttonVariants({ variant: "outline" }),
|
|
563
|
+
"mt-2 sm:mt-0",
|
|
564
|
+
className
|
|
565
|
+
),
|
|
566
|
+
...props
|
|
567
|
+
}
|
|
568
|
+
));
|
|
569
|
+
AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
|
|
570
|
+
|
|
571
|
+
// src/components/alert.tsx
|
|
572
|
+
var React6 = __toESM(require("react"), 1);
|
|
573
|
+
var import_class_variance_authority2 = require("class-variance-authority");
|
|
574
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
575
|
+
var alertVariants = (0, import_class_variance_authority2.cva)(
|
|
576
|
+
"relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",
|
|
577
|
+
{
|
|
578
|
+
variants: {
|
|
579
|
+
variant: {
|
|
580
|
+
default: "bg-background text-foreground",
|
|
581
|
+
destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"
|
|
582
|
+
}
|
|
583
|
+
},
|
|
584
|
+
defaultVariants: {
|
|
585
|
+
variant: "default"
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
);
|
|
589
|
+
var Alert = React6.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
590
|
+
"div",
|
|
591
|
+
{
|
|
592
|
+
ref,
|
|
593
|
+
role: "alert",
|
|
594
|
+
className: cn(alertVariants({ variant }), className),
|
|
595
|
+
...props
|
|
596
|
+
}
|
|
597
|
+
));
|
|
598
|
+
Alert.displayName = "Alert";
|
|
599
|
+
var AlertTitle = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
600
|
+
"h5",
|
|
601
|
+
{
|
|
602
|
+
ref,
|
|
603
|
+
className: cn("mb-1 font-medium leading-none tracking-tight", className),
|
|
604
|
+
...props
|
|
605
|
+
}
|
|
606
|
+
));
|
|
607
|
+
AlertTitle.displayName = "AlertTitle";
|
|
608
|
+
var AlertDescription = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
609
|
+
"div",
|
|
610
|
+
{
|
|
611
|
+
ref,
|
|
612
|
+
className: cn("text-sm [&_p]:leading-relaxed", className),
|
|
613
|
+
...props
|
|
614
|
+
}
|
|
615
|
+
));
|
|
616
|
+
AlertDescription.displayName = "AlertDescription";
|
|
617
|
+
|
|
618
|
+
// src/components/aspect-ratio.tsx
|
|
619
|
+
var AspectRatioPrimitive = __toESM(require("@radix-ui/react-aspect-ratio"), 1);
|
|
620
|
+
var AspectRatio = AspectRatioPrimitive.Root;
|
|
621
|
+
|
|
622
|
+
// src/components/avatar.tsx
|
|
623
|
+
var React7 = __toESM(require("react"), 1);
|
|
624
|
+
var AvatarPrimitive = __toESM(require("@radix-ui/react-avatar"), 1);
|
|
625
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
626
|
+
var Avatar = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
627
|
+
AvatarPrimitive.Root,
|
|
628
|
+
{
|
|
629
|
+
ref,
|
|
630
|
+
className: cn(
|
|
631
|
+
"relative flex shrink-0 overflow-hidden rounded-full size-10",
|
|
632
|
+
className
|
|
633
|
+
),
|
|
634
|
+
...props
|
|
635
|
+
}
|
|
636
|
+
));
|
|
637
|
+
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
638
|
+
var AvatarImage = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
639
|
+
AvatarPrimitive.Image,
|
|
640
|
+
{
|
|
641
|
+
ref,
|
|
642
|
+
className: cn("aspect-square size-full", className),
|
|
643
|
+
...props
|
|
644
|
+
}
|
|
645
|
+
));
|
|
646
|
+
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
647
|
+
var AvatarFallback = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
648
|
+
AvatarPrimitive.Fallback,
|
|
649
|
+
{
|
|
650
|
+
ref,
|
|
651
|
+
className: cn(
|
|
652
|
+
"flex items-center justify-center rounded-full bg-muted size-full",
|
|
653
|
+
className
|
|
654
|
+
),
|
|
655
|
+
...props
|
|
656
|
+
}
|
|
657
|
+
));
|
|
658
|
+
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
|
659
|
+
|
|
660
|
+
// src/components/badge.tsx
|
|
661
|
+
var import_class_variance_authority3 = require("class-variance-authority");
|
|
662
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
663
|
+
var badgeVariants = (0, import_class_variance_authority3.cva)(
|
|
664
|
+
"inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
665
|
+
{
|
|
666
|
+
variants: {
|
|
667
|
+
variant: {
|
|
668
|
+
default: "border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",
|
|
669
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
670
|
+
destructive: "border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",
|
|
671
|
+
outline: "text-foreground"
|
|
672
|
+
}
|
|
673
|
+
},
|
|
674
|
+
defaultVariants: {
|
|
675
|
+
variant: "default"
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
);
|
|
679
|
+
function Badge({ className, variant, ...props }) {
|
|
680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: cn(badgeVariants({ variant }), className), ...props });
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
// src/components/breadcrumb.tsx
|
|
684
|
+
var React8 = __toESM(require("react"), 1);
|
|
685
|
+
var import_react_slot2 = require("@radix-ui/react-slot");
|
|
686
|
+
var import_lucide_react2 = require("lucide-react");
|
|
687
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
688
|
+
var Breadcrumb = React8.forwardRef(({ ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("nav", { ref, "aria-label": "breadcrumb", ...props }));
|
|
689
|
+
Breadcrumb.displayName = "Breadcrumb";
|
|
690
|
+
var BreadcrumbList = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
691
|
+
"ol",
|
|
692
|
+
{
|
|
693
|
+
ref,
|
|
694
|
+
className: cn(
|
|
695
|
+
"flex flex-wrap items-center gap-1.5 wrap-break-word text-sm text-muted-foreground sm:gap-2.5",
|
|
696
|
+
className
|
|
697
|
+
),
|
|
698
|
+
...props
|
|
699
|
+
}
|
|
700
|
+
));
|
|
701
|
+
BreadcrumbList.displayName = "BreadcrumbList";
|
|
702
|
+
var BreadcrumbItem = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
703
|
+
"li",
|
|
704
|
+
{
|
|
705
|
+
ref,
|
|
706
|
+
className: cn("inline-flex items-center gap-1.5", className),
|
|
707
|
+
...props
|
|
708
|
+
}
|
|
709
|
+
));
|
|
710
|
+
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
711
|
+
var BreadcrumbLink = React8.forwardRef(({ asChild, className, ...props }, ref) => {
|
|
712
|
+
const Comp = asChild ? import_react_slot2.Slot : "a";
|
|
713
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
714
|
+
Comp,
|
|
715
|
+
{
|
|
716
|
+
ref,
|
|
717
|
+
className: cn(
|
|
718
|
+
"cursor-pointer transition-colors hover:text-foreground",
|
|
719
|
+
className
|
|
720
|
+
),
|
|
721
|
+
...props
|
|
722
|
+
}
|
|
723
|
+
);
|
|
724
|
+
});
|
|
725
|
+
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
726
|
+
var BreadcrumbPage = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
727
|
+
"span",
|
|
728
|
+
{
|
|
729
|
+
ref,
|
|
730
|
+
role: "link",
|
|
731
|
+
"aria-disabled": "true",
|
|
732
|
+
"aria-current": "page",
|
|
733
|
+
className: cn("font-normal text-foreground", className),
|
|
734
|
+
...props
|
|
735
|
+
}
|
|
736
|
+
));
|
|
737
|
+
BreadcrumbPage.displayName = "BreadcrumbPage";
|
|
738
|
+
var BreadcrumbSeparator = ({
|
|
739
|
+
children,
|
|
740
|
+
className,
|
|
741
|
+
...props
|
|
742
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
743
|
+
"li",
|
|
744
|
+
{
|
|
745
|
+
role: "presentation",
|
|
746
|
+
"aria-hidden": "true",
|
|
747
|
+
className: cn("[&>svg]:size-3.5", className),
|
|
748
|
+
...props,
|
|
749
|
+
children: children ?? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.ChevronRight, {})
|
|
750
|
+
}
|
|
751
|
+
);
|
|
752
|
+
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
753
|
+
var BreadcrumbEllipsis = ({
|
|
754
|
+
className,
|
|
755
|
+
...props
|
|
756
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
757
|
+
"span",
|
|
758
|
+
{
|
|
759
|
+
role: "presentation",
|
|
760
|
+
"aria-hidden": "true",
|
|
761
|
+
className: cn("flex items-center justify-center size-9", className),
|
|
762
|
+
...props,
|
|
763
|
+
children: [
|
|
764
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.MoreHorizontal, { className: "size-4" }),
|
|
765
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "sr-only", children: "More" })
|
|
766
|
+
]
|
|
767
|
+
}
|
|
768
|
+
);
|
|
769
|
+
BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
|
|
770
|
+
|
|
771
|
+
// src/components/calendar.tsx
|
|
772
|
+
var React9 = __toESM(require("react"), 1);
|
|
773
|
+
var import_lucide_react3 = require("lucide-react");
|
|
774
|
+
var import_react_day_picker = require("react-day-picker");
|
|
775
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
776
|
+
function Calendar({
|
|
777
|
+
className,
|
|
778
|
+
classNames,
|
|
779
|
+
showOutsideDays = true,
|
|
780
|
+
captionLayout = "label",
|
|
781
|
+
buttonVariant = "ghost",
|
|
782
|
+
formatters,
|
|
783
|
+
components,
|
|
784
|
+
...props
|
|
785
|
+
}) {
|
|
786
|
+
const defaultClassNames = (0, import_react_day_picker.getDefaultClassNames)();
|
|
787
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
788
|
+
import_react_day_picker.DayPicker,
|
|
789
|
+
{
|
|
790
|
+
showOutsideDays,
|
|
791
|
+
className: cn(
|
|
792
|
+
"group/calendar p-3 [--cell-size:2rem] in-data-[slot=card-content]:bg-transparent",
|
|
793
|
+
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
794
|
+
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
795
|
+
className
|
|
796
|
+
),
|
|
797
|
+
captionLayout,
|
|
798
|
+
formatters: {
|
|
799
|
+
formatMonthDropdown: (date) => date.toLocaleString("default", { month: "short" }),
|
|
800
|
+
...formatters
|
|
801
|
+
},
|
|
802
|
+
classNames: {
|
|
803
|
+
root: cn("w-fit", defaultClassNames.root),
|
|
804
|
+
months: cn(
|
|
805
|
+
"relative flex flex-col gap-4 md:flex-row",
|
|
806
|
+
defaultClassNames.months
|
|
807
|
+
),
|
|
808
|
+
month: cn("flex w-full flex-col gap-4", defaultClassNames.month),
|
|
809
|
+
nav: cn(
|
|
810
|
+
"absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",
|
|
811
|
+
defaultClassNames.nav
|
|
812
|
+
),
|
|
813
|
+
button_previous: cn(
|
|
814
|
+
buttonVariants({ variant: buttonVariant }),
|
|
815
|
+
"select-none p-0 aria-disabled:opacity-50 size-(--cell-size)",
|
|
816
|
+
defaultClassNames.button_previous
|
|
817
|
+
),
|
|
818
|
+
button_next: cn(
|
|
819
|
+
buttonVariants({ variant: buttonVariant }),
|
|
820
|
+
"select-none p-0 aria-disabled:opacity-50 size-(--cell-size)",
|
|
821
|
+
defaultClassNames.button_next
|
|
822
|
+
),
|
|
823
|
+
month_caption: cn(
|
|
824
|
+
"flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",
|
|
825
|
+
defaultClassNames.month_caption
|
|
826
|
+
),
|
|
827
|
+
dropdowns: cn(
|
|
828
|
+
"flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium",
|
|
829
|
+
defaultClassNames.dropdowns
|
|
830
|
+
),
|
|
831
|
+
dropdown_root: cn(
|
|
832
|
+
"has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border",
|
|
833
|
+
defaultClassNames.dropdown_root
|
|
834
|
+
),
|
|
835
|
+
dropdown: cn(
|
|
836
|
+
"bg-popover absolute inset-0 opacity-0",
|
|
837
|
+
defaultClassNames.dropdown
|
|
838
|
+
),
|
|
839
|
+
caption_label: cn(
|
|
840
|
+
"select-none font-medium",
|
|
841
|
+
captionLayout === "label" ? "text-sm" : "[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pl-2 pr-1 text-sm [&>svg]:size-3.5",
|
|
842
|
+
defaultClassNames.caption_label
|
|
843
|
+
),
|
|
844
|
+
table: "w-full border-collapse",
|
|
845
|
+
weekdays: cn("flex", defaultClassNames.weekdays),
|
|
846
|
+
weekday: cn(
|
|
847
|
+
"text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal",
|
|
848
|
+
defaultClassNames.weekday
|
|
849
|
+
),
|
|
850
|
+
week: cn("mt-2 flex w-full", defaultClassNames.week),
|
|
851
|
+
week_number_header: cn(
|
|
852
|
+
"w-(--cell-size) select-none",
|
|
853
|
+
defaultClassNames.week_number_header
|
|
854
|
+
),
|
|
855
|
+
week_number: cn(
|
|
856
|
+
"text-muted-foreground select-none text-[0.8rem]",
|
|
857
|
+
defaultClassNames.week_number
|
|
858
|
+
),
|
|
859
|
+
day: cn(
|
|
860
|
+
"group/day relative aspect-square select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md size-full",
|
|
861
|
+
defaultClassNames.day
|
|
862
|
+
),
|
|
863
|
+
range_start: cn(
|
|
864
|
+
"bg-accent rounded-l-md",
|
|
865
|
+
defaultClassNames.range_start
|
|
866
|
+
),
|
|
867
|
+
range_middle: cn("rounded-none", defaultClassNames.range_middle),
|
|
868
|
+
range_end: cn("bg-accent rounded-r-md", defaultClassNames.range_end),
|
|
869
|
+
today: cn(
|
|
870
|
+
"bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",
|
|
871
|
+
defaultClassNames.today
|
|
872
|
+
),
|
|
873
|
+
outside: cn(
|
|
874
|
+
"text-muted-foreground aria-selected:text-muted-foreground",
|
|
875
|
+
defaultClassNames.outside
|
|
876
|
+
),
|
|
877
|
+
disabled: cn(
|
|
878
|
+
"text-muted-foreground opacity-50",
|
|
879
|
+
defaultClassNames.disabled
|
|
880
|
+
),
|
|
881
|
+
hidden: cn("invisible", defaultClassNames.hidden),
|
|
882
|
+
...classNames
|
|
883
|
+
},
|
|
884
|
+
components: {
|
|
885
|
+
Root: ({ className: className2, rootRef, ...props2 }) => {
|
|
886
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
887
|
+
"div",
|
|
888
|
+
{
|
|
889
|
+
"data-slot": "calendar",
|
|
890
|
+
ref: rootRef,
|
|
891
|
+
className: cn(className2),
|
|
892
|
+
...props2
|
|
893
|
+
}
|
|
894
|
+
);
|
|
895
|
+
},
|
|
896
|
+
Chevron: ({ className: className2, orientation, ...props2 }) => {
|
|
897
|
+
if (orientation === "left") {
|
|
898
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.ChevronLeftIcon, { className: cn("size-4", className2), ...props2 });
|
|
899
|
+
}
|
|
900
|
+
if (orientation === "right") {
|
|
901
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
902
|
+
import_lucide_react3.ChevronRightIcon,
|
|
903
|
+
{
|
|
904
|
+
className: cn("size-4", className2),
|
|
905
|
+
...props2
|
|
906
|
+
}
|
|
907
|
+
);
|
|
908
|
+
}
|
|
909
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.ChevronDownIcon, { className: cn("size-4", className2), ...props2 });
|
|
910
|
+
},
|
|
911
|
+
DayButton: CalendarDayButton,
|
|
912
|
+
WeekNumber: ({ children, ...props2 }) => {
|
|
913
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("td", { ...props2, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) });
|
|
914
|
+
},
|
|
915
|
+
...components
|
|
916
|
+
},
|
|
917
|
+
...props
|
|
918
|
+
}
|
|
919
|
+
);
|
|
920
|
+
}
|
|
921
|
+
function CalendarDayButton({
|
|
922
|
+
className,
|
|
923
|
+
day,
|
|
924
|
+
modifiers,
|
|
925
|
+
...props
|
|
926
|
+
}) {
|
|
927
|
+
const defaultClassNames = (0, import_react_day_picker.getDefaultClassNames)();
|
|
928
|
+
const ref = React9.useRef(null);
|
|
929
|
+
React9.useEffect(() => {
|
|
930
|
+
if (modifiers["focused"]) ref.current?.focus();
|
|
931
|
+
}, [modifiers]);
|
|
932
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
933
|
+
Button,
|
|
934
|
+
{
|
|
935
|
+
ref,
|
|
936
|
+
variant: "ghost",
|
|
937
|
+
size: "icon",
|
|
938
|
+
"data-day": day.date.toLocaleDateString(),
|
|
939
|
+
"data-selected-single": modifiers["selected"] && !modifiers["range_start"] && !modifiers["range_end"] && !modifiers["range_middle"],
|
|
940
|
+
"data-range-start": modifiers["range_start"],
|
|
941
|
+
"data-range-end": modifiers["range_end"],
|
|
942
|
+
"data-range-middle": modifiers["range_middle"],
|
|
943
|
+
className: cn(
|
|
944
|
+
"data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 flex aspect-square h-auto w-full min-w-(--cell-size) flex-col gap-1 font-normal leading-none data-[range-end=true]:rounded-md group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] [&>span]:text-xs [&>span]:opacity-70",
|
|
945
|
+
defaultClassNames.day,
|
|
946
|
+
className
|
|
947
|
+
),
|
|
948
|
+
...props
|
|
949
|
+
}
|
|
950
|
+
);
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
// src/components/card.tsx
|
|
954
|
+
var React10 = __toESM(require("react"), 1);
|
|
955
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
956
|
+
var Card = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
957
|
+
"div",
|
|
958
|
+
{
|
|
959
|
+
ref,
|
|
960
|
+
className: cn(
|
|
961
|
+
"rounded-xl border bg-card text-card-foreground shadow",
|
|
962
|
+
className
|
|
963
|
+
),
|
|
964
|
+
...props
|
|
965
|
+
}
|
|
966
|
+
));
|
|
967
|
+
Card.displayName = "Card";
|
|
968
|
+
var CardHeader = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
969
|
+
"div",
|
|
970
|
+
{
|
|
971
|
+
ref,
|
|
972
|
+
className: cn("flex flex-col space-y-1.5 p-6", className),
|
|
973
|
+
...props
|
|
974
|
+
}
|
|
975
|
+
));
|
|
976
|
+
CardHeader.displayName = "CardHeader";
|
|
977
|
+
var CardTitle = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
978
|
+
"div",
|
|
979
|
+
{
|
|
980
|
+
ref,
|
|
981
|
+
className: cn("font-semibold leading-none tracking-tight", className),
|
|
982
|
+
...props
|
|
983
|
+
}
|
|
984
|
+
));
|
|
985
|
+
CardTitle.displayName = "CardTitle";
|
|
986
|
+
var CardDescription = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
987
|
+
"div",
|
|
988
|
+
{
|
|
989
|
+
ref,
|
|
990
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
991
|
+
...props
|
|
992
|
+
}
|
|
993
|
+
));
|
|
994
|
+
CardDescription.displayName = "CardDescription";
|
|
995
|
+
var CardContent = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { ref, className: cn("p-6 pt-0", className), ...props }));
|
|
996
|
+
CardContent.displayName = "CardContent";
|
|
997
|
+
var CardFooter = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
998
|
+
"div",
|
|
999
|
+
{
|
|
1000
|
+
ref,
|
|
1001
|
+
className: cn("flex items-center p-6 pt-0", className),
|
|
1002
|
+
...props
|
|
1003
|
+
}
|
|
1004
|
+
));
|
|
1005
|
+
CardFooter.displayName = "CardFooter";
|
|
1006
|
+
|
|
1007
|
+
// src/components/carousel.tsx
|
|
1008
|
+
var React11 = __toESM(require("react"), 1);
|
|
1009
|
+
var import_embla_carousel_react = __toESM(require("embla-carousel-react"), 1);
|
|
1010
|
+
var import_lucide_react4 = require("lucide-react");
|
|
1011
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1012
|
+
var CarouselContext = React11.createContext(null);
|
|
1013
|
+
function useCarousel() {
|
|
1014
|
+
const context = React11.useContext(CarouselContext);
|
|
1015
|
+
if (!context) {
|
|
1016
|
+
throw new Error("useCarousel must be used within a <Carousel />");
|
|
1017
|
+
}
|
|
1018
|
+
return context;
|
|
1019
|
+
}
|
|
1020
|
+
var Carousel = React11.forwardRef(
|
|
1021
|
+
({
|
|
1022
|
+
orientation = "horizontal",
|
|
1023
|
+
opts,
|
|
1024
|
+
setApi,
|
|
1025
|
+
plugins,
|
|
1026
|
+
className,
|
|
1027
|
+
children,
|
|
1028
|
+
...props
|
|
1029
|
+
}, ref) => {
|
|
1030
|
+
const [carouselRef, api] = (0, import_embla_carousel_react.default)(
|
|
1031
|
+
{
|
|
1032
|
+
...opts,
|
|
1033
|
+
axis: orientation === "horizontal" ? "x" : "y"
|
|
1034
|
+
},
|
|
1035
|
+
plugins
|
|
1036
|
+
);
|
|
1037
|
+
const [canScrollPrev, setCanScrollPrev] = React11.useState(false);
|
|
1038
|
+
const [canScrollNext, setCanScrollNext] = React11.useState(false);
|
|
1039
|
+
const onSelect = React11.useCallback((api2) => {
|
|
1040
|
+
if (!api2) {
|
|
1041
|
+
return;
|
|
1042
|
+
}
|
|
1043
|
+
setCanScrollPrev(api2.canScrollPrev());
|
|
1044
|
+
setCanScrollNext(api2.canScrollNext());
|
|
1045
|
+
}, []);
|
|
1046
|
+
const scrollPrev = React11.useCallback(() => {
|
|
1047
|
+
api?.scrollPrev();
|
|
1048
|
+
}, [api]);
|
|
1049
|
+
const scrollNext = React11.useCallback(() => {
|
|
1050
|
+
api?.scrollNext();
|
|
1051
|
+
}, [api]);
|
|
1052
|
+
const handleKeyDown = React11.useCallback(
|
|
1053
|
+
(event) => {
|
|
1054
|
+
if (event.key === "ArrowLeft") {
|
|
1055
|
+
event.preventDefault();
|
|
1056
|
+
scrollPrev();
|
|
1057
|
+
} else if (event.key === "ArrowRight") {
|
|
1058
|
+
event.preventDefault();
|
|
1059
|
+
scrollNext();
|
|
1060
|
+
}
|
|
1061
|
+
},
|
|
1062
|
+
[scrollPrev, scrollNext]
|
|
1063
|
+
);
|
|
1064
|
+
React11.useEffect(() => {
|
|
1065
|
+
if (!api || !setApi) {
|
|
1066
|
+
return;
|
|
1067
|
+
}
|
|
1068
|
+
setApi(api);
|
|
1069
|
+
}, [api, setApi]);
|
|
1070
|
+
React11.useEffect(() => {
|
|
1071
|
+
if (!api) {
|
|
1072
|
+
return;
|
|
1073
|
+
}
|
|
1074
|
+
onSelect(api);
|
|
1075
|
+
api.on("reInit", onSelect);
|
|
1076
|
+
api.on("select", onSelect);
|
|
1077
|
+
return () => {
|
|
1078
|
+
api?.off("select", onSelect);
|
|
1079
|
+
};
|
|
1080
|
+
}, [api, onSelect]);
|
|
1081
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1082
|
+
CarouselContext.Provider,
|
|
1083
|
+
{
|
|
1084
|
+
value: {
|
|
1085
|
+
carouselRef,
|
|
1086
|
+
api,
|
|
1087
|
+
opts,
|
|
1088
|
+
orientation: orientation || (opts?.axis === "y" ? "vertical" : "horizontal"),
|
|
1089
|
+
scrollPrev,
|
|
1090
|
+
scrollNext,
|
|
1091
|
+
canScrollPrev,
|
|
1092
|
+
canScrollNext
|
|
1093
|
+
},
|
|
1094
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1095
|
+
"div",
|
|
1096
|
+
{
|
|
1097
|
+
ref,
|
|
1098
|
+
onKeyDownCapture: handleKeyDown,
|
|
1099
|
+
className: cn("relative", className),
|
|
1100
|
+
role: "region",
|
|
1101
|
+
"aria-roledescription": "carousel",
|
|
1102
|
+
...props,
|
|
1103
|
+
children
|
|
1104
|
+
}
|
|
1105
|
+
)
|
|
1106
|
+
}
|
|
1107
|
+
);
|
|
1108
|
+
}
|
|
1109
|
+
);
|
|
1110
|
+
Carousel.displayName = "Carousel";
|
|
1111
|
+
var CarouselContent = React11.forwardRef(({ className, ...props }, ref) => {
|
|
1112
|
+
const { carouselRef, orientation } = useCarousel();
|
|
1113
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { ref: carouselRef, className: "overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1114
|
+
"div",
|
|
1115
|
+
{
|
|
1116
|
+
ref,
|
|
1117
|
+
className: cn(
|
|
1118
|
+
"flex",
|
|
1119
|
+
orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col",
|
|
1120
|
+
className
|
|
1121
|
+
),
|
|
1122
|
+
...props
|
|
1123
|
+
}
|
|
1124
|
+
) });
|
|
1125
|
+
});
|
|
1126
|
+
CarouselContent.displayName = "CarouselContent";
|
|
1127
|
+
var CarouselItem = React11.forwardRef(({ className, ...props }, ref) => {
|
|
1128
|
+
const { orientation } = useCarousel();
|
|
1129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1130
|
+
"div",
|
|
1131
|
+
{
|
|
1132
|
+
ref,
|
|
1133
|
+
role: "group",
|
|
1134
|
+
"aria-roledescription": "slide",
|
|
1135
|
+
className: cn(
|
|
1136
|
+
"min-w-0 shrink-0 grow-0 basis-full",
|
|
1137
|
+
orientation === "horizontal" ? "pl-4" : "pt-4",
|
|
1138
|
+
className
|
|
1139
|
+
),
|
|
1140
|
+
...props
|
|
1141
|
+
}
|
|
1142
|
+
);
|
|
1143
|
+
});
|
|
1144
|
+
CarouselItem.displayName = "CarouselItem";
|
|
1145
|
+
var CarouselPrevious = React11.forwardRef(({ className, variant = "outline", size = "icon", ...props }, ref) => {
|
|
1146
|
+
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
1147
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
1148
|
+
Button,
|
|
1149
|
+
{
|
|
1150
|
+
ref,
|
|
1151
|
+
variant,
|
|
1152
|
+
size,
|
|
1153
|
+
className: cn(
|
|
1154
|
+
"absolute rounded-full size-8",
|
|
1155
|
+
orientation === "horizontal" ? "-left-12 top-1/2 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
1156
|
+
className
|
|
1157
|
+
),
|
|
1158
|
+
disabled: !canScrollPrev,
|
|
1159
|
+
onClick: scrollPrev,
|
|
1160
|
+
...props,
|
|
1161
|
+
children: [
|
|
1162
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react4.ArrowLeft, { className: "size-4" }),
|
|
1163
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "sr-only", children: "Previous slide" })
|
|
1164
|
+
]
|
|
1165
|
+
}
|
|
1166
|
+
);
|
|
1167
|
+
});
|
|
1168
|
+
CarouselPrevious.displayName = "CarouselPrevious";
|
|
1169
|
+
var CarouselNext = React11.forwardRef(({ className, variant = "outline", size = "icon", ...props }, ref) => {
|
|
1170
|
+
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
1171
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
1172
|
+
Button,
|
|
1173
|
+
{
|
|
1174
|
+
ref,
|
|
1175
|
+
variant,
|
|
1176
|
+
size,
|
|
1177
|
+
className: cn(
|
|
1178
|
+
"absolute rounded-full size-8",
|
|
1179
|
+
orientation === "horizontal" ? "-right-12 top-1/2 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
1180
|
+
className
|
|
1181
|
+
),
|
|
1182
|
+
disabled: !canScrollNext,
|
|
1183
|
+
onClick: scrollNext,
|
|
1184
|
+
...props,
|
|
1185
|
+
children: [
|
|
1186
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react4.ArrowRight, { className: "size-4" }),
|
|
1187
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "sr-only", children: "Next slide" })
|
|
1188
|
+
]
|
|
1189
|
+
}
|
|
1190
|
+
);
|
|
1191
|
+
});
|
|
1192
|
+
CarouselNext.displayName = "CarouselNext";
|
|
1193
|
+
|
|
1194
|
+
// src/components/chart.tsx
|
|
1195
|
+
var React12 = __toESM(require("react"), 1);
|
|
1196
|
+
var RechartsPrimitive = __toESM(require("recharts"), 1);
|
|
1197
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1198
|
+
var THEMES = { light: "", dark: ".dark" };
|
|
1199
|
+
var ChartContext = React12.createContext(null);
|
|
1200
|
+
function useChart() {
|
|
1201
|
+
const context = React12.useContext(ChartContext);
|
|
1202
|
+
if (!context) {
|
|
1203
|
+
throw new Error("useChart must be used within a <ChartContainer />");
|
|
1204
|
+
}
|
|
1205
|
+
return context;
|
|
1206
|
+
}
|
|
1207
|
+
var ChartContainer = React12.forwardRef(({ id, className, children, config, ...props }, ref) => {
|
|
1208
|
+
const uniqueId = React12.useId();
|
|
1209
|
+
const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
|
|
1210
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
1211
|
+
"div",
|
|
1212
|
+
{
|
|
1213
|
+
"data-chart": chartId,
|
|
1214
|
+
ref,
|
|
1215
|
+
className: cn(
|
|
1216
|
+
"flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-layer]:outline-none",
|
|
1217
|
+
className
|
|
1218
|
+
),
|
|
1219
|
+
...props,
|
|
1220
|
+
children: [
|
|
1221
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ChartStyle, { id: chartId, config }),
|
|
1222
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(RechartsPrimitive.ResponsiveContainer, { children })
|
|
1223
|
+
]
|
|
1224
|
+
}
|
|
1225
|
+
) });
|
|
1226
|
+
});
|
|
1227
|
+
ChartContainer.displayName = "Chart";
|
|
1228
|
+
var ChartStyle = ({ id, config }) => {
|
|
1229
|
+
const colorConfig = Object.entries(config).filter(
|
|
1230
|
+
([, config2]) => config2.theme || config2.color
|
|
1231
|
+
);
|
|
1232
|
+
if (!colorConfig.length) {
|
|
1233
|
+
return null;
|
|
1234
|
+
}
|
|
1235
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1236
|
+
"style",
|
|
1237
|
+
{
|
|
1238
|
+
dangerouslySetInnerHTML: {
|
|
1239
|
+
__html: Object.entries(THEMES).map(
|
|
1240
|
+
([theme, prefix]) => `
|
|
1241
|
+
${prefix} [data-chart=${id}] {
|
|
1242
|
+
${colorConfig.map(([key, itemConfig]) => {
|
|
1243
|
+
const color = itemConfig.theme?.[theme] || itemConfig.color;
|
|
1244
|
+
return color ? ` --color-${key}: ${color};` : null;
|
|
1245
|
+
}).join("\n")}
|
|
1246
|
+
}
|
|
1247
|
+
`
|
|
1248
|
+
).join("\n")
|
|
1249
|
+
}
|
|
1250
|
+
}
|
|
1251
|
+
);
|
|
1252
|
+
};
|
|
1253
|
+
var ChartTooltip = RechartsPrimitive.Tooltip;
|
|
1254
|
+
var ChartTooltipContent = React12.forwardRef(
|
|
1255
|
+
({
|
|
1256
|
+
active,
|
|
1257
|
+
payload,
|
|
1258
|
+
className,
|
|
1259
|
+
indicator = "dot",
|
|
1260
|
+
hideLabel = false,
|
|
1261
|
+
hideIndicator = false,
|
|
1262
|
+
label,
|
|
1263
|
+
labelFormatter,
|
|
1264
|
+
labelClassName,
|
|
1265
|
+
formatter,
|
|
1266
|
+
color,
|
|
1267
|
+
nameKey,
|
|
1268
|
+
labelKey
|
|
1269
|
+
}, ref) => {
|
|
1270
|
+
const { config } = useChart();
|
|
1271
|
+
const tooltipLabel = React12.useMemo(() => {
|
|
1272
|
+
if (hideLabel || !payload?.length) {
|
|
1273
|
+
return null;
|
|
1274
|
+
}
|
|
1275
|
+
const [item] = payload;
|
|
1276
|
+
const key = `${labelKey || item?.dataKey || item?.name || "value"}`;
|
|
1277
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
1278
|
+
const value = !labelKey && typeof label === "string" ? config[label]?.label || label : itemConfig?.label;
|
|
1279
|
+
if (labelFormatter) {
|
|
1280
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: cn("font-medium", labelClassName), children: labelFormatter(value, payload) });
|
|
1281
|
+
}
|
|
1282
|
+
if (!value) {
|
|
1283
|
+
return null;
|
|
1284
|
+
}
|
|
1285
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: cn("font-medium", labelClassName), children: value });
|
|
1286
|
+
}, [
|
|
1287
|
+
label,
|
|
1288
|
+
labelFormatter,
|
|
1289
|
+
payload,
|
|
1290
|
+
hideLabel,
|
|
1291
|
+
labelClassName,
|
|
1292
|
+
config,
|
|
1293
|
+
labelKey
|
|
1294
|
+
]);
|
|
1295
|
+
if (!active || !payload?.length) {
|
|
1296
|
+
return null;
|
|
1297
|
+
}
|
|
1298
|
+
const nestLabel = payload.length === 1 && indicator !== "dot";
|
|
1299
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
1300
|
+
"div",
|
|
1301
|
+
{
|
|
1302
|
+
ref,
|
|
1303
|
+
className: cn(
|
|
1304
|
+
"grid min-w-32 items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",
|
|
1305
|
+
className
|
|
1306
|
+
),
|
|
1307
|
+
children: [
|
|
1308
|
+
!nestLabel ? tooltipLabel : null,
|
|
1309
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "grid gap-1.5", children: payload.filter((item) => item.type !== "none").map((item, index) => {
|
|
1310
|
+
const key = `${nameKey || item.name || item.dataKey || "value"}`;
|
|
1311
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
1312
|
+
const indicatorColor = color || item.payload.fill || item.color;
|
|
1313
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1314
|
+
"div",
|
|
1315
|
+
{
|
|
1316
|
+
className: cn(
|
|
1317
|
+
"flex flex-wrap items-stretch gap-2 [&>svg]:text-muted-foreground [&>svg]:size-2.5",
|
|
1318
|
+
indicator === "dot" && "items-center"
|
|
1319
|
+
),
|
|
1320
|
+
children: formatter && item?.value !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
1321
|
+
itemConfig?.icon ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(itemConfig.icon, {}) : !hideIndicator && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1322
|
+
"div",
|
|
1323
|
+
{
|
|
1324
|
+
className: cn(
|
|
1325
|
+
"shrink-0 rounded-xs border-border bg-(--color-bg)",
|
|
1326
|
+
{
|
|
1327
|
+
"h-2.5 w-2.5": indicator === "dot",
|
|
1328
|
+
"w-1": indicator === "line",
|
|
1329
|
+
"w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
|
|
1330
|
+
"my-0.5": nestLabel && indicator === "dashed"
|
|
1331
|
+
}
|
|
1332
|
+
),
|
|
1333
|
+
style: {
|
|
1334
|
+
"--color-bg": indicatorColor,
|
|
1335
|
+
"--color-border": indicatorColor
|
|
1336
|
+
}
|
|
1337
|
+
}
|
|
1338
|
+
),
|
|
1339
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
1340
|
+
"div",
|
|
1341
|
+
{
|
|
1342
|
+
className: cn(
|
|
1343
|
+
"flex flex-1 justify-between leading-none",
|
|
1344
|
+
nestLabel ? "items-end" : "items-center"
|
|
1345
|
+
),
|
|
1346
|
+
children: [
|
|
1347
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "grid gap-1.5", children: [
|
|
1348
|
+
nestLabel ? tooltipLabel : null,
|
|
1349
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "text-muted-foreground", children: itemConfig?.label || item.name })
|
|
1350
|
+
] }),
|
|
1351
|
+
item.value && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "font-mono font-medium tabular-nums text-foreground", children: item.value.toLocaleString() })
|
|
1352
|
+
]
|
|
1353
|
+
}
|
|
1354
|
+
)
|
|
1355
|
+
] })
|
|
1356
|
+
},
|
|
1357
|
+
item.dataKey
|
|
1358
|
+
);
|
|
1359
|
+
}) })
|
|
1360
|
+
]
|
|
1361
|
+
}
|
|
1362
|
+
);
|
|
1363
|
+
}
|
|
1364
|
+
);
|
|
1365
|
+
ChartTooltipContent.displayName = "ChartTooltip";
|
|
1366
|
+
var ChartLegend = RechartsPrimitive.Legend;
|
|
1367
|
+
var ChartLegendContent = React12.forwardRef(
|
|
1368
|
+
({ className, hideIcon = false, payload, verticalAlign = "bottom", nameKey }, ref) => {
|
|
1369
|
+
const { config } = useChart();
|
|
1370
|
+
if (!payload?.length) {
|
|
1371
|
+
return null;
|
|
1372
|
+
}
|
|
1373
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1374
|
+
"div",
|
|
1375
|
+
{
|
|
1376
|
+
ref,
|
|
1377
|
+
className: cn(
|
|
1378
|
+
"flex items-center justify-center gap-4",
|
|
1379
|
+
verticalAlign === "top" ? "pb-3" : "pt-3",
|
|
1380
|
+
className
|
|
1381
|
+
),
|
|
1382
|
+
children: payload.filter((item) => item.type !== "none").map((item) => {
|
|
1383
|
+
const key = `${nameKey || item.dataKey || "value"}`;
|
|
1384
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
1385
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
1386
|
+
"div",
|
|
1387
|
+
{
|
|
1388
|
+
className: cn(
|
|
1389
|
+
"flex items-center gap-1.5 [&>svg]:text-muted-foreground [&>svg]:size-3"
|
|
1390
|
+
),
|
|
1391
|
+
children: [
|
|
1392
|
+
itemConfig?.icon && !hideIcon ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(itemConfig.icon, {}) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1393
|
+
"div",
|
|
1394
|
+
{
|
|
1395
|
+
className: "shrink-0 rounded-xs size-2",
|
|
1396
|
+
style: {
|
|
1397
|
+
backgroundColor: item.color
|
|
1398
|
+
}
|
|
1399
|
+
}
|
|
1400
|
+
),
|
|
1401
|
+
itemConfig?.label
|
|
1402
|
+
]
|
|
1403
|
+
},
|
|
1404
|
+
item.value
|
|
1405
|
+
);
|
|
1406
|
+
})
|
|
1407
|
+
}
|
|
1408
|
+
);
|
|
1409
|
+
}
|
|
1410
|
+
);
|
|
1411
|
+
ChartLegendContent.displayName = "ChartLegend";
|
|
1412
|
+
function getPayloadConfigFromPayload(config, payload, key) {
|
|
1413
|
+
if (typeof payload !== "object" || payload === null) {
|
|
1414
|
+
return void 0;
|
|
1415
|
+
}
|
|
1416
|
+
const payloadPayload = "payload" in payload && typeof payload.payload === "object" && payload.payload !== null ? payload.payload : void 0;
|
|
1417
|
+
let configLabelKey = key;
|
|
1418
|
+
if (key in payload && typeof payload[key] === "string") {
|
|
1419
|
+
configLabelKey = payload[key];
|
|
1420
|
+
} else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key] === "string") {
|
|
1421
|
+
configLabelKey = payloadPayload[key];
|
|
1422
|
+
}
|
|
1423
|
+
return configLabelKey in config ? config[configLabelKey] : config[key];
|
|
1424
|
+
}
|
|
1425
|
+
|
|
1426
|
+
// src/components/checkbox.tsx
|
|
1427
|
+
var React13 = __toESM(require("react"), 1);
|
|
1428
|
+
var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"), 1);
|
|
1429
|
+
var import_lucide_react5 = require("lucide-react");
|
|
1430
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1431
|
+
var Checkbox = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1432
|
+
CheckboxPrimitive.Root,
|
|
1433
|
+
{
|
|
1434
|
+
ref,
|
|
1435
|
+
className: cn(
|
|
1436
|
+
"grid place-content-center peer shrink-0 rounded-sm border border-primary shadow cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground size-4",
|
|
1437
|
+
className
|
|
1438
|
+
),
|
|
1439
|
+
...props,
|
|
1440
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1441
|
+
CheckboxPrimitive.Indicator,
|
|
1442
|
+
{
|
|
1443
|
+
className: cn("grid place-content-center text-current"),
|
|
1444
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react5.Check, { className: "size-4" })
|
|
1445
|
+
}
|
|
1446
|
+
)
|
|
1447
|
+
}
|
|
1448
|
+
));
|
|
1449
|
+
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
1450
|
+
|
|
1451
|
+
// src/components/collapsible.tsx
|
|
1452
|
+
var CollapsiblePrimitive = __toESM(require("@radix-ui/react-collapsible"), 1);
|
|
1453
|
+
var Collapsible = CollapsiblePrimitive.Root;
|
|
1454
|
+
var CollapsibleTrigger2 = CollapsiblePrimitive.CollapsibleTrigger;
|
|
1455
|
+
var CollapsibleContent2 = CollapsiblePrimitive.CollapsibleContent;
|
|
1456
|
+
|
|
1457
|
+
// src/components/command.tsx
|
|
1458
|
+
var React15 = __toESM(require("react"), 1);
|
|
1459
|
+
var import_cmdk = require("cmdk");
|
|
1460
|
+
var import_lucide_react7 = require("lucide-react");
|
|
1461
|
+
|
|
1462
|
+
// src/components/dialog.tsx
|
|
1463
|
+
var React14 = __toESM(require("react"), 1);
|
|
1464
|
+
var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
1465
|
+
var import_lucide_react6 = require("lucide-react");
|
|
1466
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1467
|
+
var Dialog = DialogPrimitive.Root;
|
|
1468
|
+
var DialogTrigger = DialogPrimitive.Trigger;
|
|
1469
|
+
var DialogPortal = DialogPrimitive.Portal;
|
|
1470
|
+
var DialogClose = DialogPrimitive.Close;
|
|
1471
|
+
var DialogOverlay = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1472
|
+
DialogPrimitive.Overlay,
|
|
1473
|
+
{
|
|
1474
|
+
ref,
|
|
1475
|
+
className: cn(
|
|
1476
|
+
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
1477
|
+
className
|
|
1478
|
+
),
|
|
1479
|
+
...props
|
|
1480
|
+
}
|
|
1481
|
+
));
|
|
1482
|
+
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
1483
|
+
var DialogContent = React14.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(DialogPortal, { children: [
|
|
1484
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DialogOverlay, {}),
|
|
1485
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1486
|
+
DialogPrimitive.Content,
|
|
1487
|
+
{
|
|
1488
|
+
ref,
|
|
1489
|
+
className: cn(
|
|
1490
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-lg translate-[-50%]",
|
|
1491
|
+
className
|
|
1492
|
+
),
|
|
1493
|
+
...props,
|
|
1494
|
+
children: [
|
|
1495
|
+
children,
|
|
1496
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background cursor-pointer transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
|
|
1497
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react6.X, { className: "size-4" }),
|
|
1498
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "sr-only", children: "Close" })
|
|
1499
|
+
] })
|
|
1500
|
+
]
|
|
1501
|
+
}
|
|
1502
|
+
)
|
|
1503
|
+
] }));
|
|
1504
|
+
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
1505
|
+
var DialogHeader = ({
|
|
1506
|
+
className,
|
|
1507
|
+
...props
|
|
1508
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1509
|
+
"div",
|
|
1510
|
+
{
|
|
1511
|
+
className: cn(
|
|
1512
|
+
"flex flex-col space-y-1.5 text-center sm:text-left",
|
|
1513
|
+
className
|
|
1514
|
+
),
|
|
1515
|
+
...props
|
|
1516
|
+
}
|
|
1517
|
+
);
|
|
1518
|
+
DialogHeader.displayName = "DialogHeader";
|
|
1519
|
+
var DialogFooter = ({
|
|
1520
|
+
className,
|
|
1521
|
+
...props
|
|
1522
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1523
|
+
"div",
|
|
1524
|
+
{
|
|
1525
|
+
className: cn(
|
|
1526
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
1527
|
+
className
|
|
1528
|
+
),
|
|
1529
|
+
...props
|
|
1530
|
+
}
|
|
1531
|
+
);
|
|
1532
|
+
DialogFooter.displayName = "DialogFooter";
|
|
1533
|
+
var DialogTitle = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1534
|
+
DialogPrimitive.Title,
|
|
1535
|
+
{
|
|
1536
|
+
ref,
|
|
1537
|
+
className: cn(
|
|
1538
|
+
"text-lg font-semibold leading-none tracking-tight",
|
|
1539
|
+
className
|
|
1540
|
+
),
|
|
1541
|
+
...props
|
|
1542
|
+
}
|
|
1543
|
+
));
|
|
1544
|
+
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
1545
|
+
var DialogDescription = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1546
|
+
DialogPrimitive.Description,
|
|
1547
|
+
{
|
|
1548
|
+
ref,
|
|
1549
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
1550
|
+
...props
|
|
1551
|
+
}
|
|
1552
|
+
));
|
|
1553
|
+
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
1554
|
+
|
|
1555
|
+
// src/components/command.tsx
|
|
1556
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1557
|
+
var Command = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1558
|
+
import_cmdk.Command,
|
|
1559
|
+
{
|
|
1560
|
+
ref,
|
|
1561
|
+
className: cn(
|
|
1562
|
+
"flex flex-col overflow-hidden rounded-md bg-popover text-popover-foreground size-full",
|
|
1563
|
+
className
|
|
1564
|
+
),
|
|
1565
|
+
...props
|
|
1566
|
+
}
|
|
1567
|
+
));
|
|
1568
|
+
Command.displayName = import_cmdk.Command.displayName;
|
|
1569
|
+
var CommandDialog = ({ children, ...props }) => {
|
|
1570
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Dialog, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DialogContent, { className: "overflow-hidden p-0", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Command, { className: "**:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 **:[[cmdk-item]]:py-3 [&_[cmdk-input-wrapper]_svg]:size-5", children }) }) });
|
|
1571
|
+
};
|
|
1572
|
+
var CommandInput = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
1573
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react7.Search, { className: "mr-2 shrink-0 opacity-50 size-4" }),
|
|
1574
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1575
|
+
import_cmdk.Command.Input,
|
|
1576
|
+
{
|
|
1577
|
+
ref,
|
|
1578
|
+
className: cn(
|
|
1579
|
+
"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
1580
|
+
className
|
|
1581
|
+
),
|
|
1582
|
+
...props
|
|
1583
|
+
}
|
|
1584
|
+
)
|
|
1585
|
+
] }));
|
|
1586
|
+
CommandInput.displayName = import_cmdk.Command.Input.displayName;
|
|
1587
|
+
var CommandList = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1588
|
+
import_cmdk.Command.List,
|
|
1589
|
+
{
|
|
1590
|
+
ref,
|
|
1591
|
+
className: cn("max-h-75 overflow-y-auto overflow-x-hidden", className),
|
|
1592
|
+
...props
|
|
1593
|
+
}
|
|
1594
|
+
));
|
|
1595
|
+
CommandList.displayName = import_cmdk.Command.List.displayName;
|
|
1596
|
+
var CommandEmpty = React15.forwardRef((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1597
|
+
import_cmdk.Command.Empty,
|
|
1598
|
+
{
|
|
1599
|
+
ref,
|
|
1600
|
+
className: "py-6 text-center text-sm",
|
|
1601
|
+
...props
|
|
1602
|
+
}
|
|
1603
|
+
));
|
|
1604
|
+
CommandEmpty.displayName = import_cmdk.Command.Empty.displayName;
|
|
1605
|
+
var CommandGroup = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1606
|
+
import_cmdk.Command.Group,
|
|
1607
|
+
{
|
|
1608
|
+
ref,
|
|
1609
|
+
className: cn(
|
|
1610
|
+
"overflow-hidden p-1 **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground",
|
|
1611
|
+
className
|
|
1612
|
+
),
|
|
1613
|
+
...props
|
|
1614
|
+
}
|
|
1615
|
+
));
|
|
1616
|
+
CommandGroup.displayName = import_cmdk.Command.Group.displayName;
|
|
1617
|
+
var CommandSeparator = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1618
|
+
import_cmdk.Command.Separator,
|
|
1619
|
+
{
|
|
1620
|
+
ref,
|
|
1621
|
+
className: cn("-mx-1 h-px bg-border", className),
|
|
1622
|
+
...props
|
|
1623
|
+
}
|
|
1624
|
+
));
|
|
1625
|
+
CommandSeparator.displayName = import_cmdk.Command.Separator.displayName;
|
|
1626
|
+
var CommandItem = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1627
|
+
import_cmdk.Command.Item,
|
|
1628
|
+
{
|
|
1629
|
+
ref,
|
|
1630
|
+
className: cn(
|
|
1631
|
+
"relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0",
|
|
1632
|
+
className
|
|
1633
|
+
),
|
|
1634
|
+
...props
|
|
1635
|
+
}
|
|
1636
|
+
));
|
|
1637
|
+
CommandItem.displayName = import_cmdk.Command.Item.displayName;
|
|
1638
|
+
var CommandShortcut = ({
|
|
1639
|
+
className,
|
|
1640
|
+
...props
|
|
1641
|
+
}) => {
|
|
1642
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1643
|
+
"span",
|
|
1644
|
+
{
|
|
1645
|
+
className: cn(
|
|
1646
|
+
"ml-auto text-xs tracking-widest text-muted-foreground",
|
|
1647
|
+
className
|
|
1648
|
+
),
|
|
1649
|
+
...props
|
|
1650
|
+
}
|
|
1651
|
+
);
|
|
1652
|
+
};
|
|
1653
|
+
CommandShortcut.displayName = "CommandShortcut";
|
|
1654
|
+
|
|
1655
|
+
// src/components/context-menu.tsx
|
|
1656
|
+
var React16 = __toESM(require("react"), 1);
|
|
1657
|
+
var ContextMenuPrimitive = __toESM(require("@radix-ui/react-context-menu"), 1);
|
|
1658
|
+
var import_lucide_react8 = require("lucide-react");
|
|
1659
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1660
|
+
var ContextMenu = ContextMenuPrimitive.Root;
|
|
1661
|
+
var ContextMenuTrigger = ContextMenuPrimitive.Trigger;
|
|
1662
|
+
var ContextMenuGroup = ContextMenuPrimitive.Group;
|
|
1663
|
+
var ContextMenuPortal = ContextMenuPrimitive.Portal;
|
|
1664
|
+
var ContextMenuSub = ContextMenuPrimitive.Sub;
|
|
1665
|
+
var ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
|
|
1666
|
+
var ContextMenuSubTrigger = React16.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1667
|
+
ContextMenuPrimitive.SubTrigger,
|
|
1668
|
+
{
|
|
1669
|
+
ref,
|
|
1670
|
+
className: cn(
|
|
1671
|
+
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground",
|
|
1672
|
+
inset && "pl-8",
|
|
1673
|
+
className
|
|
1674
|
+
),
|
|
1675
|
+
...props,
|
|
1676
|
+
children: [
|
|
1677
|
+
children,
|
|
1678
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react8.ChevronRight, { className: "ml-auto size-4" })
|
|
1679
|
+
]
|
|
1680
|
+
}
|
|
1681
|
+
));
|
|
1682
|
+
ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
|
|
1683
|
+
var ContextMenuSubContent = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1684
|
+
ContextMenuPrimitive.SubContent,
|
|
1685
|
+
{
|
|
1686
|
+
ref,
|
|
1687
|
+
className: cn(
|
|
1688
|
+
"z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-context-menu-content-transform-origin)",
|
|
1689
|
+
className
|
|
1690
|
+
),
|
|
1691
|
+
...props
|
|
1692
|
+
}
|
|
1693
|
+
));
|
|
1694
|
+
ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
|
|
1695
|
+
var ContextMenuContent = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1696
|
+
ContextMenuPrimitive.Content,
|
|
1697
|
+
{
|
|
1698
|
+
ref,
|
|
1699
|
+
className: cn(
|
|
1700
|
+
"z-50 max-h-(--radix-context-menu-content-available-height) min-w-32 overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-context-menu-content-transform-origin)",
|
|
1701
|
+
className
|
|
1702
|
+
),
|
|
1703
|
+
...props
|
|
1704
|
+
}
|
|
1705
|
+
) }));
|
|
1706
|
+
ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;
|
|
1707
|
+
var ContextMenuItem = React16.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1708
|
+
ContextMenuPrimitive.Item,
|
|
1709
|
+
{
|
|
1710
|
+
ref,
|
|
1711
|
+
className: cn(
|
|
1712
|
+
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
1713
|
+
inset && "pl-8",
|
|
1714
|
+
className
|
|
1715
|
+
),
|
|
1716
|
+
...props
|
|
1717
|
+
}
|
|
1718
|
+
));
|
|
1719
|
+
ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;
|
|
1720
|
+
var ContextMenuCheckboxItem = React16.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1721
|
+
ContextMenuPrimitive.CheckboxItem,
|
|
1722
|
+
{
|
|
1723
|
+
ref,
|
|
1724
|
+
className: cn(
|
|
1725
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
1726
|
+
className
|
|
1727
|
+
),
|
|
1728
|
+
...props,
|
|
1729
|
+
children: [
|
|
1730
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "absolute left-2 flex items-center justify-center size-3.5", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react8.Check, { className: "size-4" }) }) }),
|
|
1731
|
+
children
|
|
1732
|
+
]
|
|
1733
|
+
}
|
|
1734
|
+
));
|
|
1735
|
+
ContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;
|
|
1736
|
+
var ContextMenuRadioItem = React16.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1737
|
+
ContextMenuPrimitive.RadioItem,
|
|
1738
|
+
{
|
|
1739
|
+
ref,
|
|
1740
|
+
className: cn(
|
|
1741
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
1742
|
+
className
|
|
1743
|
+
),
|
|
1744
|
+
...props,
|
|
1745
|
+
children: [
|
|
1746
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "absolute left-2 flex items-center justify-center size-3.5", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react8.Circle, { className: "fill-current size-4" }) }) }),
|
|
1747
|
+
children
|
|
1748
|
+
]
|
|
1749
|
+
}
|
|
1750
|
+
));
|
|
1751
|
+
ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;
|
|
1752
|
+
var ContextMenuLabel = React16.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1753
|
+
ContextMenuPrimitive.Label,
|
|
1754
|
+
{
|
|
1755
|
+
ref,
|
|
1756
|
+
className: cn(
|
|
1757
|
+
"px-2 py-1.5 text-sm font-semibold text-foreground",
|
|
1758
|
+
inset && "pl-8",
|
|
1759
|
+
className
|
|
1760
|
+
),
|
|
1761
|
+
...props
|
|
1762
|
+
}
|
|
1763
|
+
));
|
|
1764
|
+
ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;
|
|
1765
|
+
var ContextMenuSeparator = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1766
|
+
ContextMenuPrimitive.Separator,
|
|
1767
|
+
{
|
|
1768
|
+
ref,
|
|
1769
|
+
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
1770
|
+
...props
|
|
1771
|
+
}
|
|
1772
|
+
));
|
|
1773
|
+
ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;
|
|
1774
|
+
var ContextMenuShortcut = ({
|
|
1775
|
+
className,
|
|
1776
|
+
...props
|
|
1777
|
+
}) => {
|
|
1778
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1779
|
+
"span",
|
|
1780
|
+
{
|
|
1781
|
+
className: cn(
|
|
1782
|
+
"ml-auto text-xs tracking-widest text-muted-foreground",
|
|
1783
|
+
className
|
|
1784
|
+
),
|
|
1785
|
+
...props
|
|
1786
|
+
}
|
|
1787
|
+
);
|
|
1788
|
+
};
|
|
1789
|
+
ContextMenuShortcut.displayName = "ContextMenuShortcut";
|
|
1790
|
+
|
|
1791
|
+
// src/components/drawer.tsx
|
|
1792
|
+
var React17 = __toESM(require("react"), 1);
|
|
1793
|
+
var import_vaul = require("vaul");
|
|
1794
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1795
|
+
var Drawer = ({
|
|
1796
|
+
shouldScaleBackground = true,
|
|
1797
|
+
...props
|
|
1798
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1799
|
+
import_vaul.Drawer.Root,
|
|
1800
|
+
{
|
|
1801
|
+
shouldScaleBackground,
|
|
1802
|
+
...props
|
|
1803
|
+
}
|
|
1804
|
+
);
|
|
1805
|
+
Drawer.displayName = "Drawer";
|
|
1806
|
+
var DrawerTrigger = import_vaul.Drawer.Trigger;
|
|
1807
|
+
var DrawerPortal = import_vaul.Drawer.Portal;
|
|
1808
|
+
var DrawerClose = import_vaul.Drawer.Close;
|
|
1809
|
+
var DrawerOverlay = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1810
|
+
import_vaul.Drawer.Overlay,
|
|
1811
|
+
{
|
|
1812
|
+
ref,
|
|
1813
|
+
className: cn("fixed inset-0 z-50 bg-black/80", className),
|
|
1814
|
+
...props
|
|
1815
|
+
}
|
|
1816
|
+
));
|
|
1817
|
+
DrawerOverlay.displayName = import_vaul.Drawer.Overlay.displayName;
|
|
1818
|
+
var DrawerContent = React17.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(DrawerPortal, { children: [
|
|
1819
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(DrawerOverlay, {}),
|
|
1820
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1821
|
+
import_vaul.Drawer.Content,
|
|
1822
|
+
{
|
|
1823
|
+
ref,
|
|
1824
|
+
className: cn(
|
|
1825
|
+
"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
|
|
1826
|
+
className
|
|
1827
|
+
),
|
|
1828
|
+
...props,
|
|
1829
|
+
children: [
|
|
1830
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "mx-auto mt-4 h-2 w-25 rounded-full bg-muted" }),
|
|
1831
|
+
children
|
|
1832
|
+
]
|
|
1833
|
+
}
|
|
1834
|
+
)
|
|
1835
|
+
] }));
|
|
1836
|
+
DrawerContent.displayName = "DrawerContent";
|
|
1837
|
+
var DrawerHeader = ({
|
|
1838
|
+
className,
|
|
1839
|
+
...props
|
|
1840
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1841
|
+
"div",
|
|
1842
|
+
{
|
|
1843
|
+
className: cn("grid gap-1.5 p-4 text-center sm:text-left", className),
|
|
1844
|
+
...props
|
|
1845
|
+
}
|
|
1846
|
+
);
|
|
1847
|
+
DrawerHeader.displayName = "DrawerHeader";
|
|
1848
|
+
var DrawerFooter = ({
|
|
1849
|
+
className,
|
|
1850
|
+
...props
|
|
1851
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1852
|
+
"div",
|
|
1853
|
+
{
|
|
1854
|
+
className: cn("mt-auto flex flex-col gap-2 p-4", className),
|
|
1855
|
+
...props
|
|
1856
|
+
}
|
|
1857
|
+
);
|
|
1858
|
+
DrawerFooter.displayName = "DrawerFooter";
|
|
1859
|
+
var DrawerTitle = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1860
|
+
import_vaul.Drawer.Title,
|
|
1861
|
+
{
|
|
1862
|
+
ref,
|
|
1863
|
+
className: cn(
|
|
1864
|
+
"text-lg font-semibold leading-none tracking-tight",
|
|
1865
|
+
className
|
|
1866
|
+
),
|
|
1867
|
+
...props
|
|
1868
|
+
}
|
|
1869
|
+
));
|
|
1870
|
+
DrawerTitle.displayName = import_vaul.Drawer.Title.displayName;
|
|
1871
|
+
var DrawerDescription = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1872
|
+
import_vaul.Drawer.Description,
|
|
1873
|
+
{
|
|
1874
|
+
ref,
|
|
1875
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
1876
|
+
...props
|
|
1877
|
+
}
|
|
1878
|
+
));
|
|
1879
|
+
DrawerDescription.displayName = import_vaul.Drawer.Description.displayName;
|
|
1880
|
+
|
|
1881
|
+
// src/components/dropdown-menu.tsx
|
|
1882
|
+
var React18 = __toESM(require("react"), 1);
|
|
1883
|
+
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"), 1);
|
|
1884
|
+
var import_lucide_react9 = require("lucide-react");
|
|
1885
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1886
|
+
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
1887
|
+
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
1888
|
+
var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
1889
|
+
var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
1890
|
+
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
1891
|
+
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
1892
|
+
var DropdownMenuSubTrigger = React18.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1893
|
+
DropdownMenuPrimitive.SubTrigger,
|
|
1894
|
+
{
|
|
1895
|
+
ref,
|
|
1896
|
+
className: cn(
|
|
1897
|
+
"flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
1898
|
+
inset && "pl-8",
|
|
1899
|
+
className
|
|
1900
|
+
),
|
|
1901
|
+
...props,
|
|
1902
|
+
children: [
|
|
1903
|
+
children,
|
|
1904
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react9.ChevronRight, { className: "ml-auto" })
|
|
1905
|
+
]
|
|
1906
|
+
}
|
|
1907
|
+
));
|
|
1908
|
+
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
1909
|
+
var DropdownMenuSubContent = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1910
|
+
DropdownMenuPrimitive.SubContent,
|
|
1911
|
+
{
|
|
1912
|
+
ref,
|
|
1913
|
+
className: cn(
|
|
1914
|
+
"z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-dropdown-menu-content-transform-origin)",
|
|
1915
|
+
className
|
|
1916
|
+
),
|
|
1917
|
+
...props
|
|
1918
|
+
}
|
|
1919
|
+
));
|
|
1920
|
+
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
1921
|
+
var DropdownMenuContent = React18.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1922
|
+
DropdownMenuPrimitive.Content,
|
|
1923
|
+
{
|
|
1924
|
+
ref,
|
|
1925
|
+
sideOffset,
|
|
1926
|
+
className: cn(
|
|
1927
|
+
"z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-32 overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
|
|
1928
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-dropdown-menu-content-transform-origin)",
|
|
1929
|
+
className
|
|
1930
|
+
),
|
|
1931
|
+
...props
|
|
1932
|
+
}
|
|
1933
|
+
) }));
|
|
1934
|
+
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
1935
|
+
var DropdownMenuItem = React18.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1936
|
+
DropdownMenuPrimitive.Item,
|
|
1937
|
+
{
|
|
1938
|
+
ref,
|
|
1939
|
+
className: cn(
|
|
1940
|
+
"relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
1941
|
+
inset && "pl-8",
|
|
1942
|
+
className
|
|
1943
|
+
),
|
|
1944
|
+
...props
|
|
1945
|
+
}
|
|
1946
|
+
));
|
|
1947
|
+
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
1948
|
+
var DropdownMenuCheckboxItem = React18.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1949
|
+
DropdownMenuPrimitive.CheckboxItem,
|
|
1950
|
+
{
|
|
1951
|
+
ref,
|
|
1952
|
+
className: cn(
|
|
1953
|
+
"relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
1954
|
+
className
|
|
1955
|
+
),
|
|
1956
|
+
...props,
|
|
1957
|
+
children: [
|
|
1958
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "absolute left-2 flex items-center justify-center size-3.5", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react9.Check, { className: "size-4" }) }) }),
|
|
1959
|
+
children
|
|
1960
|
+
]
|
|
1961
|
+
}
|
|
1962
|
+
));
|
|
1963
|
+
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
1964
|
+
var DropdownMenuRadioItem = React18.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1965
|
+
DropdownMenuPrimitive.RadioItem,
|
|
1966
|
+
{
|
|
1967
|
+
ref,
|
|
1968
|
+
className: cn(
|
|
1969
|
+
"relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
1970
|
+
className
|
|
1971
|
+
),
|
|
1972
|
+
...props,
|
|
1973
|
+
children: [
|
|
1974
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "absolute left-2 flex items-center justify-center size-3.5", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react9.Circle, { className: "fill-current size-2" }) }) }),
|
|
1975
|
+
children
|
|
1976
|
+
]
|
|
1977
|
+
}
|
|
1978
|
+
));
|
|
1979
|
+
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
1980
|
+
var DropdownMenuLabel = React18.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1981
|
+
DropdownMenuPrimitive.Label,
|
|
1982
|
+
{
|
|
1983
|
+
ref,
|
|
1984
|
+
className: cn(
|
|
1985
|
+
"px-2 py-1.5 text-sm font-semibold",
|
|
1986
|
+
inset && "pl-8",
|
|
1987
|
+
className
|
|
1988
|
+
),
|
|
1989
|
+
...props
|
|
1990
|
+
}
|
|
1991
|
+
));
|
|
1992
|
+
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
1993
|
+
var DropdownMenuSeparator = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1994
|
+
DropdownMenuPrimitive.Separator,
|
|
1995
|
+
{
|
|
1996
|
+
ref,
|
|
1997
|
+
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
1998
|
+
...props
|
|
1999
|
+
}
|
|
2000
|
+
));
|
|
2001
|
+
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
2002
|
+
var DropdownMenuShortcut = ({
|
|
2003
|
+
className,
|
|
2004
|
+
...props
|
|
2005
|
+
}) => {
|
|
2006
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2007
|
+
"span",
|
|
2008
|
+
{
|
|
2009
|
+
className: cn("ml-auto text-xs tracking-widest opacity-60", className),
|
|
2010
|
+
...props
|
|
2011
|
+
}
|
|
2012
|
+
);
|
|
2013
|
+
};
|
|
2014
|
+
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
2015
|
+
|
|
2016
|
+
// src/components/form.tsx
|
|
2017
|
+
var React20 = __toESM(require("react"), 1);
|
|
2018
|
+
var import_react_slot3 = require("@radix-ui/react-slot");
|
|
2019
|
+
var import_react_hook_form = require("react-hook-form");
|
|
2020
|
+
|
|
2021
|
+
// src/components/label.tsx
|
|
2022
|
+
var React19 = __toESM(require("react"), 1);
|
|
2023
|
+
var LabelPrimitive = __toESM(require("@radix-ui/react-label"), 1);
|
|
2024
|
+
var import_class_variance_authority4 = require("class-variance-authority");
|
|
2025
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
2026
|
+
var labelVariants = (0, import_class_variance_authority4.cva)(
|
|
2027
|
+
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
2028
|
+
);
|
|
2029
|
+
var Label3 = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2030
|
+
LabelPrimitive.Root,
|
|
2031
|
+
{
|
|
2032
|
+
ref,
|
|
2033
|
+
className: cn(labelVariants(), className),
|
|
2034
|
+
...props
|
|
2035
|
+
}
|
|
2036
|
+
));
|
|
2037
|
+
Label3.displayName = LabelPrimitive.Root.displayName;
|
|
2038
|
+
|
|
2039
|
+
// src/components/form.tsx
|
|
2040
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
2041
|
+
var Form = import_react_hook_form.FormProvider;
|
|
2042
|
+
var FormFieldContext = React20.createContext(
|
|
2043
|
+
null
|
|
2044
|
+
);
|
|
2045
|
+
var FormField = ({
|
|
2046
|
+
...props
|
|
2047
|
+
}) => {
|
|
2048
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_hook_form.Controller, { ...props }) });
|
|
2049
|
+
};
|
|
2050
|
+
var useFormField = () => {
|
|
2051
|
+
const fieldContext = React20.useContext(FormFieldContext);
|
|
2052
|
+
const itemContext = React20.useContext(FormItemContext);
|
|
2053
|
+
const { getFieldState, formState } = (0, import_react_hook_form.useFormContext)();
|
|
2054
|
+
if (!fieldContext) {
|
|
2055
|
+
throw new Error("useFormField should be used within <FormField>");
|
|
2056
|
+
}
|
|
2057
|
+
if (!itemContext) {
|
|
2058
|
+
throw new Error("useFormField should be used within <FormItem>");
|
|
2059
|
+
}
|
|
2060
|
+
const fieldState = getFieldState(fieldContext.name, formState);
|
|
2061
|
+
const { id } = itemContext;
|
|
2062
|
+
return {
|
|
2063
|
+
id,
|
|
2064
|
+
name: fieldContext.name,
|
|
2065
|
+
formItemId: `${id}-form-item`,
|
|
2066
|
+
formDescriptionId: `${id}-form-item-description`,
|
|
2067
|
+
formMessageId: `${id}-form-item-message`,
|
|
2068
|
+
...fieldState
|
|
2069
|
+
};
|
|
2070
|
+
};
|
|
2071
|
+
var FormItemContext = React20.createContext(null);
|
|
2072
|
+
var FormItem = React20.forwardRef(({ className, ...props }, ref) => {
|
|
2073
|
+
const id = React20.useId();
|
|
2074
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { ref, className: cn("space-y-2", className), ...props }) });
|
|
2075
|
+
});
|
|
2076
|
+
FormItem.displayName = "FormItem";
|
|
2077
|
+
var FormLabel = React20.forwardRef(({ className, ...props }, ref) => {
|
|
2078
|
+
const { error, formItemId } = useFormField();
|
|
2079
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2080
|
+
Label3,
|
|
2081
|
+
{
|
|
2082
|
+
ref,
|
|
2083
|
+
className: cn(error && "text-destructive", className),
|
|
2084
|
+
htmlFor: formItemId,
|
|
2085
|
+
...props
|
|
2086
|
+
}
|
|
2087
|
+
);
|
|
2088
|
+
});
|
|
2089
|
+
FormLabel.displayName = "FormLabel";
|
|
2090
|
+
var FormControl = React20.forwardRef(({ ...props }, ref) => {
|
|
2091
|
+
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
2092
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2093
|
+
import_react_slot3.Slot,
|
|
2094
|
+
{
|
|
2095
|
+
ref,
|
|
2096
|
+
id: formItemId,
|
|
2097
|
+
"aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
|
|
2098
|
+
"aria-invalid": !!error,
|
|
2099
|
+
...props
|
|
2100
|
+
}
|
|
2101
|
+
);
|
|
2102
|
+
});
|
|
2103
|
+
FormControl.displayName = "FormControl";
|
|
2104
|
+
var FormDescription = React20.forwardRef(({ className, ...props }, ref) => {
|
|
2105
|
+
const { formDescriptionId } = useFormField();
|
|
2106
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2107
|
+
"p",
|
|
2108
|
+
{
|
|
2109
|
+
ref,
|
|
2110
|
+
id: formDescriptionId,
|
|
2111
|
+
className: cn("text-[0.8rem] text-muted-foreground", className),
|
|
2112
|
+
...props
|
|
2113
|
+
}
|
|
2114
|
+
);
|
|
2115
|
+
});
|
|
2116
|
+
FormDescription.displayName = "FormDescription";
|
|
2117
|
+
var FormMessage = React20.forwardRef(({ className, children, ...props }, ref) => {
|
|
2118
|
+
const { error, formMessageId } = useFormField();
|
|
2119
|
+
const body = error ? String(error?.message ?? "") : children;
|
|
2120
|
+
if (!body) {
|
|
2121
|
+
return null;
|
|
2122
|
+
}
|
|
2123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2124
|
+
"p",
|
|
2125
|
+
{
|
|
2126
|
+
ref,
|
|
2127
|
+
id: formMessageId,
|
|
2128
|
+
className: cn("text-[0.8rem] font-medium text-destructive", className),
|
|
2129
|
+
...props,
|
|
2130
|
+
children: body
|
|
2131
|
+
}
|
|
2132
|
+
);
|
|
2133
|
+
});
|
|
2134
|
+
FormMessage.displayName = "FormMessage";
|
|
2135
|
+
|
|
2136
|
+
// src/components/hover-card.tsx
|
|
2137
|
+
var React21 = __toESM(require("react"), 1);
|
|
2138
|
+
var HoverCardPrimitive = __toESM(require("@radix-ui/react-hover-card"), 1);
|
|
2139
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2140
|
+
var HoverCard = HoverCardPrimitive.Root;
|
|
2141
|
+
var HoverCardTrigger = HoverCardPrimitive.Trigger;
|
|
2142
|
+
var HoverCardContent = React21.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2143
|
+
HoverCardPrimitive.Content,
|
|
2144
|
+
{
|
|
2145
|
+
ref,
|
|
2146
|
+
align,
|
|
2147
|
+
sideOffset,
|
|
2148
|
+
className: cn(
|
|
2149
|
+
"z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-hover-card-content-transform-origin)",
|
|
2150
|
+
className
|
|
2151
|
+
),
|
|
2152
|
+
...props
|
|
2153
|
+
}
|
|
2154
|
+
));
|
|
2155
|
+
HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
|
|
2156
|
+
|
|
2157
|
+
// src/components/input-otp.tsx
|
|
2158
|
+
var React22 = __toESM(require("react"), 1);
|
|
2159
|
+
var import_input_otp = require("input-otp");
|
|
2160
|
+
var import_lucide_react10 = require("lucide-react");
|
|
2161
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
2162
|
+
var InputOTP = React22.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2163
|
+
import_input_otp.OTPInput,
|
|
2164
|
+
{
|
|
2165
|
+
ref,
|
|
2166
|
+
containerClassName: cn(
|
|
2167
|
+
"flex items-center gap-2 has-disabled:opacity-50",
|
|
2168
|
+
containerClassName
|
|
2169
|
+
),
|
|
2170
|
+
className: cn("disabled:cursor-not-allowed", className),
|
|
2171
|
+
...props
|
|
2172
|
+
}
|
|
2173
|
+
));
|
|
2174
|
+
InputOTP.displayName = "InputOTP";
|
|
2175
|
+
var InputOTPGroup = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { ref, className: cn("flex items-center", className), ...props }));
|
|
2176
|
+
InputOTPGroup.displayName = "InputOTPGroup";
|
|
2177
|
+
var InputOTPSlot = React22.forwardRef(({ index, className, ...props }, ref) => {
|
|
2178
|
+
const inputOTPContext = React22.useContext(import_input_otp.OTPInputContext);
|
|
2179
|
+
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index] ?? {
|
|
2180
|
+
char: null,
|
|
2181
|
+
hasFakeCaret: false,
|
|
2182
|
+
isActive: false
|
|
2183
|
+
};
|
|
2184
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
2185
|
+
"div",
|
|
2186
|
+
{
|
|
2187
|
+
ref,
|
|
2188
|
+
className: cn(
|
|
2189
|
+
"relative flex items-center justify-center border-y border-r border-input text-sm shadow-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md size-9",
|
|
2190
|
+
isActive && "z-10 ring-1 ring-ring",
|
|
2191
|
+
className
|
|
2192
|
+
),
|
|
2193
|
+
...props,
|
|
2194
|
+
children: [
|
|
2195
|
+
char,
|
|
2196
|
+
hasFakeCaret && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" }) })
|
|
2197
|
+
]
|
|
2198
|
+
}
|
|
2199
|
+
);
|
|
2200
|
+
});
|
|
2201
|
+
InputOTPSlot.displayName = "InputOTPSlot";
|
|
2202
|
+
var InputOTPSeparator = React22.forwardRef(({ ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { ref, role: "separator", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react10.Minus, {}) }));
|
|
2203
|
+
InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
2204
|
+
|
|
2205
|
+
// src/components/input.tsx
|
|
2206
|
+
var React23 = __toESM(require("react"), 1);
|
|
2207
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2208
|
+
var Input = React23.forwardRef(
|
|
2209
|
+
({ className, type, ...props }, ref) => {
|
|
2210
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2211
|
+
"input",
|
|
2212
|
+
{
|
|
2213
|
+
type,
|
|
2214
|
+
className: cn(
|
|
2215
|
+
"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:font-medium file:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
2216
|
+
className
|
|
2217
|
+
),
|
|
2218
|
+
ref,
|
|
2219
|
+
...props
|
|
2220
|
+
}
|
|
2221
|
+
);
|
|
2222
|
+
}
|
|
2223
|
+
);
|
|
2224
|
+
Input.displayName = "Input";
|
|
2225
|
+
|
|
2226
|
+
// src/components/menubar.tsx
|
|
2227
|
+
var React24 = __toESM(require("react"), 1);
|
|
2228
|
+
var MenubarPrimitive = __toESM(require("@radix-ui/react-menubar"), 1);
|
|
2229
|
+
var import_lucide_react11 = require("lucide-react");
|
|
2230
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2231
|
+
function MenubarMenu({
|
|
2232
|
+
...props
|
|
2233
|
+
}) {
|
|
2234
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(MenubarPrimitive.Menu, { ...props });
|
|
2235
|
+
}
|
|
2236
|
+
function MenubarGroup({
|
|
2237
|
+
...props
|
|
2238
|
+
}) {
|
|
2239
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(MenubarPrimitive.Group, { ...props });
|
|
2240
|
+
}
|
|
2241
|
+
function MenubarPortal({
|
|
2242
|
+
...props
|
|
2243
|
+
}) {
|
|
2244
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(MenubarPrimitive.Portal, { ...props });
|
|
2245
|
+
}
|
|
2246
|
+
function MenubarRadioGroup({
|
|
2247
|
+
...props
|
|
2248
|
+
}) {
|
|
2249
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(MenubarPrimitive.RadioGroup, { ...props });
|
|
2250
|
+
}
|
|
2251
|
+
function MenubarSub({
|
|
2252
|
+
...props
|
|
2253
|
+
}) {
|
|
2254
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(MenubarPrimitive.Sub, { "data-slot": "menubar-sub", ...props });
|
|
2255
|
+
}
|
|
2256
|
+
var Menubar = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2257
|
+
MenubarPrimitive.Root,
|
|
2258
|
+
{
|
|
2259
|
+
ref,
|
|
2260
|
+
className: cn(
|
|
2261
|
+
"flex h-9 items-center space-x-1 rounded-md border bg-background p-1 shadow-sm",
|
|
2262
|
+
className
|
|
2263
|
+
),
|
|
2264
|
+
...props
|
|
2265
|
+
}
|
|
2266
|
+
));
|
|
2267
|
+
Menubar.displayName = MenubarPrimitive.Root.displayName;
|
|
2268
|
+
var MenubarTrigger = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2269
|
+
MenubarPrimitive.Trigger,
|
|
2270
|
+
{
|
|
2271
|
+
ref,
|
|
2272
|
+
className: cn(
|
|
2273
|
+
"flex cursor-default select-none items-center rounded-sm px-3 py-1 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
2274
|
+
className
|
|
2275
|
+
),
|
|
2276
|
+
...props
|
|
2277
|
+
}
|
|
2278
|
+
));
|
|
2279
|
+
MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;
|
|
2280
|
+
var MenubarSubTrigger = React24.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
2281
|
+
MenubarPrimitive.SubTrigger,
|
|
2282
|
+
{
|
|
2283
|
+
ref,
|
|
2284
|
+
className: cn(
|
|
2285
|
+
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
2286
|
+
inset && "pl-8",
|
|
2287
|
+
className
|
|
2288
|
+
),
|
|
2289
|
+
...props,
|
|
2290
|
+
children: [
|
|
2291
|
+
children,
|
|
2292
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react11.ChevronRight, { className: "ml-auto size-4" })
|
|
2293
|
+
]
|
|
2294
|
+
}
|
|
2295
|
+
));
|
|
2296
|
+
MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;
|
|
2297
|
+
var MenubarSubContent = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2298
|
+
MenubarPrimitive.SubContent,
|
|
2299
|
+
{
|
|
2300
|
+
ref,
|
|
2301
|
+
className: cn(
|
|
2302
|
+
"z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-menubar-content-transform-origin)",
|
|
2303
|
+
className
|
|
2304
|
+
),
|
|
2305
|
+
...props
|
|
2306
|
+
}
|
|
2307
|
+
));
|
|
2308
|
+
MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;
|
|
2309
|
+
var MenubarContent = React24.forwardRef(
|
|
2310
|
+
({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(MenubarPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2311
|
+
MenubarPrimitive.Content,
|
|
2312
|
+
{
|
|
2313
|
+
ref,
|
|
2314
|
+
align,
|
|
2315
|
+
alignOffset,
|
|
2316
|
+
sideOffset,
|
|
2317
|
+
className: cn(
|
|
2318
|
+
"z-50 min-w-48 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-menubar-content-transform-origin)",
|
|
2319
|
+
className
|
|
2320
|
+
),
|
|
2321
|
+
...props
|
|
2322
|
+
}
|
|
2323
|
+
) })
|
|
2324
|
+
);
|
|
2325
|
+
MenubarContent.displayName = MenubarPrimitive.Content.displayName;
|
|
2326
|
+
var MenubarItem = React24.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2327
|
+
MenubarPrimitive.Item,
|
|
2328
|
+
{
|
|
2329
|
+
ref,
|
|
2330
|
+
className: cn(
|
|
2331
|
+
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
2332
|
+
inset && "pl-8",
|
|
2333
|
+
className
|
|
2334
|
+
),
|
|
2335
|
+
...props
|
|
2336
|
+
}
|
|
2337
|
+
));
|
|
2338
|
+
MenubarItem.displayName = MenubarPrimitive.Item.displayName;
|
|
2339
|
+
var MenubarCheckboxItem = React24.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
2340
|
+
MenubarPrimitive.CheckboxItem,
|
|
2341
|
+
{
|
|
2342
|
+
ref,
|
|
2343
|
+
className: cn(
|
|
2344
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
2345
|
+
className
|
|
2346
|
+
),
|
|
2347
|
+
...props,
|
|
2348
|
+
children: [
|
|
2349
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "absolute left-2 flex items-center justify-center size-3.5", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react11.Check, { className: "size-4" }) }) }),
|
|
2350
|
+
children
|
|
2351
|
+
]
|
|
2352
|
+
}
|
|
2353
|
+
));
|
|
2354
|
+
MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;
|
|
2355
|
+
var MenubarRadioItem = React24.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
2356
|
+
MenubarPrimitive.RadioItem,
|
|
2357
|
+
{
|
|
2358
|
+
ref,
|
|
2359
|
+
className: cn(
|
|
2360
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
2361
|
+
className
|
|
2362
|
+
),
|
|
2363
|
+
...props,
|
|
2364
|
+
children: [
|
|
2365
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "absolute left-2 flex items-center justify-center size-3.5", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react11.Circle, { className: "fill-current size-4" }) }) }),
|
|
2366
|
+
children
|
|
2367
|
+
]
|
|
2368
|
+
}
|
|
2369
|
+
));
|
|
2370
|
+
MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;
|
|
2371
|
+
var MenubarLabel = React24.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2372
|
+
MenubarPrimitive.Label,
|
|
2373
|
+
{
|
|
2374
|
+
ref,
|
|
2375
|
+
className: cn(
|
|
2376
|
+
"px-2 py-1.5 text-sm font-semibold",
|
|
2377
|
+
inset && "pl-8",
|
|
2378
|
+
className
|
|
2379
|
+
),
|
|
2380
|
+
...props
|
|
2381
|
+
}
|
|
2382
|
+
));
|
|
2383
|
+
MenubarLabel.displayName = MenubarPrimitive.Label.displayName;
|
|
2384
|
+
var MenubarSeparator = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2385
|
+
MenubarPrimitive.Separator,
|
|
2386
|
+
{
|
|
2387
|
+
ref,
|
|
2388
|
+
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
2389
|
+
...props
|
|
2390
|
+
}
|
|
2391
|
+
));
|
|
2392
|
+
MenubarSeparator.displayName = MenubarPrimitive.Separator.displayName;
|
|
2393
|
+
var MenubarShortcut = ({
|
|
2394
|
+
className,
|
|
2395
|
+
...props
|
|
2396
|
+
}) => {
|
|
2397
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2398
|
+
"span",
|
|
2399
|
+
{
|
|
2400
|
+
className: cn(
|
|
2401
|
+
"ml-auto text-xs tracking-widest text-muted-foreground",
|
|
2402
|
+
className
|
|
2403
|
+
),
|
|
2404
|
+
...props
|
|
2405
|
+
}
|
|
2406
|
+
);
|
|
2407
|
+
};
|
|
2408
|
+
MenubarShortcut.displayname = "MenubarShortcut";
|
|
2409
|
+
|
|
2410
|
+
// src/components/navigation-menu.tsx
|
|
2411
|
+
var React25 = __toESM(require("react"), 1);
|
|
2412
|
+
var NavigationMenuPrimitive = __toESM(require("@radix-ui/react-navigation-menu"), 1);
|
|
2413
|
+
var import_class_variance_authority5 = require("class-variance-authority");
|
|
2414
|
+
var import_lucide_react12 = require("lucide-react");
|
|
2415
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2416
|
+
var NavigationMenu = React25.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
2417
|
+
NavigationMenuPrimitive.Root,
|
|
2418
|
+
{
|
|
2419
|
+
ref,
|
|
2420
|
+
className: cn(
|
|
2421
|
+
"relative z-10 flex max-w-max flex-1 items-center justify-center",
|
|
2422
|
+
className
|
|
2423
|
+
),
|
|
2424
|
+
...props,
|
|
2425
|
+
children: [
|
|
2426
|
+
children,
|
|
2427
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(NavigationMenuViewport, {})
|
|
2428
|
+
]
|
|
2429
|
+
}
|
|
2430
|
+
));
|
|
2431
|
+
NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;
|
|
2432
|
+
var NavigationMenuList = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2433
|
+
NavigationMenuPrimitive.List,
|
|
2434
|
+
{
|
|
2435
|
+
ref,
|
|
2436
|
+
className: cn(
|
|
2437
|
+
"group flex flex-1 list-none items-center justify-center space-x-1",
|
|
2438
|
+
className
|
|
2439
|
+
),
|
|
2440
|
+
...props
|
|
2441
|
+
}
|
|
2442
|
+
));
|
|
2443
|
+
NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName;
|
|
2444
|
+
var NavigationMenuItem = NavigationMenuPrimitive.Item;
|
|
2445
|
+
var navigationMenuTriggerStyle = (0, import_class_variance_authority5.cva)(
|
|
2446
|
+
"group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium cursor-pointer transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed data-[state=open]:text-accent-foreground data-[state=open]:bg-accent/50 data-[state=open]:hover:bg-accent data-[state=open]:focus:bg-accent"
|
|
2447
|
+
);
|
|
2448
|
+
var NavigationMenuTrigger = React25.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
2449
|
+
NavigationMenuPrimitive.Trigger,
|
|
2450
|
+
{
|
|
2451
|
+
ref,
|
|
2452
|
+
className: cn(navigationMenuTriggerStyle(), "group", className),
|
|
2453
|
+
...props,
|
|
2454
|
+
children: [
|
|
2455
|
+
children,
|
|
2456
|
+
" ",
|
|
2457
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2458
|
+
import_lucide_react12.ChevronDown,
|
|
2459
|
+
{
|
|
2460
|
+
className: "relative top-px ml-1 transition duration-300 group-data-[state=open]:rotate-180 size-3",
|
|
2461
|
+
"aria-hidden": "true"
|
|
2462
|
+
}
|
|
2463
|
+
)
|
|
2464
|
+
]
|
|
2465
|
+
}
|
|
2466
|
+
));
|
|
2467
|
+
NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;
|
|
2468
|
+
var NavigationMenuContent = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2469
|
+
NavigationMenuPrimitive.Content,
|
|
2470
|
+
{
|
|
2471
|
+
ref,
|
|
2472
|
+
className: cn(
|
|
2473
|
+
"left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ",
|
|
2474
|
+
className
|
|
2475
|
+
),
|
|
2476
|
+
...props
|
|
2477
|
+
}
|
|
2478
|
+
));
|
|
2479
|
+
NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;
|
|
2480
|
+
var NavigationMenuLink = NavigationMenuPrimitive.Link;
|
|
2481
|
+
var NavigationMenuViewport = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: cn("absolute left-0 top-full flex justify-center"), children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2482
|
+
NavigationMenuPrimitive.Viewport,
|
|
2483
|
+
{
|
|
2484
|
+
className: cn(
|
|
2485
|
+
"origin-top-center relative mt-1.5 h-(--radix-navigation-menu-viewport-height) w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-(--radix-navigation-menu-viewport-width)",
|
|
2486
|
+
className
|
|
2487
|
+
),
|
|
2488
|
+
ref,
|
|
2489
|
+
...props
|
|
2490
|
+
}
|
|
2491
|
+
) }));
|
|
2492
|
+
NavigationMenuViewport.displayName = NavigationMenuPrimitive.Viewport.displayName;
|
|
2493
|
+
var NavigationMenuIndicator = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2494
|
+
NavigationMenuPrimitive.Indicator,
|
|
2495
|
+
{
|
|
2496
|
+
ref,
|
|
2497
|
+
className: cn(
|
|
2498
|
+
"top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",
|
|
2499
|
+
className
|
|
2500
|
+
),
|
|
2501
|
+
...props,
|
|
2502
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "relative top-[60%] rotate-45 rounded-tl-sm bg-border shadow-md size-2" })
|
|
2503
|
+
}
|
|
2504
|
+
));
|
|
2505
|
+
NavigationMenuIndicator.displayName = NavigationMenuPrimitive.Indicator.displayName;
|
|
2506
|
+
|
|
2507
|
+
// src/components/pagination.tsx
|
|
2508
|
+
var React26 = __toESM(require("react"), 1);
|
|
2509
|
+
var import_lucide_react13 = require("lucide-react");
|
|
2510
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2511
|
+
var Pagination = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2512
|
+
"nav",
|
|
2513
|
+
{
|
|
2514
|
+
role: "navigation",
|
|
2515
|
+
"aria-label": "pagination",
|
|
2516
|
+
className: cn("mx-auto flex w-full justify-center", className),
|
|
2517
|
+
...props
|
|
2518
|
+
}
|
|
2519
|
+
);
|
|
2520
|
+
Pagination.displayName = "Pagination";
|
|
2521
|
+
var PaginationContent = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2522
|
+
"ul",
|
|
2523
|
+
{
|
|
2524
|
+
ref,
|
|
2525
|
+
className: cn("flex flex-row items-center gap-1", className),
|
|
2526
|
+
...props
|
|
2527
|
+
}
|
|
2528
|
+
));
|
|
2529
|
+
PaginationContent.displayName = "PaginationContent";
|
|
2530
|
+
var PaginationItem = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("li", { ref, className: cn("", className), ...props }));
|
|
2531
|
+
PaginationItem.displayName = "PaginationItem";
|
|
2532
|
+
var PaginationLink = ({
|
|
2533
|
+
className,
|
|
2534
|
+
isActive,
|
|
2535
|
+
size = "icon",
|
|
2536
|
+
...props
|
|
2537
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2538
|
+
"a",
|
|
2539
|
+
{
|
|
2540
|
+
"aria-current": isActive ? "page" : void 0,
|
|
2541
|
+
className: cn(
|
|
2542
|
+
buttonVariants({
|
|
2543
|
+
variant: isActive ? "outline" : "ghost",
|
|
2544
|
+
size
|
|
2545
|
+
}),
|
|
2546
|
+
className
|
|
2547
|
+
),
|
|
2548
|
+
...props
|
|
2549
|
+
}
|
|
2550
|
+
);
|
|
2551
|
+
PaginationLink.displayName = "PaginationLink";
|
|
2552
|
+
var PaginationPrevious = ({
|
|
2553
|
+
className,
|
|
2554
|
+
...props
|
|
2555
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
2556
|
+
PaginationLink,
|
|
2557
|
+
{
|
|
2558
|
+
"aria-label": "Go to previous page",
|
|
2559
|
+
size: "default",
|
|
2560
|
+
className: cn("gap-1 pl-2.5", className),
|
|
2561
|
+
...props,
|
|
2562
|
+
children: [
|
|
2563
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react13.ChevronLeft, { className: "size-4" }),
|
|
2564
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: "Previous" })
|
|
2565
|
+
]
|
|
2566
|
+
}
|
|
2567
|
+
);
|
|
2568
|
+
PaginationPrevious.displayName = "PaginationPrevious";
|
|
2569
|
+
var PaginationNext = ({
|
|
2570
|
+
className,
|
|
2571
|
+
...props
|
|
2572
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
2573
|
+
PaginationLink,
|
|
2574
|
+
{
|
|
2575
|
+
"aria-label": "Go to next page",
|
|
2576
|
+
size: "default",
|
|
2577
|
+
className: cn("gap-1 pr-2.5", className),
|
|
2578
|
+
...props,
|
|
2579
|
+
children: [
|
|
2580
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: "Next" }),
|
|
2581
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react13.ChevronRight, { className: "size-4" })
|
|
2582
|
+
]
|
|
2583
|
+
}
|
|
2584
|
+
);
|
|
2585
|
+
PaginationNext.displayName = "PaginationNext";
|
|
2586
|
+
var PaginationEllipsis = ({
|
|
2587
|
+
className,
|
|
2588
|
+
...props
|
|
2589
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
2590
|
+
"span",
|
|
2591
|
+
{
|
|
2592
|
+
"aria-hidden": true,
|
|
2593
|
+
className: cn("flex items-center justify-center size-9", className),
|
|
2594
|
+
...props,
|
|
2595
|
+
children: [
|
|
2596
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react13.MoreHorizontal, { className: "size-4" }),
|
|
2597
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "sr-only", children: "More pages" })
|
|
2598
|
+
]
|
|
2599
|
+
}
|
|
2600
|
+
);
|
|
2601
|
+
PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
2602
|
+
|
|
2603
|
+
// src/components/popover.tsx
|
|
2604
|
+
var React27 = __toESM(require("react"), 1);
|
|
2605
|
+
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"), 1);
|
|
2606
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2607
|
+
var Popover = PopoverPrimitive.Root;
|
|
2608
|
+
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
2609
|
+
var PopoverAnchor = PopoverPrimitive.Anchor;
|
|
2610
|
+
var PopoverContent = React27.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(PopoverPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2611
|
+
PopoverPrimitive.Content,
|
|
2612
|
+
{
|
|
2613
|
+
ref,
|
|
2614
|
+
align,
|
|
2615
|
+
sideOffset,
|
|
2616
|
+
className: cn(
|
|
2617
|
+
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-popover-content-transform-origin)",
|
|
2618
|
+
className
|
|
2619
|
+
),
|
|
2620
|
+
...props
|
|
2621
|
+
}
|
|
2622
|
+
) }));
|
|
2623
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
2624
|
+
|
|
2625
|
+
// src/components/progress.tsx
|
|
2626
|
+
var React28 = __toESM(require("react"), 1);
|
|
2627
|
+
var ProgressPrimitive = __toESM(require("@radix-ui/react-progress"), 1);
|
|
2628
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2629
|
+
var Progress = React28.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2630
|
+
ProgressPrimitive.Root,
|
|
2631
|
+
{
|
|
2632
|
+
ref,
|
|
2633
|
+
className: cn(
|
|
2634
|
+
"relative h-2 w-full overflow-hidden rounded-full bg-primary/20",
|
|
2635
|
+
className
|
|
2636
|
+
),
|
|
2637
|
+
...props,
|
|
2638
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2639
|
+
ProgressPrimitive.Indicator,
|
|
2640
|
+
{
|
|
2641
|
+
className: "flex-1 bg-primary transition-all size-full",
|
|
2642
|
+
style: { transform: `translateX(-${100 - (value || 0)}%)` }
|
|
2643
|
+
}
|
|
2644
|
+
)
|
|
2645
|
+
}
|
|
2646
|
+
));
|
|
2647
|
+
Progress.displayName = ProgressPrimitive.Root.displayName;
|
|
2648
|
+
|
|
2649
|
+
// src/components/radio-group.tsx
|
|
2650
|
+
var React29 = __toESM(require("react"), 1);
|
|
2651
|
+
var RadioGroupPrimitive = __toESM(require("@radix-ui/react-radio-group"), 1);
|
|
2652
|
+
var import_lucide_react14 = require("lucide-react");
|
|
2653
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2654
|
+
var RadioGroup4 = React29.forwardRef(({ className, ...props }, ref) => {
|
|
2655
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2656
|
+
RadioGroupPrimitive.Root,
|
|
2657
|
+
{
|
|
2658
|
+
className: cn("grid gap-2", className),
|
|
2659
|
+
...props,
|
|
2660
|
+
ref
|
|
2661
|
+
}
|
|
2662
|
+
);
|
|
2663
|
+
});
|
|
2664
|
+
RadioGroup4.displayName = RadioGroupPrimitive.Root.displayName;
|
|
2665
|
+
var RadioGroupItem = React29.forwardRef(({ className, ...props }, ref) => {
|
|
2666
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2667
|
+
RadioGroupPrimitive.Item,
|
|
2668
|
+
{
|
|
2669
|
+
ref,
|
|
2670
|
+
className: cn(
|
|
2671
|
+
"aspect-square rounded-full border border-primary text-primary shadow cursor-pointer focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 size-4",
|
|
2672
|
+
className
|
|
2673
|
+
),
|
|
2674
|
+
...props,
|
|
2675
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react14.Circle, { className: "fill-primary size-3.5" }) })
|
|
2676
|
+
}
|
|
2677
|
+
);
|
|
2678
|
+
});
|
|
2679
|
+
RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
|
|
2680
|
+
|
|
2681
|
+
// src/components/resizable.tsx
|
|
2682
|
+
var import_lucide_react15 = require("lucide-react");
|
|
2683
|
+
var import_react_resizable_panels = require("react-resizable-panels");
|
|
2684
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2685
|
+
var ResizablePanelGroup = ({
|
|
2686
|
+
className,
|
|
2687
|
+
...props
|
|
2688
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2689
|
+
import_react_resizable_panels.Group,
|
|
2690
|
+
{
|
|
2691
|
+
className: cn(
|
|
2692
|
+
"flex data-[panel-group-direction=vertical]:flex-col size-full",
|
|
2693
|
+
className
|
|
2694
|
+
),
|
|
2695
|
+
...props
|
|
2696
|
+
}
|
|
2697
|
+
);
|
|
2698
|
+
var ResizablePanel = import_react_resizable_panels.Panel;
|
|
2699
|
+
var ResizableHandle = ({
|
|
2700
|
+
withHandle,
|
|
2701
|
+
className,
|
|
2702
|
+
...props
|
|
2703
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2704
|
+
import_react_resizable_panels.Separator,
|
|
2705
|
+
{
|
|
2706
|
+
className: cn(
|
|
2707
|
+
"relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",
|
|
2708
|
+
className
|
|
2709
|
+
),
|
|
2710
|
+
...props,
|
|
2711
|
+
children: withHandle && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react15.GripVertical, { className: "size-2.5" }) })
|
|
2712
|
+
}
|
|
2713
|
+
);
|
|
2714
|
+
|
|
2715
|
+
// src/components/scroll-area.tsx
|
|
2716
|
+
var React30 = __toESM(require("react"), 1);
|
|
2717
|
+
var ScrollAreaPrimitive = __toESM(require("@radix-ui/react-scroll-area"), 1);
|
|
2718
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2719
|
+
var ScrollArea = React30.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
2720
|
+
ScrollAreaPrimitive.Root,
|
|
2721
|
+
{
|
|
2722
|
+
ref,
|
|
2723
|
+
className: cn("relative overflow-hidden", className),
|
|
2724
|
+
...props,
|
|
2725
|
+
children: [
|
|
2726
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ScrollAreaPrimitive.Viewport, { className: "rounded-[inherit] size-full", children }),
|
|
2727
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ScrollBar, {}),
|
|
2728
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ScrollAreaPrimitive.Corner, {})
|
|
2729
|
+
]
|
|
2730
|
+
}
|
|
2731
|
+
));
|
|
2732
|
+
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
2733
|
+
var ScrollBar = React30.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2734
|
+
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
2735
|
+
{
|
|
2736
|
+
ref,
|
|
2737
|
+
orientation,
|
|
2738
|
+
className: cn(
|
|
2739
|
+
"flex touch-none select-none transition-colors",
|
|
2740
|
+
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-px",
|
|
2741
|
+
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-px",
|
|
2742
|
+
className
|
|
2743
|
+
),
|
|
2744
|
+
...props,
|
|
2745
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
2746
|
+
}
|
|
2747
|
+
));
|
|
2748
|
+
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
2749
|
+
|
|
2750
|
+
// src/components/select.tsx
|
|
2751
|
+
var React31 = __toESM(require("react"), 1);
|
|
2752
|
+
var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
|
|
2753
|
+
var import_lucide_react16 = require("lucide-react");
|
|
2754
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2755
|
+
var Select = SelectPrimitive.Root;
|
|
2756
|
+
var SelectGroup = SelectPrimitive.Group;
|
|
2757
|
+
var SelectValue = SelectPrimitive.Value;
|
|
2758
|
+
var SelectTrigger = React31.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
2759
|
+
SelectPrimitive.Trigger,
|
|
2760
|
+
{
|
|
2761
|
+
ref,
|
|
2762
|
+
className: cn(
|
|
2763
|
+
"flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background cursor-pointer data-placeholder:text-muted-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:opacity-50 [&>span]:line-clamp-1",
|
|
2764
|
+
className
|
|
2765
|
+
),
|
|
2766
|
+
...props,
|
|
2767
|
+
children: [
|
|
2768
|
+
children,
|
|
2769
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react16.ChevronDown, { className: "opacity-50 size-4" }) })
|
|
2770
|
+
]
|
|
2771
|
+
}
|
|
2772
|
+
));
|
|
2773
|
+
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
2774
|
+
var SelectScrollUpButton = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2775
|
+
SelectPrimitive.ScrollUpButton,
|
|
2776
|
+
{
|
|
2777
|
+
ref,
|
|
2778
|
+
className: cn(
|
|
2779
|
+
"flex cursor-default items-center justify-center py-1",
|
|
2780
|
+
className
|
|
2781
|
+
),
|
|
2782
|
+
...props,
|
|
2783
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react16.ChevronUp, { className: "size-4" })
|
|
2784
|
+
}
|
|
2785
|
+
));
|
|
2786
|
+
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
2787
|
+
var SelectScrollDownButton = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2788
|
+
SelectPrimitive.ScrollDownButton,
|
|
2789
|
+
{
|
|
2790
|
+
ref,
|
|
2791
|
+
className: cn(
|
|
2792
|
+
"flex cursor-default items-center justify-center py-1",
|
|
2793
|
+
className
|
|
2794
|
+
),
|
|
2795
|
+
...props,
|
|
2796
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react16.ChevronDown, { className: "size-4" })
|
|
2797
|
+
}
|
|
2798
|
+
));
|
|
2799
|
+
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
2800
|
+
var SelectContent = React31.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
2801
|
+
SelectPrimitive.Content,
|
|
2802
|
+
{
|
|
2803
|
+
ref,
|
|
2804
|
+
className: cn(
|
|
2805
|
+
"relative z-50 max-h-(--radix-select-content-available-height) min-w-32 overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-select-content-transform-origin)",
|
|
2806
|
+
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1",
|
|
2807
|
+
className
|
|
2808
|
+
),
|
|
2809
|
+
position,
|
|
2810
|
+
...props,
|
|
2811
|
+
children: [
|
|
2812
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SelectScrollUpButton, {}),
|
|
2813
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2814
|
+
SelectPrimitive.Viewport,
|
|
2815
|
+
{
|
|
2816
|
+
className: cn(
|
|
2817
|
+
"p-1",
|
|
2818
|
+
position === "popper" && "h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)"
|
|
2819
|
+
),
|
|
2820
|
+
children
|
|
2821
|
+
}
|
|
2822
|
+
),
|
|
2823
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SelectScrollDownButton, {})
|
|
2824
|
+
]
|
|
2825
|
+
}
|
|
2826
|
+
) }));
|
|
2827
|
+
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
2828
|
+
var SelectLabel = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2829
|
+
SelectPrimitive.Label,
|
|
2830
|
+
{
|
|
2831
|
+
ref,
|
|
2832
|
+
className: cn("px-2 py-1.5 text-sm font-semibold", className),
|
|
2833
|
+
...props
|
|
2834
|
+
}
|
|
2835
|
+
));
|
|
2836
|
+
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
2837
|
+
var SelectItem = React31.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
2838
|
+
SelectPrimitive.Item,
|
|
2839
|
+
{
|
|
2840
|
+
ref,
|
|
2841
|
+
className: cn(
|
|
2842
|
+
"relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
2843
|
+
className
|
|
2844
|
+
),
|
|
2845
|
+
...props,
|
|
2846
|
+
children: [
|
|
2847
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "absolute right-2 flex items-center justify-center size-3.5", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react16.Check, { className: "size-4" }) }) }),
|
|
2848
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(SelectPrimitive.ItemText, { children })
|
|
2849
|
+
]
|
|
2850
|
+
}
|
|
2851
|
+
));
|
|
2852
|
+
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
2853
|
+
var SelectSeparator = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2854
|
+
SelectPrimitive.Separator,
|
|
2855
|
+
{
|
|
2856
|
+
ref,
|
|
2857
|
+
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
2858
|
+
...props
|
|
2859
|
+
}
|
|
2860
|
+
));
|
|
2861
|
+
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
2862
|
+
|
|
2863
|
+
// src/components/separator.tsx
|
|
2864
|
+
var React32 = __toESM(require("react"), 1);
|
|
2865
|
+
var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"), 1);
|
|
2866
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2867
|
+
var Separator6 = React32.forwardRef(
|
|
2868
|
+
({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2869
|
+
SeparatorPrimitive.Root,
|
|
2870
|
+
{
|
|
2871
|
+
ref,
|
|
2872
|
+
decorative,
|
|
2873
|
+
orientation,
|
|
2874
|
+
className: cn(
|
|
2875
|
+
"shrink-0 bg-border",
|
|
2876
|
+
orientation === "horizontal" ? "h-px w-full" : "h-full w-px",
|
|
2877
|
+
className
|
|
2878
|
+
),
|
|
2879
|
+
...props
|
|
2880
|
+
}
|
|
2881
|
+
)
|
|
2882
|
+
);
|
|
2883
|
+
Separator6.displayName = SeparatorPrimitive.Root.displayName;
|
|
2884
|
+
|
|
2885
|
+
// src/components/sheet.tsx
|
|
2886
|
+
var React33 = __toESM(require("react"), 1);
|
|
2887
|
+
var SheetPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
2888
|
+
var import_class_variance_authority6 = require("class-variance-authority");
|
|
2889
|
+
var import_lucide_react17 = require("lucide-react");
|
|
2890
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2891
|
+
var Sheet = SheetPrimitive.Root;
|
|
2892
|
+
var SheetTrigger = SheetPrimitive.Trigger;
|
|
2893
|
+
var SheetClose = SheetPrimitive.Close;
|
|
2894
|
+
var SheetPortal = SheetPrimitive.Portal;
|
|
2895
|
+
var SheetOverlay = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2896
|
+
SheetPrimitive.Overlay,
|
|
2897
|
+
{
|
|
2898
|
+
className: cn(
|
|
2899
|
+
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
2900
|
+
className
|
|
2901
|
+
),
|
|
2902
|
+
...props,
|
|
2903
|
+
ref
|
|
2904
|
+
}
|
|
2905
|
+
));
|
|
2906
|
+
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
|
|
2907
|
+
var sheetVariants = (0, import_class_variance_authority6.cva)(
|
|
2908
|
+
"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
2909
|
+
{
|
|
2910
|
+
variants: {
|
|
2911
|
+
side: {
|
|
2912
|
+
top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
2913
|
+
bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
2914
|
+
left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
|
|
2915
|
+
right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"
|
|
2916
|
+
}
|
|
2917
|
+
},
|
|
2918
|
+
defaultVariants: {
|
|
2919
|
+
side: "right"
|
|
2920
|
+
}
|
|
2921
|
+
}
|
|
2922
|
+
);
|
|
2923
|
+
var SheetContent = React33.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(SheetPortal, { children: [
|
|
2924
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(SheetOverlay, {}),
|
|
2925
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
2926
|
+
SheetPrimitive.Content,
|
|
2927
|
+
{
|
|
2928
|
+
ref,
|
|
2929
|
+
className: cn(sheetVariants({ side }), className),
|
|
2930
|
+
...props,
|
|
2931
|
+
children: [
|
|
2932
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background cursor-pointer transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
2933
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react17.X, { className: "size-4" }),
|
|
2934
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "sr-only", children: "Close" })
|
|
2935
|
+
] }),
|
|
2936
|
+
children
|
|
2937
|
+
]
|
|
2938
|
+
}
|
|
2939
|
+
)
|
|
2940
|
+
] }));
|
|
2941
|
+
SheetContent.displayName = SheetPrimitive.Content.displayName;
|
|
2942
|
+
var SheetHeader = ({
|
|
2943
|
+
className,
|
|
2944
|
+
...props
|
|
2945
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2946
|
+
"div",
|
|
2947
|
+
{
|
|
2948
|
+
className: cn(
|
|
2949
|
+
"flex flex-col space-y-2 text-center sm:text-left",
|
|
2950
|
+
className
|
|
2951
|
+
),
|
|
2952
|
+
...props
|
|
2953
|
+
}
|
|
2954
|
+
);
|
|
2955
|
+
SheetHeader.displayName = "SheetHeader";
|
|
2956
|
+
var SheetFooter = ({
|
|
2957
|
+
className,
|
|
2958
|
+
...props
|
|
2959
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2960
|
+
"div",
|
|
2961
|
+
{
|
|
2962
|
+
className: cn(
|
|
2963
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
2964
|
+
className
|
|
2965
|
+
),
|
|
2966
|
+
...props
|
|
2967
|
+
}
|
|
2968
|
+
);
|
|
2969
|
+
SheetFooter.displayName = "SheetFooter";
|
|
2970
|
+
var SheetTitle = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2971
|
+
SheetPrimitive.Title,
|
|
2972
|
+
{
|
|
2973
|
+
ref,
|
|
2974
|
+
className: cn("text-lg font-semibold text-foreground", className),
|
|
2975
|
+
...props
|
|
2976
|
+
}
|
|
2977
|
+
));
|
|
2978
|
+
SheetTitle.displayName = SheetPrimitive.Title.displayName;
|
|
2979
|
+
var SheetDescription = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2980
|
+
SheetPrimitive.Description,
|
|
2981
|
+
{
|
|
2982
|
+
ref,
|
|
2983
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
2984
|
+
...props
|
|
2985
|
+
}
|
|
2986
|
+
));
|
|
2987
|
+
SheetDescription.displayName = SheetPrimitive.Description.displayName;
|
|
2988
|
+
|
|
2989
|
+
// src/components/sidebar.tsx
|
|
2990
|
+
var React35 = __toESM(require("react"), 1);
|
|
2991
|
+
var import_react_slot4 = require("@radix-ui/react-slot");
|
|
2992
|
+
var import_class_variance_authority7 = require("class-variance-authority");
|
|
2993
|
+
var import_lucide_react18 = require("lucide-react");
|
|
2994
|
+
|
|
2995
|
+
// src/components/skeleton.tsx
|
|
2996
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2997
|
+
function Skeleton({
|
|
2998
|
+
className,
|
|
2999
|
+
...props
|
|
3000
|
+
}) {
|
|
3001
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3002
|
+
"div",
|
|
3003
|
+
{
|
|
3004
|
+
className: cn("animate-pulse rounded-md bg-primary/10", className),
|
|
3005
|
+
...props
|
|
3006
|
+
}
|
|
3007
|
+
);
|
|
3008
|
+
}
|
|
3009
|
+
|
|
3010
|
+
// src/components/tooltip.tsx
|
|
3011
|
+
var React34 = __toESM(require("react"), 1);
|
|
3012
|
+
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
|
|
3013
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3014
|
+
var TooltipProvider = TooltipPrimitive.Provider;
|
|
3015
|
+
var Tooltip2 = TooltipPrimitive.Root;
|
|
3016
|
+
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
3017
|
+
var TooltipContent = React34.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(TooltipPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3018
|
+
TooltipPrimitive.Content,
|
|
3019
|
+
{
|
|
3020
|
+
ref,
|
|
3021
|
+
sideOffset,
|
|
3022
|
+
className: cn(
|
|
3023
|
+
"z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-tooltip-content-transform-origin)",
|
|
3024
|
+
className
|
|
3025
|
+
),
|
|
3026
|
+
...props
|
|
3027
|
+
}
|
|
3028
|
+
) }));
|
|
3029
|
+
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
3030
|
+
|
|
3031
|
+
// src/components/sidebar.tsx
|
|
3032
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3033
|
+
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
3034
|
+
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
3035
|
+
var SIDEBAR_WIDTH = "16rem";
|
|
3036
|
+
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
3037
|
+
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
3038
|
+
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
3039
|
+
var SidebarContext = React35.createContext(null);
|
|
3040
|
+
function useSidebar() {
|
|
3041
|
+
const context = React35.useContext(SidebarContext);
|
|
3042
|
+
if (!context) {
|
|
3043
|
+
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
3044
|
+
}
|
|
3045
|
+
return context;
|
|
3046
|
+
}
|
|
3047
|
+
var SidebarProvider = React35.forwardRef(
|
|
3048
|
+
({
|
|
3049
|
+
defaultOpen = true,
|
|
3050
|
+
open: openProp,
|
|
3051
|
+
onOpenChange: setOpenProp,
|
|
3052
|
+
className,
|
|
3053
|
+
style,
|
|
3054
|
+
children,
|
|
3055
|
+
...props
|
|
3056
|
+
}, ref) => {
|
|
3057
|
+
const isMobile = useIsMobile();
|
|
3058
|
+
const [openMobile, setOpenMobile] = React35.useState(false);
|
|
3059
|
+
const [_open, _setOpen] = React35.useState(defaultOpen);
|
|
3060
|
+
const open = openProp ?? _open;
|
|
3061
|
+
const setOpen = React35.useCallback(
|
|
3062
|
+
(value) => {
|
|
3063
|
+
const openState = typeof value === "function" ? value(open) : value;
|
|
3064
|
+
if (setOpenProp) {
|
|
3065
|
+
setOpenProp(openState);
|
|
3066
|
+
} else {
|
|
3067
|
+
_setOpen(openState);
|
|
3068
|
+
}
|
|
3069
|
+
document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
|
|
3070
|
+
},
|
|
3071
|
+
[setOpenProp, open]
|
|
3072
|
+
);
|
|
3073
|
+
const toggleSidebar = React35.useCallback(() => {
|
|
3074
|
+
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
3075
|
+
}, [isMobile, setOpen, setOpenMobile]);
|
|
3076
|
+
React35.useEffect(() => {
|
|
3077
|
+
const handleKeyDown = (event) => {
|
|
3078
|
+
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
3079
|
+
event.preventDefault();
|
|
3080
|
+
toggleSidebar();
|
|
3081
|
+
}
|
|
3082
|
+
};
|
|
3083
|
+
window.addEventListener("keydown", handleKeyDown);
|
|
3084
|
+
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
3085
|
+
}, [toggleSidebar]);
|
|
3086
|
+
const state = open ? "expanded" : "collapsed";
|
|
3087
|
+
const contextValue = React35.useMemo(
|
|
3088
|
+
() => ({
|
|
3089
|
+
state,
|
|
3090
|
+
open,
|
|
3091
|
+
setOpen,
|
|
3092
|
+
isMobile,
|
|
3093
|
+
openMobile,
|
|
3094
|
+
setOpenMobile,
|
|
3095
|
+
toggleSidebar
|
|
3096
|
+
}),
|
|
3097
|
+
[
|
|
3098
|
+
state,
|
|
3099
|
+
open,
|
|
3100
|
+
setOpen,
|
|
3101
|
+
isMobile,
|
|
3102
|
+
openMobile,
|
|
3103
|
+
setOpenMobile,
|
|
3104
|
+
toggleSidebar
|
|
3105
|
+
]
|
|
3106
|
+
);
|
|
3107
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3108
|
+
"div",
|
|
3109
|
+
{
|
|
3110
|
+
style: {
|
|
3111
|
+
"--sidebar-width": SIDEBAR_WIDTH,
|
|
3112
|
+
"--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
|
|
3113
|
+
...style
|
|
3114
|
+
},
|
|
3115
|
+
className: cn(
|
|
3116
|
+
"group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",
|
|
3117
|
+
className
|
|
3118
|
+
),
|
|
3119
|
+
ref,
|
|
3120
|
+
...props,
|
|
3121
|
+
children
|
|
3122
|
+
}
|
|
3123
|
+
) }) });
|
|
3124
|
+
}
|
|
3125
|
+
);
|
|
3126
|
+
SidebarProvider.displayName = "SidebarProvider";
|
|
3127
|
+
var Sidebar = React35.forwardRef(
|
|
3128
|
+
({
|
|
3129
|
+
side = "left",
|
|
3130
|
+
variant = "sidebar",
|
|
3131
|
+
collapsible = "offcanvas",
|
|
3132
|
+
className,
|
|
3133
|
+
children,
|
|
3134
|
+
...props
|
|
3135
|
+
}, ref) => {
|
|
3136
|
+
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
3137
|
+
if (collapsible === "none") {
|
|
3138
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3139
|
+
"div",
|
|
3140
|
+
{
|
|
3141
|
+
className: cn(
|
|
3142
|
+
"flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",
|
|
3143
|
+
className
|
|
3144
|
+
),
|
|
3145
|
+
ref,
|
|
3146
|
+
...props,
|
|
3147
|
+
children
|
|
3148
|
+
}
|
|
3149
|
+
);
|
|
3150
|
+
}
|
|
3151
|
+
if (isMobile) {
|
|
3152
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
3153
|
+
SheetContent,
|
|
3154
|
+
{
|
|
3155
|
+
"data-sidebar": "sidebar",
|
|
3156
|
+
"data-mobile": "true",
|
|
3157
|
+
className: "w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
|
|
3158
|
+
style: {
|
|
3159
|
+
"--sidebar-width": SIDEBAR_WIDTH_MOBILE
|
|
3160
|
+
},
|
|
3161
|
+
side,
|
|
3162
|
+
children: [
|
|
3163
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(SheetHeader, { className: "sr-only", children: [
|
|
3164
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(SheetTitle, { children: "Sidebar" }),
|
|
3165
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(SheetDescription, { children: "Displays the mobile sidebar." })
|
|
3166
|
+
] }),
|
|
3167
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "flex flex-col size-full", children })
|
|
3168
|
+
]
|
|
3169
|
+
}
|
|
3170
|
+
) });
|
|
3171
|
+
}
|
|
3172
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
3173
|
+
"div",
|
|
3174
|
+
{
|
|
3175
|
+
ref,
|
|
3176
|
+
className: "group peer hidden text-sidebar-foreground md:block",
|
|
3177
|
+
"data-state": state,
|
|
3178
|
+
"data-collapsible": state === "collapsed" ? collapsible : "",
|
|
3179
|
+
"data-variant": variant,
|
|
3180
|
+
"data-side": side,
|
|
3181
|
+
children: [
|
|
3182
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3183
|
+
"div",
|
|
3184
|
+
{
|
|
3185
|
+
className: cn(
|
|
3186
|
+
"relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear",
|
|
3187
|
+
"group-data-[collapsible=offcanvas]:w-0",
|
|
3188
|
+
"group-data-[side=right]:rotate-180",
|
|
3189
|
+
variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)"
|
|
3190
|
+
)
|
|
3191
|
+
}
|
|
3192
|
+
),
|
|
3193
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3194
|
+
"div",
|
|
3195
|
+
{
|
|
3196
|
+
className: cn(
|
|
3197
|
+
"fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",
|
|
3198
|
+
side === "left" ? "left-0 group-data-[collapsible=offcanvas]:-left-(--sidebar-width)" : "right-0 group-data-[collapsible=offcanvas]:-right-(--sidebar-width)",
|
|
3199
|
+
// Adjust the padding for floating and inset variants.
|
|
3200
|
+
variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",
|
|
3201
|
+
className
|
|
3202
|
+
),
|
|
3203
|
+
...props,
|
|
3204
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3205
|
+
"div",
|
|
3206
|
+
{
|
|
3207
|
+
"data-sidebar": "sidebar",
|
|
3208
|
+
className: "flex flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow size-full",
|
|
3209
|
+
children
|
|
3210
|
+
}
|
|
3211
|
+
)
|
|
3212
|
+
}
|
|
3213
|
+
)
|
|
3214
|
+
]
|
|
3215
|
+
}
|
|
3216
|
+
);
|
|
3217
|
+
}
|
|
3218
|
+
);
|
|
3219
|
+
Sidebar.displayName = "Sidebar";
|
|
3220
|
+
var SidebarTrigger = React35.forwardRef(({ className, onClick, ...props }, ref) => {
|
|
3221
|
+
const { toggleSidebar } = useSidebar();
|
|
3222
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
3223
|
+
Button,
|
|
3224
|
+
{
|
|
3225
|
+
ref,
|
|
3226
|
+
"data-sidebar": "trigger",
|
|
3227
|
+
variant: "ghost",
|
|
3228
|
+
size: "icon",
|
|
3229
|
+
className: cn("size-7", className),
|
|
3230
|
+
onClick: (event) => {
|
|
3231
|
+
onClick?.(event);
|
|
3232
|
+
toggleSidebar();
|
|
3233
|
+
},
|
|
3234
|
+
...props,
|
|
3235
|
+
children: [
|
|
3236
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react18.PanelLeft, {}),
|
|
3237
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
3238
|
+
]
|
|
3239
|
+
}
|
|
3240
|
+
);
|
|
3241
|
+
});
|
|
3242
|
+
SidebarTrigger.displayName = "SidebarTrigger";
|
|
3243
|
+
var SidebarRail = React35.forwardRef(({ className, ...props }, ref) => {
|
|
3244
|
+
const { toggleSidebar } = useSidebar();
|
|
3245
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3246
|
+
"button",
|
|
3247
|
+
{
|
|
3248
|
+
ref,
|
|
3249
|
+
"data-sidebar": "rail",
|
|
3250
|
+
"aria-label": "Toggle Sidebar",
|
|
3251
|
+
tabIndex: -1,
|
|
3252
|
+
onClick: toggleSidebar,
|
|
3253
|
+
title: "Toggle Sidebar",
|
|
3254
|
+
className: cn(
|
|
3255
|
+
"absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex",
|
|
3256
|
+
"in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize",
|
|
3257
|
+
"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
|
|
3258
|
+
"group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar",
|
|
3259
|
+
"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
|
|
3260
|
+
"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
|
|
3261
|
+
className
|
|
3262
|
+
),
|
|
3263
|
+
...props
|
|
3264
|
+
}
|
|
3265
|
+
);
|
|
3266
|
+
});
|
|
3267
|
+
SidebarRail.displayName = "SidebarRail";
|
|
3268
|
+
var SidebarInset = React35.forwardRef(({ className, ...props }, ref) => {
|
|
3269
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3270
|
+
"main",
|
|
3271
|
+
{
|
|
3272
|
+
ref,
|
|
3273
|
+
className: cn(
|
|
3274
|
+
"relative flex w-full flex-1 flex-col bg-background",
|
|
3275
|
+
"md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",
|
|
3276
|
+
className
|
|
3277
|
+
),
|
|
3278
|
+
...props
|
|
3279
|
+
}
|
|
3280
|
+
);
|
|
3281
|
+
});
|
|
3282
|
+
SidebarInset.displayName = "SidebarInset";
|
|
3283
|
+
var SidebarInput = React35.forwardRef(({ className, ...props }, ref) => {
|
|
3284
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3285
|
+
Input,
|
|
3286
|
+
{
|
|
3287
|
+
ref,
|
|
3288
|
+
"data-sidebar": "input",
|
|
3289
|
+
className: cn(
|
|
3290
|
+
"h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",
|
|
3291
|
+
className
|
|
3292
|
+
),
|
|
3293
|
+
...props
|
|
3294
|
+
}
|
|
3295
|
+
);
|
|
3296
|
+
});
|
|
3297
|
+
SidebarInput.displayName = "SidebarInput";
|
|
3298
|
+
var SidebarHeader = React35.forwardRef(({ className, ...props }, ref) => {
|
|
3299
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3300
|
+
"div",
|
|
3301
|
+
{
|
|
3302
|
+
ref,
|
|
3303
|
+
"data-sidebar": "header",
|
|
3304
|
+
className: cn("flex flex-col gap-2 p-2", className),
|
|
3305
|
+
...props
|
|
3306
|
+
}
|
|
3307
|
+
);
|
|
3308
|
+
});
|
|
3309
|
+
SidebarHeader.displayName = "SidebarHeader";
|
|
3310
|
+
var SidebarFooter = React35.forwardRef(({ className, ...props }, ref) => {
|
|
3311
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3312
|
+
"div",
|
|
3313
|
+
{
|
|
3314
|
+
ref,
|
|
3315
|
+
"data-sidebar": "footer",
|
|
3316
|
+
className: cn("flex flex-col gap-2 p-2", className),
|
|
3317
|
+
...props
|
|
3318
|
+
}
|
|
3319
|
+
);
|
|
3320
|
+
});
|
|
3321
|
+
SidebarFooter.displayName = "SidebarFooter";
|
|
3322
|
+
var SidebarSeparator = React35.forwardRef(({ className, ...props }, ref) => {
|
|
3323
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3324
|
+
Separator6,
|
|
3325
|
+
{
|
|
3326
|
+
ref,
|
|
3327
|
+
"data-sidebar": "separator",
|
|
3328
|
+
className: cn("mx-2 w-auto bg-sidebar-border", className),
|
|
3329
|
+
...props
|
|
3330
|
+
}
|
|
3331
|
+
);
|
|
3332
|
+
});
|
|
3333
|
+
SidebarSeparator.displayName = "SidebarSeparator";
|
|
3334
|
+
var SidebarContent = React35.forwardRef(({ className, ...props }, ref) => {
|
|
3335
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3336
|
+
"div",
|
|
3337
|
+
{
|
|
3338
|
+
ref,
|
|
3339
|
+
"data-sidebar": "content",
|
|
3340
|
+
className: cn(
|
|
3341
|
+
"flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
|
|
3342
|
+
className
|
|
3343
|
+
),
|
|
3344
|
+
...props
|
|
3345
|
+
}
|
|
3346
|
+
);
|
|
3347
|
+
});
|
|
3348
|
+
SidebarContent.displayName = "SidebarContent";
|
|
3349
|
+
var SidebarGroup = React35.forwardRef(({ className, ...props }, ref) => {
|
|
3350
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3351
|
+
"div",
|
|
3352
|
+
{
|
|
3353
|
+
ref,
|
|
3354
|
+
"data-sidebar": "group",
|
|
3355
|
+
className: cn("relative flex w-full min-w-0 flex-col p-2", className),
|
|
3356
|
+
...props
|
|
3357
|
+
}
|
|
3358
|
+
);
|
|
3359
|
+
});
|
|
3360
|
+
SidebarGroup.displayName = "SidebarGroup";
|
|
3361
|
+
var SidebarGroupLabel = React35.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
3362
|
+
const Comp = asChild ? import_react_slot4.Slot : "div";
|
|
3363
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3364
|
+
Comp,
|
|
3365
|
+
{
|
|
3366
|
+
ref,
|
|
3367
|
+
"data-sidebar": "group-label",
|
|
3368
|
+
className: cn(
|
|
3369
|
+
"flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
3370
|
+
"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
|
|
3371
|
+
className
|
|
3372
|
+
),
|
|
3373
|
+
...props
|
|
3374
|
+
}
|
|
3375
|
+
);
|
|
3376
|
+
});
|
|
3377
|
+
SidebarGroupLabel.displayName = "SidebarGroupLabel";
|
|
3378
|
+
var SidebarGroupAction = React35.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
3379
|
+
const Comp = asChild ? import_react_slot4.Slot : "button";
|
|
3380
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3381
|
+
Comp,
|
|
3382
|
+
{
|
|
3383
|
+
ref,
|
|
3384
|
+
"data-sidebar": "group-action",
|
|
3385
|
+
className: cn(
|
|
3386
|
+
"absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring cursor-pointer transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
3387
|
+
// Increases the hit area of the button on mobile.
|
|
3388
|
+
"after:absolute after:-inset-2 after:md:hidden",
|
|
3389
|
+
"group-data-[collapsible=icon]:hidden",
|
|
3390
|
+
className
|
|
3391
|
+
),
|
|
3392
|
+
...props
|
|
3393
|
+
}
|
|
3394
|
+
);
|
|
3395
|
+
});
|
|
3396
|
+
SidebarGroupAction.displayName = "SidebarGroupAction";
|
|
3397
|
+
var SidebarGroupContent = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3398
|
+
"div",
|
|
3399
|
+
{
|
|
3400
|
+
ref,
|
|
3401
|
+
"data-sidebar": "group-content",
|
|
3402
|
+
className: cn("w-full text-sm", className),
|
|
3403
|
+
...props
|
|
3404
|
+
}
|
|
3405
|
+
));
|
|
3406
|
+
SidebarGroupContent.displayName = "SidebarGroupContent";
|
|
3407
|
+
var SidebarMenu = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3408
|
+
"ul",
|
|
3409
|
+
{
|
|
3410
|
+
ref,
|
|
3411
|
+
"data-sidebar": "menu",
|
|
3412
|
+
className: cn("flex w-full min-w-0 flex-col gap-1", className),
|
|
3413
|
+
...props
|
|
3414
|
+
}
|
|
3415
|
+
));
|
|
3416
|
+
SidebarMenu.displayName = "SidebarMenu";
|
|
3417
|
+
var SidebarMenuItem = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3418
|
+
"li",
|
|
3419
|
+
{
|
|
3420
|
+
ref,
|
|
3421
|
+
"data-sidebar": "menu-item",
|
|
3422
|
+
className: cn("group/menu-item relative", className),
|
|
3423
|
+
...props
|
|
3424
|
+
}
|
|
3425
|
+
));
|
|
3426
|
+
SidebarMenuItem.displayName = "SidebarMenuItem";
|
|
3427
|
+
var sidebarMenuButtonVariants = (0, import_class_variance_authority7.cva)(
|
|
3428
|
+
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring cursor-pointer transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
|
|
3429
|
+
{
|
|
3430
|
+
variants: {
|
|
3431
|
+
variant: {
|
|
3432
|
+
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
3433
|
+
outline: "bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"
|
|
3434
|
+
},
|
|
3435
|
+
size: {
|
|
3436
|
+
default: "h-8 text-sm",
|
|
3437
|
+
sm: "h-7 text-xs",
|
|
3438
|
+
lg: "h-12 text-sm group-data-[collapsible=icon]:p-0!"
|
|
3439
|
+
}
|
|
3440
|
+
},
|
|
3441
|
+
defaultVariants: {
|
|
3442
|
+
variant: "default",
|
|
3443
|
+
size: "default"
|
|
3444
|
+
}
|
|
3445
|
+
}
|
|
3446
|
+
);
|
|
3447
|
+
var SidebarMenuButton = React35.forwardRef(
|
|
3448
|
+
({
|
|
3449
|
+
asChild = false,
|
|
3450
|
+
isActive = false,
|
|
3451
|
+
variant = "default",
|
|
3452
|
+
size = "default",
|
|
3453
|
+
tooltip,
|
|
3454
|
+
className,
|
|
3455
|
+
...props
|
|
3456
|
+
}, ref) => {
|
|
3457
|
+
const Comp = asChild ? import_react_slot4.Slot : "button";
|
|
3458
|
+
const { isMobile, state } = useSidebar();
|
|
3459
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3460
|
+
Comp,
|
|
3461
|
+
{
|
|
3462
|
+
ref,
|
|
3463
|
+
"data-sidebar": "menu-button",
|
|
3464
|
+
"data-size": size,
|
|
3465
|
+
"data-active": isActive,
|
|
3466
|
+
className: cn(sidebarMenuButtonVariants({ variant, size }), className),
|
|
3467
|
+
...props
|
|
3468
|
+
}
|
|
3469
|
+
);
|
|
3470
|
+
if (!tooltip) {
|
|
3471
|
+
return button;
|
|
3472
|
+
}
|
|
3473
|
+
if (typeof tooltip === "string") {
|
|
3474
|
+
tooltip = {
|
|
3475
|
+
children: tooltip
|
|
3476
|
+
};
|
|
3477
|
+
}
|
|
3478
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Tooltip2, { children: [
|
|
3479
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(TooltipTrigger, { asChild: true, children: button }),
|
|
3480
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3481
|
+
TooltipContent,
|
|
3482
|
+
{
|
|
3483
|
+
side: "right",
|
|
3484
|
+
align: "center",
|
|
3485
|
+
hidden: state !== "collapsed" || isMobile,
|
|
3486
|
+
...tooltip
|
|
3487
|
+
}
|
|
3488
|
+
)
|
|
3489
|
+
] });
|
|
3490
|
+
}
|
|
3491
|
+
);
|
|
3492
|
+
SidebarMenuButton.displayName = "SidebarMenuButton";
|
|
3493
|
+
var SidebarMenuAction = React35.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
|
|
3494
|
+
const Comp = asChild ? import_react_slot4.Slot : "button";
|
|
3495
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3496
|
+
Comp,
|
|
3497
|
+
{
|
|
3498
|
+
ref,
|
|
3499
|
+
"data-sidebar": "menu-action",
|
|
3500
|
+
className: cn(
|
|
3501
|
+
"absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring cursor-pointer transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0",
|
|
3502
|
+
// Increases the hit area of the button on mobile.
|
|
3503
|
+
"after:absolute after:-inset-2 after:md:hidden",
|
|
3504
|
+
"peer-data-[size=sm]/menu-button:top-1",
|
|
3505
|
+
"peer-data-[size=default]/menu-button:top-1.5",
|
|
3506
|
+
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
3507
|
+
"group-data-[collapsible=icon]:hidden",
|
|
3508
|
+
showOnHover && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",
|
|
3509
|
+
className
|
|
3510
|
+
),
|
|
3511
|
+
...props
|
|
3512
|
+
}
|
|
3513
|
+
);
|
|
3514
|
+
});
|
|
3515
|
+
SidebarMenuAction.displayName = "SidebarMenuAction";
|
|
3516
|
+
var SidebarMenuBadge = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3517
|
+
"div",
|
|
3518
|
+
{
|
|
3519
|
+
ref,
|
|
3520
|
+
"data-sidebar": "menu-badge",
|
|
3521
|
+
className: cn(
|
|
3522
|
+
"pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground",
|
|
3523
|
+
"peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
|
|
3524
|
+
"peer-data-[size=sm]/menu-button:top-1",
|
|
3525
|
+
"peer-data-[size=default]/menu-button:top-1.5",
|
|
3526
|
+
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
3527
|
+
"group-data-[collapsible=icon]:hidden",
|
|
3528
|
+
className
|
|
3529
|
+
),
|
|
3530
|
+
...props
|
|
3531
|
+
}
|
|
3532
|
+
));
|
|
3533
|
+
SidebarMenuBadge.displayName = "SidebarMenuBadge";
|
|
3534
|
+
var SidebarMenuSkeleton = React35.forwardRef(({ className, showIcon = false, ...props }, ref) => {
|
|
3535
|
+
const width = React35.useMemo(() => {
|
|
3536
|
+
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
3537
|
+
}, []);
|
|
3538
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
3539
|
+
"div",
|
|
3540
|
+
{
|
|
3541
|
+
ref,
|
|
3542
|
+
"data-sidebar": "menu-skeleton",
|
|
3543
|
+
className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
|
|
3544
|
+
...props,
|
|
3545
|
+
children: [
|
|
3546
|
+
showIcon && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3547
|
+
Skeleton,
|
|
3548
|
+
{
|
|
3549
|
+
className: "size-4 rounded-md",
|
|
3550
|
+
"data-sidebar": "menu-skeleton-icon"
|
|
3551
|
+
}
|
|
3552
|
+
),
|
|
3553
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3554
|
+
Skeleton,
|
|
3555
|
+
{
|
|
3556
|
+
className: "h-4 max-w-(--skeleton-width) flex-1",
|
|
3557
|
+
"data-sidebar": "menu-skeleton-text",
|
|
3558
|
+
style: {
|
|
3559
|
+
"--skeleton-width": width
|
|
3560
|
+
}
|
|
3561
|
+
}
|
|
3562
|
+
)
|
|
3563
|
+
]
|
|
3564
|
+
}
|
|
3565
|
+
);
|
|
3566
|
+
});
|
|
3567
|
+
SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
|
|
3568
|
+
var SidebarMenuSub = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3569
|
+
"ul",
|
|
3570
|
+
{
|
|
3571
|
+
ref,
|
|
3572
|
+
"data-sidebar": "menu-sub",
|
|
3573
|
+
className: cn(
|
|
3574
|
+
"mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5",
|
|
3575
|
+
"group-data-[collapsible=icon]:hidden",
|
|
3576
|
+
className
|
|
3577
|
+
),
|
|
3578
|
+
...props
|
|
3579
|
+
}
|
|
3580
|
+
));
|
|
3581
|
+
SidebarMenuSub.displayName = "SidebarMenuSub";
|
|
3582
|
+
var SidebarMenuSubItem = React35.forwardRef(({ ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("li", { ref, ...props }));
|
|
3583
|
+
SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
|
|
3584
|
+
var SidebarMenuSubButton = React35.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
|
|
3585
|
+
const Comp = asChild ? import_react_slot4.Slot : "a";
|
|
3586
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3587
|
+
Comp,
|
|
3588
|
+
{
|
|
3589
|
+
ref,
|
|
3590
|
+
"data-sidebar": "menu-sub-button",
|
|
3591
|
+
"data-size": size,
|
|
3592
|
+
"data-active": isActive,
|
|
3593
|
+
className: cn(
|
|
3594
|
+
"flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring cursor-pointer hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",
|
|
3595
|
+
"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
|
|
3596
|
+
size === "sm" && "text-xs",
|
|
3597
|
+
size === "md" && "text-sm",
|
|
3598
|
+
"group-data-[collapsible=icon]:hidden",
|
|
3599
|
+
className
|
|
3600
|
+
),
|
|
3601
|
+
...props
|
|
3602
|
+
}
|
|
3603
|
+
);
|
|
3604
|
+
});
|
|
3605
|
+
SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
|
|
3606
|
+
|
|
3607
|
+
// src/components/slider.tsx
|
|
3608
|
+
var React36 = __toESM(require("react"), 1);
|
|
3609
|
+
var SliderPrimitive = __toESM(require("@radix-ui/react-slider"), 1);
|
|
3610
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3611
|
+
var Slider = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
3612
|
+
SliderPrimitive.Root,
|
|
3613
|
+
{
|
|
3614
|
+
ref,
|
|
3615
|
+
className: cn(
|
|
3616
|
+
"relative flex w-full touch-none select-none items-center",
|
|
3617
|
+
className
|
|
3618
|
+
),
|
|
3619
|
+
...props,
|
|
3620
|
+
children: [
|
|
3621
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(SliderPrimitive.Track, { className: "relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(SliderPrimitive.Range, { className: "absolute h-full bg-primary" }) }),
|
|
3622
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(SliderPrimitive.Thumb, { className: "block rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 size-4" })
|
|
3623
|
+
]
|
|
3624
|
+
}
|
|
3625
|
+
));
|
|
3626
|
+
Slider.displayName = SliderPrimitive.Root.displayName;
|
|
3627
|
+
|
|
3628
|
+
// src/components/sonner.tsx
|
|
3629
|
+
var import_sonner = require("sonner");
|
|
3630
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3631
|
+
var Toaster = ({ ...props }) => {
|
|
3632
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3633
|
+
import_sonner.Toaster,
|
|
3634
|
+
{
|
|
3635
|
+
className: "toaster group",
|
|
3636
|
+
toastOptions: {
|
|
3637
|
+
classNames: {
|
|
3638
|
+
toast: "group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
|
|
3639
|
+
description: "group-[.toast]:text-muted-foreground",
|
|
3640
|
+
actionButton: "group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
|
|
3641
|
+
cancelButton: "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"
|
|
3642
|
+
}
|
|
3643
|
+
},
|
|
3644
|
+
...props
|
|
3645
|
+
}
|
|
3646
|
+
);
|
|
3647
|
+
};
|
|
3648
|
+
|
|
3649
|
+
// src/components/switch.tsx
|
|
3650
|
+
var React37 = __toESM(require("react"), 1);
|
|
3651
|
+
var SwitchPrimitives = __toESM(require("@radix-ui/react-switch"), 1);
|
|
3652
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3653
|
+
var Switch = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3654
|
+
SwitchPrimitives.Root,
|
|
3655
|
+
{
|
|
3656
|
+
className: cn(
|
|
3657
|
+
"peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
|
|
3658
|
+
className
|
|
3659
|
+
),
|
|
3660
|
+
...props,
|
|
3661
|
+
ref,
|
|
3662
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3663
|
+
SwitchPrimitives.Thumb,
|
|
3664
|
+
{
|
|
3665
|
+
className: cn(
|
|
3666
|
+
"pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0 size-4"
|
|
3667
|
+
)
|
|
3668
|
+
}
|
|
3669
|
+
)
|
|
3670
|
+
}
|
|
3671
|
+
));
|
|
3672
|
+
Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
3673
|
+
|
|
3674
|
+
// src/components/table.tsx
|
|
3675
|
+
var React38 = __toESM(require("react"), 1);
|
|
3676
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3677
|
+
var Table = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3678
|
+
"table",
|
|
3679
|
+
{
|
|
3680
|
+
ref,
|
|
3681
|
+
className: cn("w-full caption-bottom text-sm", className),
|
|
3682
|
+
...props
|
|
3683
|
+
}
|
|
3684
|
+
) }));
|
|
3685
|
+
Table.displayName = "Table";
|
|
3686
|
+
var TableHeader = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
|
|
3687
|
+
TableHeader.displayName = "TableHeader";
|
|
3688
|
+
var TableBody = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3689
|
+
"tbody",
|
|
3690
|
+
{
|
|
3691
|
+
ref,
|
|
3692
|
+
className: cn("[&_tr:last-child]:border-0", className),
|
|
3693
|
+
...props
|
|
3694
|
+
}
|
|
3695
|
+
));
|
|
3696
|
+
TableBody.displayName = "TableBody";
|
|
3697
|
+
var TableFooter = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3698
|
+
"tfoot",
|
|
3699
|
+
{
|
|
3700
|
+
ref,
|
|
3701
|
+
className: cn(
|
|
3702
|
+
"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
|
|
3703
|
+
className
|
|
3704
|
+
),
|
|
3705
|
+
...props
|
|
3706
|
+
}
|
|
3707
|
+
));
|
|
3708
|
+
TableFooter.displayName = "TableFooter";
|
|
3709
|
+
var TableRow = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3710
|
+
"tr",
|
|
3711
|
+
{
|
|
3712
|
+
ref,
|
|
3713
|
+
className: cn(
|
|
3714
|
+
"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
|
|
3715
|
+
className
|
|
3716
|
+
),
|
|
3717
|
+
...props
|
|
3718
|
+
}
|
|
3719
|
+
));
|
|
3720
|
+
TableRow.displayName = "TableRow";
|
|
3721
|
+
var TableHead = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3722
|
+
"th",
|
|
3723
|
+
{
|
|
3724
|
+
ref,
|
|
3725
|
+
className: cn(
|
|
3726
|
+
"h-10 px-2 text-left align-middle font-medium text-muted-foreground has-[[role=checkbox]]:pr-0 *:[[role=checkbox]]:translate-y-[2px]",
|
|
3727
|
+
className
|
|
3728
|
+
),
|
|
3729
|
+
...props
|
|
3730
|
+
}
|
|
3731
|
+
));
|
|
3732
|
+
TableHead.displayName = "TableHead";
|
|
3733
|
+
var TableCell = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3734
|
+
"td",
|
|
3735
|
+
{
|
|
3736
|
+
ref,
|
|
3737
|
+
className: cn(
|
|
3738
|
+
"p-2 align-middle has-[[role=checkbox]]:pr-0 *:[[role=checkbox]]:translate-y-[2px]",
|
|
3739
|
+
className
|
|
3740
|
+
),
|
|
3741
|
+
...props
|
|
3742
|
+
}
|
|
3743
|
+
));
|
|
3744
|
+
TableCell.displayName = "TableCell";
|
|
3745
|
+
var TableCaption = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3746
|
+
"caption",
|
|
3747
|
+
{
|
|
3748
|
+
ref,
|
|
3749
|
+
className: cn("mt-4 text-sm text-muted-foreground", className),
|
|
3750
|
+
...props
|
|
3751
|
+
}
|
|
3752
|
+
));
|
|
3753
|
+
TableCaption.displayName = "TableCaption";
|
|
3754
|
+
|
|
3755
|
+
// src/components/tabs.tsx
|
|
3756
|
+
var React39 = __toESM(require("react"), 1);
|
|
3757
|
+
var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"), 1);
|
|
3758
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3759
|
+
var Tabs = TabsPrimitive.Root;
|
|
3760
|
+
var TabsList = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3761
|
+
TabsPrimitive.List,
|
|
3762
|
+
{
|
|
3763
|
+
ref,
|
|
3764
|
+
className: cn(
|
|
3765
|
+
"inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",
|
|
3766
|
+
className
|
|
3767
|
+
),
|
|
3768
|
+
...props
|
|
3769
|
+
}
|
|
3770
|
+
));
|
|
3771
|
+
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
3772
|
+
var TabsTrigger = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3773
|
+
TabsPrimitive.Trigger,
|
|
3774
|
+
{
|
|
3775
|
+
ref,
|
|
3776
|
+
className: cn(
|
|
3777
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background cursor-pointer transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",
|
|
3778
|
+
className
|
|
3779
|
+
),
|
|
3780
|
+
...props
|
|
3781
|
+
}
|
|
3782
|
+
));
|
|
3783
|
+
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
3784
|
+
var TabsContent = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3785
|
+
TabsPrimitive.Content,
|
|
3786
|
+
{
|
|
3787
|
+
ref,
|
|
3788
|
+
className: cn(
|
|
3789
|
+
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",
|
|
3790
|
+
className
|
|
3791
|
+
),
|
|
3792
|
+
...props
|
|
3793
|
+
}
|
|
3794
|
+
));
|
|
3795
|
+
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
3796
|
+
|
|
3797
|
+
// src/components/textarea.tsx
|
|
3798
|
+
var React40 = __toESM(require("react"), 1);
|
|
3799
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3800
|
+
var Textarea = React40.forwardRef(({ className, ...props }, ref) => {
|
|
3801
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3802
|
+
"textarea",
|
|
3803
|
+
{
|
|
3804
|
+
className: cn(
|
|
3805
|
+
"flex min-h-15 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
3806
|
+
className
|
|
3807
|
+
),
|
|
3808
|
+
ref,
|
|
3809
|
+
...props
|
|
3810
|
+
}
|
|
3811
|
+
);
|
|
3812
|
+
});
|
|
3813
|
+
Textarea.displayName = "Textarea";
|
|
3814
|
+
|
|
3815
|
+
// src/components/toggle-group.tsx
|
|
3816
|
+
var React42 = __toESM(require("react"), 1);
|
|
3817
|
+
var ToggleGroupPrimitive = __toESM(require("@radix-ui/react-toggle-group"), 1);
|
|
3818
|
+
|
|
3819
|
+
// src/components/toggle.tsx
|
|
3820
|
+
var React41 = __toESM(require("react"), 1);
|
|
3821
|
+
var TogglePrimitive = __toESM(require("@radix-ui/react-toggle"), 1);
|
|
3822
|
+
var import_class_variance_authority8 = require("class-variance-authority");
|
|
3823
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
3824
|
+
var toggleVariants = (0, import_class_variance_authority8.cva)(
|
|
3825
|
+
"inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium cursor-pointer transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
3826
|
+
{
|
|
3827
|
+
variants: {
|
|
3828
|
+
variant: {
|
|
3829
|
+
default: "bg-transparent",
|
|
3830
|
+
outline: "border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"
|
|
3831
|
+
},
|
|
3832
|
+
size: {
|
|
3833
|
+
default: "h-9 px-2 min-w-9",
|
|
3834
|
+
sm: "h-8 px-1.5 min-w-8",
|
|
3835
|
+
lg: "h-10 px-2.5 min-w-10"
|
|
3836
|
+
}
|
|
3837
|
+
},
|
|
3838
|
+
defaultVariants: {
|
|
3839
|
+
variant: "default",
|
|
3840
|
+
size: "default"
|
|
3841
|
+
}
|
|
3842
|
+
}
|
|
3843
|
+
);
|
|
3844
|
+
var Toggle = React41.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3845
|
+
TogglePrimitive.Root,
|
|
3846
|
+
{
|
|
3847
|
+
ref,
|
|
3848
|
+
className: cn(toggleVariants({ variant, size, className })),
|
|
3849
|
+
...props
|
|
3850
|
+
}
|
|
3851
|
+
));
|
|
3852
|
+
Toggle.displayName = TogglePrimitive.Root.displayName;
|
|
3853
|
+
|
|
3854
|
+
// src/components/toggle-group.tsx
|
|
3855
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
3856
|
+
var ToggleGroupContext = React42.createContext({
|
|
3857
|
+
size: "default",
|
|
3858
|
+
variant: "default"
|
|
3859
|
+
});
|
|
3860
|
+
var ToggleGroup = React42.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3861
|
+
ToggleGroupPrimitive.Root,
|
|
3862
|
+
{
|
|
3863
|
+
ref,
|
|
3864
|
+
className: cn("flex items-center justify-center gap-1", className),
|
|
3865
|
+
...props,
|
|
3866
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ToggleGroupContext.Provider, { value: { variant, size }, children })
|
|
3867
|
+
}
|
|
3868
|
+
));
|
|
3869
|
+
ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
|
|
3870
|
+
var ToggleGroupItem = React42.forwardRef(({ className, children, variant, size, ...props }, ref) => {
|
|
3871
|
+
const context = React42.useContext(ToggleGroupContext);
|
|
3872
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3873
|
+
ToggleGroupPrimitive.Item,
|
|
3874
|
+
{
|
|
3875
|
+
ref,
|
|
3876
|
+
className: cn(
|
|
3877
|
+
toggleVariants({
|
|
3878
|
+
variant: context.variant || variant,
|
|
3879
|
+
size: context.size || size
|
|
3880
|
+
}),
|
|
3881
|
+
className
|
|
3882
|
+
),
|
|
3883
|
+
...props,
|
|
3884
|
+
children
|
|
3885
|
+
}
|
|
3886
|
+
);
|
|
3887
|
+
});
|
|
3888
|
+
ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
|
|
3889
|
+
|
|
3890
|
+
// src/components/panel.tsx
|
|
3891
|
+
var React43 = __toESM(require("react"), 1);
|
|
3892
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
3893
|
+
var Panel2 = React43.forwardRef(
|
|
3894
|
+
({ title, meta, children, className, ...props }, ref) => {
|
|
3895
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
3896
|
+
"section",
|
|
3897
|
+
{
|
|
3898
|
+
ref,
|
|
3899
|
+
className: cn("rounded-lg border border-border bg-card p-4", className),
|
|
3900
|
+
...props,
|
|
3901
|
+
children: [
|
|
3902
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "mb-3 flex items-center gap-2", children: [
|
|
3903
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("h2", { className: "font-display text-sm font-semibold", children: title }),
|
|
3904
|
+
meta ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "ml-auto font-mono text-[10px] text-muted-foreground", children: meta }) : null
|
|
3905
|
+
] }) : null,
|
|
3906
|
+
children
|
|
3907
|
+
]
|
|
3908
|
+
}
|
|
3909
|
+
);
|
|
3910
|
+
}
|
|
3911
|
+
);
|
|
3912
|
+
Panel2.displayName = "Panel";
|
|
3913
|
+
|
|
3914
|
+
// src/components/status-chip.tsx
|
|
3915
|
+
var React44 = __toESM(require("react"), 1);
|
|
3916
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
3917
|
+
var statusTone = {
|
|
3918
|
+
active: "border-primary/30 bg-primary/10 text-primary",
|
|
3919
|
+
running: "border-primary/30 bg-primary/10 text-primary",
|
|
3920
|
+
completed: "border-border bg-secondary text-muted-foreground",
|
|
3921
|
+
done: "border-border bg-secondary text-muted-foreground",
|
|
3922
|
+
indexed: "border-primary/30 bg-primary/10 text-primary",
|
|
3923
|
+
enabled: "border-primary/30 bg-primary/10 text-primary",
|
|
3924
|
+
available: "border-primary/30 bg-primary/10 text-primary",
|
|
3925
|
+
published: "border-primary/30 bg-primary/10 text-primary",
|
|
3926
|
+
ok: "border-primary/30 bg-primary/10 text-primary",
|
|
3927
|
+
waiting: "border-warning/35 bg-warning/10 text-warning",
|
|
3928
|
+
paused: "border-warning/35 bg-warning/10 text-warning",
|
|
3929
|
+
processing: "border-warning/35 bg-warning/10 text-warning",
|
|
3930
|
+
degraded: "border-warning/35 bg-warning/10 text-warning",
|
|
3931
|
+
warn: "border-warning/35 bg-warning/10 text-warning",
|
|
3932
|
+
"requires-approval": "border-warning/35 bg-warning/10 text-warning",
|
|
3933
|
+
draft: "border-warning/35 bg-warning/10 text-warning",
|
|
3934
|
+
failed: "border-destructive/35 bg-destructive/10 text-destructive",
|
|
3935
|
+
error: "border-destructive/35 bg-destructive/10 text-destructive",
|
|
3936
|
+
offline: "border-destructive/35 bg-destructive/10 text-destructive"
|
|
3937
|
+
};
|
|
3938
|
+
var StatusChip = React44.forwardRef(
|
|
3939
|
+
({ status, className, ...props }, ref) => {
|
|
3940
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
3941
|
+
"span",
|
|
3942
|
+
{
|
|
3943
|
+
ref,
|
|
3944
|
+
className: cn(
|
|
3945
|
+
"inline-flex items-center gap-1.5 rounded-md border px-2 py-0.5 font-mono text-[10px]",
|
|
3946
|
+
statusTone[status] ?? "border-border bg-secondary text-muted-foreground",
|
|
3947
|
+
className
|
|
3948
|
+
),
|
|
3949
|
+
...props,
|
|
3950
|
+
children: [
|
|
3951
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "size-1.5 rounded-full bg-current" }),
|
|
3952
|
+
status
|
|
3953
|
+
]
|
|
3954
|
+
}
|
|
3955
|
+
);
|
|
3956
|
+
}
|
|
3957
|
+
);
|
|
3958
|
+
StatusChip.displayName = "StatusChip";
|
|
3959
|
+
|
|
3960
|
+
// src/components/date-picker.tsx
|
|
3961
|
+
var React45 = __toESM(require("react"), 1);
|
|
3962
|
+
var import_date_fns = require("date-fns");
|
|
3963
|
+
var import_lucide_react19 = require("lucide-react");
|
|
3964
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
3965
|
+
function DatePicker({
|
|
3966
|
+
value,
|
|
3967
|
+
onChange,
|
|
3968
|
+
placeholder = "Pick a date",
|
|
3969
|
+
className,
|
|
3970
|
+
disabled
|
|
3971
|
+
}) {
|
|
3972
|
+
const date = React45.useMemo(() => {
|
|
3973
|
+
if (!value) return void 0;
|
|
3974
|
+
const parts = value.split("-");
|
|
3975
|
+
if (parts.length !== 3) {
|
|
3976
|
+
const d = new Date(value);
|
|
3977
|
+
return isNaN(d.getTime()) ? void 0 : d;
|
|
3978
|
+
}
|
|
3979
|
+
const year = parseInt(parts[0], 10);
|
|
3980
|
+
const month = parseInt(parts[1], 10) - 1;
|
|
3981
|
+
const day = parseInt(parts[2], 10);
|
|
3982
|
+
return new Date(year, month, day, 12, 0, 0);
|
|
3983
|
+
}, [value]);
|
|
3984
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Popover, { children: [
|
|
3985
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
3986
|
+
Button,
|
|
3987
|
+
{
|
|
3988
|
+
variant: "outline",
|
|
3989
|
+
type: "button",
|
|
3990
|
+
disabled,
|
|
3991
|
+
className: cn(
|
|
3992
|
+
"border-border/80 bg-secondary/40 hover:bg-secondary/60 hover:text-foreground h-9 w-full justify-start text-left font-normal",
|
|
3993
|
+
!value && "text-muted-foreground",
|
|
3994
|
+
className
|
|
3995
|
+
),
|
|
3996
|
+
children: [
|
|
3997
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react19.Calendar, { className: "mr-2 size-4" }),
|
|
3998
|
+
date && !isNaN(date.getTime()) ? (0, import_date_fns.format)(date, "PPP") : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { children: placeholder })
|
|
3999
|
+
]
|
|
4000
|
+
}
|
|
4001
|
+
) }),
|
|
4002
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4003
|
+
Calendar,
|
|
4004
|
+
{
|
|
4005
|
+
mode: "single",
|
|
4006
|
+
selected: date,
|
|
4007
|
+
onSelect: (selectedDate) => onChange?.(selectedDate ? (0, import_date_fns.format)(selectedDate, "yyyy-MM-dd") : ""),
|
|
4008
|
+
initialFocus: true
|
|
4009
|
+
}
|
|
4010
|
+
) })
|
|
4011
|
+
] });
|
|
4012
|
+
}
|
|
4013
|
+
|
|
4014
|
+
// src/components/searchable-select.tsx
|
|
4015
|
+
var React46 = __toESM(require("react"), 1);
|
|
4016
|
+
var import_lucide_react20 = require("lucide-react");
|
|
4017
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
4018
|
+
function SearchableSelect({
|
|
4019
|
+
options,
|
|
4020
|
+
value,
|
|
4021
|
+
onChange,
|
|
4022
|
+
placeholder = "Select an option...",
|
|
4023
|
+
searchPlaceholder = "Search...",
|
|
4024
|
+
onAddNew,
|
|
4025
|
+
addNewLabel = "Add new",
|
|
4026
|
+
disabled = false,
|
|
4027
|
+
className,
|
|
4028
|
+
id
|
|
4029
|
+
}) {
|
|
4030
|
+
const [open, setOpen] = React46.useState(false);
|
|
4031
|
+
const [search, setSearch] = React46.useState("");
|
|
4032
|
+
const [highlightedIndex, setHighlightedIndex] = React46.useState(0);
|
|
4033
|
+
const listRef = React46.useRef(null);
|
|
4034
|
+
const selectedOption = React46.useMemo(() => {
|
|
4035
|
+
return options.find((opt) => opt.value === value);
|
|
4036
|
+
}, [options, value]);
|
|
4037
|
+
const filteredOptions = React46.useMemo(() => {
|
|
4038
|
+
if (!search.trim()) return options;
|
|
4039
|
+
const q = search.toLowerCase();
|
|
4040
|
+
return options.filter(
|
|
4041
|
+
(opt) => opt.label.toLowerCase().includes(q) || opt.group && opt.group.toLowerCase().includes(q)
|
|
4042
|
+
);
|
|
4043
|
+
}, [options, search]);
|
|
4044
|
+
const handleOpenChange = (newOpen) => {
|
|
4045
|
+
setOpen(newOpen);
|
|
4046
|
+
if (newOpen) {
|
|
4047
|
+
const idx = filteredOptions.findIndex((opt) => opt.value === value);
|
|
4048
|
+
setHighlightedIndex(idx >= 0 ? idx : 0);
|
|
4049
|
+
} else {
|
|
4050
|
+
setSearch("");
|
|
4051
|
+
}
|
|
4052
|
+
};
|
|
4053
|
+
const handleSearchChange = (newSearch) => {
|
|
4054
|
+
setSearch(newSearch);
|
|
4055
|
+
setHighlightedIndex(0);
|
|
4056
|
+
};
|
|
4057
|
+
React46.useEffect(() => {
|
|
4058
|
+
if (open && listRef.current) {
|
|
4059
|
+
const activeEl = listRef.current.querySelector(
|
|
4060
|
+
"[data-highlighted='true']"
|
|
4061
|
+
);
|
|
4062
|
+
if (activeEl) {
|
|
4063
|
+
activeEl.scrollIntoView({ block: "nearest" });
|
|
4064
|
+
}
|
|
4065
|
+
}
|
|
4066
|
+
}, [highlightedIndex, open]);
|
|
4067
|
+
const groupedOptions = React46.useMemo(() => {
|
|
4068
|
+
const hasGroups = filteredOptions.some((opt) => opt.group);
|
|
4069
|
+
if (!hasGroups) return { Default: filteredOptions };
|
|
4070
|
+
return filteredOptions.reduce(
|
|
4071
|
+
(acc, opt) => {
|
|
4072
|
+
const g = opt.group || "Other";
|
|
4073
|
+
if (!acc[g]) acc[g] = [];
|
|
4074
|
+
acc[g].push(opt);
|
|
4075
|
+
return acc;
|
|
4076
|
+
},
|
|
4077
|
+
{}
|
|
4078
|
+
);
|
|
4079
|
+
}, [filteredOptions]);
|
|
4080
|
+
const handleSelect = (val) => {
|
|
4081
|
+
onChange?.(val);
|
|
4082
|
+
setOpen(false);
|
|
4083
|
+
setSearch("");
|
|
4084
|
+
};
|
|
4085
|
+
const handleAddNew = () => {
|
|
4086
|
+
onAddNew?.(search.trim());
|
|
4087
|
+
setOpen(false);
|
|
4088
|
+
setSearch("");
|
|
4089
|
+
};
|
|
4090
|
+
const handleKeyDown = (e) => {
|
|
4091
|
+
if (!open) {
|
|
4092
|
+
if (e.key === "ArrowDown" || e.key === "Enter" || e.key === " ") {
|
|
4093
|
+
e.preventDefault();
|
|
4094
|
+
handleOpenChange(true);
|
|
4095
|
+
}
|
|
4096
|
+
return;
|
|
4097
|
+
}
|
|
4098
|
+
switch (e.key) {
|
|
4099
|
+
case "ArrowDown":
|
|
4100
|
+
e.preventDefault();
|
|
4101
|
+
setHighlightedIndex(
|
|
4102
|
+
(prev) => prev < filteredOptions.length - 1 ? prev + 1 : prev
|
|
4103
|
+
);
|
|
4104
|
+
break;
|
|
4105
|
+
case "ArrowUp":
|
|
4106
|
+
e.preventDefault();
|
|
4107
|
+
setHighlightedIndex((prev) => prev > 0 ? prev - 1 : 0);
|
|
4108
|
+
break;
|
|
4109
|
+
case "Enter":
|
|
4110
|
+
e.preventDefault();
|
|
4111
|
+
if (filteredOptions.length > 0 && filteredOptions[highlightedIndex]) {
|
|
4112
|
+
handleSelect(filteredOptions[highlightedIndex].value);
|
|
4113
|
+
} else if (onAddNew && search.trim()) {
|
|
4114
|
+
handleAddNew();
|
|
4115
|
+
}
|
|
4116
|
+
break;
|
|
4117
|
+
case "Escape":
|
|
4118
|
+
case "Tab":
|
|
4119
|
+
e.preventDefault();
|
|
4120
|
+
handleOpenChange(false);
|
|
4121
|
+
break;
|
|
4122
|
+
}
|
|
4123
|
+
};
|
|
4124
|
+
let currentIndex = 0;
|
|
4125
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Popover, { open, onOpenChange: handleOpenChange, children: [
|
|
4126
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
4127
|
+
Button,
|
|
4128
|
+
{
|
|
4129
|
+
id,
|
|
4130
|
+
variant: "outline",
|
|
4131
|
+
role: "combobox",
|
|
4132
|
+
"aria-expanded": open,
|
|
4133
|
+
disabled,
|
|
4134
|
+
onKeyDown: handleKeyDown,
|
|
4135
|
+
className: cn(
|
|
4136
|
+
"bg-background border-input hover:bg-accent/50 h-9 w-full justify-between px-3 text-left font-normal",
|
|
4137
|
+
!selectedOption && "text-muted-foreground",
|
|
4138
|
+
className
|
|
4139
|
+
),
|
|
4140
|
+
children: [
|
|
4141
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "truncate", children: selectedOption ? selectedOption.label : placeholder }),
|
|
4142
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react20.ChevronDown, { className: "ml-2 size-4 shrink-0 opacity-50" })
|
|
4143
|
+
]
|
|
4144
|
+
}
|
|
4145
|
+
) }),
|
|
4146
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
4147
|
+
PopoverContent,
|
|
4148
|
+
{
|
|
4149
|
+
align: "start",
|
|
4150
|
+
className: "border-border bg-popover w-(--radix-popover-trigger-width) min-w-55 border p-0 shadow-lg",
|
|
4151
|
+
onKeyDown: handleKeyDown,
|
|
4152
|
+
children: [
|
|
4153
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "border-border flex items-center gap-2 border-b p-2", children: [
|
|
4154
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react20.Search, { className: "text-muted-foreground size-4 shrink-0 opacity-50" }),
|
|
4155
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4156
|
+
Input,
|
|
4157
|
+
{
|
|
4158
|
+
placeholder: searchPlaceholder,
|
|
4159
|
+
value: search,
|
|
4160
|
+
onChange: (e) => handleSearchChange(e.target.value),
|
|
4161
|
+
className: "h-8 border-none bg-transparent px-1 text-sm focus-visible:ring-0 focus-visible:ring-offset-0",
|
|
4162
|
+
autoFocus: true
|
|
4163
|
+
}
|
|
4164
|
+
)
|
|
4165
|
+
] }),
|
|
4166
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
4167
|
+
"div",
|
|
4168
|
+
{
|
|
4169
|
+
ref: listRef,
|
|
4170
|
+
onWheel: (e) => e.stopPropagation(),
|
|
4171
|
+
className: "max-h-60 overflow-y-auto overscroll-contain p-1 text-sm",
|
|
4172
|
+
children: Object.keys(groupedOptions).length === 0 || filteredOptions.length === 0 && !onAddNew ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "text-muted-foreground py-6 text-center text-xs", children: "No matching options found." }) : Object.entries(groupedOptions).map(([groupName, groupOpts]) => /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "py-1", children: [
|
|
4173
|
+
groupName !== "Default" && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "text-muted-foreground/70 px-2 py-1 text-[10px] font-bold tracking-wider uppercase", children: groupName }),
|
|
4174
|
+
groupOpts.map((option) => {
|
|
4175
|
+
const isSelected = option.value === value;
|
|
4176
|
+
const itemIndex = currentIndex++;
|
|
4177
|
+
const isHighlighted = itemIndex === highlightedIndex;
|
|
4178
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
4179
|
+
"div",
|
|
4180
|
+
{
|
|
4181
|
+
"data-highlighted": isHighlighted,
|
|
4182
|
+
onClick: () => handleSelect(option.value),
|
|
4183
|
+
onMouseEnter: () => setHighlightedIndex(itemIndex),
|
|
4184
|
+
className: cn(
|
|
4185
|
+
"relative flex cursor-pointer items-center rounded-sm px-2.5 py-1.5 text-sm transition-colors outline-none select-none",
|
|
4186
|
+
isHighlighted && "bg-accent text-accent-foreground font-medium",
|
|
4187
|
+
isSelected && !isHighlighted && "bg-accent/40 text-accent-foreground font-medium"
|
|
4188
|
+
),
|
|
4189
|
+
children: [
|
|
4190
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "flex-1 truncate", children: option.label }),
|
|
4191
|
+
isSelected && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react20.Check, { className: "text-primary ml-2 size-4 shrink-0" })
|
|
4192
|
+
]
|
|
4193
|
+
},
|
|
4194
|
+
option.value
|
|
4195
|
+
);
|
|
4196
|
+
})
|
|
4197
|
+
] }, groupName))
|
|
4198
|
+
}
|
|
4199
|
+
),
|
|
4200
|
+
onAddNew && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "border-border bg-muted/30 border-t p-1", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
4201
|
+
"button",
|
|
4202
|
+
{
|
|
4203
|
+
type: "button",
|
|
4204
|
+
onClick: handleAddNew,
|
|
4205
|
+
className: "text-primary hover:bg-primary/10 flex w-full items-center gap-2 rounded-sm px-2.5 py-2 text-xs font-semibold transition-colors",
|
|
4206
|
+
children: [
|
|
4207
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react20.Plus, { className: "size-3.5 shrink-0" }),
|
|
4208
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "truncate", children: search.trim() ? `${addNewLabel} "${search.trim()}"` : `${addNewLabel}` })
|
|
4209
|
+
]
|
|
4210
|
+
}
|
|
4211
|
+
) })
|
|
4212
|
+
]
|
|
4213
|
+
}
|
|
4214
|
+
)
|
|
4215
|
+
] });
|
|
4216
|
+
}
|
|
4217
|
+
|
|
4218
|
+
// src/components/confirm-dialog.tsx
|
|
4219
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
4220
|
+
function ConfirmDialog({
|
|
4221
|
+
open,
|
|
4222
|
+
onOpenChange,
|
|
4223
|
+
title,
|
|
4224
|
+
description,
|
|
4225
|
+
onConfirm,
|
|
4226
|
+
confirmText = "Confirm",
|
|
4227
|
+
cancelText = "Cancel",
|
|
4228
|
+
destructive = false
|
|
4229
|
+
}) {
|
|
4230
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(AlertDialog, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(AlertDialogContent, { children: [
|
|
4231
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(AlertDialogHeader, { children: [
|
|
4232
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(AlertDialogTitle, { children: title }),
|
|
4233
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(AlertDialogDescription, { children: description })
|
|
4234
|
+
] }),
|
|
4235
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(AlertDialogFooter, { children: [
|
|
4236
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(AlertDialogCancel, { children: cancelText }),
|
|
4237
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
4238
|
+
AlertDialogAction,
|
|
4239
|
+
{
|
|
4240
|
+
onClick: onConfirm,
|
|
4241
|
+
className: destructive ? "bg-destructive text-destructive-foreground hover:bg-destructive/90" : "",
|
|
4242
|
+
children: confirmText
|
|
4243
|
+
}
|
|
4244
|
+
)
|
|
4245
|
+
] })
|
|
4246
|
+
] }) });
|
|
4247
|
+
}
|
|
4248
|
+
|
|
4249
|
+
// src/components/loading-state.tsx
|
|
4250
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
4251
|
+
function LoadingState({
|
|
4252
|
+
rows = 3,
|
|
4253
|
+
className,
|
|
4254
|
+
...props
|
|
4255
|
+
}) {
|
|
4256
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: cn("w-full space-y-4 p-2", className), ...props, children: [
|
|
4257
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Skeleton, { className: "h-8 w-1/3" }),
|
|
4258
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "space-y-2", children: Array.from({ length: rows }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Skeleton, { className: "h-16 w-full rounded-xl" }, i)) })
|
|
4259
|
+
] });
|
|
4260
|
+
}
|
|
4261
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
4262
|
+
0 && (module.exports = {
|
|
4263
|
+
Accordion,
|
|
4264
|
+
AccordionContent,
|
|
4265
|
+
AccordionItem,
|
|
4266
|
+
AccordionTrigger,
|
|
4267
|
+
Alert,
|
|
4268
|
+
AlertDescription,
|
|
4269
|
+
AlertDialog,
|
|
4270
|
+
AlertDialogAction,
|
|
4271
|
+
AlertDialogCancel,
|
|
4272
|
+
AlertDialogContent,
|
|
4273
|
+
AlertDialogDescription,
|
|
4274
|
+
AlertDialogFooter,
|
|
4275
|
+
AlertDialogHeader,
|
|
4276
|
+
AlertDialogOverlay,
|
|
4277
|
+
AlertDialogPortal,
|
|
4278
|
+
AlertDialogTitle,
|
|
4279
|
+
AlertDialogTrigger,
|
|
4280
|
+
AlertTitle,
|
|
4281
|
+
AspectRatio,
|
|
4282
|
+
Avatar,
|
|
4283
|
+
AvatarFallback,
|
|
4284
|
+
AvatarImage,
|
|
4285
|
+
Badge,
|
|
4286
|
+
Breadcrumb,
|
|
4287
|
+
BreadcrumbEllipsis,
|
|
4288
|
+
BreadcrumbItem,
|
|
4289
|
+
BreadcrumbLink,
|
|
4290
|
+
BreadcrumbList,
|
|
4291
|
+
BreadcrumbPage,
|
|
4292
|
+
BreadcrumbSeparator,
|
|
4293
|
+
Button,
|
|
4294
|
+
Calendar,
|
|
4295
|
+
CalendarDayButton,
|
|
4296
|
+
Card,
|
|
4297
|
+
CardContent,
|
|
4298
|
+
CardDescription,
|
|
4299
|
+
CardFooter,
|
|
4300
|
+
CardHeader,
|
|
4301
|
+
CardTitle,
|
|
4302
|
+
Carousel,
|
|
4303
|
+
CarouselContent,
|
|
4304
|
+
CarouselItem,
|
|
4305
|
+
CarouselNext,
|
|
4306
|
+
CarouselPrevious,
|
|
4307
|
+
ChartContainer,
|
|
4308
|
+
ChartLegend,
|
|
4309
|
+
ChartLegendContent,
|
|
4310
|
+
ChartStyle,
|
|
4311
|
+
ChartTooltip,
|
|
4312
|
+
ChartTooltipContent,
|
|
4313
|
+
Checkbox,
|
|
4314
|
+
Collapsible,
|
|
4315
|
+
CollapsibleContent,
|
|
4316
|
+
CollapsibleTrigger,
|
|
4317
|
+
Command,
|
|
4318
|
+
CommandDialog,
|
|
4319
|
+
CommandEmpty,
|
|
4320
|
+
CommandGroup,
|
|
4321
|
+
CommandInput,
|
|
4322
|
+
CommandItem,
|
|
4323
|
+
CommandList,
|
|
4324
|
+
CommandSeparator,
|
|
4325
|
+
CommandShortcut,
|
|
4326
|
+
ConfirmDialog,
|
|
4327
|
+
ContextMenu,
|
|
4328
|
+
ContextMenuCheckboxItem,
|
|
4329
|
+
ContextMenuContent,
|
|
4330
|
+
ContextMenuGroup,
|
|
4331
|
+
ContextMenuItem,
|
|
4332
|
+
ContextMenuLabel,
|
|
4333
|
+
ContextMenuPortal,
|
|
4334
|
+
ContextMenuRadioGroup,
|
|
4335
|
+
ContextMenuRadioItem,
|
|
4336
|
+
ContextMenuSeparator,
|
|
4337
|
+
ContextMenuShortcut,
|
|
4338
|
+
ContextMenuSub,
|
|
4339
|
+
ContextMenuSubContent,
|
|
4340
|
+
ContextMenuSubTrigger,
|
|
4341
|
+
ContextMenuTrigger,
|
|
4342
|
+
DatePicker,
|
|
4343
|
+
Dialog,
|
|
4344
|
+
DialogClose,
|
|
4345
|
+
DialogContent,
|
|
4346
|
+
DialogDescription,
|
|
4347
|
+
DialogFooter,
|
|
4348
|
+
DialogHeader,
|
|
4349
|
+
DialogOverlay,
|
|
4350
|
+
DialogPortal,
|
|
4351
|
+
DialogTitle,
|
|
4352
|
+
DialogTrigger,
|
|
4353
|
+
Drawer,
|
|
4354
|
+
DrawerClose,
|
|
4355
|
+
DrawerContent,
|
|
4356
|
+
DrawerDescription,
|
|
4357
|
+
DrawerFooter,
|
|
4358
|
+
DrawerHeader,
|
|
4359
|
+
DrawerOverlay,
|
|
4360
|
+
DrawerPortal,
|
|
4361
|
+
DrawerTitle,
|
|
4362
|
+
DrawerTrigger,
|
|
4363
|
+
DropdownMenu,
|
|
4364
|
+
DropdownMenuCheckboxItem,
|
|
4365
|
+
DropdownMenuContent,
|
|
4366
|
+
DropdownMenuGroup,
|
|
4367
|
+
DropdownMenuItem,
|
|
4368
|
+
DropdownMenuLabel,
|
|
4369
|
+
DropdownMenuPortal,
|
|
4370
|
+
DropdownMenuRadioGroup,
|
|
4371
|
+
DropdownMenuRadioItem,
|
|
4372
|
+
DropdownMenuSeparator,
|
|
4373
|
+
DropdownMenuShortcut,
|
|
4374
|
+
DropdownMenuSub,
|
|
4375
|
+
DropdownMenuSubContent,
|
|
4376
|
+
DropdownMenuSubTrigger,
|
|
4377
|
+
DropdownMenuTrigger,
|
|
4378
|
+
Form,
|
|
4379
|
+
FormControl,
|
|
4380
|
+
FormDescription,
|
|
4381
|
+
FormField,
|
|
4382
|
+
FormItem,
|
|
4383
|
+
FormLabel,
|
|
4384
|
+
FormMessage,
|
|
4385
|
+
HoverCard,
|
|
4386
|
+
HoverCardContent,
|
|
4387
|
+
HoverCardTrigger,
|
|
4388
|
+
Input,
|
|
4389
|
+
InputOTP,
|
|
4390
|
+
InputOTPGroup,
|
|
4391
|
+
InputOTPSeparator,
|
|
4392
|
+
InputOTPSlot,
|
|
4393
|
+
Label,
|
|
4394
|
+
LoadingState,
|
|
4395
|
+
Menubar,
|
|
4396
|
+
MenubarCheckboxItem,
|
|
4397
|
+
MenubarContent,
|
|
4398
|
+
MenubarGroup,
|
|
4399
|
+
MenubarItem,
|
|
4400
|
+
MenubarLabel,
|
|
4401
|
+
MenubarMenu,
|
|
4402
|
+
MenubarPortal,
|
|
4403
|
+
MenubarRadioGroup,
|
|
4404
|
+
MenubarRadioItem,
|
|
4405
|
+
MenubarSeparator,
|
|
4406
|
+
MenubarShortcut,
|
|
4407
|
+
MenubarSub,
|
|
4408
|
+
MenubarSubContent,
|
|
4409
|
+
MenubarSubTrigger,
|
|
4410
|
+
MenubarTrigger,
|
|
4411
|
+
NavigationMenu,
|
|
4412
|
+
NavigationMenuContent,
|
|
4413
|
+
NavigationMenuIndicator,
|
|
4414
|
+
NavigationMenuItem,
|
|
4415
|
+
NavigationMenuLink,
|
|
4416
|
+
NavigationMenuList,
|
|
4417
|
+
NavigationMenuTrigger,
|
|
4418
|
+
NavigationMenuViewport,
|
|
4419
|
+
Pagination,
|
|
4420
|
+
PaginationContent,
|
|
4421
|
+
PaginationEllipsis,
|
|
4422
|
+
PaginationItem,
|
|
4423
|
+
PaginationLink,
|
|
4424
|
+
PaginationNext,
|
|
4425
|
+
PaginationPrevious,
|
|
4426
|
+
Panel,
|
|
4427
|
+
Popover,
|
|
4428
|
+
PopoverAnchor,
|
|
4429
|
+
PopoverContent,
|
|
4430
|
+
PopoverTrigger,
|
|
4431
|
+
Progress,
|
|
4432
|
+
RadioGroup,
|
|
4433
|
+
RadioGroupItem,
|
|
4434
|
+
ResizableHandle,
|
|
4435
|
+
ResizablePanel,
|
|
4436
|
+
ResizablePanelGroup,
|
|
4437
|
+
ScrollArea,
|
|
4438
|
+
ScrollBar,
|
|
4439
|
+
SearchableSelect,
|
|
4440
|
+
Select,
|
|
4441
|
+
SelectContent,
|
|
4442
|
+
SelectGroup,
|
|
4443
|
+
SelectItem,
|
|
4444
|
+
SelectLabel,
|
|
4445
|
+
SelectScrollDownButton,
|
|
4446
|
+
SelectScrollUpButton,
|
|
4447
|
+
SelectSeparator,
|
|
4448
|
+
SelectTrigger,
|
|
4449
|
+
SelectValue,
|
|
4450
|
+
Separator,
|
|
4451
|
+
Sheet,
|
|
4452
|
+
SheetClose,
|
|
4453
|
+
SheetContent,
|
|
4454
|
+
SheetDescription,
|
|
4455
|
+
SheetFooter,
|
|
4456
|
+
SheetHeader,
|
|
4457
|
+
SheetOverlay,
|
|
4458
|
+
SheetPortal,
|
|
4459
|
+
SheetTitle,
|
|
4460
|
+
SheetTrigger,
|
|
4461
|
+
Sidebar,
|
|
4462
|
+
SidebarContent,
|
|
4463
|
+
SidebarFooter,
|
|
4464
|
+
SidebarGroup,
|
|
4465
|
+
SidebarGroupAction,
|
|
4466
|
+
SidebarGroupContent,
|
|
4467
|
+
SidebarGroupLabel,
|
|
4468
|
+
SidebarHeader,
|
|
4469
|
+
SidebarInput,
|
|
4470
|
+
SidebarInset,
|
|
4471
|
+
SidebarMenu,
|
|
4472
|
+
SidebarMenuAction,
|
|
4473
|
+
SidebarMenuBadge,
|
|
4474
|
+
SidebarMenuButton,
|
|
4475
|
+
SidebarMenuItem,
|
|
4476
|
+
SidebarMenuSkeleton,
|
|
4477
|
+
SidebarMenuSub,
|
|
4478
|
+
SidebarMenuSubButton,
|
|
4479
|
+
SidebarMenuSubItem,
|
|
4480
|
+
SidebarProvider,
|
|
4481
|
+
SidebarRail,
|
|
4482
|
+
SidebarSeparator,
|
|
4483
|
+
SidebarTrigger,
|
|
4484
|
+
Skeleton,
|
|
4485
|
+
Slider,
|
|
4486
|
+
StatusChip,
|
|
4487
|
+
Switch,
|
|
4488
|
+
Table,
|
|
4489
|
+
TableBody,
|
|
4490
|
+
TableCaption,
|
|
4491
|
+
TableCell,
|
|
4492
|
+
TableFooter,
|
|
4493
|
+
TableHead,
|
|
4494
|
+
TableHeader,
|
|
4495
|
+
TableRow,
|
|
4496
|
+
Tabs,
|
|
4497
|
+
TabsContent,
|
|
4498
|
+
TabsList,
|
|
4499
|
+
TabsTrigger,
|
|
4500
|
+
Textarea,
|
|
4501
|
+
ThemeProvider,
|
|
4502
|
+
Toaster,
|
|
4503
|
+
Toggle,
|
|
4504
|
+
ToggleGroup,
|
|
4505
|
+
ToggleGroupItem,
|
|
4506
|
+
Tooltip,
|
|
4507
|
+
TooltipContent,
|
|
4508
|
+
TooltipProvider,
|
|
4509
|
+
TooltipTrigger,
|
|
4510
|
+
badgeVariants,
|
|
4511
|
+
buttonVariants,
|
|
4512
|
+
cn,
|
|
4513
|
+
navigationMenuTriggerStyle,
|
|
4514
|
+
toast,
|
|
4515
|
+
toggleVariants,
|
|
4516
|
+
useFormField,
|
|
4517
|
+
useIsMobile,
|
|
4518
|
+
useSidebar,
|
|
4519
|
+
useTheme
|
|
4520
|
+
});
|
|
4521
|
+
//# sourceMappingURL=index.cjs.map
|