welcome-ui 7.4.0 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Accordion.mjs +14 -15
- package/dist/Alert.mjs +36 -37
- package/dist/AspectRatio.mjs +6 -6
- package/dist/Avatar.mjs +3 -3
- package/dist/Badge.mjs +13 -14
- package/dist/Breadcrumb.mjs +10 -10
- package/dist/Button.mjs +7 -7
- package/dist/ButtonGroup.mjs +9 -11
- package/dist/Card.mjs +10 -16
- package/dist/Checkbox.mjs +1 -1
- package/dist/ClearButton.mjs +4 -4
- package/dist/CloseButton.mjs +2 -2
- package/dist/{CustomInput-BqaOGHm4.mjs → CustomInput-D_13Gd_3.mjs} +511 -514
- package/dist/DatePicker.mjs +54 -50
- package/dist/DateTimePicker.mjs +16 -18
- package/dist/DateTimePickerCommon.mjs +1 -1
- package/dist/Drawer.mjs +44 -45
- package/dist/DropdownMenu.mjs +204 -208
- package/dist/Field.mjs +35 -37
- package/dist/FieldGroup.mjs +10 -11
- package/dist/FileDrop.mjs +98 -99
- package/dist/FileUpload.mjs +10 -10
- package/dist/Hint.mjs +7 -8
- package/dist/Icon.mjs +17 -18
- package/dist/IconsFont.mjs +298 -298
- package/dist/InputText.mjs +39 -42
- package/dist/Label.mjs +26 -27
- package/dist/Link.mjs +9 -11
- package/dist/Loader.mjs +4 -4
- package/dist/Logo.mjs +9 -11
- package/dist/Modal.mjs +46 -47
- package/dist/Pagination.mjs +50 -50
- package/dist/Picker.mjs +12 -12
- package/dist/Popover.mjs +4 -4
- package/dist/Radio.mjs +36 -38
- package/dist/RadioGroup.mjs +13 -15
- package/dist/RadioTab.mjs +25 -26
- package/dist/Search.mjs +89 -91
- package/dist/Select.mjs +33 -39
- package/dist/Slider.mjs +11 -11
- package/dist/System.mjs +16 -48
- package/dist/Table.mjs +7 -7
- package/dist/Text.mjs +20 -22
- package/dist/Textarea.mjs +16 -17
- package/dist/TimePicker.mjs +22 -22
- package/dist/Toast.mjs +14 -14
- package/dist/Toggle.mjs +3 -3
- package/dist/Tooltip.mjs +52 -53
- package/dist/UniversalLink.mjs +5 -5
- package/dist/VariantIcon.mjs +14 -16
- package/dist/{index-BSdL4wPb.mjs → index-BDeIsk2X.mjs} +6 -6
- package/dist/theme.mjs +180 -180
- package/dist/types/components/Accordion/styles.d.ts +13 -5
- package/dist/types/components/Alert/styles.d.ts +16 -4
- package/dist/types/components/AspectRatio/styles.d.ts +1 -1
- package/dist/types/components/Avatar/styles.d.ts +14 -2
- package/dist/types/components/Badge/styles.d.ts +2 -2
- package/dist/types/components/Breadcrumb/Item.styles.d.ts +2 -2
- package/dist/types/components/Breadcrumb/styles.d.ts +4 -4
- package/dist/types/components/Button/index.d.ts +5 -1
- package/dist/types/components/Button/styles.d.ts +5 -1
- package/dist/types/components/ButtonGroup/styles.d.ts +1 -1
- package/dist/types/components/Card/Cover.styles.d.ts +7 -1
- package/dist/types/components/Card/index.d.ts +1 -1
- package/dist/types/components/Card/styles.d.ts +2 -2
- package/dist/types/components/Checkbox/styles.d.ts +5 -1
- package/dist/types/components/ClearButton/index.d.ts +8 -1
- package/dist/types/components/ClearButton/styles.d.ts +7 -1
- package/dist/types/components/CloseButton/styles.d.ts +7 -1
- package/dist/types/components/DatePicker/index.d.ts +2 -2
- package/dist/types/components/DateTimePicker/styles.d.ts +1 -1
- package/dist/types/components/DateTimePickerCommon/CustomPopper.d.ts +2 -2
- package/dist/types/components/DateTimePickerCommon/datePickerStyles.d.ts +1 -1
- package/dist/types/components/DateTimePickerCommon/styles.d.ts +7 -7
- package/dist/types/components/Drawer/AssetDrawer/styles.d.ts +2 -2
- package/dist/types/components/Drawer/styles.d.ts +13 -7
- package/dist/types/components/DropdownMenu/Arrow.styled.d.ts +3 -3
- package/dist/types/components/DropdownMenu/Item.styled.d.ts +1 -1
- package/dist/types/components/DropdownMenu/Separator.styled.d.ts +1 -1
- package/dist/types/components/DropdownMenu/styles.d.ts +1 -1
- package/dist/types/components/Field/index.d.ts +5 -4
- package/dist/types/components/Field/styles.d.ts +6 -6
- package/dist/types/components/FieldGroup/index.d.ts +1 -1
- package/dist/types/components/FieldGroup/styles.d.ts +1 -1
- package/dist/types/components/FileDrop/index.d.ts +1 -1
- package/dist/types/components/FileDrop/styles.d.ts +4 -4
- package/dist/types/components/FileUpload/styles.d.ts +1 -1
- package/dist/types/components/Hint/index.d.ts +3 -2
- package/dist/types/components/Hint/styles.d.ts +2 -2
- package/dist/types/components/Icon/index.d.ts +3 -4
- package/dist/types/components/Icon/styles.d.ts +3 -4
- package/dist/types/components/Icons/Actions/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Activity/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Add/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Address/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Airplay/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Alert/content.json.d.ts +7 -0
- package/dist/types/components/Icons/AlertOutline/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Analytics/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Anniversary/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Archive/content.json.d.ts +7 -0
- package/dist/types/components/Icons/ArrowDown/content.json.d.ts +7 -0
- package/dist/types/components/Icons/ArrowLeft/content.json.d.ts +7 -0
- package/dist/types/components/Icons/ArrowLineDown/content.json.d.ts +7 -0
- package/dist/types/components/Icons/ArrowLineLeft/content.json.d.ts +7 -0
- package/dist/types/components/Icons/ArrowLineRight/content.json.d.ts +7 -0
- package/dist/types/components/Icons/ArrowLineUp/content.json.d.ts +7 -0
- package/dist/types/components/Icons/ArrowRight/content.json.d.ts +7 -0
- package/dist/types/components/Icons/ArrowUp/content.json.d.ts +7 -0
- package/dist/types/components/Icons/AspectRatioFill/content.json.d.ts +7 -0
- package/dist/types/components/Icons/AspectRatioFit/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Attachment/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Avatar/content.json.d.ts +7 -0
- package/dist/types/components/Icons/AvatarAccessory/content.json.d.ts +7 -0
- package/dist/types/components/Icons/AvatarBody/content.json.d.ts +7 -0
- package/dist/types/components/Icons/AvatarBottom/content.json.d.ts +7 -0
- package/dist/types/components/Icons/AvatarCostume/content.json.d.ts +7 -0
- package/dist/types/components/Icons/AvatarHead/content.json.d.ts +7 -0
- package/dist/types/components/Icons/AvatarTop/content.json.d.ts +7 -0
- package/dist/types/components/Icons/BarChart/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Basketball/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Behance/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Birthday/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Bold/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Book/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Book2/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Bookmark/content.json.d.ts +7 -0
- package/dist/types/components/Icons/BookmarkOutline/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Bulb/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Bulk/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Buoy/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Burn/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Caddy/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Calcul/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Camera/content.json.d.ts +7 -0
- package/dist/types/components/Icons/CameraOff/content.json.d.ts +7 -0
- package/dist/types/components/Icons/CameraOn/content.json.d.ts +7 -0
- package/dist/types/components/Icons/CandidateStatus/content.json.d.ts +7 -0
- package/dist/types/components/Icons/CardView/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Cast/content.json.d.ts +7 -0
- package/dist/types/components/Icons/CastConnected/content.json.d.ts +7 -0
- package/dist/types/components/Icons/CastUnavailable/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Celebrate/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Certified/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Check/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Clipboard/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Clock/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Code/content.json.d.ts +7 -0
- package/dist/types/components/Icons/CodeBlock/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Coffee/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Collapse/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Comment/content.json.d.ts +7 -0
- package/dist/types/components/Icons/CommentOutline/content.json.d.ts +7 -0
- package/dist/types/components/Icons/CommonArea/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Compass/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Computer/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Connection/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Contract/content.json.d.ts +7 -0
- package/dist/types/components/Icons/ControlBackward/content.json.d.ts +7 -0
- package/dist/types/components/Icons/ControlForward/content.json.d.ts +7 -0
- package/dist/types/components/Icons/ControlPause/content.json.d.ts +7 -0
- package/dist/types/components/Icons/ControlStop/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Copy/content.json.d.ts +7 -0
- package/dist/types/components/Icons/CoverLetter/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Create/content.json.d.ts +7 -0
- package/dist/types/components/Icons/CreditCard/content.json.d.ts +7 -0
- package/dist/types/components/Icons/CrescentMoon/content.json.d.ts +7 -0
- package/dist/types/components/Icons/CrescentMoonOutline/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Cross/content.json.d.ts +7 -0
- package/dist/types/components/Icons/CrossTarget/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Crown/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Csv/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Date/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Department/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Details/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Diamond/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Dish/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Doc/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Docx/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Down/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Download/content.json.d.ts +7 -0
- package/dist/types/components/Icons/DragAndDrop/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Dribbble/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Earth/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Edit/content.json.d.ts +7 -0
- package/dist/types/components/Icons/EducationLevel/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Email/content.json.d.ts +7 -0
- package/dist/types/components/Icons/EmailOutline/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Eot/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Equal/content.json.d.ts +7 -0
- package/dist/types/components/Icons/EuroCurrency/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Expand/content.json.d.ts +7 -0
- package/dist/types/components/Icons/ExpandText/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Extend/content.json.d.ts +7 -0
- package/dist/types/components/Icons/ExternalLink/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Facebook/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Factory/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Female/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Filters/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Fingerprint/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Flag/content.json.d.ts +7 -0
- package/dist/types/components/Icons/FlagCs/content.json.d.ts +8 -0
- package/dist/types/components/Icons/FlagEn/content.json.d.ts +8 -0
- package/dist/types/components/Icons/FlagEs/content.json.d.ts +8 -0
- package/dist/types/components/Icons/FlagFr/content.json.d.ts +8 -0
- package/dist/types/components/Icons/FlagOutline/content.json.d.ts +7 -0
- package/dist/types/components/Icons/FlagPointed/content.json.d.ts +7 -0
- package/dist/types/components/Icons/FlagSk/content.json.d.ts +8 -0
- package/dist/types/components/Icons/FlagUs/content.json.d.ts +8 -0
- package/dist/types/components/Icons/Folder/content.json.d.ts +7 -0
- package/dist/types/components/Icons/FullscreenOff/content.json.d.ts +7 -0
- package/dist/types/components/Icons/FullscreenOn/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Gear/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Gif/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Github/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Google/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Handshake/content.json.d.ts +7 -0
- package/dist/types/components/Icons/HardHat/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Hashtag/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Heading/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Heading1/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Heading2/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Heading3/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Heading4/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Heading5/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Heading6/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Headset/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Heart/content.json.d.ts +7 -0
- package/dist/types/components/Icons/HeartOutline/content.json.d.ts +7 -0
- package/dist/types/components/Icons/HeartShiny/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Hide/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Home/content.json.d.ts +7 -0
- package/dist/types/components/Icons/House/content.json.d.ts +7 -0
- package/dist/types/components/Icons/InProgressCandidate/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Information/content.json.d.ts +7 -0
- package/dist/types/components/Icons/InformationOutline/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Instagram/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Italic/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Jpeg/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Jpg/content.json.d.ts +7 -0
- package/dist/types/components/Icons/JusticeHammer/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Kanban/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Key/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Language/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Leaf/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Left/content.json.d.ts +7 -0
- package/dist/types/components/Icons/LineChart/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Link/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Linkedin/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Location/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Lock/content.json.d.ts +7 -0
- package/dist/types/components/Icons/LockRounded/content.json.d.ts +7 -0
- package/dist/types/components/Icons/LogOut/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Male/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Map/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Masonry/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Masonry2/content.json.d.ts +7 -0
- package/dist/types/components/Icons/MeetingRoom/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Megaphone/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Mention/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Menu/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Mic/content.json.d.ts +7 -0
- package/dist/types/components/Icons/MicrophoneOff/content.json.d.ts +7 -0
- package/dist/types/components/Icons/MicrophoneOn/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Microship/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Mobile/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Money/content.json.d.ts +7 -0
- package/dist/types/components/Icons/More/content.json.d.ts +7 -0
- package/dist/types/components/Icons/MoreAndroid/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Mountain/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Move/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Music/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Negative/content.json.d.ts +7 -0
- package/dist/types/components/Icons/NegativeOutline/content.json.d.ts +7 -0
- package/dist/types/components/Icons/NegativeStraight/content.json.d.ts +7 -0
- package/dist/types/components/Icons/NewCandidate/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Notification/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Npm/content.json.d.ts +7 -0
- package/dist/types/components/Icons/OfferStatus/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Office/content.json.d.ts +7 -0
- package/dist/types/components/Icons/OrderedList/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Origine/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Paperplane/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Pdf/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Pencil/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Phone/content.json.d.ts +7 -0
- package/dist/types/components/Icons/PhoneOutline/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Pictures/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Piechart/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Pin/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Pinterest/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Pizza/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Play/content.json.d.ts +7 -0
- package/dist/types/components/Icons/PlayOutline/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Playlist/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Png/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Podcast/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Positive/content.json.d.ts +7 -0
- package/dist/types/components/Icons/PositiveOutline/content.json.d.ts +7 -0
- package/dist/types/components/Icons/PositiveStraight/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Ppt/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Print/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Promote/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Puzzle/content.json.d.ts +7 -0
- package/dist/types/components/Icons/PuzzleOutline/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Question/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Questions/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Quote/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Refresh/content.json.d.ts +7 -0
- package/dist/types/components/Icons/RefuseCandidate/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Remote/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Remove/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Reset/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Resume/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Review/content.json.d.ts +7 -0
- package/dist/types/components/Icons/ReviewOutline/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Right/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Salary/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Save/content.json.d.ts +7 -0
- package/dist/types/components/Icons/ScreenshareOff/content.json.d.ts +7 -0
- package/dist/types/components/Icons/ScreenshareOn/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Search/content.json.d.ts +7 -0
- package/dist/types/components/Icons/SearchPeople/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Settings/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Share1/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Share2/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Shield/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Show/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Slack/content.json.d.ts +7 -0
- package/dist/types/components/Icons/SoundOff/content.json.d.ts +7 -0
- package/dist/types/components/Icons/SoundOn/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Source/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Spanner/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Sparkles/content.json.d.ts +7 -0
- package/dist/types/components/Icons/SquareAlert/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Stackoverflow/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Stackserver/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Star/content.json.d.ts +7 -0
- package/dist/types/components/Icons/StarOutline/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Strikethrough/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Subtitle/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Success/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Suitcase/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Sun/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Svg/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Symbol/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Table/content.json.d.ts +7 -0
- package/dist/types/components/Icons/TableColumnAddAfter/content.json.d.ts +7 -0
- package/dist/types/components/Icons/TableColumnAddBefore/content.json.d.ts +7 -0
- package/dist/types/components/Icons/TableColumnRemove/content.json.d.ts +7 -0
- package/dist/types/components/Icons/TableDelete/content.json.d.ts +7 -0
- package/dist/types/components/Icons/TableDivide/content.json.d.ts +7 -0
- package/dist/types/components/Icons/TableMergeCells/content.json.d.ts +7 -0
- package/dist/types/components/Icons/TableRowAddAbove/content.json.d.ts +7 -0
- package/dist/types/components/Icons/TableRowAddBelow/content.json.d.ts +7 -0
- package/dist/types/components/Icons/TableRowRemove/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Tablet/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Tag/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Target/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Teepee/content.json.d.ts +7 -0
- package/dist/types/components/Icons/ThumbDown/content.json.d.ts +7 -0
- package/dist/types/components/Icons/ThumbUp/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Thunderclock/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Tiktok/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Trash/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Tree/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Trophy/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Ttf/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Twitch/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Twitter/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Txt/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Type/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Unavailable/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Underline/content.json.d.ts +7 -0
- package/dist/types/components/Icons/UnorderedList/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Up/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Update/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Upload/content.json.d.ts +7 -0
- package/dist/types/components/Icons/User/content.json.d.ts +7 -0
- package/dist/types/components/Icons/UserOutline/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Video/content.json.d.ts +7 -0
- package/dist/types/components/Icons/VideoCamera/content.json.d.ts +7 -0
- package/dist/types/components/Icons/VideoCamera2/content.json.d.ts +7 -0
- package/dist/types/components/Icons/WatchLater/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Woff/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Woff2/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Write/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Wttj/content.json.d.ts +7 -0
- package/dist/types/components/Icons/X/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Xing/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Xls/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Xlsx/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Youtube/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Zapier/content.json.d.ts +7 -0
- package/dist/types/components/Icons/Zip/content.json.d.ts +7 -0
- package/dist/types/components/IconsFont/index.d.ts +2 -1
- package/dist/types/components/IconsFont/styles.d.ts +1 -1
- package/dist/types/components/IconsFont/unicode.json.d.ts +303 -0
- package/dist/types/components/InputText/styles.d.ts +1 -2
- package/dist/types/components/Label/index.d.ts +3 -2
- package/dist/types/components/Label/styles.d.ts +4 -4
- package/dist/types/components/Link/styles.d.ts +7 -1
- package/dist/types/components/Loader/styles.d.ts +7 -2
- package/dist/types/components/Logo/Solutions.d.ts +1 -1
- package/dist/types/components/Logo/Symbol.d.ts +1 -1
- package/dist/types/components/Logo/Wui.d.ts +1 -1
- package/dist/types/components/Logo/styles.d.ts +1 -1
- package/dist/types/components/Modal/Assets/Backdrop.d.ts +8 -1
- package/dist/types/components/Modal/Assets/index.d.ts +15 -6
- package/dist/types/components/Modal/Assets/styles.d.ts +16 -7
- package/dist/types/components/Modal/index.d.ts +15 -6
- package/dist/types/components/Modal/styles.d.ts +18 -8
- package/dist/types/components/Pagination/styles.d.ts +7 -7
- package/dist/types/components/Picker/styles.d.ts +5 -1
- package/dist/types/components/Popover/Popover.d.ts +3 -2
- package/dist/types/components/Popover/PopoverHover.d.ts +3 -2
- package/dist/types/components/Popover/styles.d.ts +25 -9
- package/dist/types/components/Radio/styles.d.ts +15 -5
- package/dist/types/components/RadioGroup/styles.d.ts +2 -2
- package/dist/types/components/RadioTab/styles.d.ts +9 -5
- package/dist/types/components/Search/index.d.ts +1 -1
- package/dist/types/components/Search/styles.d.ts +9 -9
- package/dist/types/components/Select/index.d.ts +6 -2
- package/dist/types/components/Select/styles.d.ts +24 -15
- package/dist/types/components/Shape/styles.d.ts +5 -1
- package/dist/types/components/Slider/styles.d.ts +30 -8
- package/dist/types/components/Swiper/index.d.ts +2 -2
- package/dist/types/components/Swiper/styles.d.ts +19 -14
- package/dist/types/components/System/index.d.ts +1 -19
- package/dist/types/components/Table/index.d.ts +7 -6
- package/dist/types/components/Table/styles.d.ts +9 -9
- package/dist/types/components/Tabs/styles.d.ts +13 -5
- package/dist/types/components/Tag/index.d.ts +2 -1
- package/dist/types/components/Tag/styles.d.ts +4 -4
- package/dist/types/components/Text/styles.d.ts +1 -1
- package/dist/types/components/Textarea/styles.d.ts +1 -1
- package/dist/types/components/TimePicker/styles.d.ts +1 -1
- package/dist/types/components/Toast/styles.d.ts +29 -9
- package/dist/types/components/Toggle/styles.d.ts +9 -5
- package/dist/types/components/Tooltip/styles.d.ts +2 -2
- package/dist/types/components/UniversalLink/styles.d.ts +1 -1
- package/dist/types/components/VariantIcon/styles.d.ts +2 -2
- package/dist/types/components/WelcomeLoader/loader.json.d.ts +3 -0
- package/dist/types/components/WuiProvider/index.d.ts +2 -2
- package/dist/types/components/WuiProvider/styles.d.ts +4 -4
- package/dist/types/utils/overflow-ellipsis.d.ts +1 -1
- package/package.json +8 -6
package/dist/FileDrop.mjs
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import s, { forwardRef as Ei, useImperativeHandle as zi, Fragment as Ai, useMemo as V, useRef as fa, useReducer as Fi, useEffect as ia, useCallback as E, useState as Ya } from "react";
|
|
3
3
|
import { P as d } from "./index-SbQUT2mU.mjs";
|
|
4
4
|
import { c as Va } from "./create-event-rXDe5aCQ.mjs";
|
|
5
|
-
import wa, { css as _a, th as _
|
|
6
|
-
import { shouldForwardProp as
|
|
5
|
+
import wa, { css as _a, th as _ } from "@xstyled/styled-components";
|
|
6
|
+
import { shouldForwardProp as Oi, forwardRef as _i } from "./System.mjs";
|
|
7
7
|
import { Text as xa } from "./Text.mjs";
|
|
8
8
|
import { Button as ga } from "./Button.mjs";
|
|
9
9
|
import "./Icon.mjs";
|
|
10
|
-
import { E as
|
|
11
|
-
import { getFileIcon as
|
|
12
|
-
import { P as
|
|
10
|
+
import { E as Pi } from "./index-DqBUFsqP.mjs";
|
|
11
|
+
import { getFileIcon as Ii, getFileSize as Ri, getFileName as li } from "./Files.mjs";
|
|
12
|
+
import { P as Si, N as Ti, E as qi, T as Ci } from "./index-CExLVjET.mjs";
|
|
13
13
|
function H(a, i, t, e) {
|
|
14
14
|
function n(o) {
|
|
15
15
|
return o instanceof t ? o : new t(function(c) {
|
|
@@ -37,7 +37,7 @@ function H(a, i, t, e) {
|
|
|
37
37
|
h((e = e.apply(a, i || [])).next());
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
|
-
const
|
|
40
|
+
const Li = /* @__PURE__ */ new Map([
|
|
41
41
|
// https://github.com/guzzle/psr7/blob/2d9260799e713f1c475d3c5fdc3d6561ff7441b2/src/MimeType.php
|
|
42
42
|
["1km", "application/vnd.1000minds.decision-model+xml"],
|
|
43
43
|
["3dml", "text/vnd.in3d.3dml"],
|
|
@@ -1241,13 +1241,13 @@ const $i = /* @__PURE__ */ new Map([
|
|
|
1241
1241
|
["zsh", "text/x-scriptzsh"]
|
|
1242
1242
|
]);
|
|
1243
1243
|
function G(a, i, t) {
|
|
1244
|
-
const e =
|
|
1244
|
+
const e = $i(a), { webkitRelativePath: n } = a, o = typeof i == "string" ? i : typeof n == "string" && n.length > 0 ? n : `./${a.name}`;
|
|
1245
1245
|
return typeof e.path != "string" && Ga(e, "path", o), Ga(e, "relativePath", o), e;
|
|
1246
1246
|
}
|
|
1247
|
-
function
|
|
1247
|
+
function $i(a) {
|
|
1248
1248
|
const { name: i } = a;
|
|
1249
1249
|
if (i && i.lastIndexOf(".") !== -1 && !a.type) {
|
|
1250
|
-
const e = i.split(".").pop().toLowerCase(), n =
|
|
1250
|
+
const e = i.split(".").pop().toLowerCase(), n = Li.get(e);
|
|
1251
1251
|
n && Object.defineProperty(a, "type", {
|
|
1252
1252
|
value: n,
|
|
1253
1253
|
writable: !1,
|
|
@@ -1265,49 +1265,49 @@ function Ga(a, i, t) {
|
|
|
1265
1265
|
enumerable: !0
|
|
1266
1266
|
});
|
|
1267
1267
|
}
|
|
1268
|
-
const
|
|
1268
|
+
const Mi = [
|
|
1269
1269
|
// Thumbnail cache files for macOS and Windows
|
|
1270
1270
|
".DS_Store",
|
|
1271
1271
|
// macOs
|
|
1272
1272
|
"Thumbs.db"
|
|
1273
1273
|
// Windows
|
|
1274
1274
|
];
|
|
1275
|
-
function
|
|
1275
|
+
function Ki(a) {
|
|
1276
1276
|
return H(this, void 0, void 0, function* () {
|
|
1277
|
-
return ba(a) &&
|
|
1277
|
+
return ba(a) && Hi(a.dataTransfer) ? Ui(a.dataTransfer, a.type) : Wi(a) ? Bi(a) : Array.isArray(a) && a.every((i) => "getFile" in i && typeof i.getFile == "function") ? Ni(a) : [];
|
|
1278
1278
|
});
|
|
1279
1279
|
}
|
|
1280
|
-
function
|
|
1280
|
+
function Hi(a) {
|
|
1281
1281
|
return ba(a);
|
|
1282
1282
|
}
|
|
1283
|
-
function
|
|
1283
|
+
function Wi(a) {
|
|
1284
1284
|
return ba(a) && ba(a.target);
|
|
1285
1285
|
}
|
|
1286
1286
|
function ba(a) {
|
|
1287
1287
|
return typeof a == "object" && a !== null;
|
|
1288
1288
|
}
|
|
1289
|
-
function
|
|
1289
|
+
function Bi(a) {
|
|
1290
1290
|
return Ra(a.target.files).map((i) => G(i));
|
|
1291
1291
|
}
|
|
1292
|
-
function
|
|
1292
|
+
function Ni(a) {
|
|
1293
1293
|
return H(this, void 0, void 0, function* () {
|
|
1294
1294
|
return (yield Promise.all(a.map((t) => t.getFile()))).map((t) => G(t));
|
|
1295
1295
|
});
|
|
1296
1296
|
}
|
|
1297
|
-
function
|
|
1297
|
+
function Ui(a, i) {
|
|
1298
1298
|
return H(this, void 0, void 0, function* () {
|
|
1299
1299
|
if (a.items) {
|
|
1300
1300
|
const t = Ra(a.items).filter((n) => n.kind === "file");
|
|
1301
1301
|
if (i !== "drop")
|
|
1302
1302
|
return t;
|
|
1303
|
-
const e = yield Promise.all(t.map(
|
|
1303
|
+
const e = yield Promise.all(t.map(Yi));
|
|
1304
1304
|
return Za(ri(e));
|
|
1305
1305
|
}
|
|
1306
1306
|
return Za(Ra(a.files).map((t) => G(t)));
|
|
1307
1307
|
});
|
|
1308
1308
|
}
|
|
1309
1309
|
function Za(a) {
|
|
1310
|
-
return a.filter((i) =>
|
|
1310
|
+
return a.filter((i) => Mi.indexOf(i.name) === -1);
|
|
1311
1311
|
}
|
|
1312
1312
|
function Ra(a) {
|
|
1313
1313
|
if (a === null)
|
|
@@ -1319,7 +1319,7 @@ function Ra(a) {
|
|
|
1319
1319
|
}
|
|
1320
1320
|
return i;
|
|
1321
1321
|
}
|
|
1322
|
-
function
|
|
1322
|
+
function Yi(a) {
|
|
1323
1323
|
if (typeof a.webkitGetAsEntry != "function")
|
|
1324
1324
|
return Ja(a);
|
|
1325
1325
|
const i = a.webkitGetAsEntry();
|
|
@@ -1344,9 +1344,9 @@ function Ja(a, i) {
|
|
|
1344
1344
|
const n = G(e, (t = i == null ? void 0 : i.fullPath) !== null && t !== void 0 ? t : void 0);
|
|
1345
1345
|
return Promise.resolve(n);
|
|
1346
1346
|
}
|
|
1347
|
-
function
|
|
1347
|
+
function Vi(a) {
|
|
1348
1348
|
return H(this, void 0, void 0, function* () {
|
|
1349
|
-
return a.isDirectory ? si(a) :
|
|
1349
|
+
return a.isDirectory ? si(a) : Gi(a);
|
|
1350
1350
|
});
|
|
1351
1351
|
}
|
|
1352
1352
|
function si(a) {
|
|
@@ -1356,7 +1356,7 @@ function si(a) {
|
|
|
1356
1356
|
function o() {
|
|
1357
1357
|
i.readEntries((c) => H(this, void 0, void 0, function* () {
|
|
1358
1358
|
if (c.length) {
|
|
1359
|
-
const r = Promise.all(c.map(
|
|
1359
|
+
const r = Promise.all(c.map(Vi));
|
|
1360
1360
|
n.push(r), o();
|
|
1361
1361
|
} else
|
|
1362
1362
|
try {
|
|
@@ -1372,7 +1372,7 @@ function si(a) {
|
|
|
1372
1372
|
o();
|
|
1373
1373
|
});
|
|
1374
1374
|
}
|
|
1375
|
-
function
|
|
1375
|
+
function Gi(a) {
|
|
1376
1376
|
return H(this, void 0, void 0, function* () {
|
|
1377
1377
|
return new Promise((i, t) => {
|
|
1378
1378
|
a.file((e) => {
|
|
@@ -1398,16 +1398,16 @@ var Pa = function(a, i) {
|
|
|
1398
1398
|
return !0;
|
|
1399
1399
|
};
|
|
1400
1400
|
function Xa(a) {
|
|
1401
|
-
return
|
|
1401
|
+
return Xi(a) || Ji(a) || mi(a) || Zi();
|
|
1402
1402
|
}
|
|
1403
|
-
function
|
|
1403
|
+
function Zi() {
|
|
1404
1404
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1405
1405
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1406
1406
|
}
|
|
1407
|
-
function
|
|
1407
|
+
function Ji(a) {
|
|
1408
1408
|
if (typeof Symbol < "u" && a[Symbol.iterator] != null || a["@@iterator"] != null) return Array.from(a);
|
|
1409
1409
|
}
|
|
1410
|
-
function
|
|
1410
|
+
function Xi(a) {
|
|
1411
1411
|
if (Array.isArray(a)) return Sa(a);
|
|
1412
1412
|
}
|
|
1413
1413
|
function Qa(a, i) {
|
|
@@ -1435,9 +1435,9 @@ function di(a, i, t) {
|
|
|
1435
1435
|
return i in a ? Object.defineProperty(a, i, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : a[i] = t, a;
|
|
1436
1436
|
}
|
|
1437
1437
|
function ta(a, i) {
|
|
1438
|
-
return
|
|
1438
|
+
return it(a) || at(a, i) || mi(a, i) || Qi();
|
|
1439
1439
|
}
|
|
1440
|
-
function
|
|
1440
|
+
function Qi() {
|
|
1441
1441
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1442
1442
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1443
1443
|
}
|
|
@@ -1455,7 +1455,7 @@ function Sa(a, i) {
|
|
|
1455
1455
|
e[t] = a[t];
|
|
1456
1456
|
return e;
|
|
1457
1457
|
}
|
|
1458
|
-
function
|
|
1458
|
+
function at(a, i) {
|
|
1459
1459
|
var t = a == null ? null : typeof Symbol < "u" && a[Symbol.iterator] || a["@@iterator"];
|
|
1460
1460
|
if (t != null) {
|
|
1461
1461
|
var e = [], n = !0, o = !1, c, r;
|
|
@@ -1474,32 +1474,32 @@ function it(a, i) {
|
|
|
1474
1474
|
return e;
|
|
1475
1475
|
}
|
|
1476
1476
|
}
|
|
1477
|
-
function
|
|
1477
|
+
function it(a) {
|
|
1478
1478
|
if (Array.isArray(a)) return a;
|
|
1479
1479
|
}
|
|
1480
|
-
var
|
|
1480
|
+
var tt = typeof Pa == "function" ? Pa : Pa.default, et = "file-invalid-type", nt = "file-too-large", pt = "file-too-small", ot = "too-many-files", ct = function() {
|
|
1481
1481
|
var i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", t = i.split(","), e = t.length > 1 ? "one of ".concat(t.join(", ")) : t[0];
|
|
1482
1482
|
return {
|
|
1483
|
-
code:
|
|
1483
|
+
code: et,
|
|
1484
1484
|
message: "File type must be ".concat(e)
|
|
1485
1485
|
};
|
|
1486
1486
|
}, ii = function(i) {
|
|
1487
1487
|
return {
|
|
1488
|
-
code:
|
|
1488
|
+
code: nt,
|
|
1489
1489
|
message: "File is larger than ".concat(i, " ").concat(i === 1 ? "byte" : "bytes")
|
|
1490
1490
|
};
|
|
1491
1491
|
}, ti = function(i) {
|
|
1492
1492
|
return {
|
|
1493
|
-
code:
|
|
1493
|
+
code: pt,
|
|
1494
1494
|
message: "File is smaller than ".concat(i, " ").concat(i === 1 ? "byte" : "bytes")
|
|
1495
1495
|
};
|
|
1496
|
-
},
|
|
1497
|
-
code:
|
|
1496
|
+
}, lt = {
|
|
1497
|
+
code: ot,
|
|
1498
1498
|
message: "Too many files"
|
|
1499
1499
|
};
|
|
1500
1500
|
function ui(a, i) {
|
|
1501
|
-
var t = a.type === "application/x-moz-file" ||
|
|
1502
|
-
return [t, t ? null :
|
|
1501
|
+
var t = a.type === "application/x-moz-file" || tt(a, i);
|
|
1502
|
+
return [t, t ? null : ct(i)];
|
|
1503
1503
|
}
|
|
1504
1504
|
function fi(a, i, t) {
|
|
1505
1505
|
if (K(a.size))
|
|
@@ -1515,7 +1515,7 @@ function fi(a, i, t) {
|
|
|
1515
1515
|
function K(a) {
|
|
1516
1516
|
return a != null;
|
|
1517
1517
|
}
|
|
1518
|
-
function
|
|
1518
|
+
function rt(a) {
|
|
1519
1519
|
var i = a.files, t = a.accept, e = a.minSize, n = a.maxSize, o = a.multiple, c = a.maxFiles, r = a.validator;
|
|
1520
1520
|
return !o && i.length > 1 || o && c >= 1 && i.length > c ? !1 : i.every(function(f) {
|
|
1521
1521
|
var h = ui(f, t), x = ta(h, 1), k = x[0], P = fi(f, e, n), R = ta(P, 1), j = R[0], I = r ? r(f) : null;
|
|
@@ -1533,15 +1533,15 @@ function va(a) {
|
|
|
1533
1533
|
function ei(a) {
|
|
1534
1534
|
a.preventDefault();
|
|
1535
1535
|
}
|
|
1536
|
-
function
|
|
1536
|
+
function st(a) {
|
|
1537
1537
|
return a.indexOf("MSIE") !== -1 || a.indexOf("Trident/") !== -1;
|
|
1538
1538
|
}
|
|
1539
|
-
function
|
|
1539
|
+
function dt(a) {
|
|
1540
1540
|
return a.indexOf("Edge/") !== -1;
|
|
1541
1541
|
}
|
|
1542
|
-
function
|
|
1542
|
+
function mt() {
|
|
1543
1543
|
var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : window.navigator.userAgent;
|
|
1544
|
-
return
|
|
1544
|
+
return st(a) || dt(a);
|
|
1545
1545
|
}
|
|
1546
1546
|
function O() {
|
|
1547
1547
|
for (var a = arguments.length, i = new Array(a), t = 0; t < a; t++)
|
|
@@ -1554,10 +1554,10 @@ function O() {
|
|
|
1554
1554
|
});
|
|
1555
1555
|
};
|
|
1556
1556
|
}
|
|
1557
|
-
function
|
|
1557
|
+
function ut() {
|
|
1558
1558
|
return "showOpenFilePicker" in window;
|
|
1559
1559
|
}
|
|
1560
|
-
function
|
|
1560
|
+
function ft(a) {
|
|
1561
1561
|
if (K(a)) {
|
|
1562
1562
|
var i = Object.entries(a).filter(function(t) {
|
|
1563
1563
|
var e = ta(t, 2), n = e[0], o = e[1], c = !0;
|
|
@@ -1574,7 +1574,7 @@ function vt(a) {
|
|
|
1574
1574
|
}
|
|
1575
1575
|
return a;
|
|
1576
1576
|
}
|
|
1577
|
-
function
|
|
1577
|
+
function vt(a) {
|
|
1578
1578
|
if (K(a))
|
|
1579
1579
|
return Object.entries(a).reduce(function(i, t) {
|
|
1580
1580
|
var e = ta(t, 2), n = e[0], o = e[1];
|
|
@@ -1583,10 +1583,10 @@ function xt(a) {
|
|
|
1583
1583
|
return vi(i) || xi(i);
|
|
1584
1584
|
}).join(",");
|
|
1585
1585
|
}
|
|
1586
|
-
function
|
|
1586
|
+
function xt(a) {
|
|
1587
1587
|
return a instanceof DOMException && (a.name === "AbortError" || a.code === a.ABORT_ERR);
|
|
1588
1588
|
}
|
|
1589
|
-
function
|
|
1589
|
+
function gt(a) {
|
|
1590
1590
|
return a instanceof DOMException && (a.name === "SecurityError" || a.code === a.SECURITY_ERR);
|
|
1591
1591
|
}
|
|
1592
1592
|
function vi(a) {
|
|
@@ -1595,24 +1595,24 @@ function vi(a) {
|
|
|
1595
1595
|
function xi(a) {
|
|
1596
1596
|
return /^.*\.[\w]+$/.test(a);
|
|
1597
1597
|
}
|
|
1598
|
-
var
|
|
1599
|
-
function
|
|
1600
|
-
return
|
|
1598
|
+
var bt = ["children"], ht = ["open"], yt = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"], wt = ["refKey", "onChange", "onClick"];
|
|
1599
|
+
function kt(a) {
|
|
1600
|
+
return Et(a) || Dt(a) || gi(a) || jt();
|
|
1601
1601
|
}
|
|
1602
|
-
function
|
|
1602
|
+
function jt() {
|
|
1603
1603
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1604
1604
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1605
1605
|
}
|
|
1606
|
-
function
|
|
1606
|
+
function Dt(a) {
|
|
1607
1607
|
if (typeof Symbol < "u" && a[Symbol.iterator] != null || a["@@iterator"] != null) return Array.from(a);
|
|
1608
1608
|
}
|
|
1609
|
-
function
|
|
1609
|
+
function Et(a) {
|
|
1610
1610
|
if (Array.isArray(a)) return Ta(a);
|
|
1611
1611
|
}
|
|
1612
1612
|
function Ia(a, i) {
|
|
1613
|
-
return
|
|
1613
|
+
return Ft(a) || At(a, i) || gi(a, i) || zt();
|
|
1614
1614
|
}
|
|
1615
|
-
function
|
|
1615
|
+
function zt() {
|
|
1616
1616
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1617
1617
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1618
1618
|
}
|
|
@@ -1630,7 +1630,7 @@ function Ta(a, i) {
|
|
|
1630
1630
|
e[t] = a[t];
|
|
1631
1631
|
return e;
|
|
1632
1632
|
}
|
|
1633
|
-
function
|
|
1633
|
+
function At(a, i) {
|
|
1634
1634
|
var t = a == null ? null : typeof Symbol < "u" && a[Symbol.iterator] || a["@@iterator"];
|
|
1635
1635
|
if (t != null) {
|
|
1636
1636
|
var e = [], n = !0, o = !1, c, r;
|
|
@@ -1649,7 +1649,7 @@ function Ft(a, i) {
|
|
|
1649
1649
|
return e;
|
|
1650
1650
|
}
|
|
1651
1651
|
}
|
|
1652
|
-
function
|
|
1652
|
+
function Ft(a) {
|
|
1653
1653
|
if (Array.isArray(a)) return a;
|
|
1654
1654
|
}
|
|
1655
1655
|
function ni(a, i) {
|
|
@@ -1678,7 +1678,7 @@ function qa(a, i, t) {
|
|
|
1678
1678
|
}
|
|
1679
1679
|
function ya(a, i) {
|
|
1680
1680
|
if (a == null) return {};
|
|
1681
|
-
var t =
|
|
1681
|
+
var t = Ot(a, i), e, n;
|
|
1682
1682
|
if (Object.getOwnPropertySymbols) {
|
|
1683
1683
|
var o = Object.getOwnPropertySymbols(a);
|
|
1684
1684
|
for (n = 0; n < o.length; n++)
|
|
@@ -1686,7 +1686,7 @@ function ya(a, i) {
|
|
|
1686
1686
|
}
|
|
1687
1687
|
return t;
|
|
1688
1688
|
}
|
|
1689
|
-
function
|
|
1689
|
+
function Ot(a, i) {
|
|
1690
1690
|
if (a == null) return {};
|
|
1691
1691
|
var t = {}, e = Object.keys(a), n, o;
|
|
1692
1692
|
for (o = 0; o < e.length; o++)
|
|
@@ -1694,7 +1694,7 @@ function _t(a, i) {
|
|
|
1694
1694
|
return t;
|
|
1695
1695
|
}
|
|
1696
1696
|
var La = /* @__PURE__ */ Ei(function(a, i) {
|
|
1697
|
-
var t = a.children, e = ya(a,
|
|
1697
|
+
var t = a.children, e = ya(a, bt), n = hi(e), o = n.open, c = ya(n, ht);
|
|
1698
1698
|
return zi(i, function() {
|
|
1699
1699
|
return {
|
|
1700
1700
|
open: o
|
|
@@ -1706,7 +1706,7 @@ var La = /* @__PURE__ */ Ei(function(a, i) {
|
|
|
1706
1706
|
La.displayName = "Dropzone";
|
|
1707
1707
|
var bi = {
|
|
1708
1708
|
disabled: !1,
|
|
1709
|
-
getFilesFromEvent:
|
|
1709
|
+
getFilesFromEvent: Ki,
|
|
1710
1710
|
maxSize: 1 / 0,
|
|
1711
1711
|
minSize: 0,
|
|
1712
1712
|
multiple: !0,
|
|
@@ -1900,14 +1900,14 @@ var Ca = {
|
|
|
1900
1900
|
};
|
|
1901
1901
|
function hi() {
|
|
1902
1902
|
var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, i = u(u({}, bi), a), t = i.accept, e = i.disabled, n = i.getFilesFromEvent, o = i.maxSize, c = i.minSize, r = i.multiple, f = i.maxFiles, h = i.onDragEnter, x = i.onDragLeave, k = i.onDragOver, P = i.onDrop, R = i.onDropAccepted, j = i.onDropRejected, I = i.onFileDialogCancel, q = i.onFileDialogOpen, ea = i.useFsAccessApi, na = i.autoFocus, Z = i.preventDropOnDocument, D = i.noClick, S = i.noKeyboard, W = i.noDrag, z = i.noDragEventsBubbling, J = i.onError, C = i.validator, L = V(function() {
|
|
1903
|
-
return xt(t);
|
|
1904
|
-
}, [t]), pa = V(function() {
|
|
1905
1903
|
return vt(t);
|
|
1904
|
+
}, [t]), pa = V(function() {
|
|
1905
|
+
return ft(t);
|
|
1906
1906
|
}, [t]), X = V(function() {
|
|
1907
1907
|
return typeof q == "function" ? q : pi;
|
|
1908
1908
|
}, [q]), $ = V(function() {
|
|
1909
1909
|
return typeof I == "function" ? I : pi;
|
|
1910
|
-
}, [I]), b = fa(null), y = fa(null), oa = Fi(
|
|
1910
|
+
}, [I]), b = fa(null), y = fa(null), oa = Fi(_t, Ca), ca = Ia(oa, 2), A = ca[0], m = ca[1], F = A.isFocused, la = A.isFileDialogActive, B = fa(typeof window < "u" && window.isSecureContext && ea && ut()), Q = function() {
|
|
1911
1911
|
!B.current && la && setTimeout(function() {
|
|
1912
1912
|
if (y.current) {
|
|
1913
1913
|
var l = y.current.files;
|
|
@@ -1936,9 +1936,9 @@ function hi() {
|
|
|
1936
1936
|
var M = E(function(p) {
|
|
1937
1937
|
J ? J(p) : console.error(p);
|
|
1938
1938
|
}, [J]), Ma = E(function(p) {
|
|
1939
|
-
p.preventDefault(), p.persist(), ma(p), T.current = [].concat(
|
|
1939
|
+
p.preventDefault(), p.persist(), ma(p), T.current = [].concat(kt(T.current), [p.target]), va(p) && Promise.resolve(n(p)).then(function(l) {
|
|
1940
1940
|
if (!(ha(p) && !z)) {
|
|
1941
|
-
var v = l.length, g = v > 0 &&
|
|
1941
|
+
var v = l.length, g = v > 0 && rt({
|
|
1942
1942
|
files: l,
|
|
1943
1943
|
accept: L,
|
|
1944
1944
|
minSize: c,
|
|
@@ -1995,7 +1995,7 @@ function hi() {
|
|
|
1995
1995
|
}), (!r && v.length > 1 || r && f >= 1 && v.length > f) && (v.forEach(function(w) {
|
|
1996
1996
|
g.push({
|
|
1997
1997
|
file: w,
|
|
1998
|
-
errors: [
|
|
1998
|
+
errors: [lt]
|
|
1999
1999
|
});
|
|
2000
2000
|
}), v.splice(0)), m({
|
|
2001
2001
|
acceptedFiles: v,
|
|
@@ -2027,9 +2027,9 @@ function hi() {
|
|
|
2027
2027
|
type: "closeDialog"
|
|
2028
2028
|
});
|
|
2029
2029
|
}).catch(function(l) {
|
|
2030
|
-
|
|
2030
|
+
xt(l) ? ($(l), m({
|
|
2031
2031
|
type: "closeDialog"
|
|
2032
|
-
})) :
|
|
2032
|
+
})) : gt(l) ? (B.current = !1, y.current ? (y.current.value = null, y.current.click()) : M(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))) : M(l);
|
|
2033
2033
|
});
|
|
2034
2034
|
return;
|
|
2035
2035
|
}
|
|
@@ -2047,7 +2047,7 @@ function hi() {
|
|
|
2047
2047
|
type: "blur"
|
|
2048
2048
|
});
|
|
2049
2049
|
}, []), Ua = E(function() {
|
|
2050
|
-
D || (
|
|
2050
|
+
D || (mt() ? setTimeout(N, 0) : N());
|
|
2051
2051
|
}, [D, N]), U = function(l) {
|
|
2052
2052
|
return e ? null : l;
|
|
2053
2053
|
}, ka = function(l) {
|
|
@@ -2058,7 +2058,7 @@ function hi() {
|
|
|
2058
2058
|
z && l.stopPropagation();
|
|
2059
2059
|
}, wi = V(function() {
|
|
2060
2060
|
return function() {
|
|
2061
|
-
var p = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, l = p.refKey, v = l === void 0 ? "ref" : l, g = p.role, w = p.onKeyDown, aa = p.onFocus, Y = p.onBlur, ja = p.onClick, Da = p.onDragEnter, Ea = p.onDragOver, ua = p.onDragLeave, za = p.onDrop, Aa = ya(p,
|
|
2061
|
+
var p = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, l = p.refKey, v = l === void 0 ? "ref" : l, g = p.role, w = p.onKeyDown, aa = p.onFocus, Y = p.onBlur, ja = p.onClick, Da = p.onDragEnter, Ea = p.onDragOver, ua = p.onDragLeave, za = p.onDrop, Aa = ya(p, yt);
|
|
2062
2062
|
return u(u(qa({
|
|
2063
2063
|
onKeyDown: ka(O(w, Wa)),
|
|
2064
2064
|
onFocus: ka(O(aa, Ba)),
|
|
@@ -2077,7 +2077,7 @@ function hi() {
|
|
|
2077
2077
|
p.stopPropagation();
|
|
2078
2078
|
}, []), ji = V(function() {
|
|
2079
2079
|
return function() {
|
|
2080
|
-
var p = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, l = p.refKey, v = l === void 0 ? "ref" : l, g = p.onChange, w = p.onClick, aa = ya(p,
|
|
2080
|
+
var p = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, l = p.refKey, v = l === void 0 ? "ref" : l, g = p.onChange, w = p.onClick, aa = ya(p, wt), Y = qa({
|
|
2081
2081
|
accept: L,
|
|
2082
2082
|
multiple: r,
|
|
2083
2083
|
type: "file",
|
|
@@ -2109,7 +2109,7 @@ function hi() {
|
|
|
2109
2109
|
open: U(N)
|
|
2110
2110
|
});
|
|
2111
2111
|
}
|
|
2112
|
-
function
|
|
2112
|
+
function _t(a, i) {
|
|
2113
2113
|
switch (i.type) {
|
|
2114
2114
|
case "focus":
|
|
2115
2115
|
return u(u({}, a), {}, {
|
|
@@ -2147,7 +2147,7 @@ function Pt(a, i) {
|
|
|
2147
2147
|
}
|
|
2148
2148
|
function pi() {
|
|
2149
2149
|
}
|
|
2150
|
-
const
|
|
2150
|
+
const Pt = wa.divBox.withConfig({ shouldForwardProp: Oi })(
|
|
2151
2151
|
({ disabled: a, isDragAccept: i, isDragReject: t }) => _a`
|
|
2152
2152
|
${_("defaultFields.default")};
|
|
2153
2153
|
${_("fileDrops.default")};
|
|
@@ -2162,7 +2162,6 @@ const It = wa("div").withConfig({ shouldForwardProp: _i })(
|
|
|
2162
2162
|
align-items: center;
|
|
2163
2163
|
padding: md;
|
|
2164
2164
|
transition: medium;
|
|
2165
|
-
${Oi};
|
|
2166
2165
|
|
|
2167
2166
|
&:focus {
|
|
2168
2167
|
${_("defaultFields.focused.default")};
|
|
@@ -2173,7 +2172,7 @@ const It = wa("div").withConfig({ shouldForwardProp: _i })(
|
|
|
2173
2172
|
${_("fileDrops.disabled")};
|
|
2174
2173
|
`};
|
|
2175
2174
|
`
|
|
2176
|
-
),
|
|
2175
|
+
), It = wa.div`
|
|
2177
2176
|
width: 100%;
|
|
2178
2177
|
height: 100%;
|
|
2179
2178
|
display: flex;
|
|
@@ -2184,7 +2183,7 @@ const It = wa("div").withConfig({ shouldForwardProp: _i })(
|
|
|
2184
2183
|
max-height: 100%;
|
|
2185
2184
|
max-width: 100%;
|
|
2186
2185
|
object-fit: contain;
|
|
2187
|
-
`,
|
|
2186
|
+
`, Rt = wa.div`
|
|
2188
2187
|
position: absolute;
|
|
2189
2188
|
top: ${_.space("md")};
|
|
2190
2189
|
right: ${_.space("md")};
|
|
@@ -2196,15 +2195,15 @@ const It = wa("div").withConfig({ shouldForwardProp: _i })(
|
|
|
2196
2195
|
hint: t = "Drag & drop a file here or",
|
|
2197
2196
|
openFile: e,
|
|
2198
2197
|
title: n = "Add file"
|
|
2199
|
-
}) => /* @__PURE__ */ s.createElement(s.Fragment, null, /* @__PURE__ */ s.createElement(xa, { color: "neutral-90", m: "0", variant: "h4" }, n), /* @__PURE__ */ s.createElement(xa, { color: "beige-70", m: "0", mt: "xs", variant: "sm" }, t), /* @__PURE__ */ s.createElement(ga, { disabled: a, mt: "lg", onClick: e, type: "button" }, i)),
|
|
2198
|
+
}) => /* @__PURE__ */ s.createElement(s.Fragment, null, /* @__PURE__ */ s.createElement(xa, { color: "neutral-90", m: "0", variant: "h4" }, n), /* @__PURE__ */ s.createElement(xa, { color: "beige-70", m: "0", mt: "xs", variant: "sm" }, t), /* @__PURE__ */ s.createElement(ga, { disabled: a, mt: "lg", onClick: e, type: "button" }, i)), St = ({
|
|
2200
2199
|
file: a,
|
|
2201
2200
|
fileName: i,
|
|
2202
2201
|
forceFileType: t,
|
|
2203
2202
|
previewButtonText: e = "Preview"
|
|
2204
2203
|
}) => {
|
|
2205
|
-
const n = typeof a == "string", o =
|
|
2206
|
-
return /* @__PURE__ */ s.createElement(s.Fragment, null, /* @__PURE__ */ s.createElement(o, { color: "neutral-90", h: 50, mb: "lg", w: 50 }), /* @__PURE__ */ s.createElement(xa, { color: "neutral-90", lines: 1, m: 0, maxWidth: 600, variant: "h4" }, r), !n && /* @__PURE__ */ s.createElement(xa, { color: "beige-70", fontWeight: "medium", lines: 1, m: 0, variant: "sm" }, c), n && /* @__PURE__ */ s.createElement(ga, { as: "a", href: a, mt: "md", rel: "noopener", size: "sm", target: "_blank" }, /* @__PURE__ */ s.createElement("span", null, e), /* @__PURE__ */ s.createElement(
|
|
2207
|
-
},
|
|
2204
|
+
const n = typeof a == "string", o = Ii(a, t), c = a instanceof File ? Ri(a) : null, r = n && i ? i : li(a);
|
|
2205
|
+
return /* @__PURE__ */ s.createElement(s.Fragment, null, /* @__PURE__ */ s.createElement(o, { color: "neutral-90", h: 50, mb: "lg", w: 50 }), /* @__PURE__ */ s.createElement(xa, { color: "neutral-90", lines: 1, m: 0, maxWidth: 600, variant: "h4" }, r), !n && /* @__PURE__ */ s.createElement(xa, { color: "beige-70", fontWeight: "medium", lines: 1, m: 0, variant: "sm" }, c), n && /* @__PURE__ */ s.createElement(ga, { as: "a", href: a, mt: "md", rel: "noopener", size: "sm", target: "_blank" }, /* @__PURE__ */ s.createElement("span", null, e), /* @__PURE__ */ s.createElement(Pi, null)));
|
|
2206
|
+
}, Tt = ({
|
|
2208
2207
|
disabled: a,
|
|
2209
2208
|
error: i,
|
|
2210
2209
|
file: t,
|
|
@@ -2216,7 +2215,7 @@ const It = wa("div").withConfig({ shouldForwardProp: _i })(
|
|
|
2216
2215
|
isHoverReject: f,
|
|
2217
2216
|
openFile: h,
|
|
2218
2217
|
wordings: x
|
|
2219
|
-
}) => r ? /* @__PURE__ */ s.createElement(
|
|
2218
|
+
}) => r ? /* @__PURE__ */ s.createElement(Si, null) : f ? /* @__PURE__ */ s.createElement(Ti, null) : i ? /* @__PURE__ */ s.createElement(oi, { openFile: h, ...x }) : n ? c ? /* @__PURE__ */ s.createElement(yi, { src: n }) : /* @__PURE__ */ s.createElement(St, { file: t, fileName: e, forceFileType: o, ...x }) : /* @__PURE__ */ s.createElement(oi, { disabled: a, openFile: h, ...x }), ci = /\.(jpeg|jpg|gif|png|webp)$/, qt = (a) => a ? typeof a == "string" ? !!li(a).match(ci) : a.name ? !!a.name.match(ci) : !1 : !1, Ct = (a) => {
|
|
2220
2219
|
let i;
|
|
2221
2220
|
if (a instanceof File ? i = a.preview : i = a, typeof i != "string" || i.startsWith("blob:"))
|
|
2222
2221
|
return i;
|
|
@@ -2226,12 +2225,12 @@ const It = wa("div").withConfig({ shouldForwardProp: _i })(
|
|
|
2226
2225
|
} catch {
|
|
2227
2226
|
return;
|
|
2228
2227
|
}
|
|
2229
|
-
},
|
|
2228
|
+
}, Lt = hi, $t = 2e6, Mt = "ERROR_INVALID_TYPE", Kt = "ERROR_INVALID_SIZE", Ht = _i(
|
|
2230
2229
|
({
|
|
2231
2230
|
accept: a = {
|
|
2232
2231
|
"image/*": []
|
|
2233
2232
|
},
|
|
2234
|
-
children: i =
|
|
2233
|
+
children: i = Tt,
|
|
2235
2234
|
dataTestId: t,
|
|
2236
2235
|
disabled: e,
|
|
2237
2236
|
fileName: n,
|
|
@@ -2240,7 +2239,7 @@ const It = wa("div").withConfig({ shouldForwardProp: _i })(
|
|
|
2240
2239
|
handleRemoveFile: r,
|
|
2241
2240
|
isClearable: f,
|
|
2242
2241
|
isEditable: h,
|
|
2243
|
-
maxSize: x =
|
|
2242
|
+
maxSize: x = $t,
|
|
2244
2243
|
multiple: k,
|
|
2245
2244
|
name: P,
|
|
2246
2245
|
onBlur: R,
|
|
@@ -2264,14 +2263,14 @@ const It = wa("div").withConfig({ shouldForwardProp: _i })(
|
|
|
2264
2263
|
A.map(({ errors: la }) => {
|
|
2265
2264
|
la.map((B) => {
|
|
2266
2265
|
const { code: Q, message: T } = B;
|
|
2267
|
-
Q === "file-invalid-type" ? F =
|
|
2266
|
+
Q === "file-invalid-type" ? F = Mt : Q === "file-too-large" ? F = Kt : F = T;
|
|
2268
2267
|
});
|
|
2269
2268
|
}), S(null), z(F), I && I(F), j && j(m), R && R();
|
|
2270
2269
|
}, L = (A) => {
|
|
2271
2270
|
A.preventDefault(), S(null), z(null);
|
|
2272
2271
|
const m = Va({ name: P, value: null });
|
|
2273
2272
|
j && j(m), r && r(m);
|
|
2274
|
-
}, { getInputProps: pa, getRootProps: X, isDragAccept: $, isDragActive: b, isDragReject: y, open: oa } =
|
|
2273
|
+
}, { getInputProps: pa, getRootProps: X, isDragAccept: $, isDragActive: b, isDragReject: y, open: oa } = Lt({
|
|
2275
2274
|
accept: a,
|
|
2276
2275
|
disabled: e,
|
|
2277
2276
|
maxSize: x,
|
|
@@ -2281,7 +2280,7 @@ const It = wa("div").withConfig({ shouldForwardProp: _i })(
|
|
|
2281
2280
|
onDropRejected: C
|
|
2282
2281
|
}), ca = (A) => I(A);
|
|
2283
2282
|
return /* @__PURE__ */ s.createElement(
|
|
2284
|
-
|
|
2283
|
+
Pt,
|
|
2285
2284
|
{
|
|
2286
2285
|
...X({
|
|
2287
2286
|
"data-testid": t,
|
|
@@ -2303,25 +2302,25 @@ const It = wa("div").withConfig({ shouldForwardProp: _i })(
|
|
|
2303
2302
|
style: { display: "block", opacity: 0, height: 0, width: 0 }
|
|
2304
2303
|
}
|
|
2305
2304
|
),
|
|
2306
|
-
/* @__PURE__ */ s.createElement(
|
|
2305
|
+
/* @__PURE__ */ s.createElement(It, null, i({
|
|
2307
2306
|
disabled: e,
|
|
2308
2307
|
error: W,
|
|
2309
2308
|
file: D,
|
|
2310
2309
|
fileName: n,
|
|
2311
|
-
fileUrl: D &&
|
|
2310
|
+
fileUrl: D && Ct(D),
|
|
2312
2311
|
forceFileType: o,
|
|
2313
|
-
isAnImage: o === "image" ||
|
|
2312
|
+
isAnImage: o === "image" || qt(D),
|
|
2314
2313
|
isHoverAccept: $,
|
|
2315
2314
|
isHoverReject: y,
|
|
2316
2315
|
openFile: oa,
|
|
2317
2316
|
wordings: ea
|
|
2318
|
-
}), !!D && (W || h || f) && /* @__PURE__ */ s.createElement(
|
|
2317
|
+
}), !!D && (W || h || f) && /* @__PURE__ */ s.createElement(Rt, null, (W || h) && /* @__PURE__ */ s.createElement(ga, { onClick: oa, shape: "circle", size: "sm", type: "button", variant: "tertiary" }, /* @__PURE__ */ s.createElement(qi, null)), f && /* @__PURE__ */ s.createElement(ga, { danger: !0, onClick: L, shape: "circle", size: "sm", type: "button" }, /* @__PURE__ */ s.createElement(Ci, null))))
|
|
2319
2318
|
);
|
|
2320
2319
|
}
|
|
2321
2320
|
);
|
|
2322
|
-
|
|
2323
|
-
const
|
|
2321
|
+
Ht.displayName = "FileDrop";
|
|
2322
|
+
const ae = yi;
|
|
2324
2323
|
export {
|
|
2325
|
-
|
|
2326
|
-
|
|
2324
|
+
Ht as FileDrop,
|
|
2325
|
+
ae as ImagePreview
|
|
2327
2326
|
};
|
package/dist/FileUpload.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import n, { useState as x, useRef as z, useEffect as
|
|
3
|
-
import { c as
|
|
2
|
+
import n, { useState as x, useRef as z, useEffect as v } from "react";
|
|
3
|
+
import { c as _ } from "./create-event-rXDe5aCQ.mjs";
|
|
4
4
|
import D from "@xstyled/styled-components";
|
|
5
5
|
import { shouldForwardProp as h, forwardRef as C } from "./System.mjs";
|
|
6
6
|
import { Button as N } from "./Button.mjs";
|
|
@@ -34,9 +34,9 @@ const Y = D.inputBox.withConfig({ shouldForwardProp: h })`
|
|
|
34
34
|
...S
|
|
35
35
|
}, s) => {
|
|
36
36
|
const [c, F] = x(A(E)), U = z();
|
|
37
|
-
|
|
37
|
+
v(() => {
|
|
38
38
|
F(A(E));
|
|
39
|
-
}, [E]),
|
|
39
|
+
}, [E]), v(() => () => {
|
|
40
40
|
c && c.map((e) => e instanceof File ? URL.revokeObjectURL(e.preview) : e);
|
|
41
41
|
}, [c]);
|
|
42
42
|
const T = (e) => {
|
|
@@ -44,17 +44,17 @@ const Y = D.inputBox.withConfig({ shouldForwardProp: h })`
|
|
|
44
44
|
(a) => (a.preview = URL.createObjectURL(a), a)
|
|
45
45
|
);
|
|
46
46
|
F(r), r.length === 1 && (r = r[0]);
|
|
47
|
-
const d =
|
|
47
|
+
const d = _({ name: f, value: r });
|
|
48
48
|
p && p(d), y && y(r), i && i();
|
|
49
|
-
},
|
|
49
|
+
}, L = (e) => {
|
|
50
50
|
const r = c.filter((j) => j !== e), d = R ? r : void 0;
|
|
51
51
|
F(r);
|
|
52
|
-
const a =
|
|
52
|
+
const a = _({ name: f, value: d });
|
|
53
53
|
p && p(a), g && g(e), i && i();
|
|
54
|
-
},
|
|
54
|
+
}, k = () => {
|
|
55
55
|
U.current.click();
|
|
56
56
|
}, b = c.map((e) => e instanceof File ? e.preview : void 0).join("");
|
|
57
|
-
return /* @__PURE__ */ n.createElement(n.Fragment, null, m ? m({ openFile:
|
|
57
|
+
return /* @__PURE__ */ n.createElement(n.Fragment, null, m ? m({ openFile: k, disabled: o, files: c, onRemoveFile: L }) : /* @__PURE__ */ n.createElement(N, { disabled: o, onClick: k }, "Upload file"), /* @__PURE__ */ n.createElement("br", null), /* @__PURE__ */ n.createElement(
|
|
58
58
|
Y,
|
|
59
59
|
{
|
|
60
60
|
accept: t,
|
|
@@ -77,7 +77,7 @@ const Y = D.inputBox.withConfig({ shouldForwardProp: h })`
|
|
|
77
77
|
{
|
|
78
78
|
file: e,
|
|
79
79
|
key: e instanceof File ? e.name : e,
|
|
80
|
-
onRemove: () =>
|
|
80
|
+
onRemove: () => L(e)
|
|
81
81
|
}
|
|
82
82
|
)));
|
|
83
83
|
}
|