@sendbird/uikit-react-native-foundation 3.1.2 → 3.2.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/lib/commonjs/assets/icon/icon-audio-off-filled.png +0 -0
- package/lib/commonjs/assets/icon/icon-audio-off-filled@2x.png +0 -0
- package/lib/commonjs/assets/icon/icon-audio-off-filled@3x.png +0 -0
- package/lib/commonjs/assets/icon/icon-audio-off.png +0 -0
- package/lib/commonjs/assets/icon/icon-audio-off@2x.png +0 -0
- package/lib/commonjs/assets/icon/icon-audio-off@3x.png +0 -0
- package/lib/commonjs/assets/icon/icon-audio-on-filled.png +0 -0
- package/lib/commonjs/assets/icon/icon-audio-on-filled@2x.png +0 -0
- package/lib/commonjs/assets/icon/icon-audio-on-filled@3x.png +0 -0
- package/lib/commonjs/assets/icon/icon-audio-on.png +0 -0
- package/lib/commonjs/assets/icon/icon-audio-on@2x.png +0 -0
- package/lib/commonjs/assets/icon/icon-audio-on@3x.png +0 -0
- package/lib/commonjs/assets/icon/icon-pause.png +0 -0
- package/lib/commonjs/assets/icon/icon-pause@2x.png +0 -0
- package/lib/commonjs/assets/icon/icon-pause@3x.png +0 -0
- package/lib/commonjs/assets/icon/icon-recording.png +0 -0
- package/lib/commonjs/assets/icon/icon-recording@2x.png +0 -0
- package/lib/commonjs/assets/icon/icon-recording@3x.png +0 -0
- package/lib/commonjs/assets/icon/icon-stop.png +0 -0
- package/lib/commonjs/assets/icon/icon-stop@2x.png +0 -0
- package/lib/commonjs/assets/icon/icon-stop@3x.png +0 -0
- package/lib/commonjs/assets/icon/index.js +7 -0
- package/lib/commonjs/assets/icon/index.js.map +1 -1
- package/lib/commonjs/components/Box/index.js +2 -2
- package/lib/commonjs/components/Box/index.js.map +1 -1
- package/lib/commonjs/components/Icon/index.js +4 -3
- package/lib/commonjs/components/Icon/index.js.map +1 -1
- package/lib/commonjs/components/Image/FastImageInternal.js.map +1 -1
- package/lib/commonjs/components/Image/index.js.map +1 -1
- package/lib/commonjs/components/Modal/index.js +1 -1
- package/lib/commonjs/components/Modal/index.js.map +1 -1
- package/lib/commonjs/components/PressBox/index.js.map +1 -1
- package/lib/commonjs/components/ProgressBar/index.js +72 -0
- package/lib/commonjs/components/ProgressBar/index.js.map +1 -0
- package/lib/commonjs/components/RegexText/index.js.map +1 -1
- package/lib/commonjs/index.js +7 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/styles/HeaderStyleContext.js.map +1 -1
- package/lib/commonjs/styles/createScaleFactor.js +5 -4
- package/lib/commonjs/styles/createScaleFactor.js.map +1 -1
- package/lib/commonjs/theme/DarkUIKitTheme.js +80 -36
- package/lib/commonjs/theme/DarkUIKitTheme.js.map +1 -1
- package/lib/commonjs/theme/LightUIKitTheme.js +80 -36
- package/lib/commonjs/theme/LightUIKitTheme.js.map +1 -1
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/ui/Avatar/index.js +4 -3
- package/lib/commonjs/ui/Avatar/index.js.map +1 -1
- package/lib/commonjs/ui/BottomSheet/index.js.map +1 -1
- package/lib/commonjs/ui/Dialog/DialogSheet.js.map +1 -1
- package/lib/commonjs/ui/GroupChannelMessage/Message.file.voice.js +108 -0
- package/lib/commonjs/ui/GroupChannelMessage/Message.file.voice.js.map +1 -0
- package/lib/commonjs/ui/GroupChannelMessage/Message.unknown.js +1 -1
- package/lib/commonjs/ui/GroupChannelMessage/Message.unknown.js.map +1 -1
- package/lib/commonjs/ui/GroupChannelMessage/index.js +2 -0
- package/lib/commonjs/ui/GroupChannelMessage/index.js.map +1 -1
- package/lib/commonjs/ui/GroupChannelPreview/index.js.map +1 -1
- package/lib/commonjs/ui/Header/index.js +5 -4
- package/lib/commonjs/ui/Header/index.js.map +1 -1
- package/lib/commonjs/ui/OpenChannelMessage/MessageContainer.js.map +1 -1
- package/lib/commonjs/ui/OpenChannelPreview/index.js.map +1 -1
- package/lib/commonjs/ui/ProfileCard/index.js.map +1 -1
- package/lib/module/assets/icon/icon-audio-off-filled.png +0 -0
- package/lib/module/assets/icon/icon-audio-off-filled@2x.png +0 -0
- package/lib/module/assets/icon/icon-audio-off-filled@3x.png +0 -0
- package/lib/module/assets/icon/icon-audio-off.png +0 -0
- package/lib/module/assets/icon/icon-audio-off@2x.png +0 -0
- package/lib/module/assets/icon/icon-audio-off@3x.png +0 -0
- package/lib/module/assets/icon/icon-audio-on-filled.png +0 -0
- package/lib/module/assets/icon/icon-audio-on-filled@2x.png +0 -0
- package/lib/module/assets/icon/icon-audio-on-filled@3x.png +0 -0
- package/lib/module/assets/icon/icon-audio-on.png +0 -0
- package/lib/module/assets/icon/icon-audio-on@2x.png +0 -0
- package/lib/module/assets/icon/icon-audio-on@3x.png +0 -0
- package/lib/module/assets/icon/icon-pause.png +0 -0
- package/lib/module/assets/icon/icon-pause@2x.png +0 -0
- package/lib/module/assets/icon/icon-pause@3x.png +0 -0
- package/lib/module/assets/icon/icon-recording.png +0 -0
- package/lib/module/assets/icon/icon-recording@2x.png +0 -0
- package/lib/module/assets/icon/icon-recording@3x.png +0 -0
- package/lib/module/assets/icon/icon-stop.png +0 -0
- package/lib/module/assets/icon/icon-stop@2x.png +0 -0
- package/lib/module/assets/icon/icon-stop@3x.png +0 -0
- package/lib/module/assets/icon/index.js +7 -0
- package/lib/module/assets/icon/index.js.map +1 -1
- package/lib/module/components/Box/index.js +2 -2
- package/lib/module/components/Box/index.js.map +1 -1
- package/lib/module/components/Icon/index.js +4 -3
- package/lib/module/components/Icon/index.js.map +1 -1
- package/lib/module/components/Image/FastImageInternal.js.map +1 -1
- package/lib/module/components/Image/index.js.map +1 -1
- package/lib/module/components/Modal/index.js +1 -1
- package/lib/module/components/Modal/index.js.map +1 -1
- package/lib/module/components/PressBox/index.js.map +1 -1
- package/lib/module/components/ProgressBar/index.js +62 -0
- package/lib/module/components/ProgressBar/index.js.map +1 -0
- package/lib/module/components/RegexText/index.js.map +1 -1
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/styles/HeaderStyleContext.js.map +1 -1
- package/lib/module/styles/createScaleFactor.js +5 -4
- package/lib/module/styles/createScaleFactor.js.map +1 -1
- package/lib/module/theme/DarkUIKitTheme.js +80 -36
- package/lib/module/theme/DarkUIKitTheme.js.map +1 -1
- package/lib/module/theme/LightUIKitTheme.js +80 -36
- package/lib/module/theme/LightUIKitTheme.js.map +1 -1
- package/lib/module/types.js.map +1 -1
- package/lib/module/ui/Avatar/index.js +4 -3
- package/lib/module/ui/Avatar/index.js.map +1 -1
- package/lib/module/ui/BottomSheet/index.js.map +1 -1
- package/lib/module/ui/Dialog/DialogSheet.js.map +1 -1
- package/lib/module/ui/GroupChannelMessage/Message.file.voice.js +98 -0
- package/lib/module/ui/GroupChannelMessage/Message.file.voice.js.map +1 -0
- package/lib/module/ui/GroupChannelMessage/Message.unknown.js +1 -1
- package/lib/module/ui/GroupChannelMessage/Message.unknown.js.map +1 -1
- package/lib/module/ui/GroupChannelMessage/index.js +2 -0
- package/lib/module/ui/GroupChannelMessage/index.js.map +1 -1
- package/lib/module/ui/GroupChannelPreview/index.js.map +1 -1
- package/lib/module/ui/Header/index.js +5 -4
- package/lib/module/ui/Header/index.js.map +1 -1
- package/lib/module/ui/OpenChannelMessage/MessageContainer.js.map +1 -1
- package/lib/module/ui/OpenChannelPreview/index.js.map +1 -1
- package/lib/module/ui/ProfileCard/index.js.map +1 -1
- package/lib/typescript/src/assets/icon/index.d.ts +7 -0
- package/lib/typescript/src/components/Box/index.d.ts +2 -1
- package/lib/typescript/src/components/Divider/index.d.ts +2 -1
- package/lib/typescript/src/components/Icon/index.d.ts +76 -7
- package/lib/typescript/src/components/Image/FastImageInternal.d.ts +2 -1
- package/lib/typescript/src/components/Image/index.d.ts +2 -1
- package/lib/typescript/src/components/ImageWithPlaceholder/index.d.ts +2 -1
- package/lib/typescript/src/components/Modal/index.d.ts +2 -1
- package/lib/typescript/src/components/PressBox/index.d.ts +2 -1
- package/lib/typescript/src/components/ProgressBar/index.d.ts +12 -0
- package/lib/typescript/src/components/RegexText/index.d.ts +3 -2
- package/lib/typescript/src/components/Switch/index.d.ts +1 -1
- package/lib/typescript/src/components/Text/index.d.ts +2 -1
- package/lib/typescript/src/components/VideoThumbnail/index.d.ts +2 -1
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/styles/HeaderStyleContext.d.ts +2 -2
- package/lib/typescript/src/styles/createScaleFactor.d.ts +4 -5
- package/lib/typescript/src/theme/UIKitThemeProvider.d.ts +1 -1
- package/lib/typescript/src/types.d.ts +11 -7
- package/lib/typescript/src/ui/ActionMenu/index.d.ts +2 -1
- package/lib/typescript/src/ui/Alert/index.d.ts +2 -1
- package/lib/typescript/src/ui/Avatar/AvatarGroup.d.ts +1 -1
- package/lib/typescript/src/ui/Avatar/AvatarIcon.d.ts +2 -1
- package/lib/typescript/src/ui/Avatar/index.d.ts +16 -8
- package/lib/typescript/src/ui/Badge/index.d.ts +2 -1
- package/lib/typescript/src/ui/BottomSheet/index.d.ts +3 -2
- package/lib/typescript/src/ui/Button/index.d.ts +1 -1
- package/lib/typescript/src/ui/ChannelFrozenBanner/index.d.ts +2 -1
- package/lib/typescript/src/ui/Dialog/DialogBox.d.ts +1 -1
- package/lib/typescript/src/ui/Dialog/DialogSheet.d.ts +3 -3
- package/lib/typescript/src/ui/Dialog/index.d.ts +1 -1
- package/lib/typescript/src/ui/GroupChannelMessage/Message.admin.d.ts +2 -1
- package/lib/typescript/src/ui/GroupChannelMessage/Message.file.d.ts +2 -1
- package/lib/typescript/src/ui/GroupChannelMessage/Message.file.image.d.ts +2 -1
- package/lib/typescript/src/ui/GroupChannelMessage/Message.file.video.d.ts +2 -1
- package/lib/typescript/src/ui/GroupChannelMessage/Message.file.voice.d.ts +14 -0
- package/lib/typescript/src/ui/GroupChannelMessage/Message.unknown.d.ts +2 -1
- package/lib/typescript/src/ui/GroupChannelMessage/Message.user.d.ts +2 -1
- package/lib/typescript/src/ui/GroupChannelMessage/Message.user.og.d.ts +2 -1
- package/lib/typescript/src/ui/GroupChannelMessage/MessageBubbleWithText.d.ts +2 -1
- package/lib/typescript/src/ui/GroupChannelMessage/MessageContainer.d.ts +4 -3
- package/lib/typescript/src/ui/GroupChannelMessage/MessageOpenGraph.d.ts +2 -1
- package/lib/typescript/src/ui/GroupChannelMessage/index.d.ts +43 -7
- package/lib/typescript/src/ui/GroupChannelPreview/index.d.ts +3 -3
- package/lib/typescript/src/ui/Header/index.d.ts +8 -12
- package/lib/typescript/src/ui/LoadingSpinner/index.d.ts +2 -1
- package/lib/typescript/src/ui/MenuBar/index.d.ts +1 -1
- package/lib/typescript/src/ui/OpenChannelMessage/Message.admin.d.ts +2 -1
- package/lib/typescript/src/ui/OpenChannelMessage/Message.file.d.ts +2 -1
- package/lib/typescript/src/ui/OpenChannelMessage/Message.file.image.d.ts +2 -1
- package/lib/typescript/src/ui/OpenChannelMessage/Message.file.video.d.ts +2 -1
- package/lib/typescript/src/ui/OpenChannelMessage/Message.unknown.d.ts +2 -1
- package/lib/typescript/src/ui/OpenChannelMessage/Message.user.d.ts +2 -1
- package/lib/typescript/src/ui/OpenChannelMessage/Message.user.og.d.ts +2 -1
- package/lib/typescript/src/ui/OpenChannelMessage/MessageContainer.d.ts +2 -1
- package/lib/typescript/src/ui/OpenChannelMessage/index.d.ts +7 -7
- package/lib/typescript/src/ui/OpenChannelPreview/index.d.ts +2 -2
- package/lib/typescript/src/ui/OutlinedButton/index.d.ts +2 -1
- package/lib/typescript/src/ui/Placeholder/index.d.ts +2 -1
- package/lib/typescript/src/ui/ProfileCard/index.d.ts +3 -2
- package/lib/typescript/src/ui/Prompt/index.d.ts +2 -1
- package/lib/typescript/src/ui/Toast/index.d.ts +2 -2
- package/package.json +5 -9
- package/src/assets/icon/icon-audio-off-filled.png +0 -0
- package/src/assets/icon/icon-audio-off-filled@2x.png +0 -0
- package/src/assets/icon/icon-audio-off-filled@3x.png +0 -0
- package/src/assets/icon/icon-audio-off.png +0 -0
- package/src/assets/icon/icon-audio-off@2x.png +0 -0
- package/src/assets/icon/icon-audio-off@3x.png +0 -0
- package/src/assets/icon/icon-audio-on-filled.png +0 -0
- package/src/assets/icon/icon-audio-on-filled@2x.png +0 -0
- package/src/assets/icon/icon-audio-on-filled@3x.png +0 -0
- package/src/assets/icon/icon-audio-on.png +0 -0
- package/src/assets/icon/icon-audio-on@2x.png +0 -0
- package/src/assets/icon/icon-audio-on@3x.png +0 -0
- package/src/assets/icon/icon-pause.png +0 -0
- package/src/assets/icon/icon-pause@2x.png +0 -0
- package/src/assets/icon/icon-pause@3x.png +0 -0
- package/src/assets/icon/icon-recording.png +0 -0
- package/src/assets/icon/icon-recording@2x.png +0 -0
- package/src/assets/icon/icon-recording@3x.png +0 -0
- package/src/assets/icon/icon-stop.png +0 -0
- package/src/assets/icon/icon-stop@2x.png +0 -0
- package/src/assets/icon/icon-stop@3x.png +0 -0
- package/src/assets/icon/index.ts +7 -0
- package/src/components/Box/index.tsx +1 -1
- package/src/components/Icon/index.tsx +6 -7
- package/src/components/Image/FastImageInternal.tsx +3 -2
- package/src/components/Image/index.ts +2 -1
- package/src/components/Modal/index.tsx +1 -1
- package/src/components/PressBox/index.tsx +1 -0
- package/src/components/ProgressBar/index.tsx +72 -0
- package/src/components/RegexText/index.tsx +3 -3
- package/src/index.ts +1 -0
- package/src/styles/HeaderStyleContext.tsx +1 -1
- package/src/styles/createScaleFactor.ts +5 -5
- package/src/theme/DarkUIKitTheme.ts +80 -37
- package/src/theme/LightUIKitTheme.ts +80 -37
- package/src/types.ts +31 -7
- package/src/ui/Avatar/index.tsx +6 -14
- package/src/ui/BottomSheet/index.tsx +2 -2
- package/src/ui/Dialog/DialogSheet.tsx +2 -2
- package/src/ui/GroupChannelMessage/Message.file.voice.tsx +123 -0
- package/src/ui/GroupChannelMessage/Message.unknown.tsx +1 -1
- package/src/ui/GroupChannelMessage/index.ts +7 -0
- package/src/ui/GroupChannelPreview/index.tsx +2 -2
- package/src/ui/Header/index.tsx +8 -12
- package/src/ui/OpenChannelMessage/MessageContainer.tsx +1 -1
- package/src/ui/OpenChannelPreview/index.tsx +1 -1
- package/src/ui/ProfileCard/index.tsx +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["IconAssets","require"],"sources":["index.ts"],"sourcesContent":["const IconAssets = {\n 'chat-hide': require('./ic-chat-hide.png'),\n 'chat-show': require('./ic-chat-show.png'),\n 'add': require('./icon-add.png'),\n 'archive': require('./icon-archive.png'),\n 'arrow-left': require('./icon-arrow-left.png'),\n 'ban': require('./icon-ban.png'),\n 'broadcast': require('./icon-broadcast.png'),\n 'camera': require('./icon-camera.png'),\n 'channels': require('./icon-channels.png'),\n 'chat-filled': require('./icon-chat-filled.png'),\n 'chat': require('./icon-chat.png'),\n 'checkbox-off': require('./icon-checkbox-off.png'),\n 'checkbox-on': require('./icon-checkbox-on.png'),\n 'chevron-down': require('./icon-chevron-down.png'),\n 'chevron-right': require('./icon-chevron-right.png'),\n 'close': require('./icon-close.png'),\n 'copy': require('./icon-copy.png'),\n 'create': require('./icon-create.png'),\n 'delete': require('./icon-delete.png'),\n 'document': require('./icon-document.png'),\n 'done-all': require('./icon-done-all.png'),\n 'done': require('./icon-done.png'),\n 'download': require('./icon-download.png'),\n 'edit': require('./icon-edit.png'),\n 'emoji-more': require('./icon-emoji-more.png'),\n 'error': require('./icon-error.png'),\n 'file-audio': require('./icon-file-audio.png'),\n 'file-document': require('./icon-file-document.png'),\n 'freeze': require('./icon-freeze.png'),\n 'gif': require('./icon-gif.png'),\n 'info': require('./icon-info.png'),\n 'leave': require('./icon-leave.png'),\n 'members': require('./icon-members.png'),\n 'message': require('./icon-message.png'),\n 'moderation': require('./icon-moderation.png'),\n 'more': require('./icon-more.png'),\n 'mute': require('./icon-mute.png'),\n 'notifications-filled': require('./icon-notifications-filled.png'),\n 'notifications-off-filled': require('./icon-notifications-off-filled.png'),\n 'notifications': require('./icon-notifications.png'),\n 'operator': require('./icon-operator.png'),\n 'photo': require('./icon-photo.png'),\n 'play': require('./icon-play.png'),\n 'plus': require('./icon-plus.png'),\n 'question': require('./icon-question.png'),\n 'radio-off': require('./icon-radio-off.png'),\n 'radio-on': require('./icon-radio-on.png'),\n 'refresh': require('./icon-refresh.png'),\n 'remove': require('./icon-remove.png'),\n 'reply-filled': require('./icon-reply-filled.png'),\n 'reply': require('./icon-reply.png'),\n 'search': require('./icon-search.png'),\n 'send': require('./icon-send.png'),\n 'settings-filled': require('./icon-settings-filled.png'),\n 'spinner': require('./icon-spinner.png'),\n 'streaming': require('./icon-streaming.png'),\n 'supergroup': require('./icon-supergroup.png'),\n 'theme': require('./icon-theme.png'),\n 'thumbnail-none': require('./icon-thumbnail-none.png'),\n 'unarchive': require('./icon-unarchive.png'),\n 'user': require('./icon-user.png'),\n};\nexport default IconAssets;\n"],"mappings":"AAAA,MAAMA,UAAU,GAAG;EACjB,WAAW,EAAEC,OAAO,CAAC,oBAAoB,CAAC;EAC1C,WAAW,EAAEA,OAAO,CAAC,oBAAoB,CAAC;EAC1C,KAAK,EAAEA,OAAO,CAAC,gBAAgB,CAAC;EAChC,SAAS,EAAEA,OAAO,CAAC,oBAAoB,CAAC;EACxC,YAAY,EAAEA,OAAO,CAAC,uBAAuB,CAAC;EAC9C,KAAK,EAAEA,OAAO,CAAC,gBAAgB,CAAC;EAChC,WAAW,EAAEA,OAAO,CAAC,sBAAsB,CAAC;EAC5C,QAAQ,EAAEA,OAAO,CAAC,mBAAmB,CAAC;EACtC,UAAU,EAAEA,OAAO,CAAC,qBAAqB,CAAC;EAC1C,aAAa,EAAEA,OAAO,CAAC,wBAAwB,CAAC;EAChD,MAAM,EAAEA,OAAO,CAAC,iBAAiB,CAAC;EAClC,cAAc,EAAEA,OAAO,CAAC,yBAAyB,CAAC;EAClD,aAAa,EAAEA,OAAO,CAAC,wBAAwB,CAAC;EAChD,cAAc,EAAEA,OAAO,CAAC,yBAAyB,CAAC;EAClD,eAAe,EAAEA,OAAO,CAAC,0BAA0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A,OAAO,CAAC,kBAAkB,CAAC;EACpC,MAAM,EAAEA,OAAO,CAAC,iBAAiB,CAAC;EAClC,MAAM,EAAEA,OAAO,CAAC,iBAAiB,CAAC;EAClC,UAAU,EAAEA,OAAO,CAAC,qBAAqB,CAAC;EAC1C,WAAW,EAAEA,OAAO,CAAC,sBAAsB,CAAC;EAC5C,UAAU,EAAEA,OAAO,CAAC,qBAAqB,CAAC;EAC1C,SAAS,EAAEA,OAAO,CAAC,oBAAoB,CAAC;EACxC,QAAQ,EAAEA,OAAO,CAAC,mBAAmB,CAAC;EACtC,cAAc,EAAEA,OAAO,CAAC,yBAAyB,CAAC;EAClD,OAAO,EAAEA,OAAO,CAAC,kBAAkB,CAAC;EACpC,QAAQ,EAAEA,OAAO,CAAC,mBAAmB,CAAC;EACtC,MAAM,EAAEA,OAAO,CAAC,iBAAiB,CAAC;EAClC,iBAAiB,EAAEA,OAAO,CAAC,4BAA4B,CAAC;EACxD,SAAS,EAAEA,OAAO,CAAC,oBAAoB,CAAC;EACxC,WAAW,EAAEA,OAAO,CAAC,sBAAsB,CAAC;EAC5C,YAAY,EAAEA,OAAO,CAAC,uBAAuB,CAAC;EAC9C,OAAO,EAAEA,OAAO,CAAC,kBAAkB,CAAC;EACpC,gBAAgB,EAAEA,OAAO,CAAC,2BAA2B,CAAC;EACtD,WAAW,EAAEA,OAAO,CAAC,sBAAsB,CAAC;EAC5C,MAAM,EAAEA,OAAO,CAAC,iBAAiB;AACnC,CAAC;AACD,eAAeD,UAAU"}
|
|
1
|
+
{"version":3,"names":["IconAssets","require"],"sources":["index.ts"],"sourcesContent":["const IconAssets = {\n 'chat-hide': require('./ic-chat-hide.png'),\n 'chat-show': require('./ic-chat-show.png'),\n 'add': require('./icon-add.png'),\n 'archive': require('./icon-archive.png'),\n 'arrow-left': require('./icon-arrow-left.png'),\n 'audio-off-filled': require('./icon-audio-off-filled.png'),\n 'audio-off': require('./icon-audio-off.png'),\n 'audio-on-filled': require('./icon-audio-on-filled.png'),\n 'audio-on': require('./icon-audio-on.png'),\n 'ban': require('./icon-ban.png'),\n 'broadcast': require('./icon-broadcast.png'),\n 'camera': require('./icon-camera.png'),\n 'channels': require('./icon-channels.png'),\n 'chat-filled': require('./icon-chat-filled.png'),\n 'chat': require('./icon-chat.png'),\n 'checkbox-off': require('./icon-checkbox-off.png'),\n 'checkbox-on': require('./icon-checkbox-on.png'),\n 'chevron-down': require('./icon-chevron-down.png'),\n 'chevron-right': require('./icon-chevron-right.png'),\n 'close': require('./icon-close.png'),\n 'copy': require('./icon-copy.png'),\n 'create': require('./icon-create.png'),\n 'delete': require('./icon-delete.png'),\n 'document': require('./icon-document.png'),\n 'done-all': require('./icon-done-all.png'),\n 'done': require('./icon-done.png'),\n 'download': require('./icon-download.png'),\n 'edit': require('./icon-edit.png'),\n 'emoji-more': require('./icon-emoji-more.png'),\n 'error': require('./icon-error.png'),\n 'file-audio': require('./icon-file-audio.png'),\n 'file-document': require('./icon-file-document.png'),\n 'freeze': require('./icon-freeze.png'),\n 'gif': require('./icon-gif.png'),\n 'info': require('./icon-info.png'),\n 'leave': require('./icon-leave.png'),\n 'members': require('./icon-members.png'),\n 'message': require('./icon-message.png'),\n 'moderation': require('./icon-moderation.png'),\n 'more': require('./icon-more.png'),\n 'mute': require('./icon-mute.png'),\n 'notifications-filled': require('./icon-notifications-filled.png'),\n 'notifications-off-filled': require('./icon-notifications-off-filled.png'),\n 'notifications': require('./icon-notifications.png'),\n 'operator': require('./icon-operator.png'),\n 'pause': require('./icon-pause.png'),\n 'photo': require('./icon-photo.png'),\n 'play': require('./icon-play.png'),\n 'plus': require('./icon-plus.png'),\n 'question': require('./icon-question.png'),\n 'radio-off': require('./icon-radio-off.png'),\n 'radio-on': require('./icon-radio-on.png'),\n 'recording': require('./icon-recording.png'),\n 'refresh': require('./icon-refresh.png'),\n 'remove': require('./icon-remove.png'),\n 'reply-filled': require('./icon-reply-filled.png'),\n 'reply': require('./icon-reply.png'),\n 'search': require('./icon-search.png'),\n 'send': require('./icon-send.png'),\n 'settings-filled': require('./icon-settings-filled.png'),\n 'spinner': require('./icon-spinner.png'),\n 'stop': require('./icon-stop.png'),\n 'streaming': require('./icon-streaming.png'),\n 'supergroup': require('./icon-supergroup.png'),\n 'theme': require('./icon-theme.png'),\n 'thumbnail-none': require('./icon-thumbnail-none.png'),\n 'unarchive': require('./icon-unarchive.png'),\n 'user': require('./icon-user.png'),\n};\nexport default IconAssets;\n"],"mappings":"AAAA,MAAMA,UAAU,GAAG;EACjB,WAAW,EAAEC,OAAO,CAAC,oBAAoB,CAAC;EAC1C,WAAW,EAAEA,OAAO,CAAC,oBAAoB,CAAC;EAC1C,KAAK,EAAEA,OAAO,CAAC,gBAAgB,CAAC;EAChC,SAAS,EAAEA,OAAO,CAAC,oBAAoB,CAAC;EACxC,YAAY,EAAEA,OAAO,CAAC,uBAAuB,CAAC;EAC9C,kBAAkB,EAAEA,OAAO,CAAC,6BAA6B,CAAC;EAC1D,WAAW,EAAEA,OAAO,CAAC,sBAAsB,CAAC;EAC5C,iBAAiB,EAAEA,OAAO,CAAC,4BAA4B,CAAC;EACxD,UAAU,EAAEA,OAAO,CAAC,qBAAqB,CAAC;EAC1C,KAAK,EAAEA,OAAO,CAAC,gBAAgB,CAAC;EAChC,WAAW,EAAEA,OAAO,CAAC,sBAAsB,CAAC;EAC5C,QAAQ,EAAEA,OAAO,CAAC,mBAAmB,CAAC;EACtC,UAAU,EAAEA,OAAO,CAAC,qBAAqB,CAAC;EAC1C,aAAa,EAAEA,OAAO,CAAC,wBAAwB,CAAC;EAChD,MAAM,EAAEA,OAAO,CAAC,iBAAiB,CAAC;EAClC,cAAc,EAAEA,OAAO,CAAC,yBAAyB,CAAC;EAClD,aAAa,EAAEA,OAAO,CAAC,wBAAwB,CAAC;EAChD,cAAc,EAAEA,OAAO,CAAC,yBAAyB,CAAC;EAClD,eAAe,EAAEA,OAAO,CAAC,0BAA0B,CAAC;EACpD,OAAO,EAAEA,OAAO,CAAC,kBA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AEA,OAAO,CAAC,kBAAkB,CAAC;EACpC,MAAM,EAAEA,OAAO,CAAC,iBAAiB,CAAC;EAClC,MAAM,EAAEA,OAAO,CAAC,iBAAiB,CAAC;EAClC,UAAU,EAAEA,OAAO,CAAC,qBAAqB,CAAC;EAC1C,WAAW,EAAEA,OAAO,CAAC,sBAAsB,CAAC;EAC5C,UAAU,EAAEA,OAAO,CAAC,qBAAqB,CAAC;EAC1C,WAAW,EAAEA,OAAO,CAAC,sBAAsB,CAAC;EAC5C,SAAS,EAAEA,OAAO,CAAC,oBAAoB,CAAC;EACxC,QAAQ,EAAEA,OAAO,CAAC,mBAAmB,CAAC;EACtC,cAAc,EAAEA,OAAO,CAAC,yBAAyB,CAAC;EAClD,OAAO,EAAEA,OAAO,CAAC,kBAAkB,CAAC;EACpC,QAAQ,EAAEA,OAAO,CAAC,mBAAmB,CAAC;EACtC,MAAM,EAAEA,OAAO,CAAC,iBAAiB,CAAC;EAClC,iBAAiB,EAAEA,OAAO,CAAC,4BAA4B,CAAC;EACxD,SAAS,EAAEA,OAAO,CAAC,oBAAoB,CAAC;EACxC,MAAM,EAAEA,OAAO,CAAC,iBAAiB,CAAC;EAClC,WAAW,EAAEA,OAAO,CAAC,sBAAsB,CAAC;EAC5C,YAAY,EAAEA,OAAO,CAAC,uBAAuB,CAAC;EAC9C,OAAO,EAAEA,OAAO,CAAC,kBAAkB,CAAC;EACpC,gBAAgB,EAAEA,OAAO,CAAC,2BAA2B,CAAC;EACtD,WAAW,EAAEA,OAAO,CAAC,sBAAsB,CAAC;EAC5C,MAAM,EAAEA,OAAO,CAAC,iBAAiB;AACnC,CAAC;AACD,eAAeD,UAAU"}
|
|
@@ -10,9 +10,9 @@ const Box = _ref => {
|
|
|
10
10
|
...props
|
|
11
11
|
} = _ref;
|
|
12
12
|
const boxStyle = useBoxStyle(props);
|
|
13
|
-
return /*#__PURE__*/React.createElement(View, _extends({
|
|
13
|
+
return /*#__PURE__*/React.createElement(View, _extends({}, props, {
|
|
14
14
|
style: [boxStyle, style]
|
|
15
|
-
}
|
|
15
|
+
}), children);
|
|
16
16
|
};
|
|
17
17
|
const useBoxStyle = props => {
|
|
18
18
|
const theme = useUIKitTheme();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","isFunction","useUIKitTheme","Box","_ref","style","children","props","boxStyle","useBoxStyle","createElement","_extends","theme","backgroundColor","rest"],"sources":["index.tsx"],"sourcesContent":["import React from 'react';\nimport { StyleProp, View, ViewProps, ViewStyle } from 'react-native';\n\nimport { isFunction } from '@sendbird/uikit-utils';\n\nimport useUIKitTheme from '../../theme/useUIKitTheme';\nimport type { UIKitColors, UIKitPalette } from '../../types';\n\ntype BaseBoxProps = Pick<\n ViewStyle,\n | 'flex'\n | 'flexShrink'\n | 'flexGrow'\n | 'flexDirection'\n | 'alignItems'\n | 'justifyContent'\n | 'borderRadius'\n | 'borderWidth'\n | 'borderColor'\n | 'borderBottomColor'\n | 'borderBottomWidth'\n | 'margin'\n | 'marginHorizontal'\n | 'marginVertical'\n | 'marginLeft'\n | 'marginRight'\n | 'marginTop'\n | 'marginBottom'\n | 'padding'\n | 'paddingHorizontal'\n | 'paddingVertical'\n | 'paddingLeft'\n | 'paddingRight'\n | 'paddingTop'\n | 'paddingBottom'\n | 'overflow'\n | 'width'\n | 'height'\n> & {\n backgroundColor?: string | ((theme: { colors: UIKitColors; palette: UIKitPalette }) => string);\n};\n\ntype BoxProps = BaseBoxProps & ViewProps;\nconst Box = ({ style, children, ...props }: BoxProps) => {\n const boxStyle = useBoxStyle(props);\n\n return (\n <View style={[boxStyle, style]}
|
|
1
|
+
{"version":3,"names":["React","View","isFunction","useUIKitTheme","Box","_ref","style","children","props","boxStyle","useBoxStyle","createElement","_extends","theme","backgroundColor","rest"],"sources":["index.tsx"],"sourcesContent":["import React from 'react';\nimport { StyleProp, View, ViewProps, ViewStyle } from 'react-native';\n\nimport { isFunction } from '@sendbird/uikit-utils';\n\nimport useUIKitTheme from '../../theme/useUIKitTheme';\nimport type { UIKitColors, UIKitPalette } from '../../types';\n\ntype BaseBoxProps = Pick<\n ViewStyle,\n | 'flex'\n | 'flexShrink'\n | 'flexGrow'\n | 'flexDirection'\n | 'alignItems'\n | 'justifyContent'\n | 'borderRadius'\n | 'borderWidth'\n | 'borderColor'\n | 'borderBottomColor'\n | 'borderBottomWidth'\n | 'margin'\n | 'marginHorizontal'\n | 'marginVertical'\n | 'marginLeft'\n | 'marginRight'\n | 'marginTop'\n | 'marginBottom'\n | 'padding'\n | 'paddingHorizontal'\n | 'paddingVertical'\n | 'paddingLeft'\n | 'paddingRight'\n | 'paddingTop'\n | 'paddingBottom'\n | 'overflow'\n | 'width'\n | 'height'\n> & {\n backgroundColor?: string | ((theme: { colors: UIKitColors; palette: UIKitPalette }) => string);\n};\n\ntype BoxProps = BaseBoxProps & ViewProps;\nconst Box = ({ style, children, ...props }: BoxProps) => {\n const boxStyle = useBoxStyle(props);\n\n return (\n <View {...props} style={[boxStyle, style]}>\n {children}\n </View>\n );\n};\n\nconst useBoxStyle = (props: BaseBoxProps): StyleProp<ViewStyle> => {\n const theme = useUIKitTheme();\n\n const { backgroundColor, ...rest } = props;\n\n return {\n backgroundColor: isFunction(backgroundColor) ? backgroundColor(theme) : backgroundColor,\n ...rest,\n };\n};\n\nexport default Box;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAoBC,IAAI,QAA8B,cAAc;AAEpE,SAASC,UAAU,QAAQ,uBAAuB;AAElD,OAAOC,aAAa,MAAM,2BAA2B;AAsCrD,MAAMC,GAAG,GAAGC,IAAA,IAA6C;EAAA,IAA5C;IAAEC,KAAK;IAAEC,QAAQ;IAAE,GAAGC;EAAgB,CAAC,GAAAH,IAAA;EAClD,MAAMI,QAAQ,GAAGC,WAAW,CAACF,KAAK,CAAC;EAEnC,oBACER,KAAA,CAAAW,aAAA,CAACV,IAAI,EAAAW,QAAA,KAAKJ,KAAK;IAAEF,KAAK,EAAE,CAACG,QAAQ,EAAEH,KAAK;EAAE,IACvCC,QAAQ,CACJ;AAEX,CAAC;AAED,MAAMG,WAAW,GAAIF,KAAmB,IAA2B;EACjE,MAAMK,KAAK,GAAGV,aAAa,EAAE;EAE7B,MAAM;IAAEW,eAAe;IAAE,GAAGC;EAAK,CAAC,GAAGP,KAAK;EAE1C,OAAO;IACLM,eAAe,EAAEZ,UAAU,CAACY,eAAe,CAAC,GAAGA,eAAe,CAACD,KAAK,CAAC,GAAGC,eAAe;IACvF,GAAGC;EACL,CAAC;AACH,CAAC;AAED,eAAeX,GAAG"}
|
|
@@ -67,7 +67,8 @@ const sizeStyles = createStyleSheet({
|
|
|
67
67
|
height: 32
|
|
68
68
|
}
|
|
69
69
|
});
|
|
70
|
-
Icon
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
export default Object.assign(Icon, {
|
|
71
|
+
Assets: IconAssets,
|
|
72
|
+
File: FileIcon
|
|
73
|
+
});
|
|
73
74
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Image","StyleSheet","View","convertFileTypeToMessageType","getFileIconFromMessageType","IconAssets","createStyleSheet","useUIKitTheme","Icon","_ref","icon","color","size","containerStyle","style","sizeStyle","sizeStyles","width","height","colors","createElement","containerStyles","container","resizeMode","source","tintColor","primary","FileIcon","_ref2","fileType","props","_extends","create","alignItems","justifyContent","Assets","File"],"sources":["index.tsx"],"sourcesContent":["import React from 'react';\nimport { Image, ImageStyle, StyleProp, StyleSheet, View, ViewStyle } from 'react-native';\n\nimport { FileType, convertFileTypeToMessageType, getFileIconFromMessageType } from '@sendbird/uikit-utils';\n\nimport IconAssets from '../../assets/icon';\nimport createStyleSheet from '../../styles/createStyleSheet';\nimport useUIKitTheme from '../../theme/useUIKitTheme';\n\ntype IconNames = keyof typeof IconAssets;\ntype SizeFactor = keyof typeof sizeStyles;\n\ntype Props = {\n icon: IconNames;\n color?: string;\n size?: number;\n style?: StyleProp<ImageStyle>;\n containerStyle?: StyleProp<ViewStyle>;\n};\nconst Icon
|
|
1
|
+
{"version":3,"names":["React","Image","StyleSheet","View","convertFileTypeToMessageType","getFileIconFromMessageType","IconAssets","createStyleSheet","useUIKitTheme","Icon","_ref","icon","color","size","containerStyle","style","sizeStyle","sizeStyles","width","height","colors","createElement","containerStyles","container","resizeMode","source","tintColor","primary","FileIcon","_ref2","fileType","props","_extends","create","alignItems","justifyContent","Object","assign","Assets","File"],"sources":["index.tsx"],"sourcesContent":["import React from 'react';\nimport { Image, ImageStyle, StyleProp, StyleSheet, View, ViewStyle } from 'react-native';\n\nimport { FileType, convertFileTypeToMessageType, getFileIconFromMessageType } from '@sendbird/uikit-utils';\n\nimport IconAssets from '../../assets/icon';\nimport createStyleSheet from '../../styles/createStyleSheet';\nimport useUIKitTheme from '../../theme/useUIKitTheme';\n\ntype IconNames = keyof typeof IconAssets;\ntype SizeFactor = keyof typeof sizeStyles;\n\ntype Props = {\n icon: IconNames;\n color?: string;\n size?: number;\n style?: StyleProp<ImageStyle>;\n containerStyle?: StyleProp<ViewStyle>;\n};\n\nconst Icon = ({ icon, color, size = 24, containerStyle, style }: Props) => {\n const sizeStyle = sizeStyles[size as SizeFactor] ?? { width: size, height: size };\n const { colors } = useUIKitTheme();\n return (\n <View style={[containerStyle, containerStyles.container]}>\n <Image\n resizeMode={'contain'}\n source={IconAssets[icon]}\n style={[{ tintColor: color ?? colors.primary }, sizeStyle, style]}\n />\n </View>\n );\n};\n\nconst FileIcon = ({ fileType, ...props }: Omit<Props, 'icon'> & { fileType: FileType }) => {\n return <Icon icon={getFileIconFromMessageType(convertFileTypeToMessageType(fileType))} {...props} />;\n};\n\nconst containerStyles = StyleSheet.create({\n container: {\n alignItems: 'center',\n justifyContent: 'center',\n },\n});\n\nconst sizeStyles = createStyleSheet({\n 16: {\n width: 16,\n height: 16,\n },\n 20: {\n width: 20,\n height: 20,\n },\n 24: {\n width: 24,\n height: 24,\n },\n 28: {\n width: 28,\n height: 28,\n },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,4BAA4B,CAAC0B,QAAQ,CAAC;EAAE,GAAKC,KAAK,EAAI;AACtG,CAAC;AAED,MAAMT,eAAe,GAAGpB,UAAU,CAAC+B,MAAM,CAAC;EACxCV,SAAS,EAAE;IACTW,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB;AACF,CAAC,CAAC;AAEF,MAAMlB,UAAU,GAAGV,gBAAgB,CAAC;EAClC,EAAE,EAAE;IACFW,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE;EACV,CAAC;EACD,EAAE,EAAE;IACFD,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE;EACV,CAAC;EACD,EAAE,EAAE;IACFD,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE;EACV,CAAC;EACD,EAAE,EAAE;IACFD,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE;EACV,CAAC;EACD,EAAE,EAAE;IACFD,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE;EACV;AACF,CAAC,CAAC;AAEF,eAAeiB,MAAM,CAACC,MAAM,CAAC5B,IAAI,EAAE;EACjC6B,MAAM,EAAEhC,UAAU;EAClBiC,IAAI,EAAEX;AACR,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["FastImageInternal","require"],"sources":["FastImageInternal.tsx"],"sourcesContent":["import type { FastImageProps } from 'react-native-fast-image';\n\nlet FastImageInternal: (props: FastImageProps) =>
|
|
1
|
+
{"version":3,"names":["FastImageInternal","require"],"sources":["FastImageInternal.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport type { FastImageProps } from 'react-native-fast-image';\n\nlet FastImageInternal: (props: FastImageProps) => ReactNode | null = () => null;\n\ntry {\n FastImageInternal = require('react-native-fast-image') as (props: FastImageProps) => ReactNode;\n} catch {}\n\nexport default FastImageInternal;\n"],"mappings":"AAGA,IAAIA,iBAA8D,GAAGA,CAAA,KAAM,IAAI;AAE/E,IAAI;EACFA,iBAAiB,GAAGC,OAAO,CAAC,yBAAyB,CAAyC;AAChG,CAAC,CAAC,MAAM,CAAC;AAET,eAAeD,iBAAiB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NativeModules","getImageModule","hasFastImage","Boolean","FastImageView","require","default","e"],"sources":["index.ts"],"sourcesContent":["import type { ImageProps as NativeImageProps } from 'react-native';\nimport { NativeModules } from 'react-native';\n\nexport interface SendbirdImageProps extends Omit<NativeImageProps, 'onLoad' | 'onError'> {\n onLoad?: (event: { width: number; height: number }) => void;\n onError?: (event: { error?: unknown }) => void;\n tintColor?: string;\n}\n\nexport type SendbirdImageComponent = (props: SendbirdImageProps) =>
|
|
1
|
+
{"version":3,"names":["NativeModules","getImageModule","hasFastImage","Boolean","FastImageView","require","default","e"],"sources":["index.ts"],"sourcesContent":["import { ReactNode } from 'react';\nimport type { ImageProps as NativeImageProps } from 'react-native';\nimport { NativeModules } from 'react-native';\n\nexport interface SendbirdImageProps extends Omit<NativeImageProps, 'onLoad' | 'onError'> {\n onLoad?: (event: { width: number; height: number }) => void;\n onError?: (event: { error?: unknown }) => void;\n tintColor?: string;\n}\n\nexport type SendbirdImageComponent = (props: SendbirdImageProps) => ReactNode;\n\nfunction getImageModule(): SendbirdImageComponent {\n const hasFastImage = Boolean(NativeModules.FastImageView);\n if (hasFastImage) {\n try {\n return require('./Image.fastimage').default;\n } catch (e) {\n return require('./Image.reactnative').default;\n }\n } else {\n return require('./Image.reactnative').default;\n }\n}\n\nexport default getImageModule();\n"],"mappings":"AAEA,SAASA,aAAa,QAAQ,cAAc;AAU5C,SAASC,cAAcA,CAAA,EAA2B;EAChD,MAAMC,YAAY,GAAGC,OAAO,CAACH,aAAa,CAACI,aAAa,CAAC;EACzD,IAAIF,YAAY,EAAE;IAChB,IAAI;MACF,OAAOG,OAAO,CAAC,mBAAmB,CAAC,CAACC,OAAO;IAC7C,CAAC,CAAC,OAAOC,CAAC,EAAE;MACV,OAAOF,OAAO,CAAC,qBAAqB,CAAC,CAACC,OAAO;IAC/C;EACF,CAAC,MAAM;IACL,OAAOD,OAAO,CAAC,qBAAqB,CAAC,CAACC,OAAO;EAC/C;AACF;AAEA,eAAeL,cAAc,EAAE"}
|
|
@@ -69,7 +69,7 @@ const Modal = _ref => {
|
|
|
69
69
|
// NOTE: This is trick for Android.
|
|
70
70
|
// When orientation is changed on Android, the offset that to avoid soft-keyboard is not updated normally.
|
|
71
71
|
, {
|
|
72
|
-
key: `${width}-${height}
|
|
72
|
+
key: Platform.OS === 'android' && enableKeyboardAvoid ? `${width}-${height}` : undefined,
|
|
73
73
|
enabled: enableKeyboardAvoid,
|
|
74
74
|
style: styles.background,
|
|
75
75
|
behavior: Platform.select({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useEffect","useRef","useState","Animated","Dimensions","KeyboardAvoidingView","PanResponder","Platform","Pressable","Modal","RNModal","StyleSheet","TouchableWithoutFeedback","useWindowDimensions","createStyleSheet","useHeaderStyle","useUIKitTheme","_ref","children","onClose","backgroundStyle","onDismiss","type","visible","disableBackgroundClose","enableKeyboardAvoid","statusBarTranslucent","props","palette","content","backdrop","showTransition","hideTransition","useModalAnimation","panResponder","useModalPanResponder","translateY","topInset","modalVisible","setModalVisible","showAction","hideAction","width","height","useOnDismiss","createElement","_extends","transparent","hardwareAccelerated","onRequestClose","onShow","supportedOrientations","animationType","onPress","undefined","View","style","absoluteFill","opacity","backgroundColor","onBackgroundLight03","key","enabled","styles","background","behavior","select","ios","default","pointerEvents","keyboardVerticalOffset","transform","panHandlers","isHideGesture","distanceY","velocityY","show","hide","create","onMoveShouldSetPanResponderCapture","_","_ref2","dy","onPanResponderGrant","setOffset","__getValue","onPanResponderMove","_ref3","setValue","onPanResponderRelease","_ref4","vy","current","initialY","get","baseAnimBackground","Value","baseAnimContent","interpolate","inputRange","outputRange","createTransition","toValue","config","duration","useNativeDriver","parallel","timing","start","prevVisible","usePrevProp","OS","prop","prev","curr","flex"],"sources":["index.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from 'react';\nimport {\n Animated,\n Dimensions,\n KeyboardAvoidingView,\n ModalProps,\n PanResponder,\n Platform,\n Pressable,\n Modal as RNModal,\n StyleProp,\n StyleSheet,\n TouchableWithoutFeedback,\n ViewStyle,\n useWindowDimensions,\n} from 'react-native';\n\nimport createStyleSheet from '../../styles/createStyleSheet';\nimport useHeaderStyle from '../../styles/useHeaderStyle';\nimport useUIKitTheme from '../../theme/useUIKitTheme';\n\ntype ModalAnimationType = 'slide' | 'slide-no-gesture' | 'fade';\ntype Props = {\n type?: ModalAnimationType;\n onClose: () => void;\n backgroundStyle?: StyleProp<ViewStyle>;\n disableBackgroundClose?: boolean;\n enableKeyboardAvoid?: boolean;\n} & Omit<ModalProps, 'animationType' | 'onRequestClose'>;\n\n/**\n * Modal Open: Triggered by Modal.props.visible state changed to true\n * - visible true -> modalVisible true -> animation start\n *\n * Modal Close: Triggered by Modal.props.onClose() call\n * - Modal.props.onClose() -> visible false -> animation start -> modalVisible false\n * */\nconst Modal = ({\n children,\n onClose,\n backgroundStyle,\n onDismiss,\n type = 'fade',\n visible = false,\n disableBackgroundClose = false,\n enableKeyboardAvoid = false,\n statusBarTranslucent,\n ...props\n}: Props) => {\n const { palette } = useUIKitTheme();\n const { content, backdrop, showTransition, hideTransition } = useModalAnimation(type);\n const panResponder = useModalPanResponder(type, content.translateY, showTransition, onClose);\n const { topInset } = useHeaderStyle();\n\n const [modalVisible, setModalVisible] = useState(false);\n const showAction = () => setModalVisible(true);\n const hideAction = () => hideTransition(() => setModalVisible(false));\n\n const { width, height } = useWindowDimensions();\n\n useEffect(() => {\n if (visible) showAction();\n else hideAction();\n }, [visible]);\n\n useOnDismiss(modalVisible, onDismiss);\n\n return (\n <RNModal\n statusBarTranslucent={statusBarTranslucent}\n transparent\n hardwareAccelerated\n visible={modalVisible}\n onRequestClose={onClose}\n onShow={() => showTransition()}\n onDismiss={onDismiss}\n supportedOrientations={['portrait', 'portrait-upside-down', 'landscape', 'landscape-left', 'landscape-right']}\n animationType={'none'}\n {...props}\n >\n <TouchableWithoutFeedback onPress={disableBackgroundClose ? undefined : onClose}>\n <Animated.View\n style={[StyleSheet.absoluteFill, { opacity: backdrop.opacity, backgroundColor: palette.onBackgroundLight03 }]}\n />\n </TouchableWithoutFeedback>\n <KeyboardAvoidingView\n // NOTE: This is trick for Android.\n // When orientation is changed on Android, the offset that to avoid soft-keyboard is not updated normally.\n key={`${width}-${height}`}\n enabled={enableKeyboardAvoid}\n style={styles.background}\n behavior={Platform.select({ ios: 'padding', default: 'height' })}\n pointerEvents={'box-none'}\n keyboardVerticalOffset={enableKeyboardAvoid && statusBarTranslucent ? -topInset : 0}\n >\n <Animated.View\n style={[\n styles.background,\n backgroundStyle,\n { opacity: content.opacity, transform: [{ translateY: content.translateY }] },\n ]}\n pointerEvents={'box-none'}\n {...panResponder.panHandlers}\n >\n <Pressable\n // NOTE: https://github.com/facebook/react-native/issues/14295\n // Due to 'Pressable', the width of the children must be explicitly specified as a number.\n >\n {children}\n </Pressable>\n </Animated.View>\n </KeyboardAvoidingView>\n </RNModal>\n );\n};\n\nconst isHideGesture = (distanceY: number, velocityY: number) => {\n return distanceY > 125 || (distanceY > 0 && velocityY > 0.1);\n};\nconst useModalPanResponder = (\n type: ModalAnimationType,\n translateY: Animated.Value,\n show: () => void,\n hide: () => void,\n) => {\n if (type === 'fade' || type === 'slide-no-gesture') return { panHandlers: {} };\n return React.useRef(\n PanResponder.create({\n onMoveShouldSetPanResponderCapture: (_, { dy }) => dy > 8,\n // @ts-ignore\n onPanResponderGrant: () => translateY.setOffset(translateY.__getValue()),\n onPanResponderMove: (_, { dy }) => dy >= 0 && translateY.setValue(dy), // Animated.event([null, { dy: translateY }], { useNativeDriver: false }),\n onPanResponderRelease: (_, { dy, vy }) => {\n if (isHideGesture(dy, vy)) hide();\n else show();\n },\n }),\n ).current;\n};\n\nconst useModalAnimation = (type: ModalAnimationType) => {\n const initialY = type === 'fade' ? 0 : Dimensions.get('window').height;\n const baseAnimBackground = useRef(new Animated.Value(0)).current;\n const baseAnimContent = useRef(new Animated.Value(initialY)).current;\n\n const content = {\n opacity: baseAnimBackground.interpolate({\n inputRange: [0, 1],\n outputRange: [type === 'fade' ? 0 : 1, 1],\n }),\n translateY: baseAnimContent,\n };\n const backdrop = {\n opacity: baseAnimBackground.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n }),\n };\n const createTransition = (toValue: 0 | 1) => {\n const config = { duration: 250, useNativeDriver: false };\n return Animated.parallel([\n Animated.timing(baseAnimBackground, { toValue, ...config }),\n Animated.timing(baseAnimContent, { toValue: toValue === 0 ? initialY : 0, ...config }),\n ]).start;\n };\n return {\n content,\n backdrop,\n showTransition: createTransition(1),\n hideTransition: createTransition(0),\n };\n};\n\n// NOTE: onDismiss is supports iOS only\nconst useOnDismiss = (visible: boolean, onDismiss?: () => void) => {\n const prevVisible = usePrevProp(visible);\n useEffect(() => {\n if (Platform.OS === 'ios') return;\n if (prevVisible && !visible) onDismiss?.();\n }, [prevVisible, visible]);\n};\n\nconst usePrevProp = <T,>(prop: T) => {\n const prev = useRef(prop);\n const curr = useRef(prop);\n useEffect(() => {\n prev.current = curr.current;\n curr.current = prop;\n });\n return prev.current;\n};\n\nconst styles = createStyleSheet({\n background: { flex: 1 },\n});\n\nexport default Modal;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAC1D,SACEC,QAAQ,EACRC,UAAU,EACVC,oBAAoB,EAEpBC,YAAY,EACZC,QAAQ,EACRC,SAAS,EACTC,KAAK,IAAIC,OAAO,EAEhBC,UAAU,EACVC,wBAAwB,EAExBC,mBAAmB,QACd,cAAc;AAErB,OAAOC,gBAAgB,MAAM,+BAA+B;AAC5D,OAAOC,cAAc,MAAM,6BAA6B;AACxD,OAAOC,aAAa,MAAM,2BAA2B;AAWrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMP,KAAK,GAAGQ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ACV,CAAC;EACD,OAAO;IACL/E,OAAO;IACPC,QAAQ;IACRC,cAAc,EAAEsE,gBAAgB,CAAC,CAAC,CAAC;IACnCrE,cAAc,EAAEqE,gBAAgB,CAAC,CAAC;EACpC,CAAC;AACH,CAAC;;AAED;AACA,MAAMzD,YAAY,GAAGA,CAACrB,OAAgB,EAAEF,SAAsB,KAAK;EACjE,MAAMwF,WAAW,GAAGC,WAAW,CAACvF,OAAO,CAAC;EACxCvB,SAAS,CAAC,MAAM;IACd,IAAIO,QAAQ,CAACwG,EAAE,KAAK,KAAK,EAAE;IAC3B,IAAIF,WAAW,IAAI,CAACtF,OAAO,EAAEF,SAAS,aAATA,SAAS,uBAATA,SAAS,EAAI;EAC5C,CAAC,EAAE,CAACwF,WAAW,EAAEtF,OAAO,CAAC,CAAC;AAC5B,CAAC;AAED,MAAMuF,WAAW,GAAQE,IAAO,IAAK;EACnC,MAAMC,IAAI,GAAGhH,MAAM,CAAC+G,IAAI,CAAC;EACzB,MAAME,IAAI,GAAGjH,MAAM,CAAC+G,IAAI,CAAC;EACzBhH,SAAS,CAAC,MAAM;IACdiH,IAAI,CAACrB,OAAO,GAAGsB,IAAI,CAACtB,OAAO;IAC3BsB,IAAI,CAACtB,OAAO,GAAGoB,IAAI;EACrB,CAAC,CAAC;EACF,OAAOC,IAAI,CAACrB,OAAO;AACrB,CAAC;AAED,MAAM7B,MAAM,GAAGjD,gBAAgB,CAAC;EAC9BkD,UAAU,EAAE;IAAEmD,IAAI,EAAE;EAAE;AACxB,CAAC,CAAC;AAEF,eAAe1G,KAAK"}
|
|
1
|
+
{"version":3,"names":["React","useEffect","useRef","useState","Animated","Dimensions","KeyboardAvoidingView","PanResponder","Platform","Pressable","Modal","RNModal","StyleSheet","TouchableWithoutFeedback","useWindowDimensions","createStyleSheet","useHeaderStyle","useUIKitTheme","_ref","children","onClose","backgroundStyle","onDismiss","type","visible","disableBackgroundClose","enableKeyboardAvoid","statusBarTranslucent","props","palette","content","backdrop","showTransition","hideTransition","useModalAnimation","panResponder","useModalPanResponder","translateY","topInset","modalVisible","setModalVisible","showAction","hideAction","width","height","useOnDismiss","createElement","_extends","transparent","hardwareAccelerated","onRequestClose","onShow","supportedOrientations","animationType","onPress","undefined","View","style","absoluteFill","opacity","backgroundColor","onBackgroundLight03","key","OS","enabled","styles","background","behavior","select","ios","default","pointerEvents","keyboardVerticalOffset","transform","panHandlers","isHideGesture","distanceY","velocityY","show","hide","create","onMoveShouldSetPanResponderCapture","_","_ref2","dy","onPanResponderGrant","setOffset","__getValue","onPanResponderMove","_ref3","setValue","onPanResponderRelease","_ref4","vy","current","initialY","get","baseAnimBackground","Value","baseAnimContent","interpolate","inputRange","outputRange","createTransition","toValue","config","duration","useNativeDriver","parallel","timing","start","prevVisible","usePrevProp","prop","prev","curr","flex"],"sources":["index.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from 'react';\nimport {\n Animated,\n Dimensions,\n KeyboardAvoidingView,\n ModalProps,\n PanResponder,\n Platform,\n Pressable,\n Modal as RNModal,\n StyleProp,\n StyleSheet,\n TouchableWithoutFeedback,\n ViewStyle,\n useWindowDimensions,\n} from 'react-native';\n\nimport createStyleSheet from '../../styles/createStyleSheet';\nimport useHeaderStyle from '../../styles/useHeaderStyle';\nimport useUIKitTheme from '../../theme/useUIKitTheme';\n\ntype ModalAnimationType = 'slide' | 'slide-no-gesture' | 'fade';\ntype Props = {\n type?: ModalAnimationType;\n onClose: () => void;\n backgroundStyle?: StyleProp<ViewStyle>;\n disableBackgroundClose?: boolean;\n enableKeyboardAvoid?: boolean;\n} & Omit<ModalProps, 'animationType' | 'onRequestClose'>;\n\n/**\n * Modal Open: Triggered by Modal.props.visible state changed to true\n * - visible true -> modalVisible true -> animation start\n *\n * Modal Close: Triggered by Modal.props.onClose() call\n * - Modal.props.onClose() -> visible false -> animation start -> modalVisible false\n * */\nconst Modal = ({\n children,\n onClose,\n backgroundStyle,\n onDismiss,\n type = 'fade',\n visible = false,\n disableBackgroundClose = false,\n enableKeyboardAvoid = false,\n statusBarTranslucent,\n ...props\n}: Props) => {\n const { palette } = useUIKitTheme();\n const { content, backdrop, showTransition, hideTransition } = useModalAnimation(type);\n const panResponder = useModalPanResponder(type, content.translateY, showTransition, onClose);\n const { topInset } = useHeaderStyle();\n\n const [modalVisible, setModalVisible] = useState(false);\n const showAction = () => setModalVisible(true);\n const hideAction = () => hideTransition(() => setModalVisible(false));\n\n const { width, height } = useWindowDimensions();\n\n useEffect(() => {\n if (visible) showAction();\n else hideAction();\n }, [visible]);\n\n useOnDismiss(modalVisible, onDismiss);\n\n return (\n <RNModal\n statusBarTranslucent={statusBarTranslucent}\n transparent\n hardwareAccelerated\n visible={modalVisible}\n onRequestClose={onClose}\n onShow={() => showTransition()}\n onDismiss={onDismiss}\n supportedOrientations={['portrait', 'portrait-upside-down', 'landscape', 'landscape-left', 'landscape-right']}\n animationType={'none'}\n {...props}\n >\n <TouchableWithoutFeedback onPress={disableBackgroundClose ? undefined : onClose}>\n <Animated.View\n style={[StyleSheet.absoluteFill, { opacity: backdrop.opacity, backgroundColor: palette.onBackgroundLight03 }]}\n />\n </TouchableWithoutFeedback>\n <KeyboardAvoidingView\n // NOTE: This is trick for Android.\n // When orientation is changed on Android, the offset that to avoid soft-keyboard is not updated normally.\n key={Platform.OS === 'android' && enableKeyboardAvoid ? `${width}-${height}` : undefined}\n enabled={enableKeyboardAvoid}\n style={styles.background}\n behavior={Platform.select({ ios: 'padding', default: 'height' })}\n pointerEvents={'box-none'}\n keyboardVerticalOffset={enableKeyboardAvoid && statusBarTranslucent ? -topInset : 0}\n >\n <Animated.View\n style={[\n styles.background,\n backgroundStyle,\n { opacity: content.opacity, transform: [{ translateY: content.translateY }] },\n ]}\n pointerEvents={'box-none'}\n {...panResponder.panHandlers}\n >\n <Pressable\n // NOTE: https://github.com/facebook/react-native/issues/14295\n // Due to 'Pressable', the width of the children must be explicitly specified as a number.\n >\n {children}\n </Pressable>\n </Animated.View>\n </KeyboardAvoidingView>\n </RNModal>\n );\n};\n\nconst isHideGesture = (distanceY: number, velocityY: number) => {\n return distanceY > 125 || (distanceY > 0 && velocityY > 0.1);\n};\nconst useModalPanResponder = (\n type: ModalAnimationType,\n translateY: Animated.Value,\n show: () => void,\n hide: () => void,\n) => {\n if (type === 'fade' || type === 'slide-no-gesture') return { panHandlers: {} };\n return React.useRef(\n PanResponder.create({\n onMoveShouldSetPanResponderCapture: (_, { dy }) => dy > 8,\n // @ts-ignore\n onPanResponderGrant: () => translateY.setOffset(translateY.__getValue()),\n onPanResponderMove: (_, { dy }) => dy >= 0 && translateY.setValue(dy), // Animated.event([null, { dy: translateY }], { useNativeDriver: false }),\n onPanResponderRelease: (_, { dy, vy }) => {\n if (isHideGesture(dy, vy)) hide();\n else show();\n },\n }),\n ).current;\n};\n\nconst useModalAnimation = (type: ModalAnimationType) => {\n const initialY = type === 'fade' ? 0 : Dimensions.get('window').height;\n const baseAnimBackground = useRef(new Animated.Value(0)).current;\n const baseAnimContent = useRef(new Animated.Value(initialY)).current;\n\n const content = {\n opacity: baseAnimBackground.interpolate({\n inputRange: [0, 1],\n outputRange: [type === 'fade' ? 0 : 1, 1],\n }),\n translateY: baseAnimContent,\n };\n const backdrop = {\n opacity: baseAnimBackground.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n }),\n };\n const createTransition = (toValue: 0 | 1) => {\n const config = { duration: 250, useNativeDriver: false };\n return Animated.parallel([\n Animated.timing(baseAnimBackground, { toValue, ...config }),\n Animated.timing(baseAnimContent, { toValue: toValue === 0 ? initialY : 0, ...config }),\n ]).start;\n };\n return {\n content,\n backdrop,\n showTransition: createTransition(1),\n hideTransition: createTransition(0),\n };\n};\n\n// NOTE: onDismiss is supports iOS only\nconst useOnDismiss = (visible: boolean, onDismiss?: () => void) => {\n const prevVisible = usePrevProp(visible);\n useEffect(() => {\n if (Platform.OS === 'ios') return;\n if (prevVisible && !visible) onDismiss?.();\n }, [prevVisible, visible]);\n};\n\nconst usePrevProp = <T,>(prop: T) => {\n const prev = useRef(prop);\n const curr = useRef(prop);\n useEffect(() => {\n prev.current = curr.current;\n curr.current = prop;\n });\n return prev.current;\n};\n\nconst styles = createStyleSheet({\n background: { flex: 1 },\n});\n\nexport default Modal;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAC1D,SACEC,QAAQ,EACRC,UAAU,EACVC,oBAAoB,EAEpBC,YAAY,EACZC,QAAQ,EACRC,SAAS,EACTC,KAAK,IAAIC,OAAO,EAEhBC,UAAU,EACVC,wBAAwB,EAExBC,mBAAmB,QACd,cAAc;AAErB,OAAOC,gBAAgB,MAAM,+BAA+B;AAC5D,OAAOC,cAAc,MAAM,6BAA6B;AACxD,OAAOC,aAAa,MAAM,2BAA2B;AAWrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMP,KAAK,GAAGQ,IAAA,IAWD;EAAA,IAXE;IACbC,QAAQ;IACRC,OAAO;IACPC,eAAe;IACfC,SAAS;IACTC,IAAI,GAAG,MAAM;IACbC,OAAO,GAAG,KAAK;IACfC,sBAAsB,GAAG,KAAK;IAC9BC,mBAAmB,GAAG,KAAK;IAC3BC,oBAAoB;IACpB,GAAGC;EACE,CAAC,GAAAV,IAAA;EACN,MAAM;IAAEW;EAAQ,CAAC,GAAGZ,aAAa,EAAE;EACnC,MAAM;IAAEa,OAAO;IAAEC,QAAQ;IAAEC,cAAc;IAAEC;EAAe,CAAC,GAAGC,iBAAiB,CAACX,IAAI,CAAC;EACrF,MAAMY,YAAY,GAAGC,oBAAoB,CAACb,IAAI,EAAEO,OAAO,CAACO,UAAU,EAAEL,cAAc,EAAEZ,OAAO,CAAC;EAC5F,MAAM;IAAEkB;EAAS,CAAC,GAAGtB,cAAc,EAAE;EAErC,MAAM,CAACuB,YAAY,EAAEC,eAAe,CAAC,GAAGrC,QAAQ,CAAC,KAAK,CAAC;EACvD,MAAMsC,UAAU,GAAGA,CAAA,KAA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G,IAAI,CAAC;EACzB,MAAME,IAAI,GAAGjH,MAAM,CAAC+G,IAAI,CAAC;EACzBhH,SAAS,CAAC,MAAM;IACdiH,IAAI,CAACpB,OAAO,GAAGqB,IAAI,CAACrB,OAAO;IAC3BqB,IAAI,CAACrB,OAAO,GAAGmB,IAAI;EACrB,CAAC,CAAC;EACF,OAAOC,IAAI,CAACpB,OAAO;AACrB,CAAC;AAED,MAAM7B,MAAM,GAAGlD,gBAAgB,CAAC;EAC9BmD,UAAU,EAAE;IAAEkD,IAAI,EAAE;EAAE;AACxB,CAAC,CAAC;AAEF,eAAe1G,KAAK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useState","Pressable","TouchableOpacity","isFunction","DEFAULT_LONG_PRESS_DELAY","PressBox","props","activeOpacity","createElement","PressBoxWithTouchableOpacity","PressBoxWithPressable","_ref","children","_extends","disabled","onPress","onLongPress","delayLongPress","state","_ref2","style","pressed","setPressed","onPressIn","onPressOut"],"sources":["index.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useState } from 'react';\nimport type { GestureResponderEvent, StyleProp, ViewProps, ViewStyle } from 'react-native';\nimport { Pressable, TouchableOpacity } from 'react-native';\n\nimport { isFunction } from '@sendbird/uikit-utils';\n\ntype PressBoxStateParams = {\n pressed: boolean;\n};\n\ntype Props = {\n onPress?: (event: GestureResponderEvent) => void;\n onLongPress?: (event: GestureResponderEvent) => void;\n delayLongPress?: number;\n activeOpacity?: number;\n style?: StyleProp<ViewStyle> | ((state: PressBoxStateParams) => StyleProp<ViewStyle>);\n hitSlop?: ViewProps['hitSlop'];\n children?: React.ReactNode | ((params: PressBoxStateParams) => React.ReactNode);\n};\n\nexport const DEFAULT_LONG_PRESS_DELAY = 350;\n\nconst PressBox = (props: Props) => {\n if (props.activeOpacity && props.activeOpacity < 1) return <PressBoxWithTouchableOpacity {...props} />;\n return <PressBoxWithPressable {...props} />;\n};\n\nconst PressBoxWithPressable = ({ children, ...props }: Props) => {\n return (\n <Pressable disabled={!props.onPress && !props.onLongPress} delayLongPress={DEFAULT_LONG_PRESS_DELAY} {...props}>\n {(state) => (isFunction(children) ? children(state) : children)}\n </Pressable>\n );\n};\n\nconst PressBoxWithTouchableOpacity = ({ children, style, ...props }: Props) => {\n const [pressed, setPressed] = useState(false);\n const state: PressBoxStateParams = { pressed };\n return (\n <TouchableOpacity\n disabled={!props.onPress && !props.onLongPress}\n delayLongPress={DEFAULT_LONG_PRESS_DELAY}\n style={isFunction(style) ? style(state) : style}\n onPressIn={() => setPressed(true)}\n onPressOut={() => setPressed(false)}\n {...props}\n >\n {isFunction(children) ? children(state) : children}\n </TouchableOpacity>\n );\n};\n\nexport default PressBox;\n"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,OAAO;AAEhC,SAASC,SAAS,EAAEC,gBAAgB,QAAQ,cAAc;AAE1D,SAASC,UAAU,QAAQ,uBAAuB;
|
|
1
|
+
{"version":3,"names":["React","useState","Pressable","TouchableOpacity","isFunction","DEFAULT_LONG_PRESS_DELAY","PressBox","props","activeOpacity","createElement","PressBoxWithTouchableOpacity","PressBoxWithPressable","_ref","children","_extends","disabled","onPress","onLongPress","delayLongPress","state","_ref2","style","pressed","setPressed","onPressIn","onPressOut"],"sources":["index.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useState } from 'react';\nimport type { GestureResponderEvent, StyleProp, ViewProps, ViewStyle } from 'react-native';\nimport { Pressable, TouchableOpacity } from 'react-native';\n\nimport { isFunction } from '@sendbird/uikit-utils';\n\ntype PressBoxStateParams = {\n pressed: boolean;\n};\n\ntype Props = {\n disabled?: boolean;\n onPress?: (event: GestureResponderEvent) => void;\n onLongPress?: (event: GestureResponderEvent) => void;\n delayLongPress?: number;\n activeOpacity?: number;\n style?: StyleProp<ViewStyle> | ((state: PressBoxStateParams) => StyleProp<ViewStyle>);\n hitSlop?: ViewProps['hitSlop'];\n children?: React.ReactNode | ((params: PressBoxStateParams) => React.ReactNode);\n};\n\nexport const DEFAULT_LONG_PRESS_DELAY = 350;\n\nconst PressBox = (props: Props) => {\n if (props.activeOpacity && props.activeOpacity < 1) return <PressBoxWithTouchableOpacity {...props} />;\n return <PressBoxWithPressable {...props} />;\n};\n\nconst PressBoxWithPressable = ({ children, ...props }: Props) => {\n return (\n <Pressable disabled={!props.onPress && !props.onLongPress} delayLongPress={DEFAULT_LONG_PRESS_DELAY} {...props}>\n {(state) => (isFunction(children) ? children(state) : children)}\n </Pressable>\n );\n};\n\nconst PressBoxWithTouchableOpacity = ({ children, style, ...props }: Props) => {\n const [pressed, setPressed] = useState(false);\n const state: PressBoxStateParams = { pressed };\n return (\n <TouchableOpacity\n disabled={!props.onPress && !props.onLongPress}\n delayLongPress={DEFAULT_LONG_PRESS_DELAY}\n style={isFunction(style) ? style(state) : style}\n onPressIn={() => setPressed(true)}\n onPressOut={() => setPressed(false)}\n {...props}\n >\n {isFunction(children) ? children(state) : children}\n </TouchableOpacity>\n );\n};\n\nexport default PressBox;\n"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,OAAO;AAEhC,SAASC,SAAS,EAAEC,gBAAgB,QAAQ,cAAc;AAE1D,SAASC,UAAU,QAAQ,uBAAuB;AAiBlD,OAAO,MAAMC,wBAAwB,GAAG,GAAG;AAE3C,MAAMC,QAAQ,GAAIC,KAAY,IAAK;EACjC,IAAIA,KAAK,CAACC,aAAa,IAAID,KAAK,CAACC,aAAa,GAAG,CAAC,EAAE,oBAAOR,KAAA,CAAAS,aAAA,CAACC,4BAA4B,EAAKH,KAAK,CAAI;EACtG,oBAAOP,KAAA,CAAAS,aAAA,CAACE,qBAAqB,EAAKJ,KAAK,CAAI;AAC7C,CAAC;AAED,MAAMI,qBAAqB,GAAGC,IAAA,IAAmC;EAAA,IAAlC;IAAEC,QAAQ;IAAE,GAAGN;EAAa,CAAC,GAAAK,IAAA;EAC1D,oBACEZ,KAAA,CAAAS,aAAA,CAACP,SAAS,EAAAY,QAAA;IAACC,QAAQ,EAAE,CAACR,KAAK,CAACS,OAAO,IAAI,CAACT,KAAK,CAACU,WAAY;IAACC,cAAc,EAAEb;EAAyB,GAAKE,KAAK,GAC1GY,KAAK,IAAMf,UAAU,CAACS,QAAQ,CAAC,GAAGA,QAAQ,CAACM,KAAK,CAAC,GAAGN,QAAS,CACrD;AAEhB,CAAC;AAED,MAAMH,4BAA4B,GAAGU,KAAA,IAA0C;EAAA,IAAzC;IAAEP,QAAQ;IAAEQ,KAAK;IAAE,GAAGd;EAAa,CAAC,GAAAa,KAAA;EACxE,MAAM,CAACE,OAAO,EAAEC,UAAU,CAAC,GAAGtB,QAAQ,CAAC,KAAK,CAAC;EAC7C,MAAMkB,KAA0B,GAAG;IAAEG;EAAQ,CAAC;EAC9C,oBACEtB,KAAA,CAAAS,aAAA,CAACN,gBAAgB,EAAAW,QAAA;IACfC,QAAQ,EAAE,CAACR,KAAK,CAACS,OAAO,IAAI,CAACT,KAAK,CAACU,WAAY;IAC/CC,cAAc,EAAEb,wBAAyB;IACzCgB,KAAK,EAAEjB,UAAU,CAACiB,KAAK,CAAC,GAAGA,KAAK,CAACF,KAAK,CAAC,GAAGE,KAAM;IAChDG,SAAS,EAAEA,CAAA,KAAMD,UAAU,CAAC,IAAI,CAAE;IAClCE,UAAU,EAAEA,CAAA,KAAMF,UAAU,CAAC,KAAK;EAAE,GAChChB,KAAK,GAERH,UAAU,CAACS,QAAQ,CAAC,GAAGA,QAAQ,CAACM,KAAK,CAAC,GAAGN,QAAQ,CACjC;AAEvB,CAAC;AAED,eAAeP,QAAQ"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import React, { useEffect, useRef } from 'react';
|
|
2
|
+
import { Animated, Easing, StyleSheet } from 'react-native';
|
|
3
|
+
import { NOOP } from '@sendbird/uikit-utils';
|
|
4
|
+
import useUIKitTheme from '../../theme/useUIKitTheme';
|
|
5
|
+
import Box from '../Box';
|
|
6
|
+
const ProgressBar = _ref => {
|
|
7
|
+
let {
|
|
8
|
+
current = 100,
|
|
9
|
+
total = 100,
|
|
10
|
+
trackColor,
|
|
11
|
+
barColor,
|
|
12
|
+
overlay,
|
|
13
|
+
style
|
|
14
|
+
} = _ref;
|
|
15
|
+
const {
|
|
16
|
+
colors
|
|
17
|
+
} = useUIKitTheme();
|
|
18
|
+
const uiColors = {
|
|
19
|
+
track: trackColor ?? colors.primary,
|
|
20
|
+
bar: barColor ?? colors.onBackground01
|
|
21
|
+
};
|
|
22
|
+
const progress = useRef(new Animated.Value(0)).current;
|
|
23
|
+
const percent = current / total;
|
|
24
|
+
const stopped = percent === 0;
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
if (!Number.isNaN(percent)) {
|
|
27
|
+
const animation = Animated.timing(progress, {
|
|
28
|
+
toValue: stopped ? 0 : percent,
|
|
29
|
+
duration: stopped ? 0 : 100,
|
|
30
|
+
useNativeDriver: false,
|
|
31
|
+
easing: Easing.linear
|
|
32
|
+
});
|
|
33
|
+
animation.start();
|
|
34
|
+
return () => animation.stop();
|
|
35
|
+
}
|
|
36
|
+
return NOOP;
|
|
37
|
+
}, [percent]);
|
|
38
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
39
|
+
height: 36,
|
|
40
|
+
flexDirection: 'row',
|
|
41
|
+
backgroundColor: uiColors.track,
|
|
42
|
+
alignItems: 'center',
|
|
43
|
+
overflow: 'hidden',
|
|
44
|
+
style: style
|
|
45
|
+
}, /*#__PURE__*/React.createElement(Animated.View, {
|
|
46
|
+
style: {
|
|
47
|
+
position: 'absolute',
|
|
48
|
+
width: progress.interpolate({
|
|
49
|
+
inputRange: [0, 1],
|
|
50
|
+
outputRange: ['0%', '100%'],
|
|
51
|
+
extrapolate: 'clamp'
|
|
52
|
+
}),
|
|
53
|
+
height: '100%',
|
|
54
|
+
opacity: 0.38,
|
|
55
|
+
backgroundColor: uiColors.bar
|
|
56
|
+
}
|
|
57
|
+
}), /*#__PURE__*/React.createElement(Box, {
|
|
58
|
+
style: StyleSheet.absoluteFill
|
|
59
|
+
}, overlay));
|
|
60
|
+
};
|
|
61
|
+
export default ProgressBar;
|
|
62
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useEffect","useRef","Animated","Easing","StyleSheet","NOOP","useUIKitTheme","Box","ProgressBar","_ref","current","total","trackColor","barColor","overlay","style","colors","uiColors","track","primary","bar","onBackground01","progress","Value","percent","stopped","Number","isNaN","animation","timing","toValue","duration","useNativeDriver","easing","linear","start","stop","createElement","height","flexDirection","backgroundColor","alignItems","overflow","View","position","width","interpolate","inputRange","outputRange","extrapolate","opacity","absoluteFill"],"sources":["index.tsx"],"sourcesContent":["import React, { ReactNode, useEffect, useRef } from 'react';\nimport { Animated, Easing, StyleSheet, ViewStyle } from 'react-native';\n\nimport { NOOP } from '@sendbird/uikit-utils';\n\nimport useUIKitTheme from '../../theme/useUIKitTheme';\nimport Box from '../Box';\n\ntype Props = {\n current: number;\n total: number;\n trackColor?: string;\n barColor?: string;\n overlay?: ReactNode | undefined;\n style?: ViewStyle;\n};\nconst ProgressBar = ({ current = 100, total = 100, trackColor, barColor, overlay, style }: Props) => {\n const { colors } = useUIKitTheme();\n\n const uiColors = {\n track: trackColor ?? colors.primary,\n bar: barColor ?? colors.onBackground01,\n };\n\n const progress = useRef(new Animated.Value(0)).current;\n const percent = current / total;\n const stopped = percent === 0;\n\n useEffect(() => {\n if (!Number.isNaN(percent)) {\n const animation = Animated.timing(progress, {\n toValue: stopped ? 0 : percent,\n duration: stopped ? 0 : 100,\n useNativeDriver: false,\n easing: Easing.linear,\n });\n\n animation.start();\n return () => animation.stop();\n }\n\n return NOOP;\n }, [percent]);\n\n return (\n <Box\n height={36}\n flexDirection={'row'}\n backgroundColor={uiColors.track}\n alignItems={'center'}\n overflow={'hidden'}\n style={style}\n >\n <Animated.View\n style={{\n position: 'absolute',\n width: progress.interpolate({\n inputRange: [0, 1],\n outputRange: ['0%', '100%'],\n extrapolate: 'clamp',\n }),\n height: '100%',\n opacity: 0.38,\n backgroundColor: uiColors.bar,\n }}\n />\n <Box style={StyleSheet.absoluteFill}>{overlay}</Box>\n </Box>\n );\n};\n\nexport default ProgressBar;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAeC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAC3D,SAASC,QAAQ,EAAEC,MAAM,EAAEC,UAAU,QAAmB,cAAc;AAEtE,SAASC,IAAI,QAAQ,uBAAuB;AAE5C,OAAOC,aAAa,MAAM,2BAA2B;AACrD,OAAOC,GAAG,MAAM,QAAQ;AAUxB,MAAMC,WAAW,GAAGC,IAAA,IAAiF;EAAA,IAAhF;IAAEC,OAAO,GAAG,GAAG;IAAEC,KAAK,GAAG,GAAG;IAAEC,UAAU;IAAEC,QAAQ;IAAEC,OAAO;IAAEC;EAAa,CAAC,GAAAN,IAAA;EAC9F,MAAM;IAAEO;EAAO,CAAC,GAAGV,aAAa,EAAE;EAElC,MAAMW,QAAQ,GAAG;IACfC,KAAK,EAAEN,UAAU,IAAII,MAAM,CAACG,OAAO;IACnCC,GAAG,EAAEP,QAAQ,IAAIG,MAAM,CAACK;EAC1B,CAAC;EAED,MAAMC,QAAQ,GAAGrB,MAAM,CAAC,IAAIC,QAAQ,CAACqB,KAAK,CAAC,CAAC,CAAC,CAAC,CAACb,OAAO;EACtD,MAAMc,OAAO,GAAGd,OAAO,GAAGC,KAAK;EAC/B,MAAMc,OAAO,GAAGD,OAAO,KAAK,CAAC;EAE7BxB,SAAS,CAAC,MAAM;IACd,IAAI,CAAC0B,MAAM,CAACC,KAAK,CAACH,OAAO,CAAC,EAAE;MAC1B,MAAMI,SAAS,GAAG1B,QAAQ,CAAC2B,MAAM,CAACP,QAAQ,EAAE;QAC1CQ,OAAO,EAAEL,OAAO,GAAG,CAAC,GAAGD,OAAO;QAC9BO,QAAQ,EAAEN,OAAO,GAAG,CAAC,GAAG,GAAG;QAC3BO,eAAe,EAAE,KAAK;QACtBC,MAAM,EAAE9B,MAAM,CAAC+B;MACjB,CAAC,CAAC;MAEFN,SAAS,CAACO,KAAK,EAAE;MACjB,OAAO,MAAMP,SAAS,CAACQ,IAAI,EAAE;IAC/B;IAEA,OAAO/B,IAAI;EACb,CAAC,EAAE,CAACmB,OAAO,CAAC,CAAC;EAEb,oBACEzB,KAAA,CAAAsC,aAAA,CAAC9B,GAAG;IACF+B,MAAM,EAAE,EAAG;IACXC,aAAa,EAAE,KAAM;IACrBC,eAAe,EAAEvB,QAAQ,CAACC,KAAM;IAChCuB,UAAU,EAAE,QAAS;IACrBC,QAAQ,EAAE,QAAS;IACnB3B,KAAK,EAAEA;EAAM,gBAEbhB,KAAA,CAAAsC,aAAA,CAACnC,QAAQ,CAACyC,IAAI;IACZ5B,KAAK,EAAE;MACL6B,QAAQ,EAAE,UAAU;MACpBC,KAAK,EAAEvB,QAAQ,CAACwB,WAAW,CAAC;QAC1BC,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;QAClBC,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC;QAC3BC,WAAW,EAAE;MACf,CAAC,CAAC;MACFX,MAAM,EAAE,MAAM;MACdY,OAAO,EAAE,IAAI;MACbV,eAAe,EAAEvB,QAAQ,CAACG;IAC5B;EAAE,EACF,eACFrB,KAAA,CAAAsC,aAAA,CAAC9B,GAAG;IAACQ,KAAK,EAAEX,UAAU,CAAC+C;EAAa,GAAErC,OAAO,CAAO,CAChD;AAEV,CAAC;AAED,eAAeN,WAAW"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","replaceWithRegex","Text","RegexText","_ref","children","patterns","props","length","createElement","Fragment","matchedTexts","forEach","_ref2","patterIndex","regex","replacer","matchedTextsTemp","concat","offset","text","index","params","parentProps","keyPrefix","String","splice"],"sources":["index.tsx"],"sourcesContent":["import React from 'react';\n\nimport { replaceWithRegex } from '@sendbird/uikit-utils';\n\nimport Text, { TextProps } from '../Text';\n\nexport interface RegexTextPattern {\n regex: RegExp;\n replacer(params: {\n match: string;\n groups: string[];\n index: number;\n keyPrefix: string;\n parentProps?: TextProps;\n }): string |
|
|
1
|
+
{"version":3,"names":["React","replaceWithRegex","Text","RegexText","_ref","children","patterns","props","length","createElement","Fragment","matchedTexts","forEach","_ref2","patterIndex","regex","replacer","matchedTextsTemp","concat","offset","text","index","params","parentProps","keyPrefix","String","splice"],"sources":["index.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\n\nimport { replaceWithRegex } from '@sendbird/uikit-utils';\n\nimport Text, { TextProps } from '../Text';\n\nexport interface RegexTextPattern {\n regex: RegExp;\n replacer(params: {\n match: string;\n groups: string[];\n index: number;\n keyPrefix: string;\n parentProps?: TextProps;\n }): string | ReactNode;\n}\n\ntype Props = { patterns: RegexTextPattern[] } & TextProps;\n\nconst RegexText = ({ children, patterns, ...props }: Props) => {\n if (patterns.length === 0 || typeof children !== 'string') return <>{children}</>;\n\n const matchedTexts: Array<string | ReactNode> = [children];\n\n patterns.forEach(({ regex, replacer }, patterIndex) => {\n const matchedTextsTemp = matchedTexts.concat();\n let offset = 0;\n matchedTextsTemp.forEach((text, index) => {\n if (typeof text === 'string' && text) {\n const children = replaceWithRegex(\n text,\n regex,\n (params) => replacer({ ...params, parentProps: props, keyPrefix: index + params.keyPrefix }),\n String(patterIndex),\n );\n\n if (children.length > 1) {\n matchedTexts.splice(index + offset, 1, ...children);\n offset += children.length - 1;\n }\n }\n });\n });\n\n return <Text {...props}>{matchedTexts}</Text>;\n};\n\nexport default RegexText;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAqB,OAAO;AAExC,SAASC,gBAAgB,QAAQ,uBAAuB;AAExD,OAAOC,IAAI,MAAqB,SAAS;AAezC,MAAMC,SAAS,GAAGC,IAAA,IAA6C;EAAA,IAA5C;IAAEC,QAAQ;IAAEC,QAAQ;IAAE,GAAGC;EAAa,CAAC,GAAAH,IAAA;EACxD,IAAIE,QAAQ,CAACE,MAAM,KAAK,CAAC,IAAI,OAAOH,QAAQ,KAAK,QAAQ,EAAE,oBAAOL,KAAA,CAAAS,aAAA,CAAAT,KAAA,CAAAU,QAAA,QAAGL,QAAQ,CAAI;EAEjF,MAAMM,YAAuC,GAAG,CAACN,QAAQ,CAAC;EAE1DC,QAAQ,CAACM,OAAO,CAAC,CAAAC,KAAA,EAAsBC,WAAW,KAAK;IAAA,IAArC;MAAEC,KAAK;MAAEC;IAAS,CAAC,GAAAH,KAAA;IACnC,MAAMI,gBAAgB,GAAGN,YAAY,CAACO,MAAM,EAAE;IAC9C,IAAIC,MAAM,GAAG,CAAC;IACdF,gBAAgB,CAACL,OAAO,CAAC,CAACQ,IAAI,EAAEC,KAAK,KAAK;MACxC,IAAI,OAAOD,IAAI,KAAK,QAAQ,IAAIA,IAAI,EAAE;QACpC,MAAMf,QAAQ,GAAGJ,gBAAgB,CAC/BmB,IAAI,EACJL,KAAK,EACJO,MAAM,IAAKN,QAAQ,CAAC;UAAE,GAAGM,MAAM;UAAEC,WAAW,EAAEhB,KAAK;UAAEiB,SAAS,EAAEH,KAAK,GAAGC,MAAM,CAACE;QAAU,CAAC,CAAC,EAC5FC,MAAM,CAACX,WAAW,CAAC,CACpB;QAED,IAAIT,QAAQ,CAACG,MAAM,GAAG,CAAC,EAAE;UACvBG,YAAY,CAACe,MAAM,CAACL,KAAK,GAAGF,MAAM,EAAE,CAAC,EAAE,GAAGd,QAAQ,CAAC;UACnDc,MAAM,IAAId,QAAQ,CAACG,MAAM,GAAG,CAAC;QAC/B;MACF;IACF,CAAC,CAAC;EACJ,CAAC,CAAC;EAEF,oBAAOR,KAAA,CAAAS,aAAA,CAACP,IAAI,EAAKK,KAAK,EAAGI,YAAY,CAAQ;AAC/C,CAAC;AAED,eAAeR,SAAS"}
|
package/lib/module/index.js
CHANGED
|
@@ -9,6 +9,7 @@ export { default as Image } from './components/Image';
|
|
|
9
9
|
export { default as ImageWithPlaceholder } from './components/ImageWithPlaceholder';
|
|
10
10
|
export { default as Modal } from './components/Modal';
|
|
11
11
|
export { default as PressBox } from './components/PressBox';
|
|
12
|
+
export { default as ProgressBar } from './components/ProgressBar';
|
|
12
13
|
export { default as RegexText } from './components/RegexText';
|
|
13
14
|
export { default as Switch } from './components/Switch';
|
|
14
15
|
export { default as Text } from './components/Text';
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["default","IconAssets","Box","Divider","Icon","Image","ImageWithPlaceholder","Modal","PressBox","RegexText","Switch","Text","TextInput","VideoThumbnail","ActionMenu","Alert","Avatar","Badge","BottomSheet","Button","ChannelFrozenBanner","DialogProvider","useActionMenu","useAlert","usePrompt","useBottomSheet","Header","LoadingSpinner","MenuBar","GroupChannelMessage","GroupChannelPreview","OpenChannelMessage","OpenChannelPreview","OutlinedButton","Placeholder","ProfileCard","Prompt","Toast","useToast","ToastProvider","createSelectByColorScheme","createScaleFactor","createStyleSheet","createTypography","getDefaultHeaderHeight","HeaderStyleContext","HeaderStyleProvider","useHeaderStyle","createTheme","DarkUIKitTheme","LightUIKitTheme","Palette","UIKitThemeContext","UIKitThemeProvider","useUIKitTheme"],"sources":["index.ts"],"sourcesContent":["/** Assets **/\nexport { default as IconAssets } from './assets/icon';\n\n/** Component **/\nexport { default as Box } from './components/Box';\nexport { default as Divider } from './components/Divider';\nexport { default as Icon } from './components/Icon';\nexport { default as Image } from './components/Image';\nexport { default as ImageWithPlaceholder } from './components/ImageWithPlaceholder';\nexport { default as Modal } from './components/Modal';\nexport { default as PressBox } from './components/PressBox';\nexport { default as RegexText } from './components/RegexText';\nexport type { RegexTextPattern } from './components/RegexText';\nexport { default as Switch } from './components/Switch';\nexport { default as Text } from './components/Text';\nexport { default as TextInput } from './components/TextInput';\nexport { VideoThumbnail } from './components/VideoThumbnail';\n\n/** UI **/\nexport { default as ActionMenu } from './ui/ActionMenu';\nexport { default as Alert } from './ui/Alert';\nexport { default as Avatar } from './ui/Avatar';\nexport { default as Badge } from './ui/Badge';\nexport { default as BottomSheet } from './ui/BottomSheet';\nexport { default as Button } from './ui/Button';\nexport { default as ChannelFrozenBanner } from './ui/ChannelFrozenBanner';\nexport { DialogProvider, useActionMenu, useAlert, usePrompt, useBottomSheet } from './ui/Dialog';\nexport { default as Header } from './ui/Header';\nexport { default as LoadingSpinner } from './ui/LoadingSpinner';\nexport { default as MenuBar } from './ui/MenuBar';\nexport type { MenuBarProps } from './ui/MenuBar';\nexport { default as GroupChannelMessage } from './ui/GroupChannelMessage';\nexport type { GroupChannelMessageProps } from './ui/GroupChannelMessage';\nexport { default as GroupChannelPreview } from './ui/GroupChannelPreview';\n\nexport { default as OpenChannelMessage } from './ui/OpenChannelMessage';\nexport type { OpenChannelMessageProps } from './ui/OpenChannelMessage';\nexport { default as OpenChannelPreview } from './ui/OpenChannelPreview';\nexport { default as OutlinedButton } from './ui/OutlinedButton';\nexport { default as Placeholder } from './ui/Placeholder';\nexport { default as ProfileCard } from './ui/ProfileCard';\nexport { default as Prompt } from './ui/Prompt';\nexport { default as Toast, useToast, ToastProvider } from './ui/Toast';\n\n/** Styles **/\nexport { default as createSelectByColorScheme } from './styles/createSelectByColorScheme';\nexport { default as createScaleFactor } from './styles/createScaleFactor';\nexport { default as createStyleSheet } from './styles/createStyleSheet';\nexport { default as createTypography } from './styles/createTypography';\nexport { default as getDefaultHeaderHeight } from './styles/getDefaultHeaderHeight';\nexport { HeaderStyleContext, HeaderStyleProvider } from './styles/HeaderStyleContext';\nexport { default as useHeaderStyle } from './styles/useHeaderStyle';\n\n/** Theme **/\nexport { default as createTheme } from './theme/createTheme';\nexport { default as DarkUIKitTheme } from './theme/DarkUIKitTheme';\nexport { default as LightUIKitTheme } from './theme/LightUIKitTheme';\nexport { default as Palette } from './theme/Palette';\nexport { default as UIKitThemeContext } from './theme/UIKitThemeContext';\nexport { default as UIKitThemeProvider } from './theme/UIKitThemeProvider';\nexport { default as useUIKitTheme } from './theme/useUIKitTheme';\n\n/** Types **/\nexport type {\n TypoName,\n UIKitTheme,\n UIKitTypography,\n FontAttributes,\n BaseHeaderProps,\n UIKitColorScheme,\n UIKitColors,\n ComponentColorTree,\n UIKitPalette,\n HeaderElement,\n HeaderPartProps,\n ComponentColors,\n Component,\n GetColorTree,\n} from './types';\nexport type { ActionMenuItem } from './ui/ActionMenu';\nexport type { BottomSheetItem } from './ui/BottomSheet';\nexport type { UIKitTypographyOverrides } from './styles/createTypography';\nexport type { HeaderStyleContextType } from './styles/HeaderStyleContext';\n"],"mappings":"AAAA;AACA,SAASA,OAAO,IAAIC,UAAU,QAAQ,eAAe;;AAErD;AACA,SAASD,OAAO,IAAIE,GAAG,QAAQ,kBAAkB;AACjD,SAASF,OAAO,IAAIG,OAAO,QAAQ,sBAAsB;AACzD,SAASH,OAAO,IAAII,IAAI,QAAQ,mBAAmB;AACnD,SAASJ,OAAO,IAAIK,KAAK,QAAQ,oBAAoB;AACrD,SAASL,OAAO,IAAIM,oBAAoB,QAAQ,mCAAmC;AACnF,SAASN,OAAO,IAAIO,KAAK,QAAQ,oBAAoB;AACrD,SAASP,OAAO,IAAIQ,QAAQ,QAAQ,uBAAuB;AAC3D,SAASR,OAAO,IAAIS,SAAS,QAAQ,wBAAwB;AAE7D,
|
|
1
|
+
{"version":3,"names":["default","IconAssets","Box","Divider","Icon","Image","ImageWithPlaceholder","Modal","PressBox","ProgressBar","RegexText","Switch","Text","TextInput","VideoThumbnail","ActionMenu","Alert","Avatar","Badge","BottomSheet","Button","ChannelFrozenBanner","DialogProvider","useActionMenu","useAlert","usePrompt","useBottomSheet","Header","LoadingSpinner","MenuBar","GroupChannelMessage","GroupChannelPreview","OpenChannelMessage","OpenChannelPreview","OutlinedButton","Placeholder","ProfileCard","Prompt","Toast","useToast","ToastProvider","createSelectByColorScheme","createScaleFactor","createStyleSheet","createTypography","getDefaultHeaderHeight","HeaderStyleContext","HeaderStyleProvider","useHeaderStyle","createTheme","DarkUIKitTheme","LightUIKitTheme","Palette","UIKitThemeContext","UIKitThemeProvider","useUIKitTheme"],"sources":["index.ts"],"sourcesContent":["/** Assets **/\nexport { default as IconAssets } from './assets/icon';\n\n/** Component **/\nexport { default as Box } from './components/Box';\nexport { default as Divider } from './components/Divider';\nexport { default as Icon } from './components/Icon';\nexport { default as Image } from './components/Image';\nexport { default as ImageWithPlaceholder } from './components/ImageWithPlaceholder';\nexport { default as Modal } from './components/Modal';\nexport { default as PressBox } from './components/PressBox';\nexport { default as ProgressBar } from './components/ProgressBar';\nexport { default as RegexText } from './components/RegexText';\nexport type { RegexTextPattern } from './components/RegexText';\nexport { default as Switch } from './components/Switch';\nexport { default as Text } from './components/Text';\nexport { default as TextInput } from './components/TextInput';\nexport { VideoThumbnail } from './components/VideoThumbnail';\n\n/** UI **/\nexport { default as ActionMenu } from './ui/ActionMenu';\nexport { default as Alert } from './ui/Alert';\nexport { default as Avatar } from './ui/Avatar';\nexport { default as Badge } from './ui/Badge';\nexport { default as BottomSheet } from './ui/BottomSheet';\nexport { default as Button } from './ui/Button';\nexport { default as ChannelFrozenBanner } from './ui/ChannelFrozenBanner';\nexport { DialogProvider, useActionMenu, useAlert, usePrompt, useBottomSheet } from './ui/Dialog';\nexport { default as Header } from './ui/Header';\nexport { default as LoadingSpinner } from './ui/LoadingSpinner';\nexport { default as MenuBar } from './ui/MenuBar';\nexport type { MenuBarProps } from './ui/MenuBar';\nexport { default as GroupChannelMessage } from './ui/GroupChannelMessage';\nexport type { GroupChannelMessageProps } from './ui/GroupChannelMessage';\nexport { default as GroupChannelPreview } from './ui/GroupChannelPreview';\n\nexport { default as OpenChannelMessage } from './ui/OpenChannelMessage';\nexport type { OpenChannelMessageProps } from './ui/OpenChannelMessage';\nexport { default as OpenChannelPreview } from './ui/OpenChannelPreview';\nexport { default as OutlinedButton } from './ui/OutlinedButton';\nexport { default as Placeholder } from './ui/Placeholder';\nexport { default as ProfileCard } from './ui/ProfileCard';\nexport { default as Prompt } from './ui/Prompt';\nexport { default as Toast, useToast, ToastProvider } from './ui/Toast';\n\n/** Styles **/\nexport { default as createSelectByColorScheme } from './styles/createSelectByColorScheme';\nexport { default as createScaleFactor } from './styles/createScaleFactor';\nexport { default as createStyleSheet } from './styles/createStyleSheet';\nexport { default as createTypography } from './styles/createTypography';\nexport { default as getDefaultHeaderHeight } from './styles/getDefaultHeaderHeight';\nexport { HeaderStyleContext, HeaderStyleProvider } from './styles/HeaderStyleContext';\nexport { default as useHeaderStyle } from './styles/useHeaderStyle';\n\n/** Theme **/\nexport { default as createTheme } from './theme/createTheme';\nexport { default as DarkUIKitTheme } from './theme/DarkUIKitTheme';\nexport { default as LightUIKitTheme } from './theme/LightUIKitTheme';\nexport { default as Palette } from './theme/Palette';\nexport { default as UIKitThemeContext } from './theme/UIKitThemeContext';\nexport { default as UIKitThemeProvider } from './theme/UIKitThemeProvider';\nexport { default as useUIKitTheme } from './theme/useUIKitTheme';\n\n/** Types **/\nexport type {\n TypoName,\n UIKitTheme,\n UIKitTypography,\n FontAttributes,\n BaseHeaderProps,\n UIKitColorScheme,\n UIKitColors,\n ComponentColorTree,\n UIKitPalette,\n HeaderElement,\n HeaderPartProps,\n ComponentColors,\n Component,\n GetColorTree,\n} from './types';\nexport type { ActionMenuItem } from './ui/ActionMenu';\nexport type { BottomSheetItem } from './ui/BottomSheet';\nexport type { UIKitTypographyOverrides } from './styles/createTypography';\nexport type { HeaderStyleContextType } from './styles/HeaderStyleContext';\n"],"mappings":"AAAA;AACA,SAASA,OAAO,IAAIC,UAAU,QAAQ,eAAe;;AAErD;AACA,SAASD,OAAO,IAAIE,GAAG,QAAQ,kBAAkB;AACjD,SAASF,OAAO,IAAIG,OAAO,QAAQ,sBAAsB;AACzD,SAASH,OAAO,IAAII,IAAI,QAAQ,mBAAmB;AACnD,SAASJ,OAAO,IAAIK,KAAK,QAAQ,oBAAoB;AACrD,SAASL,OAAO,IAAIM,oBAAoB,QAAQ,mCAAmC;AACnF,SAASN,OAAO,IAAIO,KAAK,QAAQ,oBAAoB;AACr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IAAIoC,WAAW,QAAQ,kBAAkB;AACzD,SAASpC,OAAO,IAAIqC,MAAM,QAAQ,aAAa;AAC/C,SAASrC,OAAO,IAAIsC,KAAK,EAAEC,QAAQ,EAAEC,aAAa,QAAQ,YAAY;;AAEtE;AACA,SAASxC,OAAO,IAAIyC,yBAAyB,QAAQ,oCAAoC;AACzF,SAASzC,OAAO,IAAI0C,iBAAiB,QAAQ,4BAA4B;AACzE,SAAS1C,OAAO,IAAI2C,gBAAgB,QAAQ,2BAA2B;AACvE,SAAS3C,OAAO,IAAI4C,gBAAgB,QAAQ,2BAA2B;AACvE,SAAS5C,OAAO,IAAI6C,sBAAsB,QAAQ,iCAAiC;AACnF,SAASC,kBAAkB,EAAEC,mBAAmB,QAAQ,6BAA6B;AACrF,SAAS/C,OAAO,IAAIgD,cAAc,QAAQ,yBAAyB;;AAEnE;AACA,SAAShD,OAAO,IAAIiD,WAAW,QAAQ,qBAAqB;AAC5D,SAASjD,OAAO,IAAIkD,cAAc,QAAQ,wBAAwB;AAClE,SAASlD,OAAO,IAAImD,eAAe,QAAQ,yBAAyB;AACpE,SAASnD,OAAO,IAAIoD,OAAO,QAAQ,iBAAiB;AACpD,SAASpD,OAAO,IAAIqD,iBAAiB,QAAQ,2BAA2B;AACxE,SAASrD,OAAO,IAAIsD,kBAAkB,QAAQ,4BAA4B;AAC1E,SAAStD,OAAO,IAAIuD,aAAa,QAAQ,uBAAuB;;AAEhE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","StatusBar","useWindowDimensions","useSafeAreaInsets","getDefaultHeaderHeight","HeaderStyleContext","createContext","HeaderComponent","defaultTitleAlign","statusBarTranslucent","topInset","currentHeight","defaultHeight","HeaderStyleProvider","_ref","children","top","width","height","createElement","Provider","value"],"sources":["HeaderStyleContext.tsx"],"sourcesContent":["import React from 'react';\nimport { StatusBar, useWindowDimensions } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\nimport type { HeaderProps } from '../ui/Header';\nimport getDefaultHeaderHeight from './getDefaultHeaderHeight';\n\nexport type HeaderStyleContextType = {\n HeaderComponent: (props: HeaderProps) => React.
|
|
1
|
+
{"version":3,"names":["React","StatusBar","useWindowDimensions","useSafeAreaInsets","getDefaultHeaderHeight","HeaderStyleContext","createContext","HeaderComponent","defaultTitleAlign","statusBarTranslucent","topInset","currentHeight","defaultHeight","HeaderStyleProvider","_ref","children","top","width","height","createElement","Provider","value"],"sources":["HeaderStyleContext.tsx"],"sourcesContent":["import React from 'react';\nimport { StatusBar, useWindowDimensions } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\nimport type { HeaderProps } from '../ui/Header';\nimport getDefaultHeaderHeight from './getDefaultHeaderHeight';\n\nexport type HeaderStyleContextType = {\n HeaderComponent: (props: HeaderProps) => React.ReactNode | null;\n defaultTitleAlign: 'left' | 'center';\n statusBarTranslucent: boolean;\n topInset: number;\n defaultHeight: number;\n};\nexport const HeaderStyleContext = React.createContext<HeaderStyleContextType>({\n HeaderComponent: () => null,\n defaultTitleAlign: 'left',\n statusBarTranslucent: true,\n topInset: StatusBar.currentHeight ?? 0,\n defaultHeight: getDefaultHeaderHeight(false),\n});\n\ntype Props = Pick<HeaderStyleContextType, 'statusBarTranslucent' | 'defaultTitleAlign' | 'HeaderComponent'>;\nexport const HeaderStyleProvider = ({\n children,\n HeaderComponent = () => null,\n defaultTitleAlign,\n statusBarTranslucent,\n}: React.PropsWithChildren<Props>) => {\n const { top } = useSafeAreaInsets();\n const { width, height } = useWindowDimensions();\n\n return (\n <HeaderStyleContext.Provider\n value={{\n HeaderComponent,\n defaultTitleAlign,\n statusBarTranslucent,\n topInset: statusBarTranslucent ? top : 0,\n defaultHeight: getDefaultHeaderHeight(width > height),\n }}\n >\n {children}\n </HeaderStyleContext.Provider>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,SAAS,EAAEC,mBAAmB,QAAQ,cAAc;AAC7D,SAASC,iBAAiB,QAAQ,gCAAgC;AAGlE,OAAOC,sBAAsB,MAAM,0BAA0B;AAS7D,OAAO,MAAMC,kBAAkB,gBAAGL,KAAK,CAACM,aAAa,CAAyB;EAC5EC,eAAe,EAAEA,CAAA,KAAM,IAAI;EAC3BC,iBAAiB,EAAE,MAAM;EACzBC,oBAAoB,EAAE,IAAI;EAC1BC,QAAQ,EAAET,SAAS,CAACU,aAAa,IAAI,CAAC;EACtCC,aAAa,EAAER,sBAAsB,CAAC,KAAK;AAC7C,CAAC,CAAC;AAGF,OAAO,MAAMS,mBAAmB,GAAGC,IAAA,IAKG;EAAA,IALF;IAClCC,QAAQ;IACRR,eAAe,GAAGA,CAAA,KAAM,IAAI;IAC5BC,iBAAiB;IACjBC;EAC8B,CAAC,GAAAK,IAAA;EAC/B,MAAM;IAAEE;EAAI,CAAC,GAAGb,iBAAiB,EAAE;EACnC,MAAM;IAAEc,KAAK;IAAEC;EAAO,CAAC,GAAGhB,mBAAmB,EAAE;EAE/C,oBACEF,KAAA,CAAAmB,aAAA,CAACd,kBAAkB,CAACe,QAAQ;IAC1BC,KAAK,EAAE;MACLd,eAAe;MACfC,iBAAiB;MACjBC,oBAAoB;MACpBC,QAAQ,EAAED,oBAAoB,GAAGO,GAAG,GAAG,CAAC;MACxCJ,aAAa,EAAER,sBAAsB,CAACa,KAAK,GAAGC,MAAM;IACtD;EAAE,GAEDH,QAAQ,CACmB;AAElC,CAAC"}
|
|
@@ -10,9 +10,10 @@ const createScaleFactor = function () {
|
|
|
10
10
|
const rangedRatio = Math.min(Math.max(0.85, ratio), 1.25);
|
|
11
11
|
return dp => PixelRatio.roundToNearestPixel(dp * rangedRatio);
|
|
12
12
|
};
|
|
13
|
-
createScaleFactor.updateScaleFactor = scaleFactor => {
|
|
14
|
-
DEFAULT_SCALE_FACTOR = scaleFactor;
|
|
15
|
-
};
|
|
16
13
|
export let DEFAULT_SCALE_FACTOR = createScaleFactor();
|
|
17
|
-
export default createScaleFactor
|
|
14
|
+
export default Object.assign(createScaleFactor, {
|
|
15
|
+
updateScaleFactor: scaleFactor => {
|
|
16
|
+
DEFAULT_SCALE_FACTOR = scaleFactor;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
18
19
|
//# sourceMappingURL=createScaleFactor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Dimensions","PixelRatio","width","height","get","DESIGNED_DEVICE_WIDTH","createScaleFactor","deviceWidth","arguments","length","undefined","ratio","Math","min","rangedRatio","max","dp","roundToNearestPixel","
|
|
1
|
+
{"version":3,"names":["Dimensions","PixelRatio","width","height","get","DESIGNED_DEVICE_WIDTH","createScaleFactor","deviceWidth","arguments","length","undefined","ratio","Math","min","rangedRatio","max","dp","roundToNearestPixel","DEFAULT_SCALE_FACTOR","Object","assign","updateScaleFactor","scaleFactor"],"sources":["createScaleFactor.ts"],"sourcesContent":["import { Dimensions, PixelRatio } from 'react-native';\n\nconst { width, height } = Dimensions.get('window');\n\nconst DESIGNED_DEVICE_WIDTH = 360;\n\nconst createScaleFactor = (deviceWidth = DESIGNED_DEVICE_WIDTH) => {\n const ratio = Math.min(width, height) / deviceWidth;\n const rangedRatio = Math.min(Math.max(0.85, ratio), 1.25);\n return (dp: number) => PixelRatio.roundToNearestPixel(dp * rangedRatio);\n};\n\nexport let DEFAULT_SCALE_FACTOR = createScaleFactor();\nexport default Object.assign(createScaleFactor, {\n updateScaleFactor: (scaleFactor: (dp: number) => number) => {\n DEFAULT_SCALE_FACTOR = scaleFactor;\n },\n});\n"],"mappings":"AAAA,SAASA,UAAU,EAAEC,UAAU,QAAQ,cAAc;AAErD,MAAM;EAAEC,KAAK;EAAEC;AAAO,CAAC,GAAGH,UAAU,CAACI,GAAG,CAAC,QAAQ,CAAC;AAElD,MAAMC,qBAAqB,GAAG,GAAG;AAEjC,MAAMC,iBAAiB,GAAG,SAAAA,CAAA,EAAyC;EAAA,IAAxCC,WAAW,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAGH,qBAAqB;EAC5D,MAAMM,KAAK,GAAGC,IAAI,CAACC,GAAG,CAACX,KAAK,EAAEC,MAAM,CAAC,GAAGI,WAAW;EACnD,MAAMO,WAAW,GAAGF,IAAI,CAACC,GAAG,CAACD,IAAI,CAACG,GAAG,CAAC,IAAI,EAAEJ,KAAK,CAAC,EAAE,IAAI,CAAC;EACzD,OAAQK,EAAU,IAAKf,UAAU,CAACgB,mBAAmB,CAACD,EAAE,GAAGF,WAAW,CAAC;AACzE,CAAC;AAED,OAAO,IAAII,oBAAoB,GAAGZ,iBAAiB,EAAE;AACrD,eAAea,MAAM,CAACC,MAAM,CAACd,iBAAiB,EAAE;EAC9Ce,iBAAiB,EAAGC,WAAmC,IAAK;IAC1DJ,oBAAoB,GAAGI,WAAW;EACpC;AACF,CAAC,CAAC"}
|
|
@@ -2,40 +2,6 @@ import createTheme from './createTheme';
|
|
|
2
2
|
const DarkUIKitTheme = createTheme({
|
|
3
3
|
colorScheme: 'dark',
|
|
4
4
|
colors: palette => {
|
|
5
|
-
const groupChannelMessage = {
|
|
6
|
-
incoming: {
|
|
7
|
-
enabled: {
|
|
8
|
-
textMsg: palette.onBackgroundDark01,
|
|
9
|
-
textEdited: palette.onBackgroundDark02,
|
|
10
|
-
textTime: palette.onBackgroundDark03,
|
|
11
|
-
textSenderName: palette.onBackgroundDark02,
|
|
12
|
-
background: palette.background400
|
|
13
|
-
},
|
|
14
|
-
pressed: {
|
|
15
|
-
textMsg: palette.onBackgroundDark01,
|
|
16
|
-
textEdited: palette.onBackgroundDark02,
|
|
17
|
-
textTime: palette.onBackgroundDark03,
|
|
18
|
-
textSenderName: palette.onBackgroundDark02,
|
|
19
|
-
background: palette.primary500
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
outgoing: {
|
|
23
|
-
enabled: {
|
|
24
|
-
textMsg: palette.onBackgroundLight01,
|
|
25
|
-
textEdited: palette.onBackgroundLight02,
|
|
26
|
-
textTime: palette.onBackgroundDark03,
|
|
27
|
-
textSenderName: palette.transparent,
|
|
28
|
-
background: palette.primary200
|
|
29
|
-
},
|
|
30
|
-
pressed: {
|
|
31
|
-
textMsg: palette.onBackgroundLight01,
|
|
32
|
-
textEdited: palette.onBackgroundLight02,
|
|
33
|
-
textTime: palette.onBackgroundDark03,
|
|
34
|
-
textSenderName: palette.transparent,
|
|
35
|
-
background: palette.primary300
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
5
|
return {
|
|
40
6
|
primary: palette.primary200,
|
|
41
7
|
secondary: palette.secondary200,
|
|
@@ -147,7 +113,6 @@ const DarkUIKitTheme = createTheme({
|
|
|
147
113
|
}
|
|
148
114
|
}
|
|
149
115
|
},
|
|
150
|
-
message: groupChannelMessage,
|
|
151
116
|
dateSeparator: {
|
|
152
117
|
default: {
|
|
153
118
|
none: {
|
|
@@ -156,7 +121,60 @@ const DarkUIKitTheme = createTheme({
|
|
|
156
121
|
}
|
|
157
122
|
}
|
|
158
123
|
},
|
|
159
|
-
groupChannelMessage
|
|
124
|
+
groupChannelMessage: {
|
|
125
|
+
incoming: {
|
|
126
|
+
enabled: {
|
|
127
|
+
textMsg: palette.onBackgroundDark01,
|
|
128
|
+
textEdited: palette.onBackgroundDark02,
|
|
129
|
+
textTime: palette.onBackgroundDark03,
|
|
130
|
+
textSenderName: palette.onBackgroundDark02,
|
|
131
|
+
background: palette.background400,
|
|
132
|
+
textVoicePlaytime: palette.onBackgroundDark01,
|
|
133
|
+
voiceSpinner: palette.primary200,
|
|
134
|
+
voiceProgressTrack: palette.background400,
|
|
135
|
+
voiceActionIcon: palette.primary200,
|
|
136
|
+
voiceActionIconBackground: palette.background700
|
|
137
|
+
},
|
|
138
|
+
pressed: {
|
|
139
|
+
textMsg: palette.onBackgroundDark01,
|
|
140
|
+
textEdited: palette.onBackgroundDark02,
|
|
141
|
+
textTime: palette.onBackgroundDark03,
|
|
142
|
+
textSenderName: palette.onBackgroundDark02,
|
|
143
|
+
background: palette.primary500,
|
|
144
|
+
textVoicePlaytime: palette.onBackgroundDark01,
|
|
145
|
+
voiceSpinner: palette.primary200,
|
|
146
|
+
voiceProgressTrack: palette.background400,
|
|
147
|
+
voiceActionIcon: palette.primary200,
|
|
148
|
+
voiceActionIconBackground: palette.background700
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
outgoing: {
|
|
152
|
+
enabled: {
|
|
153
|
+
textMsg: palette.onBackgroundLight01,
|
|
154
|
+
textEdited: palette.onBackgroundLight02,
|
|
155
|
+
textTime: palette.onBackgroundDark03,
|
|
156
|
+
textSenderName: palette.transparent,
|
|
157
|
+
background: palette.primary200,
|
|
158
|
+
textVoicePlaytime: palette.onBackgroundLight01,
|
|
159
|
+
voiceSpinner: palette.primary300,
|
|
160
|
+
voiceProgressTrack: palette.primary200,
|
|
161
|
+
voiceActionIcon: palette.primary200,
|
|
162
|
+
voiceActionIconBackground: palette.background700
|
|
163
|
+
},
|
|
164
|
+
pressed: {
|
|
165
|
+
textMsg: palette.onBackgroundLight01,
|
|
166
|
+
textEdited: palette.onBackgroundLight02,
|
|
167
|
+
textTime: palette.onBackgroundDark03,
|
|
168
|
+
textSenderName: palette.transparent,
|
|
169
|
+
background: palette.primary300,
|
|
170
|
+
textVoicePlaytime: palette.onBackgroundLight01,
|
|
171
|
+
voiceSpinner: palette.primary300,
|
|
172
|
+
voiceProgressTrack: palette.primary200,
|
|
173
|
+
voiceActionIcon: palette.primary200,
|
|
174
|
+
voiceActionIconBackground: palette.background700
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
},
|
|
160
178
|
groupChannelPreview: {
|
|
161
179
|
default: {
|
|
162
180
|
none: {
|
|
@@ -240,6 +258,32 @@ const DarkUIKitTheme = createTheme({
|
|
|
240
258
|
separator: palette.onBackgroundDark04
|
|
241
259
|
}
|
|
242
260
|
}
|
|
261
|
+
},
|
|
262
|
+
voiceMessageInput: {
|
|
263
|
+
default: {
|
|
264
|
+
active: {
|
|
265
|
+
textCancel: palette.primary200,
|
|
266
|
+
textTime: palette.onBackgroundLight01,
|
|
267
|
+
background: palette.background600,
|
|
268
|
+
actionIcon: palette.onBackgroundDark01,
|
|
269
|
+
actionIconBackground: palette.background500,
|
|
270
|
+
sendIcon: palette.onBackgroundLight01,
|
|
271
|
+
sendIconBackground: palette.primary200,
|
|
272
|
+
progressTrack: palette.primary200,
|
|
273
|
+
recording: palette.error300
|
|
274
|
+
},
|
|
275
|
+
inactive: {
|
|
276
|
+
textCancel: palette.primary200,
|
|
277
|
+
textTime: palette.onBackgroundDark03,
|
|
278
|
+
background: palette.background600,
|
|
279
|
+
actionIcon: palette.onBackgroundDark01,
|
|
280
|
+
actionIconBackground: palette.background500,
|
|
281
|
+
sendIcon: palette.onBackgroundDark04,
|
|
282
|
+
sendIconBackground: palette.background500,
|
|
283
|
+
progressTrack: palette.background400,
|
|
284
|
+
recording: palette.error200
|
|
285
|
+
}
|
|
286
|
+
}
|
|
243
287
|
}
|
|
244
288
|
}
|
|
245
289
|
};
|