ml-uikit 1.1.6 → 1.1.8
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/ui/date-range-picker.d.ts +3 -0
- package/dist/components/ui/date-range-picker.d.ts.map +1 -1
- package/dist/components/ui/password-input.d.ts +9 -0
- package/dist/components/ui/password-input.d.ts.map +1 -0
- package/dist/components/ui/searchable-dropdown.d.ts +22 -0
- package/dist/components/ui/searchable-dropdown.d.ts.map +1 -0
- package/dist/components/ui/table.d.ts +5 -1
- package/dist/components/ui/table.d.ts.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs10.js +1 -1
- package/dist/index.cjs10.js.map +1 -1
- package/dist/index.cjs11.js +1 -1
- package/dist/index.cjs11.js.map +1 -1
- package/dist/index.cjs12.js +1 -1
- package/dist/index.cjs12.js.map +1 -1
- package/dist/index.cjs13.js +1 -1
- package/dist/index.cjs13.js.map +1 -1
- package/dist/index.cjs14.js +1 -1
- package/dist/index.cjs14.js.map +1 -1
- package/dist/index.cjs15.js +1 -1
- package/dist/index.cjs15.js.map +1 -1
- package/dist/index.cjs16.js +4 -4
- package/dist/index.cjs16.js.map +1 -1
- package/dist/index.cjs17.js +1 -1
- package/dist/index.cjs17.js.map +1 -1
- package/dist/index.cjs19.js +1 -1
- package/dist/index.cjs19.js.map +1 -1
- package/dist/index.cjs2.js +1 -1
- package/dist/index.cjs2.js.map +1 -1
- package/dist/index.cjs20.js +1 -1
- package/dist/index.cjs20.js.map +1 -1
- package/dist/index.cjs21.js +1 -1
- package/dist/index.cjs21.js.map +1 -1
- package/dist/index.cjs22.js +1 -1
- package/dist/index.cjs22.js.map +1 -1
- package/dist/index.cjs23.js +1 -1
- package/dist/index.cjs23.js.map +1 -1
- package/dist/index.cjs24.js +1 -1
- package/dist/index.cjs24.js.map +1 -1
- package/dist/index.cjs25.js +1 -1
- package/dist/index.cjs25.js.map +1 -1
- package/dist/index.cjs26.js +1 -1
- package/dist/index.cjs26.js.map +1 -1
- package/dist/index.cjs27.js +1 -1
- package/dist/index.cjs27.js.map +1 -1
- package/dist/index.cjs28.js +1 -1
- package/dist/index.cjs28.js.map +1 -1
- package/dist/index.cjs29.js +1 -1
- package/dist/index.cjs29.js.map +1 -1
- package/dist/index.cjs3.js +1 -1
- package/dist/index.cjs3.js.map +1 -1
- package/dist/index.cjs30.js +1 -1
- package/dist/index.cjs30.js.map +1 -1
- package/dist/index.cjs31.js +1 -1
- package/dist/index.cjs31.js.map +1 -1
- package/dist/index.cjs32.js +1 -1
- package/dist/index.cjs32.js.map +1 -1
- package/dist/index.cjs33.js +1 -1
- package/dist/index.cjs33.js.map +1 -1
- package/dist/index.cjs34.js +1 -1
- package/dist/index.cjs34.js.map +1 -1
- package/dist/index.cjs35.js +1 -1
- package/dist/index.cjs35.js.map +1 -1
- package/dist/index.cjs36.js +1 -1
- package/dist/index.cjs36.js.map +1 -1
- package/dist/index.cjs37.js +1 -1
- package/dist/index.cjs37.js.map +1 -1
- package/dist/index.cjs38.js +1 -1
- package/dist/index.cjs38.js.map +1 -1
- package/dist/index.cjs39.js +1 -1
- package/dist/index.cjs39.js.map +1 -1
- package/dist/index.cjs4.js +1 -1
- package/dist/index.cjs4.js.map +1 -1
- package/dist/index.cjs40.js +1 -1
- package/dist/index.cjs40.js.map +1 -1
- package/dist/index.cjs41.js +1 -1
- package/dist/index.cjs41.js.map +1 -1
- package/dist/index.cjs42.js +1 -1
- package/dist/index.cjs42.js.map +1 -1
- package/dist/index.cjs43.js +1 -1
- package/dist/index.cjs43.js.map +1 -1
- package/dist/index.cjs44.js +1 -1
- package/dist/index.cjs44.js.map +1 -1
- package/dist/index.cjs45.js +1 -1
- package/dist/index.cjs45.js.map +1 -1
- package/dist/index.cjs46.js +1 -1
- package/dist/index.cjs46.js.map +1 -1
- package/dist/index.cjs47.js +1 -1
- package/dist/index.cjs47.js.map +1 -1
- package/dist/index.cjs48.js +1 -1
- package/dist/index.cjs48.js.map +1 -1
- package/dist/index.cjs49.js +1 -1
- package/dist/index.cjs49.js.map +1 -1
- package/dist/index.cjs5.js +1 -1
- package/dist/index.cjs5.js.map +1 -1
- package/dist/index.cjs50.js +1 -1
- package/dist/index.cjs50.js.map +1 -1
- package/dist/index.cjs51.js +1 -1
- package/dist/index.cjs51.js.map +1 -1
- package/dist/index.cjs52.js +1 -1
- package/dist/index.cjs52.js.map +1 -1
- package/dist/index.cjs53.js +1 -1
- package/dist/index.cjs53.js.map +1 -1
- package/dist/index.cjs54.js +1 -1
- package/dist/index.cjs54.js.map +1 -1
- package/dist/index.cjs55.js +1 -1
- package/dist/index.cjs55.js.map +1 -1
- package/dist/index.cjs56.js +1 -1
- package/dist/index.cjs56.js.map +1 -1
- package/dist/index.cjs57.js +1 -1
- package/dist/index.cjs57.js.map +1 -1
- package/dist/index.cjs58.js +1 -1
- package/dist/index.cjs58.js.map +1 -1
- package/dist/index.cjs59.js +1 -1
- package/dist/index.cjs59.js.map +1 -1
- package/dist/index.cjs60.js +1 -1
- package/dist/index.cjs60.js.map +1 -1
- package/dist/index.cjs61.js +1 -1
- package/dist/index.cjs61.js.map +1 -1
- package/dist/index.cjs62.js +1 -1
- package/dist/index.cjs62.js.map +1 -1
- package/dist/index.cjs63.js +2 -0
- package/dist/index.cjs63.js.map +1 -0
- package/dist/index.cjs64.js +2 -0
- package/dist/index.cjs64.js.map +1 -0
- package/dist/index.cjs65.js +2 -0
- package/dist/index.cjs65.js.map +1 -0
- package/dist/index.cjs66.js +2 -0
- package/dist/index.cjs66.js.map +1 -0
- package/dist/index.cjs67.js +2 -0
- package/dist/index.cjs67.js.map +1 -0
- package/dist/index.cjs68.js +7 -0
- package/dist/index.cjs68.js.map +1 -0
- package/dist/index.cjs69.js +2 -0
- package/dist/index.cjs69.js.map +1 -0
- package/dist/index.cjs7.js +1 -1
- package/dist/index.cjs7.js.map +1 -1
- package/dist/index.cjs70.js +2 -0
- package/dist/index.cjs70.js.map +1 -0
- package/dist/index.cjs71.js +2 -0
- package/dist/index.cjs71.js.map +1 -0
- package/dist/index.cjs8.js +1 -1
- package/dist/index.cjs8.js.map +1 -1
- package/dist/index.cjs9.js +1 -1
- package/dist/index.cjs9.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +271 -258
- package/dist/index.es.js.map +1 -1
- package/dist/index.es10.js +22 -21
- package/dist/index.es10.js.map +1 -1
- package/dist/index.es11.js +14 -13
- package/dist/index.es11.js.map +1 -1
- package/dist/index.es12.js +31 -31
- package/dist/index.es12.js.map +1 -1
- package/dist/index.es13.js +39 -38
- package/dist/index.es13.js.map +1 -1
- package/dist/index.es14.js +34 -33
- package/dist/index.es14.js.map +1 -1
- package/dist/index.es15.js +107 -102
- package/dist/index.es15.js.map +1 -1
- package/dist/index.es16.js +155 -140
- package/dist/index.es16.js.map +1 -1
- package/dist/index.es17.js +21 -18
- package/dist/index.es17.js.map +1 -1
- package/dist/index.es19.js +63 -59
- package/dist/index.es19.js.map +1 -1
- package/dist/index.es2.js +10 -6
- package/dist/index.es2.js.map +1 -1
- package/dist/index.es20.js +85 -78
- package/dist/index.es20.js.map +1 -1
- package/dist/index.es21.js +68 -59
- package/dist/index.es21.js.map +1 -1
- package/dist/index.es22.js +68 -62
- package/dist/index.es22.js.map +1 -1
- package/dist/index.es23.js +83 -76
- package/dist/index.es23.js.map +1 -1
- package/dist/index.es24.js +178 -94
- package/dist/index.es24.js.map +1 -1
- package/dist/index.es25.js +57 -164
- package/dist/index.es25.js.map +1 -1
- package/dist/index.es26.js +198 -77
- package/dist/index.es26.js.map +1 -1
- package/dist/index.es27.js +90 -20
- package/dist/index.es27.js.map +1 -1
- package/dist/index.es28.js +21 -22
- package/dist/index.es28.js.map +1 -1
- package/dist/index.es29.js +19 -339
- package/dist/index.es29.js.map +1 -1
- package/dist/index.es3.js +35 -32
- package/dist/index.es3.js.map +1 -1
- package/dist/index.es30.js +38 -148
- package/dist/index.es30.js.map +1 -1
- package/dist/index.es31.js +377 -42
- package/dist/index.es31.js.map +1 -1
- package/dist/index.es32.js +146 -172
- package/dist/index.es32.js.map +1 -1
- package/dist/index.es33.js +46 -253
- package/dist/index.es33.js.map +1 -1
- package/dist/index.es34.js +195 -180
- package/dist/index.es34.js.map +1 -1
- package/dist/index.es35.js +253 -29
- package/dist/index.es35.js.map +1 -1
- package/dist/index.es36.js +183 -14
- package/dist/index.es36.js.map +1 -1
- package/dist/index.es37.js +29 -93
- package/dist/index.es37.js.map +1 -1
- package/dist/index.es38.js +13 -187
- package/dist/index.es38.js.map +1 -1
- package/dist/index.es39.js +93 -96
- package/dist/index.es39.js.map +1 -1
- package/dist/index.es4.js +38 -32
- package/dist/index.es4.js.map +1 -1
- package/dist/index.es40.js +182 -80
- package/dist/index.es40.js.map +1 -1
- package/dist/index.es41.js +98 -17
- package/dist/index.es41.js.map +1 -1
- package/dist/index.es42.js +101 -21
- package/dist/index.es42.js.map +1 -1
- package/dist/index.es43.js +20 -28
- package/dist/index.es43.js.map +1 -1
- package/dist/index.es44.js +19 -28
- package/dist/index.es44.js.map +1 -1
- package/dist/index.es45.js +25 -176
- package/dist/index.es45.js.map +1 -1
- package/dist/index.es46.js +36 -21
- package/dist/index.es46.js.map +1 -1
- package/dist/index.es47.js +171 -78
- package/dist/index.es47.js.map +1 -1
- package/dist/index.es48.js +17 -551
- package/dist/index.es48.js.map +1 -1
- package/dist/index.es49.js +106 -13
- package/dist/index.es49.js.map +1 -1
- package/dist/index.es5.js +71 -67
- package/dist/index.es5.js.map +1 -1
- package/dist/index.es50.js +559 -35
- package/dist/index.es50.js.map +1 -1
- package/dist/index.es51.js +12 -19
- package/dist/index.es51.js.map +1 -1
- package/dist/index.es52.js +47 -12
- package/dist/index.es52.js.map +1 -1
- package/dist/index.es53.js +21 -25
- package/dist/index.es53.js.map +1 -1
- package/dist/index.es54.js +14 -217
- package/dist/index.es54.js.map +1 -1
- package/dist/index.es55.js +23 -44
- package/dist/index.es55.js.map +1 -1
- package/dist/index.es56.js +237 -13
- package/dist/index.es56.js.map +1 -1
- package/dist/index.es57.js +44 -28
- package/dist/index.es57.js.map +1 -1
- package/dist/index.es58.js +17 -36
- package/dist/index.es58.js.map +1 -1
- package/dist/index.es59.js +33 -18
- package/dist/index.es59.js.map +1 -1
- package/dist/index.es60.js +39 -6
- package/dist/index.es60.js.map +1 -1
- package/dist/index.es61.js +21 -267
- package/dist/index.es61.js.map +1 -1
- package/dist/index.es62.js +3 -6268
- package/dist/index.es62.js.map +1 -1
- package/dist/index.es63.js +9 -0
- package/dist/index.es63.js.map +1 -0
- package/dist/index.es64.js +270 -0
- package/dist/index.es64.js.map +1 -0
- package/dist/index.es65.js +11 -0
- package/dist/index.es65.js.map +1 -0
- package/dist/index.es66.js +5 -0
- package/dist/index.es66.js.map +1 -0
- package/dist/index.es67.js +27 -0
- package/dist/index.es67.js.map +1 -0
- package/dist/index.es68.js +237 -0
- package/dist/index.es68.js.map +1 -0
- package/dist/index.es69.js +5 -0
- package/dist/index.es69.js.map +1 -0
- package/dist/index.es7.js +25 -24
- package/dist/index.es7.js.map +1 -1
- package/dist/index.es70.js +5 -0
- package/dist/index.es70.js.map +1 -0
- package/dist/index.es71.js +6271 -0
- package/dist/index.es71.js.map +1 -0
- package/dist/index.es8.js +43 -41
- package/dist/index.es8.js.map +1 -1
- package/dist/index.es9.js +51 -48
- package/dist/index.es9.js.map +1 -1
- package/dist/style.css +199 -49
- package/package.json +1 -1
package/dist/index.es23.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es23.js","sources":["../src/components/ui/dropdown-menu.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\"\nimport { Check, ChevronRight, Circle } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\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\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 gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto\" />\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 p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]\",\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 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 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 origin-[--radix-dropdown-menu-content-transform-origin]\",\n className\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n))\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0\",\n inset && \"pl-8\",\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 \"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\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 \"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Circle className=\"h-2 w-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\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 inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\n \"px-2 py-1.5 text-sm font-semibold\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n))\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName\n\nconst DropdownMenuShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\"ml-auto text-xs tracking-widest opacity-60\", className)}\n {...props}\n />\n )\n}\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\"\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n}\n"],"names":["DropdownMenu","DropdownMenuPrimitive","DropdownMenuTrigger","DropdownMenuGroup","DropdownMenuPortal","DropdownMenuSub","DropdownMenuRadioGroup","DropdownMenuSubTrigger","React","className","inset","children","props","ref","cn","ChevronRight","DropdownMenuSubContent","DropdownMenuContent","sideOffset","DropdownMenuItem","DropdownMenuCheckboxItem","checked","Check","DropdownMenuRadioItem","Circle","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut"],"mappings":";;;;AAQA,MAAMA,IAAeC,EAAsB,MAErCC,IAAsBD,EAAsB,SAE5CE,IAAoBF,EAAsB,OAE1CG,IAAqBH,EAAsB,QAE3CI,IAAkBJ,EAAsB,KAExCK,IAAyBL,EAAsB,YAE/CM,IAAyBC,EAAM,WAKnC,CAAC,EAAE,WAAAC,GA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AWC;AAAA,MACT;AAAA,MACAJ,KAAS;AAAA,MACTD;AAAA,IAAA;AAAA,IAED,GAAGG;AAAA,EAAA;AACN,CACD;AACDa,EAAkB,cAAcxB,EAAsB,MAAM;AAE5D,MAAMyB,IAAwBlB,EAAM,WAGlC,CAAC,EAAE,WAAAC,GAAW,GAAGG,EAAA,GAASC,MAC1B,gBAAAL,EAAA;AAAA,EAACP,EAAsB;AAAA,EAAtB;AAAA,IACC,KAAAY;AAAA,IACA,WAAWC,EAAG,4BAA4BL,CAAS;AAAA,IAClD,GAAGG;AAAA,EAAA;AACN,CACD;AACDc,EAAsB,cAAczB,EAAsB,UAAU;AAEpE,MAAM0B,IAAuB,CAAC;AAAA,EAC5B,WAAAlB;AAAA,EACA,GAAGG;AACL,MAEI,gBAAAJ,EAAA;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWM,EAAG,8CAA8CL,CAAS;AAAA,IACpE,GAAGG;AAAA,EAAA;AAAA;AAIVe,EAAqB,cAAc;"}
|
|
1
|
+
{"version":3,"file":"index.es23.js","sources":["../src/components/ui/dropdown-menu.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\"\nimport { Check, ChevronRight, Circle } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\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\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 gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto\" />\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 p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]\",\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 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 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 origin-[--radix-dropdown-menu-content-transform-origin]\",\n className\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n))\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0\",\n inset && \"pl-8\",\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 \"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\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 \"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Circle className=\"h-2 w-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\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 inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\n \"px-2 py-1.5 text-sm font-semibold\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n))\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n))\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName\n\nconst DropdownMenuShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\"ml-auto text-xs tracking-widest opacity-60\", className)}\n {...props}\n />\n )\n}\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\"\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n}\n"],"names":["DropdownMenu","DropdownMenuPrimitive","DropdownMenuTrigger","DropdownMenuGroup","DropdownMenuPortal","DropdownMenuSub","DropdownMenuRadioGroup","DropdownMenuSubTrigger","React","className","inset","children","props","ref","jsxs","cn","jsx","ChevronRight","DropdownMenuSubContent","DropdownMenuContent","sideOffset","DropdownMenuItem","DropdownMenuCheckboxItem","checked","Check","DropdownMenuRadioItem","Circle","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut"],"mappings":";;;;;AAQA,MAAMA,IAAeC,EAAsB,MAErCC,IAAsBD,EAAsB,SAE5CE,IAAoBF,EAAsB,OAE1CG,IAAqBH,EAAsB,QAE3CI,IAAkBJ,EAAsB,KAExCK,IAAyBL,EAAsB,YAE/CM,IAAyBC,EAAM,WAKnC,CAAC,EAAE,WAAAC,GAAW,OAAAC,GAAO,UAAAC,GAAU,GAAGC,KAASC,MAC3CC,gBAAAA,EAAAA;AAAAA,EAACb,EAAsB;AAAA,EAAtB;AAAA,IACC,KAAAY;AAAA,IACA,WAAWE;AAAA,MACT;AAAA,MACAL,KAAS;AAAA,MACTD;AAAA,IAAA;AAAA,IAED,GAAGG;AAAA,IAEH,UAAA;AAAA,MAAAD;AAAA,MACDK,gBAAAA,EAAAA,IAACC,GAAA,EAAa,WAAU,UAAA,CAAU;AAAA,IAA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EAAE,WAAAC,GAAW,GAAGG,EAAA,GAASC,MAC1BG,gBAAAA,EAAAA;AAAAA,EAACf,EAAsB;AAAA,EAAtB;AAAA,IACC,KAAAY;AAAA,IACA,WAAWE,EAAG,4BAA4BN,CAAS;AAAA,IAClD,GAAGG;AAAA,EAAA;AACN,CACD;AACDgB,EAAsB,cAAc3B,EAAsB,UAAU;AAEpE,MAAM4B,IAAuB,CAAC;AAAA,EAC5B,WAAApB;AAAA,EACA,GAAGG;AACL,MAEII,gBAAAA,EAAAA;AAAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWD,EAAG,8CAA8CN,CAAS;AAAA,IACpE,GAAGG;AAAA,EAAA;AAAA;AAIViB,EAAqB,cAAc;"}
|
package/dist/index.es24.js
CHANGED
|
@@ -1,103 +1,187 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
t
|
|
12
|
-
),
|
|
13
|
-
...e
|
|
14
|
-
}
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
function o({ className: t, ...e }) {
|
|
18
|
-
return /* @__PURE__ */ n.createElement(
|
|
19
|
-
"div",
|
|
20
|
-
{
|
|
21
|
-
"data-slot": "empty-header",
|
|
22
|
-
className: a(
|
|
23
|
-
"flex max-w-sm flex-col items-center gap-2 text-center",
|
|
24
|
-
t
|
|
25
|
-
),
|
|
26
|
-
...e
|
|
27
|
-
}
|
|
28
|
-
);
|
|
1
|
+
import { j as a } from "./index.es62.js";
|
|
2
|
+
import * as o from "react";
|
|
3
|
+
import * as i from "@radix-ui/react-dropdown-menu";
|
|
4
|
+
import { Search as E, X as v, Check as A } from "lucide-react";
|
|
5
|
+
import { cn as p } from "./index.es63.js";
|
|
6
|
+
const T = 280, N = "SearchableDropdownItem", g = "SearchableDropdownGroup", h = o.createContext(null), F = i.Root, H = i.Trigger, W = i.Portal;
|
|
7
|
+
function m(e) {
|
|
8
|
+
return typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map((t) => m(t)).join(" ") : o.isValidElement(e) ? m(
|
|
9
|
+
e.props.children
|
|
10
|
+
) : "";
|
|
29
11
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
{
|
|
33
|
-
variants: {
|
|
34
|
-
variant: {
|
|
35
|
-
default: "bg-transparent",
|
|
36
|
-
icon: "bg-muted text-foreground flex size-10 shrink-0 items-center justify-center rounded-lg [&_svg:not([class*='size-'])]:size-6"
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
defaultVariants: {
|
|
40
|
-
variant: "default"
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
);
|
|
44
|
-
function d({
|
|
45
|
-
className: t,
|
|
46
|
-
variant: e = "default",
|
|
47
|
-
...r
|
|
48
|
-
}) {
|
|
49
|
-
return /* @__PURE__ */ n.createElement(
|
|
50
|
-
"div",
|
|
51
|
-
{
|
|
52
|
-
"data-slot": "empty-icon",
|
|
53
|
-
"data-variant": e,
|
|
54
|
-
className: a(s({ variant: e, className: t })),
|
|
55
|
-
...r
|
|
56
|
-
}
|
|
57
|
-
);
|
|
12
|
+
function P(e) {
|
|
13
|
+
return typeof e == "string" ? e : e.displayName || e.name;
|
|
58
14
|
}
|
|
59
|
-
function
|
|
60
|
-
return
|
|
61
|
-
"div",
|
|
62
|
-
{
|
|
63
|
-
"data-slot": "empty-title",
|
|
64
|
-
className: a("text-lg font-medium tracking-tight", t),
|
|
65
|
-
...e
|
|
66
|
-
}
|
|
67
|
-
);
|
|
15
|
+
function D(e, t) {
|
|
16
|
+
return t.trim() ? e.toLowerCase().includes(t.trim().toLowerCase()) : !0;
|
|
68
17
|
}
|
|
69
|
-
function
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
)
|
|
78
|
-
|
|
18
|
+
function x(e, t) {
|
|
19
|
+
let r = !1;
|
|
20
|
+
return o.Children.forEach(e, (n) => {
|
|
21
|
+
if (r || !o.isValidElement(n))
|
|
22
|
+
return;
|
|
23
|
+
const l = P(n.type), s = n.props;
|
|
24
|
+
if (l === N) {
|
|
25
|
+
const d = s.searchableText ?? m(s.children);
|
|
26
|
+
D(d, t) && (r = !0);
|
|
27
|
+
return;
|
|
79
28
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
return /* @__PURE__ */ n.createElement(
|
|
84
|
-
"div",
|
|
85
|
-
{
|
|
86
|
-
"data-slot": "empty-content",
|
|
87
|
-
className: a(
|
|
88
|
-
"flex w-full min-w-0 max-w-sm flex-col items-center gap-4 text-balance text-sm",
|
|
89
|
-
t
|
|
90
|
-
),
|
|
91
|
-
...e
|
|
29
|
+
if (l === g) {
|
|
30
|
+
x(s.children, t) && (r = !0);
|
|
31
|
+
return;
|
|
92
32
|
}
|
|
93
|
-
|
|
33
|
+
x(s.children, t) && (r = !0);
|
|
34
|
+
}), r;
|
|
94
35
|
}
|
|
36
|
+
const V = o.forwardRef(
|
|
37
|
+
({
|
|
38
|
+
className: e,
|
|
39
|
+
sideOffset: t = 8,
|
|
40
|
+
searchPlaceholder: r = "Search...",
|
|
41
|
+
searchValue: n,
|
|
42
|
+
onSearchChange: l,
|
|
43
|
+
contentWidth: s = T,
|
|
44
|
+
children: d,
|
|
45
|
+
style: b,
|
|
46
|
+
...w
|
|
47
|
+
}, S) => {
|
|
48
|
+
const u = o.useRef(null), [C, j] = o.useState(""), f = n ?? C, y = l ?? j, R = x(d, f);
|
|
49
|
+
return o.useEffect(() => {
|
|
50
|
+
const c = window.requestAnimationFrame(() => {
|
|
51
|
+
u.current?.focus();
|
|
52
|
+
});
|
|
53
|
+
return () => {
|
|
54
|
+
window.cancelAnimationFrame(c);
|
|
55
|
+
};
|
|
56
|
+
}, []), /* @__PURE__ */ a.jsx(i.Portal, { children: /* @__PURE__ */ a.jsxs(
|
|
57
|
+
i.Content,
|
|
58
|
+
{
|
|
59
|
+
ref: S,
|
|
60
|
+
sideOffset: t,
|
|
61
|
+
className: p(
|
|
62
|
+
"z-50 overflow-hidden rounded-lg border border-[#e5e5e5] bg-white shadow-lg",
|
|
63
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",
|
|
64
|
+
e
|
|
65
|
+
),
|
|
66
|
+
style: { width: s, ...b },
|
|
67
|
+
...w,
|
|
68
|
+
children: [
|
|
69
|
+
/* @__PURE__ */ a.jsx("div", { className: "border-b border-[#e5e5e5] px-4 py-3", children: /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-3 rounded-lg border border-[#e6e6e6] bg-white px-3 py-2.5 transition-colors focus-within:border-[#1D1C20]", children: [
|
|
70
|
+
/* @__PURE__ */ a.jsx(E, { className: "size-5 flex-shrink-0 text-[#999999]" }),
|
|
71
|
+
/* @__PURE__ */ a.jsx(
|
|
72
|
+
"input",
|
|
73
|
+
{
|
|
74
|
+
ref: u,
|
|
75
|
+
type: "text",
|
|
76
|
+
placeholder: r,
|
|
77
|
+
value: f,
|
|
78
|
+
onChange: (c) => y(c.target.value),
|
|
79
|
+
onKeyDown: (c) => {
|
|
80
|
+
c.key !== "Escape" && c.key !== "Tab" && c.stopPropagation();
|
|
81
|
+
},
|
|
82
|
+
className: "flex-1 bg-transparent text-[14px] text-[#111111] outline-none placeholder:text-[#999999]",
|
|
83
|
+
autoComplete: "off",
|
|
84
|
+
"aria-label": r
|
|
85
|
+
}
|
|
86
|
+
),
|
|
87
|
+
f ? /* @__PURE__ */ a.jsx(
|
|
88
|
+
"button",
|
|
89
|
+
{
|
|
90
|
+
type: "button",
|
|
91
|
+
onClick: () => {
|
|
92
|
+
y(""), u.current?.focus();
|
|
93
|
+
},
|
|
94
|
+
className: "flex-shrink-0 text-[#999999] transition-colors hover:text-[#111111]",
|
|
95
|
+
"aria-label": "Clear search",
|
|
96
|
+
children: /* @__PURE__ */ a.jsx(v, { className: "size-4" })
|
|
97
|
+
}
|
|
98
|
+
) : null
|
|
99
|
+
] }) }),
|
|
100
|
+
/* @__PURE__ */ a.jsx(
|
|
101
|
+
h.Provider,
|
|
102
|
+
{
|
|
103
|
+
value: {
|
|
104
|
+
searchValue: f,
|
|
105
|
+
hasResults: R
|
|
106
|
+
},
|
|
107
|
+
children: /* @__PURE__ */ a.jsx("div", { className: "max-h-[400px] overflow-y-auto", children: d })
|
|
108
|
+
}
|
|
109
|
+
)
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
) });
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
V.displayName = "SearchableDropdownContent";
|
|
116
|
+
const _ = o.forwardRef(({ children: e, ...t }, r) => {
|
|
117
|
+
const n = o.useContext(h);
|
|
118
|
+
return n && !x(e, n.searchValue) ? null : /* @__PURE__ */ a.jsx(i.Group, { ref: r, ...t, children: e });
|
|
119
|
+
});
|
|
120
|
+
_.displayName = g;
|
|
121
|
+
const I = o.forwardRef(
|
|
122
|
+
({
|
|
123
|
+
className: e,
|
|
124
|
+
searchValue: t,
|
|
125
|
+
searchableText: r,
|
|
126
|
+
isSelected: n = !1,
|
|
127
|
+
children: l,
|
|
128
|
+
...s
|
|
129
|
+
}, d) => {
|
|
130
|
+
const b = o.useContext(h), w = r ?? m(l), S = t ?? b?.searchValue ?? "";
|
|
131
|
+
return D(w, S) ? /* @__PURE__ */ a.jsxs(
|
|
132
|
+
i.Item,
|
|
133
|
+
{
|
|
134
|
+
ref: d,
|
|
135
|
+
className: p(
|
|
136
|
+
"relative flex cursor-pointer select-none items-center justify-between px-4 py-3 text-[15px] text-[#111111] outline-none transition-colors hover:bg-[#f5f5f5] focus:bg-[#f5f5f5] data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
137
|
+
e
|
|
138
|
+
),
|
|
139
|
+
...s,
|
|
140
|
+
children: [
|
|
141
|
+
/* @__PURE__ */ a.jsx("span", { children: l }),
|
|
142
|
+
n ? /* @__PURE__ */ a.jsx(A, { className: "size-5 text-[#26453f]" }) : null
|
|
143
|
+
]
|
|
144
|
+
}
|
|
145
|
+
) : null;
|
|
146
|
+
}
|
|
147
|
+
);
|
|
148
|
+
I.displayName = N;
|
|
149
|
+
const L = o.forwardRef(({ className: e, ...t }, r) => o.useContext(h)?.hasResults ? null : /* @__PURE__ */ a.jsx(
|
|
150
|
+
"div",
|
|
151
|
+
{
|
|
152
|
+
ref: r,
|
|
153
|
+
className: p("px-4 py-6 text-center text-sm text-[#666666]", e),
|
|
154
|
+
...t
|
|
155
|
+
}
|
|
156
|
+
));
|
|
157
|
+
L.displayName = "SearchableDropdownEmpty";
|
|
158
|
+
const k = o.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a.jsx(
|
|
159
|
+
"div",
|
|
160
|
+
{
|
|
161
|
+
ref: r,
|
|
162
|
+
className: p("px-4 py-2 text-sm font-semibold text-[#666666]", e),
|
|
163
|
+
...t
|
|
164
|
+
}
|
|
165
|
+
));
|
|
166
|
+
k.displayName = "SearchableDropdownLabel";
|
|
167
|
+
const z = o.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a.jsx(
|
|
168
|
+
i.Separator,
|
|
169
|
+
{
|
|
170
|
+
ref: r,
|
|
171
|
+
className: p("mx-0 my-0 h-px bg-[#e5e5e5]", e),
|
|
172
|
+
...t
|
|
173
|
+
}
|
|
174
|
+
));
|
|
175
|
+
z.displayName = "SearchableDropdownSeparator";
|
|
95
176
|
export {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
177
|
+
F as SearchableDropdown,
|
|
178
|
+
V as SearchableDropdownContent,
|
|
179
|
+
L as SearchableDropdownEmpty,
|
|
180
|
+
_ as SearchableDropdownGroup,
|
|
181
|
+
I as SearchableDropdownItem,
|
|
182
|
+
k as SearchableDropdownLabel,
|
|
183
|
+
W as SearchableDropdownPortal,
|
|
184
|
+
z as SearchableDropdownSeparator,
|
|
185
|
+
H as SearchableDropdownTrigger
|
|
102
186
|
};
|
|
103
187
|
//# sourceMappingURL=index.es24.js.map
|
package/dist/index.es24.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es24.js","sources":["../src/components/ui/empty.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction Empty({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"empty\"\n className={cn(\n \"flex min-w-0 flex-1 flex-col items-center justify-center gap-6 text-balance rounded-lg border-dashed p-6 text-center md:p-12\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction EmptyHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"empty-header\"\n className={cn(\n \"flex max-w-sm flex-col items-center gap-2 text-center\",\n className\n )}\n {...props}\n />\n )\n}\n\nconst emptyMediaVariants = cva(\n \"mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"bg-transparent\",\n icon: \"bg-muted text-foreground flex size-10 shrink-0 items-center justify-center rounded-lg [&_svg:not([class*='size-'])]:size-6\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nfunction EmptyMedia({\n className,\n variant = \"default\",\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof emptyMediaVariants>) {\n return (\n <div\n data-slot=\"empty-icon\"\n data-variant={variant}\n className={cn(emptyMediaVariants({ variant, className }))}\n {...props}\n />\n )\n}\n\nfunction EmptyTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"empty-title\"\n className={cn(\"text-lg font-medium tracking-tight\", className)}\n {...props}\n />\n )\n}\n\nfunction EmptyDescription({ className, ...props }: React.ComponentProps<\"p\">) {\n return (\n <div\n data-slot=\"empty-description\"\n className={cn(\n \"text-muted-foreground [&>a:hover]:text-primary text-sm/relaxed [&>a]:underline [&>a]:underline-offset-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction EmptyContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"empty-content\"\n className={cn(\n \"flex w-full min-w-0 max-w-sm flex-col items-center gap-4 text-balance text-sm\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Empty,\n EmptyHeader,\n EmptyTitle,\n EmptyDescription,\n EmptyContent,\n EmptyMedia,\n}\n"],"names":["Empty","className","props","React","cn","EmptyHeader","emptyMediaVariants","cva","EmptyMedia","variant","EmptyTitle","EmptyDescription","EmptyContent"],"mappings":";;;AAKA,SAASA,EAAM,EAAE,WAAAC,GAAW,GAAGC,KAAsC;AACnE,SACE,gBAAAC,EAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWC;AAAA,QACT;AAAA,QACAH;AAAA,MAAA;AAAA,MAED,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASG,EAAY,EAAE,WAAAJ,GAAW,GAAGC,KAAsC;AACzE,SACE,gBAAAC,EAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWC;AAAA,QACT;AAAA,QACAH;AAAA,MAAA;AAAA,MAED,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,MAAMI,IAAqBC;AAAA,EACzB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,QACT,MAAM;AAAA,MAAA;AAAA,IACR;AAAA,IAEF,iBAAiB;AAAA,MACf,SAAS;AAAA,IAAA;AAAA,EACX;AAEJ;AAEA,SAASC,EAAW;AAAA,EAClB,WAAAP;AAAA,EACA,SAAAQ,IAAU;AAAA,EACV,GAAGP;AACL,GAA0E;AACxE,SACE,gBAAAC,EAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,gBAAcM;AAAA,MACd,WAAWL,EAAGE,EAAmB,EAAE,SAAAG,GAAS,WAAAR,EAAA,CAAW,CAAC;AAAA,MACvD,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASQ,EAAW,EAAE,WAAAT,GAAW,GAAGC,KAAsC;AACxE,SACE,gBAAAC,EAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWC,EAAG,sCAAsCH,CAAS;AAAA,MAC5D,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASS,EAAiB,EAAE,WAAAV,GAAW,GAAGC,KAAoC;AAC5E,SACE,gBAAAC,EAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWC;AAAA,QACT;AAAA,QACAH;AAAA,MAAA;AAAA,MAED,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASU,EAAa,EAAE,WAAAX,GAAW,GAAGC,KAAsC;AAC1E,SACE,gBAAAC,EAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWC;AAAA,QACT;AAAA,QACAH;AAAA,MAAA;AAAA,MAED,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV;"}
|
|
1
|
+
{"version":3,"file":"index.es24.js","sources":["../src/components/ui/searchable-dropdown.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport { Check, Search, X } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst DEFAULT_CONTENT_WIDTH = 280;\nconst SEARCHABLE_DROPDOWN_ITEM_NAME = \"SearchableDropdownItem\";\nconst SEARCHABLE_DROPDOWN_GROUP_NAME = \"SearchableDropdownGroup\";\n\ntype SearchableDropdownContextValue = {\n searchValue: string;\n hasResults: boolean;\n};\n\nconst SearchableDropdownContext =\n React.createContext<SearchableDropdownContextValue | null>(null);\n\nconst SearchableDropdown = DropdownMenuPrimitive.Root;\n\nconst SearchableDropdownTrigger = DropdownMenuPrimitive.Trigger;\n\nconst SearchableDropdownPortal = DropdownMenuPrimitive.Portal;\n\nfunction extractTextContent(node: React.ReactNode): string {\n if (typeof node === \"string\" || typeof node === \"number\") {\n return String(node);\n }\n\n if (Array.isArray(node)) {\n return node.map((child) => extractTextContent(child)).join(\" \");\n }\n\n if (React.isValidElement(node)) {\n return extractTextContent(\n (node.props as { children?: React.ReactNode }).children,\n );\n }\n\n return \"\";\n}\n\nfunction getComponentDisplayName(type: React.ElementType): string | undefined {\n if (typeof type === \"string\") {\n return type;\n }\n\n return (\n (type as { displayName?: string }).displayName ||\n (type as { name?: string }).name\n );\n}\n\nfunction matchesSearch(searchableText: string, searchValue: string): boolean {\n if (!searchValue.trim()) {\n return true;\n }\n\n return searchableText.toLowerCase().includes(searchValue.trim().toLowerCase());\n}\n\nfunction hasMatchingItems(\n children: React.ReactNode,\n searchValue: string,\n): boolean {\n let hasMatch = false;\n\n React.Children.forEach(children, (child) => {\n if (hasMatch || !React.isValidElement(child)) {\n return;\n }\n\n const displayName = getComponentDisplayName(child.type as React.ElementType);\n const childProps = child.props as {\n children?: React.ReactNode;\n searchableText?: string;\n };\n\n if (displayName === SEARCHABLE_DROPDOWN_ITEM_NAME) {\n const searchableText =\n childProps.searchableText ?? extractTextContent(childProps.children);\n\n if (matchesSearch(searchableText, searchValue)) {\n hasMatch = true;\n }\n\n return;\n }\n\n if (displayName === SEARCHABLE_DROPDOWN_GROUP_NAME) {\n if (hasMatchingItems(childProps.children, searchValue)) {\n hasMatch = true;\n }\n\n return;\n }\n\n if (hasMatchingItems(childProps.children, searchValue)) {\n hasMatch = true;\n }\n });\n\n return hasMatch;\n}\n\nconst SearchableDropdownContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content> & {\n searchPlaceholder?: string;\n searchValue?: string;\n onSearchChange?: (value: string) => void;\n contentWidth?: React.CSSProperties[\"width\"];\n }\n>(\n (\n {\n className,\n sideOffset = 8,\n searchPlaceholder = \"Search...\",\n searchValue,\n onSearchChange,\n contentWidth = DEFAULT_CONTENT_WIDTH,\n children,\n style,\n ...props\n },\n ref,\n ) => {\n const inputRef = React.useRef<HTMLInputElement>(null);\n\n const [internalSearchValue, setInternalSearchValue] = React.useState(\"\");\n\n const currentSearchValue = searchValue ?? internalSearchValue;\n const setSearch = onSearchChange ?? setInternalSearchValue;\n const hasResults = hasMatchingItems(children, currentSearchValue);\n\n React.useEffect(() => {\n const frame = window.requestAnimationFrame(() => {\n inputRef.current?.focus();\n });\n\n return () => {\n window.cancelAnimationFrame(frame);\n };\n }, []);\n\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 overflow-hidden rounded-lg border border-[#e5e5e5] bg-white shadow-lg\",\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 origin-[--radix-dropdown-menu-content-transform-origin]\",\n className,\n )}\n style={{ width: contentWidth, ...style }}\n {...props}\n >\n <div className=\"border-b border-[#e5e5e5] px-4 py-3\">\n <div className=\"flex items-center gap-3 rounded-lg border border-[#e6e6e6] bg-white px-3 py-2.5 transition-colors focus-within:border-[#1D1C20]\">\n <Search className=\"size-5 flex-shrink-0 text-[#999999]\" />\n <input\n ref={inputRef}\n type=\"text\"\n placeholder={searchPlaceholder}\n value={currentSearchValue}\n onChange={(event) => setSearch(event.target.value)}\n onKeyDown={(event) => {\n if (event.key !== \"Escape\" && event.key !== \"Tab\") {\n event.stopPropagation();\n }\n }}\n className=\"flex-1 bg-transparent text-[14px] text-[#111111] outline-none placeholder:text-[#999999]\"\n autoComplete=\"off\"\n aria-label={searchPlaceholder}\n />\n {currentSearchValue ? (\n <button\n type=\"button\"\n onClick={() => {\n setSearch(\"\");\n inputRef.current?.focus();\n }}\n className=\"flex-shrink-0 text-[#999999] transition-colors hover:text-[#111111]\"\n aria-label=\"Clear search\"\n >\n <X className=\"size-4\" />\n </button>\n ) : null}\n </div>\n </div>\n\n <SearchableDropdownContext.Provider\n value={{\n searchValue: currentSearchValue,\n hasResults,\n }}\n >\n <div className=\"max-h-[400px] overflow-y-auto\">{children}</div>\n </SearchableDropdownContext.Provider>\n </DropdownMenuPrimitive.Content>\n </DropdownMenuPrimitive.Portal>\n );\n },\n);\nSearchableDropdownContent.displayName = \"SearchableDropdownContent\";\n\nconst SearchableDropdownGroup = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Group>\n>(({ children, ...props }, ref) => {\n const context = React.useContext(SearchableDropdownContext);\n\n if (context && !hasMatchingItems(children, context.searchValue)) {\n return null;\n }\n\n return (\n <DropdownMenuPrimitive.Group ref={ref} {...props}>\n {children}\n </DropdownMenuPrimitive.Group>\n );\n});\nSearchableDropdownGroup.displayName = SEARCHABLE_DROPDOWN_GROUP_NAME;\n\nconst SearchableDropdownItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n searchValue?: string;\n searchableText?: string;\n isSelected?: boolean;\n }\n>(\n (\n {\n className,\n searchValue,\n searchableText,\n isSelected = false,\n children,\n ...props\n },\n ref,\n ) => {\n const context = React.useContext(SearchableDropdownContext);\n\n const text = searchableText ?? extractTextContent(children);\n const currentSearchValue = searchValue ?? context?.searchValue ?? \"\";\n const isVisible = matchesSearch(text, currentSearchValue);\n\n if (!isVisible) {\n return null;\n }\n\n return (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-pointer select-none items-center justify-between px-4 py-3 text-[15px] text-[#111111] outline-none transition-colors hover:bg-[#f5f5f5] focus:bg-[#f5f5f5] data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className,\n )}\n {...props}\n >\n <span>{children}</span>\n {isSelected ? <Check className=\"size-5 text-[#26453f]\" /> : null}\n </DropdownMenuPrimitive.Item>\n );\n },\n);\nSearchableDropdownItem.displayName = SEARCHABLE_DROPDOWN_ITEM_NAME;\n\nconst SearchableDropdownEmpty = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => {\n const context = React.useContext(SearchableDropdownContext);\n\n if (context?.hasResults) {\n return null;\n }\n\n return (\n <div\n ref={ref}\n className={cn(\"px-4 py-6 text-center text-sm text-[#666666]\", className)}\n {...props}\n />\n );\n});\nSearchableDropdownEmpty.displayName = \"SearchableDropdownEmpty\";\n\nconst SearchableDropdownLabel = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"px-4 py-2 text-sm font-semibold text-[#666666]\", className)}\n {...props}\n />\n));\nSearchableDropdownLabel.displayName = \"SearchableDropdownLabel\";\n\nconst SearchableDropdownSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn(\"mx-0 my-0 h-px bg-[#e5e5e5]\", className)}\n {...props}\n />\n));\nSearchableDropdownSeparator.displayName = \"SearchableDropdownSeparator\";\n\nexport {\n SearchableDropdown,\n SearchableDropdownTrigger,\n SearchableDropdownContent,\n SearchableDropdownItem,\n SearchableDropdownEmpty,\n SearchableDropdownLabel,\n SearchableDropdownSeparator,\n SearchableDropdownGroup,\n SearchableDropdownPortal,\n};\n"],"names":["DEFAULT_CONTENT_WIDTH","SEARCHABLE_DROPDOWN_ITEM_NAME","SEARCHABLE_DROPDOWN_GROUP_NAME","SearchableDropdownContext","React","SearchableDropdown","DropdownMenuPrimitive","SearchableDropdownTrigger","SearchableDropdownPortal","extractTextContent","node","child","getComponentDisplayName","type","matchesSearch","searchableText","searchValue","hasMatchingItems","children","hasMatch","displayName","childProps","SearchableDropdownContent","className","sideOffset","searchPlaceholder","onSearchChange","contentWidth","style","props","ref","inputRef","internalSearchValue","setInternalSearchValue","currentSearchValue","setSearch","hasResults","frame","jsx","jsxs","cn","Search","event","X","SearchableDropdownGroup","context","SearchableDropdownItem","isSelected","text","Check","SearchableDropdownEmpty","SearchableDropdownLabel","SearchableDropdownSeparator"],"mappings":";;;;;AAQA,MAAMA,IAAwB,KACxBC,IAAgC,0BAChCC,IAAiC,2BAOjCC,IACJC,EAAM,cAAqD,IAAI,GAE3DC,IAAqBC,EAAsB,MAE3CC,IAA4BD,EAAsB,SAElDE,IAA2BF,EAAsB;AAEvD,SAASG,EAAmBC,GAA+B;AACzD,SAAI,OAAOA,KAAS,YAAY,OAAOA,KAAS,WACvC,OAAOA,CAAI,IAGhB,MAAM,QAAQA,CAAI,IACbA,EAAK,IAAI,CAACC,MAAUF,EAAmBE,CAAK,CAAC,EAAE,KAAK,GAAG,IAG5DP,EAAM,eAAeM,CAAI,IACpBD;AAAA,IACJC,EAAK,MAAyC;AAAA,EAAA,IAI5C;AACT;AAEA,SAASE,EAAwBC,GAA6C;AAC5E,SAAI,OAAOA,KAAS,WACXA,IAINA,EAAkC,eAClCA,EAA2B;AAEhC;AAEA,SAASC,EAAcC,GAAwBC,GAA8B;AA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f6B,IAAaT,gBAAAA,EAAAA,IAACW,GAAA,EAAM,WAAU,yBAAwB,IAAK;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA,IAbvD;AAAA,EAgBX;AACF;AACAH,EAAuB,cAAc7C;AAErC,MAAMiD,IAA0B9C,EAAM,WAGpC,CAAC,EAAE,WAAAmB,GAAW,GAAGM,EAAA,GAASC,MACV1B,EAAM,WAAWD,CAAyB,GAE7C,aACJ,OAIPmC,gBAAAA,EAAAA;AAAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAR;AAAA,IACA,WAAWU,EAAG,gDAAgDjB,CAAS;AAAA,IACtE,GAAGM;AAAA,EAAA;AAAA,CAGT;AACDqB,EAAwB,cAAc;AAEtC,MAAMC,IAA0B/C,EAAM,WAGpC,CAAC,EAAE,WAAAmB,GAAW,GAAGM,EAAA,GAASC,MAC1BQ,gBAAAA,EAAAA;AAAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAR;AAAA,IACA,WAAWU,EAAG,kDAAkDjB,CAAS;AAAA,IACxE,GAAGM;AAAA,EAAA;AACN,CACD;AACDsB,EAAwB,cAAc;AAEtC,MAAMC,IAA8BhD,EAAM,WAGxC,CAAC,EAAE,WAAAmB,GAAW,GAAGM,EAAA,GAASC,MAC1BQ,gBAAAA,EAAAA;AAAAA,EAAChC,EAAsB;AAAA,EAAtB;AAAA,IACC,KAAAwB;AAAA,IACA,WAAWU,EAAG,+BAA+BjB,CAAS;AAAA,IACrD,GAAGM;AAAA,EAAA;AACN,CACD;AACDuB,EAA4B,cAAc;"}
|
package/dist/index.es25.js
CHANGED
|
@@ -1,210 +1,103 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { j as n } from "./index.es62.js";
|
|
2
2
|
import { cva as s } from "class-variance-authority";
|
|
3
|
-
import { cn as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return /* @__PURE__ */ React.createElement(
|
|
8
|
-
"fieldset",
|
|
9
|
-
{
|
|
10
|
-
"data-slot": "field-set",
|
|
11
|
-
className: l(
|
|
12
|
-
"flex flex-col gap-6",
|
|
13
|
-
"has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",
|
|
14
|
-
t
|
|
15
|
-
),
|
|
16
|
-
...e
|
|
17
|
-
}
|
|
18
|
-
);
|
|
19
|
-
}
|
|
20
|
-
function v({
|
|
21
|
-
className: t,
|
|
22
|
-
variant: e = "legend",
|
|
23
|
-
...a
|
|
24
|
-
}) {
|
|
25
|
-
return /* @__PURE__ */ React.createElement(
|
|
26
|
-
"legend",
|
|
3
|
+
import { cn as a } from "./index.es63.js";
|
|
4
|
+
function d({ className: e, ...t }) {
|
|
5
|
+
return /* @__PURE__ */ n.jsx(
|
|
6
|
+
"div",
|
|
27
7
|
{
|
|
28
|
-
"data-slot": "
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"data-[variant=legend]:text-base",
|
|
33
|
-
"data-[variant=label]:text-sm",
|
|
34
|
-
t
|
|
8
|
+
"data-slot": "empty",
|
|
9
|
+
className: a(
|
|
10
|
+
"flex min-w-0 flex-1 flex-col items-center justify-center gap-6 text-balance rounded-lg border-dashed p-6 text-center md:p-12",
|
|
11
|
+
e
|
|
35
12
|
),
|
|
36
|
-
...
|
|
13
|
+
...t
|
|
37
14
|
}
|
|
38
15
|
);
|
|
39
16
|
}
|
|
40
|
-
function
|
|
41
|
-
return /* @__PURE__ */
|
|
17
|
+
function c({ className: e, ...t }) {
|
|
18
|
+
return /* @__PURE__ */ n.jsx(
|
|
42
19
|
"div",
|
|
43
20
|
{
|
|
44
|
-
"data-slot": "
|
|
45
|
-
className:
|
|
46
|
-
"
|
|
47
|
-
|
|
21
|
+
"data-slot": "empty-header",
|
|
22
|
+
className: a(
|
|
23
|
+
"flex max-w-sm flex-col items-center gap-2 text-center",
|
|
24
|
+
e
|
|
48
25
|
),
|
|
49
|
-
...
|
|
26
|
+
...t
|
|
50
27
|
}
|
|
51
28
|
);
|
|
52
29
|
}
|
|
53
|
-
const
|
|
54
|
-
"
|
|
30
|
+
const i = s(
|
|
31
|
+
"mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
55
32
|
{
|
|
56
33
|
variants: {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
"flex-row items-center",
|
|
61
|
-
"[&>[data-slot=field-label]]:flex-auto",
|
|
62
|
-
"has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px has-[>[data-slot=field-content]]:items-start"
|
|
63
|
-
],
|
|
64
|
-
responsive: [
|
|
65
|
-
"@md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto flex-col [&>*]:w-full [&>.sr-only]:w-auto",
|
|
66
|
-
"@md/field-group:[&>[data-slot=field-label]]:flex-auto",
|
|
67
|
-
"@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
|
|
68
|
-
]
|
|
34
|
+
variant: {
|
|
35
|
+
default: "bg-transparent",
|
|
36
|
+
icon: "bg-muted text-foreground flex size-10 shrink-0 items-center justify-center rounded-lg [&_svg:not([class*='size-'])]:size-6"
|
|
69
37
|
}
|
|
70
38
|
},
|
|
71
39
|
defaultVariants: {
|
|
72
|
-
|
|
40
|
+
variant: "default"
|
|
73
41
|
}
|
|
74
42
|
}
|
|
75
43
|
);
|
|
76
|
-
function
|
|
77
|
-
className:
|
|
78
|
-
|
|
79
|
-
...
|
|
44
|
+
function f({
|
|
45
|
+
className: e,
|
|
46
|
+
variant: t = "default",
|
|
47
|
+
...r
|
|
80
48
|
}) {
|
|
81
|
-
return /* @__PURE__ */
|
|
49
|
+
return /* @__PURE__ */ n.jsx(
|
|
82
50
|
"div",
|
|
83
51
|
{
|
|
84
|
-
|
|
85
|
-
"data-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
...a
|
|
52
|
+
"data-slot": "empty-icon",
|
|
53
|
+
"data-variant": t,
|
|
54
|
+
className: a(i({ variant: t, className: e })),
|
|
55
|
+
...r
|
|
89
56
|
}
|
|
90
57
|
);
|
|
91
58
|
}
|
|
92
|
-
function
|
|
93
|
-
return /* @__PURE__ */
|
|
59
|
+
function x({ className: e, ...t }) {
|
|
60
|
+
return /* @__PURE__ */ n.jsx(
|
|
94
61
|
"div",
|
|
95
62
|
{
|
|
96
|
-
"data-slot": "
|
|
97
|
-
className:
|
|
98
|
-
|
|
99
|
-
t
|
|
100
|
-
),
|
|
101
|
-
...e
|
|
102
|
-
}
|
|
103
|
-
);
|
|
104
|
-
}
|
|
105
|
-
function N({
|
|
106
|
-
className: t,
|
|
107
|
-
...e
|
|
108
|
-
}) {
|
|
109
|
-
return /* @__PURE__ */ React.createElement(
|
|
110
|
-
c,
|
|
111
|
-
{
|
|
112
|
-
"data-slot": "field-label",
|
|
113
|
-
className: l(
|
|
114
|
-
"group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50",
|
|
115
|
-
"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>[data-slot=field]]:p-4",
|
|
116
|
-
"has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10",
|
|
117
|
-
t
|
|
118
|
-
),
|
|
119
|
-
...e
|
|
63
|
+
"data-slot": "empty-title",
|
|
64
|
+
className: a("text-lg font-medium tracking-tight", e),
|
|
65
|
+
...t
|
|
120
66
|
}
|
|
121
67
|
);
|
|
122
68
|
}
|
|
123
|
-
function
|
|
124
|
-
return /* @__PURE__ */
|
|
69
|
+
function u({ className: e, ...t }) {
|
|
70
|
+
return /* @__PURE__ */ n.jsx(
|
|
125
71
|
"div",
|
|
126
72
|
{
|
|
127
|
-
"data-slot": "
|
|
128
|
-
className:
|
|
129
|
-
"
|
|
130
|
-
|
|
131
|
-
),
|
|
132
|
-
...e
|
|
133
|
-
}
|
|
134
|
-
);
|
|
135
|
-
}
|
|
136
|
-
function y({ className: t, ...e }) {
|
|
137
|
-
return /* @__PURE__ */ React.createElement(
|
|
138
|
-
"p",
|
|
139
|
-
{
|
|
140
|
-
"data-slot": "field-description",
|
|
141
|
-
className: l(
|
|
142
|
-
"text-muted-foreground text-sm font-normal leading-normal group-has-[[data-orientation=horizontal]]/field:text-balance",
|
|
143
|
-
"nth-last-2:-mt-1 last:mt-0 [[data-variant=legend]+&]:-mt-1.5",
|
|
144
|
-
"[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",
|
|
145
|
-
t
|
|
73
|
+
"data-slot": "empty-description",
|
|
74
|
+
className: a(
|
|
75
|
+
"text-muted-foreground [&>a:hover]:text-primary text-sm/relaxed [&>a]:underline [&>a]:underline-offset-4",
|
|
76
|
+
e
|
|
146
77
|
),
|
|
147
|
-
...
|
|
78
|
+
...t
|
|
148
79
|
}
|
|
149
80
|
);
|
|
150
81
|
}
|
|
151
|
-
function
|
|
152
|
-
|
|
153
|
-
className: e,
|
|
154
|
-
...a
|
|
155
|
-
}) {
|
|
156
|
-
return /* @__PURE__ */ React.createElement(
|
|
82
|
+
function p({ className: e, ...t }) {
|
|
83
|
+
return /* @__PURE__ */ n.jsx(
|
|
157
84
|
"div",
|
|
158
85
|
{
|
|
159
|
-
"data-slot": "
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
"relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",
|
|
86
|
+
"data-slot": "empty-content",
|
|
87
|
+
className: a(
|
|
88
|
+
"flex w-full min-w-0 max-w-sm flex-col items-center gap-4 text-balance text-sm",
|
|
163
89
|
e
|
|
164
90
|
),
|
|
165
|
-
...
|
|
166
|
-
}
|
|
167
|
-
/* @__PURE__ */ React.createElement(f, { className: "absolute inset-0 top-1/2" }),
|
|
168
|
-
t && /* @__PURE__ */ React.createElement(
|
|
169
|
-
"span",
|
|
170
|
-
{
|
|
171
|
-
className: "bg-background text-muted-foreground relative mx-auto block w-fit px-2",
|
|
172
|
-
"data-slot": "field-separator-content"
|
|
173
|
-
},
|
|
174
|
-
t
|
|
175
|
-
)
|
|
91
|
+
...t
|
|
92
|
+
}
|
|
176
93
|
);
|
|
177
94
|
}
|
|
178
|
-
function L({
|
|
179
|
-
className: t,
|
|
180
|
-
children: e,
|
|
181
|
-
errors: a,
|
|
182
|
-
...d
|
|
183
|
-
}) {
|
|
184
|
-
const o = n(() => e || (a ? a?.length === 1 && a[0]?.message ? a[0].message : /* @__PURE__ */ React.createElement("ul", { className: "ml-4 flex list-disc flex-col gap-1" }, a.map(
|
|
185
|
-
(r, i) => r?.message && /* @__PURE__ */ React.createElement("li", { key: i }, r.message)
|
|
186
|
-
)) : null), [e, a]);
|
|
187
|
-
return o ? /* @__PURE__ */ React.createElement(
|
|
188
|
-
"div",
|
|
189
|
-
{
|
|
190
|
-
role: "alert",
|
|
191
|
-
"data-slot": "field-error",
|
|
192
|
-
className: l("text-destructive text-sm font-normal", t),
|
|
193
|
-
...d
|
|
194
|
-
},
|
|
195
|
-
o
|
|
196
|
-
) : null;
|
|
197
|
-
}
|
|
198
95
|
export {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
v as FieldLegend,
|
|
206
|
-
F as FieldSeparator,
|
|
207
|
-
h as FieldSet,
|
|
208
|
-
k as FieldTitle
|
|
96
|
+
d as Empty,
|
|
97
|
+
p as EmptyContent,
|
|
98
|
+
u as EmptyDescription,
|
|
99
|
+
c as EmptyHeader,
|
|
100
|
+
f as EmptyMedia,
|
|
101
|
+
x as EmptyTitle
|
|
209
102
|
};
|
|
210
103
|
//# sourceMappingURL=index.es25.js.map
|