@flexkit/studio 0.0.28 → 0.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/asset-TS7J5GA5.js +2 -0
- package/dist/{asset-REAMGMQL.js.map → asset-TS7J5GA5.js.map} +1 -1
- package/dist/chunk-73RMWG53.js +2 -0
- package/dist/{chunk-X3S7TRCM.js.map → chunk-73RMWG53.js.map} +1 -1
- package/dist/chunk-DWK4NNLB.js +2 -0
- package/dist/chunk-DWK4NNLB.js.map +1 -0
- package/dist/chunk-FVFRTCEB.js +2 -0
- package/dist/chunk-FVFRTCEB.js.map +1 -0
- package/dist/chunk-HAQICAOQ.js +2 -0
- package/dist/chunk-HAQICAOQ.js.map +1 -0
- package/dist/chunk-IXO2LU47.js +2 -0
- package/dist/{chunk-TBCSVE5L.js.map → chunk-IXO2LU47.js.map} +1 -1
- package/dist/{chunk-NNRD7YZU.js → chunk-LL2Z4TD3.js} +2 -2
- package/dist/{chunk-NNRD7YZU.js.map → chunk-LL2Z4TD3.js.map} +1 -1
- package/dist/chunk-MC6VZLKC.js +2 -0
- package/dist/chunk-MC6VZLKC.js.map +1 -0
- package/dist/chunk-N52AF6GE.js +2 -0
- package/dist/chunk-N52AF6GE.js.map +1 -0
- package/dist/chunk-WXMCINGZ.js +2 -0
- package/dist/{chunk-27Y2SQ67.js.map → chunk-WXMCINGZ.js.map} +1 -1
- package/dist/chunk-YA4ACPM5.js +2 -0
- package/dist/{chunk-KR7CLPY2.js.map → chunk-YA4ACPM5.js.map} +1 -1
- package/dist/index.css +814 -42
- package/dist/index.d.ts +39 -4
- package/dist/index.js +196 -194
- package/dist/index.js.map +1 -1
- package/dist/{search-YRDOJUQO.js → search-UFFZBRQV.js} +2 -2
- package/dist/{search-YRDOJUQO.js.map → search-UFFZBRQV.js.map} +1 -1
- package/dist/switch-AFZGXSR3.js +2 -0
- package/dist/{switch-KVO3JRNX.js.map → switch-AFZGXSR3.js.map} +1 -1
- package/dist/text-2RL2L5FT.js +2 -0
- package/dist/{text-ODG7ABSW.js.map → text-2RL2L5FT.js.map} +1 -1
- package/dist/textarea-2A4TLWZS.js +2 -0
- package/dist/{textarea-M4YPSJEC.js.map → textarea-2A4TLWZS.js.map} +1 -1
- package/dist/{types.d-DiQPwK_q.d.ts → types.d-CX3kDxFZ.d.ts} +45 -4
- package/dist/ui.d.ts +467 -4
- package/dist/ui.js +6 -1
- package/dist/ui.js.map +1 -1
- package/dist/user-nav-4JKIFZLB.js +2 -0
- package/dist/user-nav-4JKIFZLB.js.map +1 -0
- package/package.json +17 -1
- package/dist/asset-REAMGMQL.js +0 -2
- package/dist/chunk-27Y2SQ67.js +0 -2
- package/dist/chunk-AALMEPYG.js +0 -2
- package/dist/chunk-AALMEPYG.js.map +0 -1
- package/dist/chunk-CWHDJ7Q4.js +0 -2
- package/dist/chunk-CWHDJ7Q4.js.map +0 -1
- package/dist/chunk-KR7CLPY2.js +0 -2
- package/dist/chunk-M5AH5ERI.js +0 -2
- package/dist/chunk-M5AH5ERI.js.map +0 -1
- package/dist/chunk-QXCD5JR4.js +0 -2
- package/dist/chunk-QXCD5JR4.js.map +0 -1
- package/dist/chunk-TBCSVE5L.js +0 -2
- package/dist/chunk-X3S7TRCM.js +0 -2
- package/dist/chunk-ZSJAPCIZ.js +0 -2
- package/dist/chunk-ZSJAPCIZ.js.map +0 -1
- package/dist/switch-KVO3JRNX.js +0 -2
- package/dist/text-ODG7ABSW.js +0 -2
- package/dist/textarea-M4YPSJEC.js +0 -2
- package/dist/user-nav-QYO4X7CQ.js +0 -2
- package/dist/user-nav-QYO4X7CQ.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"asset-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"asset-TS7J5GA5.js"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import'./index.css';import {a as a$1}from'./chunk-HAQICAOQ.js';import {a}from'./chunk-KGYH74NA.js';import {c,e,f,h,g,i}from'./chunk-FVFRTCEB.js';import {jsx,jsxs}from'react/jsx-runtime';function S({control:k,fieldSchema:p,setValue:a$2}){let{name:l,label:h$1,isEditable:v,options:n}=p;function b(e,o){a$2(l,{...o,value:e});}function w(e,o){a$2(l,{...o,disabled:e});}return jsx(c,{control:k,name:l,render:({field:e$1})=>jsxs(e,{children:[jsxs("div",{className:"fk:flex fk:flex-row fk:items-center fk:justify-between fk:rounded-lg fk:border fk:border-input fk:p-3 fk:ring-offset-background fk:focus-within:outline-hidden fk:focus-within:ring-2 fk:focus-within:ring-ring fk:focus-within:ring-offset-2 fk:disabled:cursor-not-allowed fk:disabled:opacity-50",children:[jsxs("div",{className:"fk:space-y-0.5",children:[jsx(f,{children:h$1}),n?.comment?jsx(h,{children:n.comment}):null]}),jsx(g,{children:jsx(a,{checked:e$1.value?.value?!!e$1.value.value:false,disabled:v===false||e$1.value?.disabled,onCheckedChange:o=>{b(o,e$1.value);}})})]}),jsx(a$1,{checked:e$1.value?.disabled??false,onChange:o=>{w(o,e$1.value);},scope:e$1.value?.scope}),jsx(i,{})]})})}export{S as a};//# sourceMappingURL=chunk-73RMWG53.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-73RMWG53.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/form/fields/switch.tsx"],"names":["Switch","control","fieldSchema","setValue","name","label","isEditable","options","handleInput","checked","previousValue","handleCheckbox","value","jsx","FormField","field","jsxs","FormItem","FormLabel","FormDescription","FormControl","DefaultValueSwitch","FormMessage"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/form/fields/switch.tsx"],"names":["Switch","control","fieldSchema","setValue","name","label","isEditable","options","handleInput","checked","previousValue","handleCheckbox","value","jsx","FormField","field","jsxs","FormItem","FormLabel","FormDescription","FormControl","DefaultValueSwitch","FormMessage"],"mappings":"0LAMO,SAASA,CAAAA,CAAO,CAAE,OAAA,CAAAC,CA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AAA,CAAYC,CAAAA,CAASM,GAAAA,CAAM,KAAK,EAClC,CAAA,CACF,CAAA,CACF,CAAA,CAAA,CACF,EACAF,GAAAA,CAACQ,GAAAA,CAAA,CACC,OAAA,CAASN,GAAAA,CAAM,OAAO,QAAA,EAAY,KAAA,CAClC,QAAA,CAAWN,CAAAA,EAAY,CACrBE,CAAAA,CAAeF,CAAAA,CAASM,GAAAA,CAAM,KAAK,EACrC,CAAA,CACA,KAAA,CAAOA,GAAAA,CAAM,KAAA,EAAO,MACtB,CAAA,CACAF,GAAAA,CAACS,EAAA,EAAY,CAAA,CAAA,CACf,EAEJ,CAEJ","file":"chunk-73RMWG53.js","sourcesContent":["import type { FormFieldValue } from '../../graphql-client/types';\nimport { FormControl, FormDescription, FormField, FormLabel, FormMessage, FormItem } from '../../ui/primitives/form';\nimport { Switch as SwitchPrimitive } from '../../ui/primitives/switch';\nimport type { FormFieldParams } from '../types';\nimport { DefaultValueSwitch } from './default-value-switch';\n\nexport function Switch({ control, fieldSchema, setValue }: FormFieldParams<'switch'>): JSX.Element {\n const { name, label, isEditable, options } = fieldSchema;\n\n function handleInput(checked: boolean, previousValue: FormFieldValue | undefined): void {\n setValue(name, {\n ...previousValue,\n value: checked,\n });\n }\n\n function handleCheckbox(checked: boolean, value: FormFieldValue | undefined): void {\n setValue(name, {\n ...value,\n disabled: checked,\n });\n }\n\n return (\n <FormField\n control={control}\n name={name}\n render={({ field }: { field: { value?: FormFieldValue } }) => (\n <FormItem>\n <div className=\"fk:flex fk:flex-row fk:items-center fk:justify-between fk:rounded-lg fk:border fk:border-input fk:p-3 fk:ring-offset-background fk:focus-within:outline-hidden fk:focus-within:ring-2 fk:focus-within:ring-ring fk:focus-within:ring-offset-2 fk:disabled:cursor-not-allowed fk:disabled:opacity-50\">\n <div className=\"fk:space-y-0.5\">\n <FormLabel>{label}</FormLabel>\n {options?.comment ? <FormDescription>{options.comment}</FormDescription> : null}\n </div>\n <FormControl>\n <SwitchPrimitive\n checked={field.value?.value ? Boolean(field.value.value) : false}\n disabled={isEditable === false || field.value?.disabled}\n onCheckedChange={(checked) => {\n handleInput(checked, field.value);\n }}\n />\n </FormControl>\n </div>\n <DefaultValueSwitch\n checked={field.value?.disabled ?? false}\n onChange={(checked) => {\n handleCheckbox(checked, field.value);\n }}\n scope={field.value?.scope}\n />\n <FormMessage />\n </FormItem>\n )}\n />\n );\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import'./index.css';import {d}from'./chunk-V6R4AWQS.js';import {c as c$1}from'./chunk-WDRCARCP.js';import {createContext,useContext}from'react';import h from'swr';import {useParams}from'react-router-dom';import {jsx}from'react/jsx-runtime';function n(){let{projectId:e}=useParams(),{projects:t}=d(),r=t.find(s=>s.projectId===e)??t[0],{data:a,isLoading:d$1}=h(c$1(e??"").currentUser,s=>fetch(s,{mode:"cors",credentials:"include"}).then(o=>o.json()).then(o=>({...o,spaces:o.spaces??[]})));return [d$1,{user:a,logout:async()=>{await fetch(c$1(e??"").logout(r?.basePath??"/"),{method:"POST",mode:"cors",credentials:"include"}),await fetch("/api/flexkit/logout",{method:"GET",credentials:"include"}),window.location.reload();}}]}var c=createContext([true,{user:null,logout:()=>Promise.resolve()}]);function L({children:e}){let[t,r]=n();return jsx(c.Provider,{value:[t,r],children:e})}function j(){return useContext(c)}export{L as a,j as b};//# sourceMappingURL=chunk-DWK4NNLB.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-DWK4NNLB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/auth/use-auth-service.ts","../src/auth/auth-context.tsx"],"names":["useAuthService","projectId","useParams","projects","useConfig","currentProject","project","user","isLoadingUser","useSWR","apiPaths","url","res","data","AuthContext","createContext","AuthProvider","children","isLoading","auth","jsx","useAuth","useContext"],"mappings":"gPAQe,SAARA,CAAAA,EAA+C,CACpD,GAAM,CAAE,SAAA,CAAAC,CAAU,CAAA,CAAIC,SAAAA,EAAU,CAC1B,CAAE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,CAAqB,KAAA,CAAO,CAACI,EAAWC,CAAI,CAAA,CAAI,SAAAF,CAAAA,CAAS,CACnE,CAEO,SAASI,CAAAA,EAAuB,CACrC,OAAOC,UAAAA,CAAWR,CAAW,CAC/B","file":"chunk-DWK4NNLB.js","sourcesContent":["'use client';\n\nimport useSWR from 'swr';\nimport { useParams } from 'react-router-dom';\nimport { apiPaths } from '../core/api-paths';\nimport { useConfig } from '../core/config/config-context';\nimport type { AuthService, User } from './types';\n\nexport default function useAuthService(): AuthService {\n const { projectId } = useParams();\n const { projects } = useConfig();\n const currentProject = projects.find((project) => project.projectId === projectId) ?? projects[0];\n const { data: user, isLoading: isLoadingUser } = useSWR(apiPaths(projectId ?? '').currentUser, (url: string) =>\n fetch(url, { mode: 'cors', credentials: 'include' })\n .then((res) => res.json() as Promise<User>)\n .then((data) => ({ ...data, spaces: data.spaces ?? [] }))\n );\n const isLoading = isLoadingUser;\n\n return [\n isLoading,\n {\n user,\n logout: async () => {\n // wipe remote session\n await fetch(apiPaths(projectId ?? '').logout(currentProject?.basePath ?? '/'), {\n method: 'POST',\n mode: 'cors',\n credentials: 'include',\n });\n\n // delete first-party auth cookie\n await fetch('/api/flexkit/logout', { method: 'GET', credentials: 'include' });\n\n window.location.reload();\n },\n },\n ];\n}\n","'use client';\n\nimport { createContext, JSX, useContext } from 'react';\nimport useAuthService from './use-auth-service';\nimport type { Auth, AuthService, User } from './types';\n\nconst AuthContext = createContext([\n true,\n {\n user: null as User | null,\n logout: () => Promise.resolve(),\n } as Auth,\n]);\n\nexport function AuthProvider({ children }: { children: React.ReactNode }): JSX.Element {\n const [isLoading, auth] = useAuthService();\n\n return <AuthContext.Provider value={[isLoading, auth]}>{children}</AuthContext.Provider>;\n}\n\nexport function useAuth(): AuthService {\n return useContext(AuthContext) as AuthService;\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import'./index.css';import {a}from'./chunk-O2QMYUPS.js';import {Label,Slot,Checkbox}from'radix-ui';import {jsx}from'react/jsx-runtime';import*as i from'react';import {FormProvider,Controller,useFormContext,useFormState}from'react-hook-form';import {CheckIcon}from'lucide-react';function c({className:e,...t}){return jsx(Label.Root,{"data-slot":"label",className:a("fk:flex fk:items-center fk:gap-2 fk:text-sm fk:leading-none fk:font-medium fk:select-none fk:group-data-[disabled=true]:pointer-events-none fk:group-data-[disabled=true]:opacity-50 fk:peer-disabled:cursor-not-allowed fk:peer-disabled:opacity-50",e),...t})}var S=FormProvider,f=i.createContext({}),$=({...e})=>jsx(f.Provider,{value:{name:e.name},children:jsx(Controller,{...e})}),m=()=>{let e=i.useContext(f),t=i.useContext(u),{getFieldState:o}=useFormContext(),a=useFormState({name:e.name}),s=o(e.name,a);if(!e)throw new Error("useFormField should be used within <FormField>");let{id:d}=t;return {id:d,name:e.name,formItemId:`${d}-form-item`,formDescriptionId:`${d}-form-item-description`,formMessageId:`${d}-form-item-message`,...s}},u=i.createContext({});function D({className:e,...t}){let o=i.useId();return jsx(u.Provider,{value:{id:o},children:jsx("div",{"data-slot":"form-item",className:a("fk:grid fk:gap-2",e),...t})})}function M({className:e,...t}){let{error:o,formItemId:a$1}=m();return jsx(c,{"data-slot":"form-label","data-error":!!o,className:a("fk:data-[error=true]:text-destructive",e),htmlFor:a$1,...t})}function z({...e}){let{error:t,formItemId:o,formDescriptionId:a,formMessageId:s}=m();return jsx(Slot.Root,{"data-slot":"form-control",id:o,"aria-describedby":t?`${a} ${s}`:`${a}`,"aria-invalid":!!t,...e})}function E({className:e,...t}){let{formDescriptionId:o}=m();return jsx("p",{"data-slot":"form-description",id:o,className:a("fk:text-sm fk:text-muted-foreground",e),...t})}function q({className:e,...t}){let{error:o,formMessageId:a$1}=m(),s=o?String(o?.message??""):t.children;return s?jsx("p",{"data-slot":"form-message",id:a$1,className:a("fk:text-sm fk:text-destructive",e),...t,children:s}):null}function K({className:e,...t}){return jsx(Checkbox.Root,{"data-slot":"checkbox",className:a("fk:peer fk:size-4 fk:shrink-0 fk:rounded-[4px] fk:border fk:border-input fk:shadow-xs fk:transition-shadow fk:outline-none fk:focus-visible:border-ring fk:focus-visible:ring-[3px] fk:focus-visible:ring-ring/50 fk:disabled:cursor-not-allowed fk:disabled:opacity-50 fk:aria-invalid:border-destructive fk:aria-invalid:ring-destructive/20 fk:data-[state=checked]:border-primary fk:data-[state=checked]:bg-primary fk:data-[state=checked]:text-primary-foreground fk:dark:bg-input/30 fk:dark:aria-invalid:ring-destructive/40 fk:dark:data-[state=checked]:bg-primary",e),...t,children:jsx(Checkbox.Indicator,{"data-slot":"checkbox-indicator",className:"fk:grid fk:place-content-center fk:text-current fk:transition-none",children:jsx(CheckIcon,{className:"fk:size-3.5"})})})}export{c as a,S as b,$ as c,m as d,D as e,M as f,z as g,E as h,q as i,K as j};//# sourceMappingURL=chunk-FVFRTCEB.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-FVFRTCEB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/ui/primitives/label.tsx","../src/ui/primitives/form.tsx","../src/ui/primitives/checkbox.tsx"],"names":["Label","className","props","jsx","LabelPrimitive","cn","Form","FormProvider","FormFieldContext","FormField","Controller","useFormField","fieldContext","itemContext","FormItemContext","getFieldState","useFormContext","formState","useFormState","fieldState","id","FormItem","FormLabel","error","formItemId","FormControl","formDescriptionId","formMessageId","Slot","FormDescription","FormMessage","body","Checkbox","CheckboxPrimitive","CheckIcon"],"mappings":"sRAMA,SAASA,EAAM,CAAE,SAAA,CAAAC,EAAW,GAAGC,CAAM,EAAqD,CACxF,OACEC,IAACC,KAAAA,CAAe,IAAA,CAAf,CACC,WAAA,CAAU,OAAA,CACV,SAAA,CAAWC,EACT,sPAAA,CACAJ,CACF,EACC,GAAGC,CAAAA,CACN,CAEJ,CCHA,IAAMI,EAAOC,YAAAA,CASPC,CAAAA,CAAyB,gBAAqC,EAA2B,CAAA,CAEzFC,CAAAA,CAAY,CAGhB,CACA,GAAGP,CACL,CAAA,GAEIC,I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GAAGC,CAAM,CAAA,CAA8B,CACvE,GAAM,CAAE,KAAA,CAAAqB,EAAO,aAAA,CAAAI,GAAc,EAAIhB,CAAAA,EAAa,CACxCoB,CAAAA,CAAOR,CAAAA,CAAQ,MAAA,CAAOA,CAAAA,EAAO,SAAW,EAAE,CAAA,CAAIrB,EAAM,QAAA,CAE1D,OAAK6B,EAKH5B,GAAAA,CAAC,GAAA,CAAA,CACC,WAAA,CAAU,cAAA,CACV,EAAA,CAAIwB,GAAAA,CACJ,UAAWtB,CAAAA,CAAG,gCAAA,CAAkCJ,CAAS,CAAA,CACxD,GAAGC,EAEH,QAAA,CAAA6B,CAAAA,CACH,CAAA,CAXO,IAaX,CCjIA,SAASC,CAAAA,CAAS,CAAE,UAAA/B,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAwD,CAC9F,OACEC,GAAAA,CAAC8B,QAAAA,CAAkB,IAAA,CAAlB,CACC,WAAA,CAAU,UAAA,CACV,UAAW5B,CAAAA,CACT,+iBAAA,CACAJ,CACF,CAAA,CACC,GAAGC,EAEJ,QAAA,CAAAC,GAAAA,CAAC8B,QAAAA,CAAkB,SAAA,CAAlB,CACC,WAAA,CAAU,qBACV,SAAA,CAAU,oEAAA,CAEV,SAAA9B,GAAAA,CAAC+B,SAAAA,CAAA,CAAU,SAAA,CAAU,aAAA,CAAc,CAAA,CACrC,CAAA,CACF,CAEJ","file":"chunk-FVFRTCEB.js","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Label as LabelPrimitive } from 'radix-ui';\nimport { cn } from '../lib/utils';\n\nfunction Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {\n return (\n <LabelPrimitive.Root\n data-slot=\"label\"\n className={cn(\n 'fk:flex fk:items-center fk:gap-2 fk:text-sm fk:leading-none fk:font-medium fk:select-none fk:group-data-[disabled=true]:pointer-events-none fk:group-data-[disabled=true]:opacity-50 fk:peer-disabled:cursor-not-allowed fk:peer-disabled:opacity-50',\n className\n )}\n {...props}\n />\n );\n}\n\nexport { Label };\n","import * as React from 'react';\nimport { Label as LabelPrimitive, Slot } from 'radix-ui';\nimport {\n Controller,\n FormProvider,\n useFormContext,\n useFormState,\n type ControllerProps,\n type FieldPath,\n type FieldValues,\n} from 'react-hook-form';\nimport { cn } from '../lib/utils';\nimport { Label } from './label';\n\nconst Form = FormProvider;\n\ntype FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = {\n name: TName;\n};\n\nconst FormFieldContext = React.createContext<FormFieldContextValue>({} as FormFieldContextValue);\n\nconst FormField = <\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({\n ...props\n}: ControllerProps<TFieldValues, TName>) => {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n );\n};\n\nconst useFormField = () => {\n const fieldContext = React.useContext(FormFieldContext);\n const itemContext = React.useContext(FormItemContext);\n const { getFieldState } = useFormContext();\n const formState = useFormState({ name: fieldContext.name });\n const fieldState = getFieldState(fieldContext.name, formState);\n\n if (!fieldContext) {\n throw new Error('useFormField should be used within <FormField>');\n }\n\n const { id } = itemContext;\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `${id}-form-item`,\n formDescriptionId: `${id}-form-item-description`,\n formMessageId: `${id}-form-item-message`,\n ...fieldState,\n };\n};\n\ntype FormItemContextValue = {\n id: string;\n};\n\nconst FormItemContext = React.createContext<FormItemContextValue>({} as FormItemContextValue);\n\nfunction FormItem({ className, ...props }: React.ComponentProps<'div'>) {\n const id = React.useId();\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div data-slot=\"form-item\" className={cn('fk:grid fk:gap-2', className)} {...props} />\n </FormItemContext.Provider>\n );\n}\n\nfunction FormLabel({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {\n const { error, formItemId } = useFormField();\n\n return (\n <Label\n data-slot=\"form-label\"\n data-error={!!error}\n className={cn('fk:data-[error=true]:text-destructive', className)}\n htmlFor={formItemId}\n {...props}\n />\n );\n}\n\nfunction FormControl({ ...props }: React.ComponentProps<typeof Slot.Root>) {\n const { error, formItemId, formDescriptionId, formMessageId } = useFormField();\n\n return (\n <Slot.Root\n data-slot=\"form-control\"\n id={formItemId}\n aria-describedby={!error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`}\n aria-invalid={!!error}\n {...props}\n />\n );\n}\n\nfunction FormDescription({ className, ...props }: React.ComponentProps<'p'>) {\n const { formDescriptionId } = useFormField();\n\n return (\n <p\n data-slot=\"form-description\"\n id={formDescriptionId}\n className={cn('fk:text-sm fk:text-muted-foreground', className)}\n {...props}\n />\n );\n}\n\nfunction FormMessage({ className, ...props }: React.ComponentProps<'p'>) {\n const { error, formMessageId } = useFormField();\n const body = error ? String(error?.message ?? '') : props.children;\n\n if (!body) {\n return null;\n }\n\n return (\n <p\n data-slot=\"form-message\"\n id={formMessageId}\n className={cn('fk:text-sm fk:text-destructive', className)}\n {...props}\n >\n {body}\n </p>\n );\n}\n\nexport { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField };\n","'use client';\n\nimport * as React from 'react';\nimport { Checkbox as CheckboxPrimitive } from 'radix-ui';\nimport { CheckIcon } from 'lucide-react';\nimport { cn } from '../lib/utils';\n\nfunction Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>) {\n return (\n <CheckboxPrimitive.Root\n data-slot=\"checkbox\"\n className={cn(\n 'fk:peer fk:size-4 fk:shrink-0 fk:rounded-[4px] fk:border fk:border-input fk:shadow-xs fk:transition-shadow fk:outline-none fk:focus-visible:border-ring fk:focus-visible:ring-[3px] fk:focus-visible:ring-ring/50 fk:disabled:cursor-not-allowed fk:disabled:opacity-50 fk:aria-invalid:border-destructive fk:aria-invalid:ring-destructive/20 fk:data-[state=checked]:border-primary fk:data-[state=checked]:bg-primary fk:data-[state=checked]:text-primary-foreground fk:dark:bg-input/30 fk:dark:aria-invalid:ring-destructive/40 fk:dark:data-[state=checked]:bg-primary',\n className\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n data-slot=\"checkbox-indicator\"\n className=\"fk:grid fk:place-content-center fk:text-current fk:transition-none\"\n >\n <CheckIcon className=\"fk:size-3.5\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n );\n}\n\nexport { Checkbox };\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import'./index.css';import {j}from'./chunk-FVFRTCEB.js';import {useId}from'react';import {jsxs,jsx}from'react/jsx-runtime';function i({scope:e,checked:t,onChange:a}){let o=useId();return !e||e==="default"?null:jsxs("div",{className:"fk:flex fk:items-center fk:space-x-2 fk:mb-2",children:[jsx(j,{checked:t,id:o,onCheckedChange:a}),jsx("label",{className:"fk:text-xs fk:font-normal fk:leading-none fk:peer-disabled:cursor-not-allowed fk:peer-disabled:opacity-70",htmlFor:o,children:"Use default value"})]})}export{i as a};//# sourceMappingURL=chunk-HAQICAOQ.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-HAQICAOQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/form/fields/default-value-switch.tsx"],"names":["DefaultValueSwitch","scope","checked","onChange","elementId","useId","jsxs","jsx","Checkbox"],"mappings":"2HAUO,SAASA,CAAAA,CAAmB,CAAE,MAAAC,CAAAA,CAAO,OAAA,CAAAC,CAAAA,CAAS,QAAA,CAAAC,CAAS,CAAA,CAA8B,CAC1F,IAAMC,CAAAA,CAAYC,KAAAA,EAAM,CAExB,OAAI,CAACJ,GAASA,CAAAA,GAAU,SAAA,CACf,IAAA,CAIPK,IAAAA,CAAC,KAAA,CAAA,CAAI,SAAA,CAAU,+CACb,QAAA,CAAA,CAAAC,GAAAA,CAACC,CAAAA,CAAA,CAAS,OAAA,CAASN,CAAAA,CAAS,GAAIE,CAAAA,CAAW,eAAA,CAAiBD,CAAAA,CAAwB,CAAA,CACpFI,GAAAA,CAAC,OAAA,CAAA,CACC,SAAA,CAAU,2GAAA,CACV,OAAA,CAASH,CAAAA,CACV,QAAA,CAAA,mBAAA,CAED,CAAA,CAAA,CACF,CAEJ","file":"chunk-HAQICAOQ.js","sourcesContent":["import { useId } from 'react';\nimport type { JSX } from 'react';\nimport { Checkbox } from '../../ui/primitives/checkbox';\n\ntype Props = {\n scope: string | undefined;\n checked: boolean;\n onChange: (checked: boolean) => void;\n};\n\nexport function DefaultValueSwitch({ scope, checked, onChange }: Props): JSX.Element | null {\n const elementId = useId();\n\n if (!scope || scope === 'default') {\n return null;\n }\n\n return (\n <div className=\"fk:flex fk:items-center fk:space-x-2 fk:mb-2\">\n <Checkbox checked={checked} id={elementId} onCheckedChange={onChange as () => void} />\n <label\n className=\"fk:text-xs fk:font-normal fk:leading-none fk:peer-disabled:cursor-not-allowed fk:peer-disabled:opacity-70\"\n htmlFor={elementId}\n >\n Use default value\n </label>\n </div>\n );\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import'./index.css';import {a}from'./chunk-O2QMYUPS.js';import {createContext,useState,useCallback,useEffect,useMemo,useContext}from'react';import {jsx,jsxs}from'react/jsx-runtime';import {DropdownMenu}from'radix-ui';import {CheckIcon,CircleIcon,ChevronRightIcon}from'lucide-react';var U=["light","dark"],C="(prefers-color-scheme: dark)",R=createContext(void 0);function Y({attribute:e="data-theme",children:t,defaultTheme:o,disableTransitionOnChange:a=false,enableColorScheme:h=true,enableSystem:d=true,forcedTheme:f,storageKey:g="theme",themes:m=U,value:l}){let[c,I]=useState(()=>A(g,o,d)),[p,b]=useState(()=>Q()),P=T(f??c,d,p),x=useCallback(s=>{if(!f&&(I(s),!!k()))try{window.localStorage.setItem(g,s);}catch{}},[f,g]);useEffect(()=>{if(!k()||!d)return;let s=window.matchMedia(C);function v(u){b(u.matches?"dark":"light");}return b(s.matches?"dark":"light"),s.addEventListener("change",v),()=>{s.removeEventListener("change",v);}},[d]),useEffect(()=>{if(!k())return;let s=window.document.documentElement,u=T(f??c??o,d,p);if(!u)return;let z=a?V():void 0,N=l?Object.values(l):m,y=l?.[u]??u;e==="class"&&(s.classList.remove(...N),s.classList.add(y)),e!=="class"&&s.setAttribute(e,y),h&&(u==="dark"||u==="light")&&(s.style.colorScheme=u),z?.();},[e,o,a,h,d,f,p,c,m,l]);let S=useMemo(()=>({forcedTheme:f,resolvedTheme:P,setTheme:x,systemTheme:p,theme:f??c,themes:d?[...m,"system"]:m}),[d,f,P,x,p,c,m]);return jsx(R.Provider,{value:S,children:t})}function j(){let e=useContext(R);if(!e)throw new Error("useTheme must be used within ThemeProvider");return e}function V(){let e=window.document.createElement("style");return e.appendChild(window.document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),window.document.head.appendChild(e),()=>{window.getComputedStyle(window.document.body),window.setTimeout(()=>{e.remove();},0);}}function A(e,t,o){if(!k())return t??(o?"system":"light");try{let a=window.localStorage.getItem(e);if(a)return a}catch{}return t??(o?"system":"light")}function Q(){if(k())return window.matchMedia(C).matches?"dark":"light"}function k(){return typeof window<"u"}function T(e,t,o){if(e)return e!=="system"?e:t?o??"light":"light"}function ee({...e}){return jsx(DropdownMenu.Root,{"data-slot":"dropdown-menu",...e})}function te({...e}){return jsx(DropdownMenu.Portal,{"data-slot":"dropdown-menu-portal",...e})}function oe({...e}){return jsx(DropdownMenu.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}function ne({className:e,sideOffset:t=4,...o}){return jsx(DropdownMenu.Portal,{children:jsx(DropdownMenu.Content,{"data-slot":"dropdown-menu-content",sideOffset:t,className:a("fk:z-50 fk:max-h-(--radix-dropdown-menu-content-available-height) fk:min-w-32 fk:origin-(--radix-dropdown-menu-content-transform-origin) fk:overflow-x-hidden fk:overflow-y-auto fk:rounded-md fk:border fk:bg-popover fk:p-1 fk:text-popover-foreground fk:shadow-md fk:data-[side=bottom]:slide-in-from-top-2 fk:data-[side=left]:slide-in-from-right-2 fk:data-[side=right]:slide-in-from-left-2 fk:data-[side=top]:slide-in-from-bottom-2 fk:data-[state=closed]:animate-out fk:data-[state=closed]:fade-out-0 fk:data-[state=closed]:zoom-out-95 fk:data-[state=open]:animate-in fk:data-[state=open]:fade-in-0 fk:data-[state=open]:zoom-in-95",e),...o})})}function re({...e}){return jsx(DropdownMenu.Group,{"data-slot":"dropdown-menu-group",...e})}function ie({className:e,inset:t,variant:o="default",...a$1}){return jsx(DropdownMenu.Item,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":o,className:a("fk:relative fk:flex fk:cursor-default fk:items-center fk:gap-2 fk:rounded-sm fk:px-2 fk:py-1.5 fk:text-sm fk:outline-hidden fk:select-none fk:focus:bg-accent fk:focus:text-accent-foreground fk:data-disabled:pointer-events-none fk:data-disabled:opacity-50 fk:data-inset:pl-8 fk:data-[variant=destructive]:text-destructive fk:data-[variant=destructive]:focus:bg-destructive/10 fk:data-[variant=destructive]:focus:text-destructive fk:dark:data-[variant=destructive]:focus:bg-destructive/20 fk:[&_svg]:pointer-events-none fk:[&_svg]:shrink-0 fk:[&_svg:not([class*='size-'])]:size-4 fk:[&_svg:not([class*='text-'])]:text-muted-foreground fk:data-[variant=destructive]:*:[svg]:text-destructive!",e),...a$1})}function ae({className:e,children:t,checked:o,...a$1}){return jsxs(DropdownMenu.CheckboxItem,{"data-slot":"dropdown-menu-checkbox-item",className:a("fk:relative fk:flex fk:cursor-default fk:items-center fk:gap-2 fk:rounded-sm fk:py-1.5 fk:pr-2 fk:pl-8 fk:text-sm fk:outline-hidden fk:select-none fk:focus:bg-accent fk:focus:text-accent-foreground fk:data-disabled:pointer-events-none fk:data-disabled:opacity-50 fk:[&_svg]:pointer-events-none fk:[&_svg]:shrink-0 fk:[&_svg:not([class*='size-'])]:size-4",e),checked:o,...a$1,children:[jsx("span",{className:"fk:pointer-events-none fk:absolute fk:left-2 fk:flex fk:size-3.5 fk:items-center fk:justify-center",children:jsx(DropdownMenu.ItemIndicator,{children:jsx(CheckIcon,{className:"size-4"})})}),t]})}function se({...e}){return jsx(DropdownMenu.RadioGroup,{"data-slot":"dropdown-menu-radio-group",...e})}function de({className:e,children:t,...o}){return jsxs(DropdownMenu.RadioItem,{"data-slot":"dropdown-menu-radio-item",className:a("fk:relative fk:flex fk:cursor-default fk:items-center fk:gap-2 fk:rounded-sm fk:py-1.5 fk:pr-2 fk:pl-8 fk:text-sm fk:outline-hidden fk:select-none fk:focus:bg-accent fk:focus:text-accent-foreground fk:data-disabled:pointer-events-none fk:data-disabled:opacity-50 fk:[&_svg]:pointer-events-none fk:[&_svg]:shrink-0 fk:[&_svg:not([class*='size-'])]:size-4",e),...o,children:[jsx("span",{className:"fk:pointer-events-none fk:absolute fk:left-2 fk:flex fk:size-3.5 fk:items-center fk:justify-center",children:jsx(DropdownMenu.ItemIndicator,{children:jsx(CircleIcon,{className:"size-2 fill-current"})})}),t]})}function fe({className:e,inset:t,...o}){return jsx(DropdownMenu.Label,{"data-slot":"dropdown-menu-label","data-inset":t,className:a("fk:px-2 fk:py-1.5 fk:text-sm fk:font-medium fk:data-inset:pl-8",e),...o})}function ue({className:e,...t}){return jsx(DropdownMenu.Separator,{"data-slot":"dropdown-menu-separator",className:a("fk:-mx-1 fk:my-1 fk:h-px fk:bg-border",e),...t})}function me({className:e,...t}){return jsx("span",{"data-slot":"dropdown-menu-shortcut",className:a("fk:ml-auto fk:text-xs fk:tracking-widest fk:text-muted-foreground",e),...t})}function ce({...e}){return jsx(DropdownMenu.Sub,{"data-slot":"dropdown-menu-sub",...e})}function pe({className:e,inset:t,children:o,...a$1}){return jsxs(DropdownMenu.SubTrigger,{"data-slot":"dropdown-menu-sub-trigger","data-inset":t,className:a("fk:flex fk:cursor-default fk:items-center fk:gap-2 fk:rounded-sm fk:px-2 fk:py-1.5 fk:text-sm fk:outline-hidden fk:select-none fk:focus:bg-accent fk:focus:text-accent-foreground fk:data-inset:pl-8 fk:data-[state=open]:bg-accent fk:data-[state=open]:text-accent-foreground fk:[&_svg]:pointer-events-none fk:[&_svg]:shrink-0 fk:[&_svg:not([class*='size-'])]:size-4 fk:[&_svg:not([class*='text-'])]:text-muted-foreground",e),...a$1,children:[o,jsx(ChevronRightIcon,{className:"fk:ml-auto fk:size-4"})]})}function ke({className:e,...t}){return jsx(DropdownMenu.SubContent,{"data-slot":"dropdown-menu-sub-content",className:a("fk:z-50 fk:min-w-32 fk:origin-(--radix-dropdown-menu-content-transform-origin) fk:overflow-hidden fk:rounded-md fk:border fk:bg-popover fk:p-1 fk:text-popover-foreground fk:shadow-lg fk:data-[side=bottom]:slide-in-from-top-2 fk:data-[side=left]:slide-in-from-right-2 fk:data-[side=right]:slide-in-from-left-2 fk:data-[side=top]:slide-in-from-bottom-2 fk:data-[state=closed]:animate-out fk:data-[state=closed]:fade-out-0 fk:data-[state=closed]:zoom-out-95 fk:data-[state=open]:animate-in fk:data-[state=open]:fade-in-0 fk:data-[state=open]:zoom-in-95",e),...t})}function we({className:e,...t}){return jsx("div",{"data-slot":"skeleton",className:a("fk:animate-pulse fk:rounded-md fk:bg-accent",e),...t})}export{Y as a,j as b,ee as c,te as d,oe as e,ne as f,re as g,ie as h,ae as i,se as j,de as k,fe as l,ue as m,me as n,ce as o,pe as p,ke as q,we as r};//# sourceMappingURL=chunk-IXO2LU47.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-IXO2LU47.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/ui/theme-context.tsx","../src/ui/primitives/dropdown-menu.tsx","../src/ui/primitives/skeleton.tsx"],"names":["DEFAULT_THEMES","MEDIA_QUERY","ThemeContext","createContext","ThemeProvider","attribute","children","defaultTheme","disableTransitionOnChange","enableColorScheme","enableSystem","forcedTheme","storageKey","themes","value","theme","setThemeState","useState","getInitialTheme","systemTheme","setSystemTheme","getSystemTheme","resolvedTheme","resolveTheme","setTheme","useCallback","nextTheme","isBrowser","useEffect","mediaQuery","handleChange","event","root","nextResolvedTheme","cleanupTransitions","disableTransitions","themeValues","attributeValue","context","useMemo","jsx","useTheme","useContext","style","storedTheme","DropdownMenu","props","DropdownMenuPrimitive","DropdownMenuPortal","DropdownMenuTrigger","DropdownMenuContent","className","sideOffset","cn","DropdownMenuGroup","DropdownMenuItem","inset","variant","DropdownMenuCheckboxItem","checked","jsxs","CheckIcon","DropdownMenuRadioGroup","DropdownMenuRadioItem","CircleIcon","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut","DropdownMenuSub","DropdownMenuSubTrigger","ChevronRightIcon","DropdownMenuSubContent","Skeleton"],"mappings":"0RAiCA,IAAMA,CAAAA,CAAiB,CAAC,QAAS,MAAM,CAAA,CACjCC,CAAAA,CAAc,8BAAA,CACdC,CAAAA,CAAeC,aAAAA,CAAyC,MAAS,CAAA,CAEhE,SAASC,CAAAA,CAAc,CAC5B,SAAA,CAAAC,CAAAA,CAAY,aACZ,QAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,yBAAA,CAAAC,CAAAA,CAA4B,MAC5B,iBAAA,CAAAC,CAAAA,CAAoB,IAAA,CACpB,YAAA,CAAAC,CAAAA,CAAe,IAAA,CACf,YAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CAAa,OAAA,CACb,MAAA,CAAAC,CAAAA,CAASb,EACT,KAAA,CAAAc,CACF,CAAA,CAAoC,CAClC,GAAM,CAACC,EAAOC,CAAa,CAAA,CAAIC,QAAAA,CAA6B,IAC1DC,CAAAA,CAAgBN,CAAAA,CAAYL,EAAcG,CAAY,CACxD,CAAA,CACM,CAACS,CAAAA,CAAaC,CAAc,EAAIH,QAAAA,CAAkC,IAAMI,CAAAA,EAAgB,CAAA,CACxFC,CAAAA,CAAgBC,EAAaZ,CAAAA,EAAeI,CAAAA,CAAOL,CAAAA,CAAcS,CAAW,CAAA,CAE5EK,CAAAA,CAAWC,YACdC,CAAAA,EAAsB,CACrB,GAAI,CAAAf,CA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CACDkC,GAAAA,CAAC8B,gBAAAA,CAAA,CAAiB,SAAA,CAAU,sBAAA,CAAuB,CAAA,CAAA,CACrD,CAEJ,CAEA,SAASC,GAAuB,CAC9B,SAAA,CAAApB,CAAAA,CACA,GAAGL,CACL,CAAA,CAAkE,CAChE,OACEN,GAAAA,CAACO,YAAAA,CAAsB,UAAA,CAAtB,CACC,WAAA,CAAU,4BACV,SAAA,CAAWM,CAAAA,CACT,uiBAAA,CACAF,CACF,CAAA,CACC,GAAGL,EACN,CAEJ,CCrMA,SAAS0B,GAAS,CAAE,SAAA,CAAArB,CAAAA,CAAW,GAAGL,CAAM,CAAA,CAAgC,CACtE,OACEN,GAAAA,CAAC,KAAA,CAAA,CAAI,WAAA,CAAU,UAAA,CAAW,SAAA,CAAWa,CAAAA,CAAG,6CAAA,CAA+CF,CAAS,CAAA,CAAI,GAAGL,CAAAA,CAAO,CAElH","file":"chunk-TBCSVE5L.js","sourcesContent":["'use client';\n\nimport { createContext, useCallback, useContext, useEffect, useMemo, useState } from 'react';\nimport type { JSX } from 'react';\n\ntype SystemTheme = 'dark' | 'light';\n\ninterface ThemeValue {\n [themeName: string]: string;\n}\n\nexport interface UseThemeProps {\n themes: string[];\n forcedTheme?: string;\n setTheme: (theme: string) => void;\n theme?: string;\n resolvedTheme?: string;\n systemTheme?: SystemTheme;\n}\n\nexport interface ThemeProviderProps {\n themes?: string[];\n forcedTheme?: string;\n enableSystem?: boolean;\n disableTransitionOnChange?: boolean;\n enableColorScheme?: boolean;\n storageKey?: string;\n defaultTheme?: string;\n attribute?: string | 'class';\n value?: ThemeValue;\n children?: React.ReactNode;\n}\n\nconst DEFAULT_THEMES = ['light', 'dark'];\nconst MEDIA_QUERY = '(prefers-color-scheme: dark)';\nconst ThemeContext = createContext<UseThemeProps | undefined>(undefined);\n\nexport function ThemeProvider({\n attribute = 'data-theme',\n children,\n defaultTheme,\n disableTransitionOnChange = false,\n enableColorScheme = true,\n enableSystem = true,\n forcedTheme,\n storageKey = 'theme',\n themes = DEFAULT_THEMES,\n value,\n}: ThemeProviderProps): JSX.Element {\n const [theme, setThemeState] = useState<string | undefined>(() =>\n getInitialTheme(storageKey, defaultTheme, enableSystem)\n );\n const [systemTheme, setSystemTheme] = useState<SystemTheme | undefined>(() => getSystemTheme());\n const resolvedTheme = resolveTheme(forcedTheme ?? theme, enableSystem, systemTheme);\n\n const setTheme = useCallback(\n (nextTheme: string) => {\n if (forcedTheme) {\n return;\n }\n\n setThemeState(nextTheme);\n\n if (!isBrowser()) {\n return;\n }\n\n try {\n window.localStorage.setItem(storageKey, nextTheme);\n } catch {\n //\n }\n },\n [forcedTheme, storageKey]\n );\n\n useEffect(() => {\n if (!isBrowser() || !enableSystem) {\n return;\n }\n\n const mediaQuery = window.matchMedia(MEDIA_QUERY);\n\n function handleChange(event: MediaQueryListEvent): void {\n setSystemTheme(event.matches ? 'dark' : 'light');\n }\n\n setSystemTheme(mediaQuery.matches ? 'dark' : 'light');\n mediaQuery.addEventListener('change', handleChange);\n\n return () => {\n mediaQuery.removeEventListener('change', handleChange);\n };\n }, [enableSystem]);\n\n useEffect(() => {\n if (!isBrowser()) {\n return;\n }\n\n const root = window.document.documentElement;\n const selectedTheme = forcedTheme ?? theme ?? defaultTheme;\n const nextResolvedTheme = resolveTheme(selectedTheme, enableSystem, systemTheme);\n\n if (!nextResolvedTheme) {\n return;\n }\n\n const cleanupTransitions = disableTransitionOnChange ? disableTransitions() : undefined;\n const themeValues = value ? Object.values(value) : themes;\n const attributeValue = value?.[nextResolvedTheme] ?? nextResolvedTheme;\n\n if (attribute === 'class') {\n root.classList.remove(...themeValues);\n root.classList.add(attributeValue);\n }\n\n if (attribute !== 'class') {\n root.setAttribute(attribute, attributeValue);\n }\n\n if (enableColorScheme && (nextResolvedTheme === 'dark' || nextResolvedTheme === 'light')) {\n root.style.colorScheme = nextResolvedTheme;\n }\n\n cleanupTransitions?.();\n }, [\n attribute,\n defaultTheme,\n disableTransitionOnChange,\n enableColorScheme,\n enableSystem,\n forcedTheme,\n systemTheme,\n theme,\n themes,\n value,\n ]);\n\n const context = useMemo<UseThemeProps>(() => {\n return {\n forcedTheme,\n resolvedTheme,\n setTheme,\n systemTheme,\n theme: forcedTheme ?? theme,\n themes: enableSystem ? [...themes, 'system'] : themes,\n };\n }, [enableSystem, forcedTheme, resolvedTheme, setTheme, systemTheme, theme, themes]);\n\n return <ThemeContext.Provider value={context}>{children}</ThemeContext.Provider>;\n}\n\nexport function useTheme(): UseThemeProps {\n const context = useContext(ThemeContext);\n\n if (!context) {\n throw new Error('useTheme must be used within ThemeProvider');\n }\n\n return context;\n}\n\nfunction disableTransitions(): () => void {\n const style = window.document.createElement('style');\n style.appendChild(\n window.document.createTextNode(\n '*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}'\n )\n );\n window.document.head.appendChild(style);\n\n return () => {\n window.getComputedStyle(window.document.body);\n\n window.setTimeout(() => {\n style.remove();\n }, 0);\n };\n}\n\nfunction getInitialTheme(storageKey: string, defaultTheme: string | undefined, enableSystem: boolean): string {\n if (!isBrowser()) {\n return defaultTheme ?? (enableSystem ? 'system' : 'light');\n }\n\n try {\n const storedTheme = window.localStorage.getItem(storageKey);\n\n if (storedTheme) {\n return storedTheme;\n }\n } catch {\n //\n }\n\n return defaultTheme ?? (enableSystem ? 'system' : 'light');\n}\n\nfunction getSystemTheme(): SystemTheme | undefined {\n if (!isBrowser()) {\n return undefined;\n }\n\n return window.matchMedia(MEDIA_QUERY).matches ? 'dark' : 'light';\n}\n\nfunction isBrowser(): boolean {\n return typeof window !== 'undefined';\n}\n\nfunction resolveTheme(\n theme: string | undefined,\n enableSystem: boolean,\n systemTheme: SystemTheme | undefined\n): string | undefined {\n if (!theme) {\n return undefined;\n }\n\n if (theme !== 'system') {\n return theme;\n }\n\n if (!enableSystem) {\n return 'light';\n }\n\n return systemTheme ?? 'light';\n}\n","'use client';\n\nimport * as React from 'react';\nimport { DropdownMenu as DropdownMenuPrimitive } from 'radix-ui';\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from 'lucide-react';\nimport { cn } from '../lib/utils';\n\nfunction DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />;\n}\n\nfunction DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\n return <DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />;\n}\n\nfunction DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {\n return <DropdownMenuPrimitive.Trigger data-slot=\"dropdown-menu-trigger\" {...props} />;\n}\n\nfunction DropdownMenuContent({\n className,\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n data-slot=\"dropdown-menu-content\"\n sideOffset={sideOffset}\n className={cn(\n 'fk:z-50 fk:max-h-(--radix-dropdown-menu-content-available-height) fk:min-w-32 fk:origin-(--radix-dropdown-menu-content-transform-origin) fk:overflow-x-hidden fk:overflow-y-auto fk:rounded-md fk:border fk:bg-popover fk:p-1 fk:text-popover-foreground fk:shadow-md fk:data-[side=bottom]:slide-in-from-top-2 fk:data-[side=left]:slide-in-from-right-2 fk:data-[side=right]:slide-in-from-left-2 fk:data-[side=top]:slide-in-from-bottom-2 fk:data-[state=closed]:animate-out fk:data-[state=closed]:fade-out-0 fk:data-[state=closed]:zoom-out-95 fk:data-[state=open]:animate-in fk:data-[state=open]:fade-in-0 fk:data-[state=open]:zoom-in-95',\n className\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n );\n}\n\nfunction DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {\n return <DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />;\n}\n\nfunction DropdownMenuItem({\n className,\n inset,\n variant = 'default',\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n variant?: 'default' | 'destructive';\n}) {\n return (\n <DropdownMenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"fk:relative fk:flex fk:cursor-default fk:items-center fk:gap-2 fk:rounded-sm fk:px-2 fk:py-1.5 fk:text-sm fk:outline-hidden fk:select-none fk:focus:bg-accent fk:focus:text-accent-foreground fk:data-[disabled]:pointer-events-none fk:data-[disabled]:opacity-50 fk:data-[inset]:pl-8 fk:data-[variant=destructive]:text-destructive fk:data-[variant=destructive]:focus:bg-destructive/10 fk:data-[variant=destructive]:focus:text-destructive fk:dark:data-[variant=destructive]:focus:bg-destructive/20 fk:[&_svg]:pointer-events-none fk:[&_svg]:shrink-0 fk:[&_svg:not([class*='size-'])]:size-4 fk:[&_svg:not([class*='text-'])]:text-muted-foreground fk:data-[variant=destructive]:*:[svg]:text-destructive!\",\n className\n )}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuCheckboxItem({\n className,\n children,\n checked,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {\n return (\n <DropdownMenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn(\n \"fk:relative fk:flex fk:cursor-default fk:items-center fk:gap-2 fk:rounded-sm fk:py-1.5 fk:pr-2 fk:pl-8 fk:text-sm fk:outline-hidden fk:select-none fk:focus:bg-accent fk:focus:text-accent-foreground fk:data-[disabled]:pointer-events-none fk:data-[disabled]:opacity-50 fk:[&_svg]:pointer-events-none fk:[&_svg]:shrink-0 fk:[&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"fk:pointer-events-none fk:absolute fk:left-2 fk:flex fk:size-3.5 fk:items-center fk:justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n );\n}\n\nfunction DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {\n return <DropdownMenuPrimitive.RadioGroup data-slot=\"dropdown-menu-radio-group\" {...props} />;\n}\n\nfunction DropdownMenuRadioItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {\n return (\n <DropdownMenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n className={cn(\n \"fk:relative fk:flex fk:cursor-default fk:items-center fk:gap-2 fk:rounded-sm fk:py-1.5 fk:pr-2 fk:pl-8 fk:text-sm fk:outline-hidden fk:select-none fk:focus:bg-accent fk:focus:text-accent-foreground fk:data-[disabled]:pointer-events-none fk:data-[disabled]:opacity-50 fk:[&_svg]:pointer-events-none fk:[&_svg]:shrink-0 fk:[&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <span className=\"fk:pointer-events-none fk:absolute fk:left-2 fk:flex fk:size-3.5 fk:items-center fk:justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CircleIcon className=\"size-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n );\n}\n\nfunction DropdownMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean;\n}) {\n return (\n <DropdownMenuPrimitive.Label\n data-slot=\"dropdown-menu-label\"\n data-inset={inset}\n className={cn('fk:px-2 fk:py-1.5 fk:text-sm fk:font-medium fk:data-[inset]:pl-8', className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {\n return (\n <DropdownMenuPrimitive.Separator\n data-slot=\"dropdown-menu-separator\"\n className={cn('fk:-mx-1 fk:my-1 fk:h-px fk:bg-border', className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuShortcut({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"dropdown-menu-shortcut\"\n className={cn('fk:ml-auto fk:text-xs fk:tracking-widest fk:text-muted-foreground', className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />;\n}\n\nfunction DropdownMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n}) {\n return (\n <DropdownMenuPrimitive.SubTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"fk:flex fk:cursor-default fk:items-center fk:gap-2 fk:rounded-sm fk:px-2 fk:py-1.5 fk:text-sm fk:outline-hidden fk:select-none fk:focus:bg-accent fk:focus:text-accent-foreground fk:data-[inset]:pl-8 fk:data-[state=open]:bg-accent fk:data-[state=open]:text-accent-foreground fk:[&_svg]:pointer-events-none fk:[&_svg]:shrink-0 fk:[&_svg:not([class*='size-'])]:size-4 fk:[&_svg:not([class*='text-'])]:text-muted-foreground\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"fk:ml-auto fk:size-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n );\n}\n\nfunction DropdownMenuSubContent({\n className,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\n return (\n <DropdownMenuPrimitive.SubContent\n data-slot=\"dropdown-menu-sub-content\"\n className={cn(\n 'fk:z-50 fk:min-w-32 fk:origin-(--radix-dropdown-menu-content-transform-origin) fk:overflow-hidden fk:rounded-md fk:border fk:bg-popover fk:p-1 fk:text-popover-foreground fk:shadow-lg fk:data-[side=bottom]:slide-in-from-top-2 fk:data-[side=left]:slide-in-from-right-2 fk:data-[side=right]:slide-in-from-left-2 fk:data-[side=top]:slide-in-from-bottom-2 fk:data-[state=closed]:animate-out fk:data-[state=closed]:fade-out-0 fk:data-[state=closed]:zoom-out-95 fk:data-[state=open]:animate-in fk:data-[state=open]:fade-in-0 fk:data-[state=open]:zoom-in-95',\n className\n )}\n {...props}\n />\n );\n}\n\nexport {\n DropdownMenu,\n DropdownMenuPortal,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n};\n","import { cn } from '../lib/utils';\n\nfunction Skeleton({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div data-slot=\"skeleton\" className={cn('fk:animate-pulse fk:rounded-md fk:bg-accent', className)} {...props} />\n );\n}\n\nexport { Skeleton };\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/ui/theme-context.tsx","../src/ui/primitives/dropdown-menu.tsx","../src/ui/primitives/skeleton.tsx"],"names":["DEFAULT_THEMES","MEDIA_QUERY","ThemeContext","createContext","ThemeProvider","attribute","children","defaultTheme","disableTransitionOnChange","enableColorScheme","enableSystem","forcedTheme","storageKey","themes","value","theme","setThemeState","useState","getInitialTheme","systemTheme","setSystemTheme","getSystemTheme","resolvedTheme","resolveTheme","setTheme","useCallback","nextTheme","isBrowser","useEffect","mediaQuery","handleChange","event","root","nextResolvedTheme","cleanupTransitions","disableTransitions","themeValues","attributeValue","context","useMemo","jsx","useTheme","useContext","style","storedTheme","DropdownMenu","props","DropdownMenuPrimitive","DropdownMenuPortal","DropdownMenuTrigger","DropdownMenuContent","className","sideOffset","cn","DropdownMenuGroup","DropdownMenuItem","inset","variant","DropdownMenuCheckboxItem","checked","jsxs","CheckIcon","DropdownMenuRadioGroup","DropdownMenuRadioItem","CircleIcon","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut","DropdownMenuSub","DropdownMenuSubTrigger","ChevronRightIcon","DropdownMenuSubContent","Skeleton"],"mappings":"0RAiCA,IAAMA,CAAAA,CAAiB,CAAC,QAAS,MAAM,CAAA,CACjCC,CAAAA,CAAc,8BAAA,CACdC,CAAAA,CAAeC,aAAAA,CAAyC,MAAS,CAAA,CAEhE,SAASC,CAAAA,CAAc,CAC5B,SAAA,CAAAC,CAAAA,CAAY,aACZ,QAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,yBAAA,CAAAC,CAAAA,CAA4B,MAC5B,iBAAA,CAAAC,CAAAA,CAAoB,IAAA,CACpB,YAAA,CAAAC,CAAAA,CAAe,IAAA,CACf,YAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CAAa,OAAA,CACb,MAAA,CAAAC,CAAAA,CAASb,EACT,KAAA,CAAAc,CACF,CAAA,CAAoC,CAClC,GAAM,CAACC,EAAOC,CAAa,CAAA,CAAIC,QAAAA,CAA6B,IAC1DC,CAAAA,CAAgBN,CAAAA,CAAYL,EAAcG,CAAY,CACxD,CAAA,CACM,CAACS,CAAAA,CAAaC,CAAc,EAAIH,QAAAA,CAAkC,IAAMI,CAAAA,EAAgB,CAAA,CACxFC,CAAAA,CAAgBC,EAAaZ,CAAAA,EAAeI,CAAAA,CAAOL,CAAAA,CAAcS,CAAW,CAAA,CAE5EK,CAAAA,CAAWC,YACdC,CAAAA,EAAsB,CACrB,GAAI,CAAAf,CAAAA,GAIJK,CAAAA,CAAcU,CAAS,CAAA,CAEnB,CAAA,CAACC,CAAAA,EAAU,CAAA,CAIf,GAAI,CACF,MAAA,CAAO,YAAA,CAAa,OAAA,CAAQf,CAAAA,CAAYc,CAAS,EACnD,CAAA,KAAQ,CAER,CACF,CAAA,CACA,CAACf,CAAAA,CAAaC,CAAU,CAC1B,CAAA,CAEAgB,UAAU,IAAM,CACd,GAAI,CAACD,CAAAA,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AA,CACAF,CACF,CAAA,CACC,GAAGL,EACN,CAEJ,CCrMA,SAAS0B,GAAS,CAAE,SAAA,CAAArB,CAAAA,CAAW,GAAGL,CAAM,CAAA,CAAgC,CACtE,OACEN,GAAAA,CAAC,KAAA,CAAA,CAAI,WAAA,CAAU,UAAA,CAAW,SAAA,CAAWa,CAAAA,CAAG,6CAAA,CAA+CF,CAAS,CAAA,CAAI,GAAGL,CAAAA,CAAO,CAElH","file":"chunk-IXO2LU47.js","sourcesContent":["'use client';\n\nimport { createContext, useCallback, useContext, useEffect, useMemo, useState } from 'react';\nimport type { JSX } from 'react';\n\ntype SystemTheme = 'dark' | 'light';\n\ninterface ThemeValue {\n [themeName: string]: string;\n}\n\nexport interface UseThemeProps {\n themes: string[];\n forcedTheme?: string;\n setTheme: (theme: string) => void;\n theme?: string;\n resolvedTheme?: string;\n systemTheme?: SystemTheme;\n}\n\nexport interface ThemeProviderProps {\n themes?: string[];\n forcedTheme?: string;\n enableSystem?: boolean;\n disableTransitionOnChange?: boolean;\n enableColorScheme?: boolean;\n storageKey?: string;\n defaultTheme?: string;\n attribute?: string | 'class';\n value?: ThemeValue;\n children?: React.ReactNode;\n}\n\nconst DEFAULT_THEMES = ['light', 'dark'];\nconst MEDIA_QUERY = '(prefers-color-scheme: dark)';\nconst ThemeContext = createContext<UseThemeProps | undefined>(undefined);\n\nexport function ThemeProvider({\n attribute = 'data-theme',\n children,\n defaultTheme,\n disableTransitionOnChange = false,\n enableColorScheme = true,\n enableSystem = true,\n forcedTheme,\n storageKey = 'theme',\n themes = DEFAULT_THEMES,\n value,\n}: ThemeProviderProps): JSX.Element {\n const [theme, setThemeState] = useState<string | undefined>(() =>\n getInitialTheme(storageKey, defaultTheme, enableSystem)\n );\n const [systemTheme, setSystemTheme] = useState<SystemTheme | undefined>(() => getSystemTheme());\n const resolvedTheme = resolveTheme(forcedTheme ?? theme, enableSystem, systemTheme);\n\n const setTheme = useCallback(\n (nextTheme: string) => {\n if (forcedTheme) {\n return;\n }\n\n setThemeState(nextTheme);\n\n if (!isBrowser()) {\n return;\n }\n\n try {\n window.localStorage.setItem(storageKey, nextTheme);\n } catch {\n //\n }\n },\n [forcedTheme, storageKey]\n );\n\n useEffect(() => {\n if (!isBrowser() || !enableSystem) {\n return;\n }\n\n const mediaQuery = window.matchMedia(MEDIA_QUERY);\n\n function handleChange(event: MediaQueryListEvent): void {\n setSystemTheme(event.matches ? 'dark' : 'light');\n }\n\n setSystemTheme(mediaQuery.matches ? 'dark' : 'light');\n mediaQuery.addEventListener('change', handleChange);\n\n return () => {\n mediaQuery.removeEventListener('change', handleChange);\n };\n }, [enableSystem]);\n\n useEffect(() => {\n if (!isBrowser()) {\n return;\n }\n\n const root = window.document.documentElement;\n const selectedTheme = forcedTheme ?? theme ?? defaultTheme;\n const nextResolvedTheme = resolveTheme(selectedTheme, enableSystem, systemTheme);\n\n if (!nextResolvedTheme) {\n return;\n }\n\n const cleanupTransitions = disableTransitionOnChange ? disableTransitions() : undefined;\n const themeValues = value ? Object.values(value) : themes;\n const attributeValue = value?.[nextResolvedTheme] ?? nextResolvedTheme;\n\n if (attribute === 'class') {\n root.classList.remove(...themeValues);\n root.classList.add(attributeValue);\n }\n\n if (attribute !== 'class') {\n root.setAttribute(attribute, attributeValue);\n }\n\n if (enableColorScheme && (nextResolvedTheme === 'dark' || nextResolvedTheme === 'light')) {\n root.style.colorScheme = nextResolvedTheme;\n }\n\n cleanupTransitions?.();\n }, [\n attribute,\n defaultTheme,\n disableTransitionOnChange,\n enableColorScheme,\n enableSystem,\n forcedTheme,\n systemTheme,\n theme,\n themes,\n value,\n ]);\n\n const context = useMemo<UseThemeProps>(() => {\n return {\n forcedTheme,\n resolvedTheme,\n setTheme,\n systemTheme,\n theme: forcedTheme ?? theme,\n themes: enableSystem ? [...themes, 'system'] : themes,\n };\n }, [enableSystem, forcedTheme, resolvedTheme, setTheme, systemTheme, theme, themes]);\n\n return <ThemeContext.Provider value={context}>{children}</ThemeContext.Provider>;\n}\n\nexport function useTheme(): UseThemeProps {\n const context = useContext(ThemeContext);\n\n if (!context) {\n throw new Error('useTheme must be used within ThemeProvider');\n }\n\n return context;\n}\n\nfunction disableTransitions(): () => void {\n const style = window.document.createElement('style');\n style.appendChild(\n window.document.createTextNode(\n '*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}'\n )\n );\n window.document.head.appendChild(style);\n\n return () => {\n window.getComputedStyle(window.document.body);\n\n window.setTimeout(() => {\n style.remove();\n }, 0);\n };\n}\n\nfunction getInitialTheme(storageKey: string, defaultTheme: string | undefined, enableSystem: boolean): string {\n if (!isBrowser()) {\n return defaultTheme ?? (enableSystem ? 'system' : 'light');\n }\n\n try {\n const storedTheme = window.localStorage.getItem(storageKey);\n\n if (storedTheme) {\n return storedTheme;\n }\n } catch {\n //\n }\n\n return defaultTheme ?? (enableSystem ? 'system' : 'light');\n}\n\nfunction getSystemTheme(): SystemTheme | undefined {\n if (!isBrowser()) {\n return undefined;\n }\n\n return window.matchMedia(MEDIA_QUERY).matches ? 'dark' : 'light';\n}\n\nfunction isBrowser(): boolean {\n return typeof window !== 'undefined';\n}\n\nfunction resolveTheme(\n theme: string | undefined,\n enableSystem: boolean,\n systemTheme: SystemTheme | undefined\n): string | undefined {\n if (!theme) {\n return undefined;\n }\n\n if (theme !== 'system') {\n return theme;\n }\n\n if (!enableSystem) {\n return 'light';\n }\n\n return systemTheme ?? 'light';\n}\n","'use client';\n\nimport * as React from 'react';\nimport { DropdownMenu as DropdownMenuPrimitive } from 'radix-ui';\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from 'lucide-react';\nimport { cn } from '../lib/utils';\n\nfunction DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />;\n}\n\nfunction DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\n return <DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />;\n}\n\nfunction DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {\n return <DropdownMenuPrimitive.Trigger data-slot=\"dropdown-menu-trigger\" {...props} />;\n}\n\nfunction DropdownMenuContent({\n className,\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n data-slot=\"dropdown-menu-content\"\n sideOffset={sideOffset}\n className={cn(\n 'fk:z-50 fk:max-h-(--radix-dropdown-menu-content-available-height) fk:min-w-32 fk:origin-(--radix-dropdown-menu-content-transform-origin) fk:overflow-x-hidden fk:overflow-y-auto fk:rounded-md fk:border fk:bg-popover fk:p-1 fk:text-popover-foreground fk:shadow-md fk:data-[side=bottom]:slide-in-from-top-2 fk:data-[side=left]:slide-in-from-right-2 fk:data-[side=right]:slide-in-from-left-2 fk:data-[side=top]:slide-in-from-bottom-2 fk:data-[state=closed]:animate-out fk:data-[state=closed]:fade-out-0 fk:data-[state=closed]:zoom-out-95 fk:data-[state=open]:animate-in fk:data-[state=open]:fade-in-0 fk:data-[state=open]:zoom-in-95',\n className\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n );\n}\n\nfunction DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {\n return <DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />;\n}\n\nfunction DropdownMenuItem({\n className,\n inset,\n variant = 'default',\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n variant?: 'default' | 'destructive';\n}) {\n return (\n <DropdownMenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"fk:relative fk:flex fk:cursor-default fk:items-center fk:gap-2 fk:rounded-sm fk:px-2 fk:py-1.5 fk:text-sm fk:outline-hidden fk:select-none fk:focus:bg-accent fk:focus:text-accent-foreground fk:data-disabled:pointer-events-none fk:data-disabled:opacity-50 fk:data-inset:pl-8 fk:data-[variant=destructive]:text-destructive fk:data-[variant=destructive]:focus:bg-destructive/10 fk:data-[variant=destructive]:focus:text-destructive fk:dark:data-[variant=destructive]:focus:bg-destructive/20 fk:[&_svg]:pointer-events-none fk:[&_svg]:shrink-0 fk:[&_svg:not([class*='size-'])]:size-4 fk:[&_svg:not([class*='text-'])]:text-muted-foreground fk:data-[variant=destructive]:*:[svg]:text-destructive!\",\n className\n )}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuCheckboxItem({\n className,\n children,\n checked,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {\n return (\n <DropdownMenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn(\n \"fk:relative fk:flex fk:cursor-default fk:items-center fk:gap-2 fk:rounded-sm fk:py-1.5 fk:pr-2 fk:pl-8 fk:text-sm fk:outline-hidden fk:select-none fk:focus:bg-accent fk:focus:text-accent-foreground fk:data-disabled:pointer-events-none fk:data-disabled:opacity-50 fk:[&_svg]:pointer-events-none fk:[&_svg]:shrink-0 fk:[&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"fk:pointer-events-none fk:absolute fk:left-2 fk:flex fk:size-3.5 fk:items-center fk:justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n );\n}\n\nfunction DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {\n return <DropdownMenuPrimitive.RadioGroup data-slot=\"dropdown-menu-radio-group\" {...props} />;\n}\n\nfunction DropdownMenuRadioItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {\n return (\n <DropdownMenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n className={cn(\n \"fk:relative fk:flex fk:cursor-default fk:items-center fk:gap-2 fk:rounded-sm fk:py-1.5 fk:pr-2 fk:pl-8 fk:text-sm fk:outline-hidden fk:select-none fk:focus:bg-accent fk:focus:text-accent-foreground fk:data-disabled:pointer-events-none fk:data-disabled:opacity-50 fk:[&_svg]:pointer-events-none fk:[&_svg]:shrink-0 fk:[&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <span className=\"fk:pointer-events-none fk:absolute fk:left-2 fk:flex fk:size-3.5 fk:items-center fk:justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CircleIcon className=\"size-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n );\n}\n\nfunction DropdownMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean;\n}) {\n return (\n <DropdownMenuPrimitive.Label\n data-slot=\"dropdown-menu-label\"\n data-inset={inset}\n className={cn('fk:px-2 fk:py-1.5 fk:text-sm fk:font-medium fk:data-inset:pl-8', className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {\n return (\n <DropdownMenuPrimitive.Separator\n data-slot=\"dropdown-menu-separator\"\n className={cn('fk:-mx-1 fk:my-1 fk:h-px fk:bg-border', className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuShortcut({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"dropdown-menu-shortcut\"\n className={cn('fk:ml-auto fk:text-xs fk:tracking-widest fk:text-muted-foreground', className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />;\n}\n\nfunction DropdownMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n}) {\n return (\n <DropdownMenuPrimitive.SubTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"fk:flex fk:cursor-default fk:items-center fk:gap-2 fk:rounded-sm fk:px-2 fk:py-1.5 fk:text-sm fk:outline-hidden fk:select-none fk:focus:bg-accent fk:focus:text-accent-foreground fk:data-inset:pl-8 fk:data-[state=open]:bg-accent fk:data-[state=open]:text-accent-foreground fk:[&_svg]:pointer-events-none fk:[&_svg]:shrink-0 fk:[&_svg:not([class*='size-'])]:size-4 fk:[&_svg:not([class*='text-'])]:text-muted-foreground\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"fk:ml-auto fk:size-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n );\n}\n\nfunction DropdownMenuSubContent({\n className,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\n return (\n <DropdownMenuPrimitive.SubContent\n data-slot=\"dropdown-menu-sub-content\"\n className={cn(\n 'fk:z-50 fk:min-w-32 fk:origin-(--radix-dropdown-menu-content-transform-origin) fk:overflow-hidden fk:rounded-md fk:border fk:bg-popover fk:p-1 fk:text-popover-foreground fk:shadow-lg fk:data-[side=bottom]:slide-in-from-top-2 fk:data-[side=left]:slide-in-from-right-2 fk:data-[side=right]:slide-in-from-left-2 fk:data-[side=top]:slide-in-from-bottom-2 fk:data-[state=closed]:animate-out fk:data-[state=closed]:fade-out-0 fk:data-[state=closed]:zoom-out-95 fk:data-[state=open]:animate-in fk:data-[state=open]:fade-in-0 fk:data-[state=open]:zoom-in-95',\n className\n )}\n {...props}\n />\n );\n}\n\nexport {\n DropdownMenu,\n DropdownMenuPortal,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n};\n","import { cn } from '../lib/utils';\n\nfunction Skeleton({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div data-slot=\"skeleton\" className={cn('fk:animate-pulse fk:rounded-md fk:bg-accent', className)} {...props} />\n );\n}\n\nexport { Skeleton };\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import'./index.css';import {b}from'./chunk-EYGOJ2ZN.js';import {a}from'./chunk-O2QMYUPS.js';import {Slot,Dialog,ScrollArea}from'radix-ui';import {cva}from'class-variance-authority';import {jsx,jsxs}from'react/jsx-runtime';import {XIcon,SearchIcon}from'lucide-react';import {Command}from'cmdk';var P=cva("fk:inline-flex fk:w-fit fk:shrink-0 fk:items-center fk:justify-center fk:gap-1 fk:overflow-hidden fk:rounded-full fk:border fk:border-transparent fk:px-2 fk:py-0.5 fk:text-xs fk:font-medium fk:whitespace-nowrap fk:transition-[color,box-shadow] fk:focus-visible:border-ring fk:focus-visible:ring-[3px] fk:focus-visible:ring-ring/50 fk:aria-invalid:border-destructive fk:aria-invalid:ring-destructive/20 fk:dark:aria-invalid:ring-destructive/40 fk:[&>svg]:pointer-events-none fk:[&>svg]:size-3",{variants:{variant:{default:"fk:bg-primary fk:text-primary-foreground fk:[a&]:hover:bg-primary/90",secondary:"fk:bg-secondary fk:text-secondary-foreground fk:[a&]:hover:bg-secondary/90",destructive:"fk:bg-destructive fk:text-white fk:focus-visible:ring-destructive/20 fk:dark:bg-destructive/60 fk:dark:focus-visible:ring-destructive/40 fk:[a&]:hover:bg-destructive/90",outline:"fk:border-border fk:text-foreground fk:[a&]:hover:bg-accent fk:[a&]:hover:text-accent-foreground",ghost:"fk:[a&]:hover:bg-accent fk:[a&]:hover:text-accent-foreground",link:"fk:text-primary fk:underline-offset-4 fk:[a&]:hover:underline"}},defaultVariants:{variant:"default"}});function V({className:o,variant:e="default",asChild:n=false,...f}){let k=n?Slot.Root:"span";return jsx(k,{"data-slot":"badge","data-variant":e,className:a(P({variant:e}),o),...f})}function u({...o}){return jsx(Dialog.Root,{"data-slot":"dialog",...o})}function X({...o}){return jsx(Dialog.Trigger,{"data-slot":"dialog-trigger",...o})}function R({...o}){return jsx(Dialog.Portal,{"data-slot":"dialog-portal",...o})}function q({...o}){return jsx(Dialog.Close,{"data-slot":"dialog-close",...o})}function N({className:o,...e}){return jsx(Dialog.Overlay,{"data-slot":"dialog-overlay",className:a("fk:fixed fk:inset-0 fk:z-50 fk:bg-black/50 fk:data-[state=closed]:animate-out fk:data-[state=closed]:fade-out-0 fk:data-[state=open]:animate-in fk:data-[state=open]:fade-in-0",o),...e})}function g({className:o,children:e,showCloseButton:n=true,...f}){return jsxs(R,{"data-slot":"dialog-portal",children:[jsx(N,{}),jsxs(Dialog.Content,{"data-slot":"dialog-content",className:a("fk:fixed fk:top-[50%] fk:left-[50%] fk:z-50 fk:grid fk:w-full fk:max-w-[calc(100%-2rem)] fk:translate-x-[-50%] fk:translate-y-[-50%] fk:gap-4 fk:rounded-lg fk:border fk:bg-background fk:p-6 fk:shadow-lg fk:duration-200 fk:outline-none fk:data-[state=closed]:animate-out fk:data-[state=closed]:fade-out-0 fk:data-[state=closed]:zoom-out-95 fk:data-[state=open]:animate-in fk:data-[state=open]:fade-in-0 fk:data-[state=open]:zoom-in-95 fk:sm:max-w-lg",o),...f,children:[e,n&&jsxs(Dialog.Close,{"data-slot":"dialog-close",className:"fk:absolute fk:top-4 fk:right-4 fk:rounded-xs fk:opacity-70 fk:ring-offset-background fk:transition-opacity fk:hover:opacity-100 fk:focus:ring-2 fk:focus:ring-ring fk:focus:ring-offset-2 fk:focus:outline-hidden fk:disabled:pointer-events-none fk:data-[state=open]:bg-accent fk:data-[state=open]:text-muted-foreground fk:[&_svg]:pointer-events-none fk:[&_svg]:shrink-0 fk:[&_svg:not([class*='size-'])]:size-4",children:[jsx(XIcon,{}),jsx("span",{className:"fk:sr-only",children:"Close"})]})]})]})}function v({className:o,...e}){return jsx("div",{"data-slot":"dialog-header",className:a("fk:flex fk:flex-col fk:gap-2 fk:text-center fk:sm:text-left",o),...e})}function J({className:o,showCloseButton:e=false,children:n,...f}){return jsxs("div",{"data-slot":"dialog-footer",className:a("fk:flex fk:flex-col-reverse fk:gap-2 fk:sm:flex-row fk:sm:justify-end",o),...f,children:[n,e&&jsx(Dialog.Close,{asChild:true,children:jsx(b,{variant:"outline",children:"Close"})})]})}function C({className:o,...e}){return jsx(Dialog.Title,{"data-slot":"dialog-title",className:a("fk:text-lg fk:leading-none fk:font-semibold",o),...e})}function x({className:o,...e}){return jsx(Dialog.Description,{"data-slot":"dialog-description",className:a("fk:text-sm fk:text-muted-foreground",o),...e})}function _({className:o,...e}){return jsx(Command,{"data-slot":"command",className:a("fk:flex fk:h-full fk:w-full fk:flex-col fk:rounded-md fk:bg-popover fk:text-popover-foreground",o),...e})}function Z({title:o="Command Palette",description:e="Search for a command to run...",children:n,className:f,showCloseButton:k=true,...h}){return jsxs(u,{...h,children:[jsxs(v,{className:"fk:sr-only",children:[jsx(C,{children:o}),jsx(x,{children:e})]}),jsx(g,{className:a("fk:overflow-hidden fk:p-0",f),showCloseButton:k,children:jsx(_,{className:"fk:**:data-[slot=command-input-wrapper]:h-12 fk:**:[[cmdk-group-heading]]:px-2 fk:**:[[cmdk-group-heading]]:font-medium fk:**:[[cmdk-group-heading]]:text-muted-foreground fk:**:[[cmdk-group]]:px-2 fk:[&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 fk:[&_[cmdk-input-wrapper]_svg]:h-5 fk:[&_[cmdk-input-wrapper]_svg]:w-5 fk:**:[[cmdk-input]]:h-12 fk:**:[[cmdk-item]]:px-2 fk:**:[[cmdk-item]]:py-3 fk:[&_[cmdk-item]_svg]:h-5 fk:[&_[cmdk-item]_svg]:w-5",children:n})})]})}function $({className:o,...e}){return jsxs("div",{"data-slot":"command-input-wrapper",className:"fk:flex fk:h-9 fk:items-center fk:gap-2 fk:border-b fk:px-3",children:[jsx(SearchIcon,{className:"fk:size-4 fk:shrink-0 fk:opacity-50"}),jsx(Command.Input,{"data-slot":"command-input",className:a("fk:flex fk:h-10 fk:w-full fk:rounded-md fk:bg-transparent fk:py-3 fk:text-sm fk:outline-hidden fk:placeholder:text-muted-foreground fk:disabled:cursor-not-allowed fk:disabled:opacity-50",o),...e})]})}function j({className:o,...e}){return jsx(Command.List,{"data-slot":"command-list",className:a("fk:max-h-[300px] fk:scroll-py-1 fk:overflow-x-hidden fk:overflow-y-auto",o),...e})}function oo({...o}){return jsx(Command.Empty,{"data-slot":"command-empty",className:"fk:py-6 fk:text-center fk:text-sm",...o})}function eo({className:o,...e}){return jsx(Command.Group,{"data-slot":"command-group",className:a("fk:overflow-hidden fk:p-1 fk:text-foreground fk:**:[[cmdk-group-heading]]:px-2 fk:**:[[cmdk-group-heading]]:py-1.5 fk:**:[[cmdk-group-heading]]:text-xs fk:**:[[cmdk-group-heading]]:font-medium fk:**:[[cmdk-group-heading]]:text-muted-foreground",o),...e})}function to({className:o,...e}){return jsx(Command.Separator,{"data-slot":"command-separator",className:a("fk:-mx-1 fk:h-px fk:bg-border",o),...e})}function ao({className:o,...e}){return jsx(Command.Item,{"data-slot":"command-item",className:a("fk:relative fk:flex fk:cursor-default fk:items-center fk:gap-2 fk:rounded-sm fk:px-2 fk:py-1.5 fk:text-sm fk:outline-hidden fk:select-none fk:data-[disabled=true]:pointer-events-none fk:data-[disabled=true]:opacity-50 fk:data-[selected=true]:bg-accent fk:data-[selected=true]:text-accent-foreground fk:[&_svg]:pointer-events-none fk:[&_svg]:shrink-0 fk:[&_svg:not([class*='size-'])]:size-4 fk:[&_svg:not([class*='text-'])]:text-muted-foreground",o),...e})}function ro({className:o,...e}){return jsx("span",{"data-slot":"command-shortcut",className:a("fk:ml-auto fk:text-xs fk:tracking-widest fk:text-muted-foreground",o),...e})}function so({className:o,children:e,...n}){return jsxs(ScrollArea.Root,{"data-slot":"scroll-area",className:a("relative",o),...n,children:[jsx(ScrollArea.Viewport,{"data-slot":"scroll-area-viewport",className:"fk:size-full fk:rounded-[inherit] fk:transition-[color,box-shadow] fk:outline-none fk:focus-visible:ring-[3px] fk:focus-visible:ring-ring/50 fk:focus-visible:outline-1",children:e}),jsx(z,{}),jsx(ScrollArea.Corner,{})]})}function z({className:o,orientation:e="vertical",...n}){return jsx(ScrollArea.ScrollAreaScrollbar,{"data-slot":"scroll-area-scrollbar",orientation:e,className:a("fk:flex fk:touch-none fk:p-px fk:transition-colors fk:select-none",e==="vertical"&&"fk:h-full fk:w-2.5 fk:border-l fk:border-l-transparent",e==="horizontal"&&"fk:h-2.5 fk:flex-col fk:border-t fk:border-t-transparent",o),...n,children:jsx(ScrollArea.ScrollAreaThumb,{"data-slot":"scroll-area-thumb",className:"fk:relative fk:flex-1 fk:rounded-full fk:bg-border"})})}export{P as a,V as b,u as c,X as d,R as e,q as f,N as g,g as h,v as i,J as j,C as k,x as l,_ as m,Z as n,$ as o,j as p,oo as q,eo as r,to as s,ao as t,ro as u,so as v,z as w};//# sourceMappingURL=chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import'./index.css';import {b}from'./chunk-EYGOJ2ZN.js';import {a}from'./chunk-O2QMYUPS.js';import {Slot,Dialog,ScrollArea}from'radix-ui';import {cva}from'class-variance-authority';import {jsx,jsxs}from'react/jsx-runtime';import {XIcon,SearchIcon}from'lucide-react';import {Command}from'cmdk';var P=cva("fk:inline-flex fk:w-fit fk:shrink-0 fk:items-center fk:justify-center fk:gap-1 fk:overflow-hidden fk:rounded-full fk:border fk:border-transparent fk:px-2 fk:py-0.5 fk:text-xs fk:font-medium fk:whitespace-nowrap fk:transition-[color,box-shadow] fk:focus-visible:border-ring fk:focus-visible:ring-[3px] fk:focus-visible:ring-ring/50 fk:aria-invalid:border-destructive fk:aria-invalid:ring-destructive/20 fk:dark:aria-invalid:ring-destructive/40 fk:[&>svg]:pointer-events-none fk:[&>svg]:size-3",{variants:{variant:{default:"fk:bg-primary fk:text-primary-foreground fk:[a&]:hover:bg-primary/90",secondary:"fk:bg-secondary fk:text-secondary-foreground fk:[a&]:hover:bg-secondary/90",destructive:"fk:bg-destructive fk:text-white fk:focus-visible:ring-destructive/20 fk:dark:bg-destructive/60 fk:dark:focus-visible:ring-destructive/40 fk:[a&]:hover:bg-destructive/90",outline:"fk:border-border fk:text-foreground fk:[a&]:hover:bg-accent fk:[a&]:hover:text-accent-foreground",ghost:"fk:[a&]:hover:bg-accent fk:[a&]:hover:text-accent-foreground",link:"fk:text-primary fk:underline-offset-4 fk:[a&]:hover:underline"}},defaultVariants:{variant:"default"}});function V({className:o,variant:e="default",asChild:n=false,...f}){let k=n?Slot.Root:"span";return jsx(k,{"data-slot":"badge","data-variant":e,className:a(P({variant:e}),o),...f})}function u({...o}){return jsx(Dialog.Root,{"data-slot":"dialog",...o})}function X({...o}){return jsx(Dialog.Trigger,{"data-slot":"dialog-trigger",...o})}function R({...o}){return jsx(Dialog.Portal,{"data-slot":"dialog-portal",...o})}function q({...o}){return jsx(Dialog.Close,{"data-slot":"dialog-close",...o})}function N({className:o,...e}){return jsx(Dialog.Overlay,{"data-slot":"dialog-overlay",className:a("fk:fixed fk:inset-0 fk:z-50 fk:bg-black/50 fk:data-[state=closed]:animate-out fk:data-[state=closed]:fade-out-0 fk:data-[state=open]:animate-in fk:data-[state=open]:fade-in-0",o),...e})}function g({className:o,children:e,showCloseButton:n=true,...f}){return jsxs(R,{"data-slot":"dialog-portal",children:[jsx(N,{}),jsxs(Dialog.Content,{"data-slot":"dialog-content",className:a("fk:fixed fk:top-[50%] fk:left-[50%] fk:z-50 fk:grid fk:w-full fk:max-w-[calc(100%-2rem)] fk:translate-x-[-50%] fk:translate-y-[-50%] fk:gap-4 fk:rounded-lg fk:border fk:bg-background fk:p-6 fk:shadow-lg fk:duration-200 fk:outline-none fk:data-[state=closed]:animate-out fk:data-[state=closed]:fade-out-0 fk:data-[state=closed]:zoom-out-95 fk:data-[state=open]:animate-in fk:data-[state=open]:fade-in-0 fk:data-[state=open]:zoom-in-95 fk:sm:max-w-lg",o),...f,children:[e,n&&jsxs(Dialog.Close,{"data-slot":"dialog-close",className:"fk:absolute fk:top-4 fk:right-4 fk:rounded-xs fk:opacity-70 fk:ring-offset-background fk:transition-opacity fk:hover:opacity-100 fk:focus:ring-2 fk:focus:ring-ring fk:focus:ring-offset-2 fk:focus:outline-hidden fk:disabled:pointer-events-none fk:data-[state=open]:bg-accent fk:data-[state=open]:text-muted-foreground fk:[&_svg]:pointer-events-none fk:[&_svg]:shrink-0 fk:[&_svg:not([class*='size-'])]:size-4",children:[jsx(XIcon,{}),jsx("span",{className:"fk:sr-only",children:"Close"})]})]})]})}function v({className:o,...e}){return jsx("div",{"data-slot":"dialog-header",className:a("fk:flex fk:flex-col fk:gap-2 fk:text-center fk:sm:text-left",o),...e})}function J({className:o,showCloseButton:e=false,children:n,...f}){return jsxs("div",{"data-slot":"dialog-footer",className:a("fk:flex fk:flex-col-reverse fk:gap-2 fk:sm:flex-row fk:sm:justify-end",o),...f,children:[n,e&&jsx(Dialog.Close,{asChild:true,children:jsx(b,{variant:"outline",children:"Close"})})]})}function C({className:o,...e}){return jsx(Dialog.Title,{"data-slot":"dialog-title",className:a("fk:text-lg fk:leading-none fk:font-semibold",o),...e})}function x({className:o,...e}){return jsx(Dialog.Description,{"data-slot":"dialog-description",className:a("fk:text-sm fk:text-muted-foreground",o),...e})}function _({className:o,...e}){return jsx(Command,{"data-slot":"command",className:a("fk:flex fk:h-full fk:w-full fk:flex-col fk:rounded-md fk:bg-popover fk:text-popover-foreground",o),...e})}function Z({title:o="Command Palette",description:e="Search for a command to run...",children:n,className:f,showCloseButton:k=true,...h}){return jsxs(u,{...h,children:[jsxs(v,{className:"fk:sr-only",children:[jsx(C,{children:o}),jsx(x,{children:e})]}),jsx(g,{className:a("fk:overflow-hidden fk:p-0",f),showCloseButton:k,children:jsx(_,{className:"fk:**:data-[slot=command-input-wrapper]:h-12 fk:**:[[cmdk-group-heading]]:px-2 fk:**:[[cmdk-group-heading]]:font-medium fk:**:[[cmdk-group-heading]]:text-muted-foreground fk:**:[[cmdk-group]]:px-2 fk:[&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 fk:[&_[cmdk-input-wrapper]_svg]:h-5 fk:[&_[cmdk-input-wrapper]_svg]:w-5 fk:**:[[cmdk-input]]:h-12 fk:**:[[cmdk-item]]:px-2 fk:**:[[cmdk-item]]:py-3 fk:[&_[cmdk-item]_svg]:h-5 fk:[&_[cmdk-item]_svg]:w-5",children:n})})]})}function $({className:o,...e}){return jsxs("div",{"data-slot":"command-input-wrapper",className:"fk:flex fk:h-9 fk:items-center fk:gap-2 fk:border-b fk:px-3",children:[jsx(SearchIcon,{className:"fk:size-4 fk:shrink-0 fk:opacity-50"}),jsx(Command.Input,{"data-slot":"command-input",className:a("fk:flex fk:h-10 fk:w-full fk:rounded-md fk:bg-transparent fk:py-3 fk:text-sm fk:outline-hidden fk:placeholder:text-muted-foreground fk:disabled:cursor-not-allowed fk:disabled:opacity-50",o),...e})]})}function j({className:o,...e}){return jsx(Command.List,{"data-slot":"command-list",className:a("fk:max-h-[300px] fk:scroll-py-1 fk:overflow-x-hidden fk:overflow-y-auto",o),...e})}function oo({...o}){return jsx(Command.Empty,{"data-slot":"command-empty",className:"fk:py-6 fk:text-center fk:text-sm",...o})}function eo({className:o,...e}){return jsx(Command.Group,{"data-slot":"command-group",className:a("fk:overflow-hidden fk:p-1 fk:text-foreground fk:**:[[cmdk-group-heading]]:px-2 fk:**:[[cmdk-group-heading]]:py-1.5 fk:**:[[cmdk-group-heading]]:text-xs fk:**:[[cmdk-group-heading]]:font-medium fk:**:[[cmdk-group-heading]]:text-muted-foreground",o),...e})}function to({className:o,...e}){return jsx(Command.Separator,{"data-slot":"command-separator",className:a("fk:-mx-1 fk:h-px fk:bg-border",o),...e})}function ao({className:o,...e}){return jsx(Command.Item,{"data-slot":"command-item",className:a("fk:relative fk:flex fk:cursor-default fk:items-center fk:gap-2 fk:rounded-sm fk:px-2 fk:py-1.5 fk:text-sm fk:outline-hidden fk:select-none fk:data-[disabled=true]:pointer-events-none fk:data-[disabled=true]:opacity-50 fk:data-[selected=true]:bg-accent fk:data-[selected=true]:text-accent-foreground fk:[&_svg]:pointer-events-none fk:[&_svg]:shrink-0 fk:[&_svg:not([class*='size-'])]:size-4 fk:[&_svg:not([class*='text-'])]:text-muted-foreground",o),...e})}function ro({className:o,...e}){return jsx("span",{"data-slot":"command-shortcut",className:a("fk:ml-auto fk:text-xs fk:tracking-widest fk:text-muted-foreground",o),...e})}function so({className:o,children:e,...n}){return jsxs(ScrollArea.Root,{"data-slot":"scroll-area",className:a("fk:relative",o),...n,children:[jsx(ScrollArea.Viewport,{"data-slot":"scroll-area-viewport",className:"fk:size-full fk:rounded-[inherit] fk:transition-[color,box-shadow] fk:outline-none fk:focus-visible:ring-[3px] fk:focus-visible:ring-ring/50 fk:focus-visible:outline-1",children:e}),jsx(z,{}),jsx(ScrollArea.Corner,{})]})}function z({className:o,orientation:e="vertical",...n}){return jsx(ScrollArea.ScrollAreaScrollbar,{"data-slot":"scroll-area-scrollbar",orientation:e,className:a("fk:flex fk:touch-none fk:p-px fk:transition-colors fk:select-none",e==="vertical"&&"fk:h-full fk:w-2.5 fk:border-l fk:border-l-transparent",e==="horizontal"&&"fk:h-2.5 fk:flex-col fk:border-t fk:border-t-transparent",o),...n,children:jsx(ScrollArea.ScrollAreaThumb,{"data-slot":"scroll-area-thumb",className:"fk:relative fk:flex-1 fk:rounded-full fk:bg-border"})})}export{P as a,V as b,u as c,X as d,R as e,q as f,N as g,g as h,v as i,J as j,C as k,x as l,_ as m,Z as n,$ as o,j as p,oo as q,eo as r,to as s,ao as t,ro as u,so as v,z as w};//# sourceMappingURL=chunk-LL2Z4TD3.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-LL2Z4TD3.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/ui/primitives/badge.tsx","../src/ui/primitives/dialog.tsx","../src/ui/primitives/command.tsx","../src/ui/primitives/scroll-area.tsx"],"names":["badgeVariants","cva","Badge","className","variant","asChild","props","Comp","Slot","jsx","cn","Dialog","DialogPrimitive","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","DialogContent","children","showCloseButton","jsxs","XIcon","DialogHeader","DialogFooter","Button","DialogTitle","DialogDescription","Command","CommandPrimitive","CommandDialog","title","description","CommandInput","SearchIcon","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","CommandShortcut","ScrollArea","ScrollAreaPrimitive","ScrollBar","orientation"],"mappings":"ySAKMA,CAAAA,CAAgBC,GAAAA,CACpB,8eACA,CACE,QAAA,CAAU,CACR,OAAA,CAAS,CACP,QAAS,sEAAA,CACT,SAAA,CAAW,6EACX,WAAA,CACE,0KAAA,CACF,QAAS,kGAAA,CACT,KAAA,CAAO,+DACP,IAAA,CAAM,+DACR,CACF,CAAA,CACA,eAAA,CAAiB,CACf,OAAA,CAAS,SACX,CACF,CACF,EAEA,SAASC,CAAAA,CAAM,CACb,UAAAC,CAAAA,CACA,OAAA,CAAAC,EAAU,SAAA,CACV,OAAA,CAAAC,EAAU,KAAA,CACV,GAAGC,CACL,CAAA,CAA8F,CAC5F,IAAMC,CAAAA,CAAOF,CAAAA,CAAUG,KAAK,IAAA,CAAO,MAAA,CAEnC,OACEC,GAAAA,CAACF,CAAAA,CAAA,CAAK,WAAA,CAAU,OAAA,CAAQ,eAAcH,CAAAA,CAAS,SAAA,CAAWM,EAAGV,CAAAA,CAAc,CAAE,QAAAI,CAAQ,CAAC,EAAGD,CAAS,CAAA,CAAI,GAAGG,CAAAA,CAAO,CAEpH,CC5BA,SAASK,EAAO,CAAE,GAAGL,CAAM,CAAA,CAAsD,CAC/E,OAAOG,GAAAA,CAACG,MA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G,CAAM,CAAA,CAAiC,CAC9E,OACEG,GAAAA,CAAC,MAAA,CAAA,CACC,YAAU,kBAAA,CACV,SAAA,CAAWC,EAAG,mEAAA,CAAqEP,CAAS,EAC3F,GAAGG,CAAAA,CACN,CAEJ,CCvHA,SAASkC,EAAAA,CAAW,CAAE,UAAArC,CAAAA,CAAW,QAAA,CAAAe,EAAU,GAAGZ,CAAM,EAA0D,CAC5G,OACEc,KAACqB,UAAAA,CAAoB,IAAA,CAApB,CAAyB,WAAA,CAAU,aAAA,CAAc,UAAW/B,CAAAA,CAAG,UAAA,CAAYP,CAAS,CAAA,CAAI,GAAGG,EAC1F,QAAA,CAAA,CAAAG,GAAAA,CAACgC,WAAoB,QAAA,CAApB,CACC,YAAU,sBAAA,CACV,SAAA,CAAU,0KAET,QAAA,CAAAvB,CAAAA,CACH,EACAT,GAAAA,CAACiC,CAAAA,CAAA,EAAU,CAAA,CACXjC,GAAAA,CAACgC,WAAoB,MAAA,CAApB,EAA2B,GAC9B,CAEJ,CAEA,SAASC,CAAAA,CAAU,CACjB,UAAAvC,CAAAA,CACA,WAAA,CAAAwC,EAAc,UAAA,CACd,GAAGrC,CACL,CAAA,CAAyE,CACvE,OACEG,GAAAA,CAACgC,UAAAA,CAAoB,oBAApB,CACC,WAAA,CAAU,wBACV,WAAA,CAAaE,CAAAA,CACb,UAAWjC,CAAAA,CACT,mEAAA,CACAiC,IAAgB,UAAA,EAAc,wDAAA,CAC9BA,IAAgB,YAAA,EAAgB,0DAAA,CAChCxC,CACF,CAAA,CACC,GAAGG,EAEJ,QAAA,CAAAG,GAAAA,CAACgC,WAAoB,eAAA,CAApB,CACC,YAAU,mBAAA,CACV,SAAA,CAAU,oDAAA,CACZ,CAAA,CACF,CAEJ","file":"chunk-NNRD7YZU.js","sourcesContent":["import * as React from 'react';\nimport { Slot } from 'radix-ui';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../lib/utils';\n\nconst badgeVariants = cva(\n 'fk:inline-flex fk:w-fit fk:shrink-0 fk:items-center fk:justify-center fk:gap-1 fk:overflow-hidden fk:rounded-full fk:border fk:border-transparent fk:px-2 fk:py-0.5 fk:text-xs fk:font-medium fk:whitespace-nowrap fk:transition-[color,box-shadow] fk:focus-visible:border-ring fk:focus-visible:ring-[3px] fk:focus-visible:ring-ring/50 fk:aria-invalid:border-destructive fk:aria-invalid:ring-destructive/20 fk:dark:aria-invalid:ring-destructive/40 fk:[&>svg]:pointer-events-none fk:[&>svg]:size-3',\n {\n variants: {\n variant: {\n default: 'fk:bg-primary fk:text-primary-foreground fk:[a&]:hover:bg-primary/90',\n secondary: 'fk:bg-secondary fk:text-secondary-foreground fk:[a&]:hover:bg-secondary/90',\n destructive:\n 'fk:bg-destructive fk:text-white fk:focus-visible:ring-destructive/20 fk:dark:bg-destructive/60 fk:dark:focus-visible:ring-destructive/40 fk:[a&]:hover:bg-destructive/90',\n outline: 'fk:border-border fk:text-foreground fk:[a&]:hover:bg-accent fk:[a&]:hover:text-accent-foreground',\n ghost: 'fk:[a&]:hover:bg-accent fk:[a&]:hover:text-accent-foreground',\n link: 'fk:text-primary fk:underline-offset-4 fk:[a&]:hover:underline',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n }\n);\n\nfunction Badge({\n className,\n variant = 'default',\n asChild = false,\n ...props\n}: React.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & { asChild?: boolean }) {\n const Comp = asChild ? Slot.Root : 'span';\n\n return (\n <Comp data-slot=\"badge\" data-variant={variant} className={cn(badgeVariants({ variant }), className)} {...props} />\n );\n}\n\nexport { Badge, badgeVariants };\n","'use client';\n\nimport * as React from 'react';\nimport { Dialog as DialogPrimitive } from 'radix-ui';\nimport { XIcon } from 'lucide-react';\nimport { cn } from '../lib/utils';\nimport { Button } from './button';\n\nfunction Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />;\n}\n\nfunction DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />;\n}\n\nfunction DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />;\n}\n\nfunction DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />;\n}\n\nfunction DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n 'fk:fixed fk:inset-0 fk:z-50 fk:bg-black/50 fk:data-[state=closed]:animate-out fk:data-[state=closed]:fade-out-0 fk:data-[state=open]:animate-in fk:data-[state=open]:fade-in-0',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction DialogContent({\n className,\n children,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean;\n}) {\n return (\n <DialogPortal data-slot=\"dialog-portal\">\n <DialogOverlay />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n 'fk:fixed fk:top-[50%] fk:left-[50%] fk:z-50 fk:grid fk:w-full fk:max-w-[calc(100%-2rem)] fk:translate-x-[-50%] fk:translate-y-[-50%] fk:gap-4 fk:rounded-lg fk:border fk:bg-background fk:p-6 fk:shadow-lg fk:duration-200 fk:outline-none fk:data-[state=closed]:animate-out fk:data-[state=closed]:fade-out-0 fk:data-[state=closed]:zoom-out-95 fk:data-[state=open]:animate-in fk:data-[state=open]:fade-in-0 fk:data-[state=open]:zoom-in-95 fk:sm:max-w-lg',\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n className=\"fk:absolute fk:top-4 fk:right-4 fk:rounded-xs fk:opacity-70 fk:ring-offset-background fk:transition-opacity fk:hover:opacity-100 fk:focus:ring-2 fk:focus:ring-ring fk:focus:ring-offset-2 fk:focus:outline-hidden fk:disabled:pointer-events-none fk:data-[state=open]:bg-accent fk:data-[state=open]:text-muted-foreground fk:[&_svg]:pointer-events-none fk:[&_svg]:shrink-0 fk:[&_svg:not([class*='size-'])]:size-4\"\n >\n <XIcon />\n <span className=\"fk:sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n );\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn('fk:flex fk:flex-col fk:gap-2 fk:text-center fk:sm:text-left', className)}\n {...props}\n />\n );\n}\n\nfunction DialogFooter({\n className,\n showCloseButton = false,\n children,\n ...props\n}: React.ComponentProps<'div'> & {\n showCloseButton?: boolean;\n}) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn('fk:flex fk:flex-col-reverse fk:gap-2 fk:sm:flex-row fk:sm:justify-end', className)}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close asChild>\n <Button variant=\"outline\">Close</Button>\n </DialogPrimitive.Close>\n )}\n </div>\n );\n}\n\nfunction DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn('fk:text-lg fk:leading-none fk:font-semibold', className)}\n {...props}\n />\n );\n}\n\nfunction DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn('fk:text-sm fk:text-muted-foreground', className)}\n {...props}\n />\n );\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n};\n","'use client';\n\nimport * as React from 'react';\nimport { Command as CommandPrimitive } from 'cmdk';\nimport { SearchIcon } from 'lucide-react';\nimport { cn } from '../lib/utils';\nimport { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from './dialog';\n\ntype CommandChildren = React.ComponentProps<typeof CommandPrimitive>['children'];\n\nfunction Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>) {\n return (\n <CommandPrimitive\n data-slot=\"command\"\n className={cn(\n 'fk:flex fk:h-full fk:w-full fk:flex-col fk:rounded-md fk:bg-popover fk:text-popover-foreground',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction CommandDialog({\n title = 'Command Palette',\n description = 'Search for a command to run...',\n children,\n className,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof Dialog> & {\n title?: string;\n description?: string;\n className?: string;\n showCloseButton?: boolean;\n}) {\n return (\n <Dialog {...props}>\n <DialogHeader className=\"fk:sr-only\">\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{description}</DialogDescription>\n </DialogHeader>\n <DialogContent className={cn('fk:overflow-hidden fk:p-0', className)} showCloseButton={showCloseButton}>\n <Command className=\"fk:**:data-[slot=command-input-wrapper]:h-12 fk:**:[[cmdk-group-heading]]:px-2 fk:**:[[cmdk-group-heading]]:font-medium fk:**:[[cmdk-group-heading]]:text-muted-foreground fk:**:[[cmdk-group]]:px-2 fk:[&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 fk:[&_[cmdk-input-wrapper]_svg]:h-5 fk:[&_[cmdk-input-wrapper]_svg]:w-5 fk:**:[[cmdk-input]]:h-12 fk:**:[[cmdk-item]]:px-2 fk:**:[[cmdk-item]]:py-3 fk:[&_[cmdk-item]_svg]:h-5 fk:[&_[cmdk-item]_svg]:w-5\">\n {children as CommandChildren}\n </Command>\n </DialogContent>\n </Dialog>\n );\n}\n\nfunction CommandInput({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Input>) {\n return (\n <div data-slot=\"command-input-wrapper\" className=\"fk:flex fk:h-9 fk:items-center fk:gap-2 fk:border-b fk:px-3\">\n <SearchIcon className=\"fk:size-4 fk:shrink-0 fk:opacity-50\" />\n <CommandPrimitive.Input\n data-slot=\"command-input\"\n className={cn(\n 'fk:flex fk:h-10 fk:w-full fk:rounded-md fk:bg-transparent fk:py-3 fk:text-sm fk:outline-hidden fk:placeholder:text-muted-foreground fk:disabled:cursor-not-allowed fk:disabled:opacity-50',\n className\n )}\n {...props}\n />\n </div>\n );\n}\n\nfunction CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>) {\n return (\n <CommandPrimitive.List\n data-slot=\"command-list\"\n className={cn('fk:max-h-[300px] fk:scroll-py-1 fk:overflow-x-hidden fk:overflow-y-auto', className)}\n {...props}\n />\n );\n}\n\nfunction CommandEmpty({ ...props }: React.ComponentProps<typeof CommandPrimitive.Empty>) {\n return <CommandPrimitive.Empty data-slot=\"command-empty\" className=\"fk:py-6 fk:text-center fk:text-sm\" {...props} />;\n}\n\nfunction CommandGroup({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Group>) {\n return (\n <CommandPrimitive.Group\n data-slot=\"command-group\"\n className={cn(\n 'fk:overflow-hidden fk:p-1 fk:text-foreground fk:**:[[cmdk-group-heading]]:px-2 fk:**:[[cmdk-group-heading]]:py-1.5 fk:**:[[cmdk-group-heading]]:text-xs fk:**:[[cmdk-group-heading]]:font-medium fk:**:[[cmdk-group-heading]]:text-muted-foreground',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction CommandSeparator({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Separator>) {\n return (\n <CommandPrimitive.Separator\n data-slot=\"command-separator\"\n className={cn('fk:-mx-1 fk:h-px fk:bg-border', className)}\n {...props}\n />\n );\n}\n\nfunction CommandItem({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Item>) {\n return (\n <CommandPrimitive.Item\n data-slot=\"command-item\"\n className={cn(\n \"fk:relative fk:flex fk:cursor-default fk:items-center fk:gap-2 fk:rounded-sm fk:px-2 fk:py-1.5 fk:text-sm fk:outline-hidden fk:select-none fk:data-[disabled=true]:pointer-events-none fk:data-[disabled=true]:opacity-50 fk:data-[selected=true]:bg-accent fk:data-[selected=true]:text-accent-foreground fk:[&_svg]:pointer-events-none fk:[&_svg]:shrink-0 fk:[&_svg:not([class*='size-'])]:size-4 fk:[&_svg:not([class*='text-'])]:text-muted-foreground\",\n className\n )}\n {...props}\n />\n );\n}\n\nfunction CommandShortcut({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"command-shortcut\"\n className={cn('fk:ml-auto fk:text-xs fk:tracking-widest fk:text-muted-foreground', className)}\n {...props}\n />\n );\n}\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n};\n","'use client';\n\nimport * as React from 'react';\nimport { ScrollArea as ScrollAreaPrimitive } from 'radix-ui';\nimport { cn } from '../lib/utils';\n\nfunction ScrollArea({ className, children, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {\n return (\n <ScrollAreaPrimitive.Root data-slot=\"scroll-area\" className={cn('relative', className)} {...props}>\n <ScrollAreaPrimitive.Viewport\n data-slot=\"scroll-area-viewport\"\n className=\"fk:size-full fk:rounded-[inherit] fk:transition-[color,box-shadow] fk:outline-none fk:focus-visible:ring-[3px] fk:focus-visible:ring-ring/50 fk:focus-visible:outline-1\"\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n );\n}\n\nfunction ScrollBar({\n className,\n orientation = 'vertical',\n ...props\n}: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {\n return (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n data-slot=\"scroll-area-scrollbar\"\n orientation={orientation}\n className={cn(\n 'fk:flex fk:touch-none fk:p-px fk:transition-colors fk:select-none',\n orientation === 'vertical' && 'fk:h-full fk:w-2.5 fk:border-l fk:border-l-transparent',\n orientation === 'horizontal' && 'fk:h-2.5 fk:flex-col fk:border-t fk:border-t-transparent',\n className\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb\n data-slot=\"scroll-area-thumb\"\n className=\"fk:relative fk:flex-1 fk:rounded-full fk:bg-border\"\n />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n );\n}\n\nexport { ScrollArea, ScrollBar };\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/ui/primitives/badge.tsx","../src/ui/primitives/dialog.tsx","../src/ui/primitives/command.tsx","../src/ui/primitives/scroll-area.tsx"],"names":["badgeVariants","cva","Badge","className","variant","asChild","props","Comp","Slot","jsx","cn","Dialog","DialogPrimitive","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","DialogContent","children","showCloseButton","jsxs","XIcon","DialogHeader","DialogFooter","Button","DialogTitle","DialogDescription","Command","CommandPrimitive","CommandDialog","title","description","CommandInput","SearchIcon","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","CommandShortcut","ScrollArea","ScrollAreaPrimitive","ScrollBar","orientation"],"mappings":"ySAKMA,CAAAA,CAAgBC,GAAAA,CACpB,8eACA,CACE,QAAA,CAAU,CACR,OAAA,CAAS,CACP,QAAS,sEAAA,CACT,SAAA,CAAW,6EACX,WAAA,CACE,0KAAA,CACF,QAAS,kGAAA,CACT,KAAA,CAAO,+DACP,IAAA,CAAM,+DACR,CACF,CAAA,CACA,eAAA,CAAiB,CACf,OAAA,CAAS,SACX,CACF,CACF,EAEA,SAASC,CAAAA,CAAM,CACb,UAAAC,CAAAA,CACA,OAAA,CAAAC,EAAU,SAAA,CACV,OAAA,CAAAC,EAAU,KAAA,CACV,GAAGC,CACL,CAAA,CAA8F,CAC5F,IAAMC,CAAAA,CAAOF,CAAAA,CAAUG,KAAK,IAAA,CAAO,MAAA,CAEnC,OACEC,GAAAA,CAACF,CAAAA,CAAA,CAAK,WAAA,CAAU,OAAA,CAAQ,eAAcH,CAAAA,CAAS,SAAA,CAAWM,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oDAAA,CACZ,CAAA,CACF,CAEJ","file":"chunk-LL2Z4TD3.js","sourcesContent":["import * as React from 'react';\nimport { Slot } from 'radix-ui';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../lib/utils';\n\nconst badgeVariants = cva(\n 'fk:inline-flex fk:w-fit fk:shrink-0 fk:items-center fk:justify-center fk:gap-1 fk:overflow-hidden fk:rounded-full fk:border fk:border-transparent fk:px-2 fk:py-0.5 fk:text-xs fk:font-medium fk:whitespace-nowrap fk:transition-[color,box-shadow] fk:focus-visible:border-ring fk:focus-visible:ring-[3px] fk:focus-visible:ring-ring/50 fk:aria-invalid:border-destructive fk:aria-invalid:ring-destructive/20 fk:dark:aria-invalid:ring-destructive/40 fk:[&>svg]:pointer-events-none fk:[&>svg]:size-3',\n {\n variants: {\n variant: {\n default: 'fk:bg-primary fk:text-primary-foreground fk:[a&]:hover:bg-primary/90',\n secondary: 'fk:bg-secondary fk:text-secondary-foreground fk:[a&]:hover:bg-secondary/90',\n destructive:\n 'fk:bg-destructive fk:text-white fk:focus-visible:ring-destructive/20 fk:dark:bg-destructive/60 fk:dark:focus-visible:ring-destructive/40 fk:[a&]:hover:bg-destructive/90',\n outline: 'fk:border-border fk:text-foreground fk:[a&]:hover:bg-accent fk:[a&]:hover:text-accent-foreground',\n ghost: 'fk:[a&]:hover:bg-accent fk:[a&]:hover:text-accent-foreground',\n link: 'fk:text-primary fk:underline-offset-4 fk:[a&]:hover:underline',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n }\n);\n\nfunction Badge({\n className,\n variant = 'default',\n asChild = false,\n ...props\n}: React.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & { asChild?: boolean }) {\n const Comp = asChild ? Slot.Root : 'span';\n\n return (\n <Comp data-slot=\"badge\" data-variant={variant} className={cn(badgeVariants({ variant }), className)} {...props} />\n );\n}\n\nexport { Badge, badgeVariants };\n","'use client';\n\nimport * as React from 'react';\nimport { Dialog as DialogPrimitive } from 'radix-ui';\nimport { XIcon } from 'lucide-react';\nimport { cn } from '../lib/utils';\nimport { Button } from './button';\n\nfunction Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />;\n}\n\nfunction DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />;\n}\n\nfunction DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />;\n}\n\nfunction DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />;\n}\n\nfunction DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n 'fk:fixed fk:inset-0 fk:z-50 fk:bg-black/50 fk:data-[state=closed]:animate-out fk:data-[state=closed]:fade-out-0 fk:data-[state=open]:animate-in fk:data-[state=open]:fade-in-0',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction DialogContent({\n className,\n children,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean;\n}) {\n return (\n <DialogPortal data-slot=\"dialog-portal\">\n <DialogOverlay />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n 'fk:fixed fk:top-[50%] fk:left-[50%] fk:z-50 fk:grid fk:w-full fk:max-w-[calc(100%-2rem)] fk:translate-x-[-50%] fk:translate-y-[-50%] fk:gap-4 fk:rounded-lg fk:border fk:bg-background fk:p-6 fk:shadow-lg fk:duration-200 fk:outline-none fk:data-[state=closed]:animate-out fk:data-[state=closed]:fade-out-0 fk:data-[state=closed]:zoom-out-95 fk:data-[state=open]:animate-in fk:data-[state=open]:fade-in-0 fk:data-[state=open]:zoom-in-95 fk:sm:max-w-lg',\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n className=\"fk:absolute fk:top-4 fk:right-4 fk:rounded-xs fk:opacity-70 fk:ring-offset-background fk:transition-opacity fk:hover:opacity-100 fk:focus:ring-2 fk:focus:ring-ring fk:focus:ring-offset-2 fk:focus:outline-hidden fk:disabled:pointer-events-none fk:data-[state=open]:bg-accent fk:data-[state=open]:text-muted-foreground fk:[&_svg]:pointer-events-none fk:[&_svg]:shrink-0 fk:[&_svg:not([class*='size-'])]:size-4\"\n >\n <XIcon />\n <span className=\"fk:sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n );\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn('fk:flex fk:flex-col fk:gap-2 fk:text-center fk:sm:text-left', className)}\n {...props}\n />\n );\n}\n\nfunction DialogFooter({\n className,\n showCloseButton = false,\n children,\n ...props\n}: React.ComponentProps<'div'> & {\n showCloseButton?: boolean;\n}) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn('fk:flex fk:flex-col-reverse fk:gap-2 fk:sm:flex-row fk:sm:justify-end', className)}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close asChild>\n <Button variant=\"outline\">Close</Button>\n </DialogPrimitive.Close>\n )}\n </div>\n );\n}\n\nfunction DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn('fk:text-lg fk:leading-none fk:font-semibold', className)}\n {...props}\n />\n );\n}\n\nfunction DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn('fk:text-sm fk:text-muted-foreground', className)}\n {...props}\n />\n );\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n};\n","'use client';\n\nimport * as React from 'react';\nimport { Command as CommandPrimitive } from 'cmdk';\nimport { SearchIcon } from 'lucide-react';\nimport { cn } from '../lib/utils';\nimport { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from './dialog';\n\ntype CommandChildren = React.ComponentProps<typeof CommandPrimitive>['children'];\n\nfunction Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>) {\n return (\n <CommandPrimitive\n data-slot=\"command\"\n className={cn(\n 'fk:flex fk:h-full fk:w-full fk:flex-col fk:rounded-md fk:bg-popover fk:text-popover-foreground',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction CommandDialog({\n title = 'Command Palette',\n description = 'Search for a command to run...',\n children,\n className,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof Dialog> & {\n title?: string;\n description?: string;\n className?: string;\n showCloseButton?: boolean;\n}) {\n return (\n <Dialog {...props}>\n <DialogHeader className=\"fk:sr-only\">\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{description}</DialogDescription>\n </DialogHeader>\n <DialogContent className={cn('fk:overflow-hidden fk:p-0', className)} showCloseButton={showCloseButton}>\n <Command className=\"fk:**:data-[slot=command-input-wrapper]:h-12 fk:**:[[cmdk-group-heading]]:px-2 fk:**:[[cmdk-group-heading]]:font-medium fk:**:[[cmdk-group-heading]]:text-muted-foreground fk:**:[[cmdk-group]]:px-2 fk:[&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 fk:[&_[cmdk-input-wrapper]_svg]:h-5 fk:[&_[cmdk-input-wrapper]_svg]:w-5 fk:**:[[cmdk-input]]:h-12 fk:**:[[cmdk-item]]:px-2 fk:**:[[cmdk-item]]:py-3 fk:[&_[cmdk-item]_svg]:h-5 fk:[&_[cmdk-item]_svg]:w-5\">\n {children as CommandChildren}\n </Command>\n </DialogContent>\n </Dialog>\n );\n}\n\nfunction CommandInput({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Input>) {\n return (\n <div data-slot=\"command-input-wrapper\" className=\"fk:flex fk:h-9 fk:items-center fk:gap-2 fk:border-b fk:px-3\">\n <SearchIcon className=\"fk:size-4 fk:shrink-0 fk:opacity-50\" />\n <CommandPrimitive.Input\n data-slot=\"command-input\"\n className={cn(\n 'fk:flex fk:h-10 fk:w-full fk:rounded-md fk:bg-transparent fk:py-3 fk:text-sm fk:outline-hidden fk:placeholder:text-muted-foreground fk:disabled:cursor-not-allowed fk:disabled:opacity-50',\n className\n )}\n {...props}\n />\n </div>\n );\n}\n\nfunction CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>) {\n return (\n <CommandPrimitive.List\n data-slot=\"command-list\"\n className={cn('fk:max-h-[300px] fk:scroll-py-1 fk:overflow-x-hidden fk:overflow-y-auto', className)}\n {...props}\n />\n );\n}\n\nfunction CommandEmpty({ ...props }: React.ComponentProps<typeof CommandPrimitive.Empty>) {\n return <CommandPrimitive.Empty data-slot=\"command-empty\" className=\"fk:py-6 fk:text-center fk:text-sm\" {...props} />;\n}\n\nfunction CommandGroup({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Group>) {\n return (\n <CommandPrimitive.Group\n data-slot=\"command-group\"\n className={cn(\n 'fk:overflow-hidden fk:p-1 fk:text-foreground fk:**:[[cmdk-group-heading]]:px-2 fk:**:[[cmdk-group-heading]]:py-1.5 fk:**:[[cmdk-group-heading]]:text-xs fk:**:[[cmdk-group-heading]]:font-medium fk:**:[[cmdk-group-heading]]:text-muted-foreground',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction CommandSeparator({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Separator>) {\n return (\n <CommandPrimitive.Separator\n data-slot=\"command-separator\"\n className={cn('fk:-mx-1 fk:h-px fk:bg-border', className)}\n {...props}\n />\n );\n}\n\nfunction CommandItem({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Item>) {\n return (\n <CommandPrimitive.Item\n data-slot=\"command-item\"\n className={cn(\n \"fk:relative fk:flex fk:cursor-default fk:items-center fk:gap-2 fk:rounded-sm fk:px-2 fk:py-1.5 fk:text-sm fk:outline-hidden fk:select-none fk:data-[disabled=true]:pointer-events-none fk:data-[disabled=true]:opacity-50 fk:data-[selected=true]:bg-accent fk:data-[selected=true]:text-accent-foreground fk:[&_svg]:pointer-events-none fk:[&_svg]:shrink-0 fk:[&_svg:not([class*='size-'])]:size-4 fk:[&_svg:not([class*='text-'])]:text-muted-foreground\",\n className\n )}\n {...props}\n />\n );\n}\n\nfunction CommandShortcut({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"command-shortcut\"\n className={cn('fk:ml-auto fk:text-xs fk:tracking-widest fk:text-muted-foreground', className)}\n {...props}\n />\n );\n}\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n};\n","'use client';\n\nimport * as React from 'react';\nimport { ScrollArea as ScrollAreaPrimitive } from 'radix-ui';\nimport { cn } from '../lib/utils';\n\nfunction ScrollArea({ className, children, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {\n return (\n <ScrollAreaPrimitive.Root data-slot=\"scroll-area\" className={cn('fk:relative', className)} {...props}>\n <ScrollAreaPrimitive.Viewport\n data-slot=\"scroll-area-viewport\"\n className=\"fk:size-full fk:rounded-[inherit] fk:transition-[color,box-shadow] fk:outline-none fk:focus-visible:ring-[3px] fk:focus-visible:ring-ring/50 fk:focus-visible:outline-1\"\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n );\n}\n\nfunction ScrollBar({\n className,\n orientation = 'vertical',\n ...props\n}: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {\n return (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n data-slot=\"scroll-area-scrollbar\"\n orientation={orientation}\n className={cn(\n 'fk:flex fk:touch-none fk:p-px fk:transition-colors fk:select-none',\n orientation === 'vertical' && 'fk:h-full fk:w-2.5 fk:border-l fk:border-l-transparent',\n orientation === 'horizontal' && 'fk:h-2.5 fk:flex-col fk:border-t fk:border-t-transparent',\n className\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb\n data-slot=\"scroll-area-thumb\"\n className=\"fk:relative fk:flex-1 fk:rounded-full fk:bg-border\"\n />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n );\n}\n\nexport { ScrollArea, ScrollBar };\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import'./index.css';import {e,a as a$1,b as b$2,c}from'./chunk-YW2EEXMV.js';import {b,r}from'./chunk-IXO2LU47.js';import {b as b$1}from'./chunk-EYGOJ2ZN.js';import {a}from'./chunk-O2QMYUPS.js';import {Toggle,ToggleGroup,Separator,Collapsible}from'radix-ui';import {cva}from'class-variance-authority';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import*as u from'react';import {useState,useCallback,useEffect}from'react';import {Loader2Icon,OctagonXIcon,TriangleAlertIcon,InfoIcon,CircleCheckIcon,X as X$1,Info}from'lucide-react';import {Toaster}from'sonner';export{toast as e}from'sonner';import {Drawer}from'vaul';var v=cva("fk:inline-flex fk:items-center fk:justify-center fk:gap-2 fk:rounded-md fk:text-sm fk:font-medium fk:whitespace-nowrap fk:transition-[color,box-shadow] fk:outline-none fk:hover:bg-muted fk:hover:text-muted-foreground fk:focus-visible:border-ring fk:focus-visible:ring-[3px] fk:focus-visible:ring-ring/50 fk:disabled:pointer-events-none fk:disabled:opacity-50 fk:aria-invalid:border-destructive fk:aria-invalid:ring-destructive/20 fk:data-[state=on]:bg-accent fk:data-[state=on]:text-accent-foreground fk:dark:aria-invalid:ring-destructive/40 fk:[&_svg]:pointer-events-none fk:[&_svg]:shrink-0 fk:[&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"fk:bg-transparent",outline:"fk:border fk:border-input fk:bg-transparent fk:shadow-xs fk:hover:bg-accent fk:hover:text-accent-foreground"},size:{default:"fk:h-9 fk:min-w-9 fk:px-2",sm:"fk:h-8 fk:min-w-8 fk:px-1.5",lg:"fk:h-10 fk:min-w-10 fk:px-2.5"}},defaultVariants:{variant:"default",size:"default"}});function ut({className:t,variant:e,size:a$1,...o}){return jsx(Toggle.Root,{"data-slot":"toggle",className:a(v({variant:e,size:a$1,className:t})),...o})}var G=u.createContext({size:"default",variant:"default",spacing:0});function Pt({className:t,variant:e,size:a$1,spacing:o=0,children:n,...d}){return jsx(ToggleGroup.Root,{"data-slot":"toggle-group","data-variant":e,"data-size":a$1,"data-spacing":o,style:{"--gap":o},className:a("fk:group/toggle-group fk:flex fk:w-fit fk:items-center fk:gap-[--spacing(var(--gap))] fk:rounded-md fk:data-[spacing=default]:data-[variant=outline]:shadow-xs",t),...d,children:jsx(G.Provider,{value:{variant:e,size:a$1,spacing:o},children:n})})}function xt({className:t,children:e,variant:a$1,size:o,...n}){let d=u.useContext(G);return jsx(ToggleGroup.Item,{"data-slot":"toggle-group-item","data-variant":d.variant||a$1,"data-size":d.size||o,"data-spacing":d.spacing,className:a(v({variant:d.variant||a$1,size:d.size||o}),"fk:w-auto fk:min-w-0 fk:shrink-0 fk:px-3 fk:focus:z-10 fk:focus-visible:z-10","fk:data-[spacing=0]:rounded-none fk:data-[spacing=0]:shadow-none fk:data-[spacing=0]:first:rounded-l-md fk:data-[spacing=0]:last:rounded-r-md fk:data-[spacing=0]:data-[variant=outline]:border-l-0 fk:data-[spacing=0]:data-[variant=outline]:first:border-l",t),...n,children:e})}var St=({richColors:t=true,style:e,...a})=>{let{theme:o="system"}=b();return jsx(Toaster,{theme:o,richColors:t,className:"toaster group",icons:{success:jsx(CircleCheckIcon,{className:"fk:size-4"}),info:jsx(InfoIcon,{className:"fk:size-4"}),warning:jsx(TriangleAlertIcon,{className:"fk:size-4"}),error:jsx(OctagonXIcon,{className:"fk:size-4"}),loading:jsx(Loader2Icon,{className:"fk:size-4 fk:animate-spin"})},style:{"--normal-bg":"hsl(var(--popover))","--normal-text":"hsl(var(--popover-foreground))","--normal-border":"hsl(var(--border))","--border-radius":"var(--radius)",...e},...a})};function H({className:t,orientation:e="horizontal",decorative:a$1=true,...o}){return jsx(Separator.Root,{"data-slot":"separator",decorative:a$1,orientation:e,className:a("fk:shrink-0 fk:bg-border fk:data-[orientation=horizontal]:h-px fk:data-[orientation=horizontal]:w-full fk:data-[orientation=vertical]:h-full fk:data-[orientation=vertical]:w-px",t),...o})}var at=Drawer.Portal;function O({...t}){return jsx(Drawer.Root,{"data-slot":"drawer",...t})}function ot({...t}){return jsx(at,{...t})}function nt({className:t,...e}){return jsx(Drawer.Overlay,{"data-slot":"drawer-overlay",className:a("fk:fixed fk:inset-0 fk:z-50 fk:bg-overlay/75 fk:backdrop-blur-[1px] fk:data-[state=closed]:animate-out fk:data-[state=closed]:fade-out-0 fk:data-[state=open]:animate-in fk:data-[state=open]:fade-in-0",t),...e})}function X({className:t,children:e,...a$1}){return jsxs(ot,{children:[jsx(nt,{}),jsxs(Drawer.Content,{"data-slot":"drawer-content",className:a("fk:group/drawer-content fk:fixed fk:z-50 fk:flex fk:h-auto fk:flex-col fk:bg-background","fk:data-[vaul-drawer-direction=top]:inset-x-0 fk:data-[vaul-drawer-direction=top]:top-0 fk:data-[vaul-drawer-direction=top]:mb-24 fk:data-[vaul-drawer-direction=top]:max-h-[80vh] fk:data-[vaul-drawer-direction=top]:rounded-b-lg fk:data-[vaul-drawer-direction=top]:border-b","fk:data-[vaul-drawer-direction=bottom]:inset-x-0 fk:data-[vaul-drawer-direction=bottom]:bottom-0 fk:data-[vaul-drawer-direction=bottom]:mt-24 fk:data-[vaul-drawer-direction=bottom]:max-h-[80vh] fk:data-[vaul-drawer-direction=bottom]:rounded-t-lg fk:data-[vaul-drawer-direction=bottom]:border-t","fk:data-[vaul-drawer-direction=right]:inset-y-0 fk:data-[vaul-drawer-direction=right]:right-0 fk:data-[vaul-drawer-direction=right]:w-full fk:data-[vaul-drawer-direction=right]:max-w-[clamp(40vw,95vw,60rem)] fk:data-[vaul-drawer-direction=right]:border-l fk:rounded-l-[20px]","fk:data-[vaul-drawer-direction=left]:inset-y-0 fk:data-[vaul-drawer-direction=left]:left-0 fk:data-[vaul-drawer-direction=left]:w-3/4 fk:data-[vaul-drawer-direction=left]:border-r fk:data-[vaul-drawer-direction=left]:sm:max-w-sm",t),...a$1,children:[jsx("div",{className:a("fk:absolute fk:z-10 fk:hidden fk:shrink-0 fk:rounded-full fk:bg-muted","fk:group-data-[vaul-drawer-direction=bottom]/drawer-content:top-4 fk:group-data-[vaul-drawer-direction=bottom]/drawer-content:left-1/2 fk:group-data-[vaul-drawer-direction=bottom]/drawer-content:block fk:group-data-[vaul-drawer-direction=bottom]/drawer-content:h-2 fk:group-data-[vaul-drawer-direction=bottom]/drawer-content:w-[100px] fk:group-data-[vaul-drawer-direction=bottom]/drawer-content:-translate-x-1/2","fk:group-data-[vaul-drawer-direction=top]/drawer-content:bottom-4 fk:group-data-[vaul-drawer-direction=top]/drawer-content:left-1/2 fk:group-data-[vaul-drawer-direction=top]/drawer-content:block fk:group-data-[vaul-drawer-direction=top]/drawer-content:h-2 fk:group-data-[vaul-drawer-direction=top]/drawer-content:w-[100px] fk:group-data-[vaul-drawer-direction=top]/drawer-content:-translate-x-1/2","fk:group-data-[vaul-drawer-direction=right]/drawer-content:left-3 fk:group-data-[vaul-drawer-direction=right]/drawer-content:top-1/2 fk:group-data-[vaul-drawer-direction=right]/drawer-content:block fk:group-data-[vaul-drawer-direction=right]/drawer-content:h-[100px] fk:group-data-[vaul-drawer-direction=right]/drawer-content:w-2 fk:group-data-[vaul-drawer-direction=right]/drawer-content:-translate-y-1/2","fk:group-data-[vaul-drawer-direction=left]/drawer-content:right-4 fk:group-data-[vaul-drawer-direction=left]/drawer-content:top-1/2 fk:group-data-[vaul-drawer-direction=left]/drawer-content:block fk:group-data-[vaul-drawer-direction=left]/drawer-content:h-[100px] fk:group-data-[vaul-drawer-direction=left]/drawer-content:w-2 fk:group-data-[vaul-drawer-direction=left]/drawer-content:-translate-y-1/2")}),e]})]})}function _({className:t,...e}){return jsx("div",{"data-slot":"drawer-header",className:a("fk:flex fk:gap-2.5 fk:p-4 fk:group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center fk:group-data-[vaul-drawer-direction=top]/drawer-content:text-center fk:md:text-left",t),...e})}function J({className:t,...e}){return jsx(Drawer.Title,{"data-slot":"drawer-title",className:a("fk:flex fk:items-center fk:text-lg fk:font-semibold fk:leading-none fk:tracking-tight",t),...e})}function F({className:t,...e}){return jsx(Drawer.Description,{"data-slot":"drawer-description",className:a("fk:text-sm fk:text-muted-foreground",t),...e})}function dt({actions:t,beforeClose:e,children:a,depth:o,isFocused:n,onFormChange:d,onClose:y,title:k}){let[M,g]=useState(false),K=o*(50/o),m=useCallback(()=>{(!e||e())&&(g(false),setTimeout(()=>{y();},150));},[e,y,g]),w=useCallback(T=>{T.key==="Escape"&&n&&m();},[m,n]);return useEffect(()=>{g(true),globalThis.document.body.classList.add("fk-drawer-fix");},[]),useEffect(()=>(globalThis.document.addEventListener("keydown",w,false),()=>{globalThis.document.removeEventListener("keydown",w,false);}),[w]),jsx(O,{direction:"right",dismissible:false,onClose:()=>{m();},open:M,children:jsxs(X,{style:n?{}:{maxWidth:`calc(100% - ${K.toString()}px)`},children:[jsxs(_,{className:"fk:px-10",children:[jsx(J,{className:"fk:w-full",children:k||jsx(r,{className:"fk:h-5 fk:w-[120px]"})}),jsx(F,{className:"fk:sr-only",children:k||"Loading form"}),t,jsxs(b$1,{className:"",onClick:m,size:"icon",variant:"ghost",children:[jsx(X$1,{className:"fk:h-4 fk:w-4"}),jsx("span",{className:"fk:sr-only",children:"Close"})]})]}),jsx(H,{}),jsx("div",{className:"fk:min-h-0 fk:px-10 fk:pt-6 fk:h-full fk:overflow-y-auto fk:pb-16","data-vaul-no-drag":true,children:a})]})})}function qt({className:t,containerClassName:e,onScroll:a$1,ref:o,...n}){return jsx("div",{ref:o,"data-slot":"table-container",className:a("fk:relative fk:h-full fk:w-full fk:min-w-0 fk:overflow-auto fk:rounded-t-md fk:border-border fk:border",e),onScroll:a$1,children:jsx("table",{"data-slot":"table",className:a("fk:w-full fk:caption-bottom fk:text-sm",t),...n})})}function Qt({className:t,...e}){return jsx("thead",{"data-slot":"table-header",className:a("fk:[&_tr]:border-b fk:bg-muted fk:dark:bg-muted",t),...e})}function Ut({className:t,...e}){return jsx("tbody",{"data-slot":"table-body",className:a("fk:[&_tr:last-child]:border-0",t),...e})}function Zt({className:t,...e}){return jsx("tfoot",{"data-slot":"table-footer",className:a("fk:border-t fk:bg-muted/50 fk:font-medium fk:[&>tr]:last:border-b-0",t),...e})}function jt({className:t,...e}){return jsx("tr",{"data-slot":"table-row",className:a("fk:border-b fk:transition-colors fk:hover:bg-muted/50 fk:has-aria-expanded:bg-muted/50 fk:data-[state=selected]:bg-muted",t),...e})}function te({className:t,...e}){return jsx("th",{"data-slot":"table-head",className:a("fk:h-10 fk:px-4 fk:text-left fk:align-middle fk:font-medium fk:whitespace-nowrap fk:text-foreground fk:[&:has([role=checkbox])]:pr-0 fk:*:[[role=checkbox]]:translate-y-[2px]",t),...e})}function ee({className:t,...e}){return jsx("td",{"data-slot":"table-cell",className:a("fk:px-4 fk:py-1 fk:align-middle fk:whitespace-nowrap fk:[&:has([role=checkbox])]:pr-0 fk:*:[[role=checkbox]]:translate-y-[2px]",t),...e})}function re({className:t,...e}){return jsx("caption",{"data-slot":"table-caption",className:a("fk:mt-4 fk:text-sm fk:text-muted-foreground",t),...e})}function st(){return jsx(e,{className:"fk:max-w-64 fk:p-3",children:jsxs("div",{className:"fk:flex fk:gap-2.5",children:[jsx(Info,{className:"fk:mt-0.5 fk:h-4 fk:w-4 fk:shrink-0 fk:opacity-70"}),jsxs("div",{className:"fk:flex fk:flex-col fk:gap-1",children:[jsx("p",{className:"fk:text-sm fk:font-semibold fk:leading-none",children:"Insufficient permissions"}),jsx("p",{className:"fk:text-xs fk:opacity-70 fk:leading-snug",children:"Your member role cannot perform this action"})]})]})})}function le({disabled:t,children:e}){return t?jsx(a$1,{children:jsxs(b$2,{children:[jsx(c,{asChild:true,children:jsx("span",{className:"fk:inline-flex",children:e})}),jsx(st,{})]})}):jsx(Fragment,{children:e})}function ce({...t}){return jsx(Collapsible.Root,{"data-slot":"collapsible",...t})}function pe({...t}){return jsx(Collapsible.CollapsibleTrigger,{"data-slot":"collapsible-trigger",...t})}function ke({...t}){return jsx(Collapsible.CollapsibleContent,{"data-slot":"collapsible-content",...t})}export{v as a,ut as b,Pt as c,xt as d,St as f,H as g,dt as h,ce as i,pe as j,ke as k,qt as l,Qt as m,Ut as n,Zt as o,jt as p,te as q,ee as r,re as s,st as t,le as u};//# sourceMappingURL=chunk-MC6VZLKC.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-MC6VZLKC.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/ui/primitives/toggle.tsx","../src/ui/primitives/toggle-group.tsx","../src/ui/primitives/sonner.tsx","../src/ui/primitives/separator.tsx","../src/ui/primitives/drawer.tsx","../src/ui/components/drawer-modal.tsx","../src/ui/primitives/table.tsx","../src/ui/components/permission-tooltip.tsx","../src/ui/primitives/collapsible.tsx"],"names":["toggleVariants","cva","Toggle","className","variant","size","props","jsx","TogglePrimitive","cn","ToggleGroupContext","ToggleGroup","spacing","children","ToggleGroupPrimitive","ToggleGroupItem","context","Toaster","richColors","style","theme","useTheme","Sonner","CircleCheckIcon","InfoIcon","TriangleAlertIcon","OctagonXIcon","Loader2Icon","Separator","orientation","decorative","SeparatorPrimitive","DrawerPrimitivePortal","DrawerPrimitive","Drawer","DrawerPortal","DrawerOverlay","DrawerContent","jsxs","DrawerHeader","DrawerTitle","DrawerDescription","DrawerModal","actions","beforeClose","depth","isFocused","_onFormChange","onClose","title","isOpen","setIsOpen","useState","gutter","handleClose","useCallback","onEscapeKeyPressed","event","useEffect","Skeleton","Button","CloseIcon","Table","containerClassName","onScroll","ref","TableHeader","TableBody","TableFooter","TableRow","TableHead","TableCell","TableCaption","InsufficientPermissionsTooltipContent","TooltipContent","Info","PermissionTooltip","disabled","TooltipProvider","Tooltip","TooltipTrigger","Fragment","Collapsible","CollapsiblePrimitive","CollapsibleTrigger","CollapsibleContent"],"mappings":"4mBAOA,IAAMA,CAAAA,CAAiBC,GAAAA,CACrB,2nBACA,CACE,QAAA,CAAU,CACR,OAAA,CAAS,CACP,OAAA,CAAS,mBAAA,CACT,OAAA,CACE,6GACJ,CAAA,CACA,IAAA,CAAM,CACJ,OAAA,CAAS,2BAAA,CACT,EAAA,CAAI,6BAAA,CACJ,EAAA,CAAI,+BACN,CACF,CAAA,CACA,eAAA,CAAiB,CACf,OAAA,CAAS,SAAA,CACT,IAAA,CAAM,SACR,CACF,CACF,EAEA,SAASC,EAAAA,CAAO,CACd,SAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,EACA,IAAA,CAAAC,GAAAA,CACA,GAAGC,CACL,CAAA,CAA4F,CAC1F,OACEC,GAAAA,CAACC,OAAgB,IAAA,CAAhB,CAAqB,WAAA,CAAU,QAAA,CAAS,UAAWC,CAAAA,CAAGT,CAAAA,CAAe,CAAE,OAAA,CAAAI,EAAS,IAAA,CAAAC,GAAAA,CAAM,SAAA,CAAAF,CAAU,CAAC,CAAC,CAAA,CAAI,GAAGG,EAAO,CAErH,CC9BA,IAAMI,CAAAA,CAA2B,CAAA,CAAA,aAAA,CAI/B,CACA,IAAA,CAAM,UACN,OAAA,CAAS,SAAA,CACT,OAAA,CAAS,CACX,CAAC,CAAA,CAED,SAASC,EAAAA,CAAY,CACnB,UAAAR,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,GAAAA,CACA,OAAA,CAAAO,CAAAA,CAAU,CAAA,CACV,S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CAAA,CAA2D,CACzF,OAAOC,GAAAA,CAAC4E,YAAqB,IAAA,CAArB,CAA0B,WAAA,CAAU,aAAA,CAAe,GAAG7E,CAAAA,CAAO,CACvE,CAEA,SAAS8E,EAAAA,CAAmB,CAAE,GAAG9E,CAAM,EAAyE,CAC9G,OAAOC,GAAAA,CAAC4E,WAAAA,CAAqB,kBAAA,CAArB,CAAwC,WAAA,CAAU,qBAAA,CAAuB,GAAG7E,CAAAA,CAAO,CAC7F,CAEA,SAAS+E,EAAAA,CAAmB,CAAE,GAAG/E,CAAM,EAAyE,CAC9G,OAAOC,GAAAA,CAAC4E,WAAAA,CAAqB,mBAArB,CAAwC,WAAA,CAAU,qBAAA,CAAuB,GAAG7E,EAAO,CAC7F","file":"chunk-MC6VZLKC.js","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Toggle as TogglePrimitive } from 'radix-ui';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../lib/utils';\n\nconst toggleVariants = cva(\n \"fk:inline-flex fk:items-center fk:justify-center fk:gap-2 fk:rounded-md fk:text-sm fk:font-medium fk:whitespace-nowrap fk:transition-[color,box-shadow] fk:outline-none fk:hover:bg-muted fk:hover:text-muted-foreground fk:focus-visible:border-ring fk:focus-visible:ring-[3px] fk:focus-visible:ring-ring/50 fk:disabled:pointer-events-none fk:disabled:opacity-50 fk:aria-invalid:border-destructive fk:aria-invalid:ring-destructive/20 fk:data-[state=on]:bg-accent fk:data-[state=on]:text-accent-foreground fk:dark:aria-invalid:ring-destructive/40 fk:[&_svg]:pointer-events-none fk:[&_svg]:shrink-0 fk:[&_svg:not([class*='size-'])]:size-4\",\n {\n variants: {\n variant: {\n default: 'fk:bg-transparent',\n outline:\n 'fk:border fk:border-input fk:bg-transparent fk:shadow-xs fk:hover:bg-accent fk:hover:text-accent-foreground',\n },\n size: {\n default: 'fk:h-9 fk:min-w-9 fk:px-2',\n sm: 'fk:h-8 fk:min-w-8 fk:px-1.5',\n lg: 'fk:h-10 fk:min-w-10 fk:px-2.5',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n }\n);\n\nfunction Toggle({\n className,\n variant,\n size,\n ...props\n}: React.ComponentProps<typeof TogglePrimitive.Root> & VariantProps<typeof toggleVariants>) {\n return (\n <TogglePrimitive.Root data-slot=\"toggle\" className={cn(toggleVariants({ variant, size, className }))} {...props} />\n );\n}\n\nexport { Toggle, toggleVariants };\n","'use client';\n\nimport * as React from 'react';\nimport { ToggleGroup as ToggleGroupPrimitive } from 'radix-ui';\nimport type { VariantProps } from 'class-variance-authority';\nimport { cn } from '../lib/utils';\nimport { toggleVariants } from './toggle';\n\nconst ToggleGroupContext = React.createContext<\n VariantProps<typeof toggleVariants> & {\n spacing?: number;\n }\n>({\n size: 'default',\n variant: 'default',\n spacing: 0,\n});\n\nfunction ToggleGroup({\n className,\n variant,\n size,\n spacing = 0,\n children,\n ...props\n}: React.ComponentProps<typeof ToggleGroupPrimitive.Root> &\n VariantProps<typeof toggleVariants> & {\n spacing?: number;\n }) {\n return (\n <ToggleGroupPrimitive.Root\n data-slot=\"toggle-group\"\n data-variant={variant}\n data-size={size}\n data-spacing={spacing}\n style={{ '--gap': spacing } as React.CSSProperties}\n className={cn(\n 'fk:group/toggle-group fk:flex fk:w-fit fk:items-center fk:gap-[--spacing(var(--gap))] fk:rounded-md fk:data-[spacing=default]:data-[variant=outline]:shadow-xs',\n className\n )}\n {...props}\n >\n <ToggleGroupContext.Provider value={{ variant, size, spacing }}>{children}</ToggleGroupContext.Provider>\n </ToggleGroupPrimitive.Root>\n );\n}\n\nfunction ToggleGroupItem({\n className,\n children,\n variant,\n size,\n ...props\n}: React.ComponentProps<typeof ToggleGroupPrimitive.Item> & VariantProps<typeof toggleVariants>) {\n const context = React.useContext(ToggleGroupContext);\n\n return (\n <ToggleGroupPrimitive.Item\n data-slot=\"toggle-group-item\"\n data-variant={context.variant || variant}\n data-size={context.size || size}\n data-spacing={context.spacing}\n className={cn(\n toggleVariants({\n variant: context.variant || variant,\n size: context.size || size,\n }),\n 'fk:w-auto fk:min-w-0 fk:shrink-0 fk:px-3 fk:focus:z-10 fk:focus-visible:z-10',\n 'fk:data-[spacing=0]:rounded-none fk:data-[spacing=0]:shadow-none fk:data-[spacing=0]:first:rounded-l-md fk:data-[spacing=0]:last:rounded-r-md fk:data-[spacing=0]:data-[variant=outline]:border-l-0 fk:data-[spacing=0]:data-[variant=outline]:first:border-l',\n className\n )}\n {...props}\n >\n {children}\n </ToggleGroupPrimitive.Item>\n );\n}\n\nexport { ToggleGroup, ToggleGroupItem };\n","'use client';\n\nimport { CircleCheckIcon, InfoIcon, Loader2Icon, OctagonXIcon, TriangleAlertIcon } from 'lucide-react';\nimport { useTheme } from '../theme-context';\nimport { toast, Toaster as Sonner, type ToasterProps } from 'sonner';\n\nconst Toaster = ({ richColors = true, style, ...props }: ToasterProps) => {\n const { theme = 'system' } = useTheme();\n\n return (\n <Sonner\n theme={theme as ToasterProps['theme']}\n richColors={richColors}\n className=\"toaster group\"\n icons={{\n success: <CircleCheckIcon className=\"fk:size-4\" />,\n info: <InfoIcon className=\"fk:size-4\" />,\n warning: <TriangleAlertIcon className=\"fk:size-4\" />,\n error: <OctagonXIcon className=\"fk:size-4\" />,\n loading: <Loader2Icon className=\"fk:size-4 fk:animate-spin\" />,\n }}\n style={\n {\n '--normal-bg': 'hsl(var(--popover))',\n '--normal-text': 'hsl(var(--popover-foreground))',\n '--normal-border': 'hsl(var(--border))',\n '--border-radius': 'var(--radius)',\n ...style,\n } as React.CSSProperties\n }\n {...props}\n />\n );\n};\n\nexport { toast, Toaster };\n","'use client';\n\nimport * as React from 'react';\nimport { Separator as SeparatorPrimitive } from 'radix-ui';\nimport { cn } from '../lib/utils';\n\nfunction Separator({\n className,\n orientation = 'horizontal',\n decorative = true,\n ...props\n}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {\n return (\n <SeparatorPrimitive.Root\n data-slot=\"separator\"\n decorative={decorative}\n orientation={orientation}\n className={cn(\n 'fk:shrink-0 fk:bg-border fk:data-[orientation=horizontal]:h-px fk:data-[orientation=horizontal]:w-full fk:data-[orientation=vertical]:h-full fk:data-[orientation=vertical]:w-px',\n className\n )}\n {...props}\n />\n );\n}\n\nexport { Separator };\n","'use client';\n\nimport * as React from 'react';\nimport { Drawer as DrawerPrimitive } from 'vaul';\nimport { cn } from '../lib/utils';\n\ntype DrawerPortalProps = React.PropsWithChildren<{\n container?: HTMLElement | null;\n}>;\n\nconst DrawerPrimitivePortal = DrawerPrimitive.Portal as React.ComponentType<DrawerPortalProps>;\n\nfunction Drawer({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>) {\n return <DrawerPrimitive.Root data-slot=\"drawer\" {...props} />;\n}\n\nfunction DrawerTrigger({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Trigger>) {\n return <DrawerPrimitive.Trigger data-slot=\"drawer-trigger\" {...props} />;\n}\n\nfunction DrawerPortal({ ...props }: DrawerPortalProps) {\n return <DrawerPrimitivePortal {...props} />;\n}\n\nfunction DrawerClose({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Close>) {\n return <DrawerPrimitive.Close data-slot=\"drawer-close\" {...props} />;\n}\n\nfunction DrawerOverlay({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Overlay>) {\n return (\n <DrawerPrimitive.Overlay\n data-slot=\"drawer-overlay\"\n className={cn(\n 'fk:fixed fk:inset-0 fk:z-50 fk:bg-overlay/75 fk:backdrop-blur-[1px] fk:data-[state=closed]:animate-out fk:data-[state=closed]:fade-out-0 fk:data-[state=open]:animate-in fk:data-[state=open]:fade-in-0',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction DrawerContent({ className, children, ...props }: React.ComponentProps<typeof DrawerPrimitive.Content>) {\n return (\n <DrawerPortal>\n <DrawerOverlay />\n <DrawerPrimitive.Content\n data-slot=\"drawer-content\"\n className={cn(\n 'fk:group/drawer-content fk:fixed fk:z-50 fk:flex fk:h-auto fk:flex-col fk:bg-background',\n 'fk:data-[vaul-drawer-direction=top]:inset-x-0 fk:data-[vaul-drawer-direction=top]:top-0 fk:data-[vaul-drawer-direction=top]:mb-24 fk:data-[vaul-drawer-direction=top]:max-h-[80vh] fk:data-[vaul-drawer-direction=top]:rounded-b-lg fk:data-[vaul-drawer-direction=top]:border-b',\n 'fk:data-[vaul-drawer-direction=bottom]:inset-x-0 fk:data-[vaul-drawer-direction=bottom]:bottom-0 fk:data-[vaul-drawer-direction=bottom]:mt-24 fk:data-[vaul-drawer-direction=bottom]:max-h-[80vh] fk:data-[vaul-drawer-direction=bottom]:rounded-t-lg fk:data-[vaul-drawer-direction=bottom]:border-t',\n 'fk:data-[vaul-drawer-direction=right]:inset-y-0 fk:data-[vaul-drawer-direction=right]:right-0 fk:data-[vaul-drawer-direction=right]:w-full fk:data-[vaul-drawer-direction=right]:max-w-[clamp(40vw,95vw,60rem)] fk:data-[vaul-drawer-direction=right]:border-l fk:rounded-l-[20px]',\n 'fk:data-[vaul-drawer-direction=left]:inset-y-0 fk:data-[vaul-drawer-direction=left]:left-0 fk:data-[vaul-drawer-direction=left]:w-3/4 fk:data-[vaul-drawer-direction=left]:border-r fk:data-[vaul-drawer-direction=left]:sm:max-w-sm',\n className\n )}\n {...props}\n >\n <div\n className={cn(\n 'fk:absolute fk:z-10 fk:hidden fk:shrink-0 fk:rounded-full fk:bg-muted',\n 'fk:group-data-[vaul-drawer-direction=bottom]/drawer-content:top-4 fk:group-data-[vaul-drawer-direction=bottom]/drawer-content:left-1/2 fk:group-data-[vaul-drawer-direction=bottom]/drawer-content:block fk:group-data-[vaul-drawer-direction=bottom]/drawer-content:h-2 fk:group-data-[vaul-drawer-direction=bottom]/drawer-content:w-[100px] fk:group-data-[vaul-drawer-direction=bottom]/drawer-content:-translate-x-1/2',\n 'fk:group-data-[vaul-drawer-direction=top]/drawer-content:bottom-4 fk:group-data-[vaul-drawer-direction=top]/drawer-content:left-1/2 fk:group-data-[vaul-drawer-direction=top]/drawer-content:block fk:group-data-[vaul-drawer-direction=top]/drawer-content:h-2 fk:group-data-[vaul-drawer-direction=top]/drawer-content:w-[100px] fk:group-data-[vaul-drawer-direction=top]/drawer-content:-translate-x-1/2',\n 'fk:group-data-[vaul-drawer-direction=right]/drawer-content:left-3 fk:group-data-[vaul-drawer-direction=right]/drawer-content:top-1/2 fk:group-data-[vaul-drawer-direction=right]/drawer-content:block fk:group-data-[vaul-drawer-direction=right]/drawer-content:h-[100px] fk:group-data-[vaul-drawer-direction=right]/drawer-content:w-2 fk:group-data-[vaul-drawer-direction=right]/drawer-content:-translate-y-1/2',\n 'fk:group-data-[vaul-drawer-direction=left]/drawer-content:right-4 fk:group-data-[vaul-drawer-direction=left]/drawer-content:top-1/2 fk:group-data-[vaul-drawer-direction=left]/drawer-content:block fk:group-data-[vaul-drawer-direction=left]/drawer-content:h-[100px] fk:group-data-[vaul-drawer-direction=left]/drawer-content:w-2 fk:group-data-[vaul-drawer-direction=left]/drawer-content:-translate-y-1/2'\n )}\n />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPortal>\n );\n}\n\nfunction DrawerHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"drawer-header\"\n className={cn(\n 'fk:flex fk:gap-2.5 fk:p-4 fk:group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center fk:group-data-[vaul-drawer-direction=top]/drawer-content:text-center fk:md:text-left',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction DrawerFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"drawer-footer\"\n className={cn('fk:mt-auto fk:flex fk:flex-col fk:gap-2 fk:p-4', className)}\n {...props}\n />\n );\n}\n\nfunction DrawerTitle({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Title>) {\n return (\n <DrawerPrimitive.Title\n data-slot=\"drawer-title\"\n className={cn('fk:flex fk:items-center fk:text-lg fk:font-semibold fk:leading-none fk:tracking-tight', className)}\n {...props}\n />\n );\n}\n\nfunction DrawerDescription({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Description>) {\n return (\n <DrawerPrimitive.Description\n data-slot=\"drawer-description\"\n className={cn('fk:text-sm fk:text-muted-foreground', className)}\n {...props}\n />\n );\n}\n\nexport {\n Drawer,\n DrawerPortal,\n DrawerOverlay,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n};\n","'use client';\n\nimport type { JSX } from 'react';\nimport { useCallback, useEffect, useState } from 'react';\nimport type { Dispatch, ReactNode, SetStateAction } from 'react';\nimport { X as CloseIcon } from 'lucide-react';\nimport { Button } from '../primitives/button';\nimport { Drawer, DrawerContent, DrawerDescription, DrawerHeader, DrawerTitle } from '../primitives/drawer';\nimport { Separator } from '../primitives/separator';\nimport { Skeleton } from '../primitives/skeleton';\n\ntype Props = {\n actions: ReactNode;\n beforeClose?: () => boolean;\n children: ReactNode;\n depth: number; // how many drawers are open, to control the width of the drawers\n isFocused: boolean; // whether the drawer is the last one open\n onFormChange?: Dispatch<SetStateAction<boolean>>; // a callback executed everyt time the form changes its state\n onClose: () => void;\n title: string;\n};\n\nexport default function DrawerModal({\n actions,\n beforeClose,\n children,\n depth,\n isFocused,\n onFormChange: _onFormChange,\n onClose,\n title,\n}: Props): JSX.Element {\n const [isOpen, setIsOpen] = useState(false);\n const gutter = depth * (50 / depth);\n\n const handleClose = useCallback(() => {\n const shouldClose = beforeClose ? beforeClose() : true;\n\n if (!shouldClose) return;\n\n setIsOpen(false);\n setTimeout(() => {\n onClose();\n }, 150);\n }, [beforeClose, onClose, setIsOpen]);\n\n const onEscapeKeyPressed = useCallback(\n (event: KeyboardEvent): void => {\n if (event.key === 'Escape' && isFocused) {\n handleClose();\n }\n },\n [handleClose, isFocused]\n );\n\n useEffect(() => {\n setIsOpen(true);\n // overwrite \"background: black\" set by Vaul in the body, and add missing bottom: 0 style\n globalThis.document.body.classList.add('fk-drawer-fix');\n }, []);\n\n useEffect(() => {\n globalThis.document.addEventListener('keydown', onEscapeKeyPressed, false);\n\n return () => {\n globalThis.document.removeEventListener('keydown', onEscapeKeyPressed, false);\n };\n }, [onEscapeKeyPressed]);\n\n return (\n <Drawer\n direction=\"right\"\n dismissible={false}\n onClose={() => {\n handleClose();\n }}\n open={isOpen}\n >\n <DrawerContent style={isFocused ? {} : { maxWidth: `calc(100% - ${gutter.toString()}px)` }}>\n <DrawerHeader className=\"fk:px-10\">\n <DrawerTitle className=\"fk:w-full\">\n {title ? title : <Skeleton className=\"fk:h-5 fk:w-[120px]\" />}\n </DrawerTitle>\n <DrawerDescription className=\"fk:sr-only\">{title ? title : 'Loading form'}</DrawerDescription>\n {actions}\n <Button className=\"\" onClick={handleClose} size=\"icon\" variant=\"ghost\">\n <CloseIcon className=\"fk:h-4 fk:w-4\" />\n <span className=\"fk:sr-only\">Close</span>\n </Button>\n </DrawerHeader>\n <Separator />\n <div className=\"fk:min-h-0 fk:px-10 fk:pt-6 fk:h-full fk:overflow-y-auto fk:pb-16\" data-vaul-no-drag>\n {children}\n </div>\n </DrawerContent>\n </Drawer>\n );\n}\n","import * as React from 'react';\nimport { cn } from '../lib/utils';\n\ntype TableProps = Omit<React.ComponentProps<'table'>, 'ref'> & {\n containerClassName?: string;\n ref?: React.Ref<HTMLDivElement>;\n};\n\nfunction Table({ className, containerClassName, onScroll, ref, ...props }: TableProps) {\n return (\n <div\n ref={ref}\n data-slot=\"table-container\"\n className={cn(\n 'fk:relative fk:h-full fk:w-full fk:min-w-0 fk:overflow-auto fk:rounded-t-md fk:border-border fk:border',\n containerClassName\n )}\n onScroll={onScroll}\n >\n <table data-slot=\"table\" className={cn('fk:w-full fk:caption-bottom fk:text-sm', className)} {...props} />\n </div>\n );\n}\n\nfunction TableHeader({ className, ...props }: React.ComponentProps<'thead'>) {\n return <thead data-slot=\"table-header\" className={cn('fk:[&_tr]:border-b fk:bg-muted fk:dark:bg-muted', className)} {...props} />;\n}\n\nfunction TableBody({ className, ...props }: React.ComponentProps<'tbody'>) {\n return <tbody data-slot=\"table-body\" className={cn('fk:[&_tr:last-child]:border-0', className)} {...props} />;\n}\n\nfunction TableFooter({ className, ...props }: React.ComponentProps<'tfoot'>) {\n return (\n <tfoot\n data-slot=\"table-footer\"\n className={cn('fk:border-t fk:bg-muted/50 fk:font-medium fk:[&>tr]:last:border-b-0', className)}\n {...props}\n />\n );\n}\n\nfunction TableRow({ className, ...props }: React.ComponentProps<'tr'>) {\n return (\n <tr\n data-slot=\"table-row\"\n className={cn(\n 'fk:border-b fk:transition-colors fk:hover:bg-muted/50 fk:has-aria-expanded:bg-muted/50 fk:data-[state=selected]:bg-muted',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction TableHead({ className, ...props }: React.ComponentProps<'th'>) {\n return (\n <th\n data-slot=\"table-head\"\n className={cn(\n 'fk:h-10 fk:px-4 fk:text-left fk:align-middle fk:font-medium fk:whitespace-nowrap fk:text-foreground fk:[&:has([role=checkbox])]:pr-0 fk:*:[[role=checkbox]]:translate-y-[2px]',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction TableCell({ className, ...props }: React.ComponentProps<'td'>) {\n return (\n <td\n data-slot=\"table-cell\"\n className={cn(\n 'fk:px-4 fk:py-1 fk:align-middle fk:whitespace-nowrap fk:[&:has([role=checkbox])]:pr-0 fk:*:[[role=checkbox]]:translate-y-[2px]',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction TableCaption({ className, ...props }: React.ComponentProps<'caption'>) {\n return (\n <caption\n data-slot=\"table-caption\"\n className={cn('fk:mt-4 fk:text-sm fk:text-muted-foreground', className)}\n {...props}\n />\n );\n}\n\nexport { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption };\n","'use client';\n\nimport { Info } from 'lucide-react';\nimport type { JSX, ReactNode } from 'react';\nimport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '../primitives/tooltip';\n\nexport function InsufficientPermissionsTooltipContent(): JSX.Element {\n return (\n <TooltipContent className=\"fk:max-w-64 fk:p-3\">\n <div className=\"fk:flex fk:gap-2.5\">\n <Info className=\"fk:mt-0.5 fk:h-4 fk:w-4 fk:shrink-0 fk:opacity-70\" />\n <div className=\"fk:flex fk:flex-col fk:gap-1\">\n <p className=\"fk:text-sm fk:font-semibold fk:leading-none\">Insufficient permissions</p>\n <p className=\"fk:text-xs fk:opacity-70 fk:leading-snug\">Your member role cannot perform this action</p>\n </div>\n </div>\n </TooltipContent>\n );\n}\n\n/**\n * Wraps a disabled control so it still shows an \"Insufficient permissions\"\n * tooltip on hover (disabled buttons swallow pointer events, hence the span).\n */\nexport function PermissionTooltip({ disabled, children }: { disabled: boolean; children: ReactNode }): JSX.Element {\n if (!disabled) {\n return <>{children}</>;\n }\n\n return (\n <TooltipProvider>\n <Tooltip>\n <TooltipTrigger asChild>\n <span className=\"fk:inline-flex\">{children}</span>\n </TooltipTrigger>\n <InsufficientPermissionsTooltipContent />\n </Tooltip>\n </TooltipProvider>\n );\n}\n","'use client';\n\nimport { Collapsible as CollapsiblePrimitive } from 'radix-ui';\n\nfunction Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>) {\n return <CollapsiblePrimitive.Root data-slot=\"collapsible\" {...props} />;\n}\n\nfunction CollapsibleTrigger({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>) {\n return <CollapsiblePrimitive.CollapsibleTrigger data-slot=\"collapsible-trigger\" {...props} />;\n}\n\nfunction CollapsibleContent({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>) {\n return <CollapsiblePrimitive.CollapsibleContent data-slot=\"collapsible-content\" {...props} />;\n}\n\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent };\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import'./index.css';import {a as a$1,b as b$2,c,d as d$1,e}from'./chunk-YW2EEXMV.js';import {b as b$1}from'./chunk-WDRCARCP.js';import {defaultStyles,FileIcon}from'react-file-icon';import {useMemo,useState,useEffect}from'react';import {jsx,jsxs}from'react/jsx-runtime';var _=250,N=25e5,a=new Map,b=new Map,w=new Set,A=new Map;function d(e){if(A.has(e))return;let t=new Image;t.decoding="async",t.src=e,A.set(e,t);}function g(e){let t=a.get(e);t&&a.set(e,{...t,lastUsedAt:Date.now()});}function I(){if(a.size<=_)return;let e=Array.from(a.entries()).sort((n,s)=>n[1].lastUsedAt-s[1].lastUsedAt),t=Math.max(1,Math.ceil(_*.1));for(let n=0;n<t&&n<e.length;n+=1){let[s,r]=e[n];a.delete(s),URL.revokeObjectURL(r.objectUrl);}}async function j(e){if(w.has(e)){d(e);return}if(a.has(e)){g(e);return}let t=b.get(e);if(t){await t;return}let n=(async()=>{try{let s=await fetch(e,{mode:"cors",cache:"force-cache"});if(!s.ok){d(e);return}let r=await s.blob();if(r.size>N)return;let i=URL.createObjectURL(r);a.set(e,{objectUrl:i,byteSize:r.size,lastUsedAt:Date.now()}),I();}catch(s){s instanceof TypeError&&w.add(e),d(e);}})();b.set(e,n),await n,b.delete(e);}function U(e){let t=useMemo(()=>{if(!e)return null;let r=a.get(e);return r?(g(e),r.objectUrl):null},[e]),[n,s]=useState(t);return useEffect(()=>{if(!e){s(null);return}if(w.has(e)){d(e),s(null);return}let r=a.get(e);if(r){g(e),s(r.objectUrl);return}s(null);let i=false;return j(e).then(()=>{let f=a.get(e);f&&(i||(g(e),s(f.objectUrl)));}),()=>{i=true;}},[e]),n}var x="fk:bg-[#fafafa] [--asset-checker:#f0f0f0] [background-image:linear-gradient(45deg,var(--asset-checker)_25%,transparent_25%),linear-gradient(-45deg,var(--asset-checker)_25%,transparent_25%),linear-gradient(45deg,transparent_75%,var(--asset-checker)_75%),linear-gradient(-45deg,transparent_75%,var(--asset-checker)_75%)] [background-position:0_0,0_4px,4px_-4px,-4px_0px] [background-size:8px_8px] fk:dark:bg-[#222] dark:[--asset-checker:#2a2a2a]";function G({value:e}){return Array.isArray(e)?jsx(z,{value:e}):jsx(L,{value:e})}function L({value:e$1}){let t=e$1?.path??"",n=!!t,s=n&&/\.(png|jpe?g|gif|webp|avif|svg)$/i.test(t),r=l=>{let[u]=l.split("?"),y=u.split(".");return y.length>1?y.pop().toLowerCase():"file"},i=n?t.endsWith(".svg")?`${b$1}${t}`:`${b$1}${t}?w=84&h=84&f=webp`:null,f=n?t.endsWith(".svg")?`${b$1}${t}`:`${b$1}${t}?w=624&h=624&f=webp`:"",C=U(i);return n?jsx("div",{className:"fk:z-10",children:jsx(a$1,{children:s?jsxs(b$2,{children:[jsx(c,{asChild:true,children:jsx("img",{alt:"asset",className:`fk:w-7 fk:h-7 fk:cursor-zoom-in fk:overflow-hidden fk:rounded-md fk:object-contain ${x}`,decoding:"async",src:C??void 0})}),jsx(d$1,{children:jsx(e,{children:jsx("img",{alt:"asset",className:`fk:w-52 fk:h-52 fk:overflow-hidden fk:rounded-md fk:object-contain ${x}`,decoding:"async",src:f})})})]}):jsxs(b$2,{children:[jsx(c,{asChild:true,children:jsx("div",{className:"fk:w-7 fk:h-7 fk:rounded-sm fk:bg-transparent fk:flex fk:items-center fk:justify-center fk:[&>svg]:h-full fk:[&>svg]:w-auto",children:(()=>{let l=r(t),u=defaultStyles[l];return jsx(FileIcon,{extension:l,...u||{}})})()})}),jsx(d$1,{children:jsx(e,{children:jsx("div",{className:"fk:text-sm fk:text-muted-foreground",children:"Preview not available"})})})]})})}):null}function z({value:e}){let t=e.filter(r=>!!r.path).slice(0,3),n=Math.max(e[0]?.totalCount??0,e.length);if(t.length===0)return n>0?jsx("div",{className:"fk:flex fk:items-center",children:jsx("span",{className:"fk:text-xs fk:text-muted-foreground",children:n===1?"1 asset":`${n} assets`})}):null;let s=n-t.length;return jsxs("div",{className:"fk:flex fk:items-center",children:[jsx("div",{className:"fk:flex fk:-space-x-2",children:t.map(r=>jsx("img",{alt:"asset",className:`fk:h-7 fk:w-7 fk:overflow-hidden fk:rounded-md fk:object-contain ${x}`,decoding:"async",src:`${b$1}${r.path}?w=84&h=84&f=webp`},r._id))}),s>0?jsxs("span",{className:"fk:ml-2 fk:text-xs fk:text-muted-foreground",children:["+",s]}):null]})}export{G as a};//# sourceMappingURL=chunk-N52AF6GE.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-N52AF6GE.js.map
|