@wireapp/react-ui-kit 9.0.3 → 9.0.6
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/lib/Form/Button.d.ts +3 -3
- package/lib/Form/Button.d.ts.map +1 -0
- package/lib/Form/Button.js +2 -22
- package/lib/Form/ButtonLink.d.ts +3 -3
- package/lib/Form/ButtonLink.d.ts.map +1 -0
- package/lib/Form/ButtonLink.js +5 -25
- package/lib/Form/Checkbox.d.ts +5 -6
- package/lib/Form/Checkbox.d.ts.map +1 -0
- package/lib/Form/Checkbox.js +37 -41
- package/lib/Form/CodeInput.d.ts +2 -3
- package/lib/Form/CodeInput.d.ts.map +1 -0
- package/lib/Form/CodeInput.js +32 -28
- package/lib/Form/DropFileInput.d.ts +4 -4
- package/lib/Form/DropFileInput.d.ts.map +1 -0
- package/lib/Form/DropFileInput.js +20 -30
- package/lib/Form/ErrorMessage.d.ts +3 -3
- package/lib/Form/ErrorMessage.d.ts.map +1 -0
- package/lib/Form/ErrorMessage.js +2 -23
- package/lib/Form/Form.d.ts +3 -4
- package/lib/Form/Form.d.ts.map +1 -0
- package/lib/Form/Form.js +2 -22
- package/lib/Form/Input.d.ts +4 -3
- package/lib/Form/Input.d.ts.map +1 -0
- package/lib/Form/Input.js +33 -44
- package/lib/Form/InputBlock.d.ts +3 -4
- package/lib/Form/InputBlock.d.ts.map +1 -0
- package/lib/Form/InputBlock.js +4 -23
- package/lib/Form/InputLabel.d.ts +2 -1
- package/lib/Form/InputLabel.d.ts.map +1 -0
- package/lib/Form/InputLabel.js +5 -26
- package/lib/Form/InputSubmitCombo.d.ts +2 -3
- package/lib/Form/InputSubmitCombo.d.ts.map +1 -0
- package/lib/Form/InputSubmitCombo.js +16 -18
- package/lib/Form/RangeInput.d.ts +2 -2
- package/lib/Form/RangeInput.d.ts.map +1 -0
- package/lib/Form/RangeInput.js +22 -28
- package/lib/Form/RangeInput.styles.d.ts +1 -0
- package/lib/Form/RangeInput.styles.d.ts.map +1 -0
- package/lib/Form/RangeInput.styles.js +0 -1
- package/lib/Form/RoundIconButton.d.ts +3 -3
- package/lib/Form/RoundIconButton.d.ts.map +1 -0
- package/lib/Form/RoundIconButton.js +3 -23
- package/lib/Form/Select.d.ts +4 -4
- package/lib/Form/Select.d.ts.map +1 -0
- package/lib/Form/Select.js +13 -37
- package/lib/Form/SelectComponents.d.ts +8 -11
- package/lib/Form/SelectComponents.d.ts.map +1 -0
- package/lib/Form/SelectComponents.js +32 -49
- package/lib/Form/SelectStyles.d.ts +7 -6
- package/lib/Form/SelectStyles.d.ts.map +1 -0
- package/lib/Form/SelectStyles.js +1 -2
- package/lib/Form/ShakeBox.d.ts +3 -2
- package/lib/Form/ShakeBox.d.ts.map +1 -0
- package/lib/Form/ShakeBox.js +27 -27
- package/lib/Form/Switch.d.ts +2 -3
- package/lib/Form/Switch.d.ts.map +1 -0
- package/lib/Form/Switch.js +57 -67
- package/lib/Form/TextArea.d.ts +3 -3
- package/lib/Form/TextArea.d.ts.map +1 -0
- package/lib/Form/TextArea.js +29 -10
- package/lib/Form/Tooltip.d.ts +3 -4
- package/lib/Form/Tooltip.d.ts.map +1 -0
- package/lib/Form/Tooltip.js +2 -22
- package/lib/Form/index.d.ts +1 -1
- package/lib/Form/index.d.ts.map +1 -0
- package/lib/Form/index.js +0 -2
- package/lib/GlobalCssVariables.d.ts +1 -1
- package/lib/GlobalCssVariables.d.ts.map +1 -0
- package/lib/GlobalCssVariables.js +0 -1
- package/lib/GlobalStyle.d.ts +1 -0
- package/lib/GlobalStyle.d.ts.map +1 -0
- package/lib/GlobalStyle.js +7 -8
- package/lib/Icon/AddPeopleIcon.d.ts +2 -3
- package/lib/Icon/AddPeopleIcon.d.ts.map +1 -0
- package/lib/Icon/AddPeopleIcon.js +15 -18
- package/lib/Icon/ArchiveIcon.d.ts +2 -3
- package/lib/Icon/ArchiveIcon.d.ts.map +1 -0
- package/lib/Icon/ArchiveIcon.js +4 -7
- package/lib/Icon/ArrowDown.d.ts +2 -1
- package/lib/Icon/ArrowDown.d.ts.map +1 -0
- package/lib/Icon/ArrowDown.js +15 -20
- package/lib/Icon/ArrowIcon.d.ts +2 -3
- package/lib/Icon/ArrowIcon.d.ts.map +1 -0
- package/lib/Icon/ArrowIcon.js +15 -18
- package/lib/Icon/AttachmentIcon.d.ts +2 -3
- package/lib/Icon/AttachmentIcon.d.ts.map +1 -0
- package/lib/Icon/AttachmentIcon.js +4 -7
- package/lib/Icon/AudioVideoIcon.d.ts +2 -3
- package/lib/Icon/AudioVideoIcon.d.ts.map +1 -0
- package/lib/Icon/AudioVideoIcon.js +4 -7
- package/lib/Icon/BlockIcon.d.ts +2 -3
- package/lib/Icon/BlockIcon.d.ts.map +1 -0
- package/lib/Icon/BlockIcon.js +4 -7
- package/lib/Icon/Brand/AndroidIcon.d.ts +2 -3
- package/lib/Icon/Brand/AndroidIcon.d.ts.map +1 -0
- package/lib/Icon/Brand/AndroidIcon.js +4 -7
- package/lib/Icon/Brand/AppleIcon.d.ts +2 -3
- package/lib/Icon/Brand/AppleIcon.d.ts.map +1 -0
- package/lib/Icon/Brand/AppleIcon.js +4 -7
- package/lib/Icon/Brand/ChromeIcon.d.ts +2 -3
- package/lib/Icon/Brand/ChromeIcon.d.ts.map +1 -0
- package/lib/Icon/Brand/ChromeIcon.js +4 -7
- package/lib/Icon/Brand/FacebookIcon.d.ts +2 -3
- package/lib/Icon/Brand/FacebookIcon.d.ts.map +1 -0
- package/lib/Icon/Brand/FacebookIcon.js +4 -7
- package/lib/Icon/Brand/GitHubIcon.d.ts +2 -3
- package/lib/Icon/Brand/GitHubIcon.d.ts.map +1 -0
- package/lib/Icon/Brand/GitHubIcon.js +4 -7
- package/lib/Icon/Brand/LinkedInIcon.d.ts +2 -3
- package/lib/Icon/Brand/LinkedInIcon.d.ts.map +1 -0
- package/lib/Icon/Brand/LinkedInIcon.js +4 -7
- package/lib/Icon/Brand/LinuxIcon.d.ts +2 -3
- package/lib/Icon/Brand/LinuxIcon.d.ts.map +1 -0
- package/lib/Icon/Brand/LinuxIcon.js +4 -7
- package/lib/Icon/Brand/MicrosoftIcon.d.ts +2 -3
- package/lib/Icon/Brand/MicrosoftIcon.d.ts.map +1 -0
- package/lib/Icon/Brand/MicrosoftIcon.js +4 -7
- package/lib/Icon/Brand/TwitterIcon.d.ts +2 -3
- package/lib/Icon/Brand/TwitterIcon.d.ts.map +1 -0
- package/lib/Icon/Brand/TwitterIcon.js +4 -7
- package/lib/Icon/CallIcon.d.ts +2 -3
- package/lib/Icon/CallIcon.d.ts.map +1 -0
- package/lib/Icon/CallIcon.js +4 -7
- package/lib/Icon/CamIcon.d.ts +2 -3
- package/lib/Icon/CamIcon.d.ts.map +1 -0
- package/lib/Icon/CamIcon.js +4 -7
- package/lib/Icon/CameraIcon.d.ts +2 -3
- package/lib/Icon/CameraIcon.d.ts.map +1 -0
- package/lib/Icon/CameraIcon.js +15 -18
- package/lib/Icon/CheckIcon.d.ts +2 -3
- package/lib/Icon/CheckIcon.d.ts.map +1 -0
- package/lib/Icon/CheckIcon.js +4 -7
- package/lib/Icon/CheckRoundIcon.d.ts +2 -3
- package/lib/Icon/CheckRoundIcon.d.ts.map +1 -0
- package/lib/Icon/CheckRoundIcon.js +4 -7
- package/lib/Icon/ChevronIcon.d.ts +2 -3
- package/lib/Icon/ChevronIcon.d.ts.map +1 -0
- package/lib/Icon/ChevronIcon.js +15 -18
- package/lib/Icon/CloseIcon.d.ts +2 -3
- package/lib/Icon/CloseIcon.d.ts.map +1 -0
- package/lib/Icon/CloseIcon.js +4 -7
- package/lib/Icon/CopyIcon.d.ts +2 -3
- package/lib/Icon/CopyIcon.d.ts.map +1 -0
- package/lib/Icon/CopyIcon.js +4 -7
- package/lib/Icon/DeviceIcon.d.ts +2 -3
- package/lib/Icon/DeviceIcon.d.ts.map +1 -0
- package/lib/Icon/DeviceIcon.js +4 -7
- package/lib/Icon/DownloadIcon.d.ts +2 -3
- package/lib/Icon/DownloadIcon.d.ts.map +1 -0
- package/lib/Icon/DownloadIcon.js +4 -7
- package/lib/Icon/EditDocumentIcon.d.ts +2 -3
- package/lib/Icon/EditDocumentIcon.d.ts.map +1 -0
- package/lib/Icon/EditDocumentIcon.js +15 -18
- package/lib/Icon/EditIcon.d.ts +2 -3
- package/lib/Icon/EditIcon.d.ts.map +1 -0
- package/lib/Icon/EditIcon.js +4 -7
- package/lib/Icon/EnterIcon.d.ts +2 -3
- package/lib/Icon/EnterIcon.d.ts.map +1 -0
- package/lib/Icon/EnterIcon.js +4 -7
- package/lib/Icon/ErrorIcon.d.ts +2 -3
- package/lib/Icon/ErrorIcon.d.ts.map +1 -0
- package/lib/Icon/ErrorIcon.js +4 -10
- package/lib/Icon/FileIcon.d.ts +2 -3
- package/lib/Icon/FileIcon.d.ts.map +1 -0
- package/lib/Icon/FileIcon.js +4 -7
- package/lib/Icon/GifIcon.d.ts +2 -3
- package/lib/Icon/GifIcon.d.ts.map +1 -0
- package/lib/Icon/GifIcon.js +4 -7
- package/lib/Icon/GridIcon.d.ts +2 -3
- package/lib/Icon/GridIcon.d.ts.map +1 -0
- package/lib/Icon/GridIcon.js +15 -18
- package/lib/Icon/GroupIcon.d.ts +2 -3
- package/lib/Icon/GroupIcon.d.ts.map +1 -0
- package/lib/Icon/GroupIcon.js +4 -7
- package/lib/Icon/HangupIcon.d.ts +2 -3
- package/lib/Icon/HangupIcon.d.ts.map +1 -0
- package/lib/Icon/HangupIcon.js +4 -7
- package/lib/Icon/HideIcon.d.ts +2 -3
- package/lib/Icon/HideIcon.d.ts.map +1 -0
- package/lib/Icon/HideIcon.js +4 -7
- package/lib/Icon/ImageIcon.d.ts +2 -3
- package/lib/Icon/ImageIcon.d.ts.map +1 -0
- package/lib/Icon/ImageIcon.js +4 -7
- package/lib/Icon/InfoIcon.d.ts +2 -3
- package/lib/Icon/InfoIcon.d.ts.map +1 -0
- package/lib/Icon/InfoIcon.js +4 -7
- package/lib/Icon/InviteIcon.d.ts +2 -3
- package/lib/Icon/InviteIcon.d.ts.map +1 -0
- package/lib/Icon/InviteIcon.js +4 -7
- package/lib/Icon/LeaveIcon.d.ts +2 -3
- package/lib/Icon/LeaveIcon.d.ts.map +1 -0
- package/lib/Icon/LeaveIcon.js +4 -7
- package/lib/Icon/LinkIcon.d.ts +2 -3
- package/lib/Icon/LinkIcon.d.ts.map +1 -0
- package/lib/Icon/LinkIcon.js +15 -18
- package/lib/Icon/ListIcon.d.ts +2 -3
- package/lib/Icon/ListIcon.d.ts.map +1 -0
- package/lib/Icon/ListIcon.js +4 -7
- package/lib/Icon/LockIcon.d.ts +2 -3
- package/lib/Icon/LockIcon.d.ts.map +1 -0
- package/lib/Icon/LockIcon.js +4 -7
- package/lib/Icon/MessageIcon.d.ts +2 -3
- package/lib/Icon/MessageIcon.d.ts.map +1 -0
- package/lib/Icon/MessageIcon.js +4 -7
- package/lib/Icon/MinusIcon.d.ts +2 -3
- package/lib/Icon/MinusIcon.d.ts.map +1 -0
- package/lib/Icon/MinusIcon.js +4 -7
- package/lib/Icon/MoreIcon.d.ts +2 -3
- package/lib/Icon/MoreIcon.d.ts.map +1 -0
- package/lib/Icon/MoreIcon.js +4 -7
- package/lib/Icon/MuteIcon.d.ts +2 -3
- package/lib/Icon/MuteIcon.d.ts.map +1 -0
- package/lib/Icon/MuteIcon.js +4 -7
- package/lib/Icon/NotificationIcon.d.ts +2 -3
- package/lib/Icon/NotificationIcon.d.ts.map +1 -0
- package/lib/Icon/NotificationIcon.js +4 -7
- package/lib/Icon/NotificationOffIcon.d.ts +2 -3
- package/lib/Icon/NotificationOffIcon.d.ts.map +1 -0
- package/lib/Icon/NotificationOffIcon.js +4 -7
- package/lib/Icon/OptionsIcon.d.ts +2 -3
- package/lib/Icon/OptionsIcon.d.ts.map +1 -0
- package/lib/Icon/OptionsIcon.js +4 -7
- package/lib/Icon/PeopleIcon.d.ts +2 -3
- package/lib/Icon/PeopleIcon.d.ts.map +1 -0
- package/lib/Icon/PeopleIcon.js +15 -18
- package/lib/Icon/PingIcon.d.ts +2 -3
- package/lib/Icon/PingIcon.d.ts.map +1 -0
- package/lib/Icon/PingIcon.js +4 -7
- package/lib/Icon/PlaneIcon.d.ts +2 -3
- package/lib/Icon/PlaneIcon.d.ts.map +1 -0
- package/lib/Icon/PlaneIcon.js +4 -7
- package/lib/Icon/PlusIcon.d.ts +2 -3
- package/lib/Icon/PlusIcon.d.ts.map +1 -0
- package/lib/Icon/PlusIcon.js +4 -7
- package/lib/Icon/ProfileIcon.d.ts +2 -3
- package/lib/Icon/ProfileIcon.d.ts.map +1 -0
- package/lib/Icon/ProfileIcon.js +4 -7
- package/lib/Icon/RecordBoldIcon.d.ts +2 -3
- package/lib/Icon/RecordBoldIcon.d.ts.map +1 -0
- package/lib/Icon/RecordBoldIcon.js +19 -24
- package/lib/Icon/RecordIcon.d.ts +2 -3
- package/lib/Icon/RecordIcon.d.ts.map +1 -0
- package/lib/Icon/RecordIcon.js +4 -9
- package/lib/Icon/RecordPendingIcon.d.ts +2 -3
- package/lib/Icon/RecordPendingIcon.d.ts.map +1 -0
- package/lib/Icon/RecordPendingIcon.js +4 -9
- package/lib/Icon/ReloadIcon.d.ts +2 -3
- package/lib/Icon/ReloadIcon.d.ts.map +1 -0
- package/lib/Icon/ReloadIcon.js +4 -7
- package/lib/Icon/SVGIcon.d.ts +3 -4
- package/lib/Icon/SVGIcon.d.ts.map +1 -0
- package/lib/Icon/SVGIcon.js +2 -28
- package/lib/Icon/ScreenshareIcon.d.ts +2 -3
- package/lib/Icon/ScreenshareIcon.d.ts.map +1 -0
- package/lib/Icon/ScreenshareIcon.js +4 -7
- package/lib/Icon/SearchIcon.d.ts +2 -3
- package/lib/Icon/SearchIcon.d.ts.map +1 -0
- package/lib/Icon/SearchIcon.js +4 -7
- package/lib/Icon/ServicesIcon.d.ts +2 -3
- package/lib/Icon/ServicesIcon.d.ts.map +1 -0
- package/lib/Icon/ServicesIcon.js +4 -7
- package/lib/Icon/SettingsIcon.d.ts +2 -3
- package/lib/Icon/SettingsIcon.d.ts.map +1 -0
- package/lib/Icon/SettingsIcon.js +4 -7
- package/lib/Icon/ShowIcon.d.ts +2 -3
- package/lib/Icon/ShowIcon.d.ts.map +1 -0
- package/lib/Icon/ShowIcon.js +4 -7
- package/lib/Icon/SignIcon.d.ts +2 -3
- package/lib/Icon/SignIcon.d.ts.map +1 -0
- package/lib/Icon/SignIcon.js +4 -7
- package/lib/Icon/SpeakerIcon.d.ts +2 -3
- package/lib/Icon/SpeakerIcon.d.ts.map +1 -0
- package/lib/Icon/SpeakerIcon.js +4 -7
- package/lib/Icon/SupportIcon.d.ts +2 -3
- package/lib/Icon/SupportIcon.d.ts.map +1 -0
- package/lib/Icon/SupportIcon.js +4 -7
- package/lib/Icon/TeamIcon.d.ts +2 -3
- package/lib/Icon/TeamIcon.d.ts.map +1 -0
- package/lib/Icon/TeamIcon.js +4 -7
- package/lib/Icon/TimedIcon.d.ts +2 -3
- package/lib/Icon/TimedIcon.d.ts.map +1 -0
- package/lib/Icon/TimedIcon.js +4 -7
- package/lib/Icon/TrashCrossIcon.d.ts +2 -3
- package/lib/Icon/TrashCrossIcon.d.ts.map +1 -0
- package/lib/Icon/TrashCrossIcon.js +4 -7
- package/lib/Icon/TrashIcon.d.ts +2 -3
- package/lib/Icon/TrashIcon.d.ts.map +1 -0
- package/lib/Icon/TrashIcon.js +4 -7
- package/lib/Icon/TriangleIcon.d.ts +2 -3
- package/lib/Icon/TriangleIcon.d.ts.map +1 -0
- package/lib/Icon/TriangleIcon.js +2 -23
- package/lib/Icon/UploadIcon.d.ts +2 -3
- package/lib/Icon/UploadIcon.d.ts.map +1 -0
- package/lib/Icon/UploadIcon.js +4 -7
- package/lib/Icon/WireIcon.d.ts +2 -3
- package/lib/Icon/WireIcon.d.ts.map +1 -0
- package/lib/Icon/WireIcon.js +4 -7
- package/lib/Icon/index.d.ts +1 -0
- package/lib/Icon/index.d.ts.map +1 -0
- package/lib/Icon/index.js +0 -1
- package/lib/Identity/Animation.d.ts +12 -11
- package/lib/Identity/Animation.d.ts.map +1 -0
- package/lib/Identity/Animation.js +49 -29
- package/lib/Identity/Avatar.d.ts +2 -3
- package/lib/Identity/Avatar.d.ts.map +1 -0
- package/lib/Identity/Avatar.js +20 -22
- package/lib/Identity/AvatarGrid.d.ts +3 -4
- package/lib/Identity/AvatarGrid.d.ts.map +1 -0
- package/lib/Identity/AvatarGrid.js +8 -28
- package/lib/Identity/Logo.d.ts +2 -3
- package/lib/Identity/Logo.d.ts.map +1 -0
- package/lib/Identity/Logo.js +3 -24
- package/lib/Identity/colors-v2.d.ts +1 -0
- package/lib/Identity/colors-v2.d.ts.map +1 -0
- package/lib/Identity/colors-v2.js +3 -4
- package/lib/Identity/colors.d.ts +1 -0
- package/lib/Identity/colors.d.ts.map +1 -0
- package/lib/Identity/colors.js +0 -1
- package/lib/Identity/index.d.ts +1 -0
- package/lib/Identity/index.d.ts.map +1 -0
- package/lib/Identity/index.js +0 -1
- package/lib/Identity/motions.d.ts +1 -0
- package/lib/Identity/motions.d.ts.map +1 -0
- package/lib/Identity/motions.js +0 -1
- package/lib/Layout/Box.d.ts +4 -4
- package/lib/Layout/Box.d.ts.map +1 -0
- package/lib/Layout/Box.js +3 -23
- package/lib/Layout/Column.d.ts +4 -5
- package/lib/Layout/Column.d.ts.map +1 -0
- package/lib/Layout/Column.js +5 -24
- package/lib/Layout/Container.d.ts +7 -6
- package/lib/Layout/Container.d.ts.map +1 -0
- package/lib/Layout/Container.js +40 -16
- package/lib/Layout/Content.d.ts +4 -4
- package/lib/Layout/Content.d.ts.map +1 -0
- package/lib/Layout/Content.js +3 -22
- package/lib/Layout/FlexBox.d.ts +3 -3
- package/lib/Layout/FlexBox.d.ts.map +1 -0
- package/lib/Layout/FlexBox.js +29 -10
- package/lib/Layout/Footer.d.ts +3 -4
- package/lib/Layout/Footer.d.ts.map +1 -0
- package/lib/Layout/Footer.js +2 -22
- package/lib/Layout/Header.d.ts +4 -4
- package/lib/Layout/Header.d.ts.map +1 -0
- package/lib/Layout/Header.js +3 -23
- package/lib/Layout/MatchMedia.d.ts +11 -11
- package/lib/Layout/MatchMedia.d.ts.map +1 -0
- package/lib/Layout/MatchMedia.js +16 -42
- package/lib/Layout/Spacer.d.ts +2 -1
- package/lib/Layout/Spacer.d.ts.map +1 -0
- package/lib/Layout/Spacer.js +2 -22
- package/lib/Layout/StyledApp.d.ts +2 -2
- package/lib/Layout/StyledApp.d.ts.map +1 -0
- package/lib/Layout/StyledApp.js +4 -26
- package/lib/Layout/Theme.d.ts +4 -4
- package/lib/Layout/Theme.d.ts.map +1 -0
- package/lib/Layout/Theme.js +2 -21
- package/lib/Layout/headerMenu/HeaderMenu.d.ts +3 -4
- package/lib/Layout/headerMenu/HeaderMenu.d.ts.map +1 -0
- package/lib/Layout/headerMenu/HeaderMenu.js +17 -25
- package/lib/Layout/headerMenu/HeaderSubMenu.d.ts +4 -5
- package/lib/Layout/headerMenu/HeaderSubMenu.d.ts.map +1 -0
- package/lib/Layout/headerMenu/HeaderSubMenu.js +8 -35
- package/lib/Layout/headerMenu/MenuContent.d.ts +3 -3
- package/lib/Layout/headerMenu/MenuContent.d.ts.map +1 -0
- package/lib/Layout/headerMenu/MenuContent.js +2 -22
- package/lib/Layout/headerMenu/MenuItems.d.ts +4 -4
- package/lib/Layout/headerMenu/MenuItems.d.ts.map +1 -0
- package/lib/Layout/headerMenu/MenuItems.js +2 -21
- package/lib/Layout/headerMenu/MenuLink.d.ts +3 -3
- package/lib/Layout/headerMenu/MenuLink.d.ts.map +1 -0
- package/lib/Layout/headerMenu/MenuLink.js +3 -23
- package/lib/Layout/headerMenu/MenuOpenButton.d.ts +4 -4
- package/lib/Layout/headerMenu/MenuOpenButton.d.ts.map +1 -0
- package/lib/Layout/headerMenu/MenuOpenButton.js +2 -25
- package/lib/Layout/headerMenu/MenuScrollableItems.d.ts +4 -4
- package/lib/Layout/headerMenu/MenuScrollableItems.d.ts.map +1 -0
- package/lib/Layout/headerMenu/MenuScrollableItems.js +3 -23
- package/lib/Layout/headerMenu/MenuSubLink.d.ts +3 -3
- package/lib/Layout/headerMenu/MenuSubLink.d.ts.map +1 -0
- package/lib/Layout/headerMenu/MenuSubLink.js +2 -22
- package/lib/Layout/headerMenu/index.d.ts +1 -0
- package/lib/Layout/headerMenu/index.d.ts.map +1 -0
- package/lib/Layout/headerMenu/index.js +0 -1
- package/lib/Layout/index.d.ts +1 -0
- package/lib/Layout/index.d.ts.map +1 -0
- package/lib/Layout/index.js +0 -1
- package/lib/Layout/sizes.d.ts +1 -0
- package/lib/Layout/sizes.d.ts.map +1 -0
- package/lib/Layout/sizes.js +0 -1
- package/lib/Menu/MenuModal.d.ts +4 -5
- package/lib/Menu/MenuModal.d.ts.map +1 -0
- package/lib/Menu/MenuModal.js +8 -31
- package/lib/Menu/TabBar.d.ts +4 -5
- package/lib/Menu/TabBar.d.ts.map +1 -0
- package/lib/Menu/TabBar.js +3 -23
- package/lib/Menu/index.d.ts +1 -0
- package/lib/Menu/index.d.ts.map +1 -0
- package/lib/Menu/index.js +0 -1
- package/lib/Misc/ButtonGroup.d.ts +10 -10
- package/lib/Misc/ButtonGroup.d.ts.map +1 -0
- package/lib/Misc/ButtonGroup.js +10 -32
- package/lib/Misc/IconButton.d.ts +3 -3
- package/lib/Misc/IconButton.d.ts.map +1 -0
- package/lib/Misc/IconButton.js +2 -22
- package/lib/Misc/IsInViewport.d.ts +3 -4
- package/lib/Misc/IsInViewport.d.ts.map +1 -0
- package/lib/Misc/IsInViewport.js +18 -20
- package/lib/Misc/Loading.d.ts +3 -4
- package/lib/Misc/Loading.d.ts.map +1 -0
- package/lib/Misc/Loading.js +6 -27
- package/lib/Misc/Pagination.d.ts +2 -1
- package/lib/Misc/Pagination.d.ts.map +1 -0
- package/lib/Misc/Pagination.js +5 -30
- package/lib/Misc/Pill.d.ts +4 -4
- package/lib/Misc/Pill.d.ts.map +1 -0
- package/lib/Misc/Pill.js +2 -21
- package/lib/Misc/childrenWithDefaultProps.d.ts +2 -1
- package/lib/Misc/childrenWithDefaultProps.d.ts.map +1 -0
- package/lib/Misc/childrenWithDefaultProps.js +26 -7
- package/lib/Misc/index.d.ts +1 -0
- package/lib/Misc/index.d.ts.map +1 -0
- package/lib/Misc/index.js +0 -1
- package/lib/Misc/useLongTouch.d.ts +1 -0
- package/lib/Misc/useLongTouch.d.ts.map +1 -0
- package/lib/Misc/useLongTouch.js +2 -3
- package/lib/Misc/useTimeout.d.ts +1 -0
- package/lib/Misc/useTimeout.d.ts.map +1 -0
- package/lib/Misc/useTimeout.js +0 -1
- package/lib/Modal/Modal.d.ts +3 -1
- package/lib/Modal/Modal.d.ts.map +1 -0
- package/lib/Modal/Modal.js +8 -33
- package/lib/Modal/Overlay.d.ts +7 -7
- package/lib/Modal/Overlay.d.ts.map +1 -0
- package/lib/Modal/Overlay.js +5 -27
- package/lib/Modal/index.d.ts +1 -0
- package/lib/Modal/index.d.ts.map +1 -0
- package/lib/Modal/index.js +0 -1
- package/lib/Text/Heading.d.ts +8 -8
- package/lib/Text/Heading.d.ts.map +1 -0
- package/lib/Text/Heading.js +10 -30
- package/lib/Text/Label.d.ts +3 -4
- package/lib/Text/Label.d.ts.map +1 -0
- package/lib/Text/Label.js +3 -23
- package/lib/Text/Line.d.ts +4 -4
- package/lib/Text/Line.d.ts.map +1 -0
- package/lib/Text/Line.js +2 -22
- package/lib/Text/Link.d.ts +4 -4
- package/lib/Text/Link.d.ts.map +1 -0
- package/lib/Text/Link.js +3 -23
- package/lib/Text/Paragraph.d.ts +5 -5
- package/lib/Text/Paragraph.d.ts.map +1 -0
- package/lib/Text/Paragraph.js +4 -24
- package/lib/Text/Text.d.ts +9 -9
- package/lib/Text/Text.d.ts.map +1 -0
- package/lib/Text/Text.js +40 -16
- package/lib/Text/TextLink.d.ts +4 -4
- package/lib/Text/TextLink.d.ts.map +1 -0
- package/lib/Text/TextLink.js +3 -23
- package/lib/Text/Title.d.ts +2 -3
- package/lib/Text/Title.d.ts.map +1 -0
- package/lib/Text/Title.js +3 -23
- package/lib/Text/index.d.ts +1 -0
- package/lib/Text/index.d.ts.map +1 -0
- package/lib/Text/index.js +0 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +2 -2
- package/lib/mediaQueries.d.ts +1 -0
- package/lib/mediaQueries.d.ts.map +1 -0
- package/lib/mediaQueries.js +0 -1
- package/lib/util.d.ts +1 -0
- package/lib/util.d.ts.map +1 -0
- package/lib/util.js +0 -1
- package/package.json +4 -3
- package/lib/Form/Button.js.map +0 -1
- package/lib/Form/ButtonLink.js.map +0 -1
- package/lib/Form/Checkbox.js.map +0 -1
- package/lib/Form/CodeInput.js.map +0 -1
- package/lib/Form/DropFileInput.js.map +0 -1
- package/lib/Form/ErrorMessage.js.map +0 -1
- package/lib/Form/Form.js.map +0 -1
- package/lib/Form/Input.js.map +0 -1
- package/lib/Form/InputBlock.js.map +0 -1
- package/lib/Form/InputLabel.js.map +0 -1
- package/lib/Form/InputSubmitCombo.js.map +0 -1
- package/lib/Form/RangeInput.js.map +0 -1
- package/lib/Form/RangeInput.styles.js.map +0 -1
- package/lib/Form/RoundIconButton.js.map +0 -1
- package/lib/Form/Select.js.map +0 -1
- package/lib/Form/SelectComponents.js.map +0 -1
- package/lib/Form/SelectStyles.js.map +0 -1
- package/lib/Form/ShakeBox.js.map +0 -1
- package/lib/Form/Switch.js.map +0 -1
- package/lib/Form/TextArea.js.map +0 -1
- package/lib/Form/Tooltip.js.map +0 -1
- package/lib/Form/index.js.map +0 -1
- package/lib/GlobalCssVariables.js.map +0 -1
- package/lib/GlobalStyle.js.map +0 -1
- package/lib/Icon/AddPeopleIcon.js.map +0 -1
- package/lib/Icon/ArchiveIcon.js.map +0 -1
- package/lib/Icon/ArrowDown.js.map +0 -1
- package/lib/Icon/ArrowIcon.js.map +0 -1
- package/lib/Icon/AttachmentIcon.js.map +0 -1
- package/lib/Icon/AudioVideoIcon.js.map +0 -1
- package/lib/Icon/BlockIcon.js.map +0 -1
- package/lib/Icon/Brand/AndroidIcon.js.map +0 -1
- package/lib/Icon/Brand/AppleIcon.js.map +0 -1
- package/lib/Icon/Brand/ChromeIcon.js.map +0 -1
- package/lib/Icon/Brand/FacebookIcon.js.map +0 -1
- package/lib/Icon/Brand/GitHubIcon.js.map +0 -1
- package/lib/Icon/Brand/LinkedInIcon.js.map +0 -1
- package/lib/Icon/Brand/LinuxIcon.js.map +0 -1
- package/lib/Icon/Brand/MicrosoftIcon.js.map +0 -1
- package/lib/Icon/Brand/TwitterIcon.js.map +0 -1
- package/lib/Icon/CallIcon.js.map +0 -1
- package/lib/Icon/CamIcon.js.map +0 -1
- package/lib/Icon/CameraIcon.js.map +0 -1
- package/lib/Icon/CheckIcon.js.map +0 -1
- package/lib/Icon/CheckRoundIcon.js.map +0 -1
- package/lib/Icon/ChevronIcon.js.map +0 -1
- package/lib/Icon/CloseIcon.js.map +0 -1
- package/lib/Icon/CopyIcon.js.map +0 -1
- package/lib/Icon/DeviceIcon.js.map +0 -1
- package/lib/Icon/DownloadIcon.js.map +0 -1
- package/lib/Icon/EditDocumentIcon.js.map +0 -1
- package/lib/Icon/EditIcon.js.map +0 -1
- package/lib/Icon/EnterIcon.js.map +0 -1
- package/lib/Icon/ErrorIcon.js.map +0 -1
- package/lib/Icon/FileIcon.js.map +0 -1
- package/lib/Icon/GifIcon.js.map +0 -1
- package/lib/Icon/GridIcon.js.map +0 -1
- package/lib/Icon/GroupIcon.js.map +0 -1
- package/lib/Icon/HangupIcon.js.map +0 -1
- package/lib/Icon/HideIcon.js.map +0 -1
- package/lib/Icon/ImageIcon.js.map +0 -1
- package/lib/Icon/InfoIcon.js.map +0 -1
- package/lib/Icon/InviteIcon.js.map +0 -1
- package/lib/Icon/LeaveIcon.js.map +0 -1
- package/lib/Icon/LinkIcon.js.map +0 -1
- package/lib/Icon/ListIcon.js.map +0 -1
- package/lib/Icon/LockIcon.js.map +0 -1
- package/lib/Icon/MessageIcon.js.map +0 -1
- package/lib/Icon/MinusIcon.js.map +0 -1
- package/lib/Icon/MoreIcon.js.map +0 -1
- package/lib/Icon/MuteIcon.js.map +0 -1
- package/lib/Icon/NotificationIcon.js.map +0 -1
- package/lib/Icon/NotificationOffIcon.js.map +0 -1
- package/lib/Icon/OptionsIcon.js.map +0 -1
- package/lib/Icon/PeopleIcon.js.map +0 -1
- package/lib/Icon/PingIcon.js.map +0 -1
- package/lib/Icon/PlaneIcon.js.map +0 -1
- package/lib/Icon/PlusIcon.js.map +0 -1
- package/lib/Icon/ProfileIcon.js.map +0 -1
- package/lib/Icon/RecordBoldIcon.js.map +0 -1
- package/lib/Icon/RecordIcon.js.map +0 -1
- package/lib/Icon/RecordPendingIcon.js.map +0 -1
- package/lib/Icon/ReloadIcon.js.map +0 -1
- package/lib/Icon/SVGIcon.js.map +0 -1
- package/lib/Icon/ScreenshareIcon.js.map +0 -1
- package/lib/Icon/SearchIcon.js.map +0 -1
- package/lib/Icon/ServicesIcon.js.map +0 -1
- package/lib/Icon/SettingsIcon.js.map +0 -1
- package/lib/Icon/ShowIcon.js.map +0 -1
- package/lib/Icon/SignIcon.js.map +0 -1
- package/lib/Icon/SpeakerIcon.js.map +0 -1
- package/lib/Icon/SupportIcon.js.map +0 -1
- package/lib/Icon/TeamIcon.js.map +0 -1
- package/lib/Icon/TimedIcon.js.map +0 -1
- package/lib/Icon/TrashCrossIcon.js.map +0 -1
- package/lib/Icon/TrashIcon.js.map +0 -1
- package/lib/Icon/TriangleIcon.js.map +0 -1
- package/lib/Icon/UploadIcon.js.map +0 -1
- package/lib/Icon/WireIcon.js.map +0 -1
- package/lib/Icon/index.js.map +0 -1
- package/lib/Identity/Animation.js.map +0 -1
- package/lib/Identity/Avatar.js.map +0 -1
- package/lib/Identity/AvatarGrid.js.map +0 -1
- package/lib/Identity/Logo.js.map +0 -1
- package/lib/Identity/colors-v2.js.map +0 -1
- package/lib/Identity/colors.js.map +0 -1
- package/lib/Identity/index.js.map +0 -1
- package/lib/Identity/motions.js.map +0 -1
- package/lib/Layout/Box.js.map +0 -1
- package/lib/Layout/Column.js.map +0 -1
- package/lib/Layout/Container.js.map +0 -1
- package/lib/Layout/Content.js.map +0 -1
- package/lib/Layout/FlexBox.js.map +0 -1
- package/lib/Layout/Footer.js.map +0 -1
- package/lib/Layout/Header.js.map +0 -1
- package/lib/Layout/MatchMedia.js.map +0 -1
- package/lib/Layout/Spacer.js.map +0 -1
- package/lib/Layout/StyledApp.js.map +0 -1
- package/lib/Layout/Theme.js.map +0 -1
- package/lib/Layout/headerMenu/HeaderMenu.js.map +0 -1
- package/lib/Layout/headerMenu/HeaderSubMenu.js.map +0 -1
- package/lib/Layout/headerMenu/MenuContent.js.map +0 -1
- package/lib/Layout/headerMenu/MenuItems.js.map +0 -1
- package/lib/Layout/headerMenu/MenuLink.js.map +0 -1
- package/lib/Layout/headerMenu/MenuOpenButton.js.map +0 -1
- package/lib/Layout/headerMenu/MenuScrollableItems.js.map +0 -1
- package/lib/Layout/headerMenu/MenuSubLink.js.map +0 -1
- package/lib/Layout/headerMenu/index.js.map +0 -1
- package/lib/Layout/index.js.map +0 -1
- package/lib/Layout/sizes.js.map +0 -1
- package/lib/Menu/MenuModal.js.map +0 -1
- package/lib/Menu/TabBar.js.map +0 -1
- package/lib/Menu/index.js.map +0 -1
- package/lib/Misc/ButtonGroup.js.map +0 -1
- package/lib/Misc/IconButton.js.map +0 -1
- package/lib/Misc/IsInViewport.js.map +0 -1
- package/lib/Misc/Loading.js.map +0 -1
- package/lib/Misc/Pagination.js.map +0 -1
- package/lib/Misc/Pill.js.map +0 -1
- package/lib/Misc/childrenWithDefaultProps.js.map +0 -1
- package/lib/Misc/index.js.map +0 -1
- package/lib/Misc/useLongTouch.js.map +0 -1
- package/lib/Misc/useTimeout.js.map +0 -1
- package/lib/Modal/Modal.js.map +0 -1
- package/lib/Modal/Overlay.js.map +0 -1
- package/lib/Modal/index.js.map +0 -1
- package/lib/Text/Heading.js.map +0 -1
- package/lib/Text/Label.js.map +0 -1
- package/lib/Text/Line.js.map +0 -1
- package/lib/Text/Link.js.map +0 -1
- package/lib/Text/Paragraph.js.map +0 -1
- package/lib/Text/Text.js.map +0 -1
- package/lib/Text/TextLink.js.map +0 -1
- package/lib/Text/Title.js.map +0 -1
- package/lib/Text/index.js.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/mediaQueries.js.map +0 -1
- package/lib/util.js.map +0 -1
package/lib/Form/Button.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { CSSObject, jsx } from '@emotion/react';
|
|
1
|
+
import { CSSObject } from '@emotion/react';
|
|
3
2
|
import { Theme } from '../Layout';
|
|
4
3
|
import { TextProps } from '../Text';
|
|
5
4
|
export declare enum ButtonVariant {
|
|
@@ -17,5 +16,6 @@ export interface ButtonProps<T = HTMLButtonElement> extends TextProps<T> {
|
|
|
17
16
|
showLoading?: boolean;
|
|
18
17
|
}
|
|
19
18
|
export declare const buttonStyle: <T>(theme: Theme, props: ButtonProps<T>) => CSSObject;
|
|
20
|
-
export declare const Button: ({ showLoading, children, loadingColor, ...props }: ButtonProps) => jsx.JSX.Element;
|
|
19
|
+
export declare const Button: ({ showLoading, children, loadingColor, ...props }: ButtonProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
21
20
|
export declare const filterButtonProps: (props: ButtonProps) => Object;
|
|
21
|
+
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/Form/Button.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAIzC,OAAO,EAAC,KAAK,EAAC,MAAM,WAAW,CAAC;AAEhC,OAAO,EAAC,SAAS,EAA6B,MAAM,SAAS,CAAC;AAG9D,oBAAY,aAAa;IACvB,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,UAAU,eAAe;IACzB,IAAI,SAAS;CACd;AAED,MAAM,WAAW,WAAW,CAAC,CAAC,GAAG,iBAAiB,CAAE,SAAQ,SAAS,CAAC,CAAC,CAAC;IACtE,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,WAAW,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,SAsJpE,CAAC;AAEH,eAAO,MAAM,MAAM,sDAAmE,WAAW,qDAIhG,CAAC;AAEF,eAAO,MAAM,iBAAiB,UAAW,WAAW,WAEnD,CAAC"}
|
package/lib/Form/Button.js
CHANGED
|
@@ -1,22 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Wire
|
|
4
|
-
* Copyright (C) 2018 Wire Swiss GmbH
|
|
5
|
-
*
|
|
6
|
-
* This program is free software: you can redistribute it and/or modify
|
|
7
|
-
* it under the terms of the GNU General Public License as published by
|
|
8
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
-
* (at your option) any later version.
|
|
10
|
-
*
|
|
11
|
-
* This program is distributed in the hope that it will be useful,
|
|
12
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
-
* GNU General Public License for more details.
|
|
15
|
-
*
|
|
16
|
-
* You should have received a copy of the GNU General Public License
|
|
17
|
-
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
18
|
-
*
|
|
19
|
-
*/
|
|
20
2
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
21
3
|
var t = {};
|
|
22
4
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -30,8 +12,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
30
12
|
};
|
|
31
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
14
|
exports.filterButtonProps = exports.Button = exports.buttonStyle = exports.ButtonVariant = void 0;
|
|
33
|
-
|
|
34
|
-
const react_1 = require("@emotion/react");
|
|
15
|
+
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
35
16
|
const Identity_1 = require("../Identity");
|
|
36
17
|
const motions_1 = require("../Identity/motions");
|
|
37
18
|
const Misc_1 = require("../Misc");
|
|
@@ -126,11 +107,10 @@ const buttonStyle = (theme, _a) => {
|
|
|
126
107
|
exports.buttonStyle = buttonStyle;
|
|
127
108
|
const Button = (_a) => {
|
|
128
109
|
var { showLoading, children, loadingColor = Identity_1.COLOR.WHITE } = _a, props = __rest(_a, ["showLoading", "children", "loadingColor"]);
|
|
129
|
-
return ((0,
|
|
110
|
+
return ((0, jsx_runtime_1.jsx)("button", Object.assign({ css: (theme) => (0, exports.buttonStyle)(theme, props) }, (0, exports.filterButtonProps)(props), { children: showLoading ? (0, jsx_runtime_1.jsx)(Misc_1.Loading, { size: 30, color: loadingColor, style: { display: 'flex', margin: 'auto' } }) : children })));
|
|
130
111
|
};
|
|
131
112
|
exports.Button = Button;
|
|
132
113
|
const filterButtonProps = (props) => {
|
|
133
114
|
return (0, util_1.filterProps)((0, Text_1.filterTextProps)(props), ['backgroundColor', 'noCapital']);
|
|
134
115
|
};
|
|
135
116
|
exports.filterButtonProps = filterButtonProps;
|
|
136
|
-
//# sourceMappingURL=Button.js.map
|
package/lib/Form/ButtonLink.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import { CSSObject, jsx } from '@emotion/react';
|
|
1
|
+
import { CSSObject } from '@emotion/react';
|
|
3
2
|
import { ButtonProps } from './Button';
|
|
4
3
|
import { Theme } from '../Layout';
|
|
5
4
|
export declare const buttonLinkStyle: (theme: Theme, props: ButtonProps<HTMLAnchorElement>) => CSSObject;
|
|
6
|
-
export declare const ButtonLink: ({ children, showLoading, loadingColor, ...props }: ButtonProps<HTMLAnchorElement>) => jsx.JSX.Element;
|
|
5
|
+
export declare const ButtonLink: ({ children, showLoading, loadingColor, ...props }: ButtonProps<HTMLAnchorElement>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=ButtonLink.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonLink.d.ts","sourceRoot":"","sources":["../../src/Form/ButtonLink.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAEzC,OAAO,EAAC,WAAW,EAAc,MAAM,UAAU,CAAC;AAGlD,OAAO,EAAC,KAAK,EAAC,MAAM,WAAW,CAAC;AAKhC,eAAO,MAAM,eAAe,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,CAAC,iBAAiB,CAAC,KAAK,SAGrF,CAAC;AAUH,eAAO,MAAM,UAAU,sDAKpB,YAAY,iBAAiB,CAAC,qDAIhC,CAAC"}
|
package/lib/Form/ButtonLink.js
CHANGED
|
@@ -1,22 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Wire
|
|
4
|
-
* Copyright (C) 2018 Wire Swiss GmbH
|
|
5
|
-
*
|
|
6
|
-
* This program is free software: you can redistribute it and/or modify
|
|
7
|
-
* it under the terms of the GNU General Public License as published by
|
|
8
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
-
* (at your option) any later version.
|
|
10
|
-
*
|
|
11
|
-
* This program is distributed in the hope that it will be useful,
|
|
12
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
-
* GNU General Public License for more details.
|
|
15
|
-
*
|
|
16
|
-
* You should have received a copy of the GNU General Public License
|
|
17
|
-
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
18
|
-
*
|
|
19
|
-
*/
|
|
20
2
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
21
3
|
var t = {};
|
|
22
4
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -30,13 +12,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
30
12
|
};
|
|
31
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
14
|
exports.ButtonLink = exports.buttonLinkStyle = void 0;
|
|
33
|
-
|
|
34
|
-
const
|
|
35
|
-
const Misc_1 = require("../Misc");
|
|
15
|
+
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
16
|
+
const Button_1 = require("./Button");
|
|
36
17
|
const Identity_1 = require("../Identity");
|
|
37
|
-
const
|
|
18
|
+
const Misc_1 = require("../Misc");
|
|
38
19
|
const Text_1 = require("../Text");
|
|
39
|
-
const
|
|
20
|
+
const util_1 = require("../util");
|
|
40
21
|
const buttonLinkStyle = (theme, props) => (Object.assign(Object.assign({}, (0, Button_1.buttonStyle)(theme, props)), { display: 'inline-flex !important' }));
|
|
41
22
|
exports.buttonLinkStyle = buttonLinkStyle;
|
|
42
23
|
const filterButtonLinkProps = (props) => {
|
|
@@ -48,7 +29,6 @@ const filterButtonLinkProps = (props) => {
|
|
|
48
29
|
};
|
|
49
30
|
const ButtonLink = (_a) => {
|
|
50
31
|
var { children, showLoading, loadingColor = Identity_1.COLOR.WHITE } = _a, props = __rest(_a, ["children", "showLoading", "loadingColor"]);
|
|
51
|
-
return ((0,
|
|
32
|
+
return ((0, jsx_runtime_1.jsx)("a", Object.assign({ css: (theme) => (0, exports.buttonLinkStyle)(theme, props) }, filterButtonLinkProps(props), { children: showLoading ? (0, jsx_runtime_1.jsx)(Misc_1.Loading, { size: 30, color: loadingColor, style: { display: 'flex', margin: 'auto' } }) : children })));
|
|
52
33
|
};
|
|
53
34
|
exports.ButtonLink = ButtonLink;
|
|
54
|
-
//# sourceMappingURL=ButtonLink.js.map
|
package/lib/Form/Checkbox.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import { jsx } from '@emotion/react';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { TextProps } from '../Text';
|
|
1
|
+
import * as React from 'react';
|
|
5
2
|
import { InputProps } from './Input';
|
|
3
|
+
import { TextProps } from '../Text';
|
|
6
4
|
export interface StyledLabelProps<T = HTMLLabelElement> extends React.HTMLProps<T> {
|
|
7
5
|
disabled?: boolean;
|
|
8
6
|
markInvalid?: boolean;
|
|
@@ -15,7 +13,8 @@ interface CheckboxProps<T = HTMLInputElement> extends InputProps<T> {
|
|
|
15
13
|
labelBeforeCheckbox?: boolean;
|
|
16
14
|
outlineOffset?: string;
|
|
17
15
|
}
|
|
18
|
-
export declare const Checkbox: React.FC<CheckboxProps
|
|
16
|
+
export declare const Checkbox: React.FC<CheckboxProps>;
|
|
19
17
|
export declare type CheckboxLabelProps<T = HTMLSpanElement> = TextProps<T>;
|
|
20
|
-
export declare const CheckboxLabel: ({ ...props }: CheckboxLabelProps) => jsx.JSX.Element;
|
|
18
|
+
export declare const CheckboxLabel: ({ ...props }: CheckboxLabelProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
21
19
|
export {};
|
|
20
|
+
//# sourceMappingURL=Checkbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../src/Form/Checkbox.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAkB,UAAU,EAAC,MAAM,SAAS,CAAC;AAGpD,OAAO,EAAO,SAAS,EAAY,MAAM,SAAS,CAAC;AAEnD,MAAM,WAAW,gBAAgB,CAAC,CAAC,GAAG,gBAAgB,CAAE,SAAQ,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;IAChF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAmFD,UAAU,aAAa,CAAC,CAAC,GAAG,gBAAgB,CAAE,SAAQ,UAAU,CAAC,CAAC,CAAC;IACjE,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA6D5C,CAAC;AAGF,oBAAY,kBAAkB,CAAC,CAAC,GAAG,eAAe,IAAI,SAAS,CAAC,CAAC,CAAC,CAAC;AAEnE,eAAO,MAAM,aAAa,iBAAgB,kBAAkB,qDAS3D,CAAC"}
|
package/lib/Form/Checkbox.js
CHANGED
|
@@ -1,22 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Wire
|
|
4
|
-
* Copyright (C) 2018 Wire Swiss GmbH
|
|
5
|
-
*
|
|
6
|
-
* This program is free software: you can redistribute it and/or modify
|
|
7
|
-
* it under the terms of the GNU General Public License as published by
|
|
8
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
-
* (at your option) any later version.
|
|
10
|
-
*
|
|
11
|
-
* This program is distributed in the hope that it will be useful,
|
|
12
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
-
* GNU General Public License for more details.
|
|
15
|
-
*
|
|
16
|
-
* You should have received a copy of the GNU General Public License
|
|
17
|
-
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
18
|
-
*
|
|
19
|
-
*/
|
|
20
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
21
3
|
if (k2 === undefined) k2 = k;
|
|
22
4
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -53,14 +35,32 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
53
35
|
};
|
|
54
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55
37
|
exports.CheckboxLabel = exports.Checkbox = void 0;
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
38
|
+
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
39
|
+
/*
|
|
40
|
+
* Wire
|
|
41
|
+
* Copyright (C) 2018 Wire Swiss GmbH
|
|
42
|
+
*
|
|
43
|
+
* This program is free software: you can redistribute it and/or modify
|
|
44
|
+
* it under the terms of the GNU General Public License as published by
|
|
45
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
46
|
+
* (at your option) any later version.
|
|
47
|
+
*
|
|
48
|
+
* This program is distributed in the hope that it will be useful,
|
|
49
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
50
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
51
|
+
* GNU General Public License for more details.
|
|
52
|
+
*
|
|
53
|
+
* You should have received a copy of the GNU General Public License
|
|
54
|
+
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
55
|
+
*
|
|
56
|
+
*/
|
|
57
|
+
const react_1 = require("react");
|
|
58
|
+
const React = __importStar(require("react"));
|
|
60
59
|
const Input_1 = require("./Input");
|
|
60
|
+
const Text_1 = require("../Text");
|
|
61
61
|
const StyledLabel = (_a) => {
|
|
62
62
|
var { disabled, markInvalid, aligncenter = false, labelBeforeCheckbox = false, children } = _a, props = __rest(_a, ["disabled", "markInvalid", "aligncenter", "labelBeforeCheckbox", "children"]);
|
|
63
|
-
return ((0,
|
|
63
|
+
return ((0, jsx_runtime_1.jsxs)("label", Object.assign({ css: (theme) => (Object.assign(Object.assign(Object.assign(Object.assign({ [`.${Input_1.INPUT_CLASSNAME}:checked + &::before`]: {
|
|
64
64
|
background: `${disabled ? theme.Checkbox.disablecheckedBgColor : theme.general.primaryColor}`,
|
|
65
65
|
borderColor: theme.general.primaryColor,
|
|
66
66
|
}, [`.${Input_1.INPUT_CLASSNAME}:checked + & > svg`]: {
|
|
@@ -86,29 +86,25 @@ const StyledLabel = (_a) => {
|
|
|
86
86
|
})), { borderRadius: '3px', boxSizing: 'border-box', content: '""', display: 'inline-block', width: '22px', height: '22px', lineHeight: 1.4, margin: '0 8px 0 0px', color: theme.general.color }) }), (labelBeforeCheckbox && {
|
|
87
87
|
flexDirection: 'row-reverse',
|
|
88
88
|
justifyContent: 'space-between',
|
|
89
|
-
})), { alignItems: 'center', position: 'relative', margin: '0 0 0 -16px', width: aligncenter ? 'auto' : '100%', lineHeight: 1.4, display: 'flex', opacity: disabled ? 0.56 : 1, cursor: disabled ? 'not-allowed' : 'pointer', borderRadius: '4px' })) }, props),
|
|
90
|
-
children,
|
|
91
|
-
(0, react_1.jsx)("svg", { width: "15", height: "13", viewBox: "0 0 16 13", xmlns: "http://www.w3.org/2000/svg" },
|
|
92
|
-
(0, react_1.jsx)("path", { d: "M5.65685 12.0711L15.9842 1.62738L14.57 0.213167L5.65685 9.24264L1.41421 5L0 6.41421L5.65685 12.0711Z" }))));
|
|
89
|
+
})), { alignItems: 'center', position: 'relative', margin: '0 0 0 -16px', width: aligncenter ? 'auto' : '100%', lineHeight: 1.4, display: 'flex', opacity: disabled ? 0.56 : 1, cursor: disabled ? 'not-allowed' : 'pointer', borderRadius: '4px' })) }, props, { children: [children, (0, jsx_runtime_1.jsx)("svg", Object.assign({ width: "15", height: "13", viewBox: "0 0 16 13", xmlns: "http://www.w3.org/2000/svg" }, { children: (0, jsx_runtime_1.jsx)("path", { d: "M5.65685 12.0711L15.9842 1.62738L14.57 0.213167L5.65685 9.24264L1.41421 5L0 6.41421L5.65685 12.0711Z" }) }))] })));
|
|
93
90
|
};
|
|
94
|
-
exports.Checkbox =
|
|
95
|
-
var { id
|
|
96
|
-
|
|
91
|
+
exports.Checkbox = React.forwardRef((_a, ref) => {
|
|
92
|
+
var { id, children, style, disabled, wrapperCSS = {}, markInvalid, aligncenter, labelBeforeCheckbox, outlineOffset = '0.4rem' } = _a, props = __rest(_a, ["id", "children", "style", "disabled", "wrapperCSS", "markInvalid", "aligncenter", "labelBeforeCheckbox", "outlineOffset"]);
|
|
93
|
+
const inputId = (0, react_1.useId)();
|
|
94
|
+
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ css: (theme) => (Object.assign({ alignItems: 'center', display: 'flex', justifyContent: 'flex-start', position: 'relative', left: '-0.3rem', [`.${Input_1.INPUT_CLASSNAME}:focus-visible + label`]: {
|
|
97
95
|
outline: `1px solid ${theme.general.primaryColor}`,
|
|
98
96
|
outlineOffset: outlineOffset,
|
|
99
|
-
} }, wrapperCSS)), style: style },
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
}, disabled: disabled, ref: ref, className: Input_1.INPUT_CLASSNAME }, props)),
|
|
107
|
-
(0, react_1.jsx)(StyledLabel, { htmlFor: id, disabled: disabled, markInvalid: markInvalid, aligncenter: aligncenter, labelBeforeCheckbox: labelBeforeCheckbox }, children)));
|
|
97
|
+
} }, wrapperCSS)), style: style }, { children: [(0, jsx_runtime_1.jsx)("input", Object.assign({ type: "checkbox", id: id !== null && id !== void 0 ? id : inputId, style: {
|
|
98
|
+
height: '22px',
|
|
99
|
+
marginBottom: '0',
|
|
100
|
+
opacity: 0,
|
|
101
|
+
width: '22px',
|
|
102
|
+
cursor: disabled ? 'not-allowed' : 'pointer',
|
|
103
|
+
}, disabled: disabled, ref: ref, className: Input_1.INPUT_CLASSNAME }, props)), (0, jsx_runtime_1.jsx)(StyledLabel, Object.assign({ htmlFor: id, disabled: disabled, markInvalid: markInvalid, aligncenter: aligncenter, labelBeforeCheckbox: labelBeforeCheckbox }, { children: children }))] })));
|
|
108
104
|
});
|
|
105
|
+
exports.Checkbox.displayName = 'Checkbox';
|
|
109
106
|
const CheckboxLabel = (_a) => {
|
|
110
107
|
var props = __rest(_a, []);
|
|
111
|
-
return ((0,
|
|
108
|
+
return ((0, jsx_runtime_1.jsx)(Text_1.Text, Object.assign({ css: (theme) => (Object.assign({}, (0, Text_1.textStyle)(theme, Object.assign({}, props)))) }, props)));
|
|
112
109
|
};
|
|
113
110
|
exports.CheckboxLabel = CheckboxLabel;
|
|
114
|
-
//# sourceMappingURL=Checkbox.js.map
|
package/lib/Form/CodeInput.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
|
-
import { jsx } from '@emotion/react';
|
|
3
1
|
import { InputProps } from './Input';
|
|
4
2
|
export interface CodeInputProps<T = HTMLInputElement> extends InputProps<T> {
|
|
5
3
|
autoFocus?: boolean;
|
|
@@ -7,4 +5,5 @@ export interface CodeInputProps<T = HTMLInputElement> extends InputProps<T> {
|
|
|
7
5
|
markInvalid?: boolean;
|
|
8
6
|
onCodeComplete?: (completeCode?: string) => void;
|
|
9
7
|
}
|
|
10
|
-
export declare const CodeInput: ({ style, digits, autoFocus, markInvalid, onCodeComplete, disabled, }: CodeInputProps) => jsx.JSX.Element;
|
|
8
|
+
export declare const CodeInput: ({ style, digits, autoFocus, markInvalid, onCodeComplete, disabled, }: CodeInputProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=CodeInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CodeInput.d.ts","sourceRoot":"","sources":["../../src/Form/CodeInput.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAC,UAAU,EAAa,MAAM,SAAS,CAAC;AAwC/C,MAAM,WAAW,cAAc,CAAC,CAAC,GAAG,gBAAgB,CAAE,SAAQ,UAAU,CAAC,CAAC,CAAC;IACzE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,cAAc,CAAC,EAAE,CAAC,YAAY,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAClD;AAED,eAAO,MAAM,SAAS,yEAOnB,cAAc,qDAqGhB,CAAC"}
|
package/lib/Form/CodeInput.js
CHANGED
|
@@ -1,22 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Wire
|
|
4
|
-
* Copyright (C) 2018 Wire Swiss GmbH
|
|
5
|
-
*
|
|
6
|
-
* This program is free software: you can redistribute it and/or modify
|
|
7
|
-
* it under the terms of the GNU General Public License as published by
|
|
8
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
-
* (at your option) any later version.
|
|
10
|
-
*
|
|
11
|
-
* This program is distributed in the hope that it will be useful,
|
|
12
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
-
* GNU General Public License for more details.
|
|
15
|
-
*
|
|
16
|
-
* You should have received a copy of the GNU General Public License
|
|
17
|
-
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
18
|
-
*
|
|
19
|
-
*/
|
|
20
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
21
3
|
if (k2 === undefined) k2 = k;
|
|
22
4
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -42,13 +24,31 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
42
24
|
};
|
|
43
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
44
26
|
exports.CodeInput = void 0;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
27
|
+
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
28
|
+
/*
|
|
29
|
+
* Wire
|
|
30
|
+
* Copyright (C) 2018 Wire Swiss GmbH
|
|
31
|
+
*
|
|
32
|
+
* This program is free software: you can redistribute it and/or modify
|
|
33
|
+
* it under the terms of the GNU General Public License as published by
|
|
34
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
35
|
+
* (at your option) any later version.
|
|
36
|
+
*
|
|
37
|
+
* This program is distributed in the hope that it will be useful,
|
|
38
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
39
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
40
|
+
* GNU General Public License for more details.
|
|
41
|
+
*
|
|
42
|
+
* You should have received a copy of the GNU General Public License
|
|
43
|
+
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
44
|
+
*
|
|
45
|
+
*/
|
|
46
|
+
const react_1 = require("react");
|
|
47
|
+
const React = __importStar(require("react"));
|
|
49
48
|
const Input_1 = require("./Input");
|
|
50
49
|
const Identity_1 = require("../Identity");
|
|
51
|
-
const
|
|
50
|
+
const util_1 = require("../util");
|
|
51
|
+
const CodeInputWrapper = (props) => ((0, jsx_runtime_1.jsx)("div", Object.assign({ css: {
|
|
52
52
|
display: 'flex',
|
|
53
53
|
justifyContent: 'center',
|
|
54
54
|
} }, props)));
|
|
@@ -57,9 +57,10 @@ const digitInputStyle = (theme, props) => (Object.assign(Object.assign({}, (0, I
|
|
|
57
57
|
}, '&:hover': {
|
|
58
58
|
boxShadow: `0 0 0 1px ${Identity_1.COLOR_V2.GRAY_60}`,
|
|
59
59
|
}, fontSize: '24px', lineHeight: '28px', borderRadius: '12px', padding: 0, textAlign: 'center', width: 'min(48px, 13vw)', height: '56px' }));
|
|
60
|
-
const DigitInput =
|
|
60
|
+
const DigitInput = React.forwardRef((props, ref) => (0, jsx_runtime_1.jsx)("input", Object.assign({ ref: ref, css: (theme) => digitInputStyle(theme, props) }, props, { type: "tel" })));
|
|
61
|
+
DigitInput.displayName = 'DigitInput';
|
|
61
62
|
const CodeInput = ({ style, digits = 6, autoFocus = false, markInvalid, onCodeComplete = util_1.noop, disabled, }) => {
|
|
62
|
-
const [values, setValues] = (0,
|
|
63
|
+
const [values, setValues] = (0, react_1.useState)(Array(digits).fill(''));
|
|
63
64
|
const inputs = Array(digits);
|
|
64
65
|
const forceSelection = (event) => {
|
|
65
66
|
const target = event.target;
|
|
@@ -114,13 +115,16 @@ const CodeInput = ({ style, digits = 6, autoFocus = false, markInvalid, onCodeCo
|
|
|
114
115
|
setValues(values.slice(0, fieldIndex).concat(cleanedPaste.split('')).slice(0, digits));
|
|
115
116
|
}
|
|
116
117
|
};
|
|
117
|
-
(0,
|
|
118
|
+
(0, react_1.useEffect)(() => {
|
|
118
119
|
const completeCode = values.join('');
|
|
119
120
|
if (completeCode.length === digits) {
|
|
120
121
|
onCodeComplete(completeCode);
|
|
121
122
|
}
|
|
122
123
|
}, [values]);
|
|
123
|
-
return ((0,
|
|
124
|
+
return ((0, jsx_runtime_1.jsx)(CodeInputWrapper, Object.assign({ style: style }, { children: Array.from({ length: digits }, (_, index) => ((0, jsx_runtime_1.jsx)(DigitInput
|
|
125
|
+
// eslint-disable-next-line jsx-a11y/no-autofocus
|
|
126
|
+
, {
|
|
127
|
+
// eslint-disable-next-line jsx-a11y/no-autofocus
|
|
128
|
+
autoFocus: index === 0 && autoFocus, onPaste: event => handlePaste(index, event), onFocus: forceSelection, onMouseDown: forceSelectionPreventDefault, onTouchStart: forceSelectionPreventDefault, onKeyDown: event => handleKeyDown(index, event), onKeyUp: forceSelection, markInvalid: markInvalid, ref: node => (inputs[index] = node), value: values[index], onChange: () => { }, disabled: disabled }, index))) })));
|
|
124
129
|
};
|
|
125
130
|
exports.CodeInput = CodeInput;
|
|
126
|
-
//# sourceMappingURL=CodeInput.js.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
|
-
import { CSSObject } from '@emotion/react';
|
|
3
1
|
import { FC } from 'react';
|
|
2
|
+
import { CSSObject } from '@emotion/react';
|
|
4
3
|
import { Theme } from '../Layout';
|
|
5
4
|
import { TextProps } from '../Text';
|
|
6
5
|
export interface DropFileInputProps<T = HTMLInputElement> extends TextProps<T> {
|
|
@@ -12,8 +11,9 @@ export interface DropFileInputProps<T = HTMLInputElement> extends TextProps<T> {
|
|
|
12
11
|
dropFileZoneWrapperCSS?: CSSObject;
|
|
13
12
|
}
|
|
14
13
|
export declare const dropFileWrapperStyle: CSSObject;
|
|
15
|
-
export declare const dropFileZoneWrapperStyle:
|
|
16
|
-
export declare const dropFileZoneLabelStyle:
|
|
14
|
+
export declare const dropFileZoneWrapperStyle: (theme: Theme, isDraggedOver: boolean) => CSSObject;
|
|
15
|
+
export declare const dropFileZoneLabelStyle: (theme: Theme) => CSSObject;
|
|
17
16
|
export declare const dropFileZoneHeadingStyle: CSSObject;
|
|
18
17
|
export declare const dropFileZonDescriptionStyle: CSSObject;
|
|
19
18
|
export declare const DropFileInput: FC<DropFileInputProps<HTMLInputElement>>;
|
|
19
|
+
//# sourceMappingURL=DropFileInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DropFileInput.d.ts","sourceRoot":"","sources":["../../src/Form/DropFileInput.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAW,EAAE,EAAwB,MAAM,OAAO,CAAC;AAG1D,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAIzC,OAAO,EAAC,KAAK,EAAU,MAAM,WAAW,CAAC;AACzC,OAAO,EAAC,SAAS,EAAC,MAAM,SAAS,CAAC;AAElC,MAAM,WAAW,kBAAkB,CAAC,CAAC,GAAG,gBAAgB,CAAE,SAAQ,SAAS,CAAC,CAAC,CAAC;IAC5E,eAAe,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;IACzC,uBAAuB,EAAE,MAAM,IAAI,CAAC;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sBAAsB,CAAC,EAAE,SAAS,CAAC;CACpC;AAYD,eAAO,MAAM,oBAAoB,EAAE,SAElC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,OAAO,KAAK,SAe/E,CAAC;AAEH,eAAO,MAAM,sBAAsB,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,SASrD,CAAC;AAEH,eAAO,MAAM,wBAAwB,EAAE,SAGtC,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,SAOzC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CA+GlE,CAAC"}
|
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.DropFileInput = exports.dropFileZonDescriptionStyle = exports.dropFileZoneHeadingStyle = exports.dropFileZoneLabelStyle = exports.dropFileZoneWrapperStyle = exports.dropFileWrapperStyle = void 0;
|
|
15
|
+
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
2
16
|
/*
|
|
3
17
|
* Wire
|
|
4
18
|
* Copyright (C) 2022 Wire Swiss GmbH
|
|
@@ -17,24 +31,9 @@
|
|
|
17
31
|
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
18
32
|
*
|
|
19
33
|
*/
|
|
20
|
-
|
|
21
|
-
var t = {};
|
|
22
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
23
|
-
t[p] = s[p];
|
|
24
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
25
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
26
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
27
|
-
t[p[i]] = s[p[i]];
|
|
28
|
-
}
|
|
29
|
-
return t;
|
|
30
|
-
};
|
|
31
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
-
exports.DropFileInput = exports.dropFileZonDescriptionStyle = exports.dropFileZoneHeadingStyle = exports.dropFileZoneLabelStyle = exports.dropFileZoneWrapperStyle = exports.dropFileWrapperStyle = void 0;
|
|
33
|
-
/** @jsx jsx */
|
|
34
|
-
const react_1 = require("@emotion/react");
|
|
35
|
-
const react_2 = require("react");
|
|
36
|
-
const Identity_1 = require("../Identity");
|
|
34
|
+
const react_1 = require("react");
|
|
37
35
|
const Icon_1 = require("../Icon");
|
|
36
|
+
const Identity_1 = require("../Identity");
|
|
38
37
|
const Layout_1 = require("../Layout");
|
|
39
38
|
const visuallyHiddenStyles = {
|
|
40
39
|
clip: 'rect(0 0 0 0)',
|
|
@@ -85,9 +84,9 @@ exports.dropFileZonDescriptionStyle = {
|
|
|
85
84
|
color: Identity_1.COLOR.GRAY,
|
|
86
85
|
whiteSpace: 'pre-line',
|
|
87
86
|
};
|
|
88
|
-
exports.DropFileInput = (0,
|
|
87
|
+
exports.DropFileInput = (0, react_1.forwardRef)((_a, ref) => {
|
|
89
88
|
var { onFilesUploaded, onInvalidFilesDropError, dropFileZoneWrapperCSS, labelText, headingText, description, accept, multiple } = _a, inputProps = __rest(_a, ["onFilesUploaded", "onInvalidFilesDropError", "dropFileZoneWrapperCSS", "labelText", "headingText", "description", "accept", "multiple"]);
|
|
90
|
-
const [isDraggedOver, setIsDraggedOver] = (0,
|
|
89
|
+
const [isDraggedOver, setIsDraggedOver] = (0, react_1.useState)(false);
|
|
91
90
|
const resetDraggedOver = () => setIsDraggedOver(false);
|
|
92
91
|
const handleDragOver = (event) => {
|
|
93
92
|
event.preventDefault();
|
|
@@ -125,15 +124,6 @@ exports.DropFileInput = (0, react_2.forwardRef)((_a, ref) => {
|
|
|
125
124
|
}
|
|
126
125
|
onFilesUploaded(Array.from(files));
|
|
127
126
|
};
|
|
128
|
-
return ((0,
|
|
129
|
-
(0, react_1.jsx)("div", { css: (theme) => (Object.assign(Object.assign({}, (0, exports.dropFileZoneWrapperStyle)(theme, isDraggedOver)), dropFileZoneWrapperCSS)), "data-testid": "dropzone", onDragOver: handleDragOver, onDragLeave: resetDraggedOver, onDrop: handleDrop },
|
|
130
|
-
(0, react_1.jsx)(Layout_1.FlexBox, { align: "center", justify: "center", flexWrap: "wrap", css: { maxWidth: '280px', margin: '0 auto' } },
|
|
131
|
-
(0, react_1.jsx)(Icon_1.UploadIcon, { css: { margin: '12px 0' } }),
|
|
132
|
-
(0, react_1.jsx)("div", { css: { maxWidth: '160px', margin: '0 25px' } },
|
|
133
|
-
(0, react_1.jsx)("span", { css: exports.dropFileZoneHeadingStyle }, headingText),
|
|
134
|
-
(0, react_1.jsx)("label", { "aria-label": `${headingText} ${labelText} (${description})`, css: (theme) => (0, exports.dropFileZoneLabelStyle)(theme) },
|
|
135
|
-
(0, react_1.jsx)("span", null, labelText),
|
|
136
|
-
(0, react_1.jsx)("input", Object.assign({ "data-testid": "file-input", ref: ref, accept: accept, multiple: multiple, css: visuallyHiddenStyles, onChange: handleChange, type: "file" }, inputProps)))))),
|
|
137
|
-
description && (0, react_1.jsx)("p", { css: exports.dropFileZonDescriptionStyle }, description)));
|
|
127
|
+
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ css: exports.dropFileWrapperStyle }, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ css: (theme) => (Object.assign(Object.assign({}, (0, exports.dropFileZoneWrapperStyle)(theme, isDraggedOver)), dropFileZoneWrapperCSS)), "data-testid": "dropzone", onDragOver: handleDragOver, onDragLeave: resetDraggedOver, onDrop: handleDrop }, { children: (0, jsx_runtime_1.jsxs)(Layout_1.FlexBox, Object.assign({ align: "center", justify: "center", flexWrap: "wrap", css: { maxWidth: '280px', margin: '0 auto' } }, { children: [(0, jsx_runtime_1.jsx)(Icon_1.UploadIcon, { css: { margin: '12px 0' } }), (0, jsx_runtime_1.jsxs)("div", Object.assign({ css: { maxWidth: '160px', margin: '0 25px' } }, { children: [(0, jsx_runtime_1.jsx)("span", Object.assign({ css: exports.dropFileZoneHeadingStyle }, { children: headingText })), (0, jsx_runtime_1.jsxs)("label", Object.assign({ "aria-label": `${headingText} ${labelText} (${description})`, css: (theme) => (0, exports.dropFileZoneLabelStyle)(theme) }, { children: [(0, jsx_runtime_1.jsx)("span", { children: labelText }), (0, jsx_runtime_1.jsx)("input", Object.assign({ "data-testid": "file-input", ref: ref, accept: accept, multiple: multiple, css: visuallyHiddenStyles, onChange: handleChange, type: "file" }, inputProps))] }))] }))] })) })), description && (0, jsx_runtime_1.jsx)("p", Object.assign({ css: exports.dropFileZonDescriptionStyle }, { children: description }))] })));
|
|
138
128
|
});
|
|
139
|
-
|
|
129
|
+
exports.DropFileInput.displayName = 'DropFileInput';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import { CSSObject, jsx } from '@emotion/react';
|
|
1
|
+
import { CSSObject } from '@emotion/react';
|
|
3
2
|
import { FlexBoxProps, Theme } from '../Layout';
|
|
4
3
|
declare type ErrorMessageProps<T = HTMLDivElement> = FlexBoxProps<T>;
|
|
5
4
|
export declare const errorMessageStyle: <T>(theme: Theme, props: ErrorMessageProps<T>) => CSSObject;
|
|
6
5
|
export declare const filterErrorMessageProps: (props: ErrorMessageProps) => Object;
|
|
7
|
-
export declare const ErrorMessage: ({ children, ...props }: ErrorMessageProps) => jsx.JSX.Element;
|
|
6
|
+
export declare const ErrorMessage: ({ children, ...props }: ErrorMessageProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
7
|
export {};
|
|
8
|
+
//# sourceMappingURL=ErrorMessage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorMessage.d.ts","sourceRoot":"","sources":["../../src/Form/ErrorMessage.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAGzC,OAAO,EAAU,YAAY,EAAoC,KAAK,EAAC,MAAM,WAAW,CAAC;AAIzF,aAAK,iBAAiB,CAAC,CAAC,GAAG,cAAc,IAAI,YAAY,CAAC,CAAC,CAAC,CAAC;AAE7D,eAAO,MAAM,iBAAiB,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,iBAAiB,CAAC,CAAC,CAAC,KAAK,SAShF,CAAC;AAEH,eAAO,MAAM,uBAAuB,UAAW,iBAAiB,WAE/D,CAAC;AAEF,eAAO,MAAM,YAAY,2BAA0B,iBAAiB,qDAMnE,CAAC"}
|
package/lib/Form/ErrorMessage.js
CHANGED
|
@@ -1,22 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Wire
|
|
4
|
-
* Copyright (C) 2018 Wire Swiss GmbH
|
|
5
|
-
*
|
|
6
|
-
* This program is free software: you can redistribute it and/or modify
|
|
7
|
-
* it under the terms of the GNU General Public License as published by
|
|
8
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
-
* (at your option) any later version.
|
|
10
|
-
*
|
|
11
|
-
* This program is distributed in the hope that it will be useful,
|
|
12
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
-
* GNU General Public License for more details.
|
|
15
|
-
*
|
|
16
|
-
* You should have received a copy of the GNU General Public License
|
|
17
|
-
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
18
|
-
*
|
|
19
|
-
*/
|
|
20
2
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
21
3
|
var t = {};
|
|
22
4
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -30,8 +12,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
30
12
|
};
|
|
31
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
14
|
exports.ErrorMessage = exports.filterErrorMessageProps = exports.errorMessageStyle = void 0;
|
|
33
|
-
|
|
34
|
-
const react_1 = require("@emotion/react");
|
|
15
|
+
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
35
16
|
const Identity_1 = require("../Identity");
|
|
36
17
|
const Layout_1 = require("../Layout");
|
|
37
18
|
const Text_1 = require("../Text");
|
|
@@ -47,8 +28,6 @@ const filterErrorMessageProps = (props) => {
|
|
|
47
28
|
exports.filterErrorMessageProps = filterErrorMessageProps;
|
|
48
29
|
const ErrorMessage = (_a) => {
|
|
49
30
|
var { children } = _a, props = __rest(_a, ["children"]);
|
|
50
|
-
return ((0,
|
|
51
|
-
(0, react_1.jsx)(Text_1.Text, { color: Identity_1.COLOR_V2.RED_LIGHT_500, fontSize: '12px', css: { fontWeight: 400 } }, children)));
|
|
31
|
+
return ((0, jsx_runtime_1.jsx)(Layout_1.FlexBox, Object.assign({ css: (theme) => (0, exports.errorMessageStyle)(theme, props) }, props, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, Object.assign({ color: Identity_1.COLOR_V2.RED_LIGHT_500, fontSize: '12px', css: { fontWeight: 400 } }, { children: children })) })));
|
|
52
32
|
};
|
|
53
33
|
exports.ErrorMessage = ErrorMessage;
|
|
54
|
-
//# sourceMappingURL=ErrorMessage.js.map
|
package/lib/Form/Form.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare const Form: (props: React.HTMLProps<HTMLFormElement>) => jsx.JSX.Element;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const Form: (props: React.HTMLProps<HTMLFormElement>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
3
|
+
//# sourceMappingURL=Form.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../src/Form/Form.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,eAAO,MAAM,IAAI,UAAW,MAAM,SAAS,CAAC,eAAe,CAAC,qDAW3D,CAAC"}
|
package/lib/Form/Form.js
CHANGED
|
@@ -1,27 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Wire
|
|
4
|
-
* Copyright (C) 2018 Wire Swiss GmbH
|
|
5
|
-
*
|
|
6
|
-
* This program is free software: you can redistribute it and/or modify
|
|
7
|
-
* it under the terms of the GNU General Public License as published by
|
|
8
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
-
* (at your option) any later version.
|
|
10
|
-
*
|
|
11
|
-
* This program is distributed in the hope that it will be useful,
|
|
12
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
-
* GNU General Public License for more details.
|
|
15
|
-
*
|
|
16
|
-
* You should have received a copy of the GNU General Public License
|
|
17
|
-
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
18
|
-
*
|
|
19
|
-
*/
|
|
20
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
3
|
exports.Form = void 0;
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
const Form = (props) => ((0, react_1.jsx)("form", Object.assign({ css: {
|
|
4
|
+
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
5
|
+
const Form = (props) => ((0, jsx_runtime_1.jsx)("form", Object.assign({ css: {
|
|
25
6
|
display: 'flex',
|
|
26
7
|
flexDirection: 'column',
|
|
27
8
|
justifyContent: 'space-between',
|
|
@@ -29,4 +10,3 @@ const Form = (props) => ((0, react_1.jsx)("form", Object.assign({ css: {
|
|
|
29
10
|
width: '100%',
|
|
30
11
|
} }, props)));
|
|
31
12
|
exports.Form = Form;
|
|
32
|
-
//# sourceMappingURL=Form.js.map
|
package/lib/Form/Input.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import * as React from 'react';
|
|
2
3
|
import { CSSObject } from '@emotion/react';
|
|
3
|
-
import { Property } from 'csstype';
|
|
4
|
-
import React, { ReactElement } from 'react';
|
|
4
|
+
import type { Property } from 'csstype';
|
|
5
5
|
import { Theme } from '../Layout';
|
|
6
6
|
import { TextProps } from '../Text';
|
|
7
7
|
export interface InputProps<T = HTMLInputElement> extends TextProps<T> {
|
|
@@ -16,3 +16,4 @@ export declare const inputStyle: <T>(theme: Theme, props: InputProps<T>, hasErro
|
|
|
16
16
|
export declare const INPUT_CLASSNAME = "wireinput";
|
|
17
17
|
export declare const INPUT_GROUP = "input-group";
|
|
18
18
|
export declare const Input: React.FC<InputProps<HTMLInputElement>>;
|
|
19
|
+
//# sourceMappingURL=Input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../src/Form/Input.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,YAAY,EAAW,MAAM,OAAO,CAAC;AAC7C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAC;AAKtC,OAAO,EAAC,KAAK,EAAC,MAAM,WAAW,CAAC;AAChC,OAAO,EAAC,SAAS,EAAC,MAAM,SAAS,CAAC;AAGlC,MAAM,WAAW,UAAU,CAAC,CAAC,GAAG,gBAAgB,CAAE,SAAQ,SAAS,CAAC,CAAC,CAAC;IACpE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wBAAwB,CAAC,EAAE,QAAQ,CAAC,aAAa,CAAC;IAClD,UAAU,CAAC,EAAE,SAAS,CAAC;CACxB;AAED,eAAO,MAAM,UAAU,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,OAAO,KAAK,SA6CvF,CAAC;AAEF,eAAO,MAAM,eAAe,cAAc,CAAC;AAC3C,eAAO,MAAM,WAAW,gBAAgB,CAAC;AAWzC,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAAC,gBAAgB,CAAC,CA2EvD,CAAC"}
|