@oxy.so/bloom 19.6.0 → 19.7.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/docs/adoption-matrix.mdx +9 -9
- package/docs/bottom-bar.mdx +57 -1
- package/docs/button.mdx +19 -0
- package/docs/chat-composer.mdx +59 -1
- package/docs/icons.mdx +22 -0
- package/docs/public-parts.mdx +13 -2
- package/docs/tab-pager.mdx +10 -0
- package/docs/task-catalog.json +1 -1
- package/docs/task-catalog.mdx +1 -1
- package/lib/commonjs/bottom-bar/BottomBarBase.js +141 -37
- package/lib/commonjs/bottom-bar/BottomBarBase.js.map +1 -1
- package/lib/commonjs/button/GlyphAttention.js +110 -0
- package/lib/commonjs/button/GlyphAttention.js.map +1 -0
- package/lib/commonjs/button/GlyphButton.js +18 -7
- package/lib/commonjs/button/GlyphButton.js.map +1 -1
- package/lib/commonjs/chat-composer/CompactComposer.js +18 -0
- package/lib/commonjs/chat-composer/CompactComposer.js.map +1 -0
- package/lib/commonjs/chat-composer/CompactComposer.web.js +18 -0
- package/lib/commonjs/chat-composer/CompactComposer.web.js.map +1 -0
- package/lib/commonjs/chat-composer/compact-text.js +11 -0
- package/lib/commonjs/chat-composer/compact-text.js.map +1 -0
- package/lib/commonjs/chat-composer/compact-types.js +6 -0
- package/lib/commonjs/chat-composer/compact-types.js.map +1 -0
- package/lib/commonjs/chat-composer/create-compact-composer.js +185 -0
- package/lib/commonjs/chat-composer/create-compact-composer.js.map +1 -0
- package/lib/commonjs/chat-composer/index.js +14 -0
- package/lib/commonjs/chat-composer/index.js.map +1 -1
- package/lib/commonjs/chat-composer/index.web.js +14 -0
- package/lib/commonjs/chat-composer/index.web.js.map +1 -1
- package/lib/commonjs/chat-composer/messages.js +8 -1
- package/lib/commonjs/chat-composer/messages.js.map +1 -1
- package/lib/commonjs/icons/index.js +12 -0
- package/lib/commonjs/icons/index.js.map +1 -1
- package/lib/commonjs/icons/social/BookmarkFillIcon.js +12 -0
- package/lib/commonjs/icons/social/BookmarkFillIcon.js.map +1 -0
- package/lib/commonjs/icons/social/BookmarkIcon.js +12 -0
- package/lib/commonjs/icons/social/BookmarkIcon.js.map +1 -0
- package/lib/commonjs/icons/social/GifAttachmentIcon.js +12 -0
- package/lib/commonjs/icons/social/GifAttachmentIcon.js.map +1 -0
- package/lib/commonjs/icons/social/LikeFillIcon.js +13 -0
- package/lib/commonjs/icons/social/LikeFillIcon.js.map +1 -0
- package/lib/commonjs/icons/social/LikeIcon.js +14 -0
- package/lib/commonjs/icons/social/LikeIcon.js.map +1 -0
- package/lib/commonjs/icons/social/MediaAttachmentIcon.js +12 -0
- package/lib/commonjs/icons/social/MediaAttachmentIcon.js.map +1 -0
- package/lib/commonjs/icons/social/ReplyIcon.js +14 -0
- package/lib/commonjs/icons/social/ReplyIcon.js.map +1 -0
- package/lib/commonjs/icons/social/RepostIcon.js +12 -0
- package/lib/commonjs/icons/social/RepostIcon.js.map +1 -0
- package/lib/commonjs/icons/social/ShareIcon.js +12 -0
- package/lib/commonjs/icons/social/ShareIcon.js.map +1 -0
- package/lib/commonjs/icons/social/index.js +69 -0
- package/lib/commonjs/icons/social/index.js.map +1 -0
- package/lib/commonjs/index.js +14 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/index.web.js +14 -0
- package/lib/commonjs/index.web.js.map +1 -1
- package/lib/commonjs/layout/bottom-edge.js +14 -0
- package/lib/commonjs/layout/bottom-edge.js.map +1 -1
- package/lib/commonjs/locale/translations/ar.js +8 -0
- package/lib/commonjs/locale/translations/ar.js.map +1 -1
- package/lib/commonjs/locale/translations/bn.js +8 -0
- package/lib/commonjs/locale/translations/bn.js.map +1 -1
- package/lib/commonjs/locale/translations/ca.js +8 -0
- package/lib/commonjs/locale/translations/ca.js.map +1 -1
- package/lib/commonjs/locale/translations/de.js +8 -0
- package/lib/commonjs/locale/translations/de.js.map +1 -1
- package/lib/commonjs/locale/translations/es.js +8 -0
- package/lib/commonjs/locale/translations/es.js.map +1 -1
- package/lib/commonjs/locale/translations/fr.js +8 -0
- package/lib/commonjs/locale/translations/fr.js.map +1 -1
- package/lib/commonjs/locale/translations/hi.js +8 -0
- package/lib/commonjs/locale/translations/hi.js.map +1 -1
- package/lib/commonjs/locale/translations/id.js +8 -0
- package/lib/commonjs/locale/translations/id.js.map +1 -1
- package/lib/commonjs/locale/translations/it.js +8 -0
- package/lib/commonjs/locale/translations/it.js.map +1 -1
- package/lib/commonjs/locale/translations/ja.js +8 -0
- package/lib/commonjs/locale/translations/ja.js.map +1 -1
- package/lib/commonjs/locale/translations/pt.js +8 -0
- package/lib/commonjs/locale/translations/pt.js.map +1 -1
- package/lib/commonjs/locale/translations/ru.js +8 -0
- package/lib/commonjs/locale/translations/ru.js.map +1 -1
- package/lib/commonjs/locale/translations/tr.js +8 -0
- package/lib/commonjs/locale/translations/tr.js.map +1 -1
- package/lib/commonjs/locale/translations/zh.js +8 -0
- package/lib/commonjs/locale/translations/zh.js.map +1 -1
- package/lib/commonjs/tab-bar/TabBarBase.js +126 -20
- package/lib/commonjs/tab-bar/TabBarBase.js.map +1 -1
- package/lib/commonjs/tab-bar/shared.js +3 -1
- package/lib/commonjs/tab-bar/shared.js.map +1 -1
- package/lib/commonjs/tab-pager/TabPagerBottomBar.js +12 -2
- package/lib/commonjs/tab-pager/TabPagerBottomBar.js.map +1 -1
- package/lib/module/bottom-bar/BottomBarBase.js +143 -39
- package/lib/module/bottom-bar/BottomBarBase.js.map +1 -1
- package/lib/module/button/GlyphAttention.js +104 -0
- package/lib/module/button/GlyphAttention.js.map +1 -0
- package/lib/module/button/GlyphButton.js +18 -7
- package/lib/module/button/GlyphButton.js.map +1 -1
- package/lib/module/chat-composer/CompactComposer.js +14 -0
- package/lib/module/chat-composer/CompactComposer.js.map +1 -0
- package/lib/module/chat-composer/CompactComposer.web.js +14 -0
- package/lib/module/chat-composer/CompactComposer.web.js.map +1 -0
- package/lib/module/chat-composer/compact-text.js +7 -0
- package/lib/module/chat-composer/compact-text.js.map +1 -0
- package/lib/module/chat-composer/compact-types.js +4 -0
- package/lib/module/chat-composer/compact-types.js.map +1 -0
- package/lib/module/chat-composer/create-compact-composer.js +181 -0
- package/lib/module/chat-composer/create-compact-composer.js.map +1 -0
- package/lib/module/chat-composer/index.js +2 -0
- package/lib/module/chat-composer/index.js.map +1 -1
- package/lib/module/chat-composer/index.web.js +2 -0
- package/lib/module/chat-composer/index.web.js.map +1 -1
- package/lib/module/chat-composer/messages.js +7 -0
- package/lib/module/chat-composer/messages.js.map +1 -1
- package/lib/module/icons/index.js +2 -1
- package/lib/module/icons/index.js.map +1 -1
- package/lib/module/icons/social/BookmarkFillIcon.js +9 -0
- package/lib/module/icons/social/BookmarkFillIcon.js.map +1 -0
- package/lib/module/icons/social/BookmarkIcon.js +9 -0
- package/lib/module/icons/social/BookmarkIcon.js.map +1 -0
- package/lib/module/icons/social/GifAttachmentIcon.js +9 -0
- package/lib/module/icons/social/GifAttachmentIcon.js.map +1 -0
- package/lib/module/icons/social/LikeFillIcon.js +10 -0
- package/lib/module/icons/social/LikeFillIcon.js.map +1 -0
- package/lib/module/icons/social/LikeIcon.js +11 -0
- package/lib/module/icons/social/LikeIcon.js.map +1 -0
- package/lib/module/icons/social/MediaAttachmentIcon.js +9 -0
- package/lib/module/icons/social/MediaAttachmentIcon.js.map +1 -0
- package/lib/module/icons/social/ReplyIcon.js +11 -0
- package/lib/module/icons/social/ReplyIcon.js.map +1 -0
- package/lib/module/icons/social/RepostIcon.js +9 -0
- package/lib/module/icons/social/RepostIcon.js.map +1 -0
- package/lib/module/icons/social/ShareIcon.js +9 -0
- package/lib/module/icons/social/ShareIcon.js.map +1 -0
- package/lib/module/icons/social/index.js +12 -0
- package/lib/module/icons/social/index.js.map +1 -0
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.web.js +1 -1
- package/lib/module/index.web.js.map +1 -1
- package/lib/module/layout/bottom-edge.js +14 -1
- package/lib/module/layout/bottom-edge.js.map +1 -1
- package/lib/module/locale/translations/ar.js +8 -0
- package/lib/module/locale/translations/ar.js.map +1 -1
- package/lib/module/locale/translations/bn.js +8 -0
- package/lib/module/locale/translations/bn.js.map +1 -1
- package/lib/module/locale/translations/ca.js +8 -0
- package/lib/module/locale/translations/ca.js.map +1 -1
- package/lib/module/locale/translations/de.js +8 -0
- package/lib/module/locale/translations/de.js.map +1 -1
- package/lib/module/locale/translations/es.js +8 -0
- package/lib/module/locale/translations/es.js.map +1 -1
- package/lib/module/locale/translations/fr.js +8 -0
- package/lib/module/locale/translations/fr.js.map +1 -1
- package/lib/module/locale/translations/hi.js +8 -0
- package/lib/module/locale/translations/hi.js.map +1 -1
- package/lib/module/locale/translations/id.js +8 -0
- package/lib/module/locale/translations/id.js.map +1 -1
- package/lib/module/locale/translations/it.js +8 -0
- package/lib/module/locale/translations/it.js.map +1 -1
- package/lib/module/locale/translations/ja.js +8 -0
- package/lib/module/locale/translations/ja.js.map +1 -1
- package/lib/module/locale/translations/pt.js +8 -0
- package/lib/module/locale/translations/pt.js.map +1 -1
- package/lib/module/locale/translations/ru.js +8 -0
- package/lib/module/locale/translations/ru.js.map +1 -1
- package/lib/module/locale/translations/tr.js +8 -0
- package/lib/module/locale/translations/tr.js.map +1 -1
- package/lib/module/locale/translations/zh.js +8 -0
- package/lib/module/locale/translations/zh.js.map +1 -1
- package/lib/module/tab-bar/TabBarBase.js +130 -23
- package/lib/module/tab-bar/TabBarBase.js.map +1 -1
- package/lib/module/tab-bar/shared.js +2 -0
- package/lib/module/tab-bar/shared.js.map +1 -1
- package/lib/module/tab-pager/TabPagerBottomBar.js +13 -3
- package/lib/module/tab-pager/TabPagerBottomBar.js.map +1 -1
- package/lib/typescript/commonjs/bottom-bar/BottomBarBase.d.ts +1 -1
- package/lib/typescript/commonjs/bottom-bar/BottomBarBase.d.ts.map +1 -1
- package/lib/typescript/commonjs/bottom-bar/types.d.ts +10 -2
- package/lib/typescript/commonjs/bottom-bar/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/button/GlyphAttention.d.ts +11 -0
- package/lib/typescript/commonjs/button/GlyphAttention.d.ts.map +1 -0
- package/lib/typescript/commonjs/button/GlyphButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/button/types.d.ts +11 -0
- package/lib/typescript/commonjs/button/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/chat-composer/CompactComposer.d.ts +2 -0
- package/lib/typescript/commonjs/chat-composer/CompactComposer.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/CompactComposer.web.d.ts +2 -0
- package/lib/typescript/commonjs/chat-composer/CompactComposer.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/compact-text.d.ts +3 -0
- package/lib/typescript/commonjs/chat-composer/compact-text.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/compact-types.d.ts +45 -0
- package/lib/typescript/commonjs/chat-composer/compact-types.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/create-compact-composer.d.ts +13 -0
- package/lib/typescript/commonjs/chat-composer/create-compact-composer.d.ts.map +1 -0
- package/lib/typescript/commonjs/chat-composer/index.d.ts +3 -0
- package/lib/typescript/commonjs/chat-composer/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/chat-composer/index.web.d.ts +3 -0
- package/lib/typescript/commonjs/chat-composer/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/chat-composer/messages.d.ts +8 -0
- package/lib/typescript/commonjs/chat-composer/messages.d.ts.map +1 -1
- package/lib/typescript/commonjs/icons/index.d.ts +1 -0
- package/lib/typescript/commonjs/icons/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/icons/social/BookmarkFillIcon.d.ts +8 -0
- package/lib/typescript/commonjs/icons/social/BookmarkFillIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/social/BookmarkIcon.d.ts +8 -0
- package/lib/typescript/commonjs/icons/social/BookmarkIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/social/GifAttachmentIcon.d.ts +8 -0
- package/lib/typescript/commonjs/icons/social/GifAttachmentIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/social/LikeFillIcon.d.ts +8 -0
- package/lib/typescript/commonjs/icons/social/LikeFillIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/social/LikeIcon.d.ts +8 -0
- package/lib/typescript/commonjs/icons/social/LikeIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/social/MediaAttachmentIcon.d.ts +8 -0
- package/lib/typescript/commonjs/icons/social/MediaAttachmentIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/social/ReplyIcon.d.ts +8 -0
- package/lib/typescript/commonjs/icons/social/ReplyIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/social/RepostIcon.d.ts +8 -0
- package/lib/typescript/commonjs/icons/social/RepostIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/social/ShareIcon.d.ts +8 -0
- package/lib/typescript/commonjs/icons/social/ShareIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/social/index.d.ts +10 -0
- package/lib/typescript/commonjs/icons/social/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/index.d.ts +2 -2
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.web.d.ts +2 -2
- package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/layout/bottom-edge.d.ts +2 -0
- package/lib/typescript/commonjs/layout/bottom-edge.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/ar.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/bn.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/ca.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/de.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/es.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/fr.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/hi.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/id.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/it.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/ja.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/pt.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/ru.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/tr.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/types.d.ts +2 -1
- package/lib/typescript/commonjs/locale/translations/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/zh.d.ts.map +1 -1
- package/lib/typescript/commonjs/tab-bar/TabBarBase.d.ts.map +1 -1
- package/lib/typescript/commonjs/tab-bar/shared.d.ts +2 -0
- package/lib/typescript/commonjs/tab-bar/shared.d.ts.map +1 -1
- package/lib/typescript/commonjs/tab-bar/types.d.ts +2 -0
- package/lib/typescript/commonjs/tab-bar/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/tab-pager/TabPagerBottomBar.d.ts +1 -1
- package/lib/typescript/commonjs/tab-pager/TabPagerBottomBar.d.ts.map +1 -1
- package/lib/typescript/commonjs/tab-pager/types.d.ts +4 -1
- package/lib/typescript/commonjs/tab-pager/types.d.ts.map +1 -1
- package/lib/typescript/module/bottom-bar/BottomBarBase.d.ts +1 -1
- package/lib/typescript/module/bottom-bar/BottomBarBase.d.ts.map +1 -1
- package/lib/typescript/module/bottom-bar/types.d.ts +10 -2
- package/lib/typescript/module/bottom-bar/types.d.ts.map +1 -1
- package/lib/typescript/module/button/GlyphAttention.d.ts +11 -0
- package/lib/typescript/module/button/GlyphAttention.d.ts.map +1 -0
- package/lib/typescript/module/button/GlyphButton.d.ts.map +1 -1
- package/lib/typescript/module/button/types.d.ts +11 -0
- package/lib/typescript/module/button/types.d.ts.map +1 -1
- package/lib/typescript/module/chat-composer/CompactComposer.d.ts +2 -0
- package/lib/typescript/module/chat-composer/CompactComposer.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/CompactComposer.web.d.ts +2 -0
- package/lib/typescript/module/chat-composer/CompactComposer.web.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/compact-text.d.ts +3 -0
- package/lib/typescript/module/chat-composer/compact-text.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/compact-types.d.ts +45 -0
- package/lib/typescript/module/chat-composer/compact-types.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/create-compact-composer.d.ts +13 -0
- package/lib/typescript/module/chat-composer/create-compact-composer.d.ts.map +1 -0
- package/lib/typescript/module/chat-composer/index.d.ts +3 -0
- package/lib/typescript/module/chat-composer/index.d.ts.map +1 -1
- package/lib/typescript/module/chat-composer/index.web.d.ts +3 -0
- package/lib/typescript/module/chat-composer/index.web.d.ts.map +1 -1
- package/lib/typescript/module/chat-composer/messages.d.ts +8 -0
- package/lib/typescript/module/chat-composer/messages.d.ts.map +1 -1
- package/lib/typescript/module/icons/index.d.ts +1 -0
- package/lib/typescript/module/icons/index.d.ts.map +1 -1
- package/lib/typescript/module/icons/social/BookmarkFillIcon.d.ts +8 -0
- package/lib/typescript/module/icons/social/BookmarkFillIcon.d.ts.map +1 -0
- package/lib/typescript/module/icons/social/BookmarkIcon.d.ts +8 -0
- package/lib/typescript/module/icons/social/BookmarkIcon.d.ts.map +1 -0
- package/lib/typescript/module/icons/social/GifAttachmentIcon.d.ts +8 -0
- package/lib/typescript/module/icons/social/GifAttachmentIcon.d.ts.map +1 -0
- package/lib/typescript/module/icons/social/LikeFillIcon.d.ts +8 -0
- package/lib/typescript/module/icons/social/LikeFillIcon.d.ts.map +1 -0
- package/lib/typescript/module/icons/social/LikeIcon.d.ts +8 -0
- package/lib/typescript/module/icons/social/LikeIcon.d.ts.map +1 -0
- package/lib/typescript/module/icons/social/MediaAttachmentIcon.d.ts +8 -0
- package/lib/typescript/module/icons/social/MediaAttachmentIcon.d.ts.map +1 -0
- package/lib/typescript/module/icons/social/ReplyIcon.d.ts +8 -0
- package/lib/typescript/module/icons/social/ReplyIcon.d.ts.map +1 -0
- package/lib/typescript/module/icons/social/RepostIcon.d.ts +8 -0
- package/lib/typescript/module/icons/social/RepostIcon.d.ts.map +1 -0
- package/lib/typescript/module/icons/social/ShareIcon.d.ts +8 -0
- package/lib/typescript/module/icons/social/ShareIcon.d.ts.map +1 -0
- package/lib/typescript/module/icons/social/index.d.ts +10 -0
- package/lib/typescript/module/icons/social/index.d.ts.map +1 -0
- package/lib/typescript/module/index.d.ts +2 -2
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/index.web.d.ts +2 -2
- package/lib/typescript/module/index.web.d.ts.map +1 -1
- package/lib/typescript/module/layout/bottom-edge.d.ts +2 -0
- package/lib/typescript/module/layout/bottom-edge.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/ar.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/bn.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/ca.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/de.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/es.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/fr.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/hi.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/id.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/it.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/ja.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/pt.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/ru.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/tr.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/types.d.ts +2 -1
- package/lib/typescript/module/locale/translations/types.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/zh.d.ts.map +1 -1
- package/lib/typescript/module/tab-bar/TabBarBase.d.ts.map +1 -1
- package/lib/typescript/module/tab-bar/shared.d.ts +2 -0
- package/lib/typescript/module/tab-bar/shared.d.ts.map +1 -1
- package/lib/typescript/module/tab-bar/types.d.ts +2 -0
- package/lib/typescript/module/tab-bar/types.d.ts.map +1 -1
- package/lib/typescript/module/tab-pager/TabPagerBottomBar.d.ts +1 -1
- package/lib/typescript/module/tab-pager/TabPagerBottomBar.d.ts.map +1 -1
- package/lib/typescript/module/tab-pager/types.d.ts +4 -1
- package/lib/typescript/module/tab-pager/types.d.ts.map +1 -1
- package/package.json +154 -1
- package/src/__tests__/support/public-part-classifications.json +22 -1
- package/src/__tests__/support/yoga-host-tree.ts +12 -2
- package/src/bottom-bar/BottomBarBase.tsx +230 -46
- package/src/bottom-bar/types.ts +10 -2
- package/src/button/GlyphAttention.tsx +100 -0
- package/src/button/GlyphButton.tsx +21 -6
- package/src/button/types.ts +11 -0
- package/src/chat-composer/CompactComposer.tsx +7 -0
- package/src/chat-composer/CompactComposer.web.tsx +7 -0
- package/src/chat-composer/compact-text.ts +4 -0
- package/src/chat-composer/compact-types.ts +47 -0
- package/src/chat-composer/create-compact-composer.tsx +213 -0
- package/src/chat-composer/index.ts +8 -0
- package/src/chat-composer/index.web.ts +8 -0
- package/src/chat-composer/messages.ts +16 -0
- package/src/icons/index.ts +2 -1
- package/src/icons/social/BookmarkFillIcon.tsx +6 -0
- package/src/icons/social/BookmarkIcon.tsx +6 -0
- package/src/icons/social/GifAttachmentIcon.tsx +6 -0
- package/src/icons/social/LikeFillIcon.tsx +7 -0
- package/src/icons/social/LikeIcon.tsx +8 -0
- package/src/icons/social/MediaAttachmentIcon.tsx +6 -0
- package/src/icons/social/ReplyIcon.tsx +8 -0
- package/src/icons/social/RepostIcon.tsx +6 -0
- package/src/icons/social/ShareIcon.tsx +6 -0
- package/src/icons/social/index.ts +9 -0
- package/src/index.ts +5 -0
- package/src/index.web.ts +5 -0
- package/src/layout/bottom-edge.tsx +17 -0
- package/src/locale/translations/ar.ts +9 -0
- package/src/locale/translations/bn.ts +9 -0
- package/src/locale/translations/ca.ts +10 -0
- package/src/locale/translations/de.ts +10 -0
- package/src/locale/translations/es.ts +10 -0
- package/src/locale/translations/fr.ts +10 -0
- package/src/locale/translations/hi.ts +9 -0
- package/src/locale/translations/id.ts +10 -0
- package/src/locale/translations/it.ts +10 -0
- package/src/locale/translations/ja.ts +10 -0
- package/src/locale/translations/pt.ts +10 -0
- package/src/locale/translations/ru.ts +10 -0
- package/src/locale/translations/tr.ts +10 -0
- package/src/locale/translations/types.ts +5 -1
- package/src/locale/translations/zh.ts +9 -0
- package/src/tab-bar/TabBarBase.tsx +193 -27
- package/src/tab-bar/shared.ts +2 -0
- package/src/tab-bar/types.ts +2 -0
- package/src/tab-pager/TabPagerBottomBar.tsx +23 -3
- package/src/tab-pager/types.ts +4 -1
package/src/bottom-bar/types.ts
CHANGED
|
@@ -15,8 +15,14 @@ export interface BottomBarProps {
|
|
|
15
15
|
action?: ReactNode;
|
|
16
16
|
/** Auto places the action above navigation when side-by-side targets would be cramped. */
|
|
17
17
|
actionPlacement?: 'auto' | 'beside' | 'above';
|
|
18
|
-
/**
|
|
19
|
-
|
|
18
|
+
/**
|
|
19
|
+
* `hide` fades the accessory on scroll (default), `visible` retains it.
|
|
20
|
+
* `dock` keeps one editable action: above expanded navigation, beside the
|
|
21
|
+
* active destination when minimized. It stays mounted with the keyboard.
|
|
22
|
+
*/
|
|
23
|
+
actionBehavior?: 'hide' | 'visible' | 'dock';
|
|
24
|
+
/** Keep the same action mounted while navigation is absent (for example on desktop). */
|
|
25
|
+
navigationVisibility?: 'always' | 'compact' | 'never';
|
|
20
26
|
minimizeProgress?: SharedValue<number>;
|
|
21
27
|
/**
|
|
22
28
|
* The bar's presence, 0 (shown) to 1 (gone), on the UI thread. The bar fades
|
|
@@ -28,6 +34,8 @@ export interface BottomBarProps {
|
|
|
28
34
|
/** Optional screen-edge blur band; disabled by default. */
|
|
29
35
|
blur?: boolean;
|
|
30
36
|
maxWidth?: number;
|
|
37
|
+
/** Horizontal breathing room shared by navigation and action. Default 12. */
|
|
38
|
+
horizontalInset?: number;
|
|
31
39
|
style?: StyleProp<ViewStyle>;
|
|
32
40
|
testID?: string;
|
|
33
41
|
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { type ComponentRef, type ReactNode, useLayoutEffect, useRef } from 'react';
|
|
2
|
+
import { View, type ViewStyle } from 'react-native';
|
|
3
|
+
import Animated, {
|
|
4
|
+
cancelAnimation,
|
|
5
|
+
Easing,
|
|
6
|
+
ReduceMotion,
|
|
7
|
+
useAnimatedStyle,
|
|
8
|
+
useSharedValue,
|
|
9
|
+
withSequence,
|
|
10
|
+
withTiming,
|
|
11
|
+
} from 'react-native-reanimated';
|
|
12
|
+
|
|
13
|
+
import { usePrefersReducedMotion } from '../hooks/use-prefers-reduced-motion';
|
|
14
|
+
import { useInteractiveWebCss } from '../styles/interactive-web-css';
|
|
15
|
+
import { IS_WEB } from '../styles/platform';
|
|
16
|
+
import { dataHook } from '../styles/data-hook';
|
|
17
|
+
|
|
18
|
+
interface Props {
|
|
19
|
+
token: number;
|
|
20
|
+
blocked: boolean;
|
|
21
|
+
children: ReactNode;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const CENTER: ViewStyle = { alignItems: 'center', justifyContent: 'center' };
|
|
25
|
+
const ATTENTION_CSS = `
|
|
26
|
+
@keyframes bloom-glyph-attention-a {
|
|
27
|
+
0%, 100% { transform: scale(1); }
|
|
28
|
+
31.25% { transform: scale(1.12); }
|
|
29
|
+
}
|
|
30
|
+
@keyframes bloom-glyph-attention-b {
|
|
31
|
+
0%, 100% { transform: scale(1); }
|
|
32
|
+
31.25% { transform: scale(1.12); }
|
|
33
|
+
}
|
|
34
|
+
[data-bloom-glyph-attention] {
|
|
35
|
+
animation-duration: 320ms;
|
|
36
|
+
animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
37
|
+
}
|
|
38
|
+
@media (prefers-reduced-motion: reduce) {
|
|
39
|
+
[data-bloom-glyph-attention] { animation: none !important; }
|
|
40
|
+
}`;
|
|
41
|
+
|
|
42
|
+
/** Only opt-in glyphs mount this feedback; ordinary buttons retain their plain View. */
|
|
43
|
+
function WebGlyphAttention({ token, blocked, children }: Props) {
|
|
44
|
+
const ref = useRef<ComponentRef<typeof View>>(null);
|
|
45
|
+
const previous = useRef(token);
|
|
46
|
+
const phase = useRef(false);
|
|
47
|
+
const reducedMotion = usePrefersReducedMotion();
|
|
48
|
+
useInteractiveWebCss('bloom-glyph-attention', ATTENTION_CSS);
|
|
49
|
+
|
|
50
|
+
useLayoutEffect(() => {
|
|
51
|
+
const changed = !Object.is(previous.current, token);
|
|
52
|
+
previous.current = token;
|
|
53
|
+
const node = ref.current as unknown as HTMLElement | null;
|
|
54
|
+
if (!node) return;
|
|
55
|
+
if (blocked || reducedMotion || !Number.isFinite(token)) {
|
|
56
|
+
node.style.animationName = 'none';
|
|
57
|
+
} else if (changed) {
|
|
58
|
+
// Alternating equivalent CSS animations restarts on each committed attempt,
|
|
59
|
+
// including during an unfinished pulse, without remounting or reading layout.
|
|
60
|
+
phase.current = !phase.current;
|
|
61
|
+
node.style.animationName = `bloom-glyph-attention-${phase.current ? 'a' : 'b'}`;
|
|
62
|
+
}
|
|
63
|
+
}, [token, blocked, reducedMotion]);
|
|
64
|
+
|
|
65
|
+
return (
|
|
66
|
+
<View ref={ref} pointerEvents="none" {...dataHook('bloomGlyphAttention')} style={CENTER}>
|
|
67
|
+
{children}
|
|
68
|
+
</View>
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function NativeGlyphAttention({ token, blocked, children }: Props) {
|
|
73
|
+
const previous = useRef(token);
|
|
74
|
+
const scale = useSharedValue(1);
|
|
75
|
+
const reducedMotion = usePrefersReducedMotion();
|
|
76
|
+
|
|
77
|
+
useLayoutEffect(() => {
|
|
78
|
+
const changed = !Object.is(previous.current, token);
|
|
79
|
+
previous.current = token;
|
|
80
|
+
cancelAnimation(scale);
|
|
81
|
+
scale.value = 1;
|
|
82
|
+
if (changed && !blocked && !reducedMotion && Number.isFinite(token)) {
|
|
83
|
+
const easing = Easing.bezier(0.2, 0.8, 0.2, 1);
|
|
84
|
+
scale.value = withSequence(
|
|
85
|
+
withTiming(1.12, { duration: 100, easing, reduceMotion: ReduceMotion.System }),
|
|
86
|
+
withTiming(1, { duration: 220, easing, reduceMotion: ReduceMotion.System }),
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
return () => cancelAnimation(scale);
|
|
90
|
+
}, [token, blocked, reducedMotion, scale]);
|
|
91
|
+
|
|
92
|
+
const style = useAnimatedStyle(() => ({ transform: [{ scale: scale.value }] }), [scale]);
|
|
93
|
+
return (
|
|
94
|
+
<Animated.View pointerEvents="none" style={[CENTER, style]}>
|
|
95
|
+
{children}
|
|
96
|
+
</Animated.View>
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export const GlyphAttention = IS_WEB ? WebGlyphAttention : NativeGlyphAttention;
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
resolveGlyphButtonPaint,
|
|
14
14
|
} from './shared';
|
|
15
15
|
import type { GlyphButtonProps } from './types';
|
|
16
|
+
import { GlyphAttention } from './GlyphAttention';
|
|
16
17
|
import { IS_WEB } from '../styles/platform';
|
|
17
18
|
import type { RefComponent } from '../styles/native-refs';
|
|
18
19
|
|
|
@@ -27,7 +28,7 @@ import type { RefComponent } from '../styles/native-refs';
|
|
|
27
28
|
* disabled `aria-disabled`, no press, dimmed to `disabledOpacity` (0.5)
|
|
28
29
|
* busy `aria-busy`, no press, NOT dimmed — working, not unavailable
|
|
29
30
|
*
|
|
30
|
-
*
|
|
31
|
+
* Default feedback changes colour only, with no scale, in 150ms. Focus is a 2px ring at a 2px offset,
|
|
31
32
|
* `:focus-visible` so a mouse press leaves none behind; `ring` is a PROP because
|
|
32
33
|
* these sit on surfaces Bloom does not own (artwork, a player bar) where the
|
|
33
34
|
* accent ring disappears.
|
|
@@ -86,10 +87,13 @@ function GlyphButtonComponent(
|
|
|
86
87
|
{
|
|
87
88
|
size = GLYPH_BUTTON_SIZE,
|
|
88
89
|
glyphSize,
|
|
90
|
+
attention,
|
|
89
91
|
icon: Icon,
|
|
90
92
|
children,
|
|
91
93
|
onPress,
|
|
92
94
|
onLongPress,
|
|
95
|
+
onFocus,
|
|
96
|
+
onBlur,
|
|
93
97
|
disabled = false,
|
|
94
98
|
busy = false,
|
|
95
99
|
pressed,
|
|
@@ -149,6 +153,11 @@ function GlyphButtonComponent(
|
|
|
149
153
|
'--bloom-glyph-button-ring': ring ?? paint.ring,
|
|
150
154
|
};
|
|
151
155
|
|
|
156
|
+
const glyphContent =
|
|
157
|
+
typeof children === 'function'
|
|
158
|
+
? children(foreground)
|
|
159
|
+
: (children ?? (Icon ? <Icon width={glyph} height={glyph} fill={foreground} /> : null));
|
|
160
|
+
|
|
152
161
|
return (
|
|
153
162
|
<Pressable
|
|
154
163
|
ref={ref}
|
|
@@ -181,6 +190,8 @@ function GlyphButtonComponent(
|
|
|
181
190
|
}
|
|
182
191
|
: undefined
|
|
183
192
|
}
|
|
193
|
+
onFocus={onFocus}
|
|
194
|
+
onBlur={onBlur}
|
|
184
195
|
onHoverIn={onHoverIn}
|
|
185
196
|
onHoverOut={onHoverOut}
|
|
186
197
|
onPressIn={onPressIn}
|
|
@@ -189,11 +200,15 @@ function GlyphButtonComponent(
|
|
|
189
200
|
style={[rootStyle, style]}
|
|
190
201
|
testID={testID}
|
|
191
202
|
>
|
|
192
|
-
|
|
193
|
-
{
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
203
|
+
{attention === undefined ? (
|
|
204
|
+
<View pointerEvents="none" style={{ alignItems: 'center', justifyContent: 'center' }}>
|
|
205
|
+
{glyphContent}
|
|
206
|
+
</View>
|
|
207
|
+
) : (
|
|
208
|
+
<GlyphAttention token={attention} blocked={blocked}>
|
|
209
|
+
{glyphContent}
|
|
210
|
+
</GlyphAttention>
|
|
211
|
+
)}
|
|
197
212
|
{decoration}
|
|
198
213
|
</Pressable>
|
|
199
214
|
);
|
package/src/button/types.ts
CHANGED
|
@@ -347,6 +347,17 @@ export interface CloseButtonProps {
|
|
|
347
347
|
* 0.6 is the middle of it (and exactly what the 40-box media header used).
|
|
348
348
|
*/
|
|
349
349
|
export interface GlyphButtonProps {
|
|
350
|
+
/** Original focus events from the interactive host; never activate the button. */
|
|
351
|
+
onFocus?: (event: ButtonFocusEvent) => void;
|
|
352
|
+
onBlur?: (event: ButtonFocusEvent) => void;
|
|
353
|
+
/**
|
|
354
|
+
* Opt-in attention token. Initialize it (for example to 0), then change it for
|
|
355
|
+
* each event that should softly pulse the glyph. Mounting is silent; repeated
|
|
356
|
+
* values do nothing. The button and its target keep their size and identity.
|
|
357
|
+
* Reduced motion, disabled and busy suppress the pulse. Supply a label or
|
|
358
|
+
* other visible feedback too: this motion carries no accessibility message.
|
|
359
|
+
*/
|
|
360
|
+
attention?: number;
|
|
350
361
|
/** Diameter of the round target. Default 36. */
|
|
351
362
|
size?: number;
|
|
352
363
|
/**
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Button } from '../button/Button';
|
|
2
|
+
import { Collapsible } from '../collapsible/Collapsible';
|
|
3
|
+
import { ScrollArea } from '../layout/ScrollArea';
|
|
4
|
+
import { Surface } from '../surface/Surface';
|
|
5
|
+
import { createCompactComposer } from './create-compact-composer';
|
|
6
|
+
|
|
7
|
+
export const CompactComposer = createCompactComposer({ Button, Collapsible, ScrollArea, Surface });
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Button } from '../button/Button.web';
|
|
2
|
+
import { Collapsible } from '../collapsible/Collapsible.web';
|
|
3
|
+
import { ScrollArea } from '../layout/ScrollArea.web';
|
|
4
|
+
import { Surface } from '../surface/Surface.web';
|
|
5
|
+
import { createCompactComposer } from './create-compact-composer';
|
|
6
|
+
|
|
7
|
+
export const CompactComposer = createCompactComposer({ Button, Collapsible, ScrollArea, Surface });
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Existing longer drafts remain intact; edits may shorten or replace them without growing. */
|
|
2
|
+
export function acceptsComposerText(current: string, next: string, maxLength: number): boolean {
|
|
3
|
+
return next.length <= maxLength || (current.length > maxLength && next.length <= current.length);
|
|
4
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { ButtonProps } from '../button/types';
|
|
3
|
+
import type { TextareaProps } from '../textarea/types';
|
|
4
|
+
import type { ViewStyleProp } from '../styles';
|
|
5
|
+
|
|
6
|
+
export interface CompactComposerAction {
|
|
7
|
+
id: string;
|
|
8
|
+
icon: NonNullable<ButtonProps['icon']>;
|
|
9
|
+
label: string;
|
|
10
|
+
onPress: () => void;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
testID?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface CompactComposerLabels {
|
|
16
|
+
input: string;
|
|
17
|
+
expand: string;
|
|
18
|
+
submit: string;
|
|
19
|
+
limitHint: string;
|
|
20
|
+
characterCount: string;
|
|
21
|
+
characterCountValue: (count: number, max: number) => string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** A controlled compact editor. The application owns drafts, uploads and publication. */
|
|
25
|
+
export interface CompactComposerProps extends ViewStyleProp {
|
|
26
|
+
value: string;
|
|
27
|
+
onChangeText: (value: string) => void;
|
|
28
|
+
/** UTF-16 character limit. Existing longer values remain editable toward this limit. */
|
|
29
|
+
maxLength: number;
|
|
30
|
+
inputRef?: TextareaProps['inputRef'];
|
|
31
|
+
placeholder?: string;
|
|
32
|
+
avatar?: ReactNode;
|
|
33
|
+
/** Pass null when empty; previews and their domain actions belong to the application. */
|
|
34
|
+
attachments?: ReactNode;
|
|
35
|
+
attachmentActions?: readonly CompactComposerAction[];
|
|
36
|
+
onExpand?: () => void;
|
|
37
|
+
onSubmit: () => void;
|
|
38
|
+
/** Input focus, retained when focus moves to a capsule control. Resets on leaving or unmount. */
|
|
39
|
+
onFocusChange?: (focused: boolean) => void;
|
|
40
|
+
disabled?: boolean;
|
|
41
|
+
busy?: boolean;
|
|
42
|
+
/** Additional application permission; empty or over-limit drafts still cannot submit. */
|
|
43
|
+
canSubmit?: boolean;
|
|
44
|
+
labels?: Partial<CompactComposerLabels>;
|
|
45
|
+
className?: string;
|
|
46
|
+
testID?: string;
|
|
47
|
+
}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type ComponentRef,
|
|
3
|
+
useCallback,
|
|
4
|
+
useEffect,
|
|
5
|
+
useLayoutEffect,
|
|
6
|
+
useRef,
|
|
7
|
+
useState,
|
|
8
|
+
} from 'react';
|
|
9
|
+
import type { View as NativeView } from 'react-native';
|
|
10
|
+
import type { Button as ButtonComponent } from '../button/Button';
|
|
11
|
+
import { GlyphButton } from '../button/GlyphButton';
|
|
12
|
+
import type { Collapsible as CollapsibleComponent } from '../collapsible/Collapsible';
|
|
13
|
+
import { RiExpandDiagonalSLine } from '../icons/remix/RiExpandDiagonalSLine';
|
|
14
|
+
import type { ScrollArea as ScrollAreaComponent } from '../layout/ScrollArea';
|
|
15
|
+
import { Toolbar } from '../layout/Toolbar';
|
|
16
|
+
import { useCommonMessages } from '../locale/common-messages';
|
|
17
|
+
import { useMessages } from '../locale/messages';
|
|
18
|
+
import { MeterRing } from '../stat-bar/MeterRing';
|
|
19
|
+
import { IS_WEB } from '../styles/platform';
|
|
20
|
+
import { StyledView as View } from '../styles/styled-primitives';
|
|
21
|
+
import type { Surface as SurfaceComponent } from '../surface/Surface';
|
|
22
|
+
import { Textarea } from '../textarea/Textarea';
|
|
23
|
+
import { COMPACT_COMPOSER_MESSAGES } from './messages';
|
|
24
|
+
import { acceptsComposerText } from './compact-text';
|
|
25
|
+
import type { CompactComposerProps } from './compact-types';
|
|
26
|
+
|
|
27
|
+
/** Bind platform surfaces once. Both renderers share the same editor and behavior. */
|
|
28
|
+
export function createCompactComposer({
|
|
29
|
+
Button,
|
|
30
|
+
Collapsible,
|
|
31
|
+
ScrollArea,
|
|
32
|
+
Surface,
|
|
33
|
+
}: {
|
|
34
|
+
Button: typeof ButtonComponent;
|
|
35
|
+
Collapsible: typeof CollapsibleComponent;
|
|
36
|
+
ScrollArea: typeof ScrollAreaComponent;
|
|
37
|
+
Surface: typeof SurfaceComponent;
|
|
38
|
+
}) {
|
|
39
|
+
function CompactComposer({
|
|
40
|
+
value,
|
|
41
|
+
onChangeText,
|
|
42
|
+
maxLength,
|
|
43
|
+
inputRef,
|
|
44
|
+
placeholder,
|
|
45
|
+
avatar,
|
|
46
|
+
attachments,
|
|
47
|
+
attachmentActions = [],
|
|
48
|
+
onExpand,
|
|
49
|
+
onSubmit,
|
|
50
|
+
onFocusChange,
|
|
51
|
+
disabled = false,
|
|
52
|
+
busy = false,
|
|
53
|
+
canSubmit = true,
|
|
54
|
+
labels,
|
|
55
|
+
className,
|
|
56
|
+
style,
|
|
57
|
+
testID,
|
|
58
|
+
}: CompactComposerProps) {
|
|
59
|
+
const { messages } = useMessages(COMPACT_COMPOSER_MESSAGES);
|
|
60
|
+
const common = useCommonMessages();
|
|
61
|
+
const capsule = useRef<ComponentRef<typeof NativeView>>(null);
|
|
62
|
+
const [focused, setFocused] = useState(false);
|
|
63
|
+
const [attempt, setAttempt] = useState(0);
|
|
64
|
+
const focusCallback = useRef(onFocusChange);
|
|
65
|
+
useLayoutEffect(() => {
|
|
66
|
+
focusCallback.current = onFocusChange;
|
|
67
|
+
}, [onFocusChange]);
|
|
68
|
+
useEffect(() => () => focusCallback.current?.(false), []);
|
|
69
|
+
const updateFocus = useCallback((next: boolean) => {
|
|
70
|
+
setFocused(next);
|
|
71
|
+
focusCallback.current?.(next);
|
|
72
|
+
}, []);
|
|
73
|
+
const handleBlur = useCallback(
|
|
74
|
+
(event: unknown) => {
|
|
75
|
+
const next = (event as { relatedTarget?: Node }).relatedTarget;
|
|
76
|
+
const node = capsule.current as unknown as { contains?: (target: Node) => boolean } | null;
|
|
77
|
+
if (IS_WEB && next && node?.contains?.(next)) return;
|
|
78
|
+
updateFocus(false);
|
|
79
|
+
},
|
|
80
|
+
[updateFocus],
|
|
81
|
+
);
|
|
82
|
+
const hasAttachments = attachments != null && attachments !== false;
|
|
83
|
+
const blocked = disabled || busy;
|
|
84
|
+
const expanded = focused || value.length > 0 || busy || hasAttachments;
|
|
85
|
+
const submitEnabled =
|
|
86
|
+
!blocked &&
|
|
87
|
+
canSubmit &&
|
|
88
|
+
value.length <= maxLength &&
|
|
89
|
+
(value.trim().length > 0 || hasAttachments);
|
|
90
|
+
const id = (part: string) => (testID ? `${testID}-${part}` : undefined);
|
|
91
|
+
const inputLabel = labels?.input ?? placeholder ?? messages.input;
|
|
92
|
+
const actions = (location: string) =>
|
|
93
|
+
attachmentActions.map((action) => (
|
|
94
|
+
<Button
|
|
95
|
+
key={action.id}
|
|
96
|
+
appearance="plain"
|
|
97
|
+
tone="neutral"
|
|
98
|
+
size="sm"
|
|
99
|
+
iconOnly
|
|
100
|
+
icon={action.icon}
|
|
101
|
+
iconSize={24}
|
|
102
|
+
accessibilityLabel={action.label}
|
|
103
|
+
onPress={action.onPress}
|
|
104
|
+
onBlur={handleBlur}
|
|
105
|
+
disabled={blocked || action.disabled}
|
|
106
|
+
testID={action.testID ?? id(`${location}-${action.id}`)}
|
|
107
|
+
/>
|
|
108
|
+
));
|
|
109
|
+
return (
|
|
110
|
+
<Surface
|
|
111
|
+
ref={capsule}
|
|
112
|
+
radius={28}
|
|
113
|
+
className={['overflow-hidden', className].filter(Boolean).join(' ')}
|
|
114
|
+
style={style}
|
|
115
|
+
testID={testID}
|
|
116
|
+
>
|
|
117
|
+
<ScrollArea
|
|
118
|
+
className="max-h-64 md:max-h-80"
|
|
119
|
+
containerClassName="max-h-64 md:max-h-80"
|
|
120
|
+
contentContainerClassName="px-3 py-1.5"
|
|
121
|
+
scrollbar="always"
|
|
122
|
+
keyboardShouldPersistTaps="handled"
|
|
123
|
+
testID={id('scroll')}
|
|
124
|
+
>
|
|
125
|
+
{attachments}
|
|
126
|
+
<View className="min-h-11 flex-row items-center gap-3">
|
|
127
|
+
{avatar}
|
|
128
|
+
<Textarea
|
|
129
|
+
inputRef={inputRef}
|
|
130
|
+
onFocus={() => updateFocus(true)}
|
|
131
|
+
onBlur={handleBlur}
|
|
132
|
+
value={value}
|
|
133
|
+
onChangeText={(next) => {
|
|
134
|
+
if (disabled) return;
|
|
135
|
+
if (acceptsComposerText(value, next, maxLength)) onChangeText(next);
|
|
136
|
+
else setAttempt((current) => current + 1);
|
|
137
|
+
}}
|
|
138
|
+
disabled={disabled}
|
|
139
|
+
placeholder={placeholder ?? messages.input}
|
|
140
|
+
accessibilityLabel={inputLabel}
|
|
141
|
+
size="sm"
|
|
142
|
+
rows={1}
|
|
143
|
+
autoResize
|
|
144
|
+
scrollEnabled={false}
|
|
145
|
+
className="min-w-0 flex-1"
|
|
146
|
+
fieldClassName="bg-transparent"
|
|
147
|
+
inputClassName="overflow-hidden p-0 text-base leading-5 text-foreground"
|
|
148
|
+
testID={id('input')}
|
|
149
|
+
/>
|
|
150
|
+
<View className="flex-row items-center">
|
|
151
|
+
{!expanded ? actions('inline') : null}
|
|
152
|
+
{onExpand ? (
|
|
153
|
+
<GlyphButton
|
|
154
|
+
onBlur={handleBlur}
|
|
155
|
+
size={32}
|
|
156
|
+
glyphSize={32}
|
|
157
|
+
hitSlop={6}
|
|
158
|
+
attention={attempt}
|
|
159
|
+
accessibilityHint={labels?.limitHint ?? messages.limitHint(maxLength)}
|
|
160
|
+
icon={RiExpandDiagonalSLine}
|
|
161
|
+
accessibilityLabel={labels?.expand ?? messages.expand}
|
|
162
|
+
disabled={blocked}
|
|
163
|
+
testID={id('maximize')}
|
|
164
|
+
onPress={onExpand}
|
|
165
|
+
/>
|
|
166
|
+
) : null}
|
|
167
|
+
</View>
|
|
168
|
+
</View>
|
|
169
|
+
</ScrollArea>
|
|
170
|
+
<Collapsible open={expanded}>
|
|
171
|
+
<Toolbar
|
|
172
|
+
size="sm"
|
|
173
|
+
style={{ paddingLeft: 8, paddingRight: 12, paddingTop: 8, paddingBottom: 8 }}
|
|
174
|
+
testID={id('toolbar')}
|
|
175
|
+
actions={
|
|
176
|
+
<View className="flex-row items-center gap-3">
|
|
177
|
+
<MeterRing
|
|
178
|
+
value={value.length}
|
|
179
|
+
max={maxLength}
|
|
180
|
+
size={20}
|
|
181
|
+
thickness={2}
|
|
182
|
+
accessibilityLabel={labels?.characterCount ?? messages.characterCount}
|
|
183
|
+
valueText={(labels?.characterCountValue ?? messages.characterCountValue)(
|
|
184
|
+
value.length,
|
|
185
|
+
maxLength,
|
|
186
|
+
)}
|
|
187
|
+
testID={id('count')}
|
|
188
|
+
/>
|
|
189
|
+
<Button
|
|
190
|
+
onBlur={handleBlur}
|
|
191
|
+
tone="action"
|
|
192
|
+
size="md"
|
|
193
|
+
className="min-w-20"
|
|
194
|
+
onPress={() => {
|
|
195
|
+
if (submitEnabled) onSubmit();
|
|
196
|
+
}}
|
|
197
|
+
disabled={!submitEnabled}
|
|
198
|
+
loading={busy}
|
|
199
|
+
testID={id('submit')}
|
|
200
|
+
>
|
|
201
|
+
{labels?.submit ?? common.send}
|
|
202
|
+
</Button>
|
|
203
|
+
</View>
|
|
204
|
+
}
|
|
205
|
+
>
|
|
206
|
+
<View className="flex-row items-center">{actions('toolbar')}</View>
|
|
207
|
+
</Toolbar>
|
|
208
|
+
</Collapsible>
|
|
209
|
+
</Surface>
|
|
210
|
+
);
|
|
211
|
+
}
|
|
212
|
+
return CompactComposer;
|
|
213
|
+
}
|
|
@@ -47,3 +47,11 @@ export type {
|
|
|
47
47
|
VoiceRecorderProps,
|
|
48
48
|
VoiceRecorderState,
|
|
49
49
|
} from './types';
|
|
50
|
+
|
|
51
|
+
export { CompactComposer } from './CompactComposer';
|
|
52
|
+
export { acceptsComposerText } from './compact-text';
|
|
53
|
+
export type {
|
|
54
|
+
CompactComposerProps,
|
|
55
|
+
CompactComposerLabels,
|
|
56
|
+
CompactComposerAction,
|
|
57
|
+
} from './compact-types';
|
|
@@ -52,3 +52,11 @@ export type {
|
|
|
52
52
|
VoiceRecorderProps,
|
|
53
53
|
VoiceRecorderState,
|
|
54
54
|
} from './types';
|
|
55
|
+
|
|
56
|
+
export { CompactComposer } from './CompactComposer.web';
|
|
57
|
+
export { acceptsComposerText } from './compact-text';
|
|
58
|
+
export type {
|
|
59
|
+
CompactComposerProps,
|
|
60
|
+
CompactComposerLabels,
|
|
61
|
+
CompactComposerAction,
|
|
62
|
+
} from './compact-types';
|
|
@@ -108,3 +108,19 @@ export const CHAT_COMPOSER_MESSAGES: MessageCatalog<ChatComposerMessages> =
|
|
|
108
108
|
music: 'Music',
|
|
109
109
|
},
|
|
110
110
|
});
|
|
111
|
+
|
|
112
|
+
export interface CompactComposerMessages {
|
|
113
|
+
input: string;
|
|
114
|
+
expand: string;
|
|
115
|
+
characterCount: string;
|
|
116
|
+
characterCountValue: (count: number, max: number) => string;
|
|
117
|
+
limitHint: (max: number) => string;
|
|
118
|
+
}
|
|
119
|
+
export const COMPACT_COMPOSER_MESSAGES: MessageCatalog<CompactComposerMessages> =
|
|
120
|
+
defineMessages<CompactComposerMessages>('COMPACT_COMPOSER_MESSAGES', {
|
|
121
|
+
input: 'Write a message',
|
|
122
|
+
expand: 'Open full composer',
|
|
123
|
+
characterCount: 'Characters',
|
|
124
|
+
characterCountValue: (count, max) => `${count} of ${max} characters`,
|
|
125
|
+
limitHint: (max) => `Compact messages allow ${max} characters. Expand to write more.`,
|
|
126
|
+
});
|
package/src/icons/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//
|
|
1
|
+
// General glyphs use Remix Icon (Remix Icon License 1.0, `remix/LICENSE.txt`),
|
|
2
2
|
// one file per icon under `remix/`. The few brand marks Remix lacks come from
|
|
3
3
|
// Simple Icons (CC0 1.0) under `simple-icons/`. Old Bloom icon names map to
|
|
4
4
|
// their Remix equivalents in `remix-mapping.json`;
|
|
@@ -10,3 +10,4 @@ export { resolveIconSlot } from './render-icon';
|
|
|
10
10
|
export { sizes, useCommonSVGProps } from './shared';
|
|
11
11
|
export * from './remix';
|
|
12
12
|
export * from './simple-icons';
|
|
13
|
+
export * from './social';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { createSinglePathSVG } from '../TEMPLATE';
|
|
2
|
+
|
|
3
|
+
/** An outlined bookmark. */
|
|
4
|
+
export const BookmarkIcon = createSinglePathSVG({
|
|
5
|
+
path: 'M4 4.5C4 3.12 5.119 2 6.5 2h11C18.881 2 20 3.12 20 4.5v18.44l-8-5.71-8 5.71V4.5zM6.5 4c-.276 0-.5.22-.5.5v14.56l6-4.29 6 4.29V4.5c0-.28-.224-.5-.5-.5h-11z',
|
|
6
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { createSinglePathSVG } from '../TEMPLATE';
|
|
2
|
+
|
|
3
|
+
/** A rounded square with GIF lettering. */
|
|
4
|
+
export const GifAttachmentIcon = createSinglePathSVG({
|
|
5
|
+
path: 'M3 5.5C3 4.119 4.12 3 5.5 3h13C19.88 3 21 4.119 21 5.5v13c0 1.381-1.12 2.5-2.5 2.5h-13C4.12 21 3 19.881 3 18.5v-13zM5.5 5c-.28 0-.5.224-.5.5v13c0 .276.22.5.5.5h13c.28 0 .5-.224.5-.5v-13c0-.276-.22-.5-.5-.5h-13zM18 10.711V9.25h-3.74v5.5h1.44v-1.719h1.7V11.57h-1.7v-.859H18zM11.79 9.25h1.44v5.5h-1.44v-5.5zm-3.07 1.375c.34 0 .77.172 1.02.43l1.03-.86c-.51-.601-1.28-.945-2.05-.945C7.19 9.25 6 10.453 6 12s1.19 2.75 2.72 2.75c.85 0 1.54-.344 2.05-.945v-2.149H8.38v1.032H9.4v.515c-.17.086-.42.172-.68.172-.76 0-1.36-.602-1.36-1.375 0-.688.6-1.375 1.36-1.375z',
|
|
6
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createSinglePathSVG } from '../TEMPLATE';
|
|
2
|
+
|
|
3
|
+
/** A filled heart. */
|
|
4
|
+
export const LikeFillIcon = createSinglePathSVG({
|
|
5
|
+
path: 'M1.34375 7.03125L1.34375 7.04043C1.34374 7.54211 1.34372 8.26295 1.6611 9.15585C1.9795 10.0516 2.60026 11.0779 3.77681 12.2544C5.59273 14.0704 7.58105 15.5215 8.33387 16.0497C8.73525 16.3313 9.26573 16.3313 9.66705 16.0496C10.4197 15.5213 12.4074 14.0703 14.2232 12.2544C15.3997 11.0779 16.0205 10.0516 16.3389 9.15585C16.6563 8.26296 16.6563 7.54211 16.6562 7.04043V7.03125C16.6562 4.73466 15.0849 2.75 12.6562 2.75C11.5214 2.75 10.6433 3.28244 9.99228 3.95476C9.59009 4.37012 9.26356 4.8491 9 5.31533C8.73645 4.8491 8.40991 4.37012 8.00772 3.95476C7.35672 3.28244 6.47861 2.75 5.34375 2.75C2.9151 2.75 1.34375 4.73466 1.34375 7.03125Z',
|
|
6
|
+
viewBox: '0 0 18 18',
|
|
7
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createSinglePathSVG } from '../TEMPLATE';
|
|
2
|
+
|
|
3
|
+
/** An outlined heart. */
|
|
4
|
+
export const LikeIcon = createSinglePathSVG({
|
|
5
|
+
path: 'M1.34375 7.53125L1.34375 7.54043C1.34374 8.04211 1.34372 8.76295 1.6611 9.65585C1.9795 10.5516 2.60026 11.5779 3.77681 12.7544C5.59273 14.5704 7.58105 16.0215 8.33387 16.5497C8.73525 16.8313 9.26573 16.8313 9.66705 16.5496C10.4197 16.0213 12.4074 14.5703 14.2232 12.7544C15.3997 11.5779 16.0205 10.5516 16.3389 9.65585C16.6563 8.76296 16.6563 8.04211 16.6562 7.54043V7.53125C16.6562 5.23466 15.0849 3.25 12.6562 3.25C11.5214 3.25 10.6433 3.78244 9.99228 4.45476C9.59009 4.87012 9.26356 5.3491 9 5.81533C8.73645 5.3491 8.40991 4.87012 8.00772 4.45476C7.35672 3.78244 6.47861 3.25 5.34375 3.25C2.9151 3.25 1.34375 5.23466 1.34375 7.53125Z',
|
|
6
|
+
viewBox: '0 0 18 18',
|
|
7
|
+
strokeWidth: 1.8,
|
|
8
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { createSinglePathSVG } from '../TEMPLATE';
|
|
2
|
+
|
|
3
|
+
/** Two overlapping photo and video cards. */
|
|
4
|
+
export const MediaAttachmentIcon = createSinglePathSVG({
|
|
5
|
+
path: 'm18.509 14.757-4.285-2.474a.857.857 0 0 0-1.286.743v4.948a.857.857 0 0 0 1.286.742l4.285-2.474a.857.857 0 0 0 0-1.485ZM5.225 3.977a1.25 1.25 0 1 0 1.25 1.25 1.25 1.25 0 0 0-1.25-1.25ZM19.5 7.5h-3v-3a4.004 4.004 0 0 0-4-4h-8a4.004 4.004 0 0 0-4 4v8a4.004 4.004 0 0 0 4 4h3v3a4.004 4.004 0 0 0 4 4h8a4.004 4.004 0 0 0 4-4v-8a4.004 4.004 0 0 0-4-4Zm-12 7h-3a1.997 1.997 0 0 1-1.882-1.349l2.607-2.607L7.5 12.819Zm.23-4.28L6.41 8.9a1.679 1.679 0 0 0-2.37 0L2.5 10.44V4.5a2.003 2.003 0 0 1 2-2h8a2.003 2.003 0 0 1 2 2v3h-3a3.992 3.992 0 0 0-3.77 2.72ZM21.5 19.5a2.003 2.003 0 0 1-2 2h-8a2.003 2.003 0 0 1-2-2v-8a2.003 2.003 0 0 1 2-2h8a2.003 2.003 0 0 1 2 2Z',
|
|
6
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createSinglePathSVG } from '../TEMPLATE';
|
|
2
|
+
|
|
3
|
+
/** A rounded reply bubble with a trailing tail. */
|
|
4
|
+
export const ReplyIcon = createSinglePathSVG({
|
|
5
|
+
path: 'M15.376 13.2177L16.2861 16.7955L12.7106 15.8848C12.6781 15.8848 12.6131 15.8848 12.5806 15.8848C11.3779 16.5678 9.94767 16.8931 8.41995 16.7955C4.94194 16.5353 2.08152 13.7381 1.72397 10.2578C1.2689 5.63919 5.13697 1.76863 9.75264 2.22399C13.2307 2.58177 16.0261 5.41151 16.2861 8.92429C16.4161 10.453 16.0586 11.8841 15.376 13.0876C15.376 13.1526 15.376 13.1852 15.376 13.2177Z',
|
|
6
|
+
viewBox: '0 0 18 18',
|
|
7
|
+
strokeWidth: 1.5,
|
|
8
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { createSinglePathSVG } from '../TEMPLATE';
|
|
2
|
+
|
|
3
|
+
/** Two opposing arrows for reposting. */
|
|
4
|
+
export const RepostIcon = createSinglePathSVG({
|
|
5
|
+
path: 'M4.5 3.88l4.432 4.14-1.364 1.46L5.5 7.55V16c0 1.1.896 2 2 2H13v2H7.5c-2.209 0-4-1.79-4-4V7.55L1.432 9.48.068 8.02 4.5 3.88zM16.5 6H11V4h5.5c2.209 0 4 1.79 4 4v8.45l2.068-1.93 1.364 1.46-4.432 4.14-4.432-4.14 1.364-1.46 2.068 1.93V8c0-1.1-.896-2-2-2z',
|
|
6
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { createSinglePathSVG } from '../TEMPLATE';
|
|
2
|
+
|
|
3
|
+
/** An upward arrow above an open tray. */
|
|
4
|
+
export const ShareIcon = createSinglePathSVG({
|
|
5
|
+
path: 'M12 2.59l5.7 5.7-1.41 1.42L13 6.41V16h-2V6.41l-3.3 3.3-1.41-1.42L12 2.59zM21 15l-.02 3.51c0 1.38-1.12 2.49-2.5 2.49H5.5C4.11 21 3 19.88 3 18.5V15h2v3.5c0 .28.22.5.5.5h12.98c.28 0 .5-.22.5-.5L19 15h2z',
|
|
6
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { MediaAttachmentIcon } from './MediaAttachmentIcon';
|
|
2
|
+
export { GifAttachmentIcon } from './GifAttachmentIcon';
|
|
3
|
+
export { ReplyIcon } from './ReplyIcon';
|
|
4
|
+
export { RepostIcon } from './RepostIcon';
|
|
5
|
+
export { LikeIcon } from './LikeIcon';
|
|
6
|
+
export { LikeFillIcon } from './LikeFillIcon';
|
|
7
|
+
export { BookmarkIcon } from './BookmarkIcon';
|
|
8
|
+
export { BookmarkFillIcon } from './BookmarkFillIcon';
|
|
9
|
+
export { ShareIcon } from './ShareIcon';
|