brd-ui-kit 0.1.76 → 0.1.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/brd-ui-kit.css +1 -1
- package/dist/calendar-PqChui7l.cjs +2 -0
- package/dist/{calendar-B5QCV34E.cjs.map → calendar-PqChui7l.cjs.map} +1 -1
- package/dist/{calendar-Ba3kHG6w.js → calendar-XWqEaWHP.js} +4 -3
- package/dist/{calendar-Ba3kHG6w.js.map → calendar-XWqEaWHP.js.map} +1 -1
- package/dist/{calendar-locale-BHyNJPb2.cjs → calendar-locale-CosU_VZY.cjs} +2 -2
- package/dist/{calendar-locale-BHyNJPb2.cjs.map → calendar-locale-CosU_VZY.cjs.map} +1 -1
- package/dist/{calendar-locale-DQ9wj0zF.js → calendar-locale-DqQZymBn.js} +2 -2
- package/dist/{calendar-locale-DQ9wj0zF.js.map → calendar-locale-DqQZymBn.js.map} +1 -1
- package/dist/components/app-sidebar/app-sidebar.d.ts +2 -2
- package/dist/components/checkbox-group/checkbox-group.d.ts +29 -0
- package/dist/components/checkbox-group/index.d.ts +2 -0
- package/dist/components/checkbox-group.d.ts +2 -0
- package/dist/components/data-table/data-table-row-actions-column.d.ts +2 -2
- package/dist/components/files-uploader/files-uploader.d.ts +2 -2
- package/dist/components/icons/ArrowCounterClockwise.d.ts +1 -0
- package/dist/components/icons/BoundingBox.d.ts +1 -0
- package/dist/components/icons/Briefcase.d.ts +1 -0
- package/dist/components/icons/Building.d.ts +1 -0
- package/dist/components/icons/Buildings.d.ts +1 -0
- package/dist/components/icons/CaretDown.d.ts +1 -0
- package/dist/components/icons/CaretLeft.d.ts +1 -0
- package/dist/components/icons/CaretRight.d.ts +1 -0
- package/dist/components/icons/CaretUp.d.ts +1 -0
- package/dist/components/icons/CaretUpDown.d.ts +1 -0
- package/dist/components/icons/ChartLine.d.ts +1 -0
- package/dist/components/icons/Check.d.ts +1 -0
- package/dist/components/icons/CheckCircle.d.ts +1 -0
- package/dist/components/icons/Clock.d.ts +1 -0
- package/dist/components/icons/CreditCard.d.ts +1 -0
- package/dist/components/icons/DotsThree.d.ts +1 -0
- package/dist/components/icons/DownloadSimple.d.ts +1 -0
- package/dist/components/icons/EnvelopeSimple.d.ts +1 -0
- package/dist/components/icons/Eye.d.ts +1 -0
- package/dist/components/icons/EyeSlash.d.ts +1 -0
- package/dist/components/icons/FileText.d.ts +1 -0
- package/dist/components/icons/Folder.d.ts +1 -0
- package/dist/components/icons/Funnel.d.ts +1 -0
- package/dist/components/icons/Gear.d.ts +1 -0
- package/dist/components/icons/Info.d.ts +1 -0
- package/dist/components/icons/LockKey.d.ts +1 -0
- package/dist/components/icons/MagnifyingGlass.d.ts +1 -0
- package/dist/components/icons/MaxLogo.d.ts +1 -0
- package/dist/components/icons/Package.d.ts +1 -0
- package/dist/components/icons/Pencil.d.ts +1 -0
- package/dist/components/icons/Phone.d.ts +1 -0
- package/dist/components/icons/Plus.d.ts +1 -0
- package/dist/components/icons/PresentationChart.d.ts +1 -0
- package/dist/components/icons/SpinnerGap.d.ts +1 -0
- package/dist/components/icons/TelegramLogo.d.ts +1 -0
- package/dist/components/icons/Trash.d.ts +1 -0
- package/dist/components/icons/UserCircleGear.d.ts +1 -0
- package/dist/components/icons/Users.d.ts +1 -0
- package/dist/components/icons/UsersFour.d.ts +1 -0
- package/dist/components/icons/Warning.d.ts +1 -0
- package/dist/components/icons/WarningCircle.d.ts +1 -0
- package/dist/components/icons/WhatsAppLogoFilled.d.ts +1 -0
- package/dist/components/icons/Wrench.d.ts +1 -0
- package/dist/components/icons/X.d.ts +1 -0
- package/dist/components/icons/XCircle.d.ts +1 -0
- package/dist/components/icons/index.d.ts +50 -0
- package/dist/components/icons/stroke-icon.d.ts +19 -0
- package/dist/components/icons.d.ts +2 -0
- package/dist/components/input-password/input-password.d.ts +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts +2 -2
- package/dist/components/ui/icon/icon-map.d.ts +68 -0
- package/dist/components/ui/icon/icon.d.ts +6 -6
- package/dist/components/ui/icon/index.d.ts +3 -1
- package/dist/components/ui/toggle-group/toggle-group.styles.d.ts +1 -1
- package/dist/components-app-pagination-app-pagination.cjs +1 -1
- package/dist/components-app-pagination-app-pagination.cjs.map +1 -1
- package/dist/components-app-pagination-app-pagination.js +34 -32
- package/dist/components-app-pagination-app-pagination.js.map +1 -1
- package/dist/components-app-sidebar-app-sidebar.cjs +1 -1
- package/dist/components-app-sidebar-app-sidebar.cjs.map +1 -1
- package/dist/components-app-sidebar-app-sidebar.js +33 -32
- package/dist/components-app-sidebar-app-sidebar.js.map +1 -1
- package/dist/components-avatar-uploader-avatar-uploader.cjs +2 -2
- package/dist/components-avatar-uploader-avatar-uploader.cjs.map +1 -1
- package/dist/components-avatar-uploader-avatar-uploader.js +23 -4
- package/dist/components-avatar-uploader-avatar-uploader.js.map +1 -1
- package/dist/components-basic-avatar-basic-avatar.cjs +2 -2
- package/dist/components-basic-avatar-basic-avatar.cjs.map +1 -1
- package/dist/components-basic-avatar-basic-avatar.js +24 -4
- package/dist/components-basic-avatar-basic-avatar.js.map +1 -1
- package/dist/components-checkbox-group-checkbox-group.cjs +4 -0
- package/dist/components-checkbox-group-checkbox-group.cjs.map +1 -0
- package/dist/components-checkbox-group-checkbox-group.js +305 -0
- package/dist/components-checkbox-group-checkbox-group.js.map +1 -0
- package/dist/components-checkbox-group.cjs +2 -0
- package/dist/components-checkbox-group.cjs.map +1 -0
- package/dist/components-checkbox-group.js +5 -0
- package/dist/components-checkbox-group.js.map +1 -0
- package/dist/components-data-table-data-table-actions-column.cjs +1 -1
- package/dist/components-data-table-data-table-actions-column.cjs.map +1 -1
- package/dist/components-data-table-data-table-actions-column.js +6 -5
- package/dist/components-data-table-data-table-actions-column.js.map +1 -1
- package/dist/components-data-table-data-table-column-visibility.cjs +1 -1
- package/dist/components-data-table-data-table-column-visibility.cjs.map +1 -1
- package/dist/components-data-table-data-table-column-visibility.js +10 -9
- package/dist/components-data-table-data-table-column-visibility.js.map +1 -1
- package/dist/components-data-table-data-table-row-actions-column.cjs +1 -1
- package/dist/components-data-table-data-table-row-actions-column.cjs.map +1 -1
- package/dist/components-data-table-data-table-row-actions-column.js +20 -19
- package/dist/components-data-table-data-table-row-actions-column.js.map +1 -1
- package/dist/components-files-uploader-files-uploader.cjs +3 -3
- package/dist/components-files-uploader-files-uploader.cjs.map +1 -1
- package/dist/components-files-uploader-files-uploader.js +41 -38
- package/dist/components-files-uploader-files-uploader.js.map +1 -1
- package/dist/components-icons-ArrowCounterClockwise.cjs +2 -0
- package/dist/components-icons-ArrowCounterClockwise.cjs.map +1 -0
- package/dist/components-icons-ArrowCounterClockwise.js +5 -0
- package/dist/components-icons-ArrowCounterClockwise.js.map +1 -0
- package/dist/components-icons-BoundingBox.cjs +2 -0
- package/dist/components-icons-BoundingBox.cjs.map +1 -0
- package/dist/components-icons-BoundingBox.js +5 -0
- package/dist/components-icons-BoundingBox.js.map +1 -0
- package/dist/components-icons-Briefcase.cjs +2 -0
- package/dist/components-icons-Briefcase.cjs.map +1 -0
- package/dist/components-icons-Briefcase.js +5 -0
- package/dist/components-icons-Briefcase.js.map +1 -0
- package/dist/components-icons-Building.cjs +2 -0
- package/dist/components-icons-Building.cjs.map +1 -0
- package/dist/components-icons-Building.js +5 -0
- package/dist/components-icons-Building.js.map +1 -0
- package/dist/components-icons-Buildings.cjs +2 -0
- package/dist/components-icons-Buildings.cjs.map +1 -0
- package/dist/components-icons-Buildings.js +5 -0
- package/dist/components-icons-Buildings.js.map +1 -0
- package/dist/components-icons-CaretDown.cjs +2 -0
- package/dist/components-icons-CaretDown.cjs.map +1 -0
- package/dist/components-icons-CaretDown.js +5 -0
- package/dist/components-icons-CaretDown.js.map +1 -0
- package/dist/components-icons-CaretLeft.cjs +2 -0
- package/dist/components-icons-CaretLeft.cjs.map +1 -0
- package/dist/components-icons-CaretLeft.js +5 -0
- package/dist/components-icons-CaretLeft.js.map +1 -0
- package/dist/components-icons-CaretRight.cjs +2 -0
- package/dist/components-icons-CaretRight.cjs.map +1 -0
- package/dist/components-icons-CaretRight.js +5 -0
- package/dist/components-icons-CaretRight.js.map +1 -0
- package/dist/components-icons-CaretUp.cjs +2 -0
- package/dist/components-icons-CaretUp.cjs.map +1 -0
- package/dist/components-icons-CaretUp.js +5 -0
- package/dist/components-icons-CaretUp.js.map +1 -0
- package/dist/components-icons-CaretUpDown.cjs +2 -0
- package/dist/components-icons-CaretUpDown.cjs.map +1 -0
- package/dist/components-icons-CaretUpDown.js +5 -0
- package/dist/components-icons-CaretUpDown.js.map +1 -0
- package/dist/components-icons-ChartLine.cjs +2 -0
- package/dist/components-icons-ChartLine.cjs.map +1 -0
- package/dist/components-icons-ChartLine.js +5 -0
- package/dist/components-icons-ChartLine.js.map +1 -0
- package/dist/components-icons-Check.cjs +2 -0
- package/dist/components-icons-Check.cjs.map +1 -0
- package/dist/components-icons-Check.js +5 -0
- package/dist/components-icons-Check.js.map +1 -0
- package/dist/components-icons-CheckCircle.cjs +2 -0
- package/dist/components-icons-CheckCircle.cjs.map +1 -0
- package/dist/components-icons-CheckCircle.js +5 -0
- package/dist/components-icons-CheckCircle.js.map +1 -0
- package/dist/components-icons-Clock.cjs +2 -0
- package/dist/components-icons-Clock.cjs.map +1 -0
- package/dist/components-icons-Clock.js +5 -0
- package/dist/components-icons-Clock.js.map +1 -0
- package/dist/components-icons-CreditCard.cjs +2 -0
- package/dist/components-icons-CreditCard.cjs.map +1 -0
- package/dist/components-icons-CreditCard.js +5 -0
- package/dist/components-icons-CreditCard.js.map +1 -0
- package/dist/components-icons-DotsThree.cjs +2 -0
- package/dist/components-icons-DotsThree.cjs.map +1 -0
- package/dist/components-icons-DotsThree.js +5 -0
- package/dist/components-icons-DotsThree.js.map +1 -0
- package/dist/components-icons-DownloadSimple.cjs +2 -0
- package/dist/components-icons-DownloadSimple.cjs.map +1 -0
- package/dist/components-icons-DownloadSimple.js +5 -0
- package/dist/components-icons-DownloadSimple.js.map +1 -0
- package/dist/components-icons-EnvelopeSimple.cjs +2 -0
- package/dist/components-icons-EnvelopeSimple.cjs.map +1 -0
- package/dist/components-icons-EnvelopeSimple.js +5 -0
- package/dist/components-icons-EnvelopeSimple.js.map +1 -0
- package/dist/components-icons-Eye.cjs +2 -0
- package/dist/components-icons-Eye.cjs.map +1 -0
- package/dist/components-icons-Eye.js +5 -0
- package/dist/components-icons-Eye.js.map +1 -0
- package/dist/components-icons-EyeSlash.cjs +2 -0
- package/dist/components-icons-EyeSlash.cjs.map +1 -0
- package/dist/components-icons-EyeSlash.js +5 -0
- package/dist/components-icons-EyeSlash.js.map +1 -0
- package/dist/components-icons-FileText.cjs +2 -0
- package/dist/components-icons-FileText.cjs.map +1 -0
- package/dist/components-icons-FileText.js +5 -0
- package/dist/components-icons-FileText.js.map +1 -0
- package/dist/components-icons-Folder.cjs +2 -0
- package/dist/components-icons-Folder.cjs.map +1 -0
- package/dist/components-icons-Folder.js +5 -0
- package/dist/components-icons-Folder.js.map +1 -0
- package/dist/components-icons-Funnel.cjs +2 -0
- package/dist/components-icons-Funnel.cjs.map +1 -0
- package/dist/components-icons-Funnel.js +5 -0
- package/dist/components-icons-Funnel.js.map +1 -0
- package/dist/components-icons-Gear.cjs +2 -0
- package/dist/components-icons-Gear.cjs.map +1 -0
- package/dist/components-icons-Gear.js +5 -0
- package/dist/components-icons-Gear.js.map +1 -0
- package/dist/components-icons-Info.cjs +2 -0
- package/dist/components-icons-Info.cjs.map +1 -0
- package/dist/components-icons-Info.js +5 -0
- package/dist/components-icons-Info.js.map +1 -0
- package/dist/components-icons-LockKey.cjs +2 -0
- package/dist/components-icons-LockKey.cjs.map +1 -0
- package/dist/components-icons-LockKey.js +5 -0
- package/dist/components-icons-LockKey.js.map +1 -0
- package/dist/components-icons-MagnifyingGlass.cjs +2 -0
- package/dist/components-icons-MagnifyingGlass.cjs.map +1 -0
- package/dist/components-icons-MagnifyingGlass.js +5 -0
- package/dist/components-icons-MagnifyingGlass.js.map +1 -0
- package/dist/components-icons-MaxLogo.cjs +2 -0
- package/dist/components-icons-MaxLogo.cjs.map +1 -0
- package/dist/components-icons-MaxLogo.js +5 -0
- package/dist/components-icons-MaxLogo.js.map +1 -0
- package/dist/components-icons-Package.cjs +2 -0
- package/dist/components-icons-Package.cjs.map +1 -0
- package/dist/components-icons-Package.js +5 -0
- package/dist/components-icons-Package.js.map +1 -0
- package/dist/components-icons-Pencil.cjs +2 -0
- package/dist/components-icons-Pencil.cjs.map +1 -0
- package/dist/components-icons-Pencil.js +5 -0
- package/dist/components-icons-Pencil.js.map +1 -0
- package/dist/components-icons-Phone.cjs +2 -0
- package/dist/components-icons-Phone.cjs.map +1 -0
- package/dist/components-icons-Phone.js +5 -0
- package/dist/components-icons-Phone.js.map +1 -0
- package/dist/components-icons-Plus.cjs +2 -0
- package/dist/components-icons-Plus.cjs.map +1 -0
- package/dist/components-icons-Plus.js +5 -0
- package/dist/components-icons-Plus.js.map +1 -0
- package/dist/components-icons-PresentationChart.cjs +2 -0
- package/dist/components-icons-PresentationChart.cjs.map +1 -0
- package/dist/components-icons-PresentationChart.js +5 -0
- package/dist/components-icons-PresentationChart.js.map +1 -0
- package/dist/components-icons-SpinnerGap.cjs +2 -0
- package/dist/components-icons-SpinnerGap.cjs.map +1 -0
- package/dist/components-icons-SpinnerGap.js +5 -0
- package/dist/components-icons-SpinnerGap.js.map +1 -0
- package/dist/components-icons-TelegramLogo.cjs +2 -0
- package/dist/components-icons-TelegramLogo.cjs.map +1 -0
- package/dist/components-icons-TelegramLogo.js +5 -0
- package/dist/components-icons-TelegramLogo.js.map +1 -0
- package/dist/components-icons-Trash.cjs +2 -0
- package/dist/components-icons-Trash.cjs.map +1 -0
- package/dist/components-icons-Trash.js +5 -0
- package/dist/components-icons-Trash.js.map +1 -0
- package/dist/components-icons-UserCircleGear.cjs +2 -0
- package/dist/components-icons-UserCircleGear.cjs.map +1 -0
- package/dist/components-icons-UserCircleGear.js +5 -0
- package/dist/components-icons-UserCircleGear.js.map +1 -0
- package/dist/components-icons-Users.cjs +2 -0
- package/dist/components-icons-Users.cjs.map +1 -0
- package/dist/components-icons-Users.js +5 -0
- package/dist/components-icons-Users.js.map +1 -0
- package/dist/components-icons-UsersFour.cjs +2 -0
- package/dist/components-icons-UsersFour.cjs.map +1 -0
- package/dist/components-icons-UsersFour.js +5 -0
- package/dist/components-icons-UsersFour.js.map +1 -0
- package/dist/components-icons-Warning.cjs +2 -0
- package/dist/components-icons-Warning.cjs.map +1 -0
- package/dist/components-icons-Warning.js +5 -0
- package/dist/components-icons-Warning.js.map +1 -0
- package/dist/components-icons-WarningCircle.cjs +2 -0
- package/dist/components-icons-WarningCircle.cjs.map +1 -0
- package/dist/components-icons-WarningCircle.js +5 -0
- package/dist/components-icons-WarningCircle.js.map +1 -0
- package/dist/components-icons-WhatsAppLogoFilled.cjs +2 -0
- package/dist/components-icons-WhatsAppLogoFilled.cjs.map +1 -0
- package/dist/components-icons-WhatsAppLogoFilled.js +5 -0
- package/dist/components-icons-WhatsAppLogoFilled.js.map +1 -0
- package/dist/components-icons-Wrench.cjs +2 -0
- package/dist/components-icons-Wrench.cjs.map +1 -0
- package/dist/components-icons-Wrench.js +5 -0
- package/dist/components-icons-Wrench.js.map +1 -0
- package/dist/components-icons-X.cjs +2 -0
- package/dist/components-icons-X.cjs.map +1 -0
- package/dist/components-icons-X.js +5 -0
- package/dist/components-icons-X.js.map +1 -0
- package/dist/components-icons-XCircle.cjs +2 -0
- package/dist/components-icons-XCircle.cjs.map +1 -0
- package/dist/components-icons-XCircle.js +5 -0
- package/dist/components-icons-XCircle.js.map +1 -0
- package/dist/components-icons-stroke-icon.cjs +2 -0
- package/dist/components-icons-stroke-icon.cjs.map +1 -0
- package/dist/components-icons-stroke-icon.js +39 -0
- package/dist/components-icons-stroke-icon.js.map +1 -0
- package/dist/components-icons.cjs +2 -0
- package/dist/components-icons.cjs.map +1 -0
- package/dist/components-icons.js +97 -0
- package/dist/components-icons.js.map +1 -0
- package/dist/components-input-contact-input-contact.cjs +4 -4
- package/dist/components-input-contact-input-contact.cjs.map +1 -1
- package/dist/components-input-contact-input-contact.js +103 -74
- package/dist/components-input-contact-input-contact.js.map +1 -1
- package/dist/components-input-password-input-password.cjs +1 -1
- package/dist/components-input-password-input-password.cjs.map +1 -1
- package/dist/components-input-password-input-password.js +14 -52
- package/dist/components-input-password-input-password.js.map +1 -1
- package/dist/components-ui-calendar-calendar.cjs +1 -1
- package/dist/components-ui-calendar-calendar.js +4 -3
- package/dist/components-ui-calendar-calendar.js.map +1 -1
- package/dist/components-ui-calendar.cjs +1 -1
- package/dist/components-ui-calendar.js +2 -2
- package/dist/components-ui-checkbox-checkbox.cjs +1 -1
- package/dist/components-ui-checkbox-checkbox.cjs.map +1 -1
- package/dist/components-ui-checkbox-checkbox.js +15 -14
- package/dist/components-ui-checkbox-checkbox.js.map +1 -1
- package/dist/components-ui-combobox-combobox.cjs +1 -1
- package/dist/components-ui-combobox-combobox.cjs.map +1 -1
- package/dist/components-ui-combobox-combobox.js +31 -30
- package/dist/components-ui-combobox-combobox.js.map +1 -1
- package/dist/components-ui-dialog-dialog.cjs +1 -1
- package/dist/components-ui-dialog-dialog.cjs.map +1 -1
- package/dist/components-ui-dialog-dialog.js +26 -25
- package/dist/components-ui-dialog-dialog.js.map +1 -1
- package/dist/components-ui-dropdown-menu-dropdown-menu.cjs +2 -2
- package/dist/components-ui-dropdown-menu-dropdown-menu.cjs.map +1 -1
- package/dist/components-ui-dropdown-menu-dropdown-menu.js +46 -45
- package/dist/components-ui-dropdown-menu-dropdown-menu.js.map +1 -1
- package/dist/components-ui-icon-icon-map.cjs +2 -0
- package/dist/components-ui-icon-icon-map.cjs.map +1 -0
- package/dist/components-ui-icon-icon-map.js +71 -0
- package/dist/components-ui-icon-icon-map.js.map +1 -0
- package/dist/components-ui-icon-icon.cjs +1 -1
- package/dist/components-ui-icon-icon.cjs.map +1 -1
- package/dist/components-ui-icon-icon.js +27 -54
- package/dist/components-ui-icon-icon.js.map +1 -1
- package/dist/components-ui-icon.cjs +1 -1
- package/dist/components-ui-icon.js +3 -1
- package/dist/components-ui-icon.js.map +1 -1
- package/dist/components-ui-pagination-pagination.cjs +2 -2
- package/dist/components-ui-pagination-pagination.cjs.map +1 -1
- package/dist/components-ui-pagination-pagination.js +48 -45
- package/dist/components-ui-pagination-pagination.js.map +1 -1
- package/dist/components-ui-select-calendar-menu-select-calendar-menu.cjs +1 -1
- package/dist/components-ui-select-calendar-menu-select-calendar-menu.cjs.map +1 -1
- package/dist/components-ui-select-calendar-menu-select-calendar-menu.js +4 -3
- package/dist/components-ui-select-calendar-menu-select-calendar-menu.js.map +1 -1
- package/dist/components-ui-select-select.cjs +1 -1
- package/dist/components-ui-select-select.cjs.map +1 -1
- package/dist/components-ui-select-select.js +42 -41
- package/dist/components-ui-select-select.js.map +1 -1
- package/dist/components-ui-sonner-sonner.cjs +1 -1
- package/dist/components-ui-sonner-sonner.cjs.map +1 -1
- package/dist/components-ui-sonner-sonner.js +38 -32
- package/dist/components-ui-sonner-sonner.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +9 -7
- package/dist/index.js +228 -225
- package/dist/index.js.map +1 -1
- package/package.json +33 -16
- package/dist/calendar-B5QCV34E.cjs +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components-files-uploader-files-uploader.js","sources":["../src/components/files-uploader/files-uploader.tsx"],"sourcesContent":["import { cn } from \"@/lib/utils\";\nimport { useState } from \"react\";\nimport { type FileRejection, useDropzone } from \"react-dropzone\";\nimport { Icon, type IconProps } from \"../ui/icon\";\nimport { Typography } from \"../ui/typography\";\n\ntype Variant = \"grid\" | \"list\" | \"compact\";\ntype AcceptType = \"image\" | \"pdf\" | \"doc\" | \"excel\" | \"text\" | \"all\";\n\nexport type UploadedFileData = {\n url: string;\n name: string;\n size: string;\n addedAt: string;\n status: \"uploaded\" | \"error\";\n error?: string;\n};\n\nexport type FilesUploaderValue = UploadedFileData[] | [];\n\nexport type PropsFilesUploader = {\n value?: FilesUploaderValue;\n onChange?: (value: FilesUploaderValue) => void;\n multiple?: boolean;\n maxFiles?: number;\n disabled?: boolean;\n isErrorText?: boolean;\n className?: {\n container?: string;\n blockAdd?: string;\n title?: string;\n text?: string;\n icon?: string;\n };\n maxSize?: number;\n variant?: Variant;\n accepts?: AcceptType[];\n icon?: IconProps;\n title?: string;\n text?: string;\n showFiles?: boolean;\n};\n\nconst FILE_SIZE_UNITS = [\"B\", \"KB\", \"MB\", \"GB\", \"TB\"];\nconst FILE_SIZE_KB = 1024;\n\nconst DEFAULT_MAX_SIZE = 5 * FILE_SIZE_KB * FILE_SIZE_KB;\nconst DEFAULT_MAX_FILES = 5;\nconst DEFAULT_ACCEPT: AcceptType[] = [\"all\"];\nconst DEFAULT_TIMEOUT = 800;\n\nconst ACCEPT_MAP: Record<AcceptType, Record<string, string[]>> = {\n image: { \"image/*\": [\".jpg\", \".jpeg\", \".png\", \".webp\"] },\n pdf: { \"application/pdf\": [\".pdf\"] },\n doc: {\n \"application/msword\": [\".doc\"],\n \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\": [\".docx\"],\n },\n excel: {\n \"application/vnd.ms-excel\": [\".xls\"],\n \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\": [\".xlsx\"],\n },\n text: { \"text/plain\": [\".txt\"] },\n all: {},\n};\n\nconst formatFileSize = (bytes: number) => {\n if (!bytes) return \"0 B\";\n const i = Math.floor(Math.log(bytes) / Math.log(FILE_SIZE_KB));\n return `${(bytes / Math.pow(FILE_SIZE_KB, i)).toFixed(2)} ${FILE_SIZE_UNITS[i]}`;\n};\n\nconst getFileIdentity = (file: Pick<UploadedFileData, \"name\" | \"size\">) =>\n `${file.name}:${file.size}`;\n\nconst fileAcceptMap = (accepts: AcceptType[]) =>\n accepts.reduce((acc, t) => ({ ...acc, ...ACCEPT_MAP[t] }), {});\n\nconst limitFilesForValue = (\n nextFiles: UploadedFileData[],\n maxFiles: number,\n): UploadedFileData[] => {\n const uploadedFiles = nextFiles.filter((file) => file.status === \"uploaded\");\n const errorFiles = nextFiles.filter((file) => file.status === \"error\");\n const availableErrorSlots = Math.max(0, maxFiles - uploadedFiles.length);\n\n return [...uploadedFiles, ...errorFiles.slice(0, availableErrorSlots)];\n};\n\nconst mapFile = (\n file: File,\n status: UploadedFileData[\"status\"],\n error?: string,\n): UploadedFileData => ({\n url: URL.createObjectURL(file),\n name: file.name,\n size: formatFileSize(file.size),\n addedAt: new Date().toISOString(),\n status,\n error,\n});\n\nconst getRejectedError = (code?: string) =>\n code === \"file-too-large\" ? \"Файл слишком большой\" : \"Неподдерживаемый формат\";\n\nconst replaceDuplicateErrors = (\n currentFiles: UploadedFileData[],\n newFiles: UploadedFileData[],\n rejectedFiles: UploadedFileData[],\n) => {\n const rejectedFileIds = new Set(rejectedFiles.map(getFileIdentity));\n const acceptedFileIds = new Set(newFiles.map(getFileIdentity));\n\n return currentFiles.filter((existingFile) => {\n if (existingFile.status !== \"error\") return true;\n const id = getFileIdentity(existingFile);\n return !rejectedFileIds.has(id) && !acceptedFileIds.has(id);\n });\n};\n\nconst getFileType = (file: UploadedFileData) => {\n const ext = file.name.split(\".\").pop()?.toLowerCase();\n\n if (!ext) return \"other\";\n if ([\"jpg\", \"jpeg\", \"png\", \"webp\"].includes(ext)) return \"image\";\n if (ext === \"pdf\") return \"pdf\";\n if ([\"doc\", \"docx\"].includes(ext)) return \"doc\";\n if ([\"xls\", \"xlsx\"].includes(ext)) return \"excel\";\n if (ext === \"txt\") return \"text\";\n\n return \"other\";\n};\n\nexport const FilesUploader = ({\n value = [],\n onChange,\n multiple = false,\n maxFiles = DEFAULT_MAX_FILES,\n disabled = false,\n className,\n maxSize = DEFAULT_MAX_SIZE,\n variant = \"grid\",\n accepts = DEFAULT_ACCEPT,\n icon,\n title,\n text,\n showFiles = true,\n isErrorText = false,\n}: PropsFilesUploader) => {\n const [loading, setLoading] = useState(false);\n const [error, setError] = useState<string | null>(null);\n\n const files = value;\n const uploadedCount = files.filter((file) => file.status === \"uploaded\").length;\n\n const onDrop = (acceptedFiles: File[], rejectedFiles: FileRejection[]) => {\n setError(null);\n const remainingUploadSlots = Math.max(0, maxFiles - uploadedCount);\n const acceptedFilesToUpload = acceptedFiles.slice(0, remainingUploadSlots);\n const overflowAcceptedFiles = acceptedFiles.slice(remainingUploadSlots);\n\n const rejectedMapped = [\n ...rejectedFiles.map((rejection) =>\n mapFile(rejection.file, \"error\", getRejectedError(rejection.errors[0]?.code)),\n ),\n ...overflowAcceptedFiles.map((file) =>\n mapFile(file, \"error\", `Максимальное количество файлов: ${maxFiles}`),\n ),\n ];\n\n if (rejectedMapped.length) {\n setError(rejectedMapped[0].error || \"Ошибка загрузки\");\n }\n\n if (!acceptedFilesToUpload.length && !rejectedMapped.length) return;\n\n setLoading(true);\n\n setTimeout(() => {\n const newFiles = acceptedFilesToUpload.map((file) => mapFile(file, \"uploaded\"));\n const nextBaseFiles = replaceDuplicateErrors(files, newFiles, rejectedMapped);\n const nextFiles = multiple\n ? limitFilesForValue([...nextBaseFiles, ...newFiles, ...rejectedMapped], maxFiles)\n : [...newFiles, ...rejectedMapped].slice(0, 1);\n\n onChange?.(nextFiles.length ? nextFiles : []);\n setLoading(false);\n }, DEFAULT_TIMEOUT);\n };\n\n const { getRootProps, getInputProps, isDragActive } = useDropzone({\n onDrop,\n accept: fileAcceptMap(accepts),\n maxSize,\n multiple: multiple && maxFiles > 1,\n disabled: disabled || loading,\n });\n\n const removeFile = (index: number) => () => {\n const updated = files.filter((_, i) => i !== index);\n onChange?.(updated.length ? updated : []);\n };\n\n const uploadedFiles = files\n .map((file, index) => ({ file, index }))\n .filter(({ file }) => file.status === \"uploaded\");\n\n const isMaxFilesReached = uploadedCount >= maxFiles;\n\n const gridClasses = {\n grid: \"grid-cols-2 sm:grid-cols-3 md:grid-cols-4\",\n list: \"grid-cols-1\",\n compact: \"grid-cols-2 sm:grid-cols-3\",\n };\n\n return (\n <div className={cn(\"w-full space-y-4\", className?.container)}>\n <div\n className={cn(\n \"grid h-full w-full gap-4\",\n variant === \"list\" ? \"grid-cols-1\" : gridClasses[variant],\n )}\n >\n {showFiles &&\n uploadedFiles.map(({ file, index }) => {\n const type = getFileType(file);\n\n return (\n <div\n key={`${file.url}-${file.addedAt}-${index}`}\n className=\"group bg-primary-bg relative aspect-square h-full w-full\n overflow-hidden rounded-lg\"\n >\n {type === \"image\" ? (\n <img\n src={file.url}\n className=\"h-full w-full object-cover\"\n />\n ) : (\n <div\n className=\"flex h-full w-full items-center justify-center bg-gray-100\n text-sm font-semibold\"\n >\n {file.name.split(\".\").pop()?.toUpperCase()}\n </div>\n )}\n\n <div\n className=\"bg-primary-inverse-bg/50 text-primary-bg absolute inset-0\n flex items-center justify-center opacity-0 transition-opacity\n hover:opacity-100\"\n >\n <Icon\n onClick={removeFile(index)}\n type={\"x\"}\n />\n </div>\n </div>\n );\n })}\n\n {!isMaxFilesReached && (\n <div\n {...getRootProps()}\n className={cn(\n `relative flex cursor-pointer flex-col items-center justify-center\n rounded-lg border-2 border-dashed border-gray-300 bg-gray-50\n transition-colors hover:bg-gray-100`,\n isDragActive && \"border-primary bg-primary/5\",\n (disabled || loading) && \"cursor-not-allowed opacity-50\",\n variant === \"list\" ? \"min-h-37.5\" : \"aspect-square\",\n className?.blockAdd,\n )}\n >\n <input {...getInputProps()} />\n\n {loading ? (\n <Icon\n type=\"spinner-gap\"\n className=\"text-sub-label-text h-8 w-8 animate-spin\"\n />\n ) : (\n <div className=\"flex flex-col items-center space-y-2 p-4 text-center\">\n <Icon\n type={icon?.type ?? \"plus\"}\n className={cn(\"text-sub-label-text h-8 w-8\", className?.icon)}\n />\n\n <Typography className={cn(\"text-sub-label-text\", className?.title)}>\n {multiple\n ? `${title || \"Добавить\"} (${uploadedCount}/${maxFiles})`\n : title || \"Добавить\"}\n </Typography>\n\n {text && (\n <Typography className={cn(\"text-sub-label-text\", className?.text)}>\n {text}\n </Typography>\n )}\n </div>\n )}\n </div>\n )}\n </div>\n\n {!isErrorText && error && (\n <div className=\"rounded-lg bg-red-50 p-3 text-sm text-red-600\">{error}</div>\n )}\n </div>\n );\n};\n"],"names":["FILE_SIZE_UNITS","FILE_SIZE_KB","DEFAULT_MAX_SIZE","DEFAULT_MAX_FILES","DEFAULT_ACCEPT","DEFAULT_TIMEOUT","ACCEPT_MAP","formatFileSize","bytes","i","getFileIdentity","file","fileAcceptMap","accepts","acc","t","limitFilesForValue","nextFiles","maxFiles","uploadedFiles","errorFiles","availableErrorSlots","mapFile","status","error","getRejectedError","code","replaceDuplicateErrors","currentFiles","newFiles","rejectedFiles","rejectedFileIds","acceptedFileIds","existingFile","id","getFileType","ext","FilesUploader","value","onChange","multiple","disabled","className","maxSize","variant","icon","title","text","showFiles","isErrorText","loading","setLoading","useState","setError","files","uploadedCount","onDrop","acceptedFiles","remainingUploadSlots","acceptedFilesToUpload","overflowAcceptedFiles","rejectedMapped","rejection","nextBaseFiles","getRootProps","getInputProps","isDragActive","useDropzone","removeFile","index","updated","_","isMaxFilesReached","gridClasses","cn","jsxs","type","jsx","Icon","Typography"],"mappings":";;;;;;;AA2CA,MAAMA,IAAkB,CAAC,KAAK,MAAM,MAAM,MAAM,IAAI,GAC9CC,IAAe,MAEfC,IAAmB,IAAID,IAAeA,GACtCE,IAAoB,GACpBC,IAA+B,CAAC,KAAK,GACrCC,IAAkB,KAElBC,IAA2D;AAAA,EAC/D,OAAO,EAAE,WAAW,CAAC,QAAQ,SAAS,QAAQ,OAAO,EAAA;AAAA,EACrD,KAAK,EAAE,mBAAmB,CAAC,MAAM,EAAA;AAAA,EACjC,KAAK;AAAA,IACH,sBAAsB,CAAC,MAAM;AAAA,IAC7B,2EAA2E,CAAC,OAAO;AAAA,EAAA;AAAA,EAErF,OAAO;AAAA,IACL,4BAA4B,CAAC,MAAM;AAAA,IACnC,qEAAqE,CAAC,OAAO;AAAA,EAAA;AAAA,EAE/E,MAAM,EAAE,cAAc,CAAC,MAAM,EAAA;A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files-uploader-files-uploader.js","sources":["../src/components/files-uploader/files-uploader.tsx"],"sourcesContent":["import { cn } from \"@/lib/utils\";\nimport { useState } from \"react\";\nimport { type FileRejection, useDropzone } from \"react-dropzone\";\nimport { Plus } from \"@/components/icons/Plus\";\nimport { SpinnerGap } from \"@/components/icons/SpinnerGap\";\nimport { StrokeIcon, type StrokeIconComponent } from \"@/components/icons/stroke-icon\";\nimport { X } from \"@/components/icons/X\";\nimport { Typography } from \"../ui/typography\";\n\ntype Variant = \"grid\" | \"list\" | \"compact\";\ntype AcceptType = \"image\" | \"pdf\" | \"doc\" | \"excel\" | \"text\" | \"all\";\n\nexport type UploadedFileData = {\n url: string;\n name: string;\n size: string;\n addedAt: string;\n status: \"uploaded\" | \"error\";\n error?: string;\n};\n\nexport type FilesUploaderValue = UploadedFileData[] | [];\n\nexport type PropsFilesUploader = {\n value?: FilesUploaderValue;\n onChange?: (value: FilesUploaderValue) => void;\n multiple?: boolean;\n maxFiles?: number;\n disabled?: boolean;\n isErrorText?: boolean;\n className?: {\n container?: string;\n blockAdd?: string;\n title?: string;\n text?: string;\n icon?: string;\n };\n maxSize?: number;\n variant?: Variant;\n accepts?: AcceptType[];\n icon?: StrokeIconComponent;\n title?: string;\n text?: string;\n showFiles?: boolean;\n};\n\nconst FILE_SIZE_UNITS = [\"B\", \"KB\", \"MB\", \"GB\", \"TB\"];\nconst FILE_SIZE_KB = 1024;\n\nconst DEFAULT_MAX_SIZE = 5 * FILE_SIZE_KB * FILE_SIZE_KB;\nconst DEFAULT_MAX_FILES = 5;\nconst DEFAULT_ACCEPT: AcceptType[] = [\"all\"];\nconst DEFAULT_TIMEOUT = 800;\n\nconst ACCEPT_MAP: Record<AcceptType, Record<string, string[]>> = {\n image: { \"image/*\": [\".jpg\", \".jpeg\", \".png\", \".webp\"] },\n pdf: { \"application/pdf\": [\".pdf\"] },\n doc: {\n \"application/msword\": [\".doc\"],\n \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\": [\".docx\"],\n },\n excel: {\n \"application/vnd.ms-excel\": [\".xls\"],\n \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\": [\".xlsx\"],\n },\n text: { \"text/plain\": [\".txt\"] },\n all: {},\n};\n\nconst formatFileSize = (bytes: number) => {\n if (!bytes) return \"0 B\";\n const i = Math.floor(Math.log(bytes) / Math.log(FILE_SIZE_KB));\n return `${(bytes / Math.pow(FILE_SIZE_KB, i)).toFixed(2)} ${FILE_SIZE_UNITS[i]}`;\n};\n\nconst getFileIdentity = (file: Pick<UploadedFileData, \"name\" | \"size\">) =>\n `${file.name}:${file.size}`;\n\nconst fileAcceptMap = (accepts: AcceptType[]) =>\n accepts.reduce((acc, t) => ({ ...acc, ...ACCEPT_MAP[t] }), {});\n\nconst limitFilesForValue = (\n nextFiles: UploadedFileData[],\n maxFiles: number,\n): UploadedFileData[] => {\n const uploadedFiles = nextFiles.filter((file) => file.status === \"uploaded\");\n const errorFiles = nextFiles.filter((file) => file.status === \"error\");\n const availableErrorSlots = Math.max(0, maxFiles - uploadedFiles.length);\n\n return [...uploadedFiles, ...errorFiles.slice(0, availableErrorSlots)];\n};\n\nconst mapFile = (\n file: File,\n status: UploadedFileData[\"status\"],\n error?: string,\n): UploadedFileData => ({\n url: URL.createObjectURL(file),\n name: file.name,\n size: formatFileSize(file.size),\n addedAt: new Date().toISOString(),\n status,\n error,\n});\n\nconst getRejectedError = (code?: string) =>\n code === \"file-too-large\" ? \"Файл слишком большой\" : \"Неподдерживаемый формат\";\n\nconst replaceDuplicateErrors = (\n currentFiles: UploadedFileData[],\n newFiles: UploadedFileData[],\n rejectedFiles: UploadedFileData[],\n) => {\n const rejectedFileIds = new Set(rejectedFiles.map(getFileIdentity));\n const acceptedFileIds = new Set(newFiles.map(getFileIdentity));\n\n return currentFiles.filter((existingFile) => {\n if (existingFile.status !== \"error\") return true;\n const id = getFileIdentity(existingFile);\n return !rejectedFileIds.has(id) && !acceptedFileIds.has(id);\n });\n};\n\nconst getFileType = (file: UploadedFileData) => {\n const ext = file.name.split(\".\").pop()?.toLowerCase();\n\n if (!ext) return \"other\";\n if ([\"jpg\", \"jpeg\", \"png\", \"webp\"].includes(ext)) return \"image\";\n if (ext === \"pdf\") return \"pdf\";\n if ([\"doc\", \"docx\"].includes(ext)) return \"doc\";\n if ([\"xls\", \"xlsx\"].includes(ext)) return \"excel\";\n if (ext === \"txt\") return \"text\";\n\n return \"other\";\n};\n\nexport const FilesUploader = ({\n value = [],\n onChange,\n multiple = false,\n maxFiles = DEFAULT_MAX_FILES,\n disabled = false,\n className,\n maxSize = DEFAULT_MAX_SIZE,\n variant = \"grid\",\n accepts = DEFAULT_ACCEPT,\n icon,\n title,\n text,\n showFiles = true,\n isErrorText = false,\n}: PropsFilesUploader) => {\n const [loading, setLoading] = useState(false);\n const [error, setError] = useState<string | null>(null);\n\n const files = value;\n const uploadedCount = files.filter((file) => file.status === \"uploaded\").length;\n\n const onDrop = (acceptedFiles: File[], rejectedFiles: FileRejection[]) => {\n setError(null);\n const remainingUploadSlots = Math.max(0, maxFiles - uploadedCount);\n const acceptedFilesToUpload = acceptedFiles.slice(0, remainingUploadSlots);\n const overflowAcceptedFiles = acceptedFiles.slice(remainingUploadSlots);\n\n const rejectedMapped = [\n ...rejectedFiles.map((rejection) =>\n mapFile(rejection.file, \"error\", getRejectedError(rejection.errors[0]?.code)),\n ),\n ...overflowAcceptedFiles.map((file) =>\n mapFile(file, \"error\", `Максимальное количество файлов: ${maxFiles}`),\n ),\n ];\n\n if (rejectedMapped.length) {\n setError(rejectedMapped[0].error || \"Ошибка загрузки\");\n }\n\n if (!acceptedFilesToUpload.length && !rejectedMapped.length) return;\n\n setLoading(true);\n\n setTimeout(() => {\n const newFiles = acceptedFilesToUpload.map((file) => mapFile(file, \"uploaded\"));\n const nextBaseFiles = replaceDuplicateErrors(files, newFiles, rejectedMapped);\n const nextFiles = multiple\n ? limitFilesForValue([...nextBaseFiles, ...newFiles, ...rejectedMapped], maxFiles)\n : [...newFiles, ...rejectedMapped].slice(0, 1);\n\n onChange?.(nextFiles.length ? nextFiles : []);\n setLoading(false);\n }, DEFAULT_TIMEOUT);\n };\n\n const { getRootProps, getInputProps, isDragActive } = useDropzone({\n onDrop,\n accept: fileAcceptMap(accepts),\n maxSize,\n multiple: multiple && maxFiles > 1,\n disabled: disabled || loading,\n });\n\n const removeFile = (index: number) => () => {\n const updated = files.filter((_, i) => i !== index);\n onChange?.(updated.length ? updated : []);\n };\n\n const uploadedFiles = files\n .map((file, index) => ({ file, index }))\n .filter(({ file }) => file.status === \"uploaded\");\n\n const isMaxFilesReached = uploadedCount >= maxFiles;\n const uploadIcon = icon ?? Plus;\n\n const gridClasses = {\n grid: \"grid-cols-2 sm:grid-cols-3 md:grid-cols-4\",\n list: \"grid-cols-1\",\n compact: \"grid-cols-2 sm:grid-cols-3\",\n };\n\n return (\n <div className={cn(\"w-full space-y-4\", className?.container)}>\n <div\n className={cn(\n \"grid h-full w-full gap-4\",\n variant === \"list\" ? \"grid-cols-1\" : gridClasses[variant],\n )}\n >\n {showFiles &&\n uploadedFiles.map(({ file, index }) => {\n const type = getFileType(file);\n\n return (\n <div\n key={`${file.url}-${file.addedAt}-${index}`}\n className=\"group bg-primary-bg relative aspect-square h-full w-full\n overflow-hidden rounded-lg\"\n >\n {type === \"image\" ? (\n <img\n src={file.url}\n className=\"h-full w-full object-cover\"\n />\n ) : (\n <div\n className=\"flex h-full w-full items-center justify-center bg-gray-100\n text-sm font-semibold\"\n >\n {file.name.split(\".\").pop()?.toUpperCase()}\n </div>\n )}\n\n <div\n className=\"bg-primary-inverse-bg/50 text-primary-bg absolute inset-0\n flex items-center justify-center opacity-0 transition-opacity\n hover:opacity-100\"\n >\n <StrokeIcon\n onClick={removeFile(index)}\n icon={X}\n />\n </div>\n </div>\n );\n })}\n\n {!isMaxFilesReached && (\n <div\n {...getRootProps()}\n className={cn(\n `relative flex cursor-pointer flex-col items-center justify-center\n rounded-lg border-2 border-dashed border-gray-300 bg-gray-50\n transition-colors hover:bg-gray-100`,\n isDragActive && \"border-primary bg-primary/5\",\n (disabled || loading) && \"cursor-not-allowed opacity-50\",\n variant === \"list\" ? \"min-h-37.5\" : \"aspect-square\",\n className?.blockAdd,\n )}\n >\n <input {...getInputProps()} />\n\n {loading ? (\n <StrokeIcon\n icon={SpinnerGap}\n className=\"text-sub-label-text h-8 w-8 animate-spin\"\n />\n ) : (\n <div className=\"flex flex-col items-center space-y-2 p-4 text-center\">\n <StrokeIcon\n icon={uploadIcon}\n className={cn(\"text-sub-label-text h-8 w-8\", className?.icon)}\n />\n\n <Typography className={cn(\"text-sub-label-text\", className?.title)}>\n {multiple\n ? `${title || \"Добавить\"} (${uploadedCount}/${maxFiles})`\n : title || \"Добавить\"}\n </Typography>\n\n {text && (\n <Typography className={cn(\"text-sub-label-text\", className?.text)}>\n {text}\n </Typography>\n )}\n </div>\n )}\n </div>\n )}\n </div>\n\n {!isErrorText && error && (\n <div className=\"rounded-lg bg-red-50 p-3 text-sm text-red-600\">{error}</div>\n )}\n </div>\n );\n};\n"],"names":["FILE_SIZE_UNITS","FILE_SIZE_KB","DEFAULT_MAX_SIZE","DEFAULT_MAX_FILES","DEFAULT_ACCEPT","DEFAULT_TIMEOUT","ACCEPT_MAP","formatFileSize","bytes","i","getFileIdentity","file","fileAcceptMap","accepts","acc","t","limitFilesForValue","nextFiles","maxFiles","uploadedFiles","errorFiles","availableErrorSlots","mapFile","status","error","getRejectedError","code","replaceDuplicateErrors","currentFiles","newFiles","rejectedFiles","rejectedFileIds","acceptedFileIds","existingFile","id","getFileType","ext","FilesUploader","value","onChange","multiple","disabled","className","maxSize","variant","icon","title","text","showFiles","isErrorText","loading","setLoading","useState","setError","files","uploadedCount","onDrop","acceptedFiles","remainingUploadSlots","acceptedFilesToUpload","overflowAcceptedFiles","rejectedMapped","rejection","nextBaseFiles","getRootProps","getInputProps","isDragActive","useDropzone","removeFile","index","updated","_","isMaxFilesReached","uploadIcon","Plus","gridClasses","cn","jsxs","type","jsx","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AA,oBAAA;AAAA,sBACC,MAAMP;AAAA,sBACN,WAAWG,EAAG,+BAA+BlC,GAAW,IAAI;AAAA,oBAAA;AAAA,kBAAA;AAAA,oCAG7DyC,GAAA,EAAW,WAAWP,EAAG,uBAAuBlC,GAAW,KAAK,GAC9D,UAAAF,IACG,GAAGM,KAAS,UAAU,KAAKS,CAAa,IAAIrC,CAAQ,MACpD4B,KAAS,YACf;AAAA,kBAECC,uBACEoC,GAAA,EAAW,WAAWP,EAAG,uBAAuBlC,GAAW,IAAI,GAC7D,UAAAK,EAAA,CACH;AAAA,gBAAA,EAAA,CAEJ;AAAA,cAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QAEJ;AAAA,MAAA;AAAA,IAAA;AAAA,IAIH,CAACE,KAAezB,uBACd,OAAA,EAAI,WAAU,iDAAiD,UAAAA,EAAA,CAAM;AAAA,EAAA,GAE1E;AAEJ;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("phosphor-strokes-icons/icons/ArrowCounterClockwise");Object.defineProperty(exports,"ArrowCounterClockwise",{enumerable:!0,get:()=>e.ArrowCounterClockwise});
|
|
2
|
+
//# sourceMappingURL=components-icons-ArrowCounterClockwise.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-ArrowCounterClockwise.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-ArrowCounterClockwise.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("phosphor-strokes-icons/icons/BoundingBox");Object.defineProperty(exports,"BoundingBox",{enumerable:!0,get:()=>e.BoundingBox});
|
|
2
|
+
//# sourceMappingURL=components-icons-BoundingBox.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-BoundingBox.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-BoundingBox.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-Briefcase.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-Briefcase.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-Building.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-Building.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-Buildings.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-Buildings.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-CaretDown.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-CaretDown.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-CaretLeft.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-CaretLeft.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("phosphor-strokes-icons/icons/CaretRight");Object.defineProperty(exports,"CaretRight",{enumerable:!0,get:()=>e.CaretRight});
|
|
2
|
+
//# sourceMappingURL=components-icons-CaretRight.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-CaretRight.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-CaretRight.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-CaretUp.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-CaretUp.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("phosphor-strokes-icons/icons/CaretUpDown");Object.defineProperty(exports,"CaretUpDown",{enumerable:!0,get:()=>e.CaretUpDown});
|
|
2
|
+
//# sourceMappingURL=components-icons-CaretUpDown.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-CaretUpDown.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-CaretUpDown.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-ChartLine.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-ChartLine.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-Check.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-Check.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("phosphor-strokes-icons/icons/CheckCircle");Object.defineProperty(exports,"CheckCircle",{enumerable:!0,get:()=>e.CheckCircle});
|
|
2
|
+
//# sourceMappingURL=components-icons-CheckCircle.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-CheckCircle.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-CheckCircle.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-Clock.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-Clock.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("phosphor-strokes-icons/icons/CreditCard");Object.defineProperty(exports,"CreditCard",{enumerable:!0,get:()=>e.CreditCard});
|
|
2
|
+
//# sourceMappingURL=components-icons-CreditCard.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-CreditCard.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-CreditCard.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-DotsThree.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-DotsThree.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("phosphor-strokes-icons/icons/DownloadSimple");Object.defineProperty(exports,"DownloadSimple",{enumerable:!0,get:()=>e.DownloadSimple});
|
|
2
|
+
//# sourceMappingURL=components-icons-DownloadSimple.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-DownloadSimple.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-DownloadSimple.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("phosphor-strokes-icons/icons/EnvelopeSimple");Object.defineProperty(exports,"EnvelopeSimple",{enumerable:!0,get:()=>e.EnvelopeSimple});
|
|
2
|
+
//# sourceMappingURL=components-icons-EnvelopeSimple.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-EnvelopeSimple.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-EnvelopeSimple.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-Eye.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-Eye.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-EyeSlash.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-EyeSlash.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-FileText.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-FileText.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-Folder.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-Folder.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-Funnel.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-Funnel.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-Gear.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-Gear.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-Info.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-Info.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-icons-LockKey.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|