@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
|
@@ -31,10 +31,10 @@ import {
|
|
|
31
31
|
useContext,
|
|
32
32
|
useEffect,
|
|
33
33
|
useMemo,
|
|
34
|
+
useRef,
|
|
34
35
|
useState,
|
|
35
36
|
useSyncExternalStore,
|
|
36
37
|
type ComponentType,
|
|
37
|
-
type ComponentProps,
|
|
38
38
|
} from 'react';
|
|
39
39
|
import {
|
|
40
40
|
Platform,
|
|
@@ -42,6 +42,7 @@ import {
|
|
|
42
42
|
StyleSheet,
|
|
43
43
|
View,
|
|
44
44
|
type GestureResponderEvent,
|
|
45
|
+
type PressableStateCallbackType,
|
|
45
46
|
type ViewStyle,
|
|
46
47
|
} from 'react-native';
|
|
47
48
|
import { Gesture, GestureDetector } from 'react-native-gesture-handler';
|
|
@@ -53,6 +54,8 @@ import Animated, {
|
|
|
53
54
|
useAnimatedReaction,
|
|
54
55
|
useAnimatedStyle,
|
|
55
56
|
useSharedValue,
|
|
57
|
+
useDerivedValue,
|
|
58
|
+
withSpring,
|
|
56
59
|
type SharedValue,
|
|
57
60
|
} from 'react-native-reanimated';
|
|
58
61
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
@@ -79,13 +82,16 @@ import {
|
|
|
79
82
|
LABEL_FONT_SIZE,
|
|
80
83
|
LONG_PRESS_MIN_DURATION,
|
|
81
84
|
MINIMIZED_HEIGHT,
|
|
85
|
+
DOCK_NAVIGATION_PHASE,
|
|
82
86
|
MINIMIZED_INSET,
|
|
83
87
|
ROW_PAD_H,
|
|
84
88
|
useTabBarTheme,
|
|
85
89
|
type TabBarGlyphProps,
|
|
86
|
-
type TabBarSurfaceComponent,
|
|
87
90
|
} from './shared';
|
|
88
91
|
import type { TabBarButtonProps, TabBarProps, TabBarTheme } from './types';
|
|
92
|
+
import { useScreenContext } from '../screen/context';
|
|
93
|
+
import { usePrefersReducedMotion } from '../hooks/use-prefers-reduced-motion';
|
|
94
|
+
import { MINIMIZE_SPRING } from './context';
|
|
89
95
|
import { useCssSafeAreaInsets } from '../hooks/use-css-safe-area-insets';
|
|
90
96
|
|
|
91
97
|
/**
|
|
@@ -95,6 +101,8 @@ import { useCssSafeAreaInsets } from '../hooks/use-css-safe-area-insets';
|
|
|
95
101
|
*/
|
|
96
102
|
type BarContextValue = {
|
|
97
103
|
scrollable: boolean;
|
|
104
|
+
collapseActive: boolean;
|
|
105
|
+
expand: () => void;
|
|
98
106
|
/** Live highlight position, in tab units. Fractional while scrubbing. */
|
|
99
107
|
progress: SharedValue<number>;
|
|
100
108
|
slideIndex: SharedValue<number>;
|
|
@@ -119,8 +127,11 @@ type BarContextValue = {
|
|
|
119
127
|
driven: boolean;
|
|
120
128
|
/** Report a selection made by a button press. */
|
|
121
129
|
selectIndex: (index: number) => void;
|
|
130
|
+
longPressIndex: ((index: number) => void) | undefined;
|
|
122
131
|
};
|
|
123
132
|
|
|
133
|
+
const AnimatedPressable = Animated.createAnimatedComponent(Pressable);
|
|
134
|
+
|
|
124
135
|
const BarContext = createContext<BarContextValue | null>(null);
|
|
125
136
|
const subscribeHydration = () => () => {};
|
|
126
137
|
const hydratedSnapshot = () => true;
|
|
@@ -151,10 +162,16 @@ function gestureReportedPress(event: GestureResponderEvent): boolean {
|
|
|
151
162
|
function OptionalGesture({
|
|
152
163
|
enabled,
|
|
153
164
|
children,
|
|
154
|
-
|
|
155
|
-
}:
|
|
156
|
-
|
|
157
|
-
|
|
165
|
+
gesture,
|
|
166
|
+
}: {
|
|
167
|
+
enabled: boolean;
|
|
168
|
+
children: React.ReactNode;
|
|
169
|
+
gesture: ReturnType<typeof Gesture.Race> | undefined;
|
|
170
|
+
}) {
|
|
171
|
+
return enabled && gesture ? (
|
|
172
|
+
<GestureDetector gesture={gesture} touchAction="none">
|
|
173
|
+
{children}
|
|
174
|
+
</GestureDetector>
|
|
158
175
|
) : (
|
|
159
176
|
<Fragment>{children}</Fragment>
|
|
160
177
|
);
|
|
@@ -182,6 +199,7 @@ function TabBarBody({
|
|
|
182
199
|
embedded = false,
|
|
183
200
|
scrollable = false,
|
|
184
201
|
minimizeProgress,
|
|
202
|
+
minimizeBehavior = 'compact',
|
|
185
203
|
onLayout,
|
|
186
204
|
style,
|
|
187
205
|
...viewProps
|
|
@@ -189,8 +207,28 @@ function TabBarBody({
|
|
|
189
207
|
const insets = useCssSafeAreaInsets(useSafeAreaInsets());
|
|
190
208
|
const [containerWidth, setContainerWidth] = useState(0);
|
|
191
209
|
const minimized = useMinimizeState();
|
|
192
|
-
const
|
|
210
|
+
const sourceProgress = minimizeProgress ?? minimized.progress;
|
|
211
|
+
const screen = useScreenContext();
|
|
212
|
+
const sourceTarget =
|
|
213
|
+
screen?.collapseProgress === sourceProgress ? screen.collapseTarget : undefined;
|
|
193
214
|
const tabCount = Math.max(Children.count(children), 1);
|
|
215
|
+
const collapseActive =
|
|
216
|
+
minimizeBehavior === 'active' &&
|
|
217
|
+
activeIndex != null &&
|
|
218
|
+
activeIndex >= 0 &&
|
|
219
|
+
activeIndex < tabCount;
|
|
220
|
+
const reducedMotion = usePrefersReducedMotion();
|
|
221
|
+
const foldedProgress = useDerivedValue(() => {
|
|
222
|
+
const amount = reducedMotion ? Number(sourceProgress.value > 0.01) : sourceProgress.value;
|
|
223
|
+
return Math.min(1, Math.max(0, amount / DOCK_NAVIGATION_PHASE));
|
|
224
|
+
}, [reducedMotion, sourceProgress]);
|
|
225
|
+
const progress = collapseActive ? foldedProgress : sourceProgress;
|
|
226
|
+
const expand = useCallback(() => {
|
|
227
|
+
setMinimized(minimized, 0);
|
|
228
|
+
if (sourceTarget) sourceTarget.value = 0;
|
|
229
|
+
if (sourceProgress !== minimized.progress)
|
|
230
|
+
sourceProgress.value = reducedMotion ? 0 : withSpring(0, MINIMIZE_SPRING);
|
|
231
|
+
}, [minimized, sourceProgress, sourceTarget, reducedMotion]);
|
|
194
232
|
|
|
195
233
|
// Is a tab selected at all?
|
|
196
234
|
//
|
|
@@ -373,6 +411,7 @@ function TabBarBody({
|
|
|
373
411
|
// produced both, ~600ms apart on a busy JS thread, so every consumer got two
|
|
374
412
|
// selections per tap. `TabBarButtonBody` is where that is resolved.
|
|
375
413
|
const gesture = useMemo(() => {
|
|
414
|
+
if (collapseActive || scrollable) return undefined;
|
|
376
415
|
const indexAtX = (x: number, minimizedValue: number) => {
|
|
377
416
|
'worklet';
|
|
378
417
|
const sideInset = interpolate(
|
|
@@ -477,6 +516,8 @@ function TabBarBody({
|
|
|
477
516
|
|
|
478
517
|
return Gesture.Race(pan, tap, longPress);
|
|
479
518
|
}, [
|
|
519
|
+
collapseActive,
|
|
520
|
+
scrollable,
|
|
480
521
|
barOuterWidth,
|
|
481
522
|
minimizeInset,
|
|
482
523
|
tabCount,
|
|
@@ -574,6 +615,41 @@ function TabBarBody({
|
|
|
574
615
|
};
|
|
575
616
|
}, [progress, slideIndex, highlightOpacity, barOuterWidth, tabCount, minimizeInset, dir]);
|
|
576
617
|
|
|
618
|
+
// Flex owns the folding highlight just as it owns the destination cells.
|
|
619
|
+
// No measured positions or React render is needed during the motion.
|
|
620
|
+
const leadingFoldStyle = useAnimatedStyle(
|
|
621
|
+
() => ({
|
|
622
|
+
flexGrow: Math.max(0, activeIndex ?? 0) * (1 - Math.min(1, Math.max(0, progress.value))),
|
|
623
|
+
}),
|
|
624
|
+
[activeIndex, progress],
|
|
625
|
+
);
|
|
626
|
+
const trailingFoldStyle = useAnimatedStyle(
|
|
627
|
+
() => ({
|
|
628
|
+
flexGrow:
|
|
629
|
+
Math.max(0, tabCount - (activeIndex ?? 0) - 1) *
|
|
630
|
+
(1 - Math.min(1, Math.max(0, progress.value))),
|
|
631
|
+
}),
|
|
632
|
+
[activeIndex, tabCount, progress],
|
|
633
|
+
);
|
|
634
|
+
const foldingRowStyle = useAnimatedStyle(
|
|
635
|
+
() => ({
|
|
636
|
+
paddingLeft: ROW_PAD_H * (1 - Math.min(1, Math.max(0, progress.value))),
|
|
637
|
+
paddingRight: ROW_PAD_H * (1 - Math.min(1, Math.max(0, progress.value))),
|
|
638
|
+
}),
|
|
639
|
+
[progress],
|
|
640
|
+
);
|
|
641
|
+
const foldingHighlightStyle = useAnimatedStyle(
|
|
642
|
+
() => ({
|
|
643
|
+
height: interpolate(
|
|
644
|
+
progress.value,
|
|
645
|
+
[0, 1],
|
|
646
|
+
[HIGHLIGHT_EXPANDED, HIGHLIGHT_MINIMIZED],
|
|
647
|
+
Extrapolation.CLAMP,
|
|
648
|
+
),
|
|
649
|
+
}),
|
|
650
|
+
[progress],
|
|
651
|
+
);
|
|
652
|
+
|
|
577
653
|
// Shared with `useTabBarFootprint`, so a consumer accounting for the bar in
|
|
578
654
|
// its own layout can never drift from where the bar actually sits.
|
|
579
655
|
const bottomOffset = embedded ? 0 : windowEdgeGap(insets.bottom);
|
|
@@ -599,10 +675,14 @@ function TabBarBody({
|
|
|
599
675
|
// item count or by `maxWidth` gets one definite centred width so layout,
|
|
600
676
|
// highlight geometry and hit-testing all share the same coordinate space.
|
|
601
677
|
const constrainedWrapStyle: ViewStyle | null =
|
|
602
|
-
barOuterWidth === availableWidth
|
|
678
|
+
collapseActive || barOuterWidth === availableWidth
|
|
679
|
+
? null
|
|
680
|
+
: { width: barOuterWidth, alignSelf: 'center' };
|
|
603
681
|
const barContext = useMemo(
|
|
604
682
|
() => ({
|
|
605
|
-
scrollable,
|
|
683
|
+
scrollable: scrollable || collapseActive,
|
|
684
|
+
collapseActive,
|
|
685
|
+
expand,
|
|
606
686
|
progress,
|
|
607
687
|
slideIndex,
|
|
608
688
|
highlightOpacity,
|
|
@@ -612,9 +692,12 @@ function TabBarBody({
|
|
|
612
692
|
activeIndex,
|
|
613
693
|
driven,
|
|
614
694
|
selectIndex,
|
|
695
|
+
longPressIndex: onIndexLongPress ? longPressIndex : undefined,
|
|
615
696
|
}),
|
|
616
697
|
[
|
|
617
698
|
scrollable,
|
|
699
|
+
collapseActive,
|
|
700
|
+
expand,
|
|
618
701
|
progress,
|
|
619
702
|
slideIndex,
|
|
620
703
|
highlightOpacity,
|
|
@@ -623,6 +706,8 @@ function TabBarBody({
|
|
|
623
706
|
activeIndex,
|
|
624
707
|
driven,
|
|
625
708
|
selectIndex,
|
|
709
|
+
onIndexLongPress,
|
|
710
|
+
longPressIndex,
|
|
626
711
|
recipe.paint.theme,
|
|
627
712
|
],
|
|
628
713
|
);
|
|
@@ -632,7 +717,7 @@ function TabBarBody({
|
|
|
632
717
|
{...viewProps}
|
|
633
718
|
{...dirProps}
|
|
634
719
|
onLayout={(event) => {
|
|
635
|
-
setContainerWidth(event.nativeEvent.layout.width);
|
|
720
|
+
if (!collapseActive) setContainerWidth(event.nativeEvent.layout.width);
|
|
636
721
|
onLayout?.(event);
|
|
637
722
|
}}
|
|
638
723
|
style={[[embedded ? { width: '100%' } : styles.root, style], pointerEventsStyle('box-none')]}
|
|
@@ -669,24 +754,57 @@ function TabBarBody({
|
|
|
669
754
|
pointerEventsStyle('box-none'),
|
|
670
755
|
]}
|
|
671
756
|
>
|
|
672
|
-
<OptionalGesture enabled={!scrollable} gesture={gesture}>
|
|
757
|
+
<OptionalGesture enabled={!scrollable && !collapseActive} gesture={gesture}>
|
|
673
758
|
<Animated.View style={[barStyle, surfaceFillVars(recipe.paint.material.publishedFill)]}>
|
|
674
759
|
<TabBarSurface
|
|
675
760
|
theme={theme}
|
|
676
761
|
paintFill={recipe.paint.material.paintFill}
|
|
677
762
|
style={shapeStyle}
|
|
678
763
|
/>
|
|
679
|
-
|
|
680
|
-
<
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
764
|
+
{collapseActive ? (
|
|
765
|
+
<View
|
|
766
|
+
pointerEvents="none"
|
|
767
|
+
style={[
|
|
768
|
+
StyleSheet.absoluteFill,
|
|
769
|
+
{ flexDirection: 'row', alignItems: 'center', paddingHorizontal: ROW_PAD_H },
|
|
770
|
+
]}
|
|
771
|
+
>
|
|
772
|
+
<Animated.View style={[{ flexBasis: 0 }, leadingFoldStyle]} />
|
|
773
|
+
<Animated.View
|
|
774
|
+
style={[
|
|
775
|
+
{ flexGrow: 1, flexBasis: 0, borderRadius: borderRadius.full },
|
|
776
|
+
foldingHighlightStyle,
|
|
777
|
+
]}
|
|
778
|
+
>
|
|
779
|
+
<SurfacePaint
|
|
780
|
+
fill={recipe.paint.theme.highlight}
|
|
781
|
+
radius={borderRadius.full}
|
|
782
|
+
composite
|
|
783
|
+
backing={publishedFill}
|
|
784
|
+
/>
|
|
785
|
+
</Animated.View>
|
|
786
|
+
<Animated.View style={[{ flexBasis: 0 }, trailingFoldStyle]} />
|
|
787
|
+
</View>
|
|
788
|
+
) : (
|
|
789
|
+
<Animated.View style={[styles.highlight, highlightStyle]}>
|
|
790
|
+
<SurfacePaint
|
|
791
|
+
fill={recipe.paint.theme.highlight}
|
|
792
|
+
radius={borderRadius.full}
|
|
793
|
+
composite
|
|
794
|
+
backing={publishedFill}
|
|
795
|
+
presence={IS_WEB ? (highlightPresent ? 1 : 0) : undefined}
|
|
796
|
+
presenceMs={SELECTION_FADE.duration}
|
|
797
|
+
/>
|
|
798
|
+
</Animated.View>
|
|
799
|
+
)}
|
|
800
|
+
<Animated.View
|
|
801
|
+
collapsable={false}
|
|
802
|
+
accessibilityRole="tablist"
|
|
803
|
+
style={[
|
|
804
|
+
styles.itemRow,
|
|
805
|
+
collapseActive ? [{ alignItems: 'stretch' }, foldingRowStyle] : undefined,
|
|
806
|
+
]}
|
|
807
|
+
>
|
|
690
808
|
<SurfaceLevelProvider
|
|
691
809
|
level={layer.level}
|
|
692
810
|
fill={publishedFill}
|
|
@@ -699,7 +817,7 @@ function TabBarBody({
|
|
|
699
817
|
>
|
|
700
818
|
<BarContext.Provider value={barContext}>{children}</BarContext.Provider>
|
|
701
819
|
</SurfaceLevelProvider>
|
|
702
|
-
</View>
|
|
820
|
+
</Animated.View>
|
|
703
821
|
</Animated.View>
|
|
704
822
|
</OptionalGesture>
|
|
705
823
|
</View>
|
|
@@ -742,6 +860,30 @@ function TabBarButtonBody({
|
|
|
742
860
|
// The two paths meet here: an explicit `isFocused` (router adapter) wins;
|
|
743
861
|
// otherwise focus comes from the bar's controlled `activeIndex`.
|
|
744
862
|
const focused = isFocused ?? bar?.activeIndex === index;
|
|
863
|
+
const collapseActive = bar?.collapseActive ?? false;
|
|
864
|
+
const buttonRef = useRef<React.ComponentRef<typeof Pressable>>(null);
|
|
865
|
+
const [folded, setFolded] = useState(() => collapseActive && !focused && progress.value > 0.5);
|
|
866
|
+
useAnimatedReaction(
|
|
867
|
+
() => collapseActive && !focused && progress.value > 0.5,
|
|
868
|
+
(next, previous) => {
|
|
869
|
+
if (next !== previous) runOnJS(setFolded)(next);
|
|
870
|
+
},
|
|
871
|
+
[collapseActive, focused, progress, setFolded],
|
|
872
|
+
);
|
|
873
|
+
useEffect(() => {
|
|
874
|
+
if (!IS_WEB || !buttonRef.current) return;
|
|
875
|
+
const button = buttonRef.current as unknown as HTMLElement;
|
|
876
|
+
if (folded && button.contains(document.activeElement))
|
|
877
|
+
button
|
|
878
|
+
.closest('[role="tablist"]')
|
|
879
|
+
?.querySelector<HTMLElement>('[aria-selected="true"]')
|
|
880
|
+
?.focus();
|
|
881
|
+
button.inert = folded;
|
|
882
|
+
}, [folded]);
|
|
883
|
+
const foldStyle = useAnimatedStyle(() => {
|
|
884
|
+
const amount = collapseActive && !focused ? Math.min(1, Math.max(0, progress.value)) : 0;
|
|
885
|
+
return { flexGrow: 1 - amount, opacity: 1 - amount };
|
|
886
|
+
}, [collapseActive, focused, progress]);
|
|
745
887
|
|
|
746
888
|
// FOCUS-DRIVEN path only. Covers programmatic navigation too (deep links,
|
|
747
889
|
// back gestures) — the trigger re-renders focused and the highlight follows.
|
|
@@ -807,15 +949,25 @@ function TabBarButtonBody({
|
|
|
807
949
|
);
|
|
808
950
|
|
|
809
951
|
return (
|
|
810
|
-
<
|
|
952
|
+
<AnimatedPressable
|
|
953
|
+
ref={buttonRef}
|
|
811
954
|
// Accessibility defaults come BEFORE the spread so an explicit prop — or
|
|
812
955
|
// one injected by a router trigger — still wins.
|
|
813
956
|
accessibilityRole="tab"
|
|
957
|
+
accessibilityElementsHidden={folded}
|
|
958
|
+
importantForAccessibility={folded ? 'no-hide-descendants' : 'auto'}
|
|
959
|
+
aria-hidden={folded}
|
|
960
|
+
tabIndex={folded ? -1 : undefined}
|
|
961
|
+
pointerEvents={folded ? 'none' : 'auto'}
|
|
814
962
|
// `aria-selected` is the state ARIA defines for `role="tab"`, and the one
|
|
815
963
|
// spelling both platforms read: react-native-web ignores
|
|
816
964
|
// `accessibilityState`, React Native folds `aria-selected` into it.
|
|
817
965
|
aria-selected={focused}
|
|
818
966
|
accessibilityLabel={item.label}
|
|
967
|
+
onLongPress={
|
|
968
|
+
collapseActive && bar?.longPressIndex ? () => bar.longPressIndex?.(index) : undefined
|
|
969
|
+
}
|
|
970
|
+
delayLongPress={LONG_PRESS_MIN_DURATION}
|
|
819
971
|
{...pressableProps}
|
|
820
972
|
// ASSISTIVE TECHNOLOGY, on native, is the one activation the bar's gesture
|
|
821
973
|
// cannot see: TalkBack and VoiceOver activate a view without ever
|
|
@@ -824,9 +976,17 @@ function TabBarButtonBody({
|
|
|
824
976
|
accessibilityActions={ACTIVATE_ACTIONS}
|
|
825
977
|
onAccessibilityAction={(event) => {
|
|
826
978
|
if (event.nativeEvent.actionName !== 'activate') return;
|
|
979
|
+
if (collapseActive && progress.value > 0.5) {
|
|
980
|
+
bar?.expand();
|
|
981
|
+
return;
|
|
982
|
+
}
|
|
827
983
|
if (isFocused === undefined) bar?.selectIndex(index);
|
|
828
984
|
}}
|
|
829
985
|
onPress={(event) => {
|
|
986
|
+
if (collapseActive && progress.value > 0.5) {
|
|
987
|
+
bar?.expand();
|
|
988
|
+
return;
|
|
989
|
+
}
|
|
830
990
|
// Fires for keyboard and assistive-technology activation, and on
|
|
831
991
|
// Android and web also for the pointer taps the gesture reports.
|
|
832
992
|
if (bar) {
|
|
@@ -857,8 +1017,12 @@ function TabBarButtonBody({
|
|
|
857
1017
|
// or scale a tab on press without losing the layout.
|
|
858
1018
|
style={
|
|
859
1019
|
typeof style === 'function'
|
|
860
|
-
? (state) => [
|
|
861
|
-
|
|
1020
|
+
? (state: PressableStateCallbackType) => [
|
|
1021
|
+
styles.button,
|
|
1022
|
+
style(state),
|
|
1023
|
+
collapseActive ? foldStyle : undefined,
|
|
1024
|
+
]
|
|
1025
|
+
: [styles.button, style, collapseActive ? foldStyle : undefined]
|
|
862
1026
|
}
|
|
863
1027
|
>
|
|
864
1028
|
<Animated.View style={[styles.itemBox, boxStyle]}>
|
|
@@ -885,7 +1049,7 @@ function TabBarButtonBody({
|
|
|
885
1049
|
{item.label}
|
|
886
1050
|
</Animated.Text>
|
|
887
1051
|
</Animated.View>
|
|
888
|
-
</
|
|
1052
|
+
</AnimatedPressable>
|
|
889
1053
|
);
|
|
890
1054
|
}
|
|
891
1055
|
|
|
@@ -934,6 +1098,8 @@ const styles = StyleSheet.create({
|
|
|
934
1098
|
},
|
|
935
1099
|
button: {
|
|
936
1100
|
flex: 1,
|
|
1101
|
+
minWidth: 0,
|
|
1102
|
+
overflow: 'hidden',
|
|
937
1103
|
alignItems: 'center',
|
|
938
1104
|
justifyContent: 'center',
|
|
939
1105
|
},
|
package/src/tab-bar/shared.ts
CHANGED
|
@@ -27,6 +27,8 @@ import type { TabBarItem, TabBarTheme } from './types';
|
|
|
27
27
|
|
|
28
28
|
export const EXPANDED_HEIGHT = 58;
|
|
29
29
|
export const MINIMIZED_HEIGHT = 44;
|
|
30
|
+
/** Fraction of shared collapse progress that frees the editor's horizontal lane. */
|
|
31
|
+
export const DOCK_NAVIGATION_PHASE = 0.6;
|
|
30
32
|
/** Extra horizontal inset applied to the pill when minimized (per side). */
|
|
31
33
|
export const MINIMIZED_INSET = 34;
|
|
32
34
|
/** Outer margin between the pill and the screen edges (per side). */
|
package/src/tab-bar/types.ts
CHANGED
|
@@ -75,6 +75,8 @@ export type TabBarProps = ViewProps & {
|
|
|
75
75
|
scrollable?: boolean;
|
|
76
76
|
/** One motion signal shared with screen chrome. */
|
|
77
77
|
minimizeProgress?: SharedValue<number>;
|
|
78
|
+
/** Fold to the active destination instead of retaining every compact icon. */
|
|
79
|
+
minimizeBehavior?: 'compact' | 'active';
|
|
78
80
|
/**
|
|
79
81
|
* CONTROLLED path — the index of the focused tab. The bar owns the sliding
|
|
80
82
|
* highlight and springs it here whenever this changes. Use this when there is
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useCallback, useContext } from 'react';
|
|
1
|
+
import { useCallback, useContext, useMemo } from 'react';
|
|
2
2
|
import { BottomBar } from '../bottom-bar';
|
|
3
3
|
import type { BottomBarProps } from '../bottom-bar/types';
|
|
4
4
|
import { useHapticFeedback } from '../hooks/use-haptics';
|
|
@@ -53,7 +53,27 @@ export function useTabPagerBottomBar(): Required<
|
|
|
53
53
|
* else is `BottomBar`'s own props — `action` for a compose button,
|
|
54
54
|
* `minimizeProgress`.
|
|
55
55
|
*/
|
|
56
|
-
export function TabPagerBottomBar(props: TabPagerBottomBarProps) {
|
|
56
|
+
export function TabPagerBottomBar({ routeBehavior = 'current', ...props }: TabPagerBottomBarProps) {
|
|
57
57
|
const { onValueLongPress, ...bound } = useTabPagerBottomBar();
|
|
58
|
-
|
|
58
|
+
// The provider already preserves progress on pushed routes. Read that
|
|
59
|
+
// existing selection only when route identity changes, never per frame.
|
|
60
|
+
const contextualValue = useMemo(
|
|
61
|
+
() =>
|
|
62
|
+
bound.value ||
|
|
63
|
+
bound.items[Math.round(bound.activeProgress.value)]?.name ||
|
|
64
|
+
bound.items[0]?.name ||
|
|
65
|
+
'',
|
|
66
|
+
[bound.value, bound.items, bound.activeProgress],
|
|
67
|
+
);
|
|
68
|
+
const contextual = routeBehavior === 'contextual' && !bound.value;
|
|
69
|
+
return (
|
|
70
|
+
<BottomBar
|
|
71
|
+
onValueLongPress={onValueLongPress}
|
|
72
|
+
{...props}
|
|
73
|
+
{...bound}
|
|
74
|
+
value={contextual ? contextualValue : bound.value}
|
|
75
|
+
activeProgress={contextual ? undefined : bound.activeProgress}
|
|
76
|
+
hideProgress={contextual ? undefined : bound.hideProgress}
|
|
77
|
+
/>
|
|
78
|
+
);
|
|
59
79
|
}
|
package/src/tab-pager/types.ts
CHANGED
|
@@ -112,4 +112,7 @@ export interface TabPagerState {
|
|
|
112
112
|
export type TabPagerBottomBarProps = Omit<
|
|
113
113
|
BottomBarProps,
|
|
114
114
|
'items' | 'value' | 'onValueChange' | 'activeProgress' | 'hideProgress'
|
|
115
|
-
|
|
115
|
+
> & {
|
|
116
|
+
/** Keep the last pager destination selected on a pushed route; deep links use the first item. */
|
|
117
|
+
routeBehavior?: 'current' | 'contextual';
|
|
118
|
+
};
|