@flexkit/studio 0.0.30 → 0.0.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/asset-ZVPFS73O.js +2 -0
- package/dist/{asset-TS7J5GA5.js.map → asset-ZVPFS73O.js.map} +1 -1
- package/dist/astro.d.ts +5 -3
- package/dist/astro.js +8 -3
- package/dist/chunk-5FHCSAK2.js +2 -0
- package/dist/chunk-5FHCSAK2.js.map +1 -0
- package/dist/{chunk-R7N3MDOP.js → chunk-AEBTHXEP.js} +2 -2
- package/dist/{chunk-R7N3MDOP.js.map → chunk-AEBTHXEP.js.map} +1 -1
- package/dist/{chunk-W3TUEJJL.js → chunk-CCI3FGPF.js} +2 -2
- package/dist/{chunk-W3TUEJJL.js.map → chunk-CCI3FGPF.js.map} +1 -1
- package/dist/chunk-D62TAYLI.js +2 -0
- package/dist/chunk-D62TAYLI.js.map +1 -0
- package/dist/{chunk-UKLE7J3K.js → chunk-E7G46743.js} +139 -16
- package/dist/chunk-F2ILIHAU.js +2 -0
- package/dist/chunk-F2ILIHAU.js.map +1 -0
- package/dist/{chunk-EOCJR5EY.js → chunk-FPH4YETF.js} +2 -2
- package/dist/{chunk-EOCJR5EY.js.map → chunk-FPH4YETF.js.map} +1 -1
- package/dist/chunk-GFDWGYUR.js +2 -0
- package/dist/chunk-GFDWGYUR.js.map +1 -0
- package/dist/{chunk-CPUC4QXH.js → chunk-JAARDXQZ.js} +2 -2
- package/dist/{chunk-CPUC4QXH.js.map → chunk-JAARDXQZ.js.map} +1 -1
- package/dist/{chunk-IXO2LU47.js → chunk-JCHD4EGB.js} +2 -2
- package/dist/{chunk-IXO2LU47.js.map → chunk-JCHD4EGB.js.map} +1 -1
- package/dist/chunk-KHPTVIYT.js +2 -0
- package/dist/chunk-KHPTVIYT.js.map +1 -0
- package/dist/{chunk-DWK4NNLB.js → chunk-LKBCPAXQ.js} +2 -2
- package/dist/{chunk-DWK4NNLB.js.map → chunk-LKBCPAXQ.js.map} +1 -1
- package/dist/chunk-MGXHZDFZ.js +2 -0
- package/dist/chunk-MGXHZDFZ.js.map +1 -0
- package/dist/chunk-N2T6MKPV.js +2 -0
- package/dist/chunk-N2T6MKPV.js.map +1 -0
- package/dist/chunk-PXB5QSHN.js +2 -0
- package/dist/chunk-PXB5QSHN.js.map +1 -0
- package/dist/chunk-QSROLDUU.js +2 -0
- package/dist/chunk-QSROLDUU.js.map +1 -0
- package/dist/chunk-VHNQDP7Q.js +616 -0
- package/dist/chunk-VUAFNQK7.js +2 -0
- package/dist/chunk-VUAFNQK7.js.map +1 -0
- package/dist/chunk-XFY7MZJN.js +2 -0
- package/dist/chunk-XFY7MZJN.js.map +1 -0
- package/dist/{core-handler-XAVVKLhV.d.ts → core-handler-C3xC98bN.d.ts} +3 -0
- package/dist/datetime-DDEWTNLB.js +2 -0
- package/dist/{datetime-NQTYGZIC.js.map → datetime-DDEWTNLB.js.map} +1 -1
- package/dist/editor-HAYTKNMY.js +2 -0
- package/dist/{editor-YIRZQR3D.js.map → editor-HAYTKNMY.js.map} +1 -1
- package/dist/index.css +163 -44
- package/dist/index.d.ts +22 -21
- package/dist/index.js +157 -210
- package/dist/index.js.map +1 -1
- package/dist/logo-B6ZKLGM7.js +3 -0
- package/dist/logo-B6ZKLGM7.js.map +1 -0
- package/dist/nextjs.d.ts +40 -12
- package/dist/nextjs.js +8 -3
- package/dist/search-X5V3YOTZ.js +2 -0
- package/dist/search-X5V3YOTZ.js.map +1 -0
- package/dist/select-H3JHOCWR.js +2 -0
- package/dist/{select-A6I27JQU.js.map → select-H3JHOCWR.js.map} +1 -1
- package/dist/switch-TACKLQJH.js +2 -0
- package/dist/{switch-AFZGXSR3.js.map → switch-TACKLQJH.js.map} +1 -1
- package/dist/tanstack-start.d.ts +6 -4
- package/dist/tanstack-start.js +17 -12
- package/dist/text-M3DRK7LU.js +2 -0
- package/dist/{text-2RL2L5FT.js.map → text-M3DRK7LU.js.map} +1 -1
- package/dist/text-SQXG7XJT.js +2 -0
- package/dist/{text-6F4QTCNT.js.map → text-SQXG7XJT.js.map} +1 -1
- package/dist/textarea-YF4K2VBM.js +2 -0
- package/dist/{textarea-2A4TLWZS.js.map → textarea-YF4K2VBM.js.map} +1 -1
- package/dist/tools.d.ts +78 -0
- package/dist/tools.js +60 -0
- package/dist/types-U28Ppixq.d.ts +56 -0
- package/dist/{types.d-CX3kDxFZ.d.ts → types.d-710RgZFw.d.ts} +85 -7
- package/dist/ui.d.ts +21 -5
- package/dist/ui.js +5 -5
- package/dist/ui.js.map +1 -1
- package/dist/{user-nav-4JKIFZLB.js → user-nav-XVY7JTX6.js} +2 -2
- package/dist/{user-nav-4JKIFZLB.js.map → user-nav-XVY7JTX6.js.map} +1 -1
- package/package.json +7 -3
- package/dist/asset-TS7J5GA5.js +0 -2
- package/dist/chunk-73RMWG53.js +0 -2
- package/dist/chunk-73RMWG53.js.map +0 -1
- package/dist/chunk-HAQICAOQ.js +0 -2
- package/dist/chunk-HAQICAOQ.js.map +0 -1
- package/dist/chunk-LL2Z4TD3.js +0 -2
- package/dist/chunk-LL2Z4TD3.js.map +0 -1
- package/dist/chunk-MC6VZLKC.js +0 -2
- package/dist/chunk-MC6VZLKC.js.map +0 -1
- package/dist/chunk-N52AF6GE.js +0 -2
- package/dist/chunk-N52AF6GE.js.map +0 -1
- package/dist/chunk-V6R4AWQS.js +0 -2
- package/dist/chunk-V6R4AWQS.js.map +0 -1
- package/dist/chunk-WXMCINGZ.js +0 -2
- package/dist/chunk-WXMCINGZ.js.map +0 -1
- package/dist/chunk-WZ533Y4O.js +0 -2
- package/dist/chunk-WZ533Y4O.js.map +0 -1
- package/dist/chunk-YA4ACPM5.js +0 -2
- package/dist/chunk-YA4ACPM5.js.map +0 -1
- package/dist/chunk-ZEZ6TRCO.js +0 -2
- package/dist/chunk-ZEZ6TRCO.js.map +0 -1
- package/dist/datetime-NQTYGZIC.js +0 -2
- package/dist/editor-YIRZQR3D.js +0 -2
- package/dist/logo-GCKKZP62.js +0 -3
- package/dist/logo-GCKKZP62.js.map +0 -1
- package/dist/search-UFFZBRQV.js +0 -2
- package/dist/search-UFFZBRQV.js.map +0 -1
- package/dist/select-A6I27JQU.js +0 -2
- package/dist/switch-AFZGXSR3.js +0 -2
- package/dist/text-2RL2L5FT.js +0 -2
- package/dist/text-6F4QTCNT.js +0 -2
- package/dist/textarea-2A4TLWZS.js +0 -2
|
@@ -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,YA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A,CAAA,CACC,WAAA,CAAU,wBAAA,CACV,SAAA,CAAWa,CAAAA,CAAG,mEAAA,CAAqEF,CAAS,CAAA,CAC3F,GAAGL,CAAAA,CACN,CAEJ,CAEA,SAASsB,GAAgB,CAAE,GAAGtB,CAAM,CAAA,CAA2D,CAC7F,OAAON,IAACO,YAAAA,CAAsB,GAAA,CAAtB,CAA0B,WAAA,CAAU,mBAAA,CAAqB,GAAGD,EAAO,CAC7E,CAEA,SAASuB,EAAAA,CAAuB,CAC9B,SAAA,CAAAlB,EACA,KAAA,CAAAK,CAAAA,CACA,QAAA,CAAAlD,CAAAA,CACA,GAAGwC,GACL,EAEG,CACD,OACEc,IAAAA,CAACb,YAAAA,CAAsB,UAAA,CAAtB,CACC,YAAU,2BAAA,CACV,YAAA,CAAYS,CAAAA,CACZ,SAAA,CAAWH,CAAAA,CACT,maAAA,CACAF,CACF,CAAA,CACC,GAAGL,GAAAA,CAEH,QAAA,CAAA,CAAAxC,CAAAA,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-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
|
+
{"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,Q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AAuB,CAC9B,SAAA,CAAAlB,EACA,KAAA,CAAAK,CAAAA,CACA,QAAA,CAAAlD,CAAAA,CACA,GAAGwC,GACL,EAEG,CACD,OACEc,IAAAA,CAACb,YAAAA,CAAsB,UAAA,CAAtB,CACC,YAAU,2BAAA,CACV,YAAA,CAAYS,CAAAA,CACZ,SAAA,CAAWH,CAAAA,CACT,maAAA,CACAF,CACF,CAAA,CACC,GAAGL,GAAAA,CAEH,QAAA,CAAA,CAAAxC,CAAAA,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-JCHD4EGB.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=\"fk: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"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import'./index.css';import {b}from'./chunk-EYGOJ2ZN.js';import {a}from'./chunk-O2QMYUPS.js';import {Slot,Separator,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 y=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 G({className:o,variant:t="default",asChild:a$1=false,...f}){let k=a$1?Slot.Root:"span";return jsx(k,{"data-slot":"badge","data-variant":t,className:a(y({variant:t}),o),...f})}function X({className:o,orientation:t="horizontal",decorative:a$1=true,...f}){return jsx(Separator.Root,{"data-slot":"separator",decorative:a$1,orientation:t,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",o),...f})}function u({...o}){return jsx(Dialog.Root,{"data-slot":"dialog",...o})}function W({...o}){return jsx(Dialog.Trigger,{"data-slot":"dialog-trigger",...o})}function S({...o}){return jsx(Dialog.Portal,{"data-slot":"dialog-portal",...o})}function Y({...o}){return jsx(Dialog.Close,{"data-slot":"dialog-close",...o})}function _({className:o,...t}){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),...t})}function g({className:o,children:t,showCloseButton:a$1=true,...f}){return jsxs(S,{"data-slot":"dialog-portal",children:[jsx(_,{}),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:[t,a$1&&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,...t}){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),...t})}function Z({className:o,showCloseButton:t=false,children:a$1,...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:[a$1,t&&jsx(Dialog.Close,{asChild:true,children:jsx(b,{variant:"outline",children:"Close"})})]})}function h({className:o,...t}){return jsx(Dialog.Title,{"data-slot":"dialog-title",className:a("fk:text-lg fk:leading-none fk:font-semibold",o),...t})}function C({className:o,...t}){return jsx(Dialog.Description,{"data-slot":"dialog-description",className:a("fk:text-sm fk:text-muted-foreground",o),...t})}function A({className:o,...t}){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),...t})}function ro({title:o="Command Palette",description:t="Search for a command to run...",children:a$1,className:f,showCloseButton:k=true,...x}){return jsxs(u,{...x,children:[jsxs(v,{className:"fk:sr-only",children:[jsx(h,{children:o}),jsx(C,{children:t})]}),jsx(g,{className:a("fk:overflow-hidden fk:p-0",f),showCloseButton:k,children:jsx(A,{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:a$1})})]})}function io({className:o,...t}){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),...t})]})}function no({className:o,...t}){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),...t})}function fo({...o}){return jsx(Command.Empty,{"data-slot":"command-empty",className:"fk:py-6 fk:text-center fk:text-sm",...o})}function lo({className:o,...t}){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),...t})}function so({className:o,...t}){return jsx(Command.Separator,{"data-slot":"command-separator",className:a("fk:-mx-1 fk:h-px fk:bg-border",o),...t})}function mo({className:o,...t}){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),...t})}function ko({className:o,...t}){return jsx("span",{"data-slot":"command-shortcut",className:a("fk:ml-auto fk:text-xs fk:tracking-widest fk:text-muted-foreground",o),...t})}function vo({className:o,children:t,...a$1}){return jsxs(ScrollArea.Root,{"data-slot":"scroll-area",className:a("fk:relative",o),...a$1,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:t}),jsx(T,{}),jsx(ScrollArea.Corner,{})]})}function T({className:o,orientation:t="vertical",...a$1}){return jsx(ScrollArea.ScrollAreaScrollbar,{"data-slot":"scroll-area-scrollbar",orientation:t,className:a("fk:flex fk:touch-none fk:p-px fk:transition-colors fk:select-none",t==="vertical"&&"fk:h-full fk:w-2.5 fk:border-l fk:border-l-transparent",t==="horizontal"&&"fk:h-2.5 fk:flex-col fk:border-t fk:border-t-transparent",o),...a$1,children:jsx(ScrollArea.ScrollAreaThumb,{"data-slot":"scroll-area-thumb",className:"fk:relative fk:flex-1 fk:rounded-full fk:bg-border"})})}export{y as a,G as b,X as c,u as d,W as e,S as f,Y as g,_ as h,g as i,v as j,Z as k,h as l,C as m,A as n,ro as o,io as p,no as q,fo as r,lo as s,so as t,mo as u,ko as v,vo as w,T as x};//# sourceMappingURL=chunk-KHPTVIYT.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-KHPTVIYT.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/ui/primitives/badge.tsx","../src/ui/primitives/separator.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","Separator","orientation","decorative","SeparatorPrimitive","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"],"mappings":"mTAKMA,CAAAA,CAAgBC,GAAAA,CACpB,8eACA,CACE,QAAA,CAAU,CACR,OAAA,CAAS,CACP,OAAA,CAAS,sEAAA,CACT,SAAA,CAAW,4EAAA,CACX,YACE,0KAAA,CACF,OAAA,CAAS,mGACT,KAAA,CAAO,8DAAA,CACP,KAAM,+DACR,CACF,EACA,eAAA,CAAiB,CACf,QAAS,SACX,CACF,CACF,EAEA,SAASC,EAAM,CACb,SAAA,CAAAC,CAAAA,CACA,OAA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,SAAA,CAAAzC,EAAW,QAAA,CAAAmB,CAAAA,CAAU,GAAGhB,GAAM,CAAA,CAA0D,CAC5G,OACEkB,IAAAA,CAACqB,UAAAA,CAAoB,IAAA,CAApB,CAAyB,WAAA,CAAU,cAAc,SAAA,CAAWnC,CAAAA,CAAG,cAAeP,CAAS,CAAA,CAAI,GAAGG,GAAAA,CAC7F,QAAA,CAAA,CAAAG,GAAAA,CAACoC,UAAAA,CAAoB,QAAA,CAApB,CACC,YAAU,sBAAA,CACV,SAAA,CAAU,0KAET,QAAA,CAAAvB,CAAAA,CACH,EACAb,GAAAA,CAACqC,CAAAA,CAAA,EAAU,CAAA,CACXrC,GAAAA,CAACoC,UAAAA,CAAoB,OAApB,EAA2B,CAAA,CAAA,CAC9B,CAEJ,CAEA,SAASC,EAAU,CACjB,SAAA,CAAA3C,EACA,WAAA,CAAAS,CAAAA,CAAc,WACd,GAAGN,GACL,EAAyE,CACvE,OACEG,IAACoC,UAAAA,CAAoB,mBAAA,CAApB,CACC,WAAA,CAAU,uBAAA,CACV,WAAA,CAAajC,EACb,SAAA,CAAWF,CAAAA,CACT,oEACAE,CAAAA,GAAgB,UAAA,EAAc,yDAC9BA,CAAAA,GAAgB,YAAA,EAAgB,0DAAA,CAChCT,CACF,CAAA,CACC,GAAGG,IAEJ,QAAA,CAAAG,GAAAA,CAACoC,WAAoB,eAAA,CAApB,CACC,YAAU,mBAAA,CACV,SAAA,CAAU,oDAAA,CACZ,CAAA,CACF,CAEJ","file":"chunk-KHPTVIYT.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 { 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 { 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"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import'./index.css';import {d}from'./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import'./index.css';import {d}from'./chunk-5FHCSAK2.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-LKBCPAXQ.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-LKBCPAXQ.js.map
|
|
@@ -1 +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,SAAAC,CAAS,CAAA,CAAIC,GAAU,CACzBC,CAAAA,CAAiBF,EAAS,IAAA,CAAMG,CAAAA,EAAYA,EAAQ,SAAA,GAAcL,CAAS,GAAKE,CAAAA,CAAS,CAAC,EAC1F,CAAE,IAAA,CAAMI,EAAM,SAAA,CAAWC,GAAc,CAAA,CAAIC,CAAAA,CAAOC,IAAST,CAAAA,EAAa,EAAE,EAAE,WAAA,CAAcU,CAAAA,EAC9F,MAAMA,CAAAA,CAAK,CAAE,KAAM,MAAA,CAAQ,WAAA,CAAa,SAAU,CAAC,CAAA,CAChD,KAAMC,CAAAA,EAAQA,CAAAA,CAAI,MAAuB,CAAA,CACzC,IAAA,CAAMC,CAAAA,GAAU,CAAE,GAAGA,CAAAA,CAAM,OAAQA,CAAAA,CAAK,MAAA,EAAU,EAAG,CAAA,CAAE,CAC5D,CAAA,CAGA,OAAO,CAFWL,GAAAA,CAIhB,CACE,KAAAD,CAAAA,CACA,MAAA,CAAQ,SAAY,CAElB,MAAM,KAAA,CAAMG,GAAAA,CAAST,GAAa,EAAE,CAAA,CAAE,OAAOI,CAAAA,EAAgB,QAAA,EAAY,GAAG,CAAA,CAAG,CAC7E,OAAQ,MAAA,CACR,IAAA,CAAM,OACN,WAAA,CAAa,SACf,CAAC,CAAA,CAGD,MAAM,MAAM,qBAAA,CAAuB,CAAE,MAAA,CAAQ,KAAA,CAAO,YAAa,SAAU,CAAC,EAE5E,MAAA,CAAO,QAAA,CAAS,SAClB,CACF,CACF,CACF,CChCA,IAAMS,CAAAA,CAAcC,aAAAA,CAAc,CAChC,IAAA,CACA,CACE,IAAA,CAAM,IAAA,CACN,OAAQ,IAAM,OAAA,CAAQ,SACxB,CACF,CAAC,CAAA,CAEM,SAASC,EAAa,CAAE,QAAA,CAAAC,CAAS,CAAA,CAA+C,CACrF,GAAM,CAACC,CAAAA,CAAWC,CAAI,CAAA,CAAInB,CAAAA,EAAe,CAEzC,OAAOoB,IAACN,CAAAA,CAAY,QAAA,CAAZ,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-
|
|
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,SAAAC,CAAS,CAAA,CAAIC,GAAU,CACzBC,CAAAA,CAAiBF,EAAS,IAAA,CAAMG,CAAAA,EAAYA,EAAQ,SAAA,GAAcL,CAAS,GAAKE,CAAAA,CAAS,CAAC,EAC1F,CAAE,IAAA,CAAMI,EAAM,SAAA,CAAWC,GAAc,CAAA,CAAIC,CAAAA,CAAOC,IAAST,CAAAA,EAAa,EAAE,EAAE,WAAA,CAAcU,CAAAA,EAC9F,MAAMA,CAAAA,CAAK,CAAE,KAAM,MAAA,CAAQ,WAAA,CAAa,SAAU,CAAC,CAAA,CAChD,KAAMC,CAAAA,EAAQA,CAAAA,CAAI,MAAuB,CAAA,CACzC,IAAA,CAAMC,CAAAA,GAAU,CAAE,GAAGA,CAAAA,CAAM,OAAQA,CAAAA,CAAK,MAAA,EAAU,EAAG,CAAA,CAAE,CAC5D,CAAA,CAGA,OAAO,CAFWL,GAAAA,CAIhB,CACE,KAAAD,CAAAA,CACA,MAAA,CAAQ,SAAY,CAElB,MAAM,KAAA,CAAMG,GAAAA,CAAST,GAAa,EAAE,CAAA,CAAE,OAAOI,CAAAA,EAAgB,QAAA,EAAY,GAAG,CAAA,CAAG,CAC7E,OAAQ,MAAA,CACR,IAAA,CAAM,OACN,WAAA,CAAa,SACf,CAAC,CAAA,CAGD,MAAM,MAAM,qBAAA,CAAuB,CAAE,MAAA,CAAQ,KAAA,CAAO,YAAa,SAAU,CAAC,EAE5E,MAAA,CAAO,QAAA,CAAS,SAClB,CACF,CACF,CACF,CChCA,IAAMS,CAAAA,CAAcC,aAAAA,CAAc,CAChC,IAAA,CACA,CACE,IAAA,CAAM,IAAA,CACN,OAAQ,IAAM,OAAA,CAAQ,SACxB,CACF,CAAC,CAAA,CAEM,SAASC,EAAa,CAAE,QAAA,CAAAC,CAAS,CAAA,CAA+C,CACrF,GAAM,CAACC,CAAAA,CAAWC,CAAI,CAAA,CAAInB,CAAAA,EAAe,CAEzC,OAAOoB,IAACN,CAAAA,CAAY,QAAA,CAAZ,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-LKBCPAXQ.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-OEWYLKO7.js';import {a as a$1}from'./chunk-VUAFNQK7.js';import {c,e,f,h,g,i}from'./chunk-FVFRTCEB.js';import {jsx,jsxs}from'react/jsx-runtime';function y({control:v,fieldSchema:k,readOnly:m,setValue:t}){let{name:l,label:b,options:n}=k;function h$1(e,o){t(l,{...o,value:e.currentTarget.value});}function g$1(e,o){t(l,{...o,disabled:e});}return jsx(c,{control:v,name:l,render:({field:e$1})=>jsxs(e,{children:[jsxs("div",{className:"fk:flex",children:[jsxs("div",{className:"fk:full-w fk:grid fk:gap-2",children:[jsx(f,{children:b}),n?.comment?jsx(h,{children:n.comment}):null]}),jsx("div",{className:"fk:h-full fk:self-end fk:ml-auto"})]}),jsx(g,{children:jsx(a,{className:"fk:w-full fk:mt-0.75",disabled:m||e$1.value?.disabled,...e$1,onChange:o=>{h$1(o,e$1.value);},value:e$1.value?.value||""})}),jsx(a$1,{checked:e$1.value?.disabled??false,disabled:m,onChange:o=>{g$1(o,e$1.value);},scope:e$1.value?.scope}),jsx(i,{})]})})}export{y as a};//# sourceMappingURL=chunk-MGXHZDFZ.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-MGXHZDFZ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/form/fields/textarea.tsx"],"names":["Textarea","control","fieldSchema","readOnly","setValue","name","label","options","handleInput","event","previousValue","handleCheckbox","checked","value","jsx","FormField","field","jsxs","FormItem","FormLabel","FormDescription","FormControl","DefaultValueSwitch","FormMessage"],"mappings":"0LAOO,SAASA,EAAS,CAAE,OAAA,CAAAC,CAAAA,CAAS,WAAA,CAAAC,EAAa,QAAA,CAAAC,CAAAA,CAAU,SAAAC,CAAS,CAAA,CAA6C,CAC/G,GAAM,CAAE,IAAA,CAAAC,CAAAA,CAAM,MAAAC,CAAAA,CAAO,OAAA,CAAAC,CAAQ,CAAA,CAAIL,CAAAA,CAEjC,SAASM,GAAAA,CACPC,CAAAA,CACAC,CAAAA,CACM,CACNN,EAASC,CAAAA,CAAM,CACb,GAAGK,CAAAA,CACH,KAAA,CAAOD,EAAM,aAAA,CAAc,KAC7B,CAAC,EACH,CAEA,SAASE,GAAAA,CAAeC,EAAkBC,CAAAA,CAAyC,CACjFT,EAASC,CAAAA,CAAM,CACb,GAAGQ,CAAAA,CACH,SAAUD,CACZ,CAAC,EACH,CAEA,OACEE,IAACC,CAAAA,CAAA,CACC,OAAA,CAASd,CAAAA,CACT,KAAMI,CAAAA,CACN,MAAA,CAAQ,CAAC,CAAE,KAAA,CAAAW,GAAM,CAAA,GACfC,IAAAA,CAACC,CAAAA,CAAA,CACC,UAAAD,IAAAA,CAAC,KAAA,CAAA,CAAI,UAAU,SAAA,CACb,QAAA,CAAA,CAAAA,KAAC,KAAA,CAAA,CAAI,SAAA,CAAU,4BAAA,CACb,QAAA,CAAA,CAAAH,IAACK,CAAAA,CAAA,CAAW,SAAAb,CAAAA,CAAM,CAAA,CACjBC,GAAS,OAAA,CAAUO,GAAAA,CAACM,CAAAA,CAAA,CAAiB,SAAAb,CAAAA,CAAQ,OAAA,CAAQ,EAAqB,IAAA,CAAA,CAC7E,CAAA,CACAO,IAAC,KAAA,CAAA,CAAI,SAAA,CAAU,kCAAA,CAEf,CAAA,CAAA,CACF,EACAA,GAAAA,CAACO,CAAAA,CAAA,CACC,QAAA,CAAAP,GAAAA,CAACd,EAAA,CACC,SAAA,CAAU,sBAAA,CACV,QAAA,CAAUG,GAAYa,GAAAA,CAAM,KAAA,EAAO,SAClC,GAAGA,GAAAA,CACJ,SAAWP,CAAAA,EAAU,CACnBD,GAAAA,CAAYC,CAAAA,CAAOO,IAAM,KAAK,EAChC,EACA,KAAA,CAAQA,GAAAA,CAAM,OAAO,KAAA,EAAoB,EAAA,CAC3C,CAAA,CACF,CAAA,CACAF,IAACQ,GAAAA,CAAA,CACC,QAASN,GAAAA,CAAM,KAAA,EAAO,UAAY,KAAA,CAClC,QAAA,CAAUb,CAAAA,CACV,QAAA,CAAWS,GAAY,CACrBD,GAAAA,CAAeC,EAASI,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-MGXHZDFZ.js","sourcesContent":["import type { JSX } from 'react';\nimport type { FormFieldValue } from '../../graphql-client/types';\nimport { FormControl, FormDescription, FormField, FormLabel, FormMessage, FormItem } from '../../ui/primitives/form';\nimport { Textarea as TextareaPrimitive } from '../../ui/primitives/textarea';\nimport type { FormFieldParams } from '../types';\nimport { DefaultValueSwitch } from './default-value-switch';\n\nexport function Textarea({ control, fieldSchema, readOnly, setValue }: FormFieldParams<'textarea'>): JSX.Element {\n const { name, label, options } = fieldSchema;\n\n function handleInput(\n event: React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>,\n previousValue: FormFieldValue | undefined\n ): void {\n setValue(name, {\n ...previousValue,\n value: event.currentTarget.value,\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\">\n <div className=\"fk:full-w fk:grid fk:gap-2\">\n <FormLabel>{label}</FormLabel>\n {options?.comment ? <FormDescription>{options.comment}</FormDescription> : null}\n </div>\n <div className=\"fk:h-full fk:self-end fk:ml-auto\">\n {/* TODO: this should be a slot that can receive user-defined components and system components like Presence and AI Writting Tools */}\n </div>\n </div>\n <FormControl>\n <TextareaPrimitive\n className=\"fk:w-full fk:mt-0.75\"\n disabled={readOnly || field.value?.disabled}\n {...field}\n onChange={(event) => {\n handleInput(event, field.value);\n }}\n value={(field.value?.value as string) || ''}\n />\n </FormControl>\n <DefaultValueSwitch\n checked={field.value?.disabled ?? false}\n disabled={readOnly}\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 {a}from'./chunk-7GBAYC7G.js';import {a as a$1}from'./chunk-VUAFNQK7.js';import {c,e,f,h,g,i}from'./chunk-FVFRTCEB.js';import {useId}from'react';import {jsx,jsxs}from'react/jsx-runtime';function L({control:f$1,fieldSchema:b,readOnly:m,setValue:a$2}){let{name:t,label:h$1,options:l}=b,n=useId();function g$1(e,o){a$2(t,{...o,value:e.currentTarget.value});}function C(e,o){a$2(t,{...o,disabled:e});}return jsx(c,{control:f$1,name:t,render:({field:e$1})=>jsxs(e,{children:[jsx(f,{htmlFor:n,children:h$1}),l?.comment?jsx(h,{children:l.comment}):null,jsx(g,{children:jsx(a,{className:"fk:w-full fk:mt-0.75",disabled:m||e$1.value?.disabled,id:n,...e$1,onChange:o=>{g$1(o,e$1.value);},value:e$1.value?.value||""})}),jsx(a$1,{checked:e$1.value?.disabled??false,disabled:m,onChange:o=>{C(o,e$1.value);},scope:e$1.value?.scope}),jsx(i,{})]})})}export{L as a};//# sourceMappingURL=chunk-N2T6MKPV.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-N2T6MKPV.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/form/fields/text.tsx"],"names":["Text","control","fieldSchema","readOnly","setValue","name","label","options","id","useId","handleInput","event","previousValue","handleCheckbox","checked","value","jsx","FormField","field","jsxs","FormItem","FormLabel","FormDescription","FormControl","Input","DefaultValueSwitch","FormMessage"],"mappings":"oNAQO,SAASA,EAAK,CAAE,OAAA,CAAAC,IAAS,WAAA,CAAAC,CAAAA,CAAa,SAAAC,CAAAA,CAAU,QAAA,CAAAC,GAAS,CAAA,CAAyC,CACvG,GAAM,CAAE,IAAA,CAAAC,CAAAA,CAAM,MAAAC,GAAAA,CAAO,OAAA,CAAAC,CAAQ,CAAA,CAAIL,EAC3BM,CAAAA,CAAKC,KAAAA,GAEX,SAASC,GAAAA,CACPC,EACAC,CAAAA,CACM,CACNR,GAAAA,CAASC,CAAAA,CAAM,CACb,GAAGO,CAAAA,CACH,KAAA,CAAOD,CAAAA,CAAM,cAAc,KAC7B,CAAC,EACH,CAEA,SAASE,CAAAA,CAAeC,CAAAA,CAAkBC,EAAyC,CACjFX,GAAAA,CAASC,EAAM,CACb,GAAGU,CAAAA,CACH,QAAA,CAAUD,CACZ,CAAC,EACH,CAEA,OACEE,GAAAA,CAACC,EAAA,CACC,OAAA,CAAShB,GAAAA,CACT,IAAA,CAAMI,EACN,MAAA,CAAQ,CAAC,CAAE,KAAA,CAAAa,GAAM,IACfC,IAAAA,CAACC,CAAAA,CAAA,CACC,QAAA,CAAA,CAAAJ,IAACK,CAAAA,CAAA,CAAU,OAAA,CAASb,CAAAA,CAAK,SAAAF,GAAAA,CAAM,CAAA,CAC9BC,CAAAA,EAAS,OAAA,CAAUS,IAACM,CAAAA,CAAA,CAAiB,SAAAf,CAAAA,CAAQ,OAAA,CAAQ,EAAqB,IAAA,CAC3ES,GAAAA,CAACO,CAAAA,CAAA,CACC,SAAAP,GAAAA,CAACQ,CAAAA,CAAA,CACC,SAAA,CAAU,uBACV,QAAA,CAAUrB,CAAAA,EAAYe,GAAAA,CAAM,KAAA,EAAO,SACnC,EAAA,CAAIV,CAAAA,CACH,GAAGU,GAAAA,CACJ,QAAA,CAAWP,GAAU,CACnBD,GAAAA,CAAYC,CAAAA,CAAOO,GAAAA,CAAM,KAAK,EAChC,CAAA,CACA,KAAA,CAAQA,GAAAA,CAAM,OAAO,KAAA,EAAoB,EAAA,CAC3C,CAAA,CACF,CAAA,CAEAF,IAACS,GAAAA,CAAA,CACC,QAASP,GAAAA,CAAM,KAAA,EAAO,UAAY,KAAA,CAClC,QAAA,CAAUf,CAAAA,CACV,QAAA,CAAWW,GAAY,CACrBD,CAAAA,CAAeC,EAASI,GAAAA,CAAM,KAAK,EACrC,CAAA,CACA,KAAA,CAAOA,GAAAA,CAAM,KAAA,EAAO,MACtB,CAAA,CACAF,GAAAA,CAACU,EAAA,EAAY,CAAA,CAAA,CACf,EAEJ,CAEJ","file":"chunk-N2T6MKPV.js","sourcesContent":["import { useId } from 'react';\nimport type { JSX } from 'react';\nimport type { FormFieldValue } from '../../graphql-client/types';\nimport { FormControl, FormDescription, FormField, FormLabel, FormMessage, FormItem } from '../../ui/primitives/form';\nimport { Input } from '../../ui/primitives/input';\nimport type { FormFieldParams } from '../types';\nimport { DefaultValueSwitch } from './default-value-switch';\n\nexport function Text({ control, fieldSchema, readOnly, setValue }: FormFieldParams<'text'>): JSX.Element {\n const { name, label, options } = fieldSchema;\n const id = useId();\n\n function handleInput(\n event: React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>,\n previousValue: FormFieldValue | undefined\n ): void {\n setValue(name, {\n ...previousValue,\n value: event.currentTarget.value,\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 <FormLabel htmlFor={id}>{label}</FormLabel>\n {options?.comment ? <FormDescription>{options.comment}</FormDescription> : null}\n <FormControl>\n <Input\n className=\"fk:w-full fk:mt-0.75\"\n disabled={readOnly || field.value?.disabled}\n id={id}\n {...field}\n onChange={(event) => {\n handleInput(event, field.value);\n }}\n value={(field.value?.value as string) || ''}\n />\n </FormControl>\n\n <DefaultValueSwitch\n checked={field.value?.disabled ?? false}\n disabled={readOnly}\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 {e,a as a$1,b as b$2,c as c$1}from'./chunk-YW2EEXMV.js';import {c}from'./chunk-KHPTVIYT.js';import {b,r}from'./chunk-JCHD4EGB.js';import {b as b$1}from'./chunk-EYGOJ2ZN.js';import {a}from'./chunk-O2QMYUPS.js';import {Toggle,ToggleGroup,Tabs,Collapsible}from'radix-ui';import {cva}from'class-variance-authority';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import*as g from'react';import {useState,useCallback,useEffect}from'react';import {Loader2Icon,OctagonXIcon,TriangleAlertIcon,InfoIcon,CircleCheckIcon,X,Info}from'lucide-react';import {Toaster}from'sonner';export{toast as e}from'sonner';import {Drawer}from'vaul';var h=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 wt({className:t,variant:e,size:r,...o}){return jsx(Toggle.Root,{"data-slot":"toggle",className:a(h({variant:e,size:r,className:t})),...o})}var J=g.createContext({size:"default",variant:"default",spacing:0});function Tt({className:t,variant:e,size:r,spacing:o=0,children:i,...n}){return jsx(ToggleGroup.Root,{"data-slot":"toggle-group","data-variant":e,"data-size":r,"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),...n,children:jsx(J.Provider,{value:{variant:e,size:r,spacing:o},children:i})})}function Rt({className:t,children:e,variant:r,size:o,...i}){let n=g.useContext(J);return jsx(ToggleGroup.Item,{"data-slot":"toggle-group-item","data-variant":n.variant||r,"data-size":n.size||o,"data-spacing":n.spacing,className:a(h({variant:n.variant||r,size:n.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),...i,children:e})}var Lt=({richColors:t=true,style:e,...r})=>{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},...r})};var ot=Drawer.Portal;function A({...t}){return jsx(Drawer.Root,{"data-slot":"drawer",...t})}function nt({...t}){return jsx(ot,{...t})}function it({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 B({className:t,children:e,...r}){return jsxs(nt,{children:[jsx(it,{}),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),...r,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 M({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 K({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 W({className:t,...e}){return jsx(Drawer.Description,{"data-slot":"drawer-description",className:a("fk:text-sm fk:text-muted-foreground",t),...e})}function lt({actions:t,beforeClose:e,children:r$1,depth:o,forceClose:i=false,isFocused:n,onFormChange:mt,onClose:D,title:k}){let[Y,z]=useState(false),$=o*(50/o),u=useCallback(()=>{z(false),globalThis.setTimeout(()=>{D();},150);},[D]),m=useCallback(()=>{i||!(!e||e())||u();},[e,u,i]);useEffect(()=>{i&&u();},[u,i]);let w=useCallback(S=>{S.key==="Escape"&&n&&m();},[m,n]);return useEffect(()=>(z(true),globalThis.document.body.classList.add("fk-drawer-fix"),()=>{globalThis.document.body.classList.remove("fk-drawer-fix");}),[]),useEffect(()=>(globalThis.document.addEventListener("keydown",w,false),()=>{globalThis.document.removeEventListener("keydown",w,false);}),[w]),jsx(A,{direction:"right",dismissible:false,onClose:()=>{m();},open:Y,children:jsxs(B,{style:n?{}:{maxWidth:`calc(100% - ${$.toString()}px)`},children:[jsxs(M,{className:"fk:px-10",children:[jsx(K,{className:"fk:w-full",children:k||jsx(r,{className:"fk:h-5 fk:w-[120px]"})}),jsx(W,{className:"fk:sr-only",children:k||"Loading form"}),t,jsxs(b$1,{className:"",onClick:m,size:"icon",variant:"ghost",children:[jsx(X,{className:"fk:h-4 fk:w-4"}),jsx("span",{className:"fk:sr-only",children:"Close"})]})]}),jsx(c,{}),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:r$1})]})})}function Ut({className:t,orientation:e="horizontal",...r}){return jsx(Tabs.Root,{"data-slot":"tabs","data-orientation":e,orientation:e,className:a("fk:group/tabs fk:flex fk:data-[orientation=horizontal]:flex-col",t),...r})}var ct=cva("fk:group/tabs-list fk:inline-flex fk:w-fit fk:items-center fk:justify-center fk:rounded-lg fk:p-[3px] fk:text-muted-foreground fk:group-data-[orientation=horizontal]/tabs:h-9 fk:group-data-[orientation=vertical]/tabs:h-fit fk:group-data-[orientation=vertical]/tabs:flex-col fk:data-[variant=line]:rounded-none",{variants:{variant:{default:"fk:bg-muted",line:"fk:gap-1 fk:bg-transparent"}},defaultVariants:{variant:"default"}});function Zt({className:t,variant:e="default",...r}){return jsx(Tabs.List,{"data-slot":"tabs-list","data-variant":e,className:a(ct({variant:e}),t),...r})}function jt({className:t,type:e="button",...r}){return jsx(Tabs.Trigger,{"data-slot":"tabs-trigger",type:e,className:a("fk:relative fk:inline-flex fk:h-[calc(100%-1px)] fk:flex-1 fk:items-center fk:justify-center fk:gap-1.5 fk:rounded-md fk:border fk:border-transparent! fk:px-4 fk:py-1 fk:text-sm fk:font-medium fk:whitespace-nowrap fk:text-foreground/60 fk:transition-all fk:group-data-[orientation=vertical]/tabs:w-full fk:group-data-[orientation=vertical]/tabs:justify-start fk:hover:text-foreground fk:focus-visible:border-ring! fk:focus-visible:ring-[3px] fk:focus-visible:ring-ring/50 fk:focus-visible:outline-1 fk:focus-visible:outline-ring fk:disabled:pointer-events-none fk:disabled:opacity-50 fk:group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm fk:group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none fk:dark:text-muted-foreground fk:dark:hover:text-foreground fk:[&_svg]:pointer-events-none fk:[&_svg]:shrink-0 fk:[&_svg:not([class*='size-'])]:size-4","fk:group-data-[variant=line]/tabs-list:bg-transparent fk:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent fk:dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent! fk:dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent","fk:data-[state=active]:bg-background fk:data-[state=active]:text-foreground fk:dark:data-[state=active]:border-muted-foreground/75! fk:dark:data-[state=active]:bg-input/30 fk:dark:data-[state=active]:text-foreground","fk:after:absolute fk:after:bg-foreground fk:after:opacity-0 fk:after:transition-opacity fk:group-data-[orientation=horizontal]/tabs:after:inset-x-0 fk:group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] fk:group-data-[orientation=horizontal]/tabs:after:h-0.5 fk:group-data-[orientation=vertical]/tabs:after:inset-y-0 fk:group-data-[orientation=vertical]/tabs:after:-right-1 fk:group-data-[orientation=vertical]/tabs:after:w-0.5 fk:group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100",t),...r})}function te({className:t,...e}){return jsx(Tabs.Content,{"data-slot":"tabs-content",className:a("fk:flex-1 fk:outline-none fk:flex fk:flex-col",t),...e})}function oe({className:t,containerClassName:e,onScroll:r,ref:o,...i}){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:r,children:jsx("table",{"data-slot":"table",className:a("fk:w-full fk:caption-bottom fk:text-sm",t),...i})})}function ne({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 ie({className:t,...e}){return jsx("tbody",{"data-slot":"table-body",className:a("fk:[&_tr:last-child]:border-0",t),...e})}function fe({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 se({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 le({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 de({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 ce({className:t,...e}){return jsx("caption",{"data-slot":"table-caption",className:a("fk:mt-4 fk:pb-2 fk:text-sm fk:text-muted-foreground",t),...e})}function kt(){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 ge({disabled:t,children:e}){return t?jsx(a$1,{children:jsxs(b$2,{children:[jsx(c$1,{asChild:true,children:jsx("span",{className:"fk:inline-flex",children:e})}),jsx(kt,{})]})}):jsx(Fragment,{children:e})}function he({...t}){return jsx(Collapsible.Root,{"data-slot":"collapsible",...t})}function xe({...t}){return jsx(Collapsible.CollapsibleTrigger,{"data-slot":"collapsible-trigger",...t})}function Pe({...t}){return jsx(Collapsible.CollapsibleContent,{"data-slot":"collapsible-content",...t})}export{h as a,wt as b,Tt as c,Rt as d,Lt as f,lt as g,Ut as h,Zt as i,jt as j,te as k,he as l,xe as m,Pe as n,oe as o,ne as p,ie as q,fe as r,se as s,le as t,de as u,ce as v,kt as w,ge as x};//# sourceMappingURL=chunk-PXB5QSHN.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-PXB5QSHN.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/drawer.tsx","../src/ui/components/drawer-modal.tsx","../src/ui/primitives/tabs.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","DrawerPrimitivePortal","DrawerPrimitive","Drawer","DrawerPortal","DrawerOverlay","DrawerContent","jsxs","DrawerHeader","DrawerTitle","DrawerDescription","DrawerModal","actions","beforeClose","depth","forceClose","isFocused","_onFormChange","onClose","title","isOpen","setIsOpen","useState","gutter","closeDrawer","useCallback","handleClose","useEffect","onEscapeKeyPressed","event","Skeleton","Button","CloseIcon","Separator","Tabs","orientation","TabsPrimitive","tabsListVariants","TabsList","TabsTrigger","type","TabsContent","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":"+oBAOMA,CAAAA,CAAiBC,GAAAA,CACrB,0nBAAA,CACA,CACE,SAAU,CACR,OAAA,CAAS,CACP,OAAA,CAAS,oBACT,OAAA,CACE,6GACJ,CAAA,CACA,IAAA,CAAM,CACJ,OAAA,CAAS,2BAAA,CACT,EAAA,CAAI,6BAAA,CACJ,GAAI,+BACN,CACF,EACA,eAAA,CAAiB,CACf,QAAS,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,CACC,QAAA,CAAA,CAAA/E,GAAAA,CAACgF,IAAA,CAAe,OAAA,CAAO,IAAA,CACrB,QAAA,CAAAhF,IAAC,MAAA,CAAA,CAAK,SAAA,CAAU,gBAAA,CAAkB,QAAA,CAAAM,EAAS,CAAA,CAC7C,CAAA,CACAN,GAAAA,CAACyE,EAAAA,CAAA,EAAsC,CAAA,CAAA,CACzC,CAAA,CACF,EAXOzE,GAAAA,CAAAiF,QAAAA,CAAA,CAAG,QAAA,CAAA3E,CAAAA,CAAS,CAavB,CCnCA,SAAS4E,EAAAA,CAAY,CAAE,GAAGnF,CAAM,CAAA,CAA2D,CACzF,OAAOC,GAAAA,CAACmF,YAAqB,IAAA,CAArB,CAA0B,WAAA,CAAU,aAAA,CAAe,GAAGpF,CAAAA,CAAO,CACvE,CAEA,SAASqF,GAAmB,CAAE,GAAGrF,CAAM,CAAA,CAAyE,CAC9G,OAAOC,GAAAA,CAACmF,YAAqB,kBAAA,CAArB,CAAwC,YAAU,qBAAA,CAAuB,GAAGpF,CAAAA,CAAO,CAC7F,CAEA,SAASsF,EAAAA,CAAmB,CAAE,GAAGtF,CAAM,CAAA,CAAyE,CAC9G,OAAOC,GAAAA,CAACmF,YAAqB,kBAAA,CAArB,CAAwC,YAAU,qBAAA,CAAuB,GAAGpF,EAAO,CAC7F","file":"chunk-PXB5QSHN.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 { 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 /**\n * Close the drawer without running `beforeClose` (used after confirming discard).\n * Lets Vaul release its body lock instead of hard-unmounting an open drawer.\n */\n forceClose?: boolean;\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 forceClose = false,\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 closeDrawer = useCallback(() => {\n setIsOpen(false);\n globalThis.setTimeout(() => {\n onClose();\n }, 150);\n }, [onClose]);\n\n const handleClose = useCallback(() => {\n if (forceClose) {\n return;\n }\n\n const shouldClose = beforeClose ? beforeClose() : true;\n\n if (!shouldClose) {\n return;\n }\n\n closeDrawer();\n }, [beforeClose, closeDrawer, forceClose]);\n\n useEffect(() => {\n if (!forceClose) {\n return;\n }\n\n closeDrawer();\n }, [closeDrawer, forceClose]);\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 return () => {\n globalThis.document.body.classList.remove('fk-drawer-fix');\n };\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","'use client';\n\nimport * as React from 'react';\nimport { Tabs as TabsPrimitive } from 'radix-ui';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../lib/utils';\n\nfunction Tabs({ className, orientation = 'horizontal', ...props }: React.ComponentProps<typeof TabsPrimitive.Root>) {\n return (\n <TabsPrimitive.Root\n data-slot=\"tabs\"\n data-orientation={orientation}\n orientation={orientation}\n className={cn('fk:group/tabs fk:flex fk:data-[orientation=horizontal]:flex-col', className)}\n {...props}\n />\n );\n}\n\nconst tabsListVariants = cva(\n 'fk:group/tabs-list fk:inline-flex fk:w-fit fk:items-center fk:justify-center fk:rounded-lg fk:p-[3px] fk:text-muted-foreground fk:group-data-[orientation=horizontal]/tabs:h-9 fk:group-data-[orientation=vertical]/tabs:h-fit fk:group-data-[orientation=vertical]/tabs:flex-col fk:data-[variant=line]:rounded-none',\n {\n variants: {\n variant: {\n default: 'fk:bg-muted',\n line: 'fk:gap-1 fk:bg-transparent',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n }\n);\n\nfunction TabsList({\n className,\n variant = 'default',\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.List> & VariantProps<typeof tabsListVariants>) {\n return (\n <TabsPrimitive.List\n data-slot=\"tabs-list\"\n data-variant={variant}\n className={cn(tabsListVariants({ variant }), className)}\n {...props}\n />\n );\n}\n\nfunction TabsTrigger({\n className,\n type = 'button',\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.Trigger>) {\n return (\n <TabsPrimitive.Trigger\n data-slot=\"tabs-trigger\"\n type={type}\n className={cn(\n \"fk:relative fk:inline-flex fk:h-[calc(100%-1px)] fk:flex-1 fk:items-center fk:justify-center fk:gap-1.5 fk:rounded-md fk:border fk:border-transparent! fk:px-4 fk:py-1 fk:text-sm fk:font-medium fk:whitespace-nowrap fk:text-foreground/60 fk:transition-all fk:group-data-[orientation=vertical]/tabs:w-full fk:group-data-[orientation=vertical]/tabs:justify-start fk:hover:text-foreground fk:focus-visible:border-ring! fk:focus-visible:ring-[3px] fk:focus-visible:ring-ring/50 fk:focus-visible:outline-1 fk:focus-visible:outline-ring fk:disabled:pointer-events-none fk:disabled:opacity-50 fk:group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm fk:group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none fk:dark:text-muted-foreground fk:dark:hover:text-foreground fk:[&_svg]:pointer-events-none fk:[&_svg]:shrink-0 fk:[&_svg:not([class*='size-'])]:size-4\",\n 'fk:group-data-[variant=line]/tabs-list:bg-transparent fk:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent fk:dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent! fk:dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent',\n 'fk:data-[state=active]:bg-background fk:data-[state=active]:text-foreground fk:dark:data-[state=active]:border-muted-foreground/75! fk:dark:data-[state=active]:bg-input/30 fk:dark:data-[state=active]:text-foreground',\n 'fk:after:absolute fk:after:bg-foreground fk:after:opacity-0 fk:after:transition-opacity fk:group-data-[orientation=horizontal]/tabs:after:inset-x-0 fk:group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] fk:group-data-[orientation=horizontal]/tabs:after:h-0.5 fk:group-data-[orientation=vertical]/tabs:after:inset-y-0 fk:group-data-[orientation=vertical]/tabs:after:-right-1 fk:group-data-[orientation=vertical]/tabs:after:w-0.5 fk:group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>) {\n return (\n <TabsPrimitive.Content\n data-slot=\"tabs-content\"\n className={cn('fk:flex-1 fk:outline-none fk:flex fk:flex-col', className)}\n {...props}\n />\n );\n}\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants };\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 (\n <thead\n data-slot=\"table-header\"\n className={cn('fk:[&_tr]:border-b fk:bg-muted fk:dark:bg-muted', className)}\n {...props}\n />\n );\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:pb-2 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 {d}from'./chunk-5FHCSAK2.js';import {c}from'./chunk-WDRCARCP.js';import {createContext,useReducer,useContext,useMemo}from'react';import {jsx}from'react/jsx-runtime';import J from'swr';import {find,propEq}from'ramda';var O="core.context.scope:",b={breadcrumbs:[],isRouteLoading:false,pageTitle:"",scope:"",relationships:{}},x=createContext(b),C=createContext(()=>{});function $(t,e){let{type:o,payload:r}=e;switch(o){case "setScope":return typeof localStorage<"u"&&r.projectId&&localStorage.setItem(`${O}${r.projectId}`,r.scope),{...t,scope:r.scope};case "setRelationship":return {...t,relationships:{...t.relationships,...r}};default:throw Error(`Unknown action: ${o}`)}}function K({children:t}){let[e,o]=useReducer($,b);return jsx(x.Provider,{value:e,children:jsx(C.Provider,{value:o,children:t})})}function I(){return useContext(x)}function V(){return useContext(C)}function E(t){if(t?.attributes.length)return t.display?t.attributes.find(e=>e.name===t.display)??t.attributes[0]:t.attributes[0]}function Q(t,e){let{scope:o}=I(),{projects:r,currentProjectId:u}=d(),{schema:n,scopes:l}=find(propEq(u??"","projectId"))(r),s=l?.find(m=>m.isDefault)?.name??"default",a=e?.commonParams.q?JSON.stringify(e):null,{data:i,error:h,isLoading:p}=J(a,()=>fetch(c(t).search,{headers:{"Content-Type":"application/json"},body:JSON.stringify(e),method:"POST",mode:"cors"}).then(m=>m.json()));return {results:useMemo(()=>L(i?.results??[],t,n,o,s)??[],[i,s,t,n,o]),error:h,isLoading:p}}function L(t,e,o,r,u){return t?.filter(n=>n?.hits?.length>0).map(n=>{let l=n,s=l.collection.replace(`${e}_`,"").replace(/_\d+$/,""),a=find(propEq(s,"plural"))(o);if(!a)return [];let i=E(a)?.name??"",h=a?.name??s;return l.hits.map(({document:p})=>{let c=p[i],w=(c&&typeof c!="string"?c[r]??c[u]:null)??p[i],D=Object.entries(p).reduce((y,[d,f])=>{if(d!==i&&d!=="id"&&d!=="_updatedAt"){let T=typeof f!="string"?f[r]??f[u]:f;y[d]=T;}return y},{});return {_id:p.id,_entityName:h,_entityNamePlural:s,[i]:w,...D}})}).flat()}export{O as a,K as b,I as c,V as d,E as e,Q as f};//# sourceMappingURL=chunk-QSROLDUU.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-QSROLDUU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/app-context.tsx","../src/core/get-display-attribute.ts","../src/core/use-search.tsx"],"names":["SCOPE_STORAGE_KEY","initialState","AppContext","createContext","AppDispatchContext","reducer","state","action","type","payload","AppProvider","children","dispatch","useReducer","jsx","useAppContext","useContext","useAppDispatch","getDisplayAttribute","entity","attr","useSearch","projectId","searchRequest","scope","projects","currentProjectId","useConfig","schema","scopes","find","propEq","defaultScope","s","swrKey","data","error","isLoading","useSWR","apiPaths","res","useMemo","mapResults","results","result","item","entityNamePlural","entitySchema","primaryAttributeName","entityName","document","primaryAttribute","primaryAttributeValue","attributes","acc","key","value","scopedValue"],"mappings":"mPAMO,IAAMA,CAAAA,CAAoB,qBAAA,CAE3BC,EAAe,CACnB,WAAA,CAAa,EAAC,CACd,cAAA,CAAgB,KAAA,CAChB,SAAA,CAAW,EAAA,CACX,KAAA,CAAO,EAAA,CACP,aAAA,CAAe,EACjB,CAAA,CAEMC,EAAaC,aAAAA,CAA8BF,CAAY,CAAA,CAEvDG,CAAAA,CAAqBD,aAAAA,CAAgE,IAAM,CAEjG,CAAC,EAED,SAASE,CAAAA,CAAQC,CAAAA,CAAuBC,CAAAA,CAAgE,CACtG,GAAM,CAAE,IAAA,CAAAC,CAAAA,CAAM,OAAA,CAAAC,CAAQ,CAAA,CAAIF,CAAAA,CAE1B,OAAQC,CAAAA,EACN,KAAK,UAAA,CACH,OAAI,OAAO,aAAiB,GAAA,EAAeC,CAAAA,CAAQ,SAAA,EACjD,YAAA,CAAa,OAAA,CAAQ,CAAA,EAAGT,CAAiB,CAAA,EAAGS,CAAAA,CAAQ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A,GAAQ,YAAA,CAAc,CACxE,IAAME,CAAAA,CAAc,OAAOD,CAAAA,EAAU,QAAA,CAAYA,CAAAA,CAAMhC,CAAK,CAAA,EAAKgC,CAAAA,CAAMxB,CAAY,CAAA,CAAKwB,CAAAA,CAExFF,CAAAA,CAAIC,CAAG,CAAA,CAAIE,EACb,CAEA,OAAOH,CACT,CAAA,CACA,EACF,CAAA,CAEA,OAAO,CACL,GAAA,CAAKJ,CAAAA,CAAS,EAAA,CACd,WAAA,CAAaD,CAAAA,CACb,iBAAA,CAAmBH,CAAAA,CACnB,CAACE,CAAoB,EAAGI,CAAAA,CACxB,GAAGC,CACL,CACF,CAAC,CACH,CAAC,CAAA,CACA,IAAA,EACL","file":"chunk-QSROLDUU.js","sourcesContent":["'use client';\n\nimport { createContext, useContext, useReducer } from 'react';\nimport type { Dispatch, JSX, ReactNode } from 'react';\nimport type { ActionSetRelationship, ActionSetScope, AppContextType } from './types';\n\nexport const SCOPE_STORAGE_KEY = 'core.context.scope:';\n\nconst initialState = {\n breadcrumbs: [],\n isRouteLoading: false,\n pageTitle: '',\n scope: '',\n relationships: {},\n};\n\nconst AppContext = createContext<AppContextType>(initialState);\n\nconst AppDispatchContext = createContext<Dispatch<ActionSetRelationship | ActionSetScope>>(() => {\n /* void */\n});\n\nfunction reducer(state: AppContextType, action: ActionSetRelationship | ActionSetScope): AppContextType {\n const { type, payload } = action;\n\n switch (type) {\n case 'setScope':\n if (typeof localStorage !== 'undefined' && payload.projectId) {\n localStorage.setItem(`${SCOPE_STORAGE_KEY}${payload.projectId}`, payload.scope);\n }\n\n return {\n ...state,\n scope: payload.scope,\n };\n case 'setRelationship':\n return {\n ...state,\n relationships: { ...state.relationships, ...payload },\n };\n default:\n throw Error(`Unknown action: ${type as string}`);\n }\n}\n\nexport function AppProvider({ children }: { children: ReactNode }): JSX.Element {\n const [state, dispatch] = useReducer(reducer, initialState);\n\n return (\n <AppContext.Provider value={state}>\n <AppDispatchContext.Provider value={dispatch}>{children}</AppDispatchContext.Provider>\n </AppContext.Provider>\n );\n}\n\nexport function useAppContext(): AppContextType {\n return useContext(AppContext);\n}\n\nexport function useAppDispatch(): Dispatch<ActionSetRelationship | ActionSetScope> {\n return useContext(AppDispatchContext);\n}\n","import type { Attribute, Entity } from './types';\n\n/**\n * Resolve the attribute used as the entity's human-readable label.\n * Uses `entity.display` when it matches an attribute name; otherwise the first attribute.\n * The effective display attribute must not be space-bound (enforced at define/deploy time).\n */\nexport function getDisplayAttribute(entity: Entity | undefined): Attribute | undefined {\n if (!entity?.attributes.length) {\n return undefined;\n }\n\n if (entity.display) {\n return entity.attributes.find((attr) => attr.name === entity.display) ?? entity.attributes[0];\n }\n\n return entity.attributes[0];\n}\n","'use client';\n\nimport { useMemo } from 'react';\nimport useSWR from 'swr';\nimport { find, propEq } from 'ramda';\nimport { apiPaths } from './api-paths';\nimport { useAppContext } from './app-context';\nimport { useConfig } from './config/config-context';\nimport type { SingleProject } from './config/types';\nimport { getDisplayAttribute } from './get-display-attribute';\nimport type { Entity, RawResultItem, RawSearchResultItems, SearchRequestProps, SearchResultItem } from './types';\n\nexport function useSearch(\n projectId: string,\n searchRequest: SearchRequestProps | null\n): { results: SearchResultItem[] | []; error: Error; isLoading: boolean } {\n const { scope } = useAppContext();\n const { projects, currentProjectId } = useConfig();\n const { schema, scopes } = find(propEq(currentProjectId ?? '', 'projectId'))(projects) as SingleProject;\n const defaultScope = scopes?.find((s) => s.isDefault)?.name ?? 'default';\n const swrKey = searchRequest?.commonParams.q ? JSON.stringify(searchRequest) : null;\n const { data, error, isLoading } = useSWR(swrKey, () =>\n fetch(apiPaths(projectId).search, {\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify(searchRequest),\n method: 'POST',\n mode: 'cors',\n }).then((res) => res.json() as Promise<{ results: RawSearchResultItems }>)\n );\n const results = useMemo(\n () => mapResults(data?.results ?? [], projectId, schema, scope, defaultScope) ?? [],\n [data, defaultScope, projectId, schema, scope]\n );\n\n return { results, error, isLoading };\n}\n\nfunction mapResults(\n results: RawSearchResultItems | undefined,\n projectId: string,\n schema: Entity[],\n scope: string,\n defaultScope: string\n): SearchResultItem[] | undefined {\n return results\n ?.filter((result) => (result as RawResultItem)?.hits?.length > 0)\n .map((result) => {\n const item = result as RawResultItem;\n const entityNamePlural = item.collection.replace(`${projectId}_`, '').replace(/_\\d+$/, '');\n const entitySchema = find<Entity>(propEq(entityNamePlural, 'plural'))(schema);\n\n if (!entitySchema) {\n return [];\n }\n\n const primaryAttributeName = getDisplayAttribute(entitySchema)?.name ?? '';\n const entityName = entitySchema?.name ?? entityNamePlural;\n\n // iterate over the hits and return an object with the primary attribute value first and then the rest of the attributes.\n return item.hits.map(({ document }) => {\n const primaryAttribute = document[primaryAttributeName];\n const scopedPrimaryAttribute =\n primaryAttribute && typeof primaryAttribute !== 'string'\n ? (primaryAttribute[scope] ?? primaryAttribute[defaultScope])\n : null;\n const primaryAttributeValue = scopedPrimaryAttribute ?? document[primaryAttributeName];\n const attributes = Object.entries(document).reduce(\n (acc: Omit<SearchResultItem, '_id' | '_entityName' | '_entityNamePlural'>, [key, value]) => {\n if (key !== primaryAttributeName && key !== 'id' && key !== '_updatedAt') {\n const scopedValue = typeof value !== 'string' ? (value[scope] ?? value[defaultScope]) : value;\n\n acc[key] = scopedValue;\n }\n\n return acc;\n },\n {}\n );\n\n return {\n _id: document.id,\n _entityName: entityName,\n _entityNamePlural: entityNamePlural,\n [primaryAttributeName]: primaryAttributeValue as string,\n ...attributes,\n };\n });\n })\n .flat();\n}\n"]}
|