@cryptlex/web-components 1.6.3 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/data-table/column-picker.es.js +3 -2
- package/dist/components/data-table/column-picker.es.js.map +1 -1
- package/dist/components/data-table/data-table.es.js +37 -36
- package/dist/components/data-table/data-table.es.js.map +1 -1
- package/dist/components/data-table/page-size.es.js.map +1 -1
- package/dist/components/data-table/table-actions.es.js +3 -2
- package/dist/components/data-table/table-actions.es.js.map +1 -1
- package/dist/components/data-table/table-filter.es.js.map +1 -1
- package/dist/components/key-value-card/key-value-card.es.js +6 -5
- package/dist/components/key-value-card/key-value-card.es.js.map +1 -1
- package/dist/components/sidebar/app-layout.es.js +3 -2
- package/dist/components/sidebar/app-layout.es.js.map +1 -1
- package/dist/components/sidebar/breadcrumb.es.js +3 -2
- package/dist/components/sidebar/breadcrumb.es.js.map +1 -1
- package/dist/components/static-data-table/static-data-table.es.js +30 -0
- package/dist/components/static-data-table/static-data-table.es.js.map +1 -0
- package/dist/components/ui/accordion.es.js +4 -4
- package/dist/components/ui/accordion.es.js.map +1 -1
- package/dist/components/ui/badge.es.js +3 -3
- package/dist/components/ui/badge.es.js.map +1 -1
- package/dist/components/ui/breadcrumb.es.js +1 -1
- package/dist/components/ui/breadcrumb.es.js.map +1 -1
- package/dist/components/ui/button.es.js +19 -19
- package/dist/components/ui/button.es.js.map +1 -1
- package/dist/components/ui/calendar.es.js +2 -2
- package/dist/components/ui/calendar.es.js.map +1 -1
- package/dist/components/ui/command.es.js +12 -12
- package/dist/components/ui/command.es.js.map +1 -1
- package/dist/components/ui/copy-button.es.js +3 -2
- package/dist/components/ui/copy-button.es.js.map +1 -1
- package/dist/components/ui/dialog.es.js +8 -8
- package/dist/components/ui/dialog.es.js.map +1 -1
- package/dist/components/ui/drawer.es.js +4 -4
- package/dist/components/ui/drawer.es.js.map +1 -1
- package/dist/components/ui/dropdown-menu.es.js +3 -3
- package/dist/components/ui/dropdown-menu.es.js.map +1 -1
- package/dist/components/ui/input-otp.es.js +1 -1
- package/dist/components/ui/input-otp.es.js.map +1 -1
- package/dist/components/ui/input.es.js +23 -18
- package/dist/components/ui/input.es.js.map +1 -1
- package/dist/components/ui/label.es.js +4 -4
- package/dist/components/ui/label.es.js.map +1 -1
- package/dist/components/ui/mutli-select.es.js +1 -0
- package/dist/components/ui/mutli-select.es.js.map +1 -1
- package/dist/components/ui/navigation-menu.es.js +2 -2
- package/dist/components/ui/navigation-menu.es.js.map +1 -1
- package/dist/components/ui/pagination.es.js.map +1 -1
- package/dist/components/ui/password-input.es.js +12 -21
- package/dist/components/ui/password-input.es.js.map +1 -1
- package/dist/components/ui/search-input.es.js +24 -36
- package/dist/components/ui/search-input.es.js.map +1 -1
- package/dist/components/ui/select.es.js +1 -1
- package/dist/components/ui/select.es.js.map +1 -1
- package/dist/components/ui/sheet.es.js +17 -17
- package/dist/components/ui/sheet.es.js.map +1 -1
- package/dist/components/ui/sidebar.es.js +10 -10
- package/dist/components/ui/sidebar.es.js.map +1 -1
- package/dist/components/ui/tabs.es.js +5 -5
- package/dist/components/ui/tabs.es.js.map +1 -1
- package/dist/components/ui/textarea.es.js +19 -0
- package/dist/components/ui/textarea.es.js.map +1 -0
- package/dist/index.es.d.ts +8 -4
- package/dist/index.es.js +80 -78
- package/dist/index.es.js.map +1 -1
- package/lib/index.css +3 -55
- package/package.json +3 -3
- package/dist/components/static-data-table/data-table.es.js +0 -30
- package/dist/components/static-data-table/data-table.es.js.map +0 -1
- package/lib/tailwind.preset.css +0 -234
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.es.js","sources":["../../../lib/components/ui/drawer.tsx"],"sourcesContent":["'use client';\nimport * as React from 'react';\nimport { Drawer as DrawerPrimitive } from 'vaul';\n\nimport { cn } from '@/utils';\n\nconst Drawer = ({\n shouldScaleBackground = true,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Root>) => (\n <DrawerPrimitive.Root shouldScaleBackground={shouldScaleBackground} {...props} />\n);\nDrawer.displayName = 'Drawer';\n\nconst DrawerTrigger = DrawerPrimitive.Trigger;\n\nconst DrawerPortal: React.FC<React.ComponentProps<typeof DrawerPrimitive.Portal>> =\n DrawerPrimitive.Portal;\n\nconst DrawerClose = DrawerPrimitive.Close;\n\nconst DrawerOverlay = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Overlay\n ref={ref}\n className={cn('fixed inset-0 z-50 bg-background/80', className)}\n {...props}\n />\n));\nDrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName;\n\nconst DrawerContent = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DrawerPortal>\n <DrawerOverlay />\n <DrawerPrimitive.Content\n ref={ref}\n style={{ userSelect: 'text' }}\n className={cn(\n 'fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background',\n className,\n )}\n {...props}\n >\n {children}\n </DrawerPrimitive.Content>\n </DrawerPortal>\n));\nDrawerContent.displayName = 'DrawerContent';\n\nconst DrawerHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('grid gap-1.5 p-4 text-center sm:text-left', className)} {...props} />\n);\nDrawerHeader.displayName = 'DrawerHeader';\n\nconst DrawerFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('mt-auto flex flex-col gap-2 p-4', className)} {...props} />\n);\nDrawerFooter.displayName = 'DrawerFooter';\n\nconst DrawerTitle = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Title ref={ref} className={cn('h3', className)} {...props} />\n));\nDrawerTitle.displayName = DrawerPrimitive.Title.displayName;\n\nconst DrawerDescription = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Description\n ref={ref}\n className={cn('
|
|
1
|
+
{"version":3,"file":"drawer.es.js","sources":["../../../lib/components/ui/drawer.tsx"],"sourcesContent":["'use client';\nimport * as React from 'react';\nimport { Drawer as DrawerPrimitive } from 'vaul';\n\nimport { cn } from '@/utils';\n\nconst Drawer = ({\n shouldScaleBackground = true,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Root>) => (\n <DrawerPrimitive.Root shouldScaleBackground={shouldScaleBackground} {...props} />\n);\nDrawer.displayName = 'Drawer';\n\nconst DrawerTrigger = DrawerPrimitive.Trigger;\n\nconst DrawerPortal: React.FC<React.ComponentProps<typeof DrawerPrimitive.Portal>> =\n DrawerPrimitive.Portal;\n\nconst DrawerClose = DrawerPrimitive.Close;\n\nconst DrawerOverlay = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Overlay\n ref={ref}\n className={cn('fixed inset-0 z-50 bg-background/80', className)}\n {...props}\n />\n));\nDrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName;\n\nconst DrawerContent = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DrawerPortal>\n <DrawerOverlay />\n <DrawerPrimitive.Content\n ref={ref}\n style={{ userSelect: 'text' }}\n className={cn(\n 'fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background',\n className,\n )}\n {...props}\n >\n {children}\n </DrawerPrimitive.Content>\n </DrawerPortal>\n));\nDrawerContent.displayName = 'DrawerContent';\n\nconst DrawerHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('grid gap-1.5 p-4 text-center sm:text-left', className)} {...props} />\n);\nDrawerHeader.displayName = 'DrawerHeader';\n\nconst DrawerFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('mt-auto flex flex-col gap-2 p-4', className)} {...props} />\n);\nDrawerFooter.displayName = 'DrawerFooter';\n\nconst DrawerTitle = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Title ref={ref} className={cn('h3', className)} {...props} />\n));\nDrawerTitle.displayName = DrawerPrimitive.Title.displayName;\n\nconst DrawerDescription = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Description\n ref={ref}\n className={cn('body text-muted-foreground', className)}\n {...props}\n />\n));\nDrawerDescription.displayName = DrawerPrimitive.Description.displayName;\n\nexport {\n Drawer,\n DrawerClose,\n DrawerContent,\n DrawerDescription,\n DrawerFooter,\n DrawerHeader,\n DrawerOverlay,\n DrawerPortal,\n DrawerTitle,\n DrawerTrigger\n};\n\n"],"names":["Drawer","shouldScaleBackground","props","DrawerPrimitive","DrawerTrigger","DrawerPortal","DrawerClose","DrawerOverlay","React","className","ref","jsx","cn","DrawerContent","children","jsxs","DrawerHeader","DrawerFooter","DrawerTitle","DrawerDescription"],"mappings":";;;;;AAMA,MAAMA,IAAS,CAAC;AAAA,EACd,uBAAAC,IAAwB;AAAA,EACxB,GAAGC;AACL,wBACGC,EAAgB,MAAhB,EAAqB,uBAAAF,GAA+C,GAAGC,EAAO,CAAA;AAEjFF,EAAO,cAAc;AAErB,MAAMI,IAAgBD,EAAgB,SAEh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GP,GAAO,CAC7E;AACDgB,EAAY,cAAcf,EAAgB,MAAM;AAE1C,MAAAgB,IAAoBX,EAAM,WAG9B,CAAC,EAAE,WAAAC,GAAW,GAAGP,EAAM,GAAGQ,MAC1B,gBAAAC;AAAA,EAACR,EAAgB;AAAA,EAAhB;AAAA,IACC,KAAAO;AAAA,IACA,WAAWE,EAAG,8BAA8BH,CAAS;AAAA,IACpD,GAAGP;AAAA,EAAA;AACN,CACD;AACDiB,EAAkB,cAAchB,EAAgB,YAAY;"}
|
|
@@ -4,12 +4,12 @@ import { cn as d } from "../../utils/index.es.js";
|
|
|
4
4
|
import * as e from "@radix-ui/react-dropdown-menu";
|
|
5
5
|
import { ChevronRightIcon as c, CheckIcon as u, DotFilledIcon as f } from "@radix-ui/react-icons";
|
|
6
6
|
import * as r from "react";
|
|
7
|
-
const
|
|
7
|
+
const x = e.Root, C = e.Trigger, S = e.Group, k = e.Portal, T = e.Sub, G = e.RadioGroup, w = r.forwardRef(({ className: o, inset: t, children: a, ...s }, i) => /* @__PURE__ */ m(
|
|
8
8
|
e.SubTrigger,
|
|
9
9
|
{
|
|
10
10
|
ref: i,
|
|
11
11
|
className: d(
|
|
12
|
-
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5
|
|
12
|
+
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 body outline-hidden focus:bg-accent data-[state=open]:bg-accent",
|
|
13
13
|
t && "pl-8",
|
|
14
14
|
o
|
|
15
15
|
),
|
|
@@ -119,7 +119,7 @@ const M = ({
|
|
|
119
119
|
);
|
|
120
120
|
M.displayName = "DropdownMenuShortcut";
|
|
121
121
|
export {
|
|
122
|
-
|
|
122
|
+
x as DropdownMenu,
|
|
123
123
|
h as DropdownMenuCheckboxItem,
|
|
124
124
|
N as DropdownMenuContent,
|
|
125
125
|
S as DropdownMenuGroup,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-menu.es.js","sources":["../../../lib/components/ui/dropdown-menu.tsx"],"sourcesContent":["import { Button, buttonVariants } from \"@/components/ui/button\"\nimport { cn } from \"@/utils\"\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\"\n// TODO Lucide icons??\nimport {\n CheckIcon,\n ChevronRightIcon,\n DotFilledIcon,\n} from \"@radix-ui/react-icons\"\nimport * as React from \"react\"\n\nconst DropdownMenu = DropdownMenuPrimitive.Root\n\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group\n\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal\n\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub\n\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup\n\n\n/**\n * TODO\n * Focus on trigger.\n * Focus on content after trigger is pressed?\n * List keyboard navigation in buttons within DropdownItems\n */\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-sm px-2 py-1.5
|
|
1
|
+
{"version":3,"file":"dropdown-menu.es.js","sources":["../../../lib/components/ui/dropdown-menu.tsx"],"sourcesContent":["import { Button, buttonVariants } from \"@/components/ui/button\"\nimport { cn } from \"@/utils\"\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\"\n// TODO (mudasirpandith) Lucide icons??\nimport {\n CheckIcon,\n ChevronRightIcon,\n DotFilledIcon,\n} from \"@radix-ui/react-icons\"\nimport * as React from \"react\"\n\nconst DropdownMenu = DropdownMenuPrimitive.Root\n\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group\n\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal\n\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub\n\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup\n\n\n/**\n * TODO (mudasirpandith)\n * Focus on trigger.\n * Focus on content after trigger is pressed?\n * List keyboard navigation in buttons within DropdownItems\n */\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 body outline-hidden focus:bg-accent data-[state=open]:bg-accent\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n))\nDropdownMenuSubTrigger.displayName =\n DropdownMenuPrimitive.SubTrigger.displayName\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n \"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuSubContent.displayName =\n DropdownMenuPrimitive.SubContent.displayName\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md\",\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n))\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof Button>,\n React.ComponentPropsWithoutRef<typeof Button>\n>(({ className, ...props }, ref) => (\n <Button\n ref={ref}\n variant={'ghost'}\n className={cn(\n \"rounded-none w-full\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n buttonVariants({ size: 'sm', variant: 'ghost' }),\n \"w-full\",\n className\n )}\n checked={checked}\n {...props}\n >\n <DropdownMenuPrimitive.ItemIndicator className=\"absolute left-2 size-icon\">\n <CheckIcon className=\"size-icon\" />\n </DropdownMenuPrimitive.ItemIndicator>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n))\nDropdownMenuCheckboxItem.displayName =\n DropdownMenuPrimitive.CheckboxItem.displayName\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n buttonVariants({ size: 'sm', variant: 'ghost' }),\n \"w-full\",\n className\n )}\n {...props}\n >\n <DropdownMenuPrimitive.ItemIndicator className=\"absolute left-2 size-4\">\n <DotFilledIcon className=\"size-4 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n))\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\n \"p-2 border-b caption\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName\n\nconst DropdownMenuShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\"ml-auto text-caption tracking-widest opacity-60\", className)}\n {...props}\n />\n )\n}\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\"\n\nexport {\n DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem,\n DropdownMenuShortcut, DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger, DropdownMenuTrigger\n}\n\n"],"names":["DropdownMenu","DropdownMenuPrimitive","DropdownMenuTrigger","DropdownMenuGroup","DropdownMenuPortal","DropdownMenuSub","DropdownMenuRadioGroup","DropdownMenuSubTrigger","React","className","inset","children","props","ref","jsxs","cn","jsx","ChevronRightIcon","DropdownMenuSubContent","DropdownMenuContent","sideOffset","DropdownMenuItem","Button","DropdownMenuCheckboxItem","checked","buttonVariants","CheckIcon","DropdownMenuRadioItem","DotFilledIcon","DropdownMenuLabel","DropdownMenuShortcut"],"mappings":";;;;;;AAWA,MAAMA,IAAeC,EAAsB,MAErCC,IAAsBD,EAAsB,SAE5CE,IAAoBF,EAAsB,OAE1CG,IAAqBH,EAAsB,QAE3CI,IAAkBJ,EAAsB,KAExCK,IAAyBL,EAAsB,YAU/CM,IAAyBC,EAAM,WAKnC,CAAC,EAAE,WAAAC,GAAW,OAAAC,GAAO,UAAAC,GAAU,GAAGC,KAASC,MAC3C,gBAAAC;AAAA,EAACb,EAAsB;AAAA,EAAtB;AAAA,IACC,KAAAY;AAAA,IACA,WAAWE;AAAA,MACT;AAAA,MACAL,KAAS;AAAA,MACTD;AAAA,IACF;AAAA,IACC,GAAGG;AAAA,IAEH,UAAA;AAAA,MAAAD;AAAA,MACD,gBAAAK,EAACC,GAAiB,EAAA,WAAU,iBAAiB,CAAA;AAAA,IAAA;AAAA,EAAA;AAC/C,CACD;AACDV,EAAuB,cACrBN,EAAsB,WAAW;AAE7B,MAAAiB,IAAyBV,EAAM,WAGnC,CAAC,EAAE,WAAAC,GAAW,GAAGG,EAAM,GAAGC,MAC1B,gBAAAG;AAAA,EAACf,EAAsB;AAAA,EAAtB;AAAA,IACC,KAAAY;AAAA,IACA,WAAWE;AAAA,MACT;AAAA,MACAN;AAAA,IACF;AAAA,IACC,GAAGG;AAAA,EAAA;AACN,CACD;AACDM,EAAuB,cACrBjB,EAAsB,WAAW;AAEnC,MAAMkB,IAAsBX,EAAM,WAGhC,CAAC,EAAE,WAAAC,GAAW,YAAAW,IAAa,GAAG,GAAGR,EAAS,GAAAC,MACzC,gBAAAG,EAAAf,EAAsB,QAAtB,EACC,UAAA,gBAAAe;AAAA,EAACf,EAAsB;AAAA,EAAtB;AAAA,IACC,KAAAY;AAAA,IACA,YAAAO;AAAA,IACA,WAAWL;AAAA,MACT;AAAA,MACA;AAAA,MAC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,EAAAf,EAAsB,eAAtB,EAAoC,WAAU,0BAC7C,UAAC,gBAAAe,EAAAY,GAAA,EAAc,WAAU,sBAAA,CAAsB,EACjD,CAAA;AAAA,MACCjB;AAAA,IAAA;AAAA,EAAA;AACH,CACD;AACDgB,EAAsB,cAAc1B,EAAsB,UAAU;AAE9D,MAAA4B,IAAoBrB,EAAM,WAG9B,CAAC,EAAE,WAAAC,GAAW,GAAGG,EAAM,GAAGC,MAC1B,gBAAAG;AAAA,EAACf,EAAsB;AAAA,EAAtB;AAAA,IACC,KAAAY;AAAA,IACA,WAAWE;AAAA,MACT;AAAA,MACAN;AAAA,IACF;AAAA,IACC,GAAGG;AAAA,EAAA;AACN,CACD;AACDiB,EAAkB,cAAc5B,EAAsB,MAAM;AAE5D,MAAM6B,IAAuB,CAAC;AAAA,EAC5B,WAAArB;AAAA,EACA,GAAGG;AACL,MAEI,gBAAAI;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWD,EAAG,mDAAmDN,CAAS;AAAA,IACzE,GAAGG;AAAA,EAAA;AACN;AAGJkB,EAAqB,cAAc;"}
|
|
@@ -25,7 +25,7 @@ const O = o.forwardRef(({ index: e, className: t, ...a }, s) => {
|
|
|
25
25
|
{
|
|
26
26
|
ref: s,
|
|
27
27
|
className: n(
|
|
28
|
-
"relative flex h-input w-9 items-center justify-center border-2 border-input
|
|
28
|
+
"relative flex h-input w-9 items-center justify-center border-2 border-input body shadow-xs transition-all first:rounded-l-md last:rounded-r-md",
|
|
29
29
|
l ? "z-10 border-2 border-primary" : "",
|
|
30
30
|
t
|
|
31
31
|
),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-otp.es.js","sources":["../../../lib/components/ui/input-otp.tsx"],"sourcesContent":["import { cn } from \"@/utils\"\nimport { MinusIcon } from \"@radix-ui/react-icons\"\nimport { OTPInput, OTPInputContext } from \"input-otp\"\nimport * as React from \"react\"\n\nconst InputOTP = React.forwardRef<\n React.ElementRef<typeof OTPInput>,\n React.ComponentPropsWithoutRef<typeof OTPInput>\n>(({ className, containerClassName, ...props }, ref) => (\n <OTPInput\n ref={ref}\n containerClassName={cn(\n \"flex items-center gap-2 has-disabled:opacity-50\",\n containerClassName\n )}\n className={cn(\"disabled:cursor-not-allowed\", className)}\n {...props}\n />\n))\nInputOTP.displayName = \"InputOTP\"\n\nconst InputOTPGroup = React.forwardRef<\n React.ElementRef<\"div\">,\n React.ComponentPropsWithoutRef<\"div\">\n>(({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"flex items-center\", className)} {...props} />\n))\nInputOTPGroup.displayName = \"InputOTPGroup\"\n\nconst InputOTPSlot = React.forwardRef<\n React.ElementRef<\"div\">,\n React.ComponentPropsWithoutRef<\"div\"> & { index: number }\n>(({ index, className, ...props }, ref) => {\n const inputOTPContext = React.useContext(OTPInputContext)\n const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index]\n\n return (\n <div\n ref={ref}\n className={cn(\n \"relative flex h-input w-9 items-center justify-center border-2 border-input
|
|
1
|
+
{"version":3,"file":"input-otp.es.js","sources":["../../../lib/components/ui/input-otp.tsx"],"sourcesContent":["import { cn } from \"@/utils\"\nimport { MinusIcon } from \"@radix-ui/react-icons\"\nimport { OTPInput, OTPInputContext } from \"input-otp\"\nimport * as React from \"react\"\n\nconst InputOTP = React.forwardRef<\n React.ElementRef<typeof OTPInput>,\n React.ComponentPropsWithoutRef<typeof OTPInput>\n>(({ className, containerClassName, ...props }, ref) => (\n <OTPInput\n ref={ref}\n containerClassName={cn(\n \"flex items-center gap-2 has-disabled:opacity-50\",\n containerClassName\n )}\n className={cn(\"disabled:cursor-not-allowed\", className)}\n {...props}\n />\n))\nInputOTP.displayName = \"InputOTP\"\n\nconst InputOTPGroup = React.forwardRef<\n React.ElementRef<\"div\">,\n React.ComponentPropsWithoutRef<\"div\">\n>(({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"flex items-center\", className)} {...props} />\n))\nInputOTPGroup.displayName = \"InputOTPGroup\"\n\nconst InputOTPSlot = React.forwardRef<\n React.ElementRef<\"div\">,\n React.ComponentPropsWithoutRef<\"div\"> & { index: number }\n>(({ index, className, ...props }, ref) => {\n const inputOTPContext = React.useContext(OTPInputContext)\n const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index]\n\n return (\n <div\n ref={ref}\n className={cn(\n \"relative flex h-input w-9 items-center justify-center border-2 border-input body shadow-xs transition-all first:rounded-l-md last:rounded-r-md\",\n isActive ? \"z-10 border-2 border-primary\" : \"\",\n className,\n )}\n {...props}\n >\n {char}\n {hasFakeCaret && (\n <div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n <div className=\"h-4 w-px animate-caret-blink bg-foreground duration-1000\" />\n </div>\n )}\n </div>\n )\n})\nInputOTPSlot.displayName = \"InputOTPSlot\"\n\nconst InputOTPSeparator = React.forwardRef<\n React.ElementRef<\"div\">,\n React.ComponentPropsWithoutRef<\"div\">\n>(({ ...props }, ref) => (\n <div ref={ref} role=\"separator\" {...props}>\n <MinusIcon />\n </div>\n))\nInputOTPSeparator.displayName = \"InputOTPSeparator\"\n\nexport { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot }\n\n"],"names":["InputOTP","React","className","containerClassName","props","ref","jsx","OTPInput","cn","InputOTPGroup","InputOTPSlot","index","inputOTPContext","OTPInputContext","char","hasFakeCaret","isActive","jsxs","InputOTPSeparator","MinusIcon"],"mappings":";;;;;AAKM,MAAAA,IAAWC,EAAM,WAGrB,CAAC,EAAE,WAAAC,GAAW,oBAAAC,GAAoB,GAAGC,KAASC,MAC9C,gBAAAC;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,KAAAF;AAAA,IACA,oBAAoBG;AAAA,MAClB;AAAA,MACAL;AAAA,IACF;AAAA,IACA,WAAWK,EAAG,+BAA+BN,CAAS;AAAA,IACrD,GAAGE;AAAA,EAAA;AACN,CACD;AACDJ,EAAS,cAAc;AAEjB,MAAAS,IAAgBR,EAAM,WAG1B,CAAC,EAAE,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react";
|
|
3
|
+
import { Button as s } from "./button.es.js";
|
|
4
|
+
import { cn as r } from "../../utils/index.es.js";
|
|
5
|
+
const p = m.forwardRef(
|
|
6
|
+
({ className: a, type: l, icon: e, buttonProps: i, ...o }, n) => /* @__PURE__ */ f("div", { className: r("relative flex gap-1 items-center", a), children: [
|
|
7
|
+
e && /* @__PURE__ */ t(e, { className: "absolute left-2 size-icon text-muted-foreground" }),
|
|
8
|
+
/* @__PURE__ */ t(
|
|
9
|
+
"input",
|
|
10
|
+
{
|
|
11
|
+
type: l,
|
|
12
|
+
className: r(
|
|
13
|
+
"flex h-input input file:border-0 file:bg-transparent file:body file:font-medium w-full",
|
|
14
|
+
e ? "pl-8" : ""
|
|
15
|
+
),
|
|
16
|
+
ref: n,
|
|
17
|
+
...o
|
|
18
|
+
}
|
|
19
|
+
),
|
|
20
|
+
i && /* @__PURE__ */ t(s, { ...i, variant: "outline", size: "icon" })
|
|
21
|
+
] })
|
|
17
22
|
);
|
|
18
|
-
|
|
23
|
+
p.displayName = "Input";
|
|
19
24
|
export {
|
|
20
|
-
|
|
25
|
+
p as Input
|
|
21
26
|
};
|
|
22
27
|
//# sourceMappingURL=input.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.es.js","sources":["../../../lib/components/ui/input.tsx"],"sourcesContent":["import * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\nexport interface InputProps\n extends React.InputHTMLAttributes<HTMLInputElement> { }\n
|
|
1
|
+
{"version":3,"file":"input.es.js","sources":["../../../lib/components/ui/input.tsx"],"sourcesContent":["import * as React from \"react\";\n\nimport { Button, type ButtonProps } from \"@/components/ui/button\";\nimport { cn } from \"@/utils\";\nimport type { LucideIcon } from \"lucide-react\";\n\nexport interface InputProps\n extends React.InputHTMLAttributes<HTMLInputElement> {\n icon?: LucideIcon;\n buttonProps?: ButtonProps\n}\n\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className, type, icon: Icon, buttonProps, ...props }, ref) => {\n return (\n <div className={cn(\"relative flex gap-1 items-center\", className)}>\n {Icon && <Icon className=\"absolute left-2 size-icon text-muted-foreground\" />}\n <input\n type={type}\n className={cn(\n \"flex h-input input file:border-0 file:bg-transparent file:body file:font-medium w-full\",\n Icon ? \"pl-8\" : \"\",\n )}\n ref={ref}\n {...props}\n />\n {buttonProps && <Button {...buttonProps} variant={'outline'} size={'icon'} />}\n </div>\n );\n }\n);\nInput.displayName = \"Input\";\n\nexport { Input };\n"],"names":["Input","React","className","type","Icon","buttonProps","props","ref","cn","jsx","Button"],"mappings":";;;;AAYA,MAAMA,IAAQC,EAAM;AAAA,EAClB,CAAC,EAAE,WAAAC,GAAW,MAAAC,GAAM,MAAMC,GAAM,aAAAC,GAAa,GAAGC,EAAM,GAAGC,wBAEpD,OAAI,EAAA,WAAWC,EAAG,oCAAoCN,CAAS,GAC7D,UAAA;AAAA,IAAQE,KAAA,gBAAAK,EAACL,GAAK,EAAA,WAAU,kDAAkD,CAAA;AAAA,IAC3E,gBAAAK;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,MAAAN;AAAA,QACA,WAAWK;AAAA,UACT;AAAA,UACAJ,IAAO,SAAS;AAAA,QAClB;AAAA,QACA,KAAAG;AAAA,QACC,GAAGD;AAAA,MAAA;AAAA,IACN;AAAA,IACCD,uBAAgBK,GAAQ,EAAA,GAAGL,GAAa,SAAS,WAAW,MAAM,OAAQ,CAAA;AAAA,EAAA,GAC7E;AAGN;AACAL,EAAM,cAAc;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as i from "react";
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
3
2
|
import * as o from "@radix-ui/react-label";
|
|
4
3
|
import { cva as m } from "class-variance-authority";
|
|
4
|
+
import * as t from "react";
|
|
5
5
|
import { cn as s } from "../../utils/index.es.js";
|
|
6
6
|
const l = m(
|
|
7
|
-
"
|
|
8
|
-
), d =
|
|
7
|
+
"body font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
8
|
+
), d = t.forwardRef(({ className: a, ...e }, r) => /* @__PURE__ */ i(
|
|
9
9
|
o.Root,
|
|
10
10
|
{
|
|
11
11
|
ref: r,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label.es.js","sources":["../../../lib/components/ui/label.tsx"],"sourcesContent":["import * as
|
|
1
|
+
{"version":3,"file":"label.es.js","sources":["../../../lib/components/ui/label.tsx"],"sourcesContent":["import * as LabelPrimitive from \"@radix-ui/react-label\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport * as React from \"react\"\n\nimport { cn } from \"@/utils\"\n\n// TODO (mudasirpandith), combine with input, click on label to click on input\n// All form inputs have a label, the only exception is the search input, which is anyway abstracted by the data table\n// Make sure all inputs have a label as well instead of having to enter the label separately.\n\nconst labelVariants = cva(\n \"body font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\"\n)\n\nconst Label = React.forwardRef<\n React.ElementRef<typeof LabelPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &\n VariantProps<typeof labelVariants>\n>(({ className, ...props }, ref) => (\n <LabelPrimitive.Root\n ref={ref}\n className={cn(labelVariants(), className)}\n {...props}\n />\n))\nLabel.displayName = LabelPrimitive.Root.displayName\n\nexport { Label }\n"],"names":["labelVariants","cva","Label","React","className","props","ref","jsx","LabelPrimitive","cn"],"mappings":";;;;;AAUA,MAAMA,IAAgBC;AAAA,EACpB;AACF,GAEMC,IAAQC,EAAM,WAIlB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAM,GAAGC,MAC1B,gBAAAC;AAAA,EAACC,EAAe;AAAA,EAAf;AAAA,IACC,KAAAF;AAAA,IACA,WAAWG,EAAGT,EAAc,GAAGI,CAAS;AAAA,IACvC,GAAGC;AAAA,EAAA;AACN,CACD;AACDH,EAAM,cAAcM,EAAe,KAAK;"}
|
|
@@ -34,6 +34,7 @@ import "./sidebar.es.js";
|
|
|
34
34
|
import "sonner";
|
|
35
35
|
import "./table.es.js";
|
|
36
36
|
import "./tabs.es.js";
|
|
37
|
+
import "./textarea.es.js";
|
|
37
38
|
import "./tooltip.es.js";
|
|
38
39
|
import { Popover as K, PopoverTrigger as R, PopoverContent as M } from "@radix-ui/react-popover";
|
|
39
40
|
import { cva as A } from "class-variance-authority";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutli-select.es.js","sources":["../../../lib/components/ui/mutli-select.tsx"],"sourcesContent":["// TODO https://headlessui.com/react/listbox#selecting-multiple-values??\n'use client';\nimport { Badge } from '@/components/ui/badge';\nimport { Button } from '@/components/ui/button';\nimport {\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n} from '@/components/ui/command';\nimport { Separator } from '@/index';\nimport { cn } from '@/utils';\nimport { Popover, PopoverContent, PopoverTrigger } from '@radix-ui/react-popover';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { CheckIcon, ChevronDown, Command, XIcon } from 'lucide-react';\nimport * as React from 'react';\n\nconst multiSelectVariants = cva(\n 'm-1 transition ease-in-out delay-150 hover:-translate-y-1 hover:scale-110 duration-300',\n {\n variants: {\n variant: {\n default: 'border-foreground/10 drop-shadow-md text-foreground bg-card hover:bg-card/80',\n secondary:\n 'border-foreground/10 bg-secondary text-secondary-foreground hover:bg-secondary/80',\n destructive:\n 'border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80',\n inverted: 'inverted',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n },\n);\n\ninterface MultiSelectFormFieldProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof multiSelectVariants> {\n asChild?: boolean;\n options: {\n label: string;\n value: string;\n icon?: React.ComponentType<{ className?: string }>;\n }[];\n defaultValue?: string[];\n disabled?: boolean;\n placeholder: string;\n className?: string;\n animation?: number;\n onValueChange: (value: string[]) => void;\n}\n\nconst MultiSelectFormField = React.forwardRef<HTMLButtonElement, MultiSelectFormFieldProps>(\n (\n {\n className,\n variant,\n asChild = false,\n options,\n defaultValue,\n onValueChange,\n disabled,\n placeholder,\n animation = 0,\n ...props\n },\n ref,\n ) => {\n const [selectedValues, setSelectedValues] = React.useState<string[]>(defaultValue || []);\n const selectedValuesSet = React.useRef(new Set(selectedValues));\n const [isPopoverOpen, setIsPopoverOpen] = React.useState(false);\n\n React.useEffect(() => {\n setSelectedValues(defaultValue || []);\n selectedValuesSet.current = new Set(defaultValue);\n }, [defaultValue]);\n\n const handleInputKeyDown = (event: any) => {\n if (event.key === 'Enter') {\n setIsPopoverOpen(true);\n } else if (event.key === 'Backspace' && !event.target.value) {\n selectedValues.pop();\n setSelectedValues([...selectedValues]);\n selectedValuesSet.current.delete(selectedValues[selectedValues.length - 1]);\n onValueChange([...selectedValues]);\n }\n };\n\n const toggleOption = (value: string) => {\n if (selectedValuesSet.current.has(value)) {\n selectedValuesSet.current.delete(value);\n setSelectedValues(selectedValues.filter((v) => v !== value));\n } else {\n selectedValuesSet.current.add(value);\n setSelectedValues([...selectedValues, value]);\n }\n onValueChange(Array.from(selectedValuesSet.current));\n };\n\n return (\n <Popover open={isPopoverOpen} onOpenChange={setIsPopoverOpen}>\n <PopoverTrigger asChild>\n <Button\n ref={ref}\n {...props}\n onClick={() => setIsPopoverOpen(!isPopoverOpen)}\n variant={'ghost'}\n className=\"flex w-full p-1 rounded-md border items-center justify-between bg-inherit hover:bg-card\"\n >\n {selectedValues.length > 0 ? (\n <div className=\"flex justify-between items-center w-full\">\n <div className=\"flex flex-wrap items-center\">\n {selectedValues.map((value) => {\n const option = options.find((o) => o.value === value);\n const IconComponent = option?.icon;\n return (\n <Badge key={value}>\n {IconComponent && <IconComponent className=\"size-4 mr-2\" />}\n {option?.label}\n </Badge>\n );\n })}\n </div>\n <div className=\"flex items-center justify-between\">\n <XIcon\n className=\"size-icon mx-2 cursor-pointer text-muted-foreground\"\n onClick={(event) => {\n setSelectedValues([]);\n selectedValuesSet.current.clear();\n onValueChange([]);\n event.stopPropagation();\n }}\n />\n <Separator orientation=\"vertical\" className=\"flex min-h-6 h-full\" />\n <ChevronDown className=\"size-icon mx-2 cursor-pointer text-muted-foreground\" />\n </div>\n </div>\n ) : (\n <div className=\"flex items-center justify-between w-full mx-auto\">\n <span className=\"text-sm text-muted-foreground mx-3\">{placeholder}</span>\n <ChevronDown className=\"size-icon cursor-pointer text-muted-foreground mx-2\" />\n </div>\n )}\n </Button>\n </PopoverTrigger>\n <PopoverContent\n className=\"w-[200px] p-0 drop-shadow-xs\"\n align=\"start\"\n onEscapeKeyDown={() => setIsPopoverOpen(false)}\n >\n <Command>\n <CommandInput placeholder=\"Search...\" onKeyDown={handleInputKeyDown} />\n <CommandList>\n <CommandEmpty>No results found.</CommandEmpty>\n <CommandGroup>\n {options.map((option) => {\n const isSelected = selectedValuesSet.current.has(option.value);\n return (\n <CommandItem\n key={option.value}\n onSelect={() => toggleOption(option.value)}\n style={{\n pointerEvents: 'auto',\n opacity: 1,\n }}\n className=\"cursor-pointer\"\n >\n <div\n className={cn(\n 'mr-2 flex size-4 items-center justify-center rounded-sm border border-primary',\n isSelected\n ? 'bg-primary text-primary-foreground'\n : 'opacity-50 [&_svg]:invisible',\n )}\n >\n <CheckIcon className=\"size-4\" />\n </div>\n {option.icon && (\n <option.icon className=\"mr-2 size-4 text-muted-foreground\" />\n )}\n <span>{option.label}</span>\n </CommandItem>\n );\n })}\n </CommandGroup>\n <CommandSeparator />\n <CommandGroup>\n <div className=\"flex items-center justify-between\">\n {selectedValues.length > 0 && (\n <>\n <CommandItem\n onSelect={() => {\n setSelectedValues([]);\n selectedValuesSet.current.clear();\n onValueChange([]);\n }}\n style={{\n pointerEvents: 'auto',\n opacity: 1,\n }}\n className=\"flex-1 justify-center cursor-pointer\"\n >\n Clear\n </CommandItem>\n <Separator orientation=\"vertical\" className=\"flex min-h-6 h-full\" />\n </>\n )}\n <CommandSeparator />\n <CommandItem\n onSelect={() => setIsPopoverOpen(false)}\n style={{\n pointerEvents: 'auto',\n opacity: 1,\n }}\n className=\"flex-1 justify-center cursor-pointer\"\n >\n Close\n </CommandItem>\n </div>\n </CommandGroup>\n </CommandList>\n </Command>\n </PopoverContent>\n </Popover>\n );\n },\n);\n\nMultiSelectFormField.displayName = 'MultiSelectFormField';\n\nexport default MultiSelectFormField;\n"],"names":["cva","MultiSelectFormField","React","className","variant","asChild","options","defaultValue","onValueChange","disabled","placeholder","animation","props","ref","selectedValues","setSelectedValues","selectedValuesSet","isPopoverOpen","setIsPopoverOpen","handleInputKeyDown","event","toggleOption","value","v","jsxs","Popover","jsx","PopoverTrigger","Button","option","o","IconComponent","Badge","XIcon","Separator","ChevronDown","PopoverContent","Command","CommandInput","CommandList","CommandEmpty","CommandGroup","isSelected","CommandItem","cn","CheckIcon","CommandSeparator","Fragment"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmB4BA;AAAA,EAC1B;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,QACT,WACE;AAAA,QACF,aACE;AAAA,QACF,UAAU;AAAA,MAAA;AAAA,IAEd;AAAA,IACA,iBAAiB;AAAA,MACf,SAAS;AAAA,IAAA;AAAA,EACX;AAEJ;AAmBA,MAAMC,IAAuBC,EAAM;AAAA,EACjC,CACE;AAAA,IACE,WAAAC;AAAA,IACA,SAAAC;AAAA,IACA,SAAAC,IAAU;AAAA,IACV,SAAAC;AAAA,IACA,cAAAC;AAAA,IACA,eAAAC;AAAA,IACA,UAAAC;AAAA,IACA,aAAAC;AAAA,IACA,WAAAC,IAAY;AAAA,IACZ,GAAGC;AAAA,KAELC,MACG;AACG,UAAA,CAACC,GAAgBC,CAAiB,IAAIb,EAAM,SAAmBK,KAAgB,EAAE,GACjFS,IAAoBd,EAAM,OAAO,IAAI,IAAIY,CAAc,CAAC,GACxD,CAACG,GAAeC,CAAgB,IAAIhB,EA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ACA,WAAU;AAAA,sBACX,UAAA;AAAA,oBAAA;AAAA,kBAED;AAAA,kBACC,gBAAAkB,EAAAQ,GAAA,EAAU,aAAY,YAAW,WAAU,sBAAsB,CAAA;AAAA,gBAAA,GACpE;AAAA,kCAEDY,GAAiB,EAAA;AAAA,gBAClB,gBAAApB;AAAA,kBAACiB;AAAA,kBAAA;AAAA,oBACC,UAAU,MAAMzB,EAAiB,EAAK;AAAA,oBACtC,OAAO;AAAA,sBACL,eAAe;AAAA,sBACf,SAAS;AAAA,oBACX;AAAA,oBACA,WAAU;AAAA,oBACX,UAAA;AAAA,kBAAA;AAAA,gBAAA;AAAA,cAED,EAAA,CACF,EACF,CAAA;AAAA,YAAA,EACF,CAAA;AAAA,UAAA,EACF,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACF,GACF;AAAA,EAAA;AAGN;AAEAjB,EAAqB,cAAc;"}
|
|
1
|
+
{"version":3,"file":"mutli-select.es.js","sources":["../../../lib/components/ui/mutli-select.tsx"],"sourcesContent":["// TODO https://headlessui.com/react/listbox#selecting-multiple-values??\n'use client';\nimport { Badge } from '@/components/ui/badge';\nimport { Button } from '@/components/ui/button';\nimport {\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n} from '@/components/ui/command';\nimport { Separator } from '@/index';\nimport { cn } from '@/utils';\nimport { Popover, PopoverContent, PopoverTrigger } from '@radix-ui/react-popover';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { CheckIcon, ChevronDown, Command, XIcon } from 'lucide-react';\nimport * as React from 'react';\n\nconst multiSelectVariants = cva(\n 'm-1 transition ease-in-out delay-150 hover:-translate-y-1 hover:scale-110 duration-300',\n {\n variants: {\n variant: {\n default: 'border-foreground/10 drop-shadow-md text-foreground bg-card hover:bg-card/80',\n secondary:\n 'border-foreground/10 bg-secondary text-secondary-foreground hover:bg-secondary/80',\n destructive:\n 'border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80',\n inverted: 'inverted',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n },\n);\n\ninterface MultiSelectFormFieldProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof multiSelectVariants> {\n asChild?: boolean;\n options: {\n label: string;\n value: string;\n icon?: React.ComponentType<{ className?: string }>;\n }[];\n defaultValue?: string[];\n disabled?: boolean;\n placeholder: string;\n className?: string;\n animation?: number;\n onValueChange: (value: string[]) => void;\n}\n\nconst MultiSelectFormField = React.forwardRef<HTMLButtonElement, MultiSelectFormFieldProps>(\n (\n {\n className,\n variant,\n asChild = false,\n options,\n defaultValue,\n onValueChange,\n disabled,\n placeholder,\n animation = 0,\n ...props\n },\n ref,\n ) => {\n const [selectedValues, setSelectedValues] = React.useState<string[]>(defaultValue || []);\n const selectedValuesSet = React.useRef(new Set(selectedValues));\n const [isPopoverOpen, setIsPopoverOpen] = React.useState(false);\n\n React.useEffect(() => {\n setSelectedValues(defaultValue || []);\n selectedValuesSet.current = new Set(defaultValue);\n }, [defaultValue]);\n\n const handleInputKeyDown = (event: any) => {\n if (event.key === 'Enter') {\n setIsPopoverOpen(true);\n } else if (event.key === 'Backspace' && !event.target.value) {\n selectedValues.pop();\n setSelectedValues([...selectedValues]);\n selectedValuesSet.current.delete(selectedValues[selectedValues.length - 1]);\n onValueChange([...selectedValues]);\n }\n };\n\n const toggleOption = (value: string) => {\n if (selectedValuesSet.current.has(value)) {\n selectedValuesSet.current.delete(value);\n setSelectedValues(selectedValues.filter((v) => v !== value));\n } else {\n selectedValuesSet.current.add(value);\n setSelectedValues([...selectedValues, value]);\n }\n onValueChange(Array.from(selectedValuesSet.current));\n };\n\n return (\n <Popover open={isPopoverOpen} onOpenChange={setIsPopoverOpen}>\n <PopoverTrigger asChild>\n <Button\n ref={ref}\n {...props}\n onClick={() => setIsPopoverOpen(!isPopoverOpen)}\n variant={'ghost'}\n className=\"flex w-full p-1 rounded-md border items-center justify-between bg-inherit hover:bg-card\"\n >\n {selectedValues.length > 0 ? (\n <div className=\"flex justify-between items-center w-full\">\n <div className=\"flex flex-wrap items-center\">\n {selectedValues.map((value) => {\n const option = options.find((o) => o.value === value);\n const IconComponent = option?.icon;\n return (\n <Badge key={value}>\n {IconComponent && <IconComponent className=\"size-4 mr-2\" />}\n {option?.label}\n </Badge>\n );\n })}\n </div>\n <div className=\"flex items-center justify-between\">\n <XIcon\n className=\"size-icon mx-2 cursor-pointer text-muted-foreground\"\n onClick={(event) => {\n setSelectedValues([]);\n selectedValuesSet.current.clear();\n onValueChange([]);\n event.stopPropagation();\n }}\n />\n <Separator orientation=\"vertical\" className=\"flex min-h-6 h-full\" />\n <ChevronDown className=\"size-icon mx-2 cursor-pointer text-muted-foreground\" />\n </div>\n </div>\n ) : (\n <div className=\"flex items-center justify-between w-full mx-auto\">\n <span className=\"text-sm text-muted-foreground mx-3\">{placeholder}</span>\n <ChevronDown className=\"size-icon cursor-pointer text-muted-foreground mx-2\" />\n </div>\n )}\n </Button>\n </PopoverTrigger>\n <PopoverContent\n className=\"w-[200px] p-0 drop-shadow-xs\"\n align=\"start\"\n onEscapeKeyDown={() => setIsPopoverOpen(false)}\n >\n <Command>\n <CommandInput placeholder=\"Search...\" onKeyDown={handleInputKeyDown} />\n <CommandList>\n <CommandEmpty>No results found.</CommandEmpty>\n <CommandGroup>\n {options.map((option) => {\n const isSelected = selectedValuesSet.current.has(option.value);\n return (\n <CommandItem\n key={option.value}\n onSelect={() => toggleOption(option.value)}\n style={{\n pointerEvents: 'auto',\n opacity: 1,\n }}\n className=\"cursor-pointer\"\n >\n <div\n className={cn(\n 'mr-2 flex size-4 items-center justify-center rounded-sm border border-primary',\n isSelected\n ? 'bg-primary text-primary-foreground'\n : 'opacity-50 [&_svg]:invisible',\n )}\n >\n <CheckIcon className=\"size-4\" />\n </div>\n {option.icon && (\n <option.icon className=\"mr-2 size-4 text-muted-foreground\" />\n )}\n <span>{option.label}</span>\n </CommandItem>\n );\n })}\n </CommandGroup>\n <CommandSeparator />\n <CommandGroup>\n <div className=\"flex items-center justify-between\">\n {selectedValues.length > 0 && (\n <>\n <CommandItem\n onSelect={() => {\n setSelectedValues([]);\n selectedValuesSet.current.clear();\n onValueChange([]);\n }}\n style={{\n pointerEvents: 'auto',\n opacity: 1,\n }}\n className=\"flex-1 justify-center cursor-pointer\"\n >\n Clear\n </CommandItem>\n <Separator orientation=\"vertical\" className=\"flex min-h-6 h-full\" />\n </>\n )}\n <CommandSeparator />\n <CommandItem\n onSelect={() => setIsPopoverOpen(false)}\n style={{\n pointerEvents: 'auto',\n opacity: 1,\n }}\n className=\"flex-1 justify-center cursor-pointer\"\n >\n Close\n </CommandItem>\n </div>\n </CommandGroup>\n </CommandList>\n </Command>\n </PopoverContent>\n </Popover>\n );\n },\n);\n\nMultiSelectFormField.displayName = 'MultiSelectFormField';\n\nexport default MultiSelectFormField;\n"],"names":["cva","MultiSelectFormField","React","className","variant","asChild","options","defaultValue","onValueChange","disabled","placeholder","animation","props","ref","selectedValues","setSelectedValues","selectedValuesSet","isPopoverOpen","setIsPopoverOpen","handleInputKeyDown","event","toggleOption","value","v","jsxs","Popover","jsx","PopoverTrigger","Button","option","o","IconComponent","Badge","XIcon","Separator","ChevronDown","PopoverContent","Command","CommandInput","CommandList","CommandEmpty","CommandGroup","isSelected","CommandItem","cn","CheckIcon","CommandSeparator","Fragment"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmB4BA;AAAA,EAC1B;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,QACT,WACE;AAAA,QACF,aACE;AAAA,QACF,UAAU;AAAA,MAAA;AAAA,IAEd;AAAA,IACA,iBAAiB;AAAA,MACf,SAAS;AAAA,IAAA;AAAA,EACX;AAEJ;AAmBA,MAAMC,IAAuBC,EAAM;AAAA,EACjC,CACE;AAAA,IACE,WAAAC;AAAA,IACA,SAAAC;AAAA,IACA,SAAAC,IAAU;AAAA,IACV,SA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SAAS,KAErB,gBAAAU,EAAAuB,GAAA,EAAA,UAAA;AAAA,kBAAA,gBAAArB;AAAA,oBAACiB;AAAA,oBAAA;AAAA,sBACC,UAAU,MAAM;AACd,wBAAA5B,EAAkB,CAAA,CAAE,GACpBC,EAAkB,QAAQ,MAAM,GAChCR,EAAc,CAAA,CAAE;AAAA,sBAClB;AAAA,sBACA,OAAO;AAAA,wBACL,eAAe;AAAA,wBACf,SAAS;AAAA,sBACX;AAAA,sBACA,WAAU;AAAA,sBACX,UAAA;AAAA,oBAAA;AAAA,kBAED;AAAA,kBACC,gBAAAkB,EAAAQ,GAAA,EAAU,aAAY,YAAW,WAAU,sBAAsB,CAAA;AAAA,gBAAA,GACpE;AAAA,kCAEDY,GAAiB,EAAA;AAAA,gBAClB,gBAAApB;AAAA,kBAACiB;AAAA,kBAAA;AAAA,oBACC,UAAU,MAAMzB,EAAiB,EAAK;AAAA,oBACtC,OAAO;AAAA,sBACL,eAAe;AAAA,sBACf,SAAS;AAAA,oBACX;AAAA,oBACA,WAAU;AAAA,oBACX,UAAA;AAAA,kBAAA;AAAA,gBAAA;AAAA,cAED,EAAA,CACF,EACF,CAAA;AAAA,YAAA,EACF,CAAA;AAAA,UAAA,EACF,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACF,GACF;AAAA,EAAA;AAGN;AAEAjB,EAAqB,cAAc;"}
|
|
@@ -100,8 +100,8 @@ const y = r.forwardRef(({ className: t, title: a, children: o, ...d }, l) => /*
|
|
|
100
100
|
),
|
|
101
101
|
...d,
|
|
102
102
|
children: [
|
|
103
|
-
/* @__PURE__ */ i("div", { className: "
|
|
104
|
-
/* @__PURE__ */ i("p", { className: "line-clamp-2
|
|
103
|
+
/* @__PURE__ */ i("div", { className: "body font-medium leading-none", children: a }),
|
|
104
|
+
/* @__PURE__ */ i("p", { className: "line-clamp-2 body leading-snug text-muted-foreground", children: o })
|
|
105
105
|
]
|
|
106
106
|
}
|
|
107
107
|
) }) }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-menu.es.js","sources":["../../../lib/components/ui/navigation-menu.tsx"],"sourcesContent":["import { cn } from \"@/utils\"\nimport { ChevronDownIcon } from \"@radix-ui/react-icons\"\nimport * as NavigationMenuPrimitive from \"@radix-ui/react-navigation-menu\"\nimport { cva } from \"class-variance-authority\"\nimport * as React from \"react\"\nimport { buttonVariants } from \"./button\"\n\nconst NavigationMenu = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root>\n>(({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Root\n ref={ref}\n className={cn(\n \"relative z-10 flex max-w-max flex-1 items-center justify-center\",\n className\n )}\n {...props}\n >\n {children}\n <NavigationMenuViewport />\n </NavigationMenuPrimitive.Root>\n))\nNavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName\n\nconst NavigationMenuList = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.List>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.List\n ref={ref}\n className={cn(\n \"group flex flex-1 list-none items-center justify-center space-x-1 flex-wrap\",\n className\n )}\n {...props}\n />\n))\nNavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName\n\nconst NavigationMenuItem = NavigationMenuPrimitive.Item\n\nconst navigationMenuTriggerStyle = cva(buttonVariants({ size: 'sm', variant: 'outline' }))\n\nconst NavigationMenuTrigger = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Trigger\n ref={ref}\n className={cn(navigationMenuTriggerStyle(), \"group\", className)}\n {...props}\n >\n {children}{\" \"}\n <ChevronDownIcon\n className=\"relative top-[1px] ml-1 size-4 transition duration-300 group-data-[state=open]:rotate-180\"\n aria-hidden=\"true\"\n />\n </NavigationMenuPrimitive.Trigger>\n))\nNavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName\n\nconst NavigationMenuContent = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Content\n ref={ref}\n className={cn(\n \"left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto \",\n className\n )}\n {...props}\n />\n))\nNavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName\n\nconst NavigationMenuLink = NavigationMenuPrimitive.Link\n\nconst NavigationMenuViewport = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Viewport>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Viewport>\n>(({ className, ...props }, ref) => (\n <div className={cn(\"absolute left-0 top-full flex justify-center\")}>\n <NavigationMenuPrimitive.Viewport\n className={cn(\n \"origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]\",\n className\n )}\n ref={ref}\n {...props}\n />\n </div>\n))\nNavigationMenuViewport.displayName =\n NavigationMenuPrimitive.Viewport.displayName\n\nconst NavigationMenuIndicator = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Indicator>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Indicator>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Indicator\n ref={ref}\n className={cn(\n \"top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in\",\n className\n )}\n {...props}\n >\n <div className=\"relative top-[60%] size-2 rotate-45 rounded-tl-sm bg-border shadow-md\" />\n </NavigationMenuPrimitive.Indicator>\n))\nNavigationMenuIndicator.displayName =\n NavigationMenuPrimitive.Indicator.displayName\n\nconst NavigationMenuListItem = React.forwardRef<\n React.ElementRef<\"a\">,\n React.ComponentPropsWithoutRef<\"a\">\n>(({ className, title, children, ...props }, ref) => {\n return (\n <li>\n <NavigationMenuLink asChild>\n <a\n ref={ref}\n className={cn(\n \"block select-none text-accent space-y-1 rounded-md p-3 leading-none no-underline outline-hidden transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground\",\n className\n )}\n {...props}\n >\n <div className=\"
|
|
1
|
+
{"version":3,"file":"navigation-menu.es.js","sources":["../../../lib/components/ui/navigation-menu.tsx"],"sourcesContent":["import { cn } from \"@/utils\"\nimport { ChevronDownIcon } from \"@radix-ui/react-icons\"\nimport * as NavigationMenuPrimitive from \"@radix-ui/react-navigation-menu\"\nimport { cva } from \"class-variance-authority\"\nimport * as React from \"react\"\nimport { buttonVariants } from \"./button\"\n\nconst NavigationMenu = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root>\n>(({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Root\n ref={ref}\n className={cn(\n \"relative z-10 flex max-w-max flex-1 items-center justify-center\",\n className\n )}\n {...props}\n >\n {children}\n <NavigationMenuViewport />\n </NavigationMenuPrimitive.Root>\n))\nNavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName\n\nconst NavigationMenuList = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.List>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.List\n ref={ref}\n className={cn(\n \"group flex flex-1 list-none items-center justify-center space-x-1 flex-wrap\",\n className\n )}\n {...props}\n />\n))\nNavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName\n\nconst NavigationMenuItem = NavigationMenuPrimitive.Item\n\nconst navigationMenuTriggerStyle = cva(buttonVariants({ size: 'sm', variant: 'outline' }))\n\nconst NavigationMenuTrigger = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Trigger\n ref={ref}\n className={cn(navigationMenuTriggerStyle(), \"group\", className)}\n {...props}\n >\n {children}{\" \"}\n <ChevronDownIcon\n className=\"relative top-[1px] ml-1 size-4 transition duration-300 group-data-[state=open]:rotate-180\"\n aria-hidden=\"true\"\n />\n </NavigationMenuPrimitive.Trigger>\n))\nNavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName\n\nconst NavigationMenuContent = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Content\n ref={ref}\n className={cn(\n \"left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto \",\n className\n )}\n {...props}\n />\n))\nNavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName\n\nconst NavigationMenuLink = NavigationMenuPrimitive.Link\n\nconst NavigationMenuViewport = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Viewport>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Viewport>\n>(({ className, ...props }, ref) => (\n <div className={cn(\"absolute left-0 top-full flex justify-center\")}>\n <NavigationMenuPrimitive.Viewport\n className={cn(\n \"origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]\",\n className\n )}\n ref={ref}\n {...props}\n />\n </div>\n))\nNavigationMenuViewport.displayName =\n NavigationMenuPrimitive.Viewport.displayName\n\nconst NavigationMenuIndicator = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Indicator>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Indicator>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Indicator\n ref={ref}\n className={cn(\n \"top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in\",\n className\n )}\n {...props}\n >\n <div className=\"relative top-[60%] size-2 rotate-45 rounded-tl-sm bg-border shadow-md\" />\n </NavigationMenuPrimitive.Indicator>\n))\nNavigationMenuIndicator.displayName =\n NavigationMenuPrimitive.Indicator.displayName\n\nconst NavigationMenuListItem = React.forwardRef<\n React.ElementRef<\"a\">,\n React.ComponentPropsWithoutRef<\"a\">\n>(({ className, title, children, ...props }, ref) => {\n return (\n <li>\n <NavigationMenuLink asChild>\n <a\n ref={ref}\n className={cn(\n \"block select-none text-accent space-y-1 rounded-md p-3 leading-none no-underline outline-hidden transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground\",\n className\n )}\n {...props}\n >\n <div className=\"body font-medium leading-none\">{title}</div>\n <p className=\"line-clamp-2 body leading-snug text-muted-foreground\">\n {children}\n </p>\n </a>\n </NavigationMenuLink>\n </li>\n )\n})\nNavigationMenuListItem.displayName = \"NavigationItemListItem\"\n\nexport {\n NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuListItem, NavigationMenuTrigger, navigationMenuTriggerStyle, NavigationMenuViewport\n}\n\n"],"names":["NavigationMenu","React","className","children","props","ref","jsxs","NavigationMenuPrimitive","cn","NavigationMenuViewport","NavigationMenuList","jsx","NavigationMenuItem","navigationMenuTriggerStyle","cva","buttonVariants","NavigationMenuTrigger","ChevronDownIcon","NavigationMenuContent","NavigationMenuLink","NavigationMenuIndicator","NavigationMenuListItem","title"],"mappings":";;;;;;;AAOM,MAAAA,IAAiBC,EAAM,WAG3B,CAAC,EAAE,WAAAC,GAAW,UAAAC,GAAU,GAAGC,KAASC,MACpC,gBAAAC;AAAA,EAACC,EAAwB;AAAA,EAAxB;AAAA,IACC,KAAAF;AAAA,IACA,WAAWG;AAAA,MACT;AAAA,MACAN;AAAA,IACF;AAAA,IACC,GAAGE;AAAA,IAEH,UAAA;AAAA,MAAAD;AAAA,wBACAM,GAAuB,CAAA,CAAA;AAAA,IAAA;AAAA,EAAA;AAC1B,CACD;AACDT,EAAe,cAAcO,EAAwB,KAAK;AAEpD,MAAAG,IAAqBT,EAAM,WAG/B,CAAC,EAAE,WAAAC,GAAW,GAAGE,EAAM,GAAGC,MAC1B,gBAAAM;AAAA,EAACJ,EAAwB;AAAA,EAAxB;AAAA,IACC,KAAAF;AAAA,IACA,WAAWG;AAAA,MACT;AAAA,MACAN;AAAA,IACF;AAAA,IACC,GAAGE;AAAA,EAAA;AACN,CACD;AACDM,EAAmB,cAAcH,EAAwB,KAAK;AAE9D,MAAMK,IAAqBL,EAAwB,MAE7CM,IAA6BC,EAAIC,EAAe,EAAE,MAAM,MAAM,SAAS,WAAW,CAAC,GAEnFC,IAAwBf,EAAM,WAGlC,CAAC,EAAE,WAAAC,GAAW,UAAAC,GAAU,GAAGC,KAASC,MAC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I,EAAA,WAAU,wEAAwE,CAAA;AAAA,EAAA;AACzF,CACD;AACDS,EAAwB,cACtBb,EAAwB,UAAU;AAE9B,MAAAc,IAAyBpB,EAAM,WAGnC,CAAC,EAAE,WAAAC,GAAW,OAAAoB,GAAO,UAAAnB,GAAU,GAAGC,EAAM,GAAGC,MAExC,gBAAAM,EAAA,MAAA,EACC,UAAC,gBAAAA,EAAAQ,GAAA,EAAmB,SAAO,IACzB,UAAA,gBAAAb;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,WAAWG;AAAA,MACT;AAAA,MACAN;AAAA,IACF;AAAA,IACC,GAAGE;AAAA,IAEJ,UAAA;AAAA,MAAC,gBAAAO,EAAA,OAAA,EAAI,WAAU,iCAAiC,UAAMW,GAAA;AAAA,MACrD,gBAAAX,EAAA,KAAA,EAAE,WAAU,wDACV,UAAAR,EACH,CAAA;AAAA,IAAA;AAAA,EAAA;GAEJ,EACF,CAAA,CAEH;AACDkB,EAAuB,cAAc;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.es.js","sources":["../../../lib/components/ui/pagination.tsx"],"sourcesContent":["// TODO, are we using Radix or Lucide???\n// TODO, are we even using this anywhere?\nimport {\n ChevronLeftIcon,\n ChevronRightIcon,\n DotsHorizontalIcon,\n} from \"@radix-ui/react-icons\"\nimport * as React from \"react\"\n\nimport { ButtonProps, buttonVariants } from \"@/components/ui/button\"\nimport { cn } from \"@/utils\"\n\nconst Pagination = ({ className, ...props }: React.ComponentProps<\"nav\">) => (\n <nav\n role=\"navigation\"\n aria-label=\"pagination\"\n className={cn(\"mx-auto flex w-full justify-center\", className)}\n {...props}\n />\n)\nPagination.displayName = \"Pagination\"\n\nconst PaginationContent = React.forwardRef<\n HTMLUListElement,\n React.ComponentProps<\"ul\">\n>(({ className, ...props }, ref) => (\n <ul\n ref={ref}\n className={cn(\"flex flex-row items-center gap-1\", className)}\n {...props}\n />\n))\nPaginationContent.displayName = \"PaginationContent\"\n\nconst PaginationItem = React.forwardRef<\n HTMLLIElement,\n React.ComponentProps<\"li\">\n>(({ className, ...props }, ref) => (\n <li ref={ref} className={cn(\"\", className)} {...props} />\n))\nPaginationItem.displayName = \"PaginationItem\"\n\ntype PaginationLinkProps = {\n isActive?: boolean\n} & Pick<ButtonProps, \"size\"> &\n React.ComponentProps<\"a\">\n\nconst PaginationLink = ({\n className,\n isActive,\n size = \"default\",\n ...props\n}: PaginationLinkProps) => (\n <a\n aria-current={isActive ? \"page\" : undefined}\n className={cn(\n buttonVariants({\n variant: isActive ? \"outline\" : \"ghost\",\n size,\n }),\n className\n )}\n {...props}\n />\n)\nPaginationLink.displayName = \"PaginationLink\"\n\nconst PaginationPrevious = ({\n className,\n ...props\n}: React.ComponentProps<typeof PaginationLink>) => (\n <PaginationLink\n aria-label=\"Go to previous page\"\n size=\"default\"\n className={cn(\"gap-1 pl-2.5\", className)}\n {...props}\n >\n <ChevronLeftIcon className=\"size-icon\" />\n <span>Previous</span>\n </PaginationLink>\n)\nPaginationPrevious.displayName = \"PaginationPrevious\"\n\nconst PaginationNext = ({\n className,\n ...props\n}: React.ComponentProps<typeof PaginationLink>) => (\n <PaginationLink\n aria-label=\"Go to next page\"\n size=\"default\"\n className={cn(\"gap-1 pr-2.5\", className)}\n {...props}\n >\n <span>Next</span>\n <ChevronRightIcon className=\"size-icon\" />\n </PaginationLink>\n)\nPaginationNext.displayName = \"PaginationNext\"\n\nconst PaginationEllipsis = ({\n className,\n ...props\n}: React.ComponentProps<\"span\">) => (\n <span\n aria-hidden\n className={cn(\"flex size-9 items-center justify-center\", className)}\n {...props}\n >\n <DotsHorizontalIcon className=\"size-icon\" />\n <span className=\"sr-only\">More pages</span>\n </span>\n)\nPaginationEllipsis.displayName = \"PaginationEllipsis\"\n\nexport {\n Pagination,\n PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious\n}\n\n"],"names":["Pagination","className","props","jsx","cn","PaginationContent","React","ref","PaginationItem","PaginationLink","isActive","size","buttonVariants","PaginationPrevious","jsxs","ChevronLeftIcon","PaginationNext","ChevronRightIcon","PaginationEllipsis","DotsHorizontalIcon"],"mappings":";;;;;AAYA,MAAMA,IAAa,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAClC,MAAA,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,MAAK;AAAA,IACL,cAAW;AAAA,IACX,WAAWC,EAAG,sCAAsCH,CAAS;AAAA,IAC5D,GAAGC;AAAA,EAAA;AACN;AAEFF,EAAW,cAAc;AAEnB,MAAAK,IAAoBC,EAAM,WAG9B,CAAC,EAAE,WAAAL,GAAW,GAAGC,EAAM,GAAGK,MAC1B,gBAAAJ;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAI;AAAA,IACA,WAAWH,EAAG,oCAAoCH,CAAS;AAAA,IAC1D,GAAGC;AAAA,EAAA;AACN,CACD;AACDG,EAAkB,cAAc;AAE1B,MAAAG,IAAiBF,EAAM,WAG3B,CAAC,EAAE,WAAAL,GAAW,GAAGC,EAAS,GAAAK,wBACzB,MAAG,EAAA,KAAAA,GAAU,WAAWH,EAAG,IAAIH,CAAS,GAAI,GAAGC,GAAO,CACxD;AACDM,EAAe,cAAc;AAO7B,MAAMC,IAAiB,CAAC;AAAA,EACtB,WAAAR;AAAA,EACA,UAAAS;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,GAAGT;AACL,MACE,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,gBAAcO,IAAW,SAAS;AAAA,IAClC,WAAWN;AAAA,MACTQ,EAAe;AAAA,QACb,SAASF,IAAW,YAAY;AAAA,QAChC,MAAAC;AAAA,MAAA,CACD;AAAA,MACDV;AAAA,IACF;AAAA,IACC,GAAGC;AAAA,EAAA;AACN;AAEFO,EAAe,cAAc;AAE7B,MAAMI,IAAqB,CAAC;AAAA,EAC1B,WAAAZ;AAAA,EACA,GAAGC;AACL,MACE,gBAAAY;AAAA,EAACL;AAAA,EAAA;AAAA,IACC,cAAW;AAAA,IACX,MAAK;AAAA,IACL,WAAWL,EAAG,gBAAgBH,CAAS;AAAA,IACtC,GAAGC;AAAA,IAEJ,UAAA;AAAA,MAAC,gBAAAC,EAAAY,GAAA,EAAgB,WAAU,YAAY,CAAA;AAAA,MACvC,gBAAAZ,EAAC,UAAK,UAAQ,WAAA,CAAA;AAAA,IAAA;AAAA,EAAA;AAChB;AAEFU,EAAmB,cAAc;AAEjC,MAAMG,IAAiB,CAAC;AAAA,EACtB,WAAAf;AAAA,EACA,GAAGC;AACL,MACE,gBAAAY;AAAA,EAACL;AAAA,EAAA;AAAA,IACC,cAAW;AAAA,IACX,MAAK;AAAA,IACL,WAAWL,EAAG,gBAAgBH,CAAS;AAAA,IACtC,GAAGC;AAAA,IAEJ,UAAA;AAAA,MAAA,gBAAAC,EAAC,UAAK,UAAI,OAAA,CAAA;AAAA,MACV,gBAAAA,EAACc,GAAiB,EAAA,WAAU,YAAY,CAAA;AAAA,IAAA;AAAA,EAAA;AAC1C;AAEFD,EAAe,cAAc;AAE7B,MAAME,IAAqB,CAAC;AAAA,EAC1B,WAAAjB;AAAA,EACA,GAAGC;AACL,MACE,gBAAAY;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,eAAW;AAAA,IACX,WAAWV,EAAG,2CAA2CH,CAAS;AAAA,IACjE,GAAGC;AAAA,IAEJ,UAAA;AAAA,MAAC,gBAAAC,EAAAgB,GAAA,EAAmB,WAAU,YAAY,CAAA;AAAA,MACzC,gBAAAhB,EAAA,QAAA,EAAK,WAAU,WAAU,UAAU,aAAA,CAAA;AAAA,IAAA;AAAA,EAAA;AACtC;AAEFe,EAAmB,cAAc;"}
|
|
1
|
+
{"version":3,"file":"pagination.es.js","sources":["../../../lib/components/ui/pagination.tsx"],"sourcesContent":["// TODO (mudasirpandith), are we using Radix or Lucide???\n// TODO (mudasirpandith), are we even using this anywhere?\nimport {\n ChevronLeftIcon,\n ChevronRightIcon,\n DotsHorizontalIcon,\n} from \"@radix-ui/react-icons\"\nimport * as React from \"react\"\n\nimport { ButtonProps, buttonVariants } from \"@/components/ui/button\"\nimport { cn } from \"@/utils\"\n\nconst Pagination = ({ className, ...props }: React.ComponentProps<\"nav\">) => (\n <nav\n role=\"navigation\"\n aria-label=\"pagination\"\n className={cn(\"mx-auto flex w-full justify-center\", className)}\n {...props}\n />\n)\nPagination.displayName = \"Pagination\"\n\nconst PaginationContent = React.forwardRef<\n HTMLUListElement,\n React.ComponentProps<\"ul\">\n>(({ className, ...props }, ref) => (\n <ul\n ref={ref}\n className={cn(\"flex flex-row items-center gap-1\", className)}\n {...props}\n />\n))\nPaginationContent.displayName = \"PaginationContent\"\n\nconst PaginationItem = React.forwardRef<\n HTMLLIElement,\n React.ComponentProps<\"li\">\n>(({ className, ...props }, ref) => (\n <li ref={ref} className={cn(\"\", className)} {...props} />\n))\nPaginationItem.displayName = \"PaginationItem\"\n\ntype PaginationLinkProps = {\n isActive?: boolean\n} & Pick<ButtonProps, \"size\"> &\n React.ComponentProps<\"a\">\n\nconst PaginationLink = ({\n className,\n isActive,\n size = \"default\",\n ...props\n}: PaginationLinkProps) => (\n <a\n aria-current={isActive ? \"page\" : undefined}\n className={cn(\n buttonVariants({\n variant: isActive ? \"outline\" : \"ghost\",\n size,\n }),\n className\n )}\n {...props}\n />\n)\nPaginationLink.displayName = \"PaginationLink\"\n\nconst PaginationPrevious = ({\n className,\n ...props\n}: React.ComponentProps<typeof PaginationLink>) => (\n <PaginationLink\n aria-label=\"Go to previous page\"\n size=\"default\"\n className={cn(\"gap-1 pl-2.5\", className)}\n {...props}\n >\n <ChevronLeftIcon className=\"size-icon\" />\n <span>Previous</span>\n </PaginationLink>\n)\nPaginationPrevious.displayName = \"PaginationPrevious\"\n\nconst PaginationNext = ({\n className,\n ...props\n}: React.ComponentProps<typeof PaginationLink>) => (\n <PaginationLink\n aria-label=\"Go to next page\"\n size=\"default\"\n className={cn(\"gap-1 pr-2.5\", className)}\n {...props}\n >\n <span>Next</span>\n <ChevronRightIcon className=\"size-icon\" />\n </PaginationLink>\n)\nPaginationNext.displayName = \"PaginationNext\"\n\nconst PaginationEllipsis = ({\n className,\n ...props\n}: React.ComponentProps<\"span\">) => (\n <span\n aria-hidden\n className={cn(\"flex size-9 items-center justify-center\", className)}\n {...props}\n >\n <DotsHorizontalIcon className=\"size-icon\" />\n <span className=\"sr-only\">More pages</span>\n </span>\n)\nPaginationEllipsis.displayName = \"PaginationEllipsis\"\n\nexport {\n Pagination,\n PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious\n}\n\n"],"names":["Pagination","className","props","jsx","cn","PaginationContent","React","ref","PaginationItem","PaginationLink","isActive","size","buttonVariants","PaginationPrevious","jsxs","ChevronLeftIcon","PaginationNext","ChevronRightIcon","PaginationEllipsis","DotsHorizontalIcon"],"mappings":";;;;;AAYA,MAAMA,IAAa,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAClC,MAAA,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,MAAK;AAAA,IACL,cAAW;AAAA,IACX,WAAWC,EAAG,sCAAsCH,CAAS;AAAA,IAC5D,GAAGC;AAAA,EAAA;AACN;AAEFF,EAAW,cAAc;AAEnB,MAAAK,IAAoBC,EAAM,WAG9B,CAAC,EAAE,WAAAL,GAAW,GAAGC,EAAM,GAAGK,MAC1B,gBAAAJ;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAI;AAAA,IACA,WAAWH,EAAG,oCAAoCH,CAAS;AAAA,IAC1D,GAAGC;AAAA,EAAA;AACN,CACD;AACDG,EAAkB,cAAc;AAE1B,MAAAG,IAAiBF,EAAM,WAG3B,CAAC,EAAE,WAAAL,GAAW,GAAGC,EAAS,GAAAK,wBACzB,MAAG,EAAA,KAAAA,GAAU,WAAWH,EAAG,IAAIH,CAAS,GAAI,GAAGC,GAAO,CACxD;AACDM,EAAe,cAAc;AAO7B,MAAMC,IAAiB,CAAC;AA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V,EAAG,2CAA2CH,CAAS;AAAA,IACjE,GAAGC;AAAA,IAEJ,UAAA;AAAA,MAAC,gBAAAC,EAAAgB,GAAA,EAAmB,WAAU,YAAY,CAAA;AAAA,MACzC,gBAAAhB,EAAA,QAAA,EAAK,WAAU,WAAU,UAAU,aAAA,CAAA;AAAA,IAAA;AAAA,EAAA;AACtC;AAEFe,EAAmB,cAAc;"}
|
|
@@ -1,28 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import * as
|
|
4
|
-
import { EyeIcon as
|
|
5
|
-
import { Button as c } from "./button.es.js";
|
|
2
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
3
|
+
import * as s from "react";
|
|
4
|
+
import { EyeIcon as n, EyeOffIcon as p, KeySquare as c } from "lucide-react";
|
|
6
5
|
import { Input as m } from "./input.es.js";
|
|
7
|
-
const
|
|
8
|
-
({ className:
|
|
9
|
-
const [
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
{
|
|
15
|
-
type: "button",
|
|
16
|
-
className: "absolute right-0 top-0 rounded-md bg-transparent p-2 text-muted-foreground hover:bg-background/5 focus:outline-hidden",
|
|
17
|
-
onClick: () => a(!t),
|
|
18
|
-
children: t ? /* @__PURE__ */ e(d, { className: "size-icon", "aria-hidden": "true" }) : /* @__PURE__ */ e(i, { className: "size-icon", "aria-hidden": "true" })
|
|
19
|
-
}
|
|
20
|
-
)
|
|
21
|
-
] });
|
|
6
|
+
const f = s.forwardRef(
|
|
7
|
+
({ className: i, ...t }, r) => {
|
|
8
|
+
const [o, e] = s.useState(!1);
|
|
9
|
+
return /* @__PURE__ */ a(m, { icon: c, type: o ? "text" : "password", ref: r, ...t, buttonProps: {
|
|
10
|
+
onClick: () => e(!o),
|
|
11
|
+
icon: () => o ? n : p
|
|
12
|
+
} });
|
|
22
13
|
}
|
|
23
14
|
);
|
|
24
|
-
|
|
15
|
+
f.displayName = "PasswordInput";
|
|
25
16
|
export {
|
|
26
|
-
|
|
17
|
+
f as PasswordInput
|
|
27
18
|
};
|
|
28
19
|
//# sourceMappingURL=password-input.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"password-input.es.js","sources":["../../../lib/components/ui/password-input.tsx"],"sourcesContent":["'use client';\nimport * as React from 'react';\n\nimport { EyeIcon, EyeOffIcon } from 'lucide-react';\nimport {
|
|
1
|
+
{"version":3,"file":"password-input.es.js","sources":["../../../lib/components/ui/password-input.tsx"],"sourcesContent":["'use client';\nimport * as React from 'react';\n\nimport { EyeIcon, EyeOffIcon, KeySquare } from 'lucide-react';\nimport { Input, InputProps } from './input';\n\nconst PasswordInput = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className, ...props }, ref) => {\n const [showPassword, setShowPassword] = React.useState<boolean>(false);\n return (\n <Input icon={KeySquare} type={showPassword ? 'text' : 'password'} ref={ref} {...props} buttonProps={\n {\n onClick: () => setShowPassword(!showPassword),\n icon: () => showPassword ? EyeIcon : EyeOffIcon\n }\n } />\n );\n },\n);\nPasswordInput.displayName = 'PasswordInput';\n\nexport { PasswordInput };\n"],"names":["PasswordInput","React","className","props","ref","showPassword","setShowPassword","jsx","Input","KeySquare","EyeIcon","EyeOffIcon"],"mappings":";;;;;AAMA,MAAMA,IAAgBC,EAAM;AAAA,EAC1B,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAAQ;AAChC,UAAM,CAACC,GAAcC,CAAe,IAAIL,EAAM,SAAkB,EAAK;AAEnE,WAAA,gBAAAM,EAACC,GAAM,EAAA,MAAMC,GAAW,MAAMJ,IAAe,SAAS,YAAY,KAAAD,GAAW,GAAGD,GAAO,aACrF;AAAA,MACE,SAAS,MAAMG,EAAgB,CAACD,CAAY;AAAA,MAC5C,MAAM,MAAMA,IAAeK,IAAUC;AAAA,IAAA,GAEvC;AAAA,EAAA;AAGR;AACAX,EAAc,cAAc;"}
|
|
@@ -1,42 +1,30 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { useState as
|
|
5
|
-
import { Input as
|
|
6
|
-
const
|
|
7
|
-
const [
|
|
8
|
-
|
|
9
|
-
a
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
className: "w-[200px] pl-7 pr-7"
|
|
2
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import { X as i, Search as p } from "lucide-react";
|
|
4
|
+
import { useState as s } from "react";
|
|
5
|
+
import { Input as a } from "./input.es.js";
|
|
6
|
+
const S = ({ onChange: t, ...l }) => {
|
|
7
|
+
const [c, r] = s("");
|
|
8
|
+
return /* @__PURE__ */ o(
|
|
9
|
+
a,
|
|
10
|
+
{
|
|
11
|
+
icon: p,
|
|
12
|
+
...l,
|
|
13
|
+
value: c,
|
|
14
|
+
onChange: (u) => {
|
|
15
|
+
const e = u.target.value;
|
|
16
|
+
r(e), t == null || t(e);
|
|
17
|
+
},
|
|
18
|
+
buttonProps: {
|
|
19
|
+
onClick: () => {
|
|
20
|
+
r(""), t == null || t("");
|
|
21
|
+
},
|
|
22
|
+
icon: () => i
|
|
24
23
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
n,
|
|
28
|
-
{
|
|
29
|
-
onClick: l,
|
|
30
|
-
onKeyDown: m,
|
|
31
|
-
tabIndex: 0,
|
|
32
|
-
role: "button",
|
|
33
|
-
"aria-label": "Clear search input",
|
|
34
|
-
className: "absolute right-1 top-1/2 transform -translate-y-1/2 cursor-pointer"
|
|
35
|
-
}
|
|
36
|
-
)
|
|
37
|
-
] });
|
|
24
|
+
}
|
|
25
|
+
);
|
|
38
26
|
};
|
|
39
27
|
export {
|
|
40
|
-
|
|
28
|
+
S as SearchInput
|
|
41
29
|
};
|
|
42
30
|
//# sourceMappingURL=search-input.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-input.es.js","sources":["../../../lib/components/ui/search-input.tsx"],"sourcesContent":["'use client';\nimport { Search, X } from 'lucide-react'; // Assuming LucideIcon is the type of your icons\nimport React, { useState } from 'react';\nimport { Input, InputProps } from './input'; // Adjust based on your Input import path\n\ninterface SearchInputProps extends Omit<InputProps, 'onChange'> {\n onChange?: (value: string) => void; // Function to handle input value changes\n}\n\nconst SearchInput: React.FC<SearchInputProps> = ({ onChange, ...props }) => {\n const [value, setValue] = useState<string>('');\n\n const handleInputChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n const newValue = event.target.value;\n setValue(newValue);\n onChange?.(newValue); // Call the custom onChange handler with the new value\n };\n\n const handleClearClick = () => {\n setValue('');\n onChange?.(''); // Notify the parent that the input has been cleared\n };\n\n
|
|
1
|
+
{"version":3,"file":"search-input.es.js","sources":["../../../lib/components/ui/search-input.tsx"],"sourcesContent":["'use client';\nimport { Search, X } from 'lucide-react'; // Assuming LucideIcon is the type of your icons\nimport React, { useState } from 'react';\nimport { Input, InputProps } from './input'; // Adjust based on your Input import path\n\ninterface SearchInputProps extends Omit<InputProps, 'onChange'> {\n onChange?: (value: string) => void; // Function to handle input value changes\n}\n\nconst SearchInput: React.FC<SearchInputProps> = ({ onChange, ...props }) => {\n const [value, setValue] = useState<string>('');\n\n const handleInputChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n const newValue = event.target.value;\n setValue(newValue);\n onChange?.(newValue); // Call the custom onChange handler with the new value\n };\n\n const handleClearClick = () => {\n setValue('');\n onChange?.(''); // Notify the parent that the input has been cleared\n };\n\n return (\n <Input\n icon={Search}\n {...props}\n value={value}\n onChange={handleInputChange} // Use the internal handler\n buttonProps={\n {\n onClick: handleClearClick,\n icon: () => X,\n }\n }\n />\n );\n};\n\nexport { SearchInput };\n"],"names":["SearchInput","onChange","props","value","setValue","useState","jsx","Input","Search","event","newValue","X"],"mappings":";;;;;AASA,MAAMA,IAA0C,CAAC,EAAE,UAAAC,GAAU,GAAGC,QAAY;AAC1E,QAAM,CAACC,GAAOC,CAAQ,IAAIC,EAAiB,EAAE;AAc3C,SAAA,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,MAAMC;AAAA,MACL,GAAGN;AAAA,MACJ,OAAAC;AAAA,MACA,UAhBsB,CAACM,MAA+C;AAClE,cAAAC,IAAWD,EAAM,OAAO;AAC9B,QAAAL,EAASM,CAAQ,GACjBT,KAAA,QAAAA,EAAWS;AAAA,MACb;AAAA,MAaI,aACE;AAAA,QACE,SAbiB,MAAM;AAC7B,UAAAN,EAAS,EAAE,GACXH,KAAA,QAAAA,EAAW;AAAA,QACb;AAAA,QAWQ,MAAM,MAAMU;AAAA,MAAA;AAAA,IACd;AAAA,EAEJ;AAEJ;"}
|
|
@@ -10,7 +10,7 @@ const I = e.Root, C = e.Group, z = e.Value, w = l.forwardRef(({ className: o, ch
|
|
|
10
10
|
{
|
|
11
11
|
ref: i,
|
|
12
12
|
className: s(
|
|
13
|
-
"flex h-input w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-background px-3 py-2
|
|
13
|
+
"flex h-input w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-background px-3 py-2 body shadow-xs ring-offset-background placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:border-2 focus-visible:border-primary disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
14
14
|
o
|
|
15
15
|
),
|
|
16
16
|
...a,
|