@oneplatformdev/ui 0.1.99-beta.304 → 0.1.99-beta.305
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 +2 -4
- package/AlertDialog/AlertDialog.stories.js.map +1 -1
- package/AlertDialog/AlertDialogRoot.js +18 -20
- 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 +10 -11
- 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 +19 -22
- 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 +4 -6
- package/Calendar/Calendar.js.map +1 -1
- package/Card/Card.js.map +1 -1
- package/Carousel/Carousel.js +6 -7
- package/Carousel/Carousel.js.map +1 -1
- package/Chart/Chart.js.map +1 -1
- package/Checkbox/Checkbox.js +0 -1
- package/Checkbox/Checkbox.js.map +1 -1
- package/Checkbox/Checkbox.stories.js.map +1 -1
- package/Collapsible/Collapsible.js.map +1 -1
- package/ColorInput/ColorInput.d.ts +10 -0
- package/ColorInput/ColorInput.d.ts.map +1 -0
- package/ColorInput/ColorInput.js +103 -0
- package/ColorInput/ColorInput.js.map +1 -0
- package/ColorInput/ColorInput.stories.js +78 -0
- package/ColorInput/ColorInput.stories.js.map +1 -0
- package/ColorInput/ColorInput.types.d.ts +46 -0
- package/ColorInput/ColorInput.types.d.ts.map +1 -0
- package/ColorInput/ColorInput.types.js +2 -0
- package/ColorInput/ColorInput.types.js.map +1 -0
- package/ColorInput/ColorPicker.d.ts +28 -0
- package/ColorInput/ColorPicker.d.ts.map +1 -0
- package/ColorInput/ColorPicker.js +322 -0
- package/ColorInput/ColorPicker.js.map +1 -0
- package/ColorInput/color.utils.d.ts +42 -0
- package/ColorInput/color.utils.d.ts.map +1 -0
- package/ColorInput/color.utils.js +129 -0
- package/ColorInput/color.utils.js.map +1 -0
- package/ColorInput/index.d.ts +6 -0
- package/ColorInput/index.d.ts.map +1 -0
- package/ColorInput/index.js +25 -0
- package/ColorInput/index.js.map +1 -0
- package/ColorInput/useSavedColors.d.ts +13 -0
- package/ColorInput/useSavedColors.d.ts.map +1 -0
- package/ColorInput/useSavedColors.js +53 -0
- package/ColorInput/useSavedColors.js.map +1 -0
- package/Combobox/Combobox.js +10 -10
- package/Combobox/Combobox.js.map +1 -1
- package/Combobox/Combobox.stories.js.map +1 -1
- package/Combobox/Combobox.types.js.map +1 -1
- package/Combobox/ComboboxOptionItem.js +18 -19
- package/Combobox/ComboboxOptionItem.js.map +1 -1
- package/Combobox/ComboboxRenderContent.js +18 -19
- 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 -22
- package/Combobox/ComboboxRenderTrigger.js.map +1 -1
- package/Command/Command.js +21 -22
- 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 +24 -26
- package/DataTable/DataTable.js.map +1 -1
- package/DataTable/DataTableColumnFilter.js +6 -7
- package/DataTable/DataTableColumnFilter.js.map +1 -1
- package/DataTable/useDataTable.js.map +1 -1
- package/DatePicker/DatePicker.js +1 -2
- package/DatePicker/DatePicker.js.map +1 -1
- package/Dialog/Dialog.js +20 -21
- package/Dialog/Dialog.js.map +1 -1
- package/Dialog/Dialog.stories.js +14 -15
- 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 +80 -81
- 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 +2 -3
- package/Dropzone/DropzoneSinglePickPreview.js.map +1 -1
- package/Dropzone/DropzoneUtils.js.map +1 -1
- package/Form/Form.js +14 -15
- package/Form/Form.js.map +1 -1
- package/Form/FormRenderControl.js +6 -7
- package/Form/FormRenderControl.js.map +1 -1
- package/Form/Form_old.js +4 -5
- package/Form/Form_old.js.map +1 -1
- package/FormCheckbox/FormCheckbox.js +4 -4
- package/FormCheckbox/FormCheckbox.js.map +1 -1
- package/FormColorInput/FormColorInput.d.ts +7 -0
- package/FormColorInput/FormColorInput.d.ts.map +1 -0
- package/FormColorInput/FormColorInput.js +38 -0
- package/FormColorInput/FormColorInput.js.map +1 -0
- package/FormColorInput/FormColorInput.stories.js +95 -0
- package/FormColorInput/FormColorInput.stories.js.map +1 -0
- package/FormColorInput/FormColorInput.types.d.ts +6 -0
- package/FormColorInput/FormColorInput.types.d.ts.map +1 -0
- package/FormColorInput/FormColorInput.types.js +2 -0
- package/FormColorInput/FormColorInput.types.js.map +1 -0
- package/FormColorInput/index.d.ts +3 -0
- package/FormColorInput/index.d.ts.map +1 -0
- package/FormColorInput/index.js +5 -0
- package/FormColorInput/index.js.map +1 -0
- package/FormCombobox/FormCombobox.js +4 -4
- package/FormCombobox/FormCombobox.js.map +1 -1
- package/FormCombobox/FormCombobox.stories.js +17 -19
- package/FormCombobox/FormCombobox.stories.js.map +1 -1
- 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 +12 -13
- package/FormInput/FormInput.stories.js.map +1 -1
- package/FormRadio/FormRadio.js.map +1 -1
- package/FormSelect/FormSelect.js +12 -15
- 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.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 +4 -5
- 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 +0 -1
- 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.js +6 -7
- package/Select/Select.js.map +1 -1
- package/Select/Select.stories.js.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 +20 -21
- 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 +21 -26
- package/TablePagination/TablePagination.js.map +1 -1
- package/Tabs/Tabs.js.map +1 -1
- package/Tabs/TabsRoot.js.map +1 -1
- 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 +3 -4
- 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.d.ts +2 -0
- package/index.d.ts.map +1 -1
- package/index.js +366 -342
- package/index.js.map +1 -1
- package/package.json +3 -3
- package/vite-env.d.ts +7 -7
|
@@ -1 +1 @@
|
|
|
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,S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BAA6BF,CAAS;AAAA,MACnD,GAAGN;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASuB,EAAqB;AAAA,EACE,WAAAjB;AAAA,EACA,GAAGN;AACL,GAAiC;AAC7D,SACE,gBAAAI;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,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;"}
|
|
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;A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QACAF;AAAA,MAAA;AAAA,MAED,GAAGN;AAAA,IAAA;AAAA,EAAA;AAGV;"}
|
package/Dropzone/Dropzone.js
CHANGED
|
@@ -1,68 +1,67 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as l, 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 le, 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 re } 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
|
|
14
|
-
import "
|
|
15
|
-
import
|
|
16
|
-
import Ye from "./icons/file-doc.svg.js";
|
|
17
|
-
import Ze from "./icons/file-docx.svg.js";
|
|
13
|
+
import Je from "./icons/file-csv.svg.js";
|
|
14
|
+
import Pe from "./icons/file-doc.svg.js";
|
|
15
|
+
import Ye from "./icons/file-docx.svg.js";
|
|
18
16
|
import ie from "./icons/file-jpg.svg.js";
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
17
|
+
import Ze from "./icons/file-pdf.svg.js";
|
|
18
|
+
import Qe from "./icons/file-png.svg.js";
|
|
19
|
+
import Ue from "./icons/file-ppt.svg.js";
|
|
20
|
+
import Ve from "./icons/file-pptx.svg.js";
|
|
21
|
+
import et from "./icons/file-rar.svg.js";
|
|
22
|
+
import tt from "./icons/file-svg.svg.js";
|
|
25
23
|
import lt from "./icons/file-webp.svg.js";
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
import rt from "./icons/file-xls.svg.js";
|
|
25
|
+
import ot from "./icons/file-xlsx.svg.js";
|
|
26
|
+
import it from "./icons/file-zip.svg.js";
|
|
27
|
+
import { Button as nt } from "../Button/Button.js";
|
|
28
|
+
const z = (r = 0) => {
|
|
29
|
+
if (!r || r < 0) return "0 KB";
|
|
31
30
|
const s = 1024, d = s * 1024, m = d * 1024;
|
|
32
|
-
if (
|
|
33
|
-
if (
|
|
34
|
-
const a =
|
|
31
|
+
if (r >= m) return `${(r / m).toFixed(2)} GB`;
|
|
32
|
+
if (r >= d) {
|
|
33
|
+
const a = r / d;
|
|
35
34
|
return `${a >= 100 ? a.toFixed(0) : a.toFixed(2)} MB`;
|
|
36
35
|
}
|
|
37
|
-
return
|
|
36
|
+
return r >= s ? `${(r / s).toFixed(r / s >= 100 ? 0 : 1)} KB` : `${r} B`;
|
|
38
37
|
}, st = {
|
|
39
|
-
csv:
|
|
40
|
-
doc:
|
|
41
|
-
docx:
|
|
38
|
+
csv: Je,
|
|
39
|
+
doc: Pe,
|
|
40
|
+
docx: Ye,
|
|
42
41
|
jpg: ie,
|
|
43
42
|
jpeg: ie,
|
|
44
|
-
pdf:
|
|
45
|
-
png:
|
|
46
|
-
ppt:
|
|
47
|
-
pptx:
|
|
48
|
-
rar:
|
|
49
|
-
svg:
|
|
43
|
+
pdf: Ze,
|
|
44
|
+
png: Qe,
|
|
45
|
+
ppt: Ue,
|
|
46
|
+
pptx: Ve,
|
|
47
|
+
rar: et,
|
|
48
|
+
svg: tt,
|
|
50
49
|
webp: lt,
|
|
51
|
-
xls:
|
|
52
|
-
xlsx:
|
|
53
|
-
zip:
|
|
54
|
-
}, ct = (
|
|
55
|
-
if (!
|
|
56
|
-
const s =
|
|
50
|
+
xls: rt,
|
|
51
|
+
xlsx: ot,
|
|
52
|
+
zip: it
|
|
53
|
+
}, ct = (r) => {
|
|
54
|
+
if (!r) return "";
|
|
55
|
+
const s = r.toLowerCase().split(".");
|
|
57
56
|
return s.length > 1 ? s[s.length - 1] : "";
|
|
58
|
-
}, ne = (
|
|
59
|
-
const s = ct(
|
|
57
|
+
}, ne = (r) => {
|
|
58
|
+
const s = ct(r);
|
|
60
59
|
return st[s] ?? null;
|
|
61
|
-
}, at = (
|
|
62
|
-
if (
|
|
63
|
-
if (
|
|
64
|
-
for (let d = 0; d <
|
|
65
|
-
const m =
|
|
60
|
+
}, at = (r, s) => {
|
|
61
|
+
if (r === s) return !0;
|
|
62
|
+
if (r.length !== s.length) return !1;
|
|
63
|
+
for (let d = 0; d < r.length; d++) {
|
|
64
|
+
const m = r[d], a = s[d];
|
|
66
65
|
if (m !== a) {
|
|
67
66
|
if (typeof m == "string" && typeof a == "string") {
|
|
68
67
|
if (m !== a) return !1;
|
|
@@ -79,7 +78,7 @@ const z = (l = 0) => {
|
|
|
79
78
|
return !0;
|
|
80
79
|
}, dt = _e(
|
|
81
80
|
({
|
|
82
|
-
acceptTypes:
|
|
81
|
+
acceptTypes: r = Ke,
|
|
83
82
|
maxSizeMB: s,
|
|
84
83
|
maxFiles: d = 1,
|
|
85
84
|
onErrors: m,
|
|
@@ -117,7 +116,7 @@ const z = (l = 0) => {
|
|
|
117
116
|
coverFirstItem: ze = !1,
|
|
118
117
|
...$
|
|
119
118
|
}, be) => {
|
|
120
|
-
const [o, A] =
|
|
119
|
+
const [o, A] = le(I ?? []), [u, P] = le([]), 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) => {
|
|
121
120
|
P(c), m?.(c);
|
|
122
121
|
const i = n ? e.slice(0, 1) : [...o, ...e].slice(0, d);
|
|
123
122
|
A(i), q?.(i);
|
|
@@ -132,7 +131,7 @@ const z = (l = 0) => {
|
|
|
132
131
|
A(i), q?.(i);
|
|
133
132
|
}, { getRootProps: Se, getInputProps: je, isDragActive: Be, open: K } = Ge({
|
|
134
133
|
onDrop: Ae,
|
|
135
|
-
accept:
|
|
134
|
+
accept: r.reduce((e, c) => (e[c] = [], e), {}),
|
|
136
135
|
maxSize: s * 1024 * 1024,
|
|
137
136
|
maxFiles: n ? 1 : d,
|
|
138
137
|
disabled: f || p || N,
|
|
@@ -141,8 +140,8 @@ const z = (l = 0) => {
|
|
|
141
140
|
Le(be, () => ({
|
|
142
141
|
setItems: A
|
|
143
142
|
}), []);
|
|
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__ */
|
|
145
|
-
h === "default" && /* @__PURE__ */
|
|
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__ */ l("div", { className: x("w-full mt-2", b?.previewWrapper), children: [
|
|
144
|
+
h === "default" && /* @__PURE__ */ l("pre", { className: "font-semibold text-gray-600", children: [
|
|
146
145
|
de,
|
|
147
146
|
":"
|
|
148
147
|
] }),
|
|
@@ -159,7 +158,7 @@ const z = (l = 0) => {
|
|
|
159
158
|
},
|
|
160
159
|
c
|
|
161
160
|
);
|
|
162
|
-
}) }) : /* @__PURE__ */
|
|
161
|
+
}) }) : /* @__PURE__ */ l(
|
|
163
162
|
"ul",
|
|
164
163
|
{
|
|
165
164
|
className: x(
|
|
@@ -169,7 +168,7 @@ const z = (l = 0) => {
|
|
|
169
168
|
children: [
|
|
170
169
|
T.map((e, c) => {
|
|
171
170
|
const i = D ? c + 1 : c, g = F(e) ? e.name : oe(e), C = F(e) ? z(e.size) : "";
|
|
172
|
-
return /* @__PURE__ */
|
|
171
|
+
return /* @__PURE__ */ l(
|
|
173
172
|
"li",
|
|
174
173
|
{
|
|
175
174
|
className: x(
|
|
@@ -177,8 +176,8 @@ const z = (l = 0) => {
|
|
|
177
176
|
h === "image-grid" ? "w-[75px] h-[75px]" : "flex flex-col items-center gap-2"
|
|
178
177
|
),
|
|
179
178
|
children: [
|
|
180
|
-
/* @__PURE__ */
|
|
181
|
-
h === "image-grid" ? /* @__PURE__ */ t(
|
|
179
|
+
/* @__PURE__ */ l("div", { className: "relative w-full h-full", children: [
|
|
180
|
+
h === "image-grid" ? /* @__PURE__ */ t(re, { item: e, className: "rounded-[8px]" }) : /* @__PURE__ */ t(Te, { item: e, styles: b }),
|
|
182
181
|
/* @__PURE__ */ t(
|
|
183
182
|
"div",
|
|
184
183
|
{
|
|
@@ -191,9 +190,9 @@ const z = (l = 0) => {
|
|
|
191
190
|
}
|
|
192
191
|
)
|
|
193
192
|
] }),
|
|
194
|
-
h === "default" && /* @__PURE__ */
|
|
193
|
+
h === "default" && /* @__PURE__ */ l("span", { className: "inline-flex flex-col items-center", children: [
|
|
195
194
|
/* @__PURE__ */ t("span", { className: "max-w-[80px] text-ellipsis overflow-hidden whitespace-nowrap", children: g }),
|
|
196
|
-
C && /* @__PURE__ */
|
|
195
|
+
C && /* @__PURE__ */ l("span", { children: [
|
|
197
196
|
"(",
|
|
198
197
|
C,
|
|
199
198
|
")"
|
|
@@ -219,8 +218,8 @@ const z = (l = 0) => {
|
|
|
219
218
|
}
|
|
220
219
|
)
|
|
221
220
|
] });
|
|
222
|
-
return /* @__PURE__ */
|
|
223
|
-
/* @__PURE__ */
|
|
221
|
+
return /* @__PURE__ */ l("div", { className: "w-full select-none", children: [
|
|
222
|
+
/* @__PURE__ */ l(
|
|
224
223
|
Xe,
|
|
225
224
|
{
|
|
226
225
|
...$,
|
|
@@ -253,22 +252,22 @@ const z = (l = 0) => {
|
|
|
253
252
|
),
|
|
254
253
|
children: [
|
|
255
254
|
/* @__PURE__ */ t("input", { ...je() }),
|
|
256
|
-
p && /* @__PURE__ */
|
|
255
|
+
p && /* @__PURE__ */ l(
|
|
257
256
|
"div",
|
|
258
257
|
{
|
|
259
258
|
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",
|
|
260
259
|
onClick: (e) => e.stopPropagation(),
|
|
261
260
|
children: [
|
|
262
|
-
/* @__PURE__ */
|
|
261
|
+
/* @__PURE__ */ l("div", { className: "relative h-24 w-24", children: [
|
|
263
262
|
/* @__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" }) }),
|
|
264
|
-
/* @__PURE__ */
|
|
263
|
+
/* @__PURE__ */ l("span", { className: "absolute inset-0 flex items-center justify-center text-lg font-semibold text-foreground", children: [
|
|
265
264
|
Math.max(0, Math.min(100, Math.round(H))),
|
|
266
265
|
"%"
|
|
267
266
|
] })
|
|
268
267
|
] }),
|
|
269
|
-
/* @__PURE__ */
|
|
268
|
+
/* @__PURE__ */ l("div", { className: "text-center", children: [
|
|
270
269
|
/* @__PURE__ */ t("p", { className: "text-xl font-semibold text-foreground", children: Ne }),
|
|
271
|
-
/* @__PURE__ */
|
|
270
|
+
/* @__PURE__ */ l("p", { className: "text-sm text-[#666A78]", children: [
|
|
272
271
|
z(ue),
|
|
273
272
|
" ",
|
|
274
273
|
ve,
|
|
@@ -298,13 +297,13 @@ const z = (l = 0) => {
|
|
|
298
297
|
]
|
|
299
298
|
}
|
|
300
299
|
),
|
|
301
|
-
!p && D && /* @__PURE__ */
|
|
300
|
+
!p && D && /* @__PURE__ */ l(
|
|
302
301
|
"div",
|
|
303
302
|
{
|
|
304
303
|
className: "absolute inset-0 rounded-[8px] overflow-hidden",
|
|
305
304
|
onClick: (e) => e.stopPropagation(),
|
|
306
305
|
children: [
|
|
307
|
-
/* @__PURE__ */ t(
|
|
306
|
+
/* @__PURE__ */ t(re, { item: o[0], className: "rounded-[8px]" }),
|
|
308
307
|
/* @__PURE__ */ t(
|
|
309
308
|
"div",
|
|
310
309
|
{
|
|
@@ -316,7 +315,7 @@ const z = (l = 0) => {
|
|
|
316
315
|
]
|
|
317
316
|
}
|
|
318
317
|
),
|
|
319
|
-
!p && (o.length === 0 || !n && _) && (u.length === 0 || !n) && /* @__PURE__ */
|
|
318
|
+
!p && (o.length === 0 || !n && _) && (u.length === 0 || !n) && /* @__PURE__ */ l(
|
|
320
319
|
"div",
|
|
321
320
|
{
|
|
322
321
|
className: x(
|
|
@@ -343,7 +342,7 @@ const z = (l = 0) => {
|
|
|
343
342
|
)
|
|
344
343
|
}
|
|
345
344
|
),
|
|
346
|
-
/* @__PURE__ */ t("div", { className: "flex flex-col items-center gap-1 w-full", children: !f && /* @__PURE__ */
|
|
345
|
+
/* @__PURE__ */ t("div", { className: "flex flex-col items-center gap-1 w-full", children: !f && /* @__PURE__ */ l(V, { children: [
|
|
347
346
|
/* @__PURE__ */ t(
|
|
348
347
|
"span",
|
|
349
348
|
{
|
|
@@ -367,7 +366,7 @@ const z = (l = 0) => {
|
|
|
367
366
|
)
|
|
368
367
|
] }) }),
|
|
369
368
|
!f && /* @__PURE__ */ t(
|
|
370
|
-
|
|
369
|
+
nt,
|
|
371
370
|
{
|
|
372
371
|
type: "button",
|
|
373
372
|
size: "md",
|
|
@@ -378,31 +377,31 @@ const z = (l = 0) => {
|
|
|
378
377
|
]
|
|
379
378
|
}
|
|
380
379
|
),
|
|
381
|
-
!p && n && u.length > 0 && !Z && /* @__PURE__ */
|
|
382
|
-
/* @__PURE__ */
|
|
380
|
+
!p && n && u.length > 0 && !Z && /* @__PURE__ */ l("div", { className: x("w-full mt-4", b?.errorWrapper), children: [
|
|
381
|
+
/* @__PURE__ */ l("span", { className: "font-semibold text-red-500", children: [
|
|
383
382
|
me,
|
|
384
383
|
":"
|
|
385
384
|
] }),
|
|
386
|
-
/* @__PURE__ */ t("ul", { className: "mt-2 text-sm text-red-500 list-disc list-inside", children: u.map((e, c) => /* @__PURE__ */
|
|
385
|
+
/* @__PURE__ */ t("ul", { className: "mt-2 text-sm text-red-500 list-disc list-inside", children: u.map((e, c) => /* @__PURE__ */ l("li", { children: [
|
|
387
386
|
e.file.name,
|
|
388
387
|
" (",
|
|
389
388
|
z(e.file.size),
|
|
390
389
|
")",
|
|
391
|
-
!a && /* @__PURE__ */ t("ul", { className: "ml-4 list-disc list-inside", children: e.errors.map((i, g) => /* @__PURE__ */
|
|
390
|
+
!a && /* @__PURE__ */ t("ul", { className: "ml-4 list-disc list-inside", children: e.errors.map((i, g) => /* @__PURE__ */ l("li", { children: [
|
|
392
391
|
i.code === "file-too-large" && k,
|
|
393
392
|
i.code === "file-invalid-type" && y,
|
|
394
393
|
i.code !== "file-too-large" && i.code !== "file-invalid-type" && i.message
|
|
395
394
|
] }, g)) })
|
|
396
395
|
] }, c)) })
|
|
397
396
|
] }),
|
|
398
|
-
!p && !!(n && o.length) && /* @__PURE__ */ t(V, { children: X ? /* @__PURE__ */
|
|
397
|
+
!p && !!(n && o.length) && /* @__PURE__ */ t(V, { children: X ? /* @__PURE__ */ l(
|
|
399
398
|
"div",
|
|
400
399
|
{
|
|
401
400
|
className: "w-full max-w-[502px] flex flex-col items-center gap-4",
|
|
402
401
|
onClick: (e) => e.stopPropagation(),
|
|
403
402
|
children: [
|
|
404
403
|
/* @__PURE__ */ t("p", { className: "w-full text-center text-[16px] leading-[130%] font-semibold text-[#06080D]", children: R }),
|
|
405
|
-
/* @__PURE__ */
|
|
404
|
+
/* @__PURE__ */ l("div", { className: "w-full min-h-[72px] rounded-[8px] bg-[#F5F5F5] p-4 flex items-center gap-4", children: [
|
|
406
405
|
S ? /* @__PURE__ */ t(
|
|
407
406
|
"img",
|
|
408
407
|
{
|
|
@@ -411,7 +410,7 @@ const z = (l = 0) => {
|
|
|
411
410
|
className: "size-10 shrink-0"
|
|
412
411
|
}
|
|
413
412
|
) : /* @__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 }) }),
|
|
414
|
-
/* @__PURE__ */
|
|
413
|
+
/* @__PURE__ */ l("div", { className: "flex flex-col items-start text-left gap-1 min-w-0 flex-1", children: [
|
|
415
414
|
/* @__PURE__ */ t("span", { className: "w-full text-[14px] font-semibold leading-[125%] text-[#06080D] truncate", children: W?.name || v?.name }),
|
|
416
415
|
/* @__PURE__ */ t("span", { className: "w-full text-[12px] font-medium leading-[120%] text-[#666A78]", children: z(W?.size || v?.size) })
|
|
417
416
|
] }),
|
|
@@ -441,14 +440,14 @@ const z = (l = 0) => {
|
|
|
441
440
|
playerTranslations: Ce
|
|
442
441
|
}
|
|
443
442
|
) }),
|
|
444
|
-
!p && Z && /* @__PURE__ */
|
|
443
|
+
!p && Z && /* @__PURE__ */ l(
|
|
445
444
|
"div",
|
|
446
445
|
{
|
|
447
446
|
className: "w-full max-w-[502px] flex flex-col items-center gap-4",
|
|
448
447
|
onClick: (e) => e.stopPropagation(),
|
|
449
448
|
children: [
|
|
450
449
|
/* @__PURE__ */ t("p", { className: "w-full text-center text-[16px] leading-[130%] font-semibold text-[#06080D]", children: R }),
|
|
451
|
-
/* @__PURE__ */
|
|
450
|
+
/* @__PURE__ */ l("div", { className: "w-full min-h-[72px] rounded-[8px] bg-[#F5F5F5] p-4 flex items-center gap-4", children: [
|
|
452
451
|
S ? /* @__PURE__ */ t(
|
|
453
452
|
"img",
|
|
454
453
|
{
|
|
@@ -457,7 +456,7 @@ const z = (l = 0) => {
|
|
|
457
456
|
className: "size-10 shrink-0"
|
|
458
457
|
}
|
|
459
458
|
) : /* @__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 }) }),
|
|
460
|
-
/* @__PURE__ */
|
|
459
|
+
/* @__PURE__ */ l("div", { className: "flex flex-col items-start text-left gap-1 min-w-0 flex-1", children: [
|
|
461
460
|
/* @__PURE__ */ t("span", { className: "w-full text-[14px] font-semibold leading-[125%] text-[#06080D] truncate", children: v?.name }),
|
|
462
461
|
/* @__PURE__ */ t("span", { className: "w-full text-[12px] font-medium leading-[120%] text-[#666A78]", children: v ? `${(v.size / (1024 * 1024)).toFixed(0)} MB` : "" })
|
|
463
462
|
] }),
|
|
@@ -472,7 +471,7 @@ const z = (l = 0) => {
|
|
|
472
471
|
}
|
|
473
472
|
)
|
|
474
473
|
] }),
|
|
475
|
-
/* @__PURE__ */
|
|
474
|
+
/* @__PURE__ */ l("div", { className: "w-full bg-[#DC26260F] p-4 flex items-start gap-4", children: [
|
|
476
475
|
/* @__PURE__ */ t(te, { size: 20, color: "#DC2626" }),
|
|
477
476
|
/* @__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 })
|
|
478
477
|
] })
|
|
@@ -490,13 +489,13 @@ const z = (l = 0) => {
|
|
|
490
489
|
className: x("w-full mt-4 flex flex-col gap-2", b?.errorWrapper),
|
|
491
490
|
children: u.map((e, c) => {
|
|
492
491
|
const i = e.errors[0], g = i?.code === "file-too-large" ? k : i?.code === "file-invalid-type" ? y : i?.message || y;
|
|
493
|
-
return /* @__PURE__ */
|
|
492
|
+
return /* @__PURE__ */ l(
|
|
494
493
|
"div",
|
|
495
494
|
{
|
|
496
495
|
className: "w-full bg-[#DC26260F] p-4 flex items-start gap-4 rounded-[8px]",
|
|
497
496
|
children: [
|
|
498
497
|
/* @__PURE__ */ t(te, { size: 20, color: "#DC2626", className: "shrink-0" }),
|
|
499
|
-
/* @__PURE__ */
|
|
498
|
+
/* @__PURE__ */ l("p", { className: "text-[12px] leading-[120%] font-medium text-[#DC2626] text-left", children: [
|
|
500
499
|
/* @__PURE__ */ t("span", { className: "font-semibold", children: e.file.name }),
|
|
501
500
|
" — ",
|
|
502
501
|
g
|