@oneplatformdev/ui 0.1.99-beta.301 → 0.1.99-beta.304
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/.storybook/Wrappers.js.map +1 -1
- package/Accordion/Accordion.js.map +1 -1
- package/Alert/Alert.js.map +1 -1
- package/Alert/alertVariants.js.map +1 -1
- package/AlertDialog/AlertDialog.js.map +1 -1
- package/AlertDialog/AlertDialog.stories.js +4 -2
- package/AlertDialog/AlertDialog.stories.js.map +1 -1
- package/AlertDialog/AlertDialogRoot.js +20 -18
- package/AlertDialog/AlertDialogRoot.js.map +1 -1
- package/AreaChart/AreaChart.js.map +1 -1
- package/Aside/Aside.js.map +1 -1
- package/Aside/AsideSidebar.js.map +1 -1
- package/AspectRatio/AspectRatio.js.map +1 -1
- package/Avatar/Avatar.js.map +1 -1
- package/Badge/Badge.js.map +1 -1
- package/Badge/badgeVariants.js.map +1 -1
- package/Breadcrumb/Breadcrumb.js.map +1 -1
- package/Button/Button.js +11 -10
- package/Button/Button.js.map +1 -1
- package/Button/Button.stories.js.map +1 -1
- package/Button/Button.utils.js.map +1 -1
- package/Button/ButtonCounterBadge.js.map +1 -1
- package/Button/buttonVariants.js.map +1 -1
- package/ButtonIcon/ButtonIcon.js +22 -19
- package/ButtonIcon/ButtonIcon.js.map +1 -1
- package/ButtonIcon/ButtonIcon.stories.js.map +1 -1
- package/ButtonIcon/buttonIconVariants.js.map +1 -1
- package/CHANGELOG.md +3487 -3487
- package/Calendar/Calendar.js +6 -4
- package/Calendar/Calendar.js.map +1 -1
- package/Card/Card.js.map +1 -1
- package/Carousel/Carousel.js +7 -6
- package/Carousel/Carousel.js.map +1 -1
- package/Chart/Chart.js.map +1 -1
- package/Checkbox/Checkbox.js +1 -0
- package/Checkbox/Checkbox.js.map +1 -1
- package/Checkbox/Checkbox.stories.js.map +1 -1
- package/Collapsible/Collapsible.js.map +1 -1
- package/Combobox/Combobox.js +46 -45
- package/Combobox/Combobox.js.map +1 -1
- package/Combobox/Combobox.stories.js.map +1 -1
- package/Combobox/Combobox.types.d.ts +2 -0
- package/Combobox/Combobox.types.d.ts.map +1 -1
- package/Combobox/Combobox.types.js.map +1 -1
- package/Combobox/ComboboxOptionItem.js +19 -18
- package/Combobox/ComboboxOptionItem.js.map +1 -1
- package/Combobox/ComboboxRenderContent.d.ts.map +1 -1
- package/Combobox/ComboboxRenderContent.js +47 -43
- package/Combobox/ComboboxRenderContent.js.map +1 -1
- package/Combobox/ComboboxRenderOptions.js +5 -5
- package/Combobox/ComboboxRenderOptions.js.map +1 -1
- package/Combobox/ComboboxRenderTrigger.js +20 -18
- package/Combobox/ComboboxRenderTrigger.js.map +1 -1
- package/Command/Command.js +22 -21
- package/Command/Command.js.map +1 -1
- package/ContextPopover/ContextDropdownMenu.js.map +1 -1
- package/ContextPopover/ContextPopover.js.map +1 -1
- package/ContextPopover/useContextPopoverHandler.js.map +1 -1
- package/DataTable/DataTable.js +26 -24
- package/DataTable/DataTable.js.map +1 -1
- package/DataTable/DataTableColumnFilter.js +7 -6
- package/DataTable/DataTableColumnFilter.js.map +1 -1
- package/DataTable/useDataTable.js.map +1 -1
- package/DatePicker/DatePicker.js +2 -1
- package/DatePicker/DatePicker.js.map +1 -1
- package/Dialog/Dialog.js +21 -20
- package/Dialog/Dialog.js.map +1 -1
- package/Dialog/Dialog.stories.js +15 -14
- package/Dialog/Dialog.stories.js.map +1 -1
- package/Dialog/DialogOverlayScope.js.map +1 -1
- package/Dialog/useDialogClosePosition.js.map +1 -1
- package/Drawer/Drawer.js.map +1 -1
- package/DropdownMenu/DropdownMenu.js.map +1 -1
- package/Dropzone/Dropzone.js +81 -80
- package/Dropzone/Dropzone.js.map +1 -1
- package/Dropzone/Dropzone.stories.js.map +1 -1
- package/Dropzone/Dropzone.types.js.map +1 -1
- package/Dropzone/DropzoneCoverPreview.js.map +1 -1
- package/Dropzone/DropzoneFilePreview.js.map +1 -1
- package/Dropzone/DropzoneSinglePickPreview.js +3 -2
- package/Dropzone/DropzoneSinglePickPreview.js.map +1 -1
- package/Dropzone/DropzoneUtils.js.map +1 -1
- package/Form/Form.js +29 -28
- package/Form/Form.js.map +1 -1
- package/Form/FormRenderControl.js +7 -6
- package/Form/FormRenderControl.js.map +1 -1
- package/Form/Form_old.js +5 -4
- package/Form/Form_old.js.map +1 -1
- package/FormCheckbox/FormCheckbox.js +4 -4
- package/FormCheckbox/FormCheckbox.js.map +1 -1
- package/FormCombobox/FormCombobox.js +4 -4
- package/FormCombobox/FormCombobox.js.map +1 -1
- package/FormCombobox/FormCombobox.stories.js +106 -0
- package/FormCombobox/FormCombobox.stories.js.map +1 -0
- package/FormDatePicker/FormDatePicker.js +4 -4
- package/FormDatePicker/FormDatePicker.js.map +1 -1
- package/FormDropzone/FormDropzone.js +3 -3
- package/FormDropzone/FormDropzone.js.map +1 -1
- package/FormInput/FormInput.js +6 -6
- package/FormInput/FormInput.js.map +1 -1
- package/FormInput/FormInput.stories.js +13 -12
- package/FormInput/FormInput.stories.js.map +1 -1
- package/FormRadio/FormRadio.js.map +1 -1
- package/FormSelect/FormSelect.d.ts.map +1 -1
- package/FormSelect/FormSelect.js +32 -25
- package/FormSelect/FormSelect.js.map +1 -1
- package/FormTextarea/FormTextarea.js +4 -4
- package/FormTextarea/FormTextarea.js.map +1 -1
- package/Header/Header.js.map +1 -1
- package/HoverCard/HoverCard.js.map +1 -1
- package/InfoBlock/InfoBlock.js.map +1 -1
- package/InfoBlock/InfoBlock.stories.js.map +1 -1
- package/InfoBlock/infoBlockVariants.js.map +1 -1
- package/Input/Input.js.map +1 -1
- package/Input/Input.stories.js.map +1 -1
- package/Input/inputVariants.d.ts.map +1 -1
- package/Input/inputVariants.js +2 -3
- package/Input/inputVariants.js.map +1 -1
- package/InputOTP/InputOTP.d.ts.map +1 -1
- package/InputOTP/InputOTP.js.map +1 -1
- package/LICENSE +21 -21
- package/Label/Label.js.map +1 -1
- package/Label/labelVariants.js.map +1 -1
- package/LazyLoader/LazyLoader.js +5 -4
- package/LazyLoader/LazyLoader.js.map +1 -1
- package/LoadedIcon/LoadedIcon.js.map +1 -1
- package/LoadingMask/LoadingMask.js.map +1 -1
- package/LoadingMask/RenderLoadingMask.js.map +1 -1
- package/LoadingProgress/LoadingProgress.js.map +1 -1
- package/LoadingProgress/loadingProgressVariants.js.map +1 -1
- package/Menubar/Menubar.js.map +1 -1
- package/NavigationMenu/NavigationMenu.js.map +1 -1
- package/NavigationMenu/navigationMenuVariants.js.map +1 -1
- package/Pagination/Pagination.js +1 -0
- package/Pagination/Pagination.js.map +1 -1
- package/Popover/Popover.js.map +1 -1
- package/Progress/Progress.js.map +1 -1
- package/README.md +7 -7
- package/Radio/Radio.js.map +1 -1
- package/RadioGroup/RadioGroup.js.map +1 -1
- package/Resizable/Resizable.js.map +1 -1
- package/Resizable/Resizable.stories.js.map +1 -1
- package/ScrollArea/ScrollArea.js.map +1 -1
- package/Search/Search.js +9 -9
- package/Search/Search.js.map +1 -1
- package/Search/Search.stories.js.map +1 -1
- package/Select/Select.d.ts.map +1 -1
- package/Select/Select.js +63 -50
- package/Select/Select.js.map +1 -1
- package/Select/Select.stories.js.map +1 -1
- package/Select/Select.types.d.ts +2 -0
- package/Select/Select.types.d.ts.map +1 -1
- package/Select/SelectRoot.js.map +1 -1
- package/Separator/Separator.js.map +1 -1
- package/Sheet/Sheet.js.map +1 -1
- package/Sidebar/Sidebar.js +21 -20
- package/Sidebar/Sidebar.js.map +1 -1
- package/Skeleton/Skeleton.js.map +1 -1
- package/Slider/Slider.js.map +1 -1
- package/Sonner/Sonner.js.map +1 -1
- package/Switch/Switch.js.map +1 -1
- package/Switch/Switch.stories.js.map +1 -1
- package/Table/Table.js.map +1 -1
- package/TablePagination/TablePagination.js +26 -21
- package/TablePagination/TablePagination.js.map +1 -1
- package/Tabs/Tabs.js.map +1 -1
- package/Tabs/TabsRoot.js.map +1 -1
- package/Textarea/Textarea.d.ts.map +1 -1
- package/Textarea/Textarea.js +18 -19
- package/Textarea/Textarea.js.map +1 -1
- package/Textarea/Textarea.stories.js.map +1 -1
- package/Textarea/useAutosizeTextArea.js.map +1 -1
- package/Theme/ThemeModeToggle.js +4 -3
- package/Theme/ThemeModeToggle.js.map +1 -1
- package/Theme/ThemeProvider.js.map +1 -1
- package/Toast/Toast.js.map +1 -1
- package/Toast/toast.constants.js.map +1 -1
- package/Toast/toastVariants.js.map +1 -1
- package/Toast/useToast.js.map +1 -1
- package/Toaster/Toaster.js.map +1 -1
- package/Toggle/Toggle.js.map +1 -1
- package/ToggleGroup/ToggleGroup.js.map +1 -1
- package/Tooltip/Tooltip.js.map +1 -1
- package/Tooltip/TooltipRoot.js.map +1 -1
- package/Tooltip/tooltipVariants.js.map +1 -1
- package/index.js +289 -289
- package/package.json +4 -4
- package/vite-env.d.ts +7 -7
package/Drawer/Drawer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.js","sources":["../../src/Drawer/Drawer.tsx"],"sourcesContent":["\"use client\"\
|
|
1
|
+
{"version":3,"file":"Drawer.js","sources":["../../src/Drawer/Drawer.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { Drawer as DrawerPrimitive } from \"vaul\"\n\nimport { cn } from \"@oneplatformdev/utils\";\n\nconst Drawer = ({\n shouldScaleBackground = true,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Root>) => (\n <DrawerPrimitive.Root\n shouldScaleBackground={shouldScaleBackground}\n {...props}\n />\n)\nDrawer.displayName = \"Drawer\"\n\nconst DrawerTrigger = DrawerPrimitive.Trigger\n\nconst DrawerPortal = 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-black/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 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 <div className=\"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted\" />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPortal>\n))\nDrawerContent.displayName = \"DrawerContent\"\n\nconst DrawerHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\"grid gap-1.5 p-4 text-center sm:text-left\", className)}\n {...props}\n />\n)\nDrawerHeader.displayName = \"DrawerHeader\"\n\nconst DrawerFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)}\n {...props}\n />\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\n ref={ref}\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className\n )}\n {...props}\n />\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(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n))\nDrawerDescription.displayName = DrawerPrimitive.Description.displayName\n\nexport {\n Drawer,\n DrawerPortal,\n DrawerOverlay,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n}\n"],"names":["Drawer","shouldScaleBackground","props","jsx","DrawerPrimitive","DrawerTrigger","DrawerPortal","DrawerClose","DrawerOverlay","React","className","ref","cn","DrawerContent","children","jsxs","DrawerHeader","DrawerFooter","DrawerTitle","DrawerDescription"],"mappings":";;;;AAOA,MAAMA,IAAS,CAAC;AAAA,EACd,uBAAAC,IAAwB;AAAA,EACxB,GAAGC;AACL,MACE,gBAAAC;AAAA,EAACC,EAAgB;AAAA,EAAhB;AAAA,IACC,uBAAAH;AAAA,IACC,GAAGC;AAAA,EAAA;AACN;AAEFF,EAAO,cAAc;AAErB,MAAMK,IAAgBD,EAAgB,SAEhCE,IAAeF,EAAgB,QAE/BG,IAAcH,EAAgB,OAE9BI,IAAgBC,EAAM,WAG1B,CAAC,EAAE,WAAAC,GAAW,GAAGR,EAAA,GAASS,MAC1B,gBAAAR;AAAA,EAACC,EAAgB;AAAA,EAAhB;AAAA,IACC,KAAAO;AAAA,IACA,WAAWC,EAAG,kCAAkCF,CAAS;AAAA,IACxD,GAAGR;AAAA,EAAA;AACN,CACD;AACDM,EAAc,cAAcJ,EAAgB,QAAQ;AAEpD,MAAMS,IAAgBJ,EAAM,WAG1B,CAAC,EAAE,WAAAC,GAAW,UAAAI,GAAU,GAAGZ,EAAA,GAASS,MACpC,gBAAAI,EAACT,GAAA,EACC,UAAA;AAAA,EAAA,gBAAAH,EAACK,GAAA,EAAc;AAAA,EACf,gBAAAO;AAAA,IAACX,EAAgB;AAAA,IAAhB;AAAA,MACC,KAAAO;AAAA,MACA,WAAWC;AAAA,QACT;AAAA,QACAF;AAAA,MAAA;AAAA,MAED,GAAGR;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAC,EAAC,OAAA,EAAI,WAAU,mDAAA,CAAmD;AAAA,QACjEW;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AACH,GACF,CACD;AACDD,EAAc,cAAc;AAE5B,MAAMG,IAAe,CAAC;AAAA,EACpB,WAAAN;AAAA,EACA,GAAGR;AACL,MACE,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWS,EAAG,6CAA6CF,CAAS;AAAA,IACnE,GAAGR;AAAA,EAAA;AACN;AAEFc,EAAa,cAAc;AAE3B,MAAMC,IAAe,CAAC;AAAA,EACpB,WAAAP;AAAA,EACA,GAAGR;AACL,MACE,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWS,EAAG,mCAAmCF,CAAS;AAAA,IACzD,GAAGR;AAAA,EAAA;AACN;AAEFe,EAAa,cAAc;AAE3B,MAAMC,IAAcT,EAAM,WAGxB,CAAC,EAAE,WAAAC,GAAW,GAAGR,EAAA,GAASS,MAC1B,gBAAAR;AAAA,EAACC,EAAgB;AAAA,EAAhB;AAAA,IACC,KAAAO;AAAA,IACA,WAAWC;AAAA,MACT;AAAA,MACAF;AAAA,IAAA;AAAA,IAED,GAAGR;AAAA,EAAA;AACN,CACD;AACDgB,EAAY,cAAcd,EAAgB,MAAM;AAEhD,MAAMe,IAAoBV,EAAM,WAG9B,CAAC,EAAE,WAAAC,GAAW,GAAGR,EAAA,GAASS,MAC1B,gBAAAR;AAAA,EAACC,EAAgB;AAAA,EAAhB;AAAA,IACC,KAAAO;AAAA,IACA,WAAWC,EAAG,iCAAiCF,CAAS;AAAA,IACvD,GAAGR;AAAA,EAAA;AACN,CACD;AACDiB,EAAkB,cAAcf,EAAgB,YAAY;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownMenu.js","sources":["../../src/DropdownMenu/DropdownMenu.tsx"],"sourcesContent":["\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\"\r\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from \"lucide-react\"\r\n\r\nimport { cn } from \"@oneplatformdev/utils\"\r\n\r\nfunction DropdownMenu({\r\n ...props\r\n }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {\r\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />\r\n}\r\n\r\nfunction DropdownMenuPortal({\r\n ...props\r\n }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\r\n return (\r\n <DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />\r\n )\r\n}\r\n\r\nfunction DropdownMenuTrigger({\r\n ...props\r\n }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {\r\n return (\r\n <DropdownMenuPrimitive.Trigger\r\n data-slot=\"dropdown-menu-trigger\"\r\n {...props}\r\n />\r\n )\r\n}\r\n\r\nfunction DropdownMenuContent({\r\n className,\r\n sideOffset = 4,\r\n ...props\r\n }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {\r\n return (\r\n <DropdownMenuPrimitive.Portal>\r\n <DropdownMenuPrimitive.Content\r\n data-slot=\"dropdown-menu-content\"\r\n sideOffset={sideOffset}\r\n className={cn(\r\n 'rounded-lg border border-[#EBEBEB] p-1',\r\n \"bg-[#FCFCFC] shadow-[1px_1px_10px_rgba(6,8,13,0.06)]\",\r\n 'text-sm text-[#06080D] font-medium leading-[1.25]',\r\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 z-50',\r\n 'max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin)',\r\n 'overflow-x-hidden overflow-y-auto',\r\n className\r\n )}\r\n {...props}\r\n />\r\n </DropdownMenuPrimitive.Portal>\r\n )\r\n}\r\n\r\nfunction DropdownMenuGroup({\r\n ...props\r\n }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {\r\n return (\r\n <DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />\r\n )\r\n}\r\n\r\nfunction DropdownMenuItem({\r\n className,\r\n inset,\r\n variant = \"default\",\r\n ...props\r\n }: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {\r\n inset?: boolean\r\n variant?: \"default\" | \"destructive\"\r\n}) {\r\n return (\r\n <DropdownMenuPrimitive.Item\r\n data-slot=\"dropdown-menu-item\"\r\n data-inset={inset}\r\n data-variant={variant}\r\n className={cn(\r\n 'relative flex items-center gap-1 rounded-md p-1',\r\n 'text-sm text-[#06080D] font-medium leading-[1.25]',\r\n \"[&_svg:not([class*='text-'])]:text-[#06080D]\",\r\n 'outline-hidden select-none',\r\n 'focus:bg-accent focus:text-accent-foreground ',\r\n \"data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive\",\r\n \"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-6\",\r\n 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8',\r\n 'cursor-pointer',\r\n className\r\n )}\r\n {...props}\r\n />\r\n )\r\n}\r\n\r\n\r\nfunction DropdownMenuCheckboxItem({\r\n className,\r\n children,\r\n checked,\r\n ...props\r\n }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {\r\n return (\r\n <DropdownMenuPrimitive.CheckboxItem\r\n data-slot=\"dropdown-menu-checkbox-item\"\r\n className={cn(\r\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\r\n className\r\n )}\r\n checked={checked}\r\n {...props}\r\n >\r\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\r\n <DropdownMenuPrimitive.ItemIndicator>\r\n <CheckIcon className=\"size-4\" />\r\n </DropdownMenuPrimitive.ItemIndicator>\r\n </span>\r\n {children}\r\n </DropdownMenuPrimitive.CheckboxItem>\r\n )\r\n}\r\n\r\nfunction DropdownMenuRadioGroup({\r\n ...props\r\n }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {\r\n return (\r\n <DropdownMenuPrimitive.RadioGroup\r\n data-slot=\"dropdown-menu-radio-group\"\r\n {...props}\r\n />\r\n )\r\n}\r\n\r\nfunction DropdownMenuRadioItem({\r\n className,\r\n children,\r\n ...props\r\n }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {\r\n return (\r\n <DropdownMenuPrimitive.RadioItem\r\n data-slot=\"dropdown-menu-radio-item\"\r\n className={cn(\r\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\r\n className\r\n )}\r\n {...props}\r\n >\r\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\r\n <DropdownMenuPrimitive.ItemIndicator>\r\n <CircleIcon className=\"size-2 fill-current\" />\r\n </DropdownMenuPrimitive.ItemIndicator>\r\n </span>\r\n {children}\r\n </DropdownMenuPrimitive.RadioItem>\r\n )\r\n}\r\n\r\nfunction DropdownMenuLabel({\r\n className,\r\n inset,\r\n ...props\r\n }: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {\r\n inset?: boolean\r\n}) {\r\n return (\r\n <DropdownMenuPrimitive.Label\r\n data-slot=\"dropdown-menu-label\"\r\n data-inset={inset}\r\n className={cn(\r\n \"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8\",\r\n className\r\n )}\r\n {...props}\r\n />\r\n )\r\n}\r\n\r\nfunction DropdownMenuSeparator({\r\n className,\r\n ...props\r\n }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {\r\n return (\r\n <DropdownMenuPrimitive.Separator\r\n data-slot=\"dropdown-menu-separator\"\r\n className={cn(\"bg-border -mx-1 my-1 h-px\", className)}\r\n {...props}\r\n />\r\n )\r\n}\r\n\r\nfunction DropdownMenuShortcut({\r\n className,\r\n ...props\r\n }: React.ComponentProps<\"span\">) {\r\n return (\r\n <span\r\n data-slot=\"dropdown-menu-shortcut\"\r\n className={cn(\r\n \"text-muted-foreground ml-auto text-xs tracking-widest\",\r\n className\r\n )}\r\n {...props}\r\n />\r\n )\r\n}\r\n\r\nfunction DropdownMenuSub({\r\n ...props\r\n }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\r\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />\r\n}\r\n\r\nfunction DropdownMenuSubTrigger({\r\n className,\r\n inset,\r\n children,\r\n ...props\r\n }: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\r\n inset?: boolean\r\n}) {\r\n return (\r\n <DropdownMenuPrimitive.SubTrigger\r\n data-slot=\"dropdown-menu-sub-trigger\"\r\n data-inset={inset}\r\n className={cn(\r\n \"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8\",\r\n className\r\n )}\r\n {...props}\r\n >\r\n {children}\r\n <ChevronRightIcon className=\"ml-auto size-4\" />\r\n </DropdownMenuPrimitive.SubTrigger>\r\n )\r\n}\r\n\r\nfunction DropdownMenuSubContent({\r\n className,\r\n ...props\r\n }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\r\n return (\r\n <DropdownMenuPrimitive.SubContent\r\n data-slot=\"dropdown-menu-sub-content\"\r\n className={cn(\r\n \"bg-popover text-popover-foreground 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 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg\",\r\n className\r\n )}\r\n {...props}\r\n />\r\n )\r\n}\r\n\r\nexport {\r\n DropdownMenu,\r\n DropdownMenuPortal,\r\n DropdownMenuTrigger,\r\n DropdownMenuContent,\r\n DropdownMenuGroup,\r\n DropdownMenuLabel,\r\n DropdownMenuItem,\r\n DropdownMenuCheckboxItem,\r\n DropdownMenuRadioGroup,\r\n DropdownMenuRadioItem,\r\n DropdownMenuSeparator,\r\n DropdownMenuShortcut,\r\n DropdownMenuSub,\r\n DropdownMenuSubTrigger,\r\n DropdownMenuSubContent,\r\n DropdownMenuPrimitive\r\n}\r\n"],"names":["DropdownMenu","props","DropdownMenuPrimitive","DropdownMenuPortal","DropdownMenuTrigger","jsx","DropdownMenuContent","className","sideOffset","cn","DropdownMenuGroup","DropdownMenuItem","inset","variant","DropdownMenuCheckboxItem","children","checked","jsxs","CheckIcon","DropdownMenuRadioGroup","DropdownMenuRadioItem","CircleIcon","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut","DropdownMenuSub","DropdownMenuSubTrigger","ChevronRightIcon","DropdownMenuSubContent"],"mappings":";;;;AAQA,SAASA,EAAa;AAAA,EACE,GAAGC;AACL,GAA4D;AAChF,2BAAQC,EAAsB,MAAtB,EAA2B,aAAU,iBAAiB,GAAGD,GAAO;AAC1E;AAEA,SAASE,EAAmB;AAAA,EACE,GAAGF;AACL,GAA8D;AACxF,2BACGC,EAAsB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AAAA,MAED,GAAGN;AAAA,IAAA;AAAA,EAAA;AAGV;"}
|
|
1
|
+
{"version":3,"file":"DropdownMenu.js","sources":["../../src/DropdownMenu/DropdownMenu.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\"\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from \"lucide-react\"\n\nimport { cn } from \"@oneplatformdev/utils\"\n\nfunction DropdownMenu({\n ...props\n }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />\n}\n\nfunction DropdownMenuPortal({\n ...props\n }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\n return (\n <DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />\n )\n}\n\nfunction DropdownMenuTrigger({\n ...props\n }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {\n return (\n <DropdownMenuPrimitive.Trigger\n data-slot=\"dropdown-menu-trigger\"\n {...props}\n />\n )\n}\n\nfunction DropdownMenuContent({\n className,\n sideOffset = 4,\n ...props\n }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n data-slot=\"dropdown-menu-content\"\n sideOffset={sideOffset}\n className={cn(\n 'rounded-lg border border-[#EBEBEB] p-1',\n \"bg-[#FCFCFC] shadow-[1px_1px_10px_rgba(6,8,13,0.06)]\",\n 'text-sm text-[#06080D] font-medium leading-[1.25]',\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 z-50',\n 'max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin)',\n 'overflow-x-hidden overflow-y-auto',\n className\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n )\n}\n\nfunction DropdownMenuGroup({\n ...props\n }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {\n return (\n <DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />\n )\n}\n\nfunction DropdownMenuItem({\n className,\n inset,\n variant = \"default\",\n ...props\n }: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean\n variant?: \"default\" | \"destructive\"\n}) {\n return (\n <DropdownMenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n 'relative flex items-center gap-1 rounded-md p-1',\n 'text-sm text-[#06080D] font-medium leading-[1.25]',\n \"[&_svg:not([class*='text-'])]:text-[#06080D]\",\n 'outline-hidden select-none',\n 'focus:bg-accent focus:text-accent-foreground ',\n \"data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive\",\n \"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-6\",\n 'data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8',\n 'cursor-pointer',\n className\n )}\n {...props}\n />\n )\n}\n\n\nfunction DropdownMenuCheckboxItem({\n className,\n children,\n checked,\n ...props\n }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {\n return (\n <DropdownMenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n )\n}\n\nfunction DropdownMenuRadioGroup({\n ...props\n }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {\n return (\n <DropdownMenuPrimitive.RadioGroup\n data-slot=\"dropdown-menu-radio-group\"\n {...props}\n />\n )\n}\n\nfunction DropdownMenuRadioItem({\n className,\n children,\n ...props\n }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {\n return (\n <DropdownMenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CircleIcon className=\"size-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n )\n}\n\nfunction DropdownMenuLabel({\n className,\n inset,\n ...props\n }: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean\n}) {\n return (\n <DropdownMenuPrimitive.Label\n data-slot=\"dropdown-menu-label\"\n data-inset={inset}\n className={cn(\n \"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuSeparator({\n className,\n ...props\n }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {\n return (\n <DropdownMenuPrimitive.Separator\n data-slot=\"dropdown-menu-separator\"\n className={cn(\"bg-border -mx-1 my-1 h-px\", className)}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuShortcut({\n className,\n ...props\n }: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"dropdown-menu-shortcut\"\n className={cn(\n \"text-muted-foreground ml-auto text-xs tracking-widest\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuSub({\n ...props\n }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />\n}\n\nfunction DropdownMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n }: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean\n}) {\n return (\n <DropdownMenuPrimitive.SubTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n )\n}\n\nfunction DropdownMenuSubContent({\n className,\n ...props\n }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\n return (\n <DropdownMenuPrimitive.SubContent\n data-slot=\"dropdown-menu-sub-content\"\n className={cn(\n \"bg-popover text-popover-foreground 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 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n DropdownMenu,\n DropdownMenuPortal,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n DropdownMenuPrimitive\n}\n"],"names":["DropdownMenu","props","DropdownMenuPrimitive","DropdownMenuPortal","DropdownMenuTrigger","jsx","DropdownMenuContent","className","sideOffset","cn","DropdownMenuGroup","DropdownMenuItem","inset","variant","DropdownMenuCheckboxItem","children","checked","jsxs","CheckIcon","DropdownMenuRadioGroup","DropdownMenuRadioItem","CircleIcon","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut","DropdownMenuSub","DropdownMenuSubTrigger","ChevronRightIcon","DropdownMenuSubContent"],"mappings":";;;;AAQA,SAASA,EAAa;AAAA,EACE,GAAGC;AACL,GAA4D;AAChF,2BAAQC,EAAsB,MAAtB,EAA2B,aAAU,iBAAiB,GAAGD,GAAO;AAC1E;AAEA,SAASE,EAAmB;AAAA,EACE,GAAGF;AACL,GAA8D;AACxF,2BACGC,EAAsB,QAAtB,EAA6B,aAAU,wBAAwB,GAAGD,GAAO;AAE9E;AAEA,SAASG,EAAoB;AAAA,EACE,GAAGH;AACL,GAA+D;AAC1F,SACE,gBAAAI;AAAA,IAACH,EAAsB;AAAA,IAAtB;AAAA,MACC,aAAU;AAAA,MACT,GAAGD;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASK,EAAoB;AAAA,EACE,WAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,GAAGP;AACL,GAA+D;AAC1F,SACE,gBAAAI,EAACH,EAAsB,QAAtB,EACC,UAAA,gBAAAG;AAAA,IAACH,EAAsB;AAAA,IAAtB;AAAA,MACC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C,aAAU;AAAA,MACV,WAAWI;AAAA,QACT;AAAA,QACAF;AAAA,MAAA;AAAA,MAED,GAAGN;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASwB,EAAgB;AAAA,EACE,GAAGxB;AACL,GAA2D;AAClF,2BAAQC,EAAsB,KAAtB,EAA0B,aAAU,qBAAqB,GAAGD,GAAO;AAC7E;AAEA,SAASyB,EAAuB;AAAA,EACE,WAAAnB;AAAA,EACA,OAAAK;AAAA,EACA,UAAAG;AAAA,EACA,GAAGd;AACL,GAE7B;AACD,SACE,gBAAAgB;AAAA,IAACf,EAAsB;AAAA,IAAtB;AAAA,MACC,aAAU;AAAA,MACV,cAAYU;AAAA,MACZ,WAAWH;AAAA,QACT;AAAA,QACAF;AAAA,MAAA;AAAA,MAED,GAAGN;AAAA,MAEH,UAAA;AAAA,QAAAc;AAAA,QACD,gBAAAV,EAACsB,GAAA,EAAiB,WAAU,iBAAA,CAAiB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGnD;AAEA,SAASC,EAAuB;AAAA,EACE,WAAArB;AAAA,EACA,GAAGN;AACL,GAAkE;AAChG,SACE,gBAAAI;AAAA,IAACH,EAAsB;AAAA,IAAtB;AAAA,MACC,aAAU;AAAA,MACV,WAAWO;AAAA,QACT;AAAA,QACAF;AAAA,MAAA;AAAA,MAED,GAAGN;AAAA,IAAA;AAAA,EAAA;AAGV;"}
|
package/Dropzone/Dropzone.js
CHANGED
|
@@ -1,67 +1,68 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as r, jsx as t, Fragment as V } from "react/jsx-runtime";
|
|
2
2
|
import { X as M, Plus as ke, UploadIcon as We, FileTextIcon as ee, InfoIcon as te } from "lucide-react";
|
|
3
|
-
import { forwardRef as _e, useState as
|
|
3
|
+
import { forwardRef as _e, useState as re, useEffect as $e, useImperativeHandle as Le } from "react";
|
|
4
4
|
import { useDropzone as Ge } from "react-dropzone";
|
|
5
5
|
import { cn as x } from "@oneplatformdev/utils";
|
|
6
6
|
import { Card as Xe } from "../Card/Card.js";
|
|
7
7
|
import { DEFAULT_FILE_TYPES as Ke } from "./Dropzone.types.js";
|
|
8
|
-
import { DropzoneCoverPreview as
|
|
8
|
+
import { DropzoneCoverPreview as le } from "./DropzoneCoverPreview.js";
|
|
9
9
|
import { DropzoneFileCard as Oe } from "./DropzoneFileCard.js";
|
|
10
10
|
import { FilePreview as Te } from "./DropzoneFilePreview.js";
|
|
11
11
|
import { DropzoneSinglePickPreview as qe } from "./DropzoneSinglePickPreview.js";
|
|
12
12
|
import { isFile as F, isVideoUrl as He, extractName as oe } from "./DropzoneUtils.js";
|
|
13
|
-
import Je from "
|
|
14
|
-
import
|
|
15
|
-
import
|
|
13
|
+
import { Button as Je } from "../Button/Button.js";
|
|
14
|
+
import "../Button/buttonVariants.js";
|
|
15
|
+
import Pe from "./icons/file-csv.svg.js";
|
|
16
|
+
import Ye from "./icons/file-doc.svg.js";
|
|
17
|
+
import Ze from "./icons/file-docx.svg.js";
|
|
16
18
|
import ie from "./icons/file-jpg.svg.js";
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
19
|
+
import Qe from "./icons/file-pdf.svg.js";
|
|
20
|
+
import Ue from "./icons/file-png.svg.js";
|
|
21
|
+
import Ve from "./icons/file-ppt.svg.js";
|
|
22
|
+
import et from "./icons/file-pptx.svg.js";
|
|
23
|
+
import tt from "./icons/file-rar.svg.js";
|
|
24
|
+
import rt from "./icons/file-svg.svg.js";
|
|
23
25
|
import lt from "./icons/file-webp.svg.js";
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
if (!r || r < 0) return "0 KB";
|
|
26
|
+
import ot from "./icons/file-xls.svg.js";
|
|
27
|
+
import it from "./icons/file-xlsx.svg.js";
|
|
28
|
+
import nt from "./icons/file-zip.svg.js";
|
|
29
|
+
const z = (l = 0) => {
|
|
30
|
+
if (!l || l < 0) return "0 KB";
|
|
30
31
|
const s = 1024, d = s * 1024, m = d * 1024;
|
|
31
|
-
if (
|
|
32
|
-
if (
|
|
33
|
-
const a =
|
|
32
|
+
if (l >= m) return `${(l / m).toFixed(2)} GB`;
|
|
33
|
+
if (l >= d) {
|
|
34
|
+
const a = l / d;
|
|
34
35
|
return `${a >= 100 ? a.toFixed(0) : a.toFixed(2)} MB`;
|
|
35
36
|
}
|
|
36
|
-
return
|
|
37
|
+
return l >= s ? `${(l / s).toFixed(l / s >= 100 ? 0 : 1)} KB` : `${l} B`;
|
|
37
38
|
}, st = {
|
|
38
|
-
csv:
|
|
39
|
-
doc:
|
|
40
|
-
docx:
|
|
39
|
+
csv: Pe,
|
|
40
|
+
doc: Ye,
|
|
41
|
+
docx: Ze,
|
|
41
42
|
jpg: ie,
|
|
42
43
|
jpeg: ie,
|
|
43
|
-
pdf:
|
|
44
|
-
png:
|
|
45
|
-
ppt:
|
|
46
|
-
pptx:
|
|
47
|
-
rar:
|
|
48
|
-
svg:
|
|
44
|
+
pdf: Qe,
|
|
45
|
+
png: Ue,
|
|
46
|
+
ppt: Ve,
|
|
47
|
+
pptx: et,
|
|
48
|
+
rar: tt,
|
|
49
|
+
svg: rt,
|
|
49
50
|
webp: lt,
|
|
50
|
-
xls:
|
|
51
|
-
xlsx:
|
|
52
|
-
zip:
|
|
53
|
-
}, ct = (
|
|
54
|
-
if (!
|
|
55
|
-
const s =
|
|
51
|
+
xls: ot,
|
|
52
|
+
xlsx: it,
|
|
53
|
+
zip: nt
|
|
54
|
+
}, ct = (l) => {
|
|
55
|
+
if (!l) return "";
|
|
56
|
+
const s = l.toLowerCase().split(".");
|
|
56
57
|
return s.length > 1 ? s[s.length - 1] : "";
|
|
57
|
-
}, ne = (
|
|
58
|
-
const s = ct(
|
|
58
|
+
}, ne = (l) => {
|
|
59
|
+
const s = ct(l);
|
|
59
60
|
return st[s] ?? null;
|
|
60
|
-
}, at = (
|
|
61
|
-
if (
|
|
62
|
-
if (
|
|
63
|
-
for (let d = 0; d <
|
|
64
|
-
const m =
|
|
61
|
+
}, at = (l, s) => {
|
|
62
|
+
if (l === s) return !0;
|
|
63
|
+
if (l.length !== s.length) return !1;
|
|
64
|
+
for (let d = 0; d < l.length; d++) {
|
|
65
|
+
const m = l[d], a = s[d];
|
|
65
66
|
if (m !== a) {
|
|
66
67
|
if (typeof m == "string" && typeof a == "string") {
|
|
67
68
|
if (m !== a) return !1;
|
|
@@ -78,7 +79,7 @@ const z = (r = 0) => {
|
|
|
78
79
|
return !0;
|
|
79
80
|
}, dt = _e(
|
|
80
81
|
({
|
|
81
|
-
acceptTypes:
|
|
82
|
+
acceptTypes: l = Ke,
|
|
82
83
|
maxSizeMB: s,
|
|
83
84
|
maxFiles: d = 1,
|
|
84
85
|
onErrors: m,
|
|
@@ -116,7 +117,7 @@ const z = (r = 0) => {
|
|
|
116
117
|
coverFirstItem: ze = !1,
|
|
117
118
|
...$
|
|
118
119
|
}, be) => {
|
|
119
|
-
const [o, A] =
|
|
120
|
+
const [o, A] = re(I ?? []), [u, P] = re([]), w = o[0], L = u[0]?.file, Ie = !!L?.type?.includes("image"), G = n && o.length > 0 && F(w), Ee = G && w.type.includes("image"), Y = G && w.type.includes("video") || n && o.length > 0 && typeof w == "string" && He(w), X = G && !Ee && !Y, Z = n && !o.length && !!L && !Ie, v = X ? w : L, S = ne(v?.name), j = n && Y, De = j, B = n && o.length > 0, ye = B && !X && !j, N = h === "file-list" && !n && o.length >= d, Ae = (e, c) => {
|
|
120
121
|
P(c), m?.(c);
|
|
121
122
|
const i = n ? e.slice(0, 1) : [...o, ...e].slice(0, d);
|
|
122
123
|
A(i), q?.(i);
|
|
@@ -131,7 +132,7 @@ const z = (r = 0) => {
|
|
|
131
132
|
A(i), q?.(i);
|
|
132
133
|
}, { getRootProps: Se, getInputProps: je, isDragActive: Be, open: K } = Ge({
|
|
133
134
|
onDrop: Ae,
|
|
134
|
-
accept:
|
|
135
|
+
accept: l.reduce((e, c) => (e[c] = [], e), {}),
|
|
135
136
|
maxSize: s * 1024 * 1024,
|
|
136
137
|
maxFiles: n ? 1 : d,
|
|
137
138
|
disabled: f || p || N,
|
|
@@ -140,8 +141,8 @@ const z = (r = 0) => {
|
|
|
140
141
|
Le(be, () => ({
|
|
141
142
|
setItems: A
|
|
142
143
|
}), []);
|
|
143
|
-
const D = ze && h === "image-grid" && !n && o.length > 0, O = !p && !n && _ && o.length > 0, T = D ? o.slice(1) : o, Q = !f && !n && h === "image-grid" && o.length > 0 && o.length < d, Me = !n && h === "image-grid" && (_ || o.length === 0), U = !p && !n && (T.length > 0 || Q) && /* @__PURE__ */
|
|
144
|
-
h === "default" && /* @__PURE__ */
|
|
144
|
+
const D = ze && h === "image-grid" && !n && o.length > 0, O = !p && !n && _ && o.length > 0, T = D ? o.slice(1) : o, Q = !f && !n && h === "image-grid" && o.length > 0 && o.length < d, Me = !n && h === "image-grid" && (_ || o.length === 0), U = !p && !n && (T.length > 0 || Q) && /* @__PURE__ */ r("div", { className: x("w-full mt-2", b?.previewWrapper), children: [
|
|
145
|
+
h === "default" && /* @__PURE__ */ r("pre", { className: "font-semibold text-gray-600", children: [
|
|
145
146
|
de,
|
|
146
147
|
":"
|
|
147
148
|
] }),
|
|
@@ -158,7 +159,7 @@ const z = (r = 0) => {
|
|
|
158
159
|
},
|
|
159
160
|
c
|
|
160
161
|
);
|
|
161
|
-
}) }) : /* @__PURE__ */
|
|
162
|
+
}) }) : /* @__PURE__ */ r(
|
|
162
163
|
"ul",
|
|
163
164
|
{
|
|
164
165
|
className: x(
|
|
@@ -168,7 +169,7 @@ const z = (r = 0) => {
|
|
|
168
169
|
children: [
|
|
169
170
|
T.map((e, c) => {
|
|
170
171
|
const i = D ? c + 1 : c, g = F(e) ? e.name : oe(e), C = F(e) ? z(e.size) : "";
|
|
171
|
-
return /* @__PURE__ */
|
|
172
|
+
return /* @__PURE__ */ r(
|
|
172
173
|
"li",
|
|
173
174
|
{
|
|
174
175
|
className: x(
|
|
@@ -176,8 +177,8 @@ const z = (r = 0) => {
|
|
|
176
177
|
h === "image-grid" ? "w-[75px] h-[75px]" : "flex flex-col items-center gap-2"
|
|
177
178
|
),
|
|
178
179
|
children: [
|
|
179
|
-
/* @__PURE__ */
|
|
180
|
-
h === "image-grid" ? /* @__PURE__ */ t(
|
|
180
|
+
/* @__PURE__ */ r("div", { className: "relative w-full h-full", children: [
|
|
181
|
+
h === "image-grid" ? /* @__PURE__ */ t(le, { item: e, className: "rounded-[8px]" }) : /* @__PURE__ */ t(Te, { item: e, styles: b }),
|
|
181
182
|
/* @__PURE__ */ t(
|
|
182
183
|
"div",
|
|
183
184
|
{
|
|
@@ -190,9 +191,9 @@ const z = (r = 0) => {
|
|
|
190
191
|
}
|
|
191
192
|
)
|
|
192
193
|
] }),
|
|
193
|
-
h === "default" && /* @__PURE__ */
|
|
194
|
+
h === "default" && /* @__PURE__ */ r("span", { className: "inline-flex flex-col items-center", children: [
|
|
194
195
|
/* @__PURE__ */ t("span", { className: "max-w-[80px] text-ellipsis overflow-hidden whitespace-nowrap", children: g }),
|
|
195
|
-
C && /* @__PURE__ */
|
|
196
|
+
C && /* @__PURE__ */ r("span", { children: [
|
|
196
197
|
"(",
|
|
197
198
|
C,
|
|
198
199
|
")"
|
|
@@ -218,8 +219,8 @@ const z = (r = 0) => {
|
|
|
218
219
|
}
|
|
219
220
|
)
|
|
220
221
|
] });
|
|
221
|
-
return /* @__PURE__ */
|
|
222
|
-
/* @__PURE__ */
|
|
222
|
+
return /* @__PURE__ */ r("div", { className: "w-full select-none", children: [
|
|
223
|
+
/* @__PURE__ */ r(
|
|
223
224
|
Xe,
|
|
224
225
|
{
|
|
225
226
|
...$,
|
|
@@ -252,22 +253,22 @@ const z = (r = 0) => {
|
|
|
252
253
|
),
|
|
253
254
|
children: [
|
|
254
255
|
/* @__PURE__ */ t("input", { ...je() }),
|
|
255
|
-
p && /* @__PURE__ */
|
|
256
|
+
p && /* @__PURE__ */ r(
|
|
256
257
|
"div",
|
|
257
258
|
{
|
|
258
259
|
className: "w-full h-full min-h-46 rounded-lg border border-[#E4E4E7] bg-[#FCFCFC] flex flex-col items-center justify-center gap-4 p-4",
|
|
259
260
|
onClick: (e) => e.stopPropagation(),
|
|
260
261
|
children: [
|
|
261
|
-
/* @__PURE__ */
|
|
262
|
+
/* @__PURE__ */ r("div", { className: "relative h-24 w-24", children: [
|
|
262
263
|
/* @__PURE__ */ t("svg", { className: "h-24 w-24", viewBox: "0 0 100 100", children: /* @__PURE__ */ t("circle", { cx: "50", cy: "50", r: "42", stroke: "#E6E1F5", strokeWidth: "8", fill: "none" }) }),
|
|
263
|
-
/* @__PURE__ */
|
|
264
|
+
/* @__PURE__ */ r("span", { className: "absolute inset-0 flex items-center justify-center text-lg font-semibold text-foreground", children: [
|
|
264
265
|
Math.max(0, Math.min(100, Math.round(H))),
|
|
265
266
|
"%"
|
|
266
267
|
] })
|
|
267
268
|
] }),
|
|
268
|
-
/* @__PURE__ */
|
|
269
|
+
/* @__PURE__ */ r("div", { className: "text-center", children: [
|
|
269
270
|
/* @__PURE__ */ t("p", { className: "text-xl font-semibold text-foreground", children: Ne }),
|
|
270
|
-
/* @__PURE__ */
|
|
271
|
+
/* @__PURE__ */ r("p", { className: "text-sm text-[#666A78]", children: [
|
|
271
272
|
z(ue),
|
|
272
273
|
" ",
|
|
273
274
|
ve,
|
|
@@ -297,13 +298,13 @@ const z = (r = 0) => {
|
|
|
297
298
|
]
|
|
298
299
|
}
|
|
299
300
|
),
|
|
300
|
-
!p && D && /* @__PURE__ */
|
|
301
|
+
!p && D && /* @__PURE__ */ r(
|
|
301
302
|
"div",
|
|
302
303
|
{
|
|
303
304
|
className: "absolute inset-0 rounded-[8px] overflow-hidden",
|
|
304
305
|
onClick: (e) => e.stopPropagation(),
|
|
305
306
|
children: [
|
|
306
|
-
/* @__PURE__ */ t(
|
|
307
|
+
/* @__PURE__ */ t(le, { item: o[0], className: "rounded-[8px]" }),
|
|
307
308
|
/* @__PURE__ */ t(
|
|
308
309
|
"div",
|
|
309
310
|
{
|
|
@@ -315,7 +316,7 @@ const z = (r = 0) => {
|
|
|
315
316
|
]
|
|
316
317
|
}
|
|
317
318
|
),
|
|
318
|
-
!p && (o.length === 0 || !n && _) && (u.length === 0 || !n) && /* @__PURE__ */
|
|
319
|
+
!p && (o.length === 0 || !n && _) && (u.length === 0 || !n) && /* @__PURE__ */ r(
|
|
319
320
|
"div",
|
|
320
321
|
{
|
|
321
322
|
className: x(
|
|
@@ -342,7 +343,7 @@ const z = (r = 0) => {
|
|
|
342
343
|
)
|
|
343
344
|
}
|
|
344
345
|
),
|
|
345
|
-
/* @__PURE__ */ t("div", { className: "flex flex-col items-center gap-1 w-full", children: !f && /* @__PURE__ */
|
|
346
|
+
/* @__PURE__ */ t("div", { className: "flex flex-col items-center gap-1 w-full", children: !f && /* @__PURE__ */ r(V, { children: [
|
|
346
347
|
/* @__PURE__ */ t(
|
|
347
348
|
"span",
|
|
348
349
|
{
|
|
@@ -366,7 +367,7 @@ const z = (r = 0) => {
|
|
|
366
367
|
)
|
|
367
368
|
] }) }),
|
|
368
369
|
!f && /* @__PURE__ */ t(
|
|
369
|
-
|
|
370
|
+
Je,
|
|
370
371
|
{
|
|
371
372
|
type: "button",
|
|
372
373
|
size: "md",
|
|
@@ -377,31 +378,31 @@ const z = (r = 0) => {
|
|
|
377
378
|
]
|
|
378
379
|
}
|
|
379
380
|
),
|
|
380
|
-
!p && n && u.length > 0 && !Z && /* @__PURE__ */
|
|
381
|
-
/* @__PURE__ */
|
|
381
|
+
!p && n && u.length > 0 && !Z && /* @__PURE__ */ r("div", { className: x("w-full mt-4", b?.errorWrapper), children: [
|
|
382
|
+
/* @__PURE__ */ r("span", { className: "font-semibold text-red-500", children: [
|
|
382
383
|
me,
|
|
383
384
|
":"
|
|
384
385
|
] }),
|
|
385
|
-
/* @__PURE__ */ t("ul", { className: "mt-2 text-sm text-red-500 list-disc list-inside", children: u.map((e, c) => /* @__PURE__ */
|
|
386
|
+
/* @__PURE__ */ t("ul", { className: "mt-2 text-sm text-red-500 list-disc list-inside", children: u.map((e, c) => /* @__PURE__ */ r("li", { children: [
|
|
386
387
|
e.file.name,
|
|
387
388
|
" (",
|
|
388
389
|
z(e.file.size),
|
|
389
390
|
")",
|
|
390
|
-
!a && /* @__PURE__ */ t("ul", { className: "ml-4 list-disc list-inside", children: e.errors.map((i, g) => /* @__PURE__ */
|
|
391
|
+
!a && /* @__PURE__ */ t("ul", { className: "ml-4 list-disc list-inside", children: e.errors.map((i, g) => /* @__PURE__ */ r("li", { children: [
|
|
391
392
|
i.code === "file-too-large" && k,
|
|
392
393
|
i.code === "file-invalid-type" && y,
|
|
393
394
|
i.code !== "file-too-large" && i.code !== "file-invalid-type" && i.message
|
|
394
395
|
] }, g)) })
|
|
395
396
|
] }, c)) })
|
|
396
397
|
] }),
|
|
397
|
-
!p && !!(n && o.length) && /* @__PURE__ */ t(V, { children: X ? /* @__PURE__ */
|
|
398
|
+
!p && !!(n && o.length) && /* @__PURE__ */ t(V, { children: X ? /* @__PURE__ */ r(
|
|
398
399
|
"div",
|
|
399
400
|
{
|
|
400
401
|
className: "w-full max-w-[502px] flex flex-col items-center gap-4",
|
|
401
402
|
onClick: (e) => e.stopPropagation(),
|
|
402
403
|
children: [
|
|
403
404
|
/* @__PURE__ */ t("p", { className: "w-full text-center text-[16px] leading-[130%] font-semibold text-[#06080D]", children: R }),
|
|
404
|
-
/* @__PURE__ */
|
|
405
|
+
/* @__PURE__ */ r("div", { className: "w-full min-h-[72px] rounded-[8px] bg-[#F5F5F5] p-4 flex items-center gap-4", children: [
|
|
405
406
|
S ? /* @__PURE__ */ t(
|
|
406
407
|
"img",
|
|
407
408
|
{
|
|
@@ -410,7 +411,7 @@ const z = (r = 0) => {
|
|
|
410
411
|
className: "size-10 shrink-0"
|
|
411
412
|
}
|
|
412
413
|
) : /* @__PURE__ */ t("div", { className: "size-10 rounded-[8px] bg-[#DC2626] text-white flex items-center justify-center shrink-0", children: /* @__PURE__ */ t(ee, { size: 20 }) }),
|
|
413
|
-
/* @__PURE__ */
|
|
414
|
+
/* @__PURE__ */ r("div", { className: "flex flex-col items-start text-left gap-1 min-w-0 flex-1", children: [
|
|
414
415
|
/* @__PURE__ */ t("span", { className: "w-full text-[14px] font-semibold leading-[125%] text-[#06080D] truncate", children: W?.name || v?.name }),
|
|
415
416
|
/* @__PURE__ */ t("span", { className: "w-full text-[12px] font-medium leading-[120%] text-[#666A78]", children: z(W?.size || v?.size) })
|
|
416
417
|
] }),
|
|
@@ -440,14 +441,14 @@ const z = (r = 0) => {
|
|
|
440
441
|
playerTranslations: Ce
|
|
441
442
|
}
|
|
442
443
|
) }),
|
|
443
|
-
!p && Z && /* @__PURE__ */
|
|
444
|
+
!p && Z && /* @__PURE__ */ r(
|
|
444
445
|
"div",
|
|
445
446
|
{
|
|
446
447
|
className: "w-full max-w-[502px] flex flex-col items-center gap-4",
|
|
447
448
|
onClick: (e) => e.stopPropagation(),
|
|
448
449
|
children: [
|
|
449
450
|
/* @__PURE__ */ t("p", { className: "w-full text-center text-[16px] leading-[130%] font-semibold text-[#06080D]", children: R }),
|
|
450
|
-
/* @__PURE__ */
|
|
451
|
+
/* @__PURE__ */ r("div", { className: "w-full min-h-[72px] rounded-[8px] bg-[#F5F5F5] p-4 flex items-center gap-4", children: [
|
|
451
452
|
S ? /* @__PURE__ */ t(
|
|
452
453
|
"img",
|
|
453
454
|
{
|
|
@@ -456,7 +457,7 @@ const z = (r = 0) => {
|
|
|
456
457
|
className: "size-10 shrink-0"
|
|
457
458
|
}
|
|
458
459
|
) : /* @__PURE__ */ t("div", { className: "size-10 rounded-[8px] bg-[#DC2626] text-white flex items-center justify-center shrink-0", children: /* @__PURE__ */ t(ee, { size: 20 }) }),
|
|
459
|
-
/* @__PURE__ */
|
|
460
|
+
/* @__PURE__ */ r("div", { className: "flex flex-col items-start text-left gap-1 min-w-0 flex-1", children: [
|
|
460
461
|
/* @__PURE__ */ t("span", { className: "w-full text-[14px] font-semibold leading-[125%] text-[#06080D] truncate", children: v?.name }),
|
|
461
462
|
/* @__PURE__ */ t("span", { className: "w-full text-[12px] font-medium leading-[120%] text-[#666A78]", children: v ? `${(v.size / (1024 * 1024)).toFixed(0)} MB` : "" })
|
|
462
463
|
] }),
|
|
@@ -471,7 +472,7 @@ const z = (r = 0) => {
|
|
|
471
472
|
}
|
|
472
473
|
)
|
|
473
474
|
] }),
|
|
474
|
-
/* @__PURE__ */
|
|
475
|
+
/* @__PURE__ */ r("div", { className: "w-full bg-[#DC26260F] p-4 flex items-start gap-4", children: [
|
|
475
476
|
/* @__PURE__ */ t(te, { size: 20, color: "#DC2626" }),
|
|
476
477
|
/* @__PURE__ */ t("p", { className: "text-[12px] leading-[120%] font-medium text-[#DC2626] text-left", children: u[0]?.errors?.[0]?.code === "file-too-large" ? k : u[0]?.errors?.[0]?.message || y })
|
|
477
478
|
] })
|
|
@@ -489,13 +490,13 @@ const z = (r = 0) => {
|
|
|
489
490
|
className: x("w-full mt-4 flex flex-col gap-2", b?.errorWrapper),
|
|
490
491
|
children: u.map((e, c) => {
|
|
491
492
|
const i = e.errors[0], g = i?.code === "file-too-large" ? k : i?.code === "file-invalid-type" ? y : i?.message || y;
|
|
492
|
-
return /* @__PURE__ */
|
|
493
|
+
return /* @__PURE__ */ r(
|
|
493
494
|
"div",
|
|
494
495
|
{
|
|
495
496
|
className: "w-full bg-[#DC26260F] p-4 flex items-start gap-4 rounded-[8px]",
|
|
496
497
|
children: [
|
|
497
498
|
/* @__PURE__ */ t(te, { size: 20, color: "#DC2626", className: "shrink-0" }),
|
|
498
|
-
/* @__PURE__ */
|
|
499
|
+
/* @__PURE__ */ r("p", { className: "text-[12px] leading-[120%] font-medium text-[#DC2626] text-left", children: [
|
|
499
500
|
/* @__PURE__ */ t("span", { className: "font-semibold", children: e.file.name }),
|
|
500
501
|
" — ",
|
|
501
502
|
g
|